]> git.sur5r.net Git - openldap/blob - configure
More for #4884, helper for #5173
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.631.2.6 2007/08/31 23:13:50 quanah Exp .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.59.
5 #
6 # Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 # Copyright (C) 2003 Free Software Foundation, Inc.
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248
249 # Check that we are running under the correct shell.
250 SHELL=${CONFIG_SHELL-/bin/sh}
251
252 case X$ECHO in
253 X*--fallback-echo)
254   # Remove one level of quotation (which was required for Make).
255   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
256   ;;
257 esac
258
259 echo=${ECHO-echo}
260 if test "X$1" = X--no-reexec; then
261   # Discard the --no-reexec flag, and continue.
262   shift
263 elif test "X$1" = X--fallback-echo; then
264   # Avoid inline document here, it may be left over
265   :
266 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
267   # Yippee, $echo works!
268   :
269 else
270   # Restart under the correct shell.
271   exec $SHELL "$0" --no-reexec ${1+"$@"}
272 fi
273
274 if test "X$1" = X--fallback-echo; then
275   # used as fallback echo
276   shift
277   cat <<EOF
278 $*
279 EOF
280   exit 0
281 fi
282
283 # The HP-UX ksh and POSIX shell print the target directory to stdout
284 # if CDPATH is set.
285 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
286
287 if test -z "$ECHO"; then
288 if test "X${echo_test_string+set}" != Xset; then
289 # find a string as large as possible, as long as the shell can cope with it
290   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
291     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
292     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
293        echo_test_string=`eval $cmd` &&
294        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
295     then
296       break
297     fi
298   done
299 fi
300
301 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
302    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
303    test "X$echo_testing_string" = "X$echo_test_string"; then
304   :
305 else
306   # The Solaris, AIX, and Digital Unix default echo programs unquote
307   # backslashes.  This makes it impossible to quote backslashes using
308   #   echo "$something" | sed 's/\\/\\\\/g'
309   #
310   # So, first we look for a working echo in the user's PATH.
311
312   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
313   for dir in $PATH /usr/ucb; do
314     IFS="$lt_save_ifs"
315     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
316        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
317        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
318        test "X$echo_testing_string" = "X$echo_test_string"; then
319       echo="$dir/echo"
320       break
321     fi
322   done
323   IFS="$lt_save_ifs"
324
325   if test "X$echo" = Xecho; then
326     # We didn't find a better echo, so look for alternatives.
327     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
328        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
329        test "X$echo_testing_string" = "X$echo_test_string"; then
330       # This shell has a builtin print -r that does the trick.
331       echo='print -r'
332     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
333          test "X$CONFIG_SHELL" != X/bin/ksh; then
334       # If we have ksh, try running configure again with it.
335       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
336       export ORIGINAL_CONFIG_SHELL
337       CONFIG_SHELL=/bin/ksh
338       export CONFIG_SHELL
339       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
340     else
341       # Try using printf.
342       echo='printf %s\n'
343       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
344          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
345          test "X$echo_testing_string" = "X$echo_test_string"; then
346         # Cool, printf works
347         :
348       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
349            test "X$echo_testing_string" = 'X\t' &&
350            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
351            test "X$echo_testing_string" = "X$echo_test_string"; then
352         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
353         export CONFIG_SHELL
354         SHELL="$CONFIG_SHELL"
355         export SHELL
356         echo="$CONFIG_SHELL $0 --fallback-echo"
357       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
358            test "X$echo_testing_string" = 'X\t' &&
359            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
360            test "X$echo_testing_string" = "X$echo_test_string"; then
361         echo="$CONFIG_SHELL $0 --fallback-echo"
362       else
363         # maybe with a smaller string...
364         prev=:
365
366         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
367           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
368           then
369             break
370           fi
371           prev="$cmd"
372         done
373
374         if test "$prev" != 'sed 50q "$0"'; then
375           echo_test_string=`eval $prev`
376           export echo_test_string
377           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
378         else
379           # Oops.  We lost completely, so just stick with echo.
380           echo=echo
381         fi
382       fi
383     fi
384   fi
385 fi
386 fi
387
388 # Copy echo and quote the copy suitably for passing to libtool from
389 # the Makefile, instead of quoting the original, which is used later.
390 ECHO=$echo
391 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
392    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
393 fi
394
395
396
397
398 # Name of the host.
399 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
400 # so uname gets run too.
401 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
402
403 exec 6>&1
404
405 #
406 # Initializations.
407 #
408 ac_default_prefix=/usr/local
409 ac_config_libobj_dir=.
410 cross_compiling=no
411 subdirs=
412 MFLAGS=
413 MAKEFLAGS=
414 SHELL=${CONFIG_SHELL-/bin/sh}
415
416 # Maximum number of lines to put in a shell here document.
417 # This variable seems obsolete.  It should probably be removed, and
418 # only ac_max_sed_lines should be used.
419 : ${ac_max_here_lines=38}
420
421 # Identity of this package.
422 PACKAGE_NAME=
423 PACKAGE_TARNAME=
424 PACKAGE_VERSION=
425 PACKAGE_STRING=
426 PACKAGE_BUGREPORT=
427
428 ac_unique_file="OpenLDAP"
429 ac_unique_file="build/version.sh"
430 ac_default_prefix=/usr/local
431 # Factoring default headers for most tests.
432 ac_includes_default="\
433 #include <stdio.h>
434 #if HAVE_SYS_TYPES_H
435 # include <sys/types.h>
436 #endif
437 #if HAVE_SYS_STAT_H
438 # include <sys/stat.h>
439 #endif
440 #if STDC_HEADERS
441 # include <stdlib.h>
442 # include <stddef.h>
443 #else
444 # if HAVE_STDLIB_H
445 #  include <stdlib.h>
446 # endif
447 #endif
448 #if HAVE_STRING_H
449 # if !STDC_HEADERS && HAVE_MEMORY_H
450 #  include <memory.h>
451 # endif
452 # include <string.h>
453 #endif
454 #if HAVE_STRINGS_H
455 # include <strings.h>
456 #endif
457 #if HAVE_INTTYPES_H
458 # include <inttypes.h>
459 #else
460 # if HAVE_STDINT_H
461 #  include <stdint.h>
462 # endif
463 #endif
464 #if HAVE_UNISTD_H
465 # include <unistd.h>
466 #endif"
467
468 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar OPENLDAP_LIBRELEASE OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP LIBTOOL PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT WITH_SASL WITH_TLS WITH_MODULES_ENABLED WITH_ACI_ENABLED BUILD_THREAD BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_HDB BUILD_LDAP BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_RELAY BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_ACCESSLOG BUILD_AUDITLOG BUILD_CONSTRAINT 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 LDAP_LIBS SLAPD_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-constraint   Attribute Constraint overlay no|yes|mod [no]
1051     --enable-dds          Dynamic Directory Services 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-memberof     Reverse Group Membership 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 Library Generation & Linking Options
1067   --enable-static[=PKGS]
1068                           build static libraries [default=yes]
1069   --enable-shared[=PKGS]
1070                           build shared libraries [default=yes]
1071   --enable-fast-install[=PKGS]
1072                           optimize for fast installation [default=yes]
1073   --disable-dependency-tracking  speeds up one-time build
1074   --enable-dependency-tracking   do not reject slow dependency extractors
1075   --disable-libtool-lock  avoid locking (might break parallel builds)
1076
1077 Optional Packages:
1078   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1079   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1080   --with-subdir=DIR       change default subdirectory used for installs
1081   --with-cyrus-sasl       with Cyrus SASL support [auto]
1082   --with-fetch            with fetch(3) URL support [auto]
1083   --with-threads          with threads [auto]
1084   --with-tls              with TLS/SSL support auto|openssl|gnutls [auto]
1085   --with-yielding-select  with implicitly yielding select [auto]
1086   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1087   --with-odbc             with specific ODBC support iodbc|unixodbc|auto [auto]
1088   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1089   --with-pic              try to use only PIC/non-PIC objects [default=use
1090                           both]
1091   --with-tags[=TAGS]
1092                           include additional configurations [automatic]
1093
1094 See INSTALL file for further details.
1095
1096 Some influential environment variables:
1097   CC          C compiler command
1098   CFLAGS      C compiler flags
1099   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1100               nonstandard directory <lib dir>
1101   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1102               headers in a nonstandard directory <include dir>
1103   CPP         C preprocessor
1104
1105 Use these variables to override the choices made by `configure' or to help
1106 it to find libraries and programs with nonstandard names/locations.
1107
1108 _ACEOF
1109 fi
1110
1111 if test "$ac_init_help" = "recursive"; then
1112   # If there are subdirs, report their specific --help.
1113   ac_popdir=`pwd`
1114   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1115     test -d $ac_dir || continue
1116     ac_builddir=.
1117
1118 if test "$ac_dir" != .; then
1119   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1120   # A "../" for each directory in $ac_dir_suffix.
1121   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1122 else
1123   ac_dir_suffix= ac_top_builddir=
1124 fi
1125
1126 case $srcdir in
1127   .)  # No --srcdir option.  We are building in place.
1128     ac_srcdir=.
1129     if test -z "$ac_top_builddir"; then
1130        ac_top_srcdir=.
1131     else
1132        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1133     fi ;;
1134   [\\/]* | ?:[\\/]* )  # Absolute path.
1135     ac_srcdir=$srcdir$ac_dir_suffix;
1136     ac_top_srcdir=$srcdir ;;
1137   *) # Relative path.
1138     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1139     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1140 esac
1141
1142 # Do not use `cd foo && pwd` to compute absolute paths, because
1143 # the directories may not exist.
1144 case `pwd` in
1145 .) ac_abs_builddir="$ac_dir";;
1146 *)
1147   case "$ac_dir" in
1148   .) ac_abs_builddir=`pwd`;;
1149   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
1150   *) ac_abs_builddir=`pwd`/"$ac_dir";;
1151   esac;;
1152 esac
1153 case $ac_abs_builddir in
1154 .) ac_abs_top_builddir=${ac_top_builddir}.;;
1155 *)
1156   case ${ac_top_builddir}. in
1157   .) ac_abs_top_builddir=$ac_abs_builddir;;
1158   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
1159   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
1160   esac;;
1161 esac
1162 case $ac_abs_builddir in
1163 .) ac_abs_srcdir=$ac_srcdir;;
1164 *)
1165   case $ac_srcdir in
1166   .) ac_abs_srcdir=$ac_abs_builddir;;
1167   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
1168   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
1169   esac;;
1170 esac
1171 case $ac_abs_builddir in
1172 .) ac_abs_top_srcdir=$ac_top_srcdir;;
1173 *)
1174   case $ac_top_srcdir in
1175   .) ac_abs_top_srcdir=$ac_abs_builddir;;
1176   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
1177   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
1178   esac;;
1179 esac
1180
1181     cd $ac_dir
1182     # Check for guested configure; otherwise get Cygnus style configure.
1183     if test -f $ac_srcdir/configure.gnu; then
1184       echo
1185       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1186     elif test -f $ac_srcdir/configure; then
1187       echo
1188       $SHELL $ac_srcdir/configure  --help=recursive
1189     elif test -f $ac_srcdir/configure.ac ||
1190            test -f $ac_srcdir/configure.in; then
1191       echo
1192       $ac_configure --help
1193     else
1194       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1195     fi
1196     cd $ac_popdir
1197   done
1198 fi
1199
1200 test -n "$ac_init_help" && exit 0
1201 if $ac_init_version; then
1202   cat <<\_ACEOF
1203
1204 Copyright (C) 2003 Free Software Foundation, Inc.
1205 This configure script is free software; the Free Software Foundation
1206 gives unlimited permission to copy, distribute and modify it.
1207
1208 Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.
1209 Restrictions apply, see COPYRIGHT and LICENSE files.
1210 _ACEOF
1211   exit 0
1212 fi
1213 exec 5>config.log
1214 cat >&5 <<_ACEOF
1215 This file contains any messages produced by compilers while
1216 running configure, to aid debugging if configure makes a mistake.
1217
1218 It was created by $as_me, which was
1219 generated by GNU Autoconf 2.59.  Invocation command line was
1220
1221   $ $0 $@
1222
1223 _ACEOF
1224 {
1225 cat <<_ASUNAME
1226 ## --------- ##
1227 ## Platform. ##
1228 ## --------- ##
1229
1230 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1231 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1232 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1233 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1234 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1235
1236 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1237 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1238
1239 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1240 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1241 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1242 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1243 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1244 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1245 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1246
1247 _ASUNAME
1248
1249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1250 for as_dir in $PATH
1251 do
1252   IFS=$as_save_IFS
1253   test -z "$as_dir" && as_dir=.
1254   echo "PATH: $as_dir"
1255 done
1256
1257 } >&5
1258
1259 cat >&5 <<_ACEOF
1260
1261
1262 ## ----------- ##
1263 ## Core tests. ##
1264 ## ----------- ##
1265
1266 _ACEOF
1267
1268
1269 # Keep a trace of the command line.
1270 # Strip out --no-create and --no-recursion so they do not pile up.
1271 # Strip out --silent because we don't want to record it for future runs.
1272 # Also quote any args containing shell meta-characters.
1273 # Make two passes to allow for proper duplicate-argument suppression.
1274 ac_configure_args=
1275 ac_configure_args0=
1276 ac_configure_args1=
1277 ac_sep=
1278 ac_must_keep_next=false
1279 for ac_pass in 1 2
1280 do
1281   for ac_arg
1282   do
1283     case $ac_arg in
1284     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1285     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1286     | -silent | --silent | --silen | --sile | --sil)
1287       continue ;;
1288     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1289       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1290     esac
1291     case $ac_pass in
1292     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1293     2)
1294       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1295       if test $ac_must_keep_next = true; then
1296         ac_must_keep_next=false # Got value, back to normal.
1297       else
1298         case $ac_arg in
1299           *=* | --config-cache | -C | -disable-* | --disable-* \
1300           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1301           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1302           | -with-* | --with-* | -without-* | --without-* | --x)
1303             case "$ac_configure_args0 " in
1304               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1305             esac
1306             ;;
1307           -* ) ac_must_keep_next=true ;;
1308         esac
1309       fi
1310       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1311       # Get rid of the leading space.
1312       ac_sep=" "
1313       ;;
1314     esac
1315   done
1316 done
1317 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1318 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1319
1320 # When interrupted or exit'd, cleanup temporary files, and complete
1321 # config.log.  We remove comments because anyway the quotes in there
1322 # would cause problems or look ugly.
1323 # WARNING: Be sure not to use single quotes in there, as some shells,
1324 # such as our DU 5.0 friend, will then `close' the trap.
1325 trap 'exit_status=$?
1326   # Save into config.log some information that might help in debugging.
1327   {
1328     echo
1329
1330     cat <<\_ASBOX
1331 ## ---------------- ##
1332 ## Cache variables. ##
1333 ## ---------------- ##
1334 _ASBOX
1335     echo
1336     # The following way of writing the cache mishandles newlines in values,
1337 {
1338   (set) 2>&1 |
1339     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1340     *ac_space=\ *)
1341       sed -n \
1342         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1343           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1344       ;;
1345     *)
1346       sed -n \
1347         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1348       ;;
1349     esac;
1350 }
1351     echo
1352
1353     cat <<\_ASBOX
1354 ## ----------------- ##
1355 ## Output variables. ##
1356 ## ----------------- ##
1357 _ASBOX
1358     echo
1359     for ac_var in $ac_subst_vars
1360     do
1361       eval ac_val=$`echo $ac_var`
1362       echo "$ac_var='"'"'$ac_val'"'"'"
1363     done | sort
1364     echo
1365
1366     if test -n "$ac_subst_files"; then
1367       cat <<\_ASBOX
1368 ## ------------- ##
1369 ## Output files. ##
1370 ## ------------- ##
1371 _ASBOX
1372       echo
1373       for ac_var in $ac_subst_files
1374       do
1375         eval ac_val=$`echo $ac_var`
1376         echo "$ac_var='"'"'$ac_val'"'"'"
1377       done | sort
1378       echo
1379     fi
1380
1381     if test -s confdefs.h; then
1382       cat <<\_ASBOX
1383 ## ----------- ##
1384 ## confdefs.h. ##
1385 ## ----------- ##
1386 _ASBOX
1387       echo
1388       sed "/^$/d" confdefs.h | sort
1389       echo
1390     fi
1391     test "$ac_signal" != 0 &&
1392       echo "$as_me: caught signal $ac_signal"
1393     echo "$as_me: exit $exit_status"
1394   } >&5
1395   rm -f core *.core &&
1396   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1397     exit $exit_status
1398      ' 0
1399 for ac_signal in 1 2 13 15; do
1400   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1401 done
1402 ac_signal=0
1403
1404 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1405 rm -rf conftest* confdefs.h
1406 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1407 echo >confdefs.h
1408
1409 # Predefined preprocessor variables.
1410
1411 cat >>confdefs.h <<_ACEOF
1412 #define PACKAGE_NAME "$PACKAGE_NAME"
1413 _ACEOF
1414
1415
1416 cat >>confdefs.h <<_ACEOF
1417 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1418 _ACEOF
1419
1420
1421 cat >>confdefs.h <<_ACEOF
1422 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1423 _ACEOF
1424
1425
1426 cat >>confdefs.h <<_ACEOF
1427 #define PACKAGE_STRING "$PACKAGE_STRING"
1428 _ACEOF
1429
1430
1431 cat >>confdefs.h <<_ACEOF
1432 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1433 _ACEOF
1434
1435
1436 # Let the site file select an alternate cache file if it wants to.
1437 # Prefer explicitly selected file to automatically selected ones.
1438 if test -z "$CONFIG_SITE"; then
1439   if test "x$prefix" != xNONE; then
1440     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1441   else
1442     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1443   fi
1444 fi
1445 for ac_site_file in $CONFIG_SITE; do
1446   if test -r "$ac_site_file"; then
1447     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1448 echo "$as_me: loading site script $ac_site_file" >&6;}
1449     sed 's/^/| /' "$ac_site_file" >&5
1450     . "$ac_site_file"
1451   fi
1452 done
1453
1454
1455 # Check that the precious variables saved in the cache have kept the same
1456 # value.
1457 ac_cache_corrupted=false
1458 for ac_var in `(set) 2>&1 |
1459                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1460   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1461   eval ac_new_set=\$ac_env_${ac_var}_set
1462   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1463   eval ac_new_val="\$ac_env_${ac_var}_value"
1464   case $ac_old_set,$ac_new_set in
1465     set,)
1466       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1467 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1468       ac_cache_corrupted=: ;;
1469     ,set)
1470       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1471 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1472       ac_cache_corrupted=: ;;
1473     ,);;
1474     *)
1475       if test "x$ac_old_val" != "x$ac_new_val"; then
1476         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1477 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1478         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1479 echo "$as_me:   former value:  $ac_old_val" >&2;}
1480         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1481 echo "$as_me:   current value: $ac_new_val" >&2;}
1482         ac_cache_corrupted=:
1483       fi;;
1484   esac
1485   # Pass precious variables to config.status.
1486   if test "$ac_new_set" = set; then
1487     case $ac_new_val in
1488     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1489       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1490     *) ac_arg=$ac_var=$ac_new_val ;;
1491     esac
1492     case " $ac_configure_args " in
1493       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1494       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1495     esac
1496   fi
1497 done
1498 if $ac_cache_corrupted; then
1499   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1500 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1501   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1502 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1503    { (exit 1); exit 1; }; }
1504 fi
1505
1506 ac_ext=c
1507 ac_cpp='$CPP $CPPFLAGS'
1508 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1509 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1510 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1511
1512
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 ac_aux_dir=
1555 for ac_dir in build $srcdir/build; do
1556   if test -f $ac_dir/install-sh; then
1557     ac_aux_dir=$ac_dir
1558     ac_install_sh="$ac_aux_dir/install-sh -c"
1559     break
1560   elif test -f $ac_dir/install.sh; then
1561     ac_aux_dir=$ac_dir
1562     ac_install_sh="$ac_aux_dir/install.sh -c"
1563     break
1564   elif test -f $ac_dir/shtool; then
1565     ac_aux_dir=$ac_dir
1566     ac_install_sh="$ac_aux_dir/shtool install -c"
1567     break
1568   fi
1569 done
1570 if test -z "$ac_aux_dir"; then
1571   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1572 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1573    { (exit 1); exit 1; }; }
1574 fi
1575 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1576 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1577 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1578
1579 eval `$ac_aux_dir/version.sh`
1580 if test -z "$OL_STRING"; then
1581         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1582 echo "$as_me: error: could not determine version" >&2;}
1583    { (exit 1); exit 1; }; }
1584 fi
1585
1586 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
1587         ac_cv_shtool="$ac_aux_dir/shtool"
1588 else
1589         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
1590 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
1591    { (exit 1); exit 1; }; }
1592 fi
1593
1594 SHTOOL="$ac_cv_shtool"
1595
1596 TB="" TN=""
1597 if test -t 1; then
1598         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1599         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1600 fi
1601
1602 OPENLDAP_CVS=""
1603 if test -d $ac_aux_dir/CVS; then
1604         OPENLDAP_CVS="(from CVS sources) "
1605 fi
1606
1607 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1608
1609 # Make sure we can run config.sub.
1610 $ac_config_sub sun4 >/dev/null 2>&1 ||
1611   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1612 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1613    { (exit 1); exit 1; }; }
1614
1615 echo "$as_me:$LINENO: checking build system type" >&5
1616 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1617 if test "${ac_cv_build+set}" = set; then
1618   echo $ECHO_N "(cached) $ECHO_C" >&6
1619 else
1620   ac_cv_build_alias=$build_alias
1621 test -z "$ac_cv_build_alias" &&
1622   ac_cv_build_alias=`$ac_config_guess`
1623 test -z "$ac_cv_build_alias" &&
1624   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1625 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1626    { (exit 1); exit 1; }; }
1627 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1628   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1629 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1630    { (exit 1); exit 1; }; }
1631
1632 fi
1633 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1634 echo "${ECHO_T}$ac_cv_build" >&6
1635 build=$ac_cv_build
1636 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1637 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1638 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1639
1640
1641 echo "$as_me:$LINENO: checking host system type" >&5
1642 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1643 if test "${ac_cv_host+set}" = set; then
1644   echo $ECHO_N "(cached) $ECHO_C" >&6
1645 else
1646   ac_cv_host_alias=$host_alias
1647 test -z "$ac_cv_host_alias" &&
1648   ac_cv_host_alias=$ac_cv_build_alias
1649 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1650   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1651 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1652    { (exit 1); exit 1; }; }
1653
1654 fi
1655 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1656 echo "${ECHO_T}$ac_cv_host" >&6
1657 host=$ac_cv_host
1658 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1659 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1660 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1661
1662
1663 echo "$as_me:$LINENO: checking target system type" >&5
1664 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1665 if test "${ac_cv_target+set}" = set; then
1666   echo $ECHO_N "(cached) $ECHO_C" >&6
1667 else
1668   ac_cv_target_alias=$target_alias
1669 test "x$ac_cv_target_alias" = "x" &&
1670   ac_cv_target_alias=$ac_cv_host_alias
1671 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1672   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1673 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1674    { (exit 1); exit 1; }; }
1675
1676 fi
1677 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1678 echo "${ECHO_T}$ac_cv_target" >&6
1679 target=$ac_cv_target
1680 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1681 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1682 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1683
1684
1685 # The aliases save the names the user supplied, while $host etc.
1686 # will get canonicalized.
1687 test -n "$target_alias" &&
1688   test "$program_prefix$program_suffix$program_transform_name" = \
1689     NONENONEs,x,x, &&
1690   program_prefix=${target_alias}-
1691
1692 am__api_version="1.9"
1693 # Find a good install program.  We prefer a C program (faster),
1694 # so one script is as good as another.  But avoid the broken or
1695 # incompatible versions:
1696 # SysV /etc/install, /usr/sbin/install
1697 # SunOS /usr/etc/install
1698 # IRIX /sbin/install
1699 # AIX /bin/install
1700 # AmigaOS /C/install, which installs bootblocks on floppy discs
1701 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1702 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1703 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1704 # OS/2's system install, which has a completely different semantic
1705 # ./install, which can be erroneously created by make from ./install.sh.
1706 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1707 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1708 if test -z "$INSTALL"; then
1709 if test "${ac_cv_path_install+set}" = set; then
1710   echo $ECHO_N "(cached) $ECHO_C" >&6
1711 else
1712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1713 for as_dir in $PATH
1714 do
1715   IFS=$as_save_IFS
1716   test -z "$as_dir" && as_dir=.
1717   # Account for people who put trailing slashes in PATH elements.
1718 case $as_dir/ in
1719   ./ | .// | /cC/* | \
1720   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1721   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1722   /usr/ucb/* ) ;;
1723   *)
1724     # OSF1 and SCO ODT 3.0 have their own names for install.
1725     # Don't use installbsd from OSF since it installs stuff as root
1726     # by default.
1727     for ac_prog in ginstall scoinst install; do
1728       for ac_exec_ext in '' $ac_executable_extensions; do
1729         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
1730           if test $ac_prog = install &&
1731             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1732             # AIX install.  It has an incompatible calling convention.
1733             :
1734           elif test $ac_prog = install &&
1735             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1736             # program-specific install script used by HP pwplus--don't use.
1737             :
1738           else
1739             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1740             break 3
1741           fi
1742         fi
1743       done
1744     done
1745     ;;
1746 esac
1747 done
1748
1749
1750 fi
1751   if test "${ac_cv_path_install+set}" = set; then
1752     INSTALL=$ac_cv_path_install
1753   else
1754     # As a last resort, use the slow shell script.  We don't cache a
1755     # path for INSTALL within a source directory, because that will
1756     # break other packages using the cache if that directory is
1757     # removed, or if the path is relative.
1758     INSTALL=$ac_install_sh
1759   fi
1760 fi
1761 echo "$as_me:$LINENO: result: $INSTALL" >&5
1762 echo "${ECHO_T}$INSTALL" >&6
1763
1764 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1765 # It thinks the first close brace ends the variable substitution.
1766 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1767
1768 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1769
1770 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1771
1772 echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1773 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
1774 # Just in case
1775 sleep 1
1776 echo timestamp > conftest.file
1777 # Do `set' in a subshell so we don't clobber the current shell's
1778 # arguments.  Must try -L first in case configure is actually a
1779 # symlink; some systems play weird games with the mod time of symlinks
1780 # (eg FreeBSD returns the mod time of the symlink's containing
1781 # directory).
1782 if (
1783    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1784    if test "$*" = "X"; then
1785       # -L didn't work.
1786       set X `ls -t $srcdir/configure conftest.file`
1787    fi
1788    rm -f conftest.file
1789    if test "$*" != "X $srcdir/configure conftest.file" \
1790       && test "$*" != "X conftest.file $srcdir/configure"; then
1791
1792       # If neither matched, then we have a broken ls.  This can happen
1793       # if, for instance, CONFIG_SHELL is bash and it inherits a
1794       # broken ls alias from the environment.  This has actually
1795       # happened.  Such a system could not be considered "sane".
1796       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
1797 alias in your environment" >&5
1798 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
1799 alias in your environment" >&2;}
1800    { (exit 1); exit 1; }; }
1801    fi
1802
1803    test "$2" = conftest.file
1804    )
1805 then
1806    # Ok.
1807    :
1808 else
1809    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1810 Check your system clock" >&5
1811 echo "$as_me: error: newly created file is older than distributed files!
1812 Check your system clock" >&2;}
1813    { (exit 1); exit 1; }; }
1814 fi
1815 echo "$as_me:$LINENO: result: yes" >&5
1816 echo "${ECHO_T}yes" >&6
1817 test "$program_prefix" != NONE &&
1818   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1819 # Use a double $ so make ignores it.
1820 test "$program_suffix" != NONE &&
1821   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1822 # Double any \ or $.  echo might interpret backslashes.
1823 # By default was `s,x,x', remove it if useless.
1824 cat <<\_ACEOF >conftest.sed
1825 s/[\\$]/&&/g;s/;s,x,x,$//
1826 _ACEOF
1827 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1828 rm conftest.sed
1829
1830 # expand $ac_aux_dir to an absolute path
1831 am_aux_dir=`cd $ac_aux_dir && pwd`
1832
1833 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1834 # Use eval to expand $SHELL
1835 if eval "$MISSING --run true"; then
1836   am_missing_run="$MISSING --run "
1837 else
1838   am_missing_run=
1839   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1840 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1841 fi
1842
1843 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1844   # We used to keeping the `.' as first argument, in order to
1845   # allow $(mkdir_p) to be used without argument.  As in
1846   #   $(mkdir_p) $(somedir)
1847   # where $(somedir) is conditionally defined.  However this is wrong
1848   # for two reasons:
1849   #  1. if the package is installed by a user who cannot write `.'
1850   #     make install will fail,
1851   #  2. the above comment should most certainly read
1852   #     $(mkdir_p) $(DESTDIR)$(somedir)
1853   #     so it does not work when $(somedir) is undefined and
1854   #     $(DESTDIR) is not.
1855   #  To support the latter case, we have to write
1856   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1857   #  so the `.' trick is pointless.
1858   mkdir_p='mkdir -p --'
1859 else
1860   # On NextStep and OpenStep, the `mkdir' command does not
1861   # recognize any option.  It will interpret all options as
1862   # directories to create, and then abort because `.' already
1863   # exists.
1864   for d in ./-p ./--version;
1865   do
1866     test -d $d && rmdir $d
1867   done
1868   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1869   if test -f "$ac_aux_dir/mkinstalldirs"; then
1870     mkdir_p='$(mkinstalldirs)'
1871   else
1872     mkdir_p='$(install_sh) -d'
1873   fi
1874 fi
1875
1876 for ac_prog in gawk mawk nawk awk
1877 do
1878   # Extract the first word of "$ac_prog", so it can be a program name with args.
1879 set dummy $ac_prog; ac_word=$2
1880 echo "$as_me:$LINENO: checking for $ac_word" >&5
1881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1882 if test "${ac_cv_prog_AWK+set}" = set; then
1883   echo $ECHO_N "(cached) $ECHO_C" >&6
1884 else
1885   if test -n "$AWK"; then
1886   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1887 else
1888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1889 for as_dir in $PATH
1890 do
1891   IFS=$as_save_IFS
1892   test -z "$as_dir" && as_dir=.
1893   for ac_exec_ext in '' $ac_executable_extensions; do
1894   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1895     ac_cv_prog_AWK="$ac_prog"
1896     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1897     break 2
1898   fi
1899 done
1900 done
1901
1902 fi
1903 fi
1904 AWK=$ac_cv_prog_AWK
1905 if test -n "$AWK"; then
1906   echo "$as_me:$LINENO: result: $AWK" >&5
1907 echo "${ECHO_T}$AWK" >&6
1908 else
1909   echo "$as_me:$LINENO: result: no" >&5
1910 echo "${ECHO_T}no" >&6
1911 fi
1912
1913   test -n "$AWK" && break
1914 done
1915
1916 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
1917 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
1918 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
1919 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1920   echo $ECHO_N "(cached) $ECHO_C" >&6
1921 else
1922   cat >conftest.make <<\_ACEOF
1923 all:
1924         @echo 'ac_maketemp="$(MAKE)"'
1925 _ACEOF
1926 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1927 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1928 if test -n "$ac_maketemp"; then
1929   eval ac_cv_prog_make_${ac_make}_set=yes
1930 else
1931   eval ac_cv_prog_make_${ac_make}_set=no
1932 fi
1933 rm -f conftest.make
1934 fi
1935 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1936   echo "$as_me:$LINENO: result: yes" >&5
1937 echo "${ECHO_T}yes" >&6
1938   SET_MAKE=
1939 else
1940   echo "$as_me:$LINENO: result: no" >&5
1941 echo "${ECHO_T}no" >&6
1942   SET_MAKE="MAKE=${MAKE-make}"
1943 fi
1944
1945 rm -rf .tst 2>/dev/null
1946 mkdir .tst 2>/dev/null
1947 if test -d .tst; then
1948   am__leading_dot=.
1949 else
1950   am__leading_dot=_
1951 fi
1952 rmdir .tst 2>/dev/null
1953
1954 # test to see if srcdir already configured
1955 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1956    test -f $srcdir/config.status; then
1957   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
1958 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1959    { (exit 1); exit 1; }; }
1960 fi
1961
1962 # test whether we have cygpath
1963 if test -z "$CYGPATH_W"; then
1964   if (cygpath --version) >/dev/null 2>/dev/null; then
1965     CYGPATH_W='cygpath -w'
1966   else
1967     CYGPATH_W=echo
1968   fi
1969 fi
1970
1971
1972 # Define the identity of the package.
1973  PACKAGE=$OL_PACKAGE
1974  VERSION=$OL_VERSION
1975
1976
1977 # Some tools Automake needs.
1978
1979 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
1980
1981
1982 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
1983
1984
1985 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
1986
1987
1988 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
1989
1990
1991 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
1992
1993 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1994
1995 # Installed binaries are usually stripped using `strip' when the user
1996 # run `make install-strip'.  However `strip' might not be the right
1997 # tool to use in cross-compilation environments, therefore Automake
1998 # will honor the `STRIP' environment variable to overrule this program.
1999 if test "$cross_compiling" != no; then
2000   if test -n "$ac_tool_prefix"; then
2001   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2002 set dummy ${ac_tool_prefix}strip; ac_word=$2
2003 echo "$as_me:$LINENO: checking for $ac_word" >&5
2004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2005 if test "${ac_cv_prog_STRIP+set}" = set; then
2006   echo $ECHO_N "(cached) $ECHO_C" >&6
2007 else
2008   if test -n "$STRIP"; then
2009   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2010 else
2011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2012 for as_dir in $PATH
2013 do
2014   IFS=$as_save_IFS
2015   test -z "$as_dir" && as_dir=.
2016   for ac_exec_ext in '' $ac_executable_extensions; do
2017   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2018     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2019     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2020     break 2
2021   fi
2022 done
2023 done
2024
2025 fi
2026 fi
2027 STRIP=$ac_cv_prog_STRIP
2028 if test -n "$STRIP"; then
2029   echo "$as_me:$LINENO: result: $STRIP" >&5
2030 echo "${ECHO_T}$STRIP" >&6
2031 else
2032   echo "$as_me:$LINENO: result: no" >&5
2033 echo "${ECHO_T}no" >&6
2034 fi
2035
2036 fi
2037 if test -z "$ac_cv_prog_STRIP"; then
2038   ac_ct_STRIP=$STRIP
2039   # Extract the first word of "strip", so it can be a program name with args.
2040 set dummy strip; ac_word=$2
2041 echo "$as_me:$LINENO: checking for $ac_word" >&5
2042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2043 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2044   echo $ECHO_N "(cached) $ECHO_C" >&6
2045 else
2046   if test -n "$ac_ct_STRIP"; then
2047   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2048 else
2049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2050 for as_dir in $PATH
2051 do
2052   IFS=$as_save_IFS
2053   test -z "$as_dir" && as_dir=.
2054   for ac_exec_ext in '' $ac_executable_extensions; do
2055   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2056     ac_cv_prog_ac_ct_STRIP="strip"
2057     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2058     break 2
2059   fi
2060 done
2061 done
2062
2063   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
2064 fi
2065 fi
2066 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2067 if test -n "$ac_ct_STRIP"; then
2068   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2069 echo "${ECHO_T}$ac_ct_STRIP" >&6
2070 else
2071   echo "$as_me:$LINENO: result: no" >&5
2072 echo "${ECHO_T}no" >&6
2073 fi
2074
2075   STRIP=$ac_ct_STRIP
2076 else
2077   STRIP="$ac_cv_prog_STRIP"
2078 fi
2079
2080 fi
2081 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2082
2083 # We need awk for the "check" target.  The system "awk" is bad on
2084 # some platforms.
2085 # Always define AMTAR for backward compatibility.
2086
2087 AMTAR=${AMTAR-"${am_missing_run}tar"}
2088
2089 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2090
2091
2092
2093
2094
2095 cat >>confdefs.h <<_ACEOF
2096 #define OPENLDAP_PACKAGE "$PACKAGE"
2097 _ACEOF
2098
2099
2100 cat >>confdefs.h <<_ACEOF
2101 #define OPENLDAP_VERSION "$VERSION"
2102 _ACEOF
2103
2104
2105
2106 cat >>confdefs.h <<_ACEOF
2107 #define LDAP_VENDOR_VERSION $OL_API_INC
2108 _ACEOF
2109
2110
2111 cat >>confdefs.h <<_ACEOF
2112 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2113 _ACEOF
2114
2115
2116 cat >>confdefs.h <<_ACEOF
2117 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2118 _ACEOF
2119
2120
2121 cat >>confdefs.h <<_ACEOF
2122 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2123 _ACEOF
2124
2125
2126 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2127
2128 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2129
2130 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2131
2132
2133
2134
2135
2136
2137
2138           ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2139
2140           ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2141
2142           ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2143
2144
2145 echo "$as_me:$LINENO: checking configure arguments" >&5
2146 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
2147
2148
2149 top_builddir=`pwd`
2150
2151 ldap_subdir="/openldap"
2152
2153
2154 # Check whether --with-subdir or --without-subdir was given.
2155 if test "${with_subdir+set}" = set; then
2156   withval="$with_subdir"
2157   case "$withval" in
2158         no) ldap_subdir=""
2159                 ;;
2160         yes)
2161                 ;;
2162         /*|\\*)
2163                 ldap_subdir="$withval"
2164                 ;;
2165         *)
2166                 ldap_subdir="/$withval"
2167                 ;;
2168 esac
2169
2170 fi;
2171
2172 # OpenLDAP --enable-debug
2173
2174         # Check whether --enable-debug or --disable-debug was given.
2175 if test "${enable_debug+set}" = set; then
2176   enableval="$enable_debug"
2177
2178         ol_arg=invalid
2179         for ol_val in no yes traditional ; do
2180                 if test "$enableval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2186 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2187    { (exit 1); exit 1; }; }
2188         fi
2189         ol_enable_debug="$ol_arg"
2190
2191 else
2192         ol_enable_debug=yes
2193 fi;
2194 # end --enable-debug
2195 # OpenLDAP --enable-dynamic
2196
2197         # Check whether --enable-dynamic or --disable-dynamic was given.
2198 if test "${enable_dynamic+set}" = set; then
2199   enableval="$enable_dynamic"
2200
2201         ol_arg=invalid
2202         for ol_val in auto yes no ; do
2203                 if test "$enableval" = "$ol_val" ; then
2204                         ol_arg="$ol_val"
2205                 fi
2206         done
2207         if test "$ol_arg" = "invalid" ; then
2208                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2209 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2210    { (exit 1); exit 1; }; }
2211         fi
2212         ol_enable_dynamic="$ol_arg"
2213
2214 else
2215         ol_enable_dynamic=no
2216 fi;
2217 # end --enable-dynamic
2218 # OpenLDAP --enable-syslog
2219
2220         # Check whether --enable-syslog or --disable-syslog was given.
2221 if test "${enable_syslog+set}" = set; then
2222   enableval="$enable_syslog"
2223
2224         ol_arg=invalid
2225         for ol_val in auto yes no ; do
2226                 if test "$enableval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2232 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2233    { (exit 1); exit 1; }; }
2234         fi
2235         ol_enable_syslog="$ol_arg"
2236
2237 else
2238         ol_enable_syslog=auto
2239 fi;
2240 # end --enable-syslog
2241 # OpenLDAP --enable-proctitle
2242
2243         # Check whether --enable-proctitle or --disable-proctitle was given.
2244 if test "${enable_proctitle+set}" = set; then
2245   enableval="$enable_proctitle"
2246
2247         ol_arg=invalid
2248         for ol_val in auto yes no ; do
2249                 if test "$enableval" = "$ol_val" ; then
2250                         ol_arg="$ol_val"
2251                 fi
2252         done
2253         if test "$ol_arg" = "invalid" ; then
2254                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2255 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2256    { (exit 1); exit 1; }; }
2257         fi
2258         ol_enable_proctitle="$ol_arg"
2259
2260 else
2261         ol_enable_proctitle=yes
2262 fi;
2263 # end --enable-proctitle
2264 ol_enable_referrals=${ol_enable_referrals-no}
2265 # 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 # OpenLDAP --with-threads
2359
2360 # Check whether --with-threads or --without-threads was given.
2361 if test "${with_threads+set}" = set; then
2362   withval="$with_threads"
2363
2364         ol_arg=invalid
2365         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2366                 if test "$withval" = "$ol_val" ; then
2367                         ol_arg="$ol_val"
2368                 fi
2369         done
2370         if test "$ol_arg" = "invalid" ; then
2371                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2372 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2373    { (exit 1); exit 1; }; }
2374         fi
2375         ol_with_threads="$ol_arg"
2376
2377 else
2378         ol_with_threads="auto"
2379 fi; # end --with-threads
2380
2381 # OpenLDAP --with-tls
2382
2383 # Check whether --with-tls or --without-tls was given.
2384 if test "${with_tls+set}" = set; then
2385   withval="$with_tls"
2386
2387         ol_arg=invalid
2388         for ol_val in auto openssl gnutls yes no  ; do
2389                 if test "$withval" = "$ol_val" ; then
2390                         ol_arg="$ol_val"
2391                 fi
2392         done
2393         if test "$ol_arg" = "invalid" ; then
2394                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2395 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2396    { (exit 1); exit 1; }; }
2397         fi
2398         ol_with_tls="$ol_arg"
2399
2400 else
2401         ol_with_tls="auto"
2402 fi; # end --with-tls
2403
2404 # OpenLDAP --with-yielding_select
2405
2406 # Check whether --with-yielding_select or --without-yielding_select was given.
2407 if test "${with_yielding_select+set}" = set; then
2408   withval="$with_yielding_select"
2409
2410         ol_arg=invalid
2411         for ol_val in auto yes no manual  ; do
2412                 if test "$withval" = "$ol_val" ; then
2413                         ol_arg="$ol_val"
2414                 fi
2415         done
2416         if test "$ol_arg" = "invalid" ; then
2417                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2418 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2419    { (exit 1); exit 1; }; }
2420         fi
2421         ol_with_yielding_select="$ol_arg"
2422
2423 else
2424         ol_with_yielding_select="auto"
2425 fi; # end --with-yielding_select
2426
2427 # OpenLDAP --with-mp
2428
2429 # Check whether --with-mp or --without-mp was given.
2430 if test "${with_mp+set}" = set; then
2431   withval="$with_mp"
2432
2433         ol_arg=invalid
2434         for ol_val in auto longlong long bignum gmp yes no ; do
2435                 if test "$withval" = "$ol_val" ; then
2436                         ol_arg="$ol_val"
2437                 fi
2438         done
2439         if test "$ol_arg" = "invalid" ; then
2440                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-mp" >&5
2441 echo "$as_me: error: bad value $withval for --with-mp" >&2;}
2442    { (exit 1); exit 1; }; }
2443         fi
2444         ol_with_mp="$ol_arg"
2445
2446 else
2447         ol_with_mp="auto"
2448 fi; # end --with-mp
2449
2450 # OpenLDAP --with-odbc
2451
2452 # Check whether --with-odbc or --without-odbc was given.
2453 if test "${with_odbc+set}" = set; then
2454   withval="$with_odbc"
2455
2456         ol_arg=invalid
2457         for ol_val in auto iodbc unixodbc  ; do
2458                 if test "$withval" = "$ol_val" ; then
2459                         ol_arg="$ol_val"
2460                 fi
2461         done
2462         if test "$ol_arg" = "invalid" ; then
2463                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-odbc" >&5
2464 echo "$as_me: error: bad value $withval for --with-odbc" >&2;}
2465    { (exit 1); exit 1; }; }
2466         fi
2467         ol_with_odbc="$ol_arg"
2468
2469 else
2470         ol_with_odbc="auto"
2471 fi; # end --with-odbc
2472
2473
2474
2475 # Check whether --enable-xxslapdoptions or --disable-xxslapdoptions was given.
2476 if test "${enable_xxslapdoptions+set}" = set; then
2477   enableval="$enable_xxslapdoptions"
2478
2479 fi;
2480 # OpenLDAP --enable-slapd
2481
2482         # Check whether --enable-slapd or --disable-slapd was given.
2483 if test "${enable_slapd+set}" = set; then
2484   enableval="$enable_slapd"
2485
2486         ol_arg=invalid
2487         for ol_val in auto yes no ; do
2488                 if test "$enableval" = "$ol_val" ; then
2489                         ol_arg="$ol_val"
2490                 fi
2491         done
2492         if test "$ol_arg" = "invalid" ; then
2493                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2494 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2495    { (exit 1); exit 1; }; }
2496         fi
2497         ol_enable_slapd="$ol_arg"
2498
2499 else
2500         ol_enable_slapd=yes
2501 fi;
2502 # end --enable-slapd
2503 # OpenLDAP --enable-dynacl
2504
2505         # Check whether --enable-dynacl or --disable-dynacl was given.
2506 if test "${enable_dynacl+set}" = set; then
2507   enableval="$enable_dynacl"
2508
2509         ol_arg=invalid
2510         for ol_val in auto yes no ; do
2511                 if test "$enableval" = "$ol_val" ; then
2512                         ol_arg="$ol_val"
2513                 fi
2514         done
2515         if test "$ol_arg" = "invalid" ; then
2516                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynacl" >&5
2517 echo "$as_me: error: bad value $enableval for --enable-dynacl" >&2;}
2518    { (exit 1); exit 1; }; }
2519         fi
2520         ol_enable_dynacl="$ol_arg"
2521
2522 else
2523         ol_enable_dynacl=no
2524 fi;
2525 # end --enable-dynacl
2526 # OpenLDAP --enable-aci
2527
2528         # Check whether --enable-aci or --disable-aci was given.
2529 if test "${enable_aci+set}" = set; then
2530   enableval="$enable_aci"
2531
2532         ol_arg=invalid
2533         for ol_val in no yes mod ; do
2534                 if test "$enableval" = "$ol_val" ; then
2535                         ol_arg="$ol_val"
2536                 fi
2537         done
2538         if test "$ol_arg" = "invalid" ; then
2539                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2540 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2541    { (exit 1); exit 1; }; }
2542         fi
2543         ol_enable_aci="$ol_arg"
2544
2545 else
2546         ol_enable_aci=no
2547 fi;
2548 # end --enable-aci
2549 # OpenLDAP --enable-cleartext
2550
2551         # Check whether --enable-cleartext or --disable-cleartext was given.
2552 if test "${enable_cleartext+set}" = set; then
2553   enableval="$enable_cleartext"
2554
2555         ol_arg=invalid
2556         for ol_val in auto yes no ; do
2557                 if test "$enableval" = "$ol_val" ; then
2558                         ol_arg="$ol_val"
2559                 fi
2560         done
2561         if test "$ol_arg" = "invalid" ; then
2562                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2563 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2564    { (exit 1); exit 1; }; }
2565         fi
2566         ol_enable_cleartext="$ol_arg"
2567
2568 else
2569         ol_enable_cleartext=yes
2570 fi;
2571 # end --enable-cleartext
2572 # OpenLDAP --enable-crypt
2573
2574         # Check whether --enable-crypt or --disable-crypt was given.
2575 if test "${enable_crypt+set}" = set; then
2576   enableval="$enable_crypt"
2577
2578         ol_arg=invalid
2579         for ol_val in auto yes no ; do
2580                 if test "$enableval" = "$ol_val" ; then
2581                         ol_arg="$ol_val"
2582                 fi
2583         done
2584         if test "$ol_arg" = "invalid" ; then
2585                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2586 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2587    { (exit 1); exit 1; }; }
2588         fi
2589         ol_enable_crypt="$ol_arg"
2590
2591 else
2592         ol_enable_crypt=no
2593 fi;
2594 # end --enable-crypt
2595 # OpenLDAP --enable-lmpasswd
2596
2597         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2598 if test "${enable_lmpasswd+set}" = set; then
2599   enableval="$enable_lmpasswd"
2600
2601         ol_arg=invalid
2602         for ol_val in auto yes no ; do
2603                 if test "$enableval" = "$ol_val" ; then
2604                         ol_arg="$ol_val"
2605                 fi
2606         done
2607         if test "$ol_arg" = "invalid" ; then
2608                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2609 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2610    { (exit 1); exit 1; }; }
2611         fi
2612         ol_enable_lmpasswd="$ol_arg"
2613
2614 else
2615         ol_enable_lmpasswd=no
2616 fi;
2617 # end --enable-lmpasswd
2618 # OpenLDAP --enable-spasswd
2619
2620         # Check whether --enable-spasswd or --disable-spasswd was given.
2621 if test "${enable_spasswd+set}" = set; then
2622   enableval="$enable_spasswd"
2623
2624         ol_arg=invalid
2625         for ol_val in auto yes no ; do
2626                 if test "$enableval" = "$ol_val" ; then
2627                         ol_arg="$ol_val"
2628                 fi
2629         done
2630         if test "$ol_arg" = "invalid" ; then
2631                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2632 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2633    { (exit 1); exit 1; }; }
2634         fi
2635         ol_enable_spasswd="$ol_arg"
2636
2637 else
2638         ol_enable_spasswd=no
2639 fi;
2640 # end --enable-spasswd
2641 # OpenLDAP --enable-modules
2642
2643         # Check whether --enable-modules or --disable-modules was given.
2644 if test "${enable_modules+set}" = set; then
2645   enableval="$enable_modules"
2646
2647         ol_arg=invalid
2648         for ol_val in auto yes no ; do
2649                 if test "$enableval" = "$ol_val" ; then
2650                         ol_arg="$ol_val"
2651                 fi
2652         done
2653         if test "$ol_arg" = "invalid" ; then
2654                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2655 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2656    { (exit 1); exit 1; }; }
2657         fi
2658         ol_enable_modules="$ol_arg"
2659
2660 else
2661         ol_enable_modules=no
2662 fi;
2663 # end --enable-modules
2664 # OpenLDAP --enable-rewrite
2665
2666         # Check whether --enable-rewrite or --disable-rewrite was given.
2667 if test "${enable_rewrite+set}" = set; then
2668   enableval="$enable_rewrite"
2669
2670         ol_arg=invalid
2671         for ol_val in auto yes no ; do
2672                 if test "$enableval" = "$ol_val" ; then
2673                         ol_arg="$ol_val"
2674                 fi
2675         done
2676         if test "$ol_arg" = "invalid" ; then
2677                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
2678 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2679    { (exit 1); exit 1; }; }
2680         fi
2681         ol_enable_rewrite="$ol_arg"
2682
2683 else
2684         ol_enable_rewrite=auto
2685 fi;
2686 # end --enable-rewrite
2687 # OpenLDAP --enable-rlookups
2688
2689         # Check whether --enable-rlookups or --disable-rlookups was given.
2690 if test "${enable_rlookups+set}" = set; then
2691   enableval="$enable_rlookups"
2692
2693         ol_arg=invalid
2694         for ol_val in auto yes no ; do
2695                 if test "$enableval" = "$ol_val" ; then
2696                         ol_arg="$ol_val"
2697                 fi
2698         done
2699         if test "$ol_arg" = "invalid" ; then
2700                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2701 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2702    { (exit 1); exit 1; }; }
2703         fi
2704         ol_enable_rlookups="$ol_arg"
2705
2706 else
2707         ol_enable_rlookups=no
2708 fi;
2709 # end --enable-rlookups
2710 # OpenLDAP --enable-slapi
2711
2712         # Check whether --enable-slapi or --disable-slapi was given.
2713 if test "${enable_slapi+set}" = set; then
2714   enableval="$enable_slapi"
2715
2716         ol_arg=invalid
2717         for ol_val in auto yes no ; do
2718                 if test "$enableval" = "$ol_val" ; then
2719                         ol_arg="$ol_val"
2720                 fi
2721         done
2722         if test "$ol_arg" = "invalid" ; then
2723                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2724 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2725    { (exit 1); exit 1; }; }
2726         fi
2727         ol_enable_slapi="$ol_arg"
2728
2729 else
2730         ol_enable_slapi=no
2731 fi;
2732 # end --enable-slapi
2733 # OpenLDAP --enable-slp
2734
2735         # Check whether --enable-slp or --disable-slp was given.
2736 if test "${enable_slp+set}" = set; then
2737   enableval="$enable_slp"
2738
2739         ol_arg=invalid
2740         for ol_val in auto yes no ; do
2741                 if test "$enableval" = "$ol_val" ; then
2742                         ol_arg="$ol_val"
2743                 fi
2744         done
2745         if test "$ol_arg" = "invalid" ; then
2746                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2747 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2748    { (exit 1); exit 1; }; }
2749         fi
2750         ol_enable_slp="$ol_arg"
2751
2752 else
2753         ol_enable_slp=no
2754 fi;
2755 # end --enable-slp
2756 # OpenLDAP --enable-wrappers
2757
2758         # Check whether --enable-wrappers or --disable-wrappers was given.
2759 if test "${enable_wrappers+set}" = set; then
2760   enableval="$enable_wrappers"
2761
2762         ol_arg=invalid
2763         for ol_val in auto yes no ; do
2764                 if test "$enableval" = "$ol_val" ; then
2765                         ol_arg="$ol_val"
2766                 fi
2767         done
2768         if test "$ol_arg" = "invalid" ; then
2769                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2770 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2771    { (exit 1); exit 1; }; }
2772         fi
2773         ol_enable_wrappers="$ol_arg"
2774
2775 else
2776         ol_enable_wrappers=no
2777 fi;
2778 # end --enable-wrappers
2779
2780 Backends="bdb \
2781         dnssrv \
2782         hdb \
2783         ldap \
2784         meta \
2785         monitor \
2786         null \
2787         passwd \
2788         perl \
2789         relay \
2790         shell \
2791         sql"
2792
2793 # Check whether --enable-xxslapbackends or --disable-xxslapbackends was given.
2794 if test "${enable_xxslapbackends+set}" = set; then
2795   enableval="$enable_xxslapbackends"
2796
2797 fi;
2798
2799 # OpenLDAP --enable-backends
2800
2801         # Check whether --enable-backends or --disable-backends was given.
2802 if test "${enable_backends+set}" = set; then
2803   enableval="$enable_backends"
2804
2805         ol_arg=invalid
2806         for ol_val in no yes mod ; do
2807                 if test "$enableval" = "$ol_val" ; then
2808                         ol_arg="$ol_val"
2809                 fi
2810         done
2811         if test "$ol_arg" = "invalid" ; then
2812                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
2813 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
2814    { (exit 1); exit 1; }; }
2815         fi
2816         ol_enable_backends="$ol_arg"
2817
2818 fi;
2819 # end --enable-backends
2820 # OpenLDAP --enable-bdb
2821
2822         # Check whether --enable-bdb or --disable-bdb was given.
2823 if test "${enable_bdb+set}" = set; then
2824   enableval="$enable_bdb"
2825
2826         ol_arg=invalid
2827         for ol_val in no yes mod ; do
2828                 if test "$enableval" = "$ol_val" ; then
2829                         ol_arg="$ol_val"
2830                 fi
2831         done
2832         if test "$ol_arg" = "invalid" ; then
2833                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2834 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2835    { (exit 1); exit 1; }; }
2836         fi
2837         ol_enable_bdb="$ol_arg"
2838
2839 else
2840         ol_enable_bdb=${ol_enable_backends:-yes}
2841 fi;
2842 # end --enable-bdb
2843 # OpenLDAP --enable-dnssrv
2844
2845         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2846 if test "${enable_dnssrv+set}" = set; then
2847   enableval="$enable_dnssrv"
2848
2849         ol_arg=invalid
2850         for ol_val in no yes mod ; do
2851                 if test "$enableval" = "$ol_val" ; then
2852                         ol_arg="$ol_val"
2853                 fi
2854         done
2855         if test "$ol_arg" = "invalid" ; then
2856                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2857 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2858    { (exit 1); exit 1; }; }
2859         fi
2860         ol_enable_dnssrv="$ol_arg"
2861
2862 else
2863         ol_enable_dnssrv=${ol_enable_backends:-no}
2864 fi;
2865 # end --enable-dnssrv
2866 # OpenLDAP --enable-hdb
2867
2868         # Check whether --enable-hdb or --disable-hdb was given.
2869 if test "${enable_hdb+set}" = set; then
2870   enableval="$enable_hdb"
2871
2872         ol_arg=invalid
2873         for ol_val in no yes mod ; do
2874                 if test "$enableval" = "$ol_val" ; then
2875                         ol_arg="$ol_val"
2876                 fi
2877         done
2878         if test "$ol_arg" = "invalid" ; then
2879                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
2880 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
2881    { (exit 1); exit 1; }; }
2882         fi
2883         ol_enable_hdb="$ol_arg"
2884
2885 else
2886         ol_enable_hdb=${ol_enable_backends:-yes}
2887 fi;
2888 # end --enable-hdb
2889 # OpenLDAP --enable-ldap
2890
2891         # Check whether --enable-ldap or --disable-ldap was given.
2892 if test "${enable_ldap+set}" = set; then
2893   enableval="$enable_ldap"
2894
2895         ol_arg=invalid
2896         for ol_val in no yes mod ; do
2897                 if test "$enableval" = "$ol_val" ; then
2898                         ol_arg="$ol_val"
2899                 fi
2900         done
2901         if test "$ol_arg" = "invalid" ; then
2902                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2903 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2904    { (exit 1); exit 1; }; }
2905         fi
2906         ol_enable_ldap="$ol_arg"
2907
2908 else
2909         ol_enable_ldap=${ol_enable_backends:-no}
2910 fi;
2911 # end --enable-ldap
2912 # OpenLDAP --enable-meta
2913
2914         # Check whether --enable-meta or --disable-meta was given.
2915 if test "${enable_meta+set}" = set; then
2916   enableval="$enable_meta"
2917
2918         ol_arg=invalid
2919         for ol_val in no yes mod ; do
2920                 if test "$enableval" = "$ol_val" ; then
2921                         ol_arg="$ol_val"
2922                 fi
2923         done
2924         if test "$ol_arg" = "invalid" ; then
2925                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2926 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2927    { (exit 1); exit 1; }; }
2928         fi
2929         ol_enable_meta="$ol_arg"
2930
2931 else
2932         ol_enable_meta=${ol_enable_backends:-no}
2933 fi;
2934 # end --enable-meta
2935 # OpenLDAP --enable-monitor
2936
2937         # Check whether --enable-monitor or --disable-monitor was given.
2938 if test "${enable_monitor+set}" = set; then
2939   enableval="$enable_monitor"
2940
2941         ol_arg=invalid
2942         for ol_val in no yes mod ; do
2943                 if test "$enableval" = "$ol_val" ; then
2944                         ol_arg="$ol_val"
2945                 fi
2946         done
2947         if test "$ol_arg" = "invalid" ; then
2948                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
2949 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
2950    { (exit 1); exit 1; }; }
2951         fi
2952         ol_enable_monitor="$ol_arg"
2953
2954 else
2955         ol_enable_monitor=${ol_enable_backends:-yes}
2956 fi;
2957 # end --enable-monitor
2958 # OpenLDAP --enable-null
2959
2960         # Check whether --enable-null or --disable-null was given.
2961 if test "${enable_null+set}" = set; then
2962   enableval="$enable_null"
2963
2964         ol_arg=invalid
2965         for ol_val in no yes mod ; do
2966                 if test "$enableval" = "$ol_val" ; then
2967                         ol_arg="$ol_val"
2968                 fi
2969         done
2970         if test "$ol_arg" = "invalid" ; then
2971                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
2972 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
2973    { (exit 1); exit 1; }; }
2974         fi
2975         ol_enable_null="$ol_arg"
2976
2977 else
2978         ol_enable_null=${ol_enable_backends:-no}
2979 fi;
2980 # end --enable-null
2981 # OpenLDAP --enable-passwd
2982
2983         # Check whether --enable-passwd or --disable-passwd was given.
2984 if test "${enable_passwd+set}" = set; then
2985   enableval="$enable_passwd"
2986
2987         ol_arg=invalid
2988         for ol_val in no yes mod ; do
2989                 if test "$enableval" = "$ol_val" ; then
2990                         ol_arg="$ol_val"
2991                 fi
2992         done
2993         if test "$ol_arg" = "invalid" ; then
2994                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
2995 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
2996    { (exit 1); exit 1; }; }
2997         fi
2998         ol_enable_passwd="$ol_arg"
2999
3000 else
3001         ol_enable_passwd=${ol_enable_backends:-no}
3002 fi;
3003 # end --enable-passwd
3004 # OpenLDAP --enable-perl
3005
3006         # Check whether --enable-perl or --disable-perl was given.
3007 if test "${enable_perl+set}" = set; then
3008   enableval="$enable_perl"
3009
3010         ol_arg=invalid
3011         for ol_val in no yes mod ; do
3012                 if test "$enableval" = "$ol_val" ; then
3013                         ol_arg="$ol_val"
3014                 fi
3015         done
3016         if test "$ol_arg" = "invalid" ; then
3017                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
3018 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3019    { (exit 1); exit 1; }; }
3020         fi
3021         ol_enable_perl="$ol_arg"
3022
3023 else
3024         ol_enable_perl=${ol_enable_backends:-no}
3025 fi;
3026 # end --enable-perl
3027 # OpenLDAP --enable-relay
3028
3029         # Check whether --enable-relay or --disable-relay was given.
3030 if test "${enable_relay+set}" = set; then
3031   enableval="$enable_relay"
3032
3033         ol_arg=invalid
3034         for ol_val in no yes mod ; do
3035                 if test "$enableval" = "$ol_val" ; then
3036                         ol_arg="$ol_val"
3037                 fi
3038         done
3039         if test "$ol_arg" = "invalid" ; then
3040                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3041 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3042    { (exit 1); exit 1; }; }
3043         fi
3044         ol_enable_relay="$ol_arg"
3045
3046 else
3047         ol_enable_relay=${ol_enable_backends:-yes}
3048 fi;
3049 # end --enable-relay
3050 # OpenLDAP --enable-shell
3051
3052         # Check whether --enable-shell or --disable-shell was given.
3053 if test "${enable_shell+set}" = set; then
3054   enableval="$enable_shell"
3055
3056         ol_arg=invalid
3057         for ol_val in no yes mod ; do
3058                 if test "$enableval" = "$ol_val" ; then
3059                         ol_arg="$ol_val"
3060                 fi
3061         done
3062         if test "$ol_arg" = "invalid" ; then
3063                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3064 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3065    { (exit 1); exit 1; }; }
3066         fi
3067         ol_enable_shell="$ol_arg"
3068
3069 else
3070         ol_enable_shell=${ol_enable_backends:-no}
3071 fi;
3072 # end --enable-shell
3073 # OpenLDAP --enable-sql
3074
3075         # Check whether --enable-sql or --disable-sql was given.
3076 if test "${enable_sql+set}" = set; then
3077   enableval="$enable_sql"
3078
3079         ol_arg=invalid
3080         for ol_val in no yes mod ; do
3081                 if test "$enableval" = "$ol_val" ; then
3082                         ol_arg="$ol_val"
3083                 fi
3084         done
3085         if test "$ol_arg" = "invalid" ; then
3086                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3087 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3088    { (exit 1); exit 1; }; }
3089         fi
3090         ol_enable_sql="$ol_arg"
3091
3092 else
3093         ol_enable_sql=${ol_enable_backends:-no}
3094 fi;
3095 # end --enable-sql
3096
3097 Overlays="accesslog \
3098         auditlog \
3099         constraint \
3100         dds \
3101         dyngroup \
3102         dynlist \
3103         memberof \
3104         ppolicy \
3105         proxycache \
3106         refint \
3107         retcode \
3108         rwm \
3109         seqmod \
3110         syncprov \
3111         translucent \
3112         unique \
3113         valsort"
3114
3115 # Check whether --enable-xxslapoverlays or --disable-xxslapoverlays was given.
3116 if test "${enable_xxslapoverlays+set}" = set; then
3117   enableval="$enable_xxslapoverlays"
3118
3119 fi;
3120
3121 # OpenLDAP --enable-overlays
3122
3123         # Check whether --enable-overlays or --disable-overlays was given.
3124 if test "${enable_overlays+set}" = set; then
3125   enableval="$enable_overlays"
3126
3127         ol_arg=invalid
3128         for ol_val in no yes mod ; do
3129                 if test "$enableval" = "$ol_val" ; then
3130                         ol_arg="$ol_val"
3131                 fi
3132         done
3133         if test "$ol_arg" = "invalid" ; then
3134                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-overlays" >&5
3135 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3136    { (exit 1); exit 1; }; }
3137         fi
3138         ol_enable_overlays="$ol_arg"
3139
3140 fi;
3141 # end --enable-overlays
3142 # OpenLDAP --enable-accesslog
3143
3144         # Check whether --enable-accesslog or --disable-accesslog was given.
3145 if test "${enable_accesslog+set}" = set; then
3146   enableval="$enable_accesslog"
3147
3148         ol_arg=invalid
3149         for ol_val in no yes mod ; do
3150                 if test "$enableval" = "$ol_val" ; then
3151                         ol_arg="$ol_val"
3152                 fi
3153         done
3154         if test "$ol_arg" = "invalid" ; then
3155                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-accesslog" >&5
3156 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3157    { (exit 1); exit 1; }; }
3158         fi
3159         ol_enable_accesslog="$ol_arg"
3160
3161 else
3162         ol_enable_accesslog=${ol_enable_overlays:-no}
3163 fi;
3164 # end --enable-accesslog
3165
3166 # OpenLDAP --enable-auditlog
3167
3168         # Check whether --enable-auditlog or --disable-auditlog was given.
3169 if test "${enable_auditlog+set}" = set; then
3170   enableval="$enable_auditlog"
3171
3172         ol_arg=invalid
3173         for ol_val in no yes mod ; do
3174                 if test "$enableval" = "$ol_val" ; then
3175                         ol_arg="$ol_val"
3176                 fi
3177         done
3178         if test "$ol_arg" = "invalid" ; then
3179                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-auditlog" >&5
3180 echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;}
3181    { (exit 1); exit 1; }; }
3182         fi
3183         ol_enable_auditlog="$ol_arg"
3184
3185 else
3186         ol_enable_auditlog=${ol_enable_overlays:-no}
3187 fi;
3188 # end --enable-auditlog
3189
3190 # OpenLDAP --enable-constraint
3191
3192         # Check whether --enable-constraint or --disable-constraint was given.
3193 if test "${enable_constraint+set}" = set; then
3194   enableval="$enable_constraint"
3195
3196         ol_arg=invalid
3197         for ol_val in no yes mod ; do
3198                 if test "$enableval" = "$ol_val" ; then
3199                         ol_arg="$ol_val"
3200                 fi
3201         done
3202         if test "$ol_arg" = "invalid" ; then
3203                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-constraint" >&5
3204 echo "$as_me: error: bad value $enableval for --enable-constraint" >&2;}
3205    { (exit 1); exit 1; }; }
3206         fi
3207         ol_enable_constraint="$ol_arg"
3208
3209 else
3210         ol_enable_constraint=${ol_enable_overlays:-no}
3211 fi;
3212 # end --enable-constraint
3213
3214 # OpenLDAP --enable-dds
3215
3216         # Check whether --enable-dds or --disable-dds was given.
3217 if test "${enable_dds+set}" = set; then
3218   enableval="$enable_dds"
3219
3220         ol_arg=invalid
3221         for ol_val in no yes mod ; do
3222                 if test "$enableval" = "$ol_val" ; then
3223                         ol_arg="$ol_val"
3224                 fi
3225         done
3226         if test "$ol_arg" = "invalid" ; then
3227                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5
3228 echo "$as_me: error: bad value $enableval for --enable-dds" >&2;}
3229    { (exit 1); exit 1; }; }
3230         fi
3231         ol_enable_dds="$ol_arg"
3232
3233 else
3234         ol_enable_dds=${ol_enable_overlays:-no}
3235 fi;
3236 # end --enable-dds
3237
3238 # OpenLDAP --enable-dyngroup
3239
3240         # Check whether --enable-dyngroup or --disable-dyngroup was given.
3241 if test "${enable_dyngroup+set}" = set; then
3242   enableval="$enable_dyngroup"
3243
3244         ol_arg=invalid
3245         for ol_val in no yes mod ; do
3246                 if test "$enableval" = "$ol_val" ; then
3247                         ol_arg="$ol_val"
3248                 fi
3249         done
3250         if test "$ol_arg" = "invalid" ; then
3251                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dyngroup" >&5
3252 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3253    { (exit 1); exit 1; }; }
3254         fi
3255         ol_enable_dyngroup="$ol_arg"
3256
3257 else
3258         ol_enable_dyngroup=${ol_enable_overlays:-no}
3259 fi;
3260 # end --enable-dyngroup
3261
3262 # OpenLDAP --enable-dynlist
3263
3264         # Check whether --enable-dynlist or --disable-dynlist was given.
3265 if test "${enable_dynlist+set}" = set; then
3266   enableval="$enable_dynlist"
3267
3268         ol_arg=invalid
3269         for ol_val in no yes mod ; do
3270                 if test "$enableval" = "$ol_val" ; then
3271                         ol_arg="$ol_val"
3272                 fi
3273         done
3274         if test "$ol_arg" = "invalid" ; then
3275                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynlist" >&5
3276 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3277    { (exit 1); exit 1; }; }
3278         fi
3279         ol_enable_dynlist="$ol_arg"
3280
3281 else
3282         ol_enable_dynlist=${ol_enable_overlays:-no}
3283 fi;
3284 # end --enable-dynlist
3285
3286 # OpenLDAP --enable-memberof
3287
3288         # Check whether --enable-memberof or --disable-memberof was given.
3289 if test "${enable_memberof+set}" = set; then
3290   enableval="$enable_memberof"
3291
3292         ol_arg=invalid
3293         for ol_val in no yes mod ; do
3294                 if test "$enableval" = "$ol_val" ; then
3295                         ol_arg="$ol_val"
3296                 fi
3297         done
3298         if test "$ol_arg" = "invalid" ; then
3299                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-memberof" >&5
3300 echo "$as_me: error: bad value $enableval for --enable-memberof" >&2;}
3301    { (exit 1); exit 1; }; }
3302         fi
3303         ol_enable_memberof="$ol_arg"
3304
3305 else
3306         ol_enable_memberof=${ol_enable_overlays:-no}
3307 fi;
3308 # end --enable-memberof
3309
3310 # OpenLDAP --enable-ppolicy
3311
3312         # Check whether --enable-ppolicy or --disable-ppolicy was given.
3313 if test "${enable_ppolicy+set}" = set; then
3314   enableval="$enable_ppolicy"
3315
3316         ol_arg=invalid
3317         for ol_val in no yes mod ; do
3318                 if test "$enableval" = "$ol_val" ; then
3319                         ol_arg="$ol_val"
3320                 fi
3321         done
3322         if test "$ol_arg" = "invalid" ; then
3323                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ppolicy" >&5
3324 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
3325    { (exit 1); exit 1; }; }
3326         fi
3327         ol_enable_ppolicy="$ol_arg"
3328
3329 else
3330         ol_enable_ppolicy=${ol_enable_overlays:-no}
3331 fi;
3332 # end --enable-ppolicy
3333
3334 # OpenLDAP --enable-proxycache
3335
3336         # Check whether --enable-proxycache or --disable-proxycache was given.
3337 if test "${enable_proxycache+set}" = set; then
3338   enableval="$enable_proxycache"
3339
3340         ol_arg=invalid
3341         for ol_val in no yes mod ; do
3342                 if test "$enableval" = "$ol_val" ; then
3343                         ol_arg="$ol_val"
3344                 fi
3345         done
3346         if test "$ol_arg" = "invalid" ; then
3347                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proxycache" >&5
3348 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
3349    { (exit 1); exit 1; }; }
3350         fi
3351         ol_enable_proxycache="$ol_arg"
3352
3353 else
3354         ol_enable_proxycache=${ol_enable_overlays:-no}
3355 fi;
3356 # end --enable-proxycache
3357
3358 # OpenLDAP --enable-refint
3359
3360         # Check whether --enable-refint or --disable-refint was given.
3361 if test "${enable_refint+set}" = set; then
3362   enableval="$enable_refint"
3363
3364         ol_arg=invalid
3365         for ol_val in no yes mod ; do
3366                 if test "$enableval" = "$ol_val" ; then
3367                         ol_arg="$ol_val"
3368                 fi
3369         done
3370         if test "$ol_arg" = "invalid" ; then
3371                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-refint" >&5
3372 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
3373    { (exit 1); exit 1; }; }
3374         fi
3375         ol_enable_refint="$ol_arg"
3376
3377 else
3378         ol_enable_refint=${ol_enable_overlays:-no}
3379 fi;
3380 # end --enable-refint
3381
3382 # OpenLDAP --enable-retcode
3383
3384         # Check whether --enable-retcode or --disable-retcode was given.
3385 if test "${enable_retcode+set}" = set; then
3386   enableval="$enable_retcode"
3387
3388         ol_arg=invalid
3389         for ol_val in no yes mod ; do
3390                 if test "$enableval" = "$ol_val" ; then
3391                         ol_arg="$ol_val"
3392                 fi
3393         done
3394         if test "$ol_arg" = "invalid" ; then
3395                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-retcode" >&5
3396 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
3397    { (exit 1); exit 1; }; }
3398         fi
3399         ol_enable_retcode="$ol_arg"
3400
3401 else
3402         ol_enable_retcode=${ol_enable_overlays:-no}
3403 fi;
3404 # end --enable-retcode
3405
3406 # OpenLDAP --enable-rwm
3407
3408         # Check whether --enable-rwm or --disable-rwm was given.
3409 if test "${enable_rwm+set}" = set; then
3410   enableval="$enable_rwm"
3411
3412         ol_arg=invalid
3413         for ol_val in no yes mod ; do
3414                 if test "$enableval" = "$ol_val" ; then
3415                         ol_arg="$ol_val"
3416                 fi
3417         done
3418         if test "$ol_arg" = "invalid" ; then
3419                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rwm" >&5
3420 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
3421    { (exit 1); exit 1; }; }
3422         fi
3423         ol_enable_rwm="$ol_arg"
3424
3425 else
3426         ol_enable_rwm=${ol_enable_overlays:-no}
3427 fi;
3428 # end --enable-rwm
3429
3430 # OpenLDAP --enable-seqmod
3431
3432         # Check whether --enable-seqmod or --disable-seqmod was given.
3433 if test "${enable_seqmod+set}" = set; then
3434   enableval="$enable_seqmod"
3435
3436         ol_arg=invalid
3437         for ol_val in no yes mod ; do
3438                 if test "$enableval" = "$ol_val" ; then
3439                         ol_arg="$ol_val"
3440                 fi
3441         done
3442         if test "$ol_arg" = "invalid" ; then
3443                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-seqmod" >&5
3444 echo "$as_me: error: bad value $enableval for --enable-seqmod" >&2;}
3445    { (exit 1); exit 1; }; }
3446         fi
3447         ol_enable_seqmod="$ol_arg"
3448
3449 else
3450         ol_enable_seqmod=${ol_enable_overlays:-yes}
3451 fi;
3452 # end --enable-seqmod
3453
3454 # OpenLDAP --enable-syncprov
3455
3456         # Check whether --enable-syncprov or --disable-syncprov was given.
3457 if test "${enable_syncprov+set}" = set; then
3458   enableval="$enable_syncprov"
3459
3460         ol_arg=invalid
3461         for ol_val in no yes mod ; do
3462                 if test "$enableval" = "$ol_val" ; then
3463                         ol_arg="$ol_val"
3464                 fi
3465         done
3466         if test "$ol_arg" = "invalid" ; then
3467                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syncprov" >&5
3468 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
3469    { (exit 1); exit 1; }; }
3470         fi
3471         ol_enable_syncprov="$ol_arg"
3472
3473 else
3474         ol_enable_syncprov=${ol_enable_overlays:-yes}
3475 fi;
3476 # end --enable-syncprov
3477
3478 # OpenLDAP --enable-translucent
3479
3480         # Check whether --enable-translucent or --disable-translucent was given.
3481 if test "${enable_translucent+set}" = set; then
3482   enableval="$enable_translucent"
3483
3484         ol_arg=invalid
3485         for ol_val in no yes mod ; do
3486                 if test "$enableval" = "$ol_val" ; then
3487                         ol_arg="$ol_val"
3488                 fi
3489         done
3490         if test "$ol_arg" = "invalid" ; then
3491                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-translucent" >&5
3492 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
3493    { (exit 1); exit 1; }; }
3494         fi
3495         ol_enable_translucent="$ol_arg"
3496
3497 else
3498         ol_enable_translucent=${ol_enable_overlays:-no}
3499 fi;
3500 # end --enable-translucent
3501
3502 # OpenLDAP --enable-unique
3503
3504         # Check whether --enable-unique or --disable-unique was given.
3505 if test "${enable_unique+set}" = set; then
3506   enableval="$enable_unique"
3507
3508         ol_arg=invalid
3509         for ol_val in no yes mod ; do
3510                 if test "$enableval" = "$ol_val" ; then
3511                         ol_arg="$ol_val"
3512                 fi
3513         done
3514         if test "$ol_arg" = "invalid" ; then
3515                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
3516 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
3517    { (exit 1); exit 1; }; }
3518         fi
3519         ol_enable_unique="$ol_arg"
3520
3521 else
3522         ol_enable_unique=${ol_enable_overlays:-no}
3523 fi;
3524 # end --enable-unique
3525
3526 # OpenLDAP --enable-valsort
3527
3528         # Check whether --enable-valsort or --disable-valsort was given.
3529 if test "${enable_valsort+set}" = set; then
3530   enableval="$enable_valsort"
3531
3532         ol_arg=invalid
3533         for ol_val in no yes mod ; do
3534                 if test "$enableval" = "$ol_val" ; then
3535                         ol_arg="$ol_val"
3536                 fi
3537         done
3538         if test "$ol_arg" = "invalid" ; then
3539                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
3540 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
3541    { (exit 1); exit 1; }; }
3542         fi
3543         ol_enable_valsort="$ol_arg"
3544
3545 else
3546         ol_enable_valsort=${ol_enable_overlays:-no}
3547 fi;
3548 # end --enable-valsort
3549
3550
3551 # Check whether --enable-xxliboptions or --disable-xxliboptions was given.
3552 if test "${enable_xxliboptions+set}" = set; then
3553   enableval="$enable_xxliboptions"
3554
3555 fi;
3556 # Check whether --enable-static or --disable-static was given.
3557 if test "${enable_static+set}" = set; then
3558   enableval="$enable_static"
3559   p=${PACKAGE-default}
3560     case $enableval in
3561     yes) enable_static=yes ;;
3562     no) enable_static=no ;;
3563     *)
3564      enable_static=no
3565       # Look at the argument we got.  We use all the common list separators.
3566       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3567       for pkg in $enableval; do
3568         IFS="$lt_save_ifs"
3569         if test "X$pkg" = "X$p"; then
3570           enable_static=yes
3571         fi
3572       done
3573       IFS="$lt_save_ifs"
3574       ;;
3575     esac
3576 else
3577   enable_static=yes
3578 fi;
3579
3580 # Check whether --enable-shared or --disable-shared was given.
3581 if test "${enable_shared+set}" = set; then
3582   enableval="$enable_shared"
3583   p=${PACKAGE-default}
3584     case $enableval in
3585     yes) enable_shared=yes ;;
3586     no) enable_shared=no ;;
3587     *)
3588       enable_shared=no
3589       # Look at the argument we got.  We use all the common list separators.
3590       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3591       for pkg in $enableval; do
3592         IFS="$lt_save_ifs"
3593         if test "X$pkg" = "X$p"; then
3594           enable_shared=yes
3595         fi
3596       done
3597       IFS="$lt_save_ifs"
3598       ;;
3599     esac
3600 else
3601   enable_shared=yes
3602 fi;
3603
3604
3605
3606 # validate options
3607 if test $ol_enable_slapd = no ; then
3608                 if test $ol_enable_slapi = yes ; then
3609                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3610 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3611         fi
3612         case "$ol_enable_backends" in yes | mod)
3613                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
3614 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
3615         esac
3616         for i in $Backends; do
3617                 eval "ol_tmp=\$ol_enable_$i"
3618                 if test $ol_tmp != no ; then
3619                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3620 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3621                         eval "ol_enable_$i=no"
3622                 fi
3623         done
3624         if test $ol_enable_modules = yes ; then
3625                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3626 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3627         fi
3628         if test $ol_enable_wrappers = yes ; then
3629                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3630 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3631         fi
3632         if test $ol_enable_rlookups = yes ; then
3633                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3634 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3635         fi
3636         if test $ol_enable_dynacl = yes ; then
3637                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
3638 echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
3639         fi
3640         if test $ol_enable_aci != no ; then
3641                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3642 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3643         fi
3644         if test $ol_enable_rewrite = yes ; then
3645                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3646 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3647         fi
3648                 case "$ol_enable_overlays" in yes | mod)
3649                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
3650 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
3651         esac
3652         for i in $Overlays; do
3653                 eval "ol_tmp=\$ol_enable_$i"
3654                 if test $ol_tmp != no ; then
3655                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
3656 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
3657                         eval "ol_enable_$i=no"
3658                 fi
3659         done
3660
3661         # force settings to no
3662         ol_enable_slapi=no
3663
3664         ol_enable_backends=
3665         ol_enable_overlays=
3666         ol_enable_modules=no
3667         ol_enable_rlookups=no
3668         ol_enable_dynacl=no
3669         ol_enable_aci=no
3670         ol_enable_wrappers=no
3671
3672         ol_enable_rewrite=no
3673
3674 elif test $ol_enable_modules != yes &&
3675         test $ol_enable_bdb = no &&
3676         test $ol_enable_dnssrv = no &&
3677         test $ol_enable_hdb = no &&
3678         test $ol_enable_ldap = no &&
3679         test $ol_enable_meta = no &&
3680         test $ol_enable_monitor = no &&
3681         test $ol_enable_null = no &&
3682         test $ol_enable_passwd = no &&
3683         test $ol_enable_perl = no &&
3684         test $ol_enable_relay = no &&
3685         test $ol_enable_shell = no &&
3686         test $ol_enable_sql = no ; then
3687
3688         if test $ol_enable_slapd = yes ; then
3689                 { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3690 echo "$as_me: error: slapd requires a backend" >&2;}
3691    { (exit 1); exit 1; }; }
3692         else
3693                 { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3694 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3695                 ol_enable_slapd=no
3696         fi
3697 fi
3698
3699 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
3700         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
3701 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
3702    { (exit 1); exit 1; }; }
3703 fi
3704
3705 if test $ol_enable_lmpasswd = yes ; then
3706         if test $ol_with_tls = no ; then
3707                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3708 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3709    { (exit 1); exit 1; }; }
3710         fi
3711 fi
3712
3713 if test $ol_enable_spasswd = yes ; then
3714         if test $ol_with_cyrus_sasl = no ; then
3715                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3716 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3717    { (exit 1); exit 1; }; }
3718         fi
3719         ol_with_cyrus_sasl=yes
3720 fi
3721
3722 echo "$as_me:$LINENO: result: done" >&5
3723 echo "${ECHO_T}done" >&6
3724
3725 LDAP_LIBS=
3726 BDB_LIBS=
3727 LTHREAD_LIBS=
3728 LUTIL_LIBS=
3729
3730 SLAPD_LIBS=
3731
3732 BUILD_SLAPD=no
3733
3734 BUILD_THREAD=no
3735
3736 BUILD_SLAPI=no
3737 SLAPD_SLAPI_DEPEND=
3738
3739 BUILD_BDB=no
3740 BUILD_DNSSRV=no
3741 BUILD_HDB=no
3742 BUILD_LDAP=no
3743 BUILD_META=no
3744 BUILD_MONITOR=no
3745 BUILD_NULL=no
3746 BUILD_PASSWD=no
3747 BUILD_PERL=no
3748 BUILD_RELAY=no
3749 BUILD_SHELL=no
3750 BUILD_SQL=no
3751
3752 BUILD_ACCESSLOG=no
3753 BUILD_AUDITLOG=no
3754 BUILD_CONSTRAINT=no
3755 BUILD_DDS=no
3756 BUILD_DENYOP=no
3757 BUILD_DYNGROUP=no
3758 BUILD_DYNLIST=no
3759 BUILD_LASTMOD=no
3760 BUILD_PPOLICY=no
3761 BUILD_PROXYCACHE=no
3762 BUILD_REFINT=no
3763 BUILD_RETCODE=no
3764 BUILD_RWM=no
3765 BUILD_SEQMOD=no
3766 BUILD_SYNCPROV=no
3767 BUILD_TRANSLUCENT=no
3768 BUILD_UNIQUE=no
3769 BUILD_VALSORT=no
3770
3771 SLAPD_STATIC_OVERLAYS=
3772 SLAPD_DYNAMIC_OVERLAYS=
3773
3774 SLAPD_MODULES_LDFLAGS=
3775 SLAPD_MODULES_CPPFLAGS=
3776
3777 SLAPD_STATIC_BACKENDS=back-ldif
3778 SLAPD_DYNAMIC_BACKENDS=
3779
3780 SLAPD_PERL_LDFLAGS=
3781 MOD_PERL_LDFLAGS=
3782 PERL_CPPFLAGS=
3783
3784 SLAPD_SQL_LDFLAGS=
3785 SLAPD_SQL_LIBS=
3786 SLAPD_SQL_INCLUDES=
3787
3788 KRB4_LIBS=
3789 KRB5_LIBS=
3790 SASL_LIBS=
3791 TLS_LIBS=
3792 MODULES_LIBS=
3793 SLAPI_LIBS=
3794 LIBSLAPI=
3795 LIBSLAPITOOLS=
3796 AUTH_LIBS=
3797 ICU_LIBS=
3798
3799 SLAPD_SLP_LIBS=
3800 SLAPD_GMP_LIBS=
3801
3802
3803
3804 cat >>confdefs.h <<\_ACEOF
3805 #define HAVE_MKVERSION 1
3806 _ACEOF
3807
3808
3809
3810
3811 ol_aix_threads=no
3812 case "$target" in
3813 *-*-aix*)       if test -z "$CC" ; then
3814                 case "$ol_with_threads" in
3815                 auto | yes |  posix) ol_aix_threads=yes ;;
3816                 esac
3817         fi
3818 ;;
3819 esac
3820
3821 if test $ol_aix_threads = yes ; then
3822         if test -z "${CC}" ; then
3823                 for ac_prog in cc_r xlc_r cc
3824 do
3825   # Extract the first word of "$ac_prog", so it can be a program name with args.
3826 set dummy $ac_prog; ac_word=$2
3827 echo "$as_me:$LINENO: checking for $ac_word" >&5
3828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3829 if test "${ac_cv_prog_CC+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832   if test -n "$CC"; then
3833   ac_cv_prog_CC="$CC" # Let the user override the test.
3834 else
3835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836 for as_dir in $PATH
3837 do
3838   IFS=$as_save_IFS
3839   test -z "$as_dir" && as_dir=.
3840   for ac_exec_ext in '' $ac_executable_extensions; do
3841   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3842     ac_cv_prog_CC="$ac_prog"
3843     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3844     break 2
3845   fi
3846 done
3847 done
3848
3849 fi
3850 fi
3851 CC=$ac_cv_prog_CC
3852 if test -n "$CC"; then
3853   echo "$as_me:$LINENO: result: $CC" >&5
3854 echo "${ECHO_T}$CC" >&6
3855 else
3856   echo "$as_me:$LINENO: result: no" >&5
3857 echo "${ECHO_T}no" >&6
3858 fi
3859
3860   test -n "$CC" && break
3861 done
3862
3863
3864                 if test "$CC" = cc ; then
3865                                                 if test $ol_with_threads != auto ; then
3866                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
3867 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
3868    { (exit 1); exit 1; }; }
3869                         else
3870                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
3871 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
3872                         fi
3873                         ol_with_threads=no
3874                 fi
3875         fi
3876
3877         case ${CC} in cc_r | xlc_r)
3878                 ol_with_threads=posix
3879                 ol_cv_pthread_create=yes
3880                 ;;
3881         esac
3882 fi
3883
3884 if test -z "${CC}"; then
3885         for ac_prog in cc gcc
3886 do
3887   # Extract the first word of "$ac_prog", so it can be a program name with args.
3888 set dummy $ac_prog; ac_word=$2
3889 echo "$as_me:$LINENO: checking for $ac_word" >&5
3890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3891 if test "${ac_cv_prog_CC+set}" = set; then
3892   echo $ECHO_N "(cached) $ECHO_C" >&6
3893 else
3894   if test -n "$CC"; then
3895   ac_cv_prog_CC="$CC" # Let the user override the test.
3896 else
3897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3898 for as_dir in $PATH
3899 do
3900   IFS=$as_save_IFS
3901   test -z "$as_dir" && as_dir=.
3902   for ac_exec_ext in '' $ac_executable_extensions; do
3903   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3904     ac_cv_prog_CC="$ac_prog"
3905     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3906     break 2
3907   fi
3908 done
3909 done
3910
3911 fi
3912 fi
3913 CC=$ac_cv_prog_CC
3914 if test -n "$CC"; then
3915   echo "$as_me:$LINENO: result: $CC" >&5
3916 echo "${ECHO_T}$CC" >&6
3917 else
3918   echo "$as_me:$LINENO: result: no" >&5
3919 echo "${ECHO_T}no" >&6
3920 fi
3921
3922   test -n "$CC" && break
3923 done
3924 test -n "$CC" || CC="missing"
3925
3926
3927         if test "${CC}" = "missing" ; then
3928                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
3929 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
3930    { (exit 1); exit 1; }; }
3931         fi
3932 fi
3933
3934 if test -z "${AR}"; then
3935         for ac_prog in ar gar
3936 do
3937   # Extract the first word of "$ac_prog", so it can be a program name with args.
3938 set dummy $ac_prog; ac_word=$2
3939 echo "$as_me:$LINENO: checking for $ac_word" >&5
3940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3941 if test "${ac_cv_prog_AR+set}" = set; then
3942   echo $ECHO_N "(cached) $ECHO_C" >&6
3943 else
3944   if test -n "$AR"; then
3945   ac_cv_prog_AR="$AR" # Let the user override the test.
3946 else
3947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3948 for as_dir in $PATH
3949 do
3950   IFS=$as_save_IFS
3951   test -z "$as_dir" && as_dir=.
3952   for ac_exec_ext in '' $ac_executable_extensions; do
3953   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3954     ac_cv_prog_AR="$ac_prog"
3955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3956     break 2
3957   fi
3958 done
3959 done
3960
3961 fi
3962 fi
3963 AR=$ac_cv_prog_AR
3964 if test -n "$AR"; then
3965   echo "$as_me:$LINENO: result: $AR" >&5
3966 echo "${ECHO_T}$AR" >&6
3967 else
3968   echo "$as_me:$LINENO: result: no" >&5
3969 echo "${ECHO_T}no" >&6
3970 fi
3971
3972   test -n "$AR" && break
3973 done
3974 test -n "$AR" || AR="missing"
3975
3976
3977         if test "${AR}" = "missing" ; then
3978                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
3979 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
3980    { (exit 1); exit 1; }; }
3981         fi
3982 fi
3983
3984
3985
3986
3987
3988 # Check whether --enable-fast-install or --disable-fast-install was given.
3989 if test "${enable_fast_install+set}" = set; then
3990   enableval="$enable_fast_install"
3991   p=${PACKAGE-default}
3992     case $enableval in
3993     yes) enable_fast_install=yes ;;
3994     no) enable_fast_install=no ;;
3995     *)
3996       enable_fast_install=no
3997       # Look at the argument we got.  We use all the common list separators.
3998       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3999       for pkg in $enableval; do
4000         IFS="$lt_save_ifs"
4001         if test "X$pkg" = "X$p"; then
4002           enable_fast_install=yes
4003         fi
4004       done
4005       IFS="$lt_save_ifs"
4006       ;;
4007     esac
4008 else
4009   enable_fast_install=yes
4010 fi;
4011
4012 DEPDIR="${am__leading_dot}deps"
4013
4014           ac_config_commands="$ac_config_commands depfiles"
4015
4016
4017 am_make=${MAKE-make}
4018 cat > confinc << 'END'
4019 am__doit:
4020         @echo done
4021 .PHONY: am__doit
4022 END
4023 # If we don't find an include directive, just comment out the code.
4024 echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4025 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
4026 am__include="#"
4027 am__quote=
4028 _am_result=none
4029 # First try GNU make style include.
4030 echo "include confinc" > confmf
4031 # We grep out `Entering directory' and `Leaving directory'
4032 # messages which can occur if `w' ends up in MAKEFLAGS.
4033 # In particular we don't look at `^make:' because GNU make might
4034 # be invoked under some other name (usually "gmake"), in which
4035 # case it prints its new name instead of `make'.
4036 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4037    am__include=include
4038    am__quote=
4039    _am_result=GNU
4040 fi
4041 # Now try BSD make style include.
4042 if test "$am__include" = "#"; then
4043    echo '.include "confinc"' > confmf
4044    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4045       am__include=.include
4046       am__quote="\""
4047       _am_result=BSD
4048    fi
4049 fi
4050
4051
4052 echo "$as_me:$LINENO: result: $_am_result" >&5
4053 echo "${ECHO_T}$_am_result" >&6
4054 rm -f confinc confmf
4055
4056 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
4057 if test "${enable_dependency_tracking+set}" = set; then
4058   enableval="$enable_dependency_tracking"
4059
4060 fi;
4061 if test "x$enable_dependency_tracking" != xno; then
4062   am_depcomp="$ac_aux_dir/depcomp"
4063   AMDEPBACKSLASH='\'
4064 fi
4065
4066
4067 if test "x$enable_dependency_tracking" != xno; then
4068   AMDEP_TRUE=
4069   AMDEP_FALSE='#'
4070 else
4071   AMDEP_TRUE='#'
4072   AMDEP_FALSE=
4073 fi
4074
4075
4076
4077 ac_ext=c
4078 ac_cpp='$CPP $CPPFLAGS'
4079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4082 if test -n "$ac_tool_prefix"; then
4083   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4084 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4085 echo "$as_me:$LINENO: checking for $ac_word" >&5
4086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4087 if test "${ac_cv_prog_CC+set}" = set; then
4088   echo $ECHO_N "(cached) $ECHO_C" >&6
4089 else
4090   if test -n "$CC"; then
4091   ac_cv_prog_CC="$CC" # Let the user override the test.
4092 else
4093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4094 for as_dir in $PATH
4095 do
4096   IFS=$as_save_IFS
4097   test -z "$as_dir" && as_dir=.
4098   for ac_exec_ext in '' $ac_executable_extensions; do
4099   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4100     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4101     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4102     break 2
4103   fi
4104 done
4105 done
4106
4107 fi
4108 fi
4109 CC=$ac_cv_prog_CC
4110 if test -n "$CC"; then
4111   echo "$as_me:$LINENO: result: $CC" >&5
4112 echo "${ECHO_T}$CC" >&6
4113 else
4114   echo "$as_me:$LINENO: result: no" >&5
4115 echo "${ECHO_T}no" >&6
4116 fi
4117
4118 fi
4119 if test -z "$ac_cv_prog_CC"; then
4120   ac_ct_CC=$CC
4121   # Extract the first word of "gcc", so it can be a program name with args.
4122 set dummy gcc; ac_word=$2
4123 echo "$as_me:$LINENO: checking for $ac_word" >&5
4124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4125 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4126   echo $ECHO_N "(cached) $ECHO_C" >&6
4127 else
4128   if test -n "$ac_ct_CC"; then
4129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4130 else
4131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4132 for as_dir in $PATH
4133 do
4134   IFS=$as_save_IFS
4135   test -z "$as_dir" && as_dir=.
4136   for ac_exec_ext in '' $ac_executable_extensions; do
4137   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4138     ac_cv_prog_ac_ct_CC="gcc"
4139     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4140     break 2
4141   fi
4142 done
4143 done
4144
4145 fi
4146 fi
4147 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4148 if test -n "$ac_ct_CC"; then
4149   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4150 echo "${ECHO_T}$ac_ct_CC" >&6
4151 else
4152   echo "$as_me:$LINENO: result: no" >&5
4153 echo "${ECHO_T}no" >&6
4154 fi
4155
4156   CC=$ac_ct_CC
4157 else
4158   CC="$ac_cv_prog_CC"
4159 fi
4160
4161 if test -z "$CC"; then
4162   if test -n "$ac_tool_prefix"; then
4163   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4164 set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
4168   echo $ECHO_N "(cached) $ECHO_C" >&6
4169 else
4170   if test -n "$CC"; then
4171   ac_cv_prog_CC="$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_CC="${ac_tool_prefix}cc"
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 CC=$ac_cv_prog_CC
4190 if test -n "$CC"; then
4191   echo "$as_me:$LINENO: result: $CC" >&5
4192 echo "${ECHO_T}$CC" >&6
4193 else
4194   echo "$as_me:$LINENO: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4196 fi
4197
4198 fi
4199 if test -z "$ac_cv_prog_CC"; then
4200   ac_ct_CC=$CC
4201   # Extract the first word of "cc", so it can be a program name with args.
4202 set dummy cc; ac_word=$2
4203 echo "$as_me:$LINENO: checking for $ac_word" >&5
4204 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4205 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4206   echo $ECHO_N "(cached) $ECHO_C" >&6
4207 else
4208   if test -n "$ac_ct_CC"; then
4209   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4210 else
4211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4212 for as_dir in $PATH
4213 do
4214   IFS=$as_save_IFS
4215   test -z "$as_dir" && as_dir=.
4216   for ac_exec_ext in '' $ac_executable_extensions; do
4217   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4218     ac_cv_prog_ac_ct_CC="cc"
4219     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4220     break 2
4221   fi
4222 done
4223 done
4224
4225 fi
4226 fi
4227 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4228 if test -n "$ac_ct_CC"; then
4229   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4230 echo "${ECHO_T}$ac_ct_CC" >&6
4231 else
4232   echo "$as_me:$LINENO: result: no" >&5
4233 echo "${ECHO_T}no" >&6
4234 fi
4235
4236   CC=$ac_ct_CC
4237 else
4238   CC="$ac_cv_prog_CC"
4239 fi
4240
4241 fi
4242 if test -z "$CC"; then
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_CC+set}" = set; then
4248   echo $ECHO_N "(cached) $ECHO_C" >&6
4249 else
4250   if test -n "$CC"; then
4251   ac_cv_prog_CC="$CC" # Let the user override the test.
4252 else
4253   ac_prog_rejected=no
4254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255 for as_dir in $PATH
4256 do
4257   IFS=$as_save_IFS
4258   test -z "$as_dir" && as_dir=.
4259   for ac_exec_ext in '' $ac_executable_extensions; do
4260   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4261     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4262        ac_prog_rejected=yes
4263        continue
4264      fi
4265     ac_cv_prog_CC="cc"
4266     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4267     break 2
4268   fi
4269 done
4270 done
4271
4272 if test $ac_prog_rejected = yes; then
4273   # We found a bogon in the path, so make sure we never use it.
4274   set dummy $ac_cv_prog_CC
4275   shift
4276   if test $# != 0; then
4277     # We chose a different compiler from the bogus one.
4278     # However, it has the same basename, so the bogon will be chosen
4279     # first if we set CC to just the basename; use the full file name.
4280     shift
4281     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4282   fi
4283 fi
4284 fi
4285 fi
4286 CC=$ac_cv_prog_CC
4287 if test -n "$CC"; then
4288   echo "$as_me:$LINENO: result: $CC" >&5
4289 echo "${ECHO_T}$CC" >&6
4290 else
4291   echo "$as_me:$LINENO: result: no" >&5
4292 echo "${ECHO_T}no" >&6
4293 fi
4294
4295 fi
4296 if test -z "$CC"; then
4297   if test -n "$ac_tool_prefix"; then
4298   for ac_prog in cl
4299   do
4300     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4301 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4302 echo "$as_me:$LINENO: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_CC+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$CC"; then
4308   ac_cv_prog_CC="$CC" # Let the user override the test.
4309 else
4310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311 for as_dir in $PATH
4312 do
4313   IFS=$as_save_IFS
4314   test -z "$as_dir" && as_dir=.
4315   for ac_exec_ext in '' $ac_executable_extensions; do
4316   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4317     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4318     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4319     break 2
4320   fi
4321 done
4322 done
4323
4324 fi
4325 fi
4326 CC=$ac_cv_prog_CC
4327 if test -n "$CC"; then
4328   echo "$as_me:$LINENO: result: $CC" >&5
4329 echo "${ECHO_T}$CC" >&6
4330 else
4331   echo "$as_me:$LINENO: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335     test -n "$CC" && break
4336   done
4337 fi
4338 if test -z "$CC"; then
4339   ac_ct_CC=$CC
4340   for ac_prog in cl
4341 do
4342   # Extract the first word of "$ac_prog", so it can be a program name with args.
4343 set dummy $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_ac_ct_CC+set}" = set; then
4347   echo $ECHO_N "(cached) $ECHO_C" >&6
4348 else
4349   if test -n "$ac_ct_CC"; then
4350   ac_cv_prog_ac_ct_CC="$ac_ct_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_ac_ct_CC="$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 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4369 if test -n "$ac_ct_CC"; then
4370   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4371 echo "${ECHO_T}$ac_ct_CC" >&6
4372 else
4373   echo "$as_me:$LINENO: result: no" >&5
4374 echo "${ECHO_T}no" >&6
4375 fi
4376
4377   test -n "$ac_ct_CC" && break
4378 done
4379
4380   CC=$ac_ct_CC
4381 fi
4382
4383 fi
4384
4385
4386 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4387 See \`config.log' for more details." >&5
4388 echo "$as_me: error: no acceptable C compiler found in \$PATH
4389 See \`config.log' for more details." >&2;}
4390    { (exit 1); exit 1; }; }
4391
4392 # Provide some information about the compiler.
4393 echo "$as_me:$LINENO:" \
4394      "checking for C compiler version" >&5
4395 ac_compiler=`set X $ac_compile; echo $2`
4396 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4397   (eval $ac_compiler --version </dev/null >&5) 2>&5
4398   ac_status=$?
4399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400   (exit $ac_status); }
4401 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4402   (eval $ac_compiler -v </dev/null >&5) 2>&5
4403   ac_status=$?
4404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4405   (exit $ac_status); }
4406 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4407   (eval $ac_compiler -V </dev/null >&5) 2>&5
4408   ac_status=$?
4409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4410   (exit $ac_status); }
4411
4412 cat >conftest.$ac_ext <<_ACEOF
4413 /* confdefs.h.  */
4414 _ACEOF
4415 cat confdefs.h >>conftest.$ac_ext
4416 cat >>conftest.$ac_ext <<_ACEOF
4417 /* end confdefs.h.  */
4418
4419 int
4420 main ()
4421 {
4422
4423   ;
4424   return 0;
4425 }
4426 _ACEOF
4427 ac_clean_files_save=$ac_clean_files
4428 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4429 # Try to create an executable without -o first, disregard a.out.
4430 # It will help us diagnose broken compilers, and finding out an intuition
4431 # of exeext.
4432 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
4433 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
4434 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4435 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4436   (eval $ac_link_default) 2>&5
4437   ac_status=$?
4438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439   (exit $ac_status); }; then
4440   # Find the output, starting from the most likely.  This scheme is
4441 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4442 # resort.
4443
4444 # Be careful to initialize this variable, since it used to be cached.
4445 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4446 ac_cv_exeext=
4447 # b.out is created by i960 compilers.
4448 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4449 do
4450   test -f "$ac_file" || continue
4451   case $ac_file in
4452     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4453         ;;
4454     conftest.$ac_ext )
4455         # This is the source file.
4456         ;;
4457     [ab].out )
4458         # We found the default executable, but exeext='' is most
4459         # certainly right.
4460         break;;
4461     *.* )
4462         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4463         # FIXME: I believe we export ac_cv_exeext for Libtool,
4464         # but it would be cool to find out if it's true.  Does anybody
4465         # maintain Libtool? --akim.
4466         export ac_cv_exeext
4467         break;;
4468     * )
4469         break;;
4470   esac
4471 done
4472 else
4473   echo "$as_me: failed program was:" >&5
4474 sed 's/^/| /' conftest.$ac_ext >&5
4475
4476 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4477 See \`config.log' for more details." >&5
4478 echo "$as_me: error: C compiler cannot create executables
4479 See \`config.log' for more details." >&2;}
4480    { (exit 77); exit 77; }; }
4481 fi
4482
4483 ac_exeext=$ac_cv_exeext
4484 echo "$as_me:$LINENO: result: $ac_file" >&5
4485 echo "${ECHO_T}$ac_file" >&6
4486
4487 # Check the compiler produces executables we can run.  If not, either
4488 # the compiler is broken, or we cross compile.
4489 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4490 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4491 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4492 # If not cross compiling, check that we can run a simple program.
4493 if test "$cross_compiling" != yes; then
4494   if { ac_try='./$ac_file'
4495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4496   (eval $ac_try) 2>&5
4497   ac_status=$?
4498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4499   (exit $ac_status); }; }; then
4500     cross_compiling=no
4501   else
4502     if test "$cross_compiling" = maybe; then
4503         cross_compiling=yes
4504     else
4505         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4506 If you meant to cross compile, use \`--host'.
4507 See \`config.log' for more details." >&5
4508 echo "$as_me: error: cannot run C compiled programs.
4509 If you meant to cross compile, use \`--host'.
4510 See \`config.log' for more details." >&2;}
4511    { (exit 1); exit 1; }; }
4512     fi
4513   fi
4514 fi
4515 echo "$as_me:$LINENO: result: yes" >&5
4516 echo "${ECHO_T}yes" >&6
4517
4518 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4519 ac_clean_files=$ac_clean_files_save
4520 # Check the compiler produces executables we can run.  If not, either
4521 # the compiler is broken, or we cross compile.
4522 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4523 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4524 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4525 echo "${ECHO_T}$cross_compiling" >&6
4526
4527 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4528 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4529 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4530   (eval $ac_link) 2>&5
4531   ac_status=$?
4532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4533   (exit $ac_status); }; then
4534   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4535 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4536 # work properly (i.e., refer to `conftest.exe'), while it won't with
4537 # `rm'.
4538 for ac_file in conftest.exe conftest conftest.*; do
4539   test -f "$ac_file" || continue
4540   case $ac_file in
4541     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4542     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4543           export ac_cv_exeext
4544           break;;
4545     * ) break;;
4546   esac
4547 done
4548 else
4549   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4550 See \`config.log' for more details." >&5
4551 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4552 See \`config.log' for more details." >&2;}
4553    { (exit 1); exit 1; }; }
4554 fi
4555
4556 rm -f conftest$ac_cv_exeext
4557 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4558 echo "${ECHO_T}$ac_cv_exeext" >&6
4559
4560 rm -f conftest.$ac_ext
4561 EXEEXT=$ac_cv_exeext
4562 ac_exeext=$EXEEXT
4563 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4564 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4565 if test "${ac_cv_objext+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   cat >conftest.$ac_ext <<_ACEOF
4569 /* confdefs.h.  */
4570 _ACEOF
4571 cat confdefs.h >>conftest.$ac_ext
4572 cat >>conftest.$ac_ext <<_ACEOF
4573 /* end confdefs.h.  */
4574
4575 int
4576 main ()
4577 {
4578
4579   ;
4580   return 0;
4581 }
4582 _ACEOF
4583 rm -f conftest.o conftest.obj
4584 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4585   (eval $ac_compile) 2>&5
4586   ac_status=$?
4587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588   (exit $ac_status); }; then
4589   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4590   case $ac_file in
4591     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4592     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4593        break;;
4594   esac
4595 done
4596 else
4597   echo "$as_me: failed program was:" >&5
4598 sed 's/^/| /' conftest.$ac_ext >&5
4599
4600 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4601 See \`config.log' for more details." >&5
4602 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4603 See \`config.log' for more details." >&2;}
4604    { (exit 1); exit 1; }; }
4605 fi
4606
4607 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4608 fi
4609 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4610 echo "${ECHO_T}$ac_cv_objext" >&6
4611 OBJEXT=$ac_cv_objext
4612 ac_objext=$OBJEXT
4613 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4614 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4615 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4616   echo $ECHO_N "(cached) $ECHO_C" >&6
4617 else
4618   cat >conftest.$ac_ext <<_ACEOF
4619 /* confdefs.h.  */
4620 _ACEOF
4621 cat confdefs.h >>conftest.$ac_ext
4622 cat >>conftest.$ac_ext <<_ACEOF
4623 /* end confdefs.h.  */
4624
4625 int
4626 main ()
4627 {
4628 #ifndef __GNUC__
4629        choke me
4630 #endif
4631
4632   ;
4633   return 0;
4634 }
4635 _ACEOF
4636 rm -f conftest.$ac_objext
4637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4638   (eval $ac_compile) 2>conftest.er1
4639   ac_status=$?
4640   grep -v '^ *+' conftest.er1 >conftest.err
4641   rm -f conftest.er1
4642   cat conftest.err >&5
4643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4644   (exit $ac_status); } &&
4645          { ac_try='test -z "$ac_c_werror_flag"
4646                          || test ! -s conftest.err'
4647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4648   (eval $ac_try) 2>&5
4649   ac_status=$?
4650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4651   (exit $ac_status); }; } &&
4652          { ac_try='test -s conftest.$ac_objext'
4653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4654   (eval $ac_try) 2>&5
4655   ac_status=$?
4656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4657   (exit $ac_status); }; }; then
4658   ac_compiler_gnu=yes
4659 else
4660   echo "$as_me: failed program was:" >&5
4661 sed 's/^/| /' conftest.$ac_ext >&5
4662
4663 ac_compiler_gnu=no
4664 fi
4665 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4666 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4667
4668 fi
4669 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4670 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4671 GCC=`test $ac_compiler_gnu = yes && echo yes`
4672 ac_test_CFLAGS=${CFLAGS+set}
4673 ac_save_CFLAGS=$CFLAGS
4674 CFLAGS="-g"
4675 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4676 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4677 if test "${ac_cv_prog_cc_g+set}" = set; then
4678   echo $ECHO_N "(cached) $ECHO_C" >&6
4679 else
4680   cat >conftest.$ac_ext <<_ACEOF
4681 /* confdefs.h.  */
4682 _ACEOF
4683 cat confdefs.h >>conftest.$ac_ext
4684 cat >>conftest.$ac_ext <<_ACEOF
4685 /* end confdefs.h.  */
4686
4687 int
4688 main ()
4689 {
4690
4691   ;
4692   return 0;
4693 }
4694 _ACEOF
4695 rm -f conftest.$ac_objext
4696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4697   (eval $ac_compile) 2>conftest.er1
4698   ac_status=$?
4699   grep -v '^ *+' conftest.er1 >conftest.err
4700   rm -f conftest.er1
4701   cat conftest.err >&5
4702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4703   (exit $ac_status); } &&
4704          { ac_try='test -z "$ac_c_werror_flag"
4705                          || test ! -s conftest.err'
4706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4707   (eval $ac_try) 2>&5
4708   ac_status=$?
4709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710   (exit $ac_status); }; } &&
4711          { ac_try='test -s conftest.$ac_objext'
4712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4713   (eval $ac_try) 2>&5
4714   ac_status=$?
4715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716   (exit $ac_status); }; }; then
4717   ac_cv_prog_cc_g=yes
4718 else
4719   echo "$as_me: failed program was:" >&5
4720 sed 's/^/| /' conftest.$ac_ext >&5
4721
4722 ac_cv_prog_cc_g=no
4723 fi
4724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4725 fi
4726 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4727 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4728 if test "$ac_test_CFLAGS" = set; then
4729   CFLAGS=$ac_save_CFLAGS
4730 elif test $ac_cv_prog_cc_g = yes; then
4731   if test "$GCC" = yes; then
4732     CFLAGS="-g -O2"
4733   else
4734     CFLAGS="-g"
4735   fi
4736 else
4737   if test "$GCC" = yes; then
4738     CFLAGS="-O2"
4739   else
4740     CFLAGS=
4741   fi
4742 fi
4743 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4744 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4745 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   ac_cv_prog_cc_stdc=no
4749 ac_save_CC=$CC
4750 cat >conftest.$ac_ext <<_ACEOF
4751 /* confdefs.h.  */
4752 _ACEOF
4753 cat confdefs.h >>conftest.$ac_ext
4754 cat >>conftest.$ac_ext <<_ACEOF
4755 /* end confdefs.h.  */
4756 #include <stdarg.h>
4757 #include <stdio.h>
4758 #include <sys/types.h>
4759 #include <sys/stat.h>
4760 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4761 struct buf { int x; };
4762 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4763 static char *e (p, i)
4764      char **p;
4765      int i;
4766 {
4767   return p[i];
4768 }
4769 static char *f (char * (*g) (char **, int), char **p, ...)
4770 {
4771   char *s;
4772   va_list v;
4773   va_start (v,p);
4774   s = g (p, va_arg (v,int));
4775   va_end (v);
4776   return s;
4777 }
4778
4779 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4780    function prototypes and stuff, but not '\xHH' hex character constants.
4781    These don't provoke an error unfortunately, instead are silently treated
4782    as 'x'.  The following induces an error, until -std1 is added to get
4783    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4784    array size at least.  It's necessary to write '\x00'==0 to get something
4785    that's true only with -std1.  */
4786 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4787
4788 int test (int i, double x);
4789 struct s1 {int (*f) (int a);};
4790 struct s2 {int (*f) (double a);};
4791 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4792 int argc;
4793 char **argv;
4794 int
4795 main ()
4796 {
4797 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4798   ;
4799   return 0;
4800 }
4801 _ACEOF
4802 # Don't try gcc -ansi; that turns off useful extensions and
4803 # breaks some systems' header files.
4804 # AIX                   -qlanglvl=ansi
4805 # Ultrix and OSF/1      -std1
4806 # HP-UX 10.20 and later -Ae
4807 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4808 # SVR4                  -Xc -D__EXTENSIONS__
4809 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4810 do
4811   CC="$ac_save_CC $ac_arg"
4812   rm -f conftest.$ac_objext
4813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4814   (eval $ac_compile) 2>conftest.er1
4815   ac_status=$?
4816   grep -v '^ *+' conftest.er1 >conftest.err
4817   rm -f conftest.er1
4818   cat conftest.err >&5
4819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820   (exit $ac_status); } &&
4821          { ac_try='test -z "$ac_c_werror_flag"
4822                          || test ! -s conftest.err'
4823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4824   (eval $ac_try) 2>&5
4825   ac_status=$?
4826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827   (exit $ac_status); }; } &&
4828          { ac_try='test -s conftest.$ac_objext'
4829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4830   (eval $ac_try) 2>&5
4831   ac_status=$?
4832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833   (exit $ac_status); }; }; then
4834   ac_cv_prog_cc_stdc=$ac_arg
4835 break
4836 else
4837   echo "$as_me: failed program was:" >&5
4838 sed 's/^/| /' conftest.$ac_ext >&5
4839
4840 fi
4841 rm -f conftest.err conftest.$ac_objext
4842 done
4843 rm -f conftest.$ac_ext conftest.$ac_objext
4844 CC=$ac_save_CC
4845
4846 fi
4847
4848 case "x$ac_cv_prog_cc_stdc" in
4849   x|xno)
4850     echo "$as_me:$LINENO: result: none needed" >&5
4851 echo "${ECHO_T}none needed" >&6 ;;
4852   *)
4853     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
4854 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4855     CC="$CC $ac_cv_prog_cc_stdc" ;;
4856 esac
4857
4858 # Some people use a C++ compiler to compile C.  Since we use `exit',
4859 # in C++ we need to declare it.  In case someone uses the same compiler
4860 # for both compiling C and C++ we need to have the C++ compiler decide
4861 # the declaration of exit, since it's the most demanding environment.
4862 cat >conftest.$ac_ext <<_ACEOF
4863 #ifndef __cplusplus
4864   choke me
4865 #endif
4866 _ACEOF
4867 rm -f conftest.$ac_objext
4868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4869   (eval $ac_compile) 2>conftest.er1
4870   ac_status=$?
4871   grep -v '^ *+' conftest.er1 >conftest.err
4872   rm -f conftest.er1
4873   cat conftest.err >&5
4874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4875   (exit $ac_status); } &&
4876          { ac_try='test -z "$ac_c_werror_flag"
4877                          || test ! -s conftest.err'
4878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4879   (eval $ac_try) 2>&5
4880   ac_status=$?
4881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882   (exit $ac_status); }; } &&
4883          { ac_try='test -s conftest.$ac_objext'
4884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4885   (eval $ac_try) 2>&5
4886   ac_status=$?
4887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4888   (exit $ac_status); }; }; then
4889   for ac_declaration in \
4890    '' \
4891    'extern "C" void std::exit (int) throw (); using std::exit;' \
4892    'extern "C" void std::exit (int); using std::exit;' \
4893    'extern "C" void exit (int) throw ();' \
4894    'extern "C" void exit (int);' \
4895    'void exit (int);'
4896 do
4897   cat >conftest.$ac_ext <<_ACEOF
4898 /* confdefs.h.  */
4899 _ACEOF
4900 cat confdefs.h >>conftest.$ac_ext
4901 cat >>conftest.$ac_ext <<_ACEOF
4902 /* end confdefs.h.  */
4903 $ac_declaration
4904 #include <stdlib.h>
4905 int
4906 main ()
4907 {
4908 exit (42);
4909   ;
4910   return 0;
4911 }
4912 _ACEOF
4913 rm -f conftest.$ac_objext
4914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4915   (eval $ac_compile) 2>conftest.er1
4916   ac_status=$?
4917   grep -v '^ *+' conftest.er1 >conftest.err
4918   rm -f conftest.er1
4919   cat conftest.err >&5
4920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4921   (exit $ac_status); } &&
4922          { ac_try='test -z "$ac_c_werror_flag"
4923                          || test ! -s conftest.err'
4924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4925   (eval $ac_try) 2>&5
4926   ac_status=$?
4927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928   (exit $ac_status); }; } &&
4929          { ac_try='test -s conftest.$ac_objext'
4930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4931   (eval $ac_try) 2>&5
4932   ac_status=$?
4933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4934   (exit $ac_status); }; }; then
4935   :
4936 else
4937   echo "$as_me: failed program was:" >&5
4938 sed 's/^/| /' conftest.$ac_ext >&5
4939
4940 continue
4941 fi
4942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4943   cat >conftest.$ac_ext <<_ACEOF
4944 /* confdefs.h.  */
4945 _ACEOF
4946 cat confdefs.h >>conftest.$ac_ext
4947 cat >>conftest.$ac_ext <<_ACEOF
4948 /* end confdefs.h.  */
4949 $ac_declaration
4950 int
4951 main ()
4952 {
4953 exit (42);
4954   ;
4955   return 0;
4956 }
4957 _ACEOF
4958 rm -f conftest.$ac_objext
4959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4960   (eval $ac_compile) 2>conftest.er1
4961   ac_status=$?
4962   grep -v '^ *+' conftest.er1 >conftest.err
4963   rm -f conftest.er1
4964   cat conftest.err >&5
4965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4966   (exit $ac_status); } &&
4967          { ac_try='test -z "$ac_c_werror_flag"
4968                          || test ! -s conftest.err'
4969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4970   (eval $ac_try) 2>&5
4971   ac_status=$?
4972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973   (exit $ac_status); }; } &&
4974          { ac_try='test -s conftest.$ac_objext'
4975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4976   (eval $ac_try) 2>&5
4977   ac_status=$?
4978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979   (exit $ac_status); }; }; then
4980   break
4981 else
4982   echo "$as_me: failed program was:" >&5
4983 sed 's/^/| /' conftest.$ac_ext >&5
4984
4985 fi
4986 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4987 done
4988 rm -f conftest*
4989 if test -n "$ac_declaration"; then
4990   echo '#ifdef __cplusplus' >>confdefs.h
4991   echo $ac_declaration      >>confdefs.h
4992   echo '#endif'             >>confdefs.h
4993 fi
4994
4995 else
4996   echo "$as_me: failed program was:" >&5
4997 sed 's/^/| /' conftest.$ac_ext >&5
4998
4999 fi
5000 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5001 ac_ext=c
5002 ac_cpp='$CPP $CPPFLAGS'
5003 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5004 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5005 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5006
5007 depcc="$CC"   am_compiler_list=
5008
5009 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5010 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
5011 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5012   echo $ECHO_N "(cached) $ECHO_C" >&6
5013 else
5014   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5015   # We make a subdir and do the tests there.  Otherwise we can end up
5016   # making bogus files that we don't know about and never remove.  For
5017   # instance it was reported that on HP-UX the gcc test will end up
5018   # making a dummy file named `D' -- because `-MD' means `put the output
5019   # in D'.
5020   mkdir conftest.dir
5021   # Copy depcomp to subdir because otherwise we won't find it if we're
5022   # using a relative directory.
5023   cp "$am_depcomp" conftest.dir
5024   cd conftest.dir
5025   # We will build objects and dependencies in a subdirectory because
5026   # it helps to detect inapplicable dependency modes.  For instance
5027   # both Tru64's cc and ICC support -MD to output dependencies as a
5028   # side effect of compilation, but ICC will put the dependencies in
5029   # the current directory while Tru64 will put them in the object
5030   # directory.
5031   mkdir sub
5032
5033   am_cv_CC_dependencies_compiler_type=none
5034   if test "$am_compiler_list" = ""; then
5035      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5036   fi
5037   for depmode in $am_compiler_list; do
5038     # Setup a source with many dependencies, because some compilers
5039     # like to wrap large dependency lists on column 80 (with \), and
5040     # we should not choose a depcomp mode which is confused by this.
5041     #
5042     # We need to recreate these files for each test, as the compiler may
5043     # overwrite some of them when testing with obscure command lines.
5044     # This happens at least with the AIX C compiler.
5045     : > sub/conftest.c
5046     for i in 1 2 3 4 5 6; do
5047       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5048       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5049       # Solaris 8's {/usr,}/bin/sh.
5050       touch sub/conftst$i.h
5051     done
5052     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5053
5054     case $depmode in
5055     nosideeffect)
5056       # after this tag, mechanisms are not by side-effect, so they'll
5057       # only be used when explicitly requested
5058       if test "x$enable_dependency_tracking" = xyes; then
5059         continue
5060       else
5061         break
5062       fi
5063       ;;
5064     none) break ;;
5065     esac
5066     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5067     # mode.  It turns out that the SunPro C++ compiler does not properly
5068     # handle `-M -o', and we need to detect this.
5069     if depmode=$depmode \
5070        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5071        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5072        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5073          >/dev/null 2>conftest.err &&
5074        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5075        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5076        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5077       # icc doesn't choke on unknown options, it will just issue warnings
5078       # or remarks (even with -Werror).  So we grep stderr for any message
5079       # that says an option was ignored or not supported.
5080       # When given -MP, icc 7.0 and 7.1 complain thusly:
5081       #   icc: Command line warning: ignoring option '-M'; no argument required
5082       # The diagnosis changed in icc 8.0:
5083       #   icc: Command line remark: option '-MP' not supported
5084       if (grep 'ignoring option' conftest.err ||
5085           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5086         am_cv_CC_dependencies_compiler_type=$depmode
5087         break
5088       fi
5089     fi
5090   done
5091
5092   cd ..
5093   rm -rf conftest.dir
5094 else
5095   am_cv_CC_dependencies_compiler_type=none
5096 fi
5097
5098 fi
5099 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5100 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
5101 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5102
5103
5104
5105 if
5106   test "x$enable_dependency_tracking" != xno \
5107   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5108   am__fastdepCC_TRUE=
5109   am__fastdepCC_FALSE='#'
5110 else
5111   am__fastdepCC_TRUE='#'
5112   am__fastdepCC_FALSE=
5113 fi
5114
5115
5116 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5117 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
5118 if test "${lt_cv_path_SED+set}" = set; then
5119   echo $ECHO_N "(cached) $ECHO_C" >&6
5120 else
5121   # Loop through the user's path and test for sed and gsed.
5122 # Then use that list of sed's as ones to test for truncation.
5123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124 for as_dir in $PATH
5125 do
5126   IFS=$as_save_IFS
5127   test -z "$as_dir" && as_dir=.
5128   for lt_ac_prog in sed gsed; do
5129     for ac_exec_ext in '' $ac_executable_extensions; do
5130       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5131         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5132       fi
5133     done
5134   done
5135 done
5136 lt_ac_max=0
5137 lt_ac_count=0
5138 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5139 # along with /bin/sed that truncates output.
5140 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5141   test ! -f $lt_ac_sed && continue
5142   cat /dev/null > conftest.in
5143   lt_ac_count=0
5144   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5145   # Check for GNU sed and select it if it is found.
5146   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5147     lt_cv_path_SED=$lt_ac_sed
5148     break
5149   fi
5150   while true; do
5151     cat conftest.in conftest.in >conftest.tmp
5152     mv conftest.tmp conftest.in
5153     cp conftest.in conftest.nl
5154     echo >>conftest.nl
5155     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5156     cmp -s conftest.out conftest.nl || break
5157     # 10000 chars as input seems more than enough
5158     test $lt_ac_count -gt 10 && break
5159     lt_ac_count=`expr $lt_ac_count + 1`
5160     if test $lt_ac_count -gt $lt_ac_max; then
5161       lt_ac_max=$lt_ac_count
5162       lt_cv_path_SED=$lt_ac_sed
5163     fi
5164   done
5165 done
5166
5167 fi
5168
5169 SED=$lt_cv_path_SED
5170 echo "$as_me:$LINENO: result: $SED" >&5
5171 echo "${ECHO_T}$SED" >&6
5172
5173 echo "$as_me:$LINENO: checking for egrep" >&5
5174 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5175 if test "${ac_cv_prog_egrep+set}" = set; then
5176   echo $ECHO_N "(cached) $ECHO_C" >&6
5177 else
5178   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5179     then ac_cv_prog_egrep='grep -E'
5180     else ac_cv_prog_egrep='egrep'
5181     fi
5182 fi
5183 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5184 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5185  EGREP=$ac_cv_prog_egrep
5186
5187
5188
5189 # Check whether --with-gnu-ld or --without-gnu-ld was given.
5190 if test "${with_gnu_ld+set}" = set; then
5191   withval="$with_gnu_ld"
5192   test "$withval" = no || with_gnu_ld=yes
5193 else
5194   with_gnu_ld=no
5195 fi;
5196 ac_prog=ld
5197 if test "$GCC" = yes; then
5198   # Check if gcc -print-prog-name=ld gives a path.
5199   echo "$as_me:$LINENO: checking for ld used by $CC" >&5
5200 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
5201   case $host in
5202   *-*-mingw*)
5203     # gcc leaves a trailing carriage return which upsets mingw
5204     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5205   *)
5206     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5207   esac
5208   case $ac_prog in
5209     # Accept absolute paths.
5210     [\\/]* | ?:[\\/]*)
5211       re_direlt='/[^/][^/]*/\.\./'
5212       # Canonicalize the pathname of ld
5213       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
5214       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5215         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
5216       done
5217       test -z "$LD" && LD="$ac_prog"
5218       ;;
5219   "")
5220     # If it fails, then pretend we aren't using GCC.
5221     ac_prog=ld
5222     ;;
5223   *)
5224     # If it is relative, then search for the first ld in PATH.
5225     with_gnu_ld=unknown
5226     ;;
5227   esac
5228 elif test "$with_gnu_ld" = yes; then
5229   echo "$as_me:$LINENO: checking for GNU ld" >&5
5230 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
5231 else
5232   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5233 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
5234 fi
5235 if test "${lt_cv_path_LD+set}" = set; then
5236   echo $ECHO_N "(cached) $ECHO_C" >&6
5237 else
5238   if test -z "$LD"; then
5239   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5240   for ac_dir in $PATH; do
5241     IFS="$lt_save_ifs"
5242     test -z "$ac_dir" && ac_dir=.
5243     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5244       lt_cv_path_LD="$ac_dir/$ac_prog"
5245       # Check to see if the program is GNU ld.  I'd rather use --version,
5246       # but apparently some variants of GNU ld only accept -v.
5247       # Break only if it was the GNU/non-GNU ld that we prefer.
5248       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5249       *GNU* | *'with BFD'*)
5250         test "$with_gnu_ld" != no && break
5251         ;;
5252       *)
5253         test "$with_gnu_ld" != yes && break
5254         ;;
5255       esac
5256     fi
5257   done
5258   IFS="$lt_save_ifs"
5259 else
5260   lt_cv_path_LD="$LD" # Let the user override the test with a path.
5261 fi
5262 fi
5263
5264 LD="$lt_cv_path_LD"
5265 if test -n "$LD"; then
5266   echo "$as_me:$LINENO: result: $LD" >&5
5267 echo "${ECHO_T}$LD" >&6
5268 else
5269   echo "$as_me:$LINENO: result: no" >&5
5270 echo "${ECHO_T}no" >&6
5271 fi
5272 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5273 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5274    { (exit 1); exit 1; }; }
5275 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5276 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
5277 if test "${lt_cv_prog_gnu_ld+set}" = set; then
5278   echo $ECHO_N "(cached) $ECHO_C" >&6
5279 else
5280   # I'd rather use --version here, but apparently some GNU lds only accept -v.
5281 case `$LD -v 2>&1 </dev/null` in
5282 *GNU* | *'with BFD'*)
5283   lt_cv_prog_gnu_ld=yes
5284   ;;
5285 *)
5286   lt_cv_prog_gnu_ld=no
5287   ;;
5288 esac
5289 fi
5290 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
5291 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
5292 with_gnu_ld=$lt_cv_prog_gnu_ld
5293
5294
5295 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
5296 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
5297 if test "${lt_cv_ld_reload_flag+set}" = set; then
5298   echo $ECHO_N "(cached) $ECHO_C" >&6
5299 else
5300   lt_cv_ld_reload_flag='-r'
5301 fi
5302 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
5303 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
5304 reload_flag=$lt_cv_ld_reload_flag
5305 case $reload_flag in
5306 "" | " "*) ;;
5307 *) reload_flag=" $reload_flag" ;;
5308 esac
5309 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5310 case $host_os in
5311   darwin*)
5312     if test "$GCC" = yes; then
5313       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5314     else
5315       reload_cmds='$LD$reload_flag -o $output$reload_objs'
5316     fi
5317     ;;
5318 esac
5319
5320 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
5321 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
5322 if test "${lt_cv_path_NM+set}" = set; then
5323   echo $ECHO_N "(cached) $ECHO_C" >&6
5324 else
5325   if test -n "$NM"; then
5326   # Let the user override the test.
5327   lt_cv_path_NM="$NM"
5328 else
5329   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5330   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5331     IFS="$lt_save_ifs"
5332     test -z "$ac_dir" && ac_dir=.
5333     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5334     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5335       # Check to see if the nm accepts a BSD-compat flag.
5336       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5337       #   nm: unknown option "B" ignored
5338       # Tru64's nm complains that /dev/null is an invalid object file
5339       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5340       */dev/null* | *'Invalid file or object type'*)
5341         lt_cv_path_NM="$tmp_nm -B"
5342         break
5343         ;;
5344       *)
5345         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5346         */dev/null*)
5347           lt_cv_path_NM="$tmp_nm -p"
5348           break
5349           ;;
5350         *)
5351           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5352           continue # so that we can try to find one that supports BSD flags
5353           ;;
5354         esac
5355       esac
5356     fi
5357   done
5358   IFS="$lt_save_ifs"
5359   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5360 fi
5361 fi
5362 echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
5363 echo "${ECHO_T}$lt_cv_path_NM" >&6
5364 NM="$lt_cv_path_NM"
5365
5366 echo "$as_me:$LINENO: checking whether ln -s works" >&5
5367 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
5368 LN_S=$as_ln_s
5369 if test "$LN_S" = "ln -s"; then
5370   echo "$as_me:$LINENO: result: yes" >&5
5371 echo "${ECHO_T}yes" >&6
5372 else
5373   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5374 echo "${ECHO_T}no, using $LN_S" >&6
5375 fi
5376
5377 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
5378 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
5379 if test "${lt_cv_deplibs_check_method+set}" = set; then
5380   echo $ECHO_N "(cached) $ECHO_C" >&6
5381 else
5382   lt_cv_file_magic_cmd='$MAGIC_CMD'
5383 lt_cv_file_magic_test_file=
5384 lt_cv_deplibs_check_method='unknown'
5385 # Need to set the preceding variable on all platforms that support
5386 # interlibrary dependencies.
5387 # 'none' -- dependencies not supported.
5388 # `unknown' -- same as none, but documents that we really don't know.
5389 # 'pass_all' -- all dependencies passed with no checks.
5390 # 'test_compile' -- check by making test program.
5391 # 'file_magic [[regex]]' -- check by looking for files in library path
5392 # which responds to the $file_magic_cmd with a given extended regex.
5393 # If you have `file' or equivalent on your system and you're not sure
5394 # whether `pass_all' will *always* work, you probably want this one.
5395
5396 case $host_os in
5397 aix4* | aix5*)
5398   lt_cv_deplibs_check_method=pass_all
5399   ;;
5400
5401 beos*)
5402   lt_cv_deplibs_check_method=pass_all
5403   ;;
5404
5405 bsdi[45]*)
5406   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5407   lt_cv_file_magic_cmd='/usr/bin/file -L'
5408   lt_cv_file_magic_test_file=/shlib/libc.so
5409   ;;
5410
5411 cygwin*)
5412   # func_win32_libid is a shell function defined in ltmain.sh
5413   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5414   lt_cv_file_magic_cmd='func_win32_libid'
5415   ;;
5416
5417 mingw* | pw32*)
5418   # Base MSYS/MinGW do not provide the 'file' command needed by
5419   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5420   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5421   lt_cv_file_magic_cmd='$OBJDUMP -f'
5422   ;;
5423
5424 darwin* | rhapsody*)
5425   lt_cv_deplibs_check_method=pass_all
5426   ;;
5427
5428 freebsd* | kfreebsd*-gnu | dragonfly*)
5429   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5430     case $host_cpu in
5431     i*86 )
5432       # Not sure whether the presence of OpenBSD here was a mistake.
5433       # Let's accept both of them until this is cleared up.
5434       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5435       lt_cv_file_magic_cmd=/usr/bin/file
5436       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5437       ;;
5438     esac
5439   else
5440     lt_cv_deplibs_check_method=pass_all
5441   fi
5442   ;;
5443
5444 gnu*)
5445   lt_cv_deplibs_check_method=pass_all
5446   ;;
5447
5448 hpux10.20* | hpux11*)
5449   lt_cv_file_magic_cmd=/usr/bin/file
5450   case $host_cpu in
5451   ia64*)
5452     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5453     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5454     ;;
5455   hppa*64*)
5456     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]'
5457     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5458     ;;
5459   *)
5460     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5461     lt_cv_file_magic_test_file=/usr/lib/libc.sl
5462     ;;
5463   esac
5464   ;;
5465
5466 irix5* | irix6* | nonstopux*)
5467   case $LD in
5468   *-32|*"-32 ") libmagic=32-bit;;
5469   *-n32|*"-n32 ") libmagic=N32;;
5470   *-64|*"-64 ") libmagic=64-bit;;
5471   *) libmagic=never-match;;
5472   esac
5473   lt_cv_deplibs_check_method=pass_all
5474   ;;
5475
5476 # This must be Linux ELF.
5477 linux*)
5478   lt_cv_deplibs_check_method=pass_all
5479   ;;
5480
5481 netbsd*)
5482   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5483     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5484   else
5485     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5486   fi
5487   ;;
5488
5489 newos6*)
5490   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5491   lt_cv_file_magic_cmd=/usr/bin/file
5492   lt_cv_file_magic_test_file=/usr/lib/libnls.so
5493   ;;
5494
5495 nto-qnx*)
5496   lt_cv_deplibs_check_method=unknown
5497   ;;
5498
5499 openbsd*)
5500   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5501     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5502   else
5503     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5504   fi
5505   ;;
5506
5507 osf3* | osf4* | osf5*)
5508   lt_cv_deplibs_check_method=pass_all
5509   ;;
5510
5511 sco3.2v5*)
5512   lt_cv_deplibs_check_method=pass_all
5513   ;;
5514
5515 solaris*)
5516   lt_cv_deplibs_check_method=pass_all
5517   ;;
5518
5519 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5520   case $host_vendor in
5521   motorola)
5522     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]'
5523     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5524     ;;
5525   ncr)
5526     lt_cv_deplibs_check_method=pass_all
5527     ;;
5528   sequent)
5529     lt_cv_file_magic_cmd='/bin/file'
5530     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5531     ;;
5532   sni)
5533     lt_cv_file_magic_cmd='/bin/file'
5534     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5535     lt_cv_file_magic_test_file=/lib/libc.so
5536     ;;
5537   siemens)
5538     lt_cv_deplibs_check_method=pass_all
5539     ;;
5540   esac
5541   ;;
5542
5543 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
5544   lt_cv_deplibs_check_method=pass_all
5545   ;;
5546 esac
5547
5548 fi
5549 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5550 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5551 file_magic_cmd=$lt_cv_file_magic_cmd
5552 deplibs_check_method=$lt_cv_deplibs_check_method
5553 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5554
5555
5556
5557
5558 # If no C compiler was specified, use CC.
5559 LTCC=${LTCC-"$CC"}
5560
5561 # Allow CC to be a program name with arguments.
5562 compiler=$CC
5563
5564
5565 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
5566 if test "${enable_libtool_lock+set}" = set; then
5567   enableval="$enable_libtool_lock"
5568
5569 fi;
5570 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5571
5572 # Some flags need to be propagated to the compiler or linker for good
5573 # libtool support.
5574 case $host in
5575 ia64-*-hpux*)
5576   # Find out which ABI we are using.
5577   echo 'int i;' > conftest.$ac_ext
5578   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5579   (eval $ac_compile) 2>&5
5580   ac_status=$?
5581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582   (exit $ac_status); }; then
5583     case `/usr/bin/file conftest.$ac_objext` in
5584     *ELF-32*)
5585       HPUX_IA64_MODE="32"
5586       ;;
5587     *ELF-64*)
5588       HPUX_IA64_MODE="64"
5589       ;;
5590     esac
5591   fi
5592   rm -rf conftest*
5593   ;;
5594 *-*-irix6*)
5595   # Find out which ABI we are using.
5596   echo '#line 5596 "configure"' > conftest.$ac_ext
5597   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5598   (eval $ac_compile) 2>&5
5599   ac_status=$?
5600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601   (exit $ac_status); }; then
5602    if test "$lt_cv_prog_gnu_ld" = yes; then
5603     case `/usr/bin/file conftest.$ac_objext` in
5604     *32-bit*)
5605       LD="${LD-ld} -melf32bsmip"
5606       ;;
5607     *N32*)
5608       LD="${LD-ld} -melf32bmipn32"
5609       ;;
5610     *64-bit*)
5611       LD="${LD-ld} -melf64bmip"
5612       ;;
5613     esac
5614    else
5615     case `/usr/bin/file conftest.$ac_objext` in
5616     *32-bit*)
5617       LD="${LD-ld} -32"
5618       ;;
5619     *N32*)
5620       LD="${LD-ld} -n32"
5621       ;;
5622     *64-bit*)
5623       LD="${LD-ld} -64"
5624       ;;
5625     esac
5626    fi
5627   fi
5628   rm -rf conftest*
5629   ;;
5630
5631 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
5632   # Find out which ABI we are using.
5633   echo 'int i;' > conftest.$ac_ext
5634   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5635   (eval $ac_compile) 2>&5
5636   ac_status=$?
5637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5638   (exit $ac_status); }; then
5639     case `/usr/bin/file conftest.o` in
5640     *32-bit*)
5641       case $host in
5642         x86_64-*linux*)
5643           LD="${LD-ld} -m elf_i386"
5644           ;;
5645         ppc64-*linux*|powerpc64-*linux*)
5646           LD="${LD-ld} -m elf32ppclinux"
5647           ;;
5648         s390x-*linux*)
5649           LD="${LD-ld} -m elf_s390"
5650           ;;
5651         sparc64-*linux*)
5652           LD="${LD-ld} -m elf32_sparc"
5653           ;;
5654       esac
5655       ;;
5656     *64-bit*)
5657       case $host in
5658         x86_64-*linux*)
5659           LD="${LD-ld} -m elf_x86_64"
5660           ;;
5661         ppc*-*linux*|powerpc*-*linux*)
5662           LD="${LD-ld} -m elf64ppc"
5663           ;;
5664         s390*-*linux*)
5665           LD="${LD-ld} -m elf64_s390"
5666           ;;
5667         sparc*-*linux*)
5668           LD="${LD-ld} -m elf64_sparc"
5669           ;;
5670       esac
5671       ;;
5672     esac
5673   fi
5674   rm -rf conftest*
5675   ;;
5676
5677 *-*-sco3.2v5*)
5678   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5679   SAVE_CFLAGS="$CFLAGS"
5680   CFLAGS="$CFLAGS -belf"
5681   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5682 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
5683 if test "${lt_cv_cc_needs_belf+set}" = set; then
5684   echo $ECHO_N "(cached) $ECHO_C" >&6
5685 else
5686   ac_ext=c
5687 ac_cpp='$CPP $CPPFLAGS'
5688 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5689 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5690 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5691
5692      cat >conftest.$ac_ext <<_ACEOF
5693 /* confdefs.h.  */
5694 _ACEOF
5695 cat confdefs.h >>conftest.$ac_ext
5696 cat >>conftest.$ac_ext <<_ACEOF
5697 /* end confdefs.h.  */
5698
5699 int
5700 main ()
5701 {
5702
5703   ;
5704   return 0;
5705 }
5706 _ACEOF
5707 rm -f conftest.$ac_objext conftest$ac_exeext
5708 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5709   (eval $ac_link) 2>conftest.er1
5710   ac_status=$?
5711   grep -v '^ *+' conftest.er1 >conftest.err
5712   rm -f conftest.er1
5713   cat conftest.err >&5
5714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5715   (exit $ac_status); } &&
5716          { ac_try='test -z "$ac_c_werror_flag"
5717                          || test ! -s conftest.err'
5718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5719   (eval $ac_try) 2>&5
5720   ac_status=$?
5721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5722   (exit $ac_status); }; } &&
5723          { ac_try='test -s conftest$ac_exeext'
5724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5725   (eval $ac_try) 2>&5
5726   ac_status=$?
5727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5728   (exit $ac_status); }; }; then
5729   lt_cv_cc_needs_belf=yes
5730 else
5731   echo "$as_me: failed program was:" >&5
5732 sed 's/^/| /' conftest.$ac_ext >&5
5733
5734 lt_cv_cc_needs_belf=no
5735 fi
5736 rm -f conftest.err conftest.$ac_objext \
5737       conftest$ac_exeext conftest.$ac_ext
5738      ac_ext=c
5739 ac_cpp='$CPP $CPPFLAGS'
5740 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5741 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5742 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5743
5744 fi
5745 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5746 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
5747   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5748     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5749     CFLAGS="$SAVE_CFLAGS"
5750   fi
5751   ;;
5752 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
5753   if test -n "$ac_tool_prefix"; then
5754   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5755 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
5756 echo "$as_me:$LINENO: checking for $ac_word" >&5
5757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5758 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
5759   echo $ECHO_N "(cached) $ECHO_C" >&6
5760 else
5761   if test -n "$DLLTOOL"; then
5762   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
5763 else
5764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5765 for as_dir in $PATH
5766 do
5767   IFS=$as_save_IFS
5768   test -z "$as_dir" && as_dir=.
5769   for ac_exec_ext in '' $ac_executable_extensions; do
5770   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5771     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
5772     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5773     break 2
5774   fi
5775 done
5776 done
5777
5778 fi
5779 fi
5780 DLLTOOL=$ac_cv_prog_DLLTOOL
5781 if test -n "$DLLTOOL"; then
5782   echo "$as_me:$LINENO: result: $DLLTOOL" >&5
5783 echo "${ECHO_T}$DLLTOOL" >&6
5784 else
5785   echo "$as_me:$LINENO: result: no" >&5
5786 echo "${ECHO_T}no" >&6
5787 fi
5788
5789 fi
5790 if test -z "$ac_cv_prog_DLLTOOL"; then
5791   ac_ct_DLLTOOL=$DLLTOOL
5792   # Extract the first word of "dlltool", so it can be a program name with args.
5793 set dummy dlltool; ac_word=$2
5794 echo "$as_me:$LINENO: checking for $ac_word" >&5
5795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5796 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
5797   echo $ECHO_N "(cached) $ECHO_C" >&6
5798 else
5799   if test -n "$ac_ct_DLLTOOL"; then
5800   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
5801 else
5802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803 for as_dir in $PATH
5804 do
5805   IFS=$as_save_IFS
5806   test -z "$as_dir" && as_dir=.
5807   for ac_exec_ext in '' $ac_executable_extensions; do
5808   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
5810     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5811     break 2
5812   fi
5813 done
5814 done
5815
5816   test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false"
5817 fi
5818 fi
5819 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5820 if test -n "$ac_ct_DLLTOOL"; then
5821   echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
5822 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
5823 else
5824   echo "$as_me:$LINENO: result: no" >&5
5825 echo "${ECHO_T}no" >&6
5826 fi
5827
5828   DLLTOOL=$ac_ct_DLLTOOL
5829 else
5830   DLLTOOL="$ac_cv_prog_DLLTOOL"
5831 fi
5832
5833   if test -n "$ac_tool_prefix"; then
5834   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
5835 set dummy ${ac_tool_prefix}as; 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_AS+set}" = set; then
5839   echo $ECHO_N "(cached) $ECHO_C" >&6
5840 else
5841   if test -n "$AS"; then
5842   ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
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 fi
5859 fi
5860 AS=$ac_cv_prog_AS
5861 if test -n "$AS"; then
5862   echo "$as_me:$LINENO: result: $AS" >&5
5863 echo "${ECHO_T}$AS" >&6
5864 else
5865   echo "$as_me:$LINENO: result: no" >&5
5866 echo "${ECHO_T}no" >&6
5867 fi
5868
5869 fi
5870 if test -z "$ac_cv_prog_AS"; then
5871   ac_ct_AS=$AS
5872   # Extract the first word of "as", so it can be a program name with args.
5873 set dummy as; ac_word=$2
5874 echo "$as_me:$LINENO: checking for $ac_word" >&5
5875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5876 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
5877   echo $ECHO_N "(cached) $ECHO_C" >&6
5878 else
5879   if test -n "$ac_ct_AS"; then
5880   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
5881 else
5882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5883 for as_dir in $PATH
5884 do
5885   IFS=$as_save_IFS
5886   test -z "$as_dir" && as_dir=.
5887   for ac_exec_ext in '' $ac_executable_extensions; do
5888   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5889     ac_cv_prog_ac_ct_AS="as"
5890     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5891     break 2
5892   fi
5893 done
5894 done
5895
5896   test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false"
5897 fi
5898 fi
5899 ac_ct_AS=$ac_cv_prog_ac_ct_AS
5900 if test -n "$ac_ct_AS"; then
5901   echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
5902 echo "${ECHO_T}$ac_ct_AS" >&6
5903 else
5904   echo "$as_me:$LINENO: result: no" >&5
5905 echo "${ECHO_T}no" >&6
5906 fi
5907
5908   AS=$ac_ct_AS
5909 else
5910   AS="$ac_cv_prog_AS"
5911 fi
5912
5913   if test -n "$ac_tool_prefix"; then
5914   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5915 set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+set}" = set; then
5919   echo $ECHO_N "(cached) $ECHO_C" >&6
5920 else
5921   if test -n "$OBJDUMP"; then
5922   ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
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 fi
5939 fi
5940 OBJDUMP=$ac_cv_prog_OBJDUMP
5941 if test -n "$OBJDUMP"; then
5942   echo "$as_me:$LINENO: result: $OBJDUMP" >&5
5943 echo "${ECHO_T}$OBJDUMP" >&6
5944 else
5945   echo "$as_me:$LINENO: result: no" >&5
5946 echo "${ECHO_T}no" >&6
5947 fi
5948
5949 fi
5950 if test -z "$ac_cv_prog_OBJDUMP"; then
5951   ac_ct_OBJDUMP=$OBJDUMP
5952   # Extract the first word of "objdump", so it can be a program name with args.
5953 set dummy objdump; ac_word=$2
5954 echo "$as_me:$LINENO: checking for $ac_word" >&5
5955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5956 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
5957   echo $ECHO_N "(cached) $ECHO_C" >&6
5958 else
5959   if test -n "$ac_ct_OBJDUMP"; then
5960   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5961 else
5962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963 for as_dir in $PATH
5964 do
5965   IFS=$as_save_IFS
5966   test -z "$as_dir" && as_dir=.
5967   for ac_exec_ext in '' $ac_executable_extensions; do
5968   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969     ac_cv_prog_ac_ct_OBJDUMP="objdump"
5970     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5971     break 2
5972   fi
5973 done
5974 done
5975
5976   test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false"
5977 fi
5978 fi
5979 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5980 if test -n "$ac_ct_OBJDUMP"; then
5981   echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
5982 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6
5983 else
5984   echo "$as_me:$LINENO: result: no" >&5
5985 echo "${ECHO_T}no" >&6
5986 fi
5987
5988   OBJDUMP=$ac_ct_OBJDUMP
5989 else
5990   OBJDUMP="$ac_cv_prog_OBJDUMP"
5991 fi
5992
5993   ;;
5994
5995 esac
5996
5997 need_locks="$enable_libtool_lock"
5998
5999
6000 ac_ext=c
6001 ac_cpp='$CPP $CPPFLAGS'
6002 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6003 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6004 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6005 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6006 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
6007 # On Suns, sometimes $CPP names a directory.
6008 if test -n "$CPP" && test -d "$CPP"; then
6009   CPP=
6010 fi
6011 if test -z "$CPP"; then
6012   if test "${ac_cv_prog_CPP+set}" = set; then
6013   echo $ECHO_N "(cached) $ECHO_C" >&6
6014 else
6015       # Double quotes because CPP needs to be expanded
6016     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6017     do
6018       ac_preproc_ok=false
6019 for ac_c_preproc_warn_flag in '' yes
6020 do
6021   # Use a header file that comes with gcc, so configuring glibc
6022   # with a fresh cross-compiler works.
6023   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6024   # <limits.h> exists even on freestanding compilers.
6025   # On the NeXT, cc -E runs the code through the compiler's parser,
6026   # not just through cpp. "Syntax error" is here to catch this case.
6027   cat >conftest.$ac_ext <<_ACEOF
6028 /* confdefs.h.  */
6029 _ACEOF
6030 cat confdefs.h >>conftest.$ac_ext
6031 cat >>conftest.$ac_ext <<_ACEOF
6032 /* end confdefs.h.  */
6033 #ifdef __STDC__
6034 # include <limits.h>
6035 #else
6036 # include <assert.h>
6037 #endif
6038                      Syntax error
6039 _ACEOF
6040 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6041   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6042   ac_status=$?
6043   grep -v '^ *+' conftest.er1 >conftest.err
6044   rm -f conftest.er1
6045   cat conftest.err >&5
6046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047   (exit $ac_status); } >/dev/null; then
6048   if test -s conftest.err; then
6049     ac_cpp_err=$ac_c_preproc_warn_flag
6050     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6051   else
6052     ac_cpp_err=
6053   fi
6054 else
6055   ac_cpp_err=yes
6056 fi
6057 if test -z "$ac_cpp_err"; then
6058   :
6059 else
6060   echo "$as_me: failed program was:" >&5
6061 sed 's/^/| /' conftest.$ac_ext >&5
6062
6063   # Broken: fails on valid input.
6064 continue
6065 fi
6066 rm -f conftest.err conftest.$ac_ext
6067
6068   # OK, works on sane cases.  Now check whether non-existent headers
6069   # can be detected and how.
6070   cat >conftest.$ac_ext <<_ACEOF
6071 /* confdefs.h.  */
6072 _ACEOF
6073 cat confdefs.h >>conftest.$ac_ext
6074 cat >>conftest.$ac_ext <<_ACEOF
6075 /* end confdefs.h.  */
6076 #include <ac_nonexistent.h>
6077 _ACEOF
6078 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6079   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6080   ac_status=$?
6081   grep -v '^ *+' conftest.er1 >conftest.err
6082   rm -f conftest.er1
6083   cat conftest.err >&5
6084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085   (exit $ac_status); } >/dev/null; then
6086   if test -s conftest.err; then
6087     ac_cpp_err=$ac_c_preproc_warn_flag
6088     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6089   else
6090     ac_cpp_err=
6091   fi
6092 else
6093   ac_cpp_err=yes
6094 fi
6095 if test -z "$ac_cpp_err"; then
6096   # Broken: success on invalid input.
6097 continue
6098 else
6099   echo "$as_me: failed program was:" >&5
6100 sed 's/^/| /' conftest.$ac_ext >&5
6101
6102   # Passes both tests.
6103 ac_preproc_ok=:
6104 break
6105 fi
6106 rm -f conftest.err conftest.$ac_ext
6107
6108 done
6109 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6110 rm -f conftest.err conftest.$ac_ext
6111 if $ac_preproc_ok; then
6112   break
6113 fi
6114
6115     done
6116     ac_cv_prog_CPP=$CPP
6117
6118 fi
6119   CPP=$ac_cv_prog_CPP
6120 else
6121   ac_cv_prog_CPP=$CPP
6122 fi
6123 echo "$as_me:$LINENO: result: $CPP" >&5
6124 echo "${ECHO_T}$CPP" >&6
6125 ac_preproc_ok=false
6126 for ac_c_preproc_warn_flag in '' yes
6127 do
6128   # Use a header file that comes with gcc, so configuring glibc
6129   # with a fresh cross-compiler works.
6130   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6131   # <limits.h> exists even on freestanding compilers.
6132   # On the NeXT, cc -E runs the code through the compiler's parser,
6133   # not just through cpp. "Syntax error" is here to catch this case.
6134   cat >conftest.$ac_ext <<_ACEOF
6135 /* confdefs.h.  */
6136 _ACEOF
6137 cat confdefs.h >>conftest.$ac_ext
6138 cat >>conftest.$ac_ext <<_ACEOF
6139 /* end confdefs.h.  */
6140 #ifdef __STDC__
6141 # include <limits.h>
6142 #else
6143 # include <assert.h>
6144 #endif
6145                      Syntax error
6146 _ACEOF
6147 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6148   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6149   ac_status=$?
6150   grep -v '^ *+' conftest.er1 >conftest.err
6151   rm -f conftest.er1
6152   cat conftest.err >&5
6153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154   (exit $ac_status); } >/dev/null; then
6155   if test -s conftest.err; then
6156     ac_cpp_err=$ac_c_preproc_warn_flag
6157     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6158   else
6159     ac_cpp_err=
6160   fi
6161 else
6162   ac_cpp_err=yes
6163 fi
6164 if test -z "$ac_cpp_err"; then
6165   :
6166 else
6167   echo "$as_me: failed program was:" >&5
6168 sed 's/^/| /' conftest.$ac_ext >&5
6169
6170   # Broken: fails on valid input.
6171 continue
6172 fi
6173 rm -f conftest.err conftest.$ac_ext
6174
6175   # OK, works on sane cases.  Now check whether non-existent headers
6176   # can be detected and how.
6177   cat >conftest.$ac_ext <<_ACEOF
6178 /* confdefs.h.  */
6179 _ACEOF
6180 cat confdefs.h >>conftest.$ac_ext
6181 cat >>conftest.$ac_ext <<_ACEOF
6182 /* end confdefs.h.  */
6183 #include <ac_nonexistent.h>
6184 _ACEOF
6185 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6187   ac_status=$?
6188   grep -v '^ *+' conftest.er1 >conftest.err
6189   rm -f conftest.er1
6190   cat conftest.err >&5
6191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192   (exit $ac_status); } >/dev/null; then
6193   if test -s conftest.err; then
6194     ac_cpp_err=$ac_c_preproc_warn_flag
6195     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6196   else
6197     ac_cpp_err=
6198   fi
6199 else
6200   ac_cpp_err=yes
6201 fi
6202 if test -z "$ac_cpp_err"; then
6203   # Broken: success on invalid input.
6204 continue
6205 else
6206   echo "$as_me: failed program was:" >&5
6207 sed 's/^/| /' conftest.$ac_ext >&5
6208
6209   # Passes both tests.
6210 ac_preproc_ok=:
6211 break
6212 fi
6213 rm -f conftest.err conftest.$ac_ext
6214
6215 done
6216 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6217 rm -f conftest.err conftest.$ac_ext
6218 if $ac_preproc_ok; then
6219   :
6220 else
6221   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
6222 See \`config.log' for more details." >&5
6223 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
6224 See \`config.log' for more details." >&2;}
6225    { (exit 1); exit 1; }; }
6226 fi
6227
6228 ac_ext=c
6229 ac_cpp='$CPP $CPPFLAGS'
6230 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6231 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6232 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6233
6234
6235 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6236 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6237 if test "${ac_cv_header_stdc+set}" = set; then
6238   echo $ECHO_N "(cached) $ECHO_C" >&6
6239 else
6240   cat >conftest.$ac_ext <<_ACEOF
6241 /* confdefs.h.  */
6242 _ACEOF
6243 cat confdefs.h >>conftest.$ac_ext
6244 cat >>conftest.$ac_ext <<_ACEOF
6245 /* end confdefs.h.  */
6246 #include <stdlib.h>
6247 #include <stdarg.h>
6248 #include <string.h>
6249 #include <float.h>
6250
6251 int
6252 main ()
6253 {
6254
6255   ;
6256   return 0;
6257 }
6258 _ACEOF
6259 rm -f conftest.$ac_objext
6260 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6261   (eval $ac_compile) 2>conftest.er1
6262   ac_status=$?
6263   grep -v '^ *+' conftest.er1 >conftest.err
6264   rm -f conftest.er1
6265   cat conftest.err >&5
6266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267   (exit $ac_status); } &&
6268          { ac_try='test -z "$ac_c_werror_flag"
6269                          || test ! -s conftest.err'
6270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271   (eval $ac_try) 2>&5
6272   ac_status=$?
6273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274   (exit $ac_status); }; } &&
6275          { ac_try='test -s conftest.$ac_objext'
6276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   ac_cv_header_stdc=yes
6282 else
6283   echo "$as_me: failed program was:" >&5
6284 sed 's/^/| /' conftest.$ac_ext >&5
6285
6286 ac_cv_header_stdc=no
6287 fi
6288 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6289
6290 if test $ac_cv_header_stdc = yes; then
6291   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6292   cat >conftest.$ac_ext <<_ACEOF
6293 /* confdefs.h.  */
6294 _ACEOF
6295 cat confdefs.h >>conftest.$ac_ext
6296 cat >>conftest.$ac_ext <<_ACEOF
6297 /* end confdefs.h.  */
6298 #include <string.h>
6299
6300 _ACEOF
6301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6302   $EGREP "memchr" >/dev/null 2>&1; then
6303   :
6304 else
6305   ac_cv_header_stdc=no
6306 fi
6307 rm -f conftest*
6308
6309 fi
6310
6311 if test $ac_cv_header_stdc = yes; then
6312   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6313   cat >conftest.$ac_ext <<_ACEOF
6314 /* confdefs.h.  */
6315 _ACEOF
6316 cat confdefs.h >>conftest.$ac_ext
6317 cat >>conftest.$ac_ext <<_ACEOF
6318 /* end confdefs.h.  */
6319 #include <stdlib.h>
6320
6321 _ACEOF
6322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6323   $EGREP "free" >/dev/null 2>&1; then
6324   :
6325 else
6326   ac_cv_header_stdc=no
6327 fi
6328 rm -f conftest*
6329
6330 fi
6331
6332 if test $ac_cv_header_stdc = yes; then
6333   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6334   if test "$cross_compiling" = yes; then
6335   :
6336 else
6337   cat >conftest.$ac_ext <<_ACEOF
6338 /* confdefs.h.  */
6339 _ACEOF
6340 cat confdefs.h >>conftest.$ac_ext
6341 cat >>conftest.$ac_ext <<_ACEOF
6342 /* end confdefs.h.  */
6343 #include <ctype.h>
6344 #if ((' ' & 0x0FF) == 0x020)
6345 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6346 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6347 #else
6348 # define ISLOWER(c) \
6349                    (('a' <= (c) && (c) <= 'i') \
6350                      || ('j' <= (c) && (c) <= 'r') \
6351                      || ('s' <= (c) && (c) <= 'z'))
6352 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6353 #endif
6354
6355 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6356 int
6357 main ()
6358 {
6359   int i;
6360   for (i = 0; i < 256; i++)
6361     if (XOR (islower (i), ISLOWER (i))
6362         || toupper (i) != TOUPPER (i))
6363       exit(2);
6364   exit (0);
6365 }
6366 _ACEOF
6367 rm -f conftest$ac_exeext
6368 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6369   (eval $ac_link) 2>&5
6370   ac_status=$?
6371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6374   (eval $ac_try) 2>&5
6375   ac_status=$?
6376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6377   (exit $ac_status); }; }; then
6378   :
6379 else
6380   echo "$as_me: program exited with status $ac_status" >&5
6381 echo "$as_me: failed program was:" >&5
6382 sed 's/^/| /' conftest.$ac_ext >&5
6383
6384 ( exit $ac_status )
6385 ac_cv_header_stdc=no
6386 fi
6387 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6388 fi
6389 fi
6390 fi
6391 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6392 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6393 if test $ac_cv_header_stdc = yes; then
6394
6395 cat >>confdefs.h <<\_ACEOF
6396 #define STDC_HEADERS 1
6397 _ACEOF
6398
6399 fi
6400
6401 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6412                   inttypes.h stdint.h unistd.h
6413 do
6414 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6415 echo "$as_me:$LINENO: checking for $ac_header" >&5
6416 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6417 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6418   echo $ECHO_N "(cached) $ECHO_C" >&6
6419 else
6420   cat >conftest.$ac_ext <<_ACEOF
6421 /* confdefs.h.  */
6422 _ACEOF
6423 cat confdefs.h >>conftest.$ac_ext
6424 cat >>conftest.$ac_ext <<_ACEOF
6425 /* end confdefs.h.  */
6426 $ac_includes_default
6427
6428 #include <$ac_header>
6429 _ACEOF
6430 rm -f conftest.$ac_objext
6431 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6432   (eval $ac_compile) 2>conftest.er1
6433   ac_status=$?
6434   grep -v '^ *+' conftest.er1 >conftest.err
6435   rm -f conftest.er1
6436   cat conftest.err >&5
6437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438   (exit $ac_status); } &&
6439          { ac_try='test -z "$ac_c_werror_flag"
6440                          || test ! -s conftest.err'
6441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445   (exit $ac_status); }; } &&
6446          { ac_try='test -s conftest.$ac_objext'
6447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6448   (eval $ac_try) 2>&5
6449   ac_status=$?
6450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6451   (exit $ac_status); }; }; then
6452   eval "$as_ac_Header=yes"
6453 else
6454   echo "$as_me: failed program was:" >&5
6455 sed 's/^/| /' conftest.$ac_ext >&5
6456
6457 eval "$as_ac_Header=no"
6458 fi
6459 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6460 fi
6461 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6462 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6463 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6464   cat >>confdefs.h <<_ACEOF
6465 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6466 _ACEOF
6467
6468 fi
6469
6470 done
6471
6472
6473
6474 for ac_header in dlfcn.h
6475 do
6476 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6477 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6478   echo "$as_me:$LINENO: checking for $ac_header" >&5
6479 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6480 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6481   echo $ECHO_N "(cached) $ECHO_C" >&6
6482 fi
6483 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6484 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6485 else
6486   # Is the header compilable?
6487 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6488 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6489 cat >conftest.$ac_ext <<_ACEOF
6490 /* confdefs.h.  */
6491 _ACEOF
6492 cat confdefs.h >>conftest.$ac_ext
6493 cat >>conftest.$ac_ext <<_ACEOF
6494 /* end confdefs.h.  */
6495 $ac_includes_default
6496 #include <$ac_header>
6497 _ACEOF
6498 rm -f conftest.$ac_objext
6499 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6500   (eval $ac_compile) 2>conftest.er1
6501   ac_status=$?
6502   grep -v '^ *+' conftest.er1 >conftest.err
6503   rm -f conftest.er1
6504   cat conftest.err >&5
6505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6506   (exit $ac_status); } &&
6507          { ac_try='test -z "$ac_c_werror_flag"
6508                          || test ! -s conftest.err'
6509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6510   (eval $ac_try) 2>&5
6511   ac_status=$?
6512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6513   (exit $ac_status); }; } &&
6514          { ac_try='test -s conftest.$ac_objext'
6515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6516   (eval $ac_try) 2>&5
6517   ac_status=$?
6518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519   (exit $ac_status); }; }; then
6520   ac_header_compiler=yes
6521 else
6522   echo "$as_me: failed program was:" >&5
6523 sed 's/^/| /' conftest.$ac_ext >&5
6524
6525 ac_header_compiler=no
6526 fi
6527 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6528 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6529 echo "${ECHO_T}$ac_header_compiler" >&6
6530
6531 # Is the header present?
6532 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6533 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6534 cat >conftest.$ac_ext <<_ACEOF
6535 /* confdefs.h.  */
6536 _ACEOF
6537 cat confdefs.h >>conftest.$ac_ext
6538 cat >>conftest.$ac_ext <<_ACEOF
6539 /* end confdefs.h.  */
6540 #include <$ac_header>
6541 _ACEOF
6542 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6544   ac_status=$?
6545   grep -v '^ *+' conftest.er1 >conftest.err
6546   rm -f conftest.er1
6547   cat conftest.err >&5
6548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549   (exit $ac_status); } >/dev/null; then
6550   if test -s conftest.err; then
6551     ac_cpp_err=$ac_c_preproc_warn_flag
6552     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6553   else
6554     ac_cpp_err=
6555   fi
6556 else
6557   ac_cpp_err=yes
6558 fi
6559 if test -z "$ac_cpp_err"; then
6560   ac_header_preproc=yes
6561 else
6562   echo "$as_me: failed program was:" >&5
6563 sed 's/^/| /' conftest.$ac_ext >&5
6564
6565   ac_header_preproc=no
6566 fi
6567 rm -f conftest.err conftest.$ac_ext
6568 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6569 echo "${ECHO_T}$ac_header_preproc" >&6
6570
6571 # So?  What about this header?
6572 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6573   yes:no: )
6574     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6575 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6576     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6577 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6578     ac_header_preproc=yes
6579     ;;
6580   no:yes:* )
6581     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6582 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6583     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6584 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6585     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6586 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6587     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6588 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6589     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6590 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6591     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6592 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6593     (
6594       cat <<\_ASBOX
6595 ## --------------------------------------------- ##
6596 ## Report this to <http://www.openldap.org/its/> ##
6597 ## --------------------------------------------- ##
6598 _ASBOX
6599     ) |
6600       sed "s/^/$as_me: WARNING:     /" >&2
6601     ;;
6602 esac
6603 echo "$as_me:$LINENO: checking for $ac_header" >&5
6604 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6605 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6606   echo $ECHO_N "(cached) $ECHO_C" >&6
6607 else
6608   eval "$as_ac_Header=\$ac_header_preproc"
6609 fi
6610 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6612
6613 fi
6614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6615   cat >>confdefs.h <<_ACEOF
6616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6617 _ACEOF
6618
6619 fi
6620
6621 done
6622
6623
6624 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6625
6626 # find the maximum length of command line arguments
6627 echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6628 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
6629 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6630   echo $ECHO_N "(cached) $ECHO_C" >&6
6631 else
6632     i=0
6633   teststring="ABCD"
6634
6635   case $build_os in
6636   msdosdjgpp*)
6637     # On DJGPP, this test can blow up pretty badly due to problems in libc
6638     # (any single argument exceeding 2000 bytes causes a buffer overrun
6639     # during glob expansion).  Even if it were fixed, the result of this
6640     # check would be larger than it should be.
6641     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
6642     ;;
6643
6644   gnu*)
6645     # Under GNU Hurd, this test is not required because there is
6646     # no limit to the length of command line arguments.
6647     # Libtool will interpret -1 as no limit whatsoever
6648     lt_cv_sys_max_cmd_len=-1;
6649     ;;
6650
6651   cygwin* | mingw*)
6652     # On Win9x/ME, this test blows up -- it succeeds, but takes
6653     # about 5 minutes as the teststring grows exponentially.
6654     # Worse, since 9x/ME are not pre-emptively multitasking,
6655     # you end up with a "frozen" computer, even though with patience
6656     # the test eventually succeeds (with a max line length of 256k).
6657     # Instead, let's just punt: use the minimum linelength reported by
6658     # all of the supported platforms: 8192 (on NT/2K/XP).
6659     lt_cv_sys_max_cmd_len=8192;
6660     ;;
6661
6662   amigaos*)
6663     # On AmigaOS with pdksh, this test takes hours, literally.
6664     # So we just punt and use a minimum line length of 8192.
6665     lt_cv_sys_max_cmd_len=8192;
6666     ;;
6667
6668   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6669     # This has been around since 386BSD, at least.  Likely further.
6670     if test -x /sbin/sysctl; then
6671       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6672     elif test -x /usr/sbin/sysctl; then
6673       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6674     else
6675       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
6676     fi
6677     # And add a safety zone
6678     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6679     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6680     ;;
6681   osf*)
6682     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6683     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6684     # nice to cause kernel panics so lets avoid the loop below.
6685     # First set a reasonable default.
6686     lt_cv_sys_max_cmd_len=16384
6687     #
6688     if test -x /sbin/sysconfig; then
6689       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6690         *1*) lt_cv_sys_max_cmd_len=-1 ;;
6691       esac
6692     fi
6693     ;;
6694   *)
6695     # If test is not a shell built-in, we'll probably end up computing a
6696     # maximum length that is only half of the actual maximum length, but
6697     # we can't tell.
6698     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6699     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6700                = "XX$teststring") >/dev/null 2>&1 &&
6701             new_result=`expr "X$teststring" : ".*" 2>&1` &&
6702             lt_cv_sys_max_cmd_len=$new_result &&
6703             test $i != 17 # 1/2 MB should be enough
6704     do
6705       i=`expr $i + 1`
6706       teststring=$teststring$teststring
6707     done
6708     teststring=
6709     # Add a significant safety factor because C++ compilers can tack on massive
6710     # amounts of additional arguments before passing them to the linker.
6711     # It appears as though 1/2 is a usable value.
6712     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6713     ;;
6714   esac
6715
6716 fi
6717
6718 if test -n $lt_cv_sys_max_cmd_len ; then
6719   echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6720 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
6721 else
6722   echo "$as_me:$LINENO: result: none" >&5
6723 echo "${ECHO_T}none" >&6
6724 fi
6725
6726
6727
6728
6729 # Check for command to grab the raw symbol name followed by C symbol from nm.
6730 echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6731 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
6732 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6733   echo $ECHO_N "(cached) $ECHO_C" >&6
6734 else
6735
6736 # These are sane defaults that work on at least a few old systems.
6737 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6738
6739 # Character class describing NM global symbol codes.
6740 symcode='[BCDEGRST]'
6741
6742 # Regexp to match symbols that can be accessed directly from C.
6743 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6744
6745 # Transform an extracted symbol line into a proper C declaration
6746 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6747
6748 # Transform an extracted symbol line into symbol name and symbol address
6749 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'"
6750
6751 # Define system-specific variables.
6752 case $host_os in
6753 aix*)
6754   symcode='[BCDT]'
6755   ;;
6756 cygwin* | mingw* | pw32*)
6757   symcode='[ABCDGISTW]'
6758   ;;
6759 hpux*) # Its linker distinguishes data from code symbols
6760   if test "$host_cpu" = ia64; then
6761     symcode='[ABCDEGRST]'
6762   fi
6763   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6764   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'"
6765   ;;
6766 linux*)
6767   if test "$host_cpu" = ia64; then
6768     symcode='[ABCDGIRSTW]'
6769     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6770     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'"
6771   fi
6772   ;;
6773 irix* | nonstopux*)
6774   symcode='[BCDEGRST]'
6775   ;;
6776 osf*)
6777   symcode='[BCDEGQRST]'
6778   ;;
6779 solaris* | sysv5*)
6780   symcode='[BDRT]'
6781   ;;
6782 sysv4)
6783   symcode='[DFNSTU]'
6784   ;;
6785 esac
6786
6787 # Handle CRLF in mingw tool chain
6788 opt_cr=
6789 case $build_os in
6790 mingw*)
6791   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6792   ;;
6793 esac
6794
6795 # If we're using GNU nm, then use its standard symbol codes.
6796 case `$NM -V 2>&1` in
6797 *GNU* | *'with BFD'*)
6798   symcode='[ABCDGIRSTW]' ;;
6799 esac
6800
6801 # Try without a prefix undercore, then with it.
6802 for ac_symprfx in "" "_"; do
6803
6804   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6805   symxfrm="\\1 $ac_symprfx\\2 \\2"
6806
6807   # Write the raw and C identifiers.
6808   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6809
6810   # Check to see that the pipe works correctly.
6811   pipe_works=no
6812
6813   rm -f conftest*
6814   cat > conftest.$ac_ext <<EOF
6815 #ifdef __cplusplus
6816 extern "C" {
6817 #endif
6818 char nm_test_var;
6819 void nm_test_func(){}
6820 #ifdef __cplusplus
6821 }
6822 #endif
6823 int main(){nm_test_var='a';nm_test_func();return(0);}
6824 EOF
6825
6826   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6827   (eval $ac_compile) 2>&5
6828   ac_status=$?
6829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6830   (exit $ac_status); }; then
6831     # Now try to grab the symbols.
6832     nlist=conftest.nm
6833     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6834   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6835   ac_status=$?
6836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6837   (exit $ac_status); } && test -s "$nlist"; then
6838       # Try sorting and uniquifying the output.
6839       if sort "$nlist" | uniq > "$nlist"T; then
6840         mv -f "$nlist"T "$nlist"
6841       else
6842         rm -f "$nlist"T
6843       fi
6844
6845       # Make sure that we snagged all the symbols we need.
6846       if grep ' nm_test_var$' "$nlist" >/dev/null; then
6847         if grep ' nm_test_func$' "$nlist" >/dev/null; then
6848           cat <<EOF > conftest.$ac_ext
6849 #ifdef __cplusplus
6850 extern "C" {
6851 #endif
6852
6853 EOF
6854           # Now generate the symbol file.
6855           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6856
6857           cat <<EOF >> conftest.$ac_ext
6858 #if defined (__STDC__) && __STDC__
6859 # define lt_ptr_t void *
6860 #else
6861 # define lt_ptr_t char *
6862 # define const
6863 #endif
6864
6865 /* The mapping between symbol names and symbols. */
6866 const struct {
6867   const char *name;
6868   lt_ptr_t address;
6869 }
6870 lt_preloaded_symbols[] =
6871 {
6872 EOF
6873           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6874           cat <<\EOF >> conftest.$ac_ext
6875   {0, (lt_ptr_t) 0}
6876 };
6877
6878 #ifdef __cplusplus
6879 }
6880 #endif
6881 EOF
6882           # Now try linking the two files.
6883           mv conftest.$ac_objext conftstm.$ac_objext
6884           lt_save_LIBS="$LIBS"
6885           lt_save_CFLAGS="$CFLAGS"
6886           LIBS="conftstm.$ac_objext"
6887           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6888           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6889   (eval $ac_link) 2>&5
6890   ac_status=$?
6891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6892   (exit $ac_status); } && test -s conftest${ac_exeext}; then
6893             pipe_works=yes
6894           fi
6895           LIBS="$lt_save_LIBS"
6896           CFLAGS="$lt_save_CFLAGS"
6897         else
6898           echo "cannot find nm_test_func in $nlist" >&5
6899         fi
6900       else
6901         echo "cannot find nm_test_var in $nlist" >&5
6902       fi
6903     else
6904       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6905     fi
6906   else
6907     echo "$progname: failed program was:" >&5
6908     cat conftest.$ac_ext >&5
6909   fi
6910   rm -f conftest* conftst*
6911
6912   # Do not use the global_symbol_pipe unless it works.
6913   if test "$pipe_works" = yes; then
6914     break
6915   else
6916     lt_cv_sys_global_symbol_pipe=
6917   fi
6918 done
6919
6920 fi
6921
6922 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6923   lt_cv_sys_global_symbol_to_cdecl=
6924 fi
6925 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6926   echo "$as_me:$LINENO: result: failed" >&5
6927 echo "${ECHO_T}failed" >&6
6928 else
6929   echo "$as_me:$LINENO: result: ok" >&5
6930 echo "${ECHO_T}ok" >&6
6931 fi
6932
6933 echo "$as_me:$LINENO: checking for objdir" >&5
6934 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
6935 if test "${lt_cv_objdir+set}" = set; then
6936   echo $ECHO_N "(cached) $ECHO_C" >&6
6937 else
6938   rm -f .libs 2>/dev/null
6939 mkdir .libs 2>/dev/null
6940 if test -d .libs; then
6941   lt_cv_objdir=.libs
6942 else
6943   # MS-DOS does not allow filenames that begin with a dot.
6944   lt_cv_objdir=_libs
6945 fi
6946 rmdir .libs 2>/dev/null
6947 fi
6948 echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
6949 echo "${ECHO_T}$lt_cv_objdir" >&6
6950 objdir=$lt_cv_objdir
6951
6952
6953
6954
6955
6956 case $host_os in
6957 aix3*)
6958   # AIX sometimes has problems with the GCC collect2 program.  For some
6959   # reason, if we set the COLLECT_NAMES environment variable, the problems
6960   # vanish in a puff of smoke.
6961   if test "X${COLLECT_NAMES+set}" != Xset; then
6962     COLLECT_NAMES=
6963     export COLLECT_NAMES
6964   fi
6965   ;;
6966 esac
6967
6968 # Sed substitution that helps us do robust quoting.  It backslashifies
6969 # metacharacters that are still active within double-quoted strings.
6970 Xsed='sed -e 1s/^X//'
6971 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6972
6973 # Same as above, but do not quote variable references.
6974 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6975
6976 # Sed substitution to delay expansion of an escaped shell variable in a
6977 # double_quote_subst'ed string.
6978 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6979
6980 # Sed substitution to avoid accidental globbing in evaled expressions
6981 no_glob_subst='s/\*/\\\*/g'
6982
6983 # Constants:
6984 rm="rm -f"
6985
6986 # Global variables:
6987 default_ofile=libtool
6988 can_build_shared=yes
6989
6990 # All known linkers require a `.a' archive for static linking (except MSVC,
6991 # which needs '.lib').
6992 libext=a
6993 ltmain="$ac_aux_dir/ltmain.sh"
6994 ofile="$default_ofile"
6995 with_gnu_ld="$lt_cv_prog_gnu_ld"
6996
6997 if test -n "$ac_tool_prefix"; then
6998   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6999 set dummy ${ac_tool_prefix}ar; ac_word=$2
7000 echo "$as_me:$LINENO: checking for $ac_word" >&5
7001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7002 if test "${ac_cv_prog_AR+set}" = set; then
7003   echo $ECHO_N "(cached) $ECHO_C" >&6
7004 else
7005   if test -n "$AR"; then
7006   ac_cv_prog_AR="$AR" # Let the user override the test.
7007 else
7008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009 for as_dir in $PATH
7010 do
7011   IFS=$as_save_IFS
7012   test -z "$as_dir" && as_dir=.
7013   for ac_exec_ext in '' $ac_executable_extensions; do
7014   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015     ac_cv_prog_AR="${ac_tool_prefix}ar"
7016     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7017     break 2
7018   fi
7019 done
7020 done
7021
7022 fi
7023 fi
7024 AR=$ac_cv_prog_AR
7025 if test -n "$AR"; then
7026   echo "$as_me:$LINENO: result: $AR" >&5
7027 echo "${ECHO_T}$AR" >&6
7028 else
7029   echo "$as_me:$LINENO: result: no" >&5
7030 echo "${ECHO_T}no" >&6
7031 fi
7032
7033 fi
7034 if test -z "$ac_cv_prog_AR"; then
7035   ac_ct_AR=$AR
7036   # Extract the first word of "ar", so it can be a program name with args.
7037 set dummy ar; ac_word=$2
7038 echo "$as_me:$LINENO: checking for $ac_word" >&5
7039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7040 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7041   echo $ECHO_N "(cached) $ECHO_C" >&6
7042 else
7043   if test -n "$ac_ct_AR"; then
7044   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7045 else
7046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7047 for as_dir in $PATH
7048 do
7049   IFS=$as_save_IFS
7050   test -z "$as_dir" && as_dir=.
7051   for ac_exec_ext in '' $ac_executable_extensions; do
7052   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7053     ac_cv_prog_ac_ct_AR="ar"
7054     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7055     break 2
7056   fi
7057 done
7058 done
7059
7060   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
7061 fi
7062 fi
7063 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7064 if test -n "$ac_ct_AR"; then
7065   echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7066 echo "${ECHO_T}$ac_ct_AR" >&6
7067 else
7068   echo "$as_me:$LINENO: result: no" >&5
7069 echo "${ECHO_T}no" >&6
7070 fi
7071
7072   AR=$ac_ct_AR
7073 else
7074   AR="$ac_cv_prog_AR"
7075 fi
7076
7077 if test -n "$ac_tool_prefix"; then
7078   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7079 set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
7083   echo $ECHO_N "(cached) $ECHO_C" >&6
7084 else
7085   if test -n "$RANLIB"; then
7086   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
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 fi
7103 fi
7104 RANLIB=$ac_cv_prog_RANLIB
7105 if test -n "$RANLIB"; then
7106   echo "$as_me:$LINENO: result: $RANLIB" >&5
7107 echo "${ECHO_T}$RANLIB" >&6
7108 else
7109   echo "$as_me:$LINENO: result: no" >&5
7110 echo "${ECHO_T}no" >&6
7111 fi
7112
7113 fi
7114 if test -z "$ac_cv_prog_RANLIB"; then
7115   ac_ct_RANLIB=$RANLIB
7116   # Extract the first word of "ranlib", so it can be a program name with args.
7117 set dummy ranlib; ac_word=$2
7118 echo "$as_me:$LINENO: checking for $ac_word" >&5
7119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7120 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7121   echo $ECHO_N "(cached) $ECHO_C" >&6
7122 else
7123   if test -n "$ac_ct_RANLIB"; then
7124   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7125 else
7126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127 for as_dir in $PATH
7128 do
7129   IFS=$as_save_IFS
7130   test -z "$as_dir" && as_dir=.
7131   for ac_exec_ext in '' $ac_executable_extensions; do
7132   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7133     ac_cv_prog_ac_ct_RANLIB="ranlib"
7134     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7135     break 2
7136   fi
7137 done
7138 done
7139
7140   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7141 fi
7142 fi
7143 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7144 if test -n "$ac_ct_RANLIB"; then
7145   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
7146 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7147 else
7148   echo "$as_me:$LINENO: result: no" >&5
7149 echo "${ECHO_T}no" >&6
7150 fi
7151
7152   RANLIB=$ac_ct_RANLIB
7153 else
7154   RANLIB="$ac_cv_prog_RANLIB"
7155 fi
7156
7157 if test -n "$ac_tool_prefix"; then
7158   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7159 set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
7163   echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165   if test -n "$STRIP"; then
7166   ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
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 fi
7183 fi
7184 STRIP=$ac_cv_prog_STRIP
7185 if test -n "$STRIP"; then
7186   echo "$as_me:$LINENO: result: $STRIP" >&5
7187 echo "${ECHO_T}$STRIP" >&6
7188 else
7189   echo "$as_me:$LINENO: result: no" >&5
7190 echo "${ECHO_T}no" >&6
7191 fi
7192
7193 fi
7194 if test -z "$ac_cv_prog_STRIP"; then
7195   ac_ct_STRIP=$STRIP
7196   # Extract the first word of "strip", so it can be a program name with args.
7197 set dummy strip; ac_word=$2
7198 echo "$as_me:$LINENO: checking for $ac_word" >&5
7199 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7200 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
7201   echo $ECHO_N "(cached) $ECHO_C" >&6
7202 else
7203   if test -n "$ac_ct_STRIP"; then
7204   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7205 else
7206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7207 for as_dir in $PATH
7208 do
7209   IFS=$as_save_IFS
7210   test -z "$as_dir" && as_dir=.
7211   for ac_exec_ext in '' $ac_executable_extensions; do
7212   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7213     ac_cv_prog_ac_ct_STRIP="strip"
7214     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7215     break 2
7216   fi
7217 done
7218 done
7219
7220   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
7221 fi
7222 fi
7223 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7224 if test -n "$ac_ct_STRIP"; then
7225   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
7226 echo "${ECHO_T}$ac_ct_STRIP" >&6
7227 else
7228   echo "$as_me:$LINENO: result: no" >&5
7229 echo "${ECHO_T}no" >&6
7230 fi
7231
7232   STRIP=$ac_ct_STRIP
7233 else
7234   STRIP="$ac_cv_prog_STRIP"
7235 fi
7236
7237
7238 old_CC="$CC"
7239 old_CFLAGS="$CFLAGS"
7240
7241 # Set sane defaults for various variables
7242 test -z "$AR" && AR=ar
7243 test -z "$AR_FLAGS" && AR_FLAGS=cru
7244 test -z "$AS" && AS=as
7245 test -z "$CC" && CC=cc
7246 test -z "$LTCC" && LTCC=$CC
7247 test -z "$DLLTOOL" && DLLTOOL=dlltool
7248 test -z "$LD" && LD=ld
7249 test -z "$LN_S" && LN_S="ln -s"
7250 test -z "$MAGIC_CMD" && MAGIC_CMD=file
7251 test -z "$NM" && NM=nm
7252 test -z "$SED" && SED=sed
7253 test -z "$OBJDUMP" && OBJDUMP=objdump
7254 test -z "$RANLIB" && RANLIB=:
7255 test -z "$STRIP" && STRIP=:
7256 test -z "$ac_objext" && ac_objext=o
7257
7258 # Determine commands to create old-style static archives.
7259 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
7260 old_postinstall_cmds='chmod 644 $oldlib'
7261 old_postuninstall_cmds=
7262
7263 if test -n "$RANLIB"; then
7264   case $host_os in
7265   openbsd*)
7266     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
7267     ;;
7268   *)
7269     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7270     ;;
7271   esac
7272   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7273 fi
7274
7275 for cc_temp in $compiler""; do
7276   case $cc_temp in
7277     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7278     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7279     \-*) ;;
7280     *) break;;
7281   esac
7282 done
7283 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7284
7285
7286 # Only perform the check for file, if the check method requires it
7287 case $deplibs_check_method in
7288 file_magic*)
7289   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7290     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7291 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
7292 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7293   echo $ECHO_N "(cached) $ECHO_C" >&6
7294 else
7295   case $MAGIC_CMD in
7296 [\\/*] |  ?:[\\/]*)
7297   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7298   ;;
7299 *)
7300   lt_save_MAGIC_CMD="$MAGIC_CMD"
7301   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7302   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7303   for ac_dir in $ac_dummy; do
7304     IFS="$lt_save_ifs"
7305     test -z "$ac_dir" && ac_dir=.
7306     if test -f $ac_dir/${ac_tool_prefix}file; then
7307       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7308       if test -n "$file_magic_test_file"; then
7309         case $deplibs_check_method in
7310         "file_magic "*)
7311           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7312           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7313           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7314             $EGREP "$file_magic_regex" > /dev/null; then
7315             :
7316           else
7317             cat <<EOF 1>&2
7318
7319 *** Warning: the command libtool uses to detect shared libraries,
7320 *** $file_magic_cmd, produces output that libtool cannot recognize.
7321 *** The result is that libtool may fail to recognize shared libraries
7322 *** as such.  This will affect the creation of libtool libraries that
7323 *** depend on shared libraries, but programs linked with such libtool
7324 *** libraries will work regardless of this problem.  Nevertheless, you
7325 *** may want to report the problem to your system manager and/or to
7326 *** bug-libtool@gnu.org
7327
7328 EOF
7329           fi ;;
7330         esac
7331       fi
7332       break
7333     fi
7334   done
7335   IFS="$lt_save_ifs"
7336   MAGIC_CMD="$lt_save_MAGIC_CMD"
7337   ;;
7338 esac
7339 fi
7340
7341 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7342 if test -n "$MAGIC_CMD"; then
7343   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7344 echo "${ECHO_T}$MAGIC_CMD" >&6
7345 else
7346   echo "$as_me:$LINENO: result: no" >&5
7347 echo "${ECHO_T}no" >&6
7348 fi
7349
7350 if test -z "$lt_cv_path_MAGIC_CMD"; then
7351   if test -n "$ac_tool_prefix"; then
7352     echo "$as_me:$LINENO: checking for file" >&5
7353 echo $ECHO_N "checking for file... $ECHO_C" >&6
7354 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7355   echo $ECHO_N "(cached) $ECHO_C" >&6
7356 else
7357   case $MAGIC_CMD in
7358 [\\/*] |  ?:[\\/]*)
7359   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7360   ;;
7361 *)
7362   lt_save_MAGIC_CMD="$MAGIC_CMD"
7363   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7364   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7365   for ac_dir in $ac_dummy; do
7366     IFS="$lt_save_ifs"
7367     test -z "$ac_dir" && ac_dir=.
7368     if test -f $ac_dir/file; then
7369       lt_cv_path_MAGIC_CMD="$ac_dir/file"
7370       if test -n "$file_magic_test_file"; then
7371         case $deplibs_check_method in
7372         "file_magic "*)
7373           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7374           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7375           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7376             $EGREP "$file_magic_regex" > /dev/null; then
7377             :
7378           else
7379             cat <<EOF 1>&2
7380
7381 *** Warning: the command libtool uses to detect shared libraries,
7382 *** $file_magic_cmd, produces output that libtool cannot recognize.
7383 *** The result is that libtool may fail to recognize shared libraries
7384 *** as such.  This will affect the creation of libtool libraries that
7385 *** depend on shared libraries, but programs linked with such libtool
7386 *** libraries will work regardless of this problem.  Nevertheless, you
7387 *** may want to report the problem to your system manager and/or to
7388 *** bug-libtool@gnu.org
7389
7390 EOF
7391           fi ;;
7392         esac
7393       fi
7394       break
7395     fi
7396   done
7397   IFS="$lt_save_ifs"
7398   MAGIC_CMD="$lt_save_MAGIC_CMD"
7399   ;;
7400 esac
7401 fi
7402
7403 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7404 if test -n "$MAGIC_CMD"; then
7405   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7406 echo "${ECHO_T}$MAGIC_CMD" >&6
7407 else
7408   echo "$as_me:$LINENO: result: no" >&5
7409 echo "${ECHO_T}no" >&6
7410 fi
7411
7412   else
7413     MAGIC_CMD=:
7414   fi
7415 fi
7416
7417   fi
7418   ;;
7419 esac
7420
7421 enable_dlopen=yes
7422 enable_win32_dll=yes
7423
7424 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
7425 if test "${enable_libtool_lock+set}" = set; then
7426   enableval="$enable_libtool_lock"
7427
7428 fi;
7429 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7430
7431
7432 # Check whether --with-pic or --without-pic was given.
7433 if test "${with_pic+set}" = set; then
7434   withval="$with_pic"
7435   pic_mode="$withval"
7436 else
7437   pic_mode=default
7438 fi;
7439 test -z "$pic_mode" && pic_mode=default
7440
7441 # Use C for the default configuration in the libtool script
7442 tagname=
7443 lt_save_CC="$CC"
7444 ac_ext=c
7445 ac_cpp='$CPP $CPPFLAGS'
7446 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7447 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7448 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7449
7450
7451 # Source file extension for C test sources.
7452 ac_ext=c
7453
7454 # Object file extension for compiled C test sources.
7455 objext=o
7456 objext=$objext
7457
7458 # Code to be used in simple compile tests
7459 lt_simple_compile_test_code="int some_variable = 0;\n"
7460
7461 # Code to be used in simple link tests
7462 lt_simple_link_test_code='int main(){return(0);}\n'
7463
7464
7465 # If no C compiler was specified, use CC.
7466 LTCC=${LTCC-"$CC"}
7467
7468 # Allow CC to be a program name with arguments.
7469 compiler=$CC
7470
7471
7472 # save warnings/boilerplate of simple test code
7473 ac_outfile=conftest.$ac_objext
7474 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
7475 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7476 _lt_compiler_boilerplate=`cat conftest.err`
7477 $rm conftest*
7478
7479 ac_outfile=conftest.$ac_objext
7480 printf "$lt_simple_link_test_code" >conftest.$ac_ext
7481 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
7482 _lt_linker_boilerplate=`cat conftest.err`
7483 $rm conftest*
7484
7485
7486 #
7487 # Check for any special shared library compilation flags.
7488 #
7489 lt_prog_cc_shlib=
7490 if test "$GCC" = no; then
7491   case $host_os in
7492   sco3.2v5*)
7493     lt_prog_cc_shlib='-belf'
7494     ;;
7495   esac
7496 fi
7497 if test -n "$lt_prog_cc_shlib"; then
7498   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
7499 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
7500   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
7501   else
7502     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
7503 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
7504     lt_cv_prog_cc_can_build_shared=no
7505   fi
7506 fi
7507
7508
7509 #
7510 # Check to make sure the static flag actually works.
7511 #
7512 echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
7513 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
7514 if test "${lt_prog_compiler_static_works+set}" = set; then
7515   echo $ECHO_N "(cached) $ECHO_C" >&6
7516 else
7517   lt_prog_compiler_static_works=no
7518    save_LDFLAGS="$LDFLAGS"
7519    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
7520    printf "$lt_simple_link_test_code" > conftest.$ac_ext
7521    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7522      # The linker can only warn and ignore the option if not recognized
7523      # So say no if there are warnings
7524      if test -s conftest.err; then
7525        # Append any errors to the config.log.
7526        cat conftest.err 1>&5
7527        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
7528        $SED '/^$/d' conftest.err >conftest.er2
7529        if diff conftest.exp conftest.er2 >/dev/null; then
7530          lt_prog_compiler_static_works=yes
7531        fi
7532      else
7533        lt_prog_compiler_static_works=yes
7534      fi
7535    fi
7536    $rm conftest*
7537    LDFLAGS="$save_LDFLAGS"
7538
7539 fi
7540 echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7541 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
7542
7543 if test x"$lt_prog_compiler_static_works" = xyes; then
7544     :
7545 else
7546     lt_prog_compiler_static=
7547 fi
7548
7549
7550
7551
7552 lt_prog_compiler_no_builtin_flag=
7553
7554 if test "$GCC" = yes; then
7555   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7556
7557
7558 echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7559 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
7560 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7561   echo $ECHO_N "(cached) $ECHO_C" >&6
7562 else
7563   lt_cv_prog_compiler_rtti_exceptions=no
7564   ac_outfile=conftest.$ac_objext
7565    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7566    lt_compiler_flag="-fno-rtti -fno-exceptions"
7567    # Insert the option either (1) after the last *FLAGS variable, or
7568    # (2) before a word containing "conftest.", or (3) at the end.
7569    # Note that $ac_compile itself does not contain backslashes and begins
7570    # with a dollar sign (not a hyphen), so the echo should work correctly.
7571    # The option is referenced via a variable to avoid confusing sed.
7572    lt_compile=`echo "$ac_compile" | $SED \
7573    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7574    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7575    -e 's:$: $lt_compiler_flag:'`
7576    (eval echo "\"\$as_me:7576: $lt_compile\"" >&5)
7577    (eval "$lt_compile" 2>conftest.err)
7578    ac_status=$?
7579    cat conftest.err >&5
7580    echo "$as_me:7580: \$? = $ac_status" >&5
7581    if (exit $ac_status) && test -s "$ac_outfile"; then
7582      # The compiler can only warn and ignore the option if not recognized
7583      # So say no if there are warnings other than the usual output.
7584      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7585      $SED '/^$/d' conftest.err >conftest.er2
7586      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7587        lt_cv_prog_compiler_rtti_exceptions=yes
7588      fi
7589    fi
7590    $rm conftest*
7591
7592 fi
7593 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7594 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
7595
7596 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7597     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7598 else
7599     :
7600 fi
7601
7602 fi
7603
7604 lt_prog_compiler_wl=
7605 lt_prog_compiler_pic=
7606 lt_prog_compiler_static=
7607
7608 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7609 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
7610
7611   if test "$GCC" = yes; then
7612     lt_prog_compiler_wl='-Wl,'
7613     lt_prog_compiler_static='-static'
7614
7615     case $host_os in
7616       aix*)
7617       # All AIX code is PIC.
7618       if test "$host_cpu" = ia64; then
7619         # AIX 5 now supports IA64 processor
7620         lt_prog_compiler_static='-Bstatic'
7621       fi
7622       ;;
7623
7624     amigaos*)
7625       # FIXME: we need at least 68020 code to build shared libraries, but
7626       # adding the `-m68020' flag to GCC prevents building anything better,
7627       # like `-m68040'.
7628       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7629       ;;
7630
7631     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7632       # PIC is the default for these OSes.
7633       ;;
7634
7635     mingw* | pw32* | os2*)
7636       # This hack is so that the source file can tell whether it is being
7637       # built for inclusion in a dll (and should export symbols for example).
7638       lt_prog_compiler_pic='-DDLL_EXPORT'
7639       ;;
7640
7641     darwin* | rhapsody*)
7642       # PIC is the default on this platform
7643       # Common symbols not allowed in MH_DYLIB files
7644       lt_prog_compiler_pic='-fno-common'
7645       ;;
7646
7647     msdosdjgpp*)
7648       # Just because we use GCC doesn't mean we suddenly get shared libraries
7649       # on systems that don't support them.
7650       lt_prog_compiler_can_build_shared=no
7651       enable_shared=no
7652       ;;
7653
7654     sysv4*MP*)
7655       if test -d /usr/nec; then
7656         lt_prog_compiler_pic=-Kconform_pic
7657       fi
7658       ;;
7659
7660     hpux*)
7661       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7662       # not for PA HP-UX.
7663       case $host_cpu in
7664       hppa*64*|ia64*)
7665         # +Z the default
7666         ;;
7667       *)
7668         lt_prog_compiler_pic='-fPIC'
7669         ;;
7670       esac
7671       ;;
7672
7673     *)
7674       lt_prog_compiler_pic='-fPIC'
7675       ;;
7676     esac
7677   else
7678     # PORTME Check for flag to pass linker flags through the system compiler.
7679     case $host_os in
7680     aix*)
7681       lt_prog_compiler_wl='-Wl,'
7682       if test "$host_cpu" = ia64; then
7683         # AIX 5 now supports IA64 processor
7684         lt_prog_compiler_static='-Bstatic'
7685       else
7686         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7687       fi
7688       ;;
7689       darwin*)
7690         # PIC is the default on this platform
7691         # Common symbols not allowed in MH_DYLIB files
7692        case $cc_basename in
7693          xlc*)
7694          lt_prog_compiler_pic='-qnocommon'
7695          lt_prog_compiler_wl='-Wl,'
7696          ;;
7697        esac
7698        ;;
7699
7700     mingw* | pw32* | os2*)
7701       # This hack is so that the source file can tell whether it is being
7702       # built for inclusion in a dll (and should export symbols for example).
7703       lt_prog_compiler_pic='-DDLL_EXPORT'
7704       ;;
7705
7706     hpux9* | hpux10* | hpux11*)
7707       lt_prog_compiler_wl='-Wl,'
7708       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7709       # not for PA HP-UX.
7710       case $host_cpu in
7711       hppa*64*|ia64*)
7712         # +Z the default
7713         ;;
7714       *)
7715         lt_prog_compiler_pic='+Z'
7716         ;;
7717       esac
7718       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7719       lt_prog_compiler_static='${wl}-a ${wl}archive'
7720       ;;
7721
7722     irix5* | irix6* | nonstopux*)
7723       lt_prog_compiler_wl='-Wl,'
7724       # PIC (with -KPIC) is the default.
7725       lt_prog_compiler_static='-non_shared'
7726       ;;
7727
7728     newsos6)
7729       lt_prog_compiler_pic='-KPIC'
7730       lt_prog_compiler_static='-Bstatic'
7731       ;;
7732
7733     linux*)
7734       case $cc_basename in
7735       icc* | ecc*)
7736         lt_prog_compiler_wl='-Wl,'
7737         lt_prog_compiler_pic='-KPIC'
7738         lt_prog_compiler_static='-static'
7739         ;;
7740       pgcc* | pgf77* | pgf90* | pgf95*)
7741         # Portland Group compilers (*not* the Pentium gcc compiler,
7742         # which looks to be a dead project)
7743         lt_prog_compiler_wl='-Wl,'
7744         lt_prog_compiler_pic='-fpic'
7745         lt_prog_compiler_static='-Bstatic'
7746         ;;
7747       ccc*)
7748         lt_prog_compiler_wl='-Wl,'
7749         # All Alpha code is PIC.
7750         lt_prog_compiler_static='-non_shared'
7751         ;;
7752       esac
7753       ;;
7754
7755     osf3* | osf4* | osf5*)
7756       lt_prog_compiler_wl='-Wl,'
7757       # All OSF/1 code is PIC.
7758       lt_prog_compiler_static='-non_shared'
7759       ;;
7760
7761     sco3.2v5*)
7762       lt_prog_compiler_pic='-Kpic'
7763       lt_prog_compiler_static='-dn'
7764       ;;
7765
7766     solaris*)
7767       lt_prog_compiler_pic='-KPIC'
7768       lt_prog_compiler_static='-Bstatic'
7769       case $cc_basename in
7770       f77* | f90* | f95*)
7771         lt_prog_compiler_wl='-Qoption ld ';;
7772       *)
7773         lt_prog_compiler_wl='-Wl,';;
7774       esac
7775       ;;
7776
7777     sunos4*)
7778       lt_prog_compiler_wl='-Qoption ld '
7779       lt_prog_compiler_pic='-PIC'
7780       lt_prog_compiler_static='-Bstatic'
7781       ;;
7782
7783     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7784       lt_prog_compiler_wl='-Wl,'
7785       lt_prog_compiler_pic='-KPIC'
7786       lt_prog_compiler_static='-Bstatic'
7787       ;;
7788
7789     sysv4*MP*)
7790       if test -d /usr/nec ;then
7791         lt_prog_compiler_pic='-Kconform_pic'
7792         lt_prog_compiler_static='-Bstatic'
7793       fi
7794       ;;
7795
7796     unicos*)
7797       lt_prog_compiler_wl='-Wl,'
7798       lt_prog_compiler_can_build_shared=no
7799       ;;
7800
7801     uts4*)
7802       lt_prog_compiler_pic='-pic'
7803       lt_prog_compiler_static='-Bstatic'
7804       ;;
7805
7806     *)
7807       lt_prog_compiler_can_build_shared=no
7808       ;;
7809     esac
7810   fi
7811
7812 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7813 echo "${ECHO_T}$lt_prog_compiler_pic" >&6
7814
7815 #
7816 # Check to make sure the PIC flag actually works.
7817 #
7818 if test -n "$lt_prog_compiler_pic"; then
7819
7820 echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7821 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
7822 if test "${lt_prog_compiler_pic_works+set}" = set; then
7823   echo $ECHO_N "(cached) $ECHO_C" >&6
7824 else
7825   lt_prog_compiler_pic_works=no
7826   ac_outfile=conftest.$ac_objext
7827    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7828    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7829    # Insert the option either (1) after the last *FLAGS variable, or
7830    # (2) before a word containing "conftest.", or (3) at the end.
7831    # Note that $ac_compile itself does not contain backslashes and begins
7832    # with a dollar sign (not a hyphen), so the echo should work correctly.
7833    # The option is referenced via a variable to avoid confusing sed.
7834    lt_compile=`echo "$ac_compile" | $SED \
7835    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7836    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7837    -e 's:$: $lt_compiler_flag:'`
7838    (eval echo "\"\$as_me:7838: $lt_compile\"" >&5)
7839    (eval "$lt_compile" 2>conftest.err)
7840    ac_status=$?
7841    cat conftest.err >&5
7842    echo "$as_me:7842: \$? = $ac_status" >&5
7843    if (exit $ac_status) && test -s "$ac_outfile"; then
7844      # The compiler can only warn and ignore the option if not recognized
7845      # So say no if there are warnings other than the usual output.
7846      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
7847      $SED '/^$/d' conftest.err >conftest.er2
7848      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
7849        lt_prog_compiler_pic_works=yes
7850      fi
7851    fi
7852    $rm conftest*
7853
7854 fi
7855 echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7856 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
7857
7858 if test x"$lt_prog_compiler_pic_works" = xyes; then
7859     case $lt_prog_compiler_pic in
7860      "" | " "*) ;;
7861      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7862      esac
7863 else
7864     lt_prog_compiler_pic=
7865      lt_prog_compiler_can_build_shared=no
7866 fi
7867
7868 fi
7869 case $host_os in
7870   # For platforms which do not support PIC, -DPIC is meaningless:
7871   *djgpp*)
7872     lt_prog_compiler_pic=
7873     ;;
7874   *)
7875     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7876     ;;
7877 esac
7878
7879 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7880 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
7881 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7882   echo $ECHO_N "(cached) $ECHO_C" >&6
7883 else
7884   lt_cv_prog_compiler_c_o=no
7885    $rm -r conftest 2>/dev/null
7886    mkdir conftest
7887    cd conftest
7888    mkdir out
7889    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7890
7891    lt_compiler_flag="-o out/conftest2.$ac_objext"
7892    # Insert the option either (1) after the last *FLAGS variable, or
7893    # (2) before a word containing "conftest.", or (3) at the end.
7894    # Note that $ac_compile itself does not contain backslashes and begins
7895    # with a dollar sign (not a hyphen), so the echo should work correctly.
7896    lt_compile=`echo "$ac_compile" | $SED \
7897    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7898    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7899    -e 's:$: $lt_compiler_flag:'`
7900    (eval echo "\"\$as_me:7900: $lt_compile\"" >&5)
7901    (eval "$lt_compile" 2>out/conftest.err)
7902    ac_status=$?
7903    cat out/conftest.err >&5
7904    echo "$as_me:7904: \$? = $ac_status" >&5
7905    if (exit $ac_status) && test -s out/conftest2.$ac_objext
7906    then
7907      # The compiler can only warn and ignore the option if not recognized
7908      # So say no if there are warnings
7909      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
7910      $SED '/^$/d' out/conftest.err >out/conftest.er2
7911      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7912        lt_cv_prog_compiler_c_o=yes
7913      fi
7914    fi
7915    chmod u+w . 2>&5
7916    $rm conftest*
7917    # SGI C++ compiler will create directory out/ii_files/ for
7918    # template instantiation
7919    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7920    $rm out/* && rmdir out
7921    cd ..
7922    rmdir conftest
7923    $rm conftest*
7924
7925 fi
7926 echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
7927 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
7928
7929
7930 hard_links="nottested"
7931 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7932   # do not overwrite the value of need_locks provided by the user
7933   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
7934 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
7935   hard_links=yes
7936   $rm conftest*
7937   ln conftest.a conftest.b 2>/dev/null && hard_links=no
7938   touch conftest.a
7939   ln conftest.a conftest.b 2>&5 || hard_links=no
7940   ln conftest.a conftest.b 2>/dev/null && hard_links=no
7941   echo "$as_me:$LINENO: result: $hard_links" >&5
7942 echo "${ECHO_T}$hard_links" >&6
7943   if test "$hard_links" = no; then
7944     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7945 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7946     need_locks=warn
7947   fi
7948 else
7949   need_locks=no
7950 fi
7951
7952 echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7953 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
7954
7955   runpath_var=
7956   allow_undefined_flag=
7957   enable_shared_with_static_runtimes=no
7958   archive_cmds=
7959   archive_expsym_cmds=
7960   old_archive_From_new_cmds=
7961   old_archive_from_expsyms_cmds=
7962   export_dynamic_flag_spec=
7963   whole_archive_flag_spec=
7964   thread_safe_flag_spec=
7965   hardcode_libdir_flag_spec=
7966   hardcode_libdir_flag_spec_ld=
7967   hardcode_libdir_separator=
7968   hardcode_direct=no
7969   hardcode_minus_L=no
7970   hardcode_shlibpath_var=unsupported
7971   link_all_deplibs=unknown
7972   hardcode_automatic=no
7973   module_cmds=
7974   module_expsym_cmds=
7975   always_export_symbols=no
7976   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7977   # include_expsyms should be a list of space-separated symbols to be *always*
7978   # included in the symbol list
7979   include_expsyms=
7980   # exclude_expsyms can be an extended regexp of symbols to exclude
7981   # it will be wrapped by ` (' and `)$', so one must not match beginning or
7982   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7983   # as well as any symbol that contains `d'.
7984   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7985   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7986   # platforms (ab)use it in PIC code, but their linkers get confused if
7987   # the symbol is explicitly referenced.  Since portable code cannot
7988   # rely on this symbol name, it's probably fine to never include it in
7989   # preloaded symbol tables.
7990   extract_expsyms_cmds=
7991   # Just being paranoid about ensuring that cc_basename is set.
7992   for cc_temp in $compiler""; do
7993   case $cc_temp in
7994     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7995     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7996     \-*) ;;
7997     *) break;;
7998   esac
7999 done
8000 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8001
8002   case $host_os in
8003   cygwin* | mingw* | pw32*)
8004     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8005     # When not using gcc, we currently assume that we are using
8006     # Microsoft Visual C++.
8007     if test "$GCC" != yes; then
8008       with_gnu_ld=no
8009     fi
8010     ;;
8011   openbsd*)
8012     with_gnu_ld=no
8013     ;;
8014   esac
8015
8016   ld_shlibs=yes
8017   if test "$with_gnu_ld" = yes; then
8018     # If archive_cmds runs LD, not CC, wlarc should be empty
8019     wlarc='${wl}'
8020
8021     # Set some defaults for GNU ld with shared library support. These
8022     # are reset later if shared libraries are not supported. Putting them
8023     # here allows them to be overridden if necessary.
8024     runpath_var=LD_RUN_PATH
8025     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8026     export_dynamic_flag_spec='${wl}--export-dynamic'
8027     # ancient GNU ld didn't support --whole-archive et. al.
8028     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8029         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8030       else
8031         whole_archive_flag_spec=
8032     fi
8033     supports_anon_versioning=no
8034     case `$LD -v 2>/dev/null` in
8035       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8036       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8037       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8038       *\ 2.11.*) ;; # other 2.11 versions
8039       *) supports_anon_versioning=yes ;;
8040     esac
8041
8042     # See if GNU ld supports shared libraries.
8043     case $host_os in
8044     aix3* | aix4* | aix5*)
8045       # On AIX/PPC, the GNU linker is very broken
8046       if test "$host_cpu" != ia64; then
8047         ld_shlibs=no
8048         cat <<EOF 1>&2
8049
8050 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8051 *** to be unable to reliably create shared libraries on AIX.
8052 *** Therefore, libtool is disabling shared libraries support.  If you
8053 *** really care for shared libraries, you may want to modify your PATH
8054 *** so that a non-GNU linker is found, and then restart.
8055
8056 EOF
8057       fi
8058       ;;
8059
8060     amigaos*)
8061       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)'
8062       hardcode_libdir_flag_spec='-L$libdir'
8063       hardcode_minus_L=yes
8064
8065       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8066       # that the semantics of dynamic libraries on AmigaOS, at least up
8067       # to version 4, is to share data among multiple programs linked
8068       # with the same dynamic library.  Since this doesn't match the
8069       # behavior of shared libraries on other platforms, we can't use
8070       # them.
8071       ld_shlibs=no
8072       ;;
8073
8074     beos*)
8075       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8076         allow_undefined_flag=unsupported
8077         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8078         # support --undefined.  This deserves some investigation.  FIXME
8079         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8080       else
8081         ld_shlibs=no
8082       fi
8083       ;;
8084
8085     cygwin* | mingw* | pw32*)
8086       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8087       # as there is no search path for DLLs.
8088       hardcode_libdir_flag_spec='-L$libdir'
8089       allow_undefined_flag=unsupported
8090       always_export_symbols=no
8091       enable_shared_with_static_runtimes=yes
8092       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
8093
8094       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8095         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8096         # If the export-symbols file already is a .def file (1st line
8097         # is EXPORTS), use it as is; otherwise, prepend...
8098         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8099           cp $export_symbols $output_objdir/$soname.def;
8100         else
8101           echo EXPORTS > $output_objdir/$soname.def;
8102           cat $export_symbols >> $output_objdir/$soname.def;
8103         fi~
8104         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
8105       else
8106         ld_shlibs=no
8107       fi
8108       ;;
8109
8110     linux*)
8111       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8112         tmp_addflag=
8113         case $cc_basename,$host_cpu in
8114         pgcc*)                          # Portland Group C compiler
8115           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'
8116           tmp_addflag=' $pic_flag'
8117           ;;
8118         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
8119           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'
8120           tmp_addflag=' $pic_flag -Mnomain' ;;
8121         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
8122           tmp_addflag=' -i_dynamic' ;;
8123         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
8124           tmp_addflag=' -i_dynamic -nofor_main' ;;
8125         ifc* | ifort*)                  # Intel Fortran compiler
8126           tmp_addflag=' -nofor_main' ;;
8127         esac
8128         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8129
8130         if test $supports_anon_versioning = yes; then
8131           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8132   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8133   $echo "local: *; };" >> $output_objdir/$libname.ver~
8134           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8135         fi
8136       else
8137         ld_shlibs=no
8138       fi
8139       ;;
8140
8141     netbsd*)
8142       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8143         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8144         wlarc=
8145       else
8146         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8147         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8148       fi
8149       ;;
8150
8151     solaris* | sysv5*)
8152       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8153         ld_shlibs=no
8154         cat <<EOF 1>&2
8155
8156 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8157 *** create shared libraries on Solaris systems.  Therefore, libtool
8158 *** is disabling shared libraries support.  We urge you to upgrade GNU
8159 *** binutils to release 2.9.1 or newer.  Another option is to modify
8160 *** your PATH or compiler configuration so that the native linker is
8161 *** used, and then restart.
8162
8163 EOF
8164       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8165         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8166         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8167       else
8168         ld_shlibs=no
8169       fi
8170       ;;
8171
8172     sunos4*)
8173       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8174       wlarc=
8175       hardcode_direct=yes
8176       hardcode_shlibpath_var=no
8177       ;;
8178
8179     *)
8180       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8181         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8182         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8183       else
8184         ld_shlibs=no
8185       fi
8186       ;;
8187     esac
8188
8189     if test "$ld_shlibs" = no; then
8190       runpath_var=
8191       hardcode_libdir_flag_spec=
8192       export_dynamic_flag_spec=
8193       whole_archive_flag_spec=
8194     fi
8195   else
8196     # PORTME fill in a description of your system's linker (not GNU ld)
8197     case $host_os in
8198     aix3*)
8199       allow_undefined_flag=unsupported
8200       always_export_symbols=yes
8201       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'
8202       # Note: this linker hardcodes the directories in LIBPATH if there
8203       # are no directories specified by -L.
8204       hardcode_minus_L=yes
8205       if test "$GCC" = yes && test -z "$link_static_flag"; then
8206         # Neither direct hardcoding nor static linking is supported with a
8207         # broken collect2.
8208         hardcode_direct=unsupported
8209       fi
8210       ;;
8211
8212     aix4* | aix5*)
8213       if test "$host_cpu" = ia64; then
8214         # On IA64, the linker does run time linking by default, so we don't
8215         # have to do anything special.
8216         aix_use_runtimelinking=no
8217         exp_sym_flag='-Bexport'
8218         no_entry_flag=""
8219       else
8220         # If we're using GNU nm, then we don't want the "-C" option.
8221         # -C means demangle to AIX nm, but means don't demangle with GNU nm
8222         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8223           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'
8224         else
8225           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'
8226         fi
8227         aix_use_runtimelinking=no
8228
8229         # Test if we are trying to use run time linking or normal
8230         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8231         # need to do runtime linking.
8232         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8233           for ld_flag in $LDFLAGS; do
8234           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8235             aix_use_runtimelinking=yes
8236             break
8237           fi
8238           done
8239         esac
8240
8241         exp_sym_flag='-bexport'
8242         no_entry_flag='-bnoentry'
8243       fi
8244
8245       # When large executables or shared objects are built, AIX ld can
8246       # have problems creating the table of contents.  If linking a library
8247       # or program results in "error TOC overflow" add -mminimal-toc to
8248       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8249       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8250
8251       archive_cmds=''
8252       hardcode_direct=yes
8253       hardcode_libdir_separator=':'
8254       link_all_deplibs=yes
8255
8256       if test "$GCC" = yes; then
8257         case $host_os in aix4.[012]|aix4.[012].*)
8258         # We only want to do this on AIX 4.2 and lower, the check
8259         # below for broken collect2 doesn't work under 4.3+
8260           collect2name=`${CC} -print-prog-name=collect2`
8261           if test -f "$collect2name" && \
8262            strings "$collect2name" | grep resolve_lib_name >/dev/null
8263           then
8264           # We have reworked collect2
8265           hardcode_direct=yes
8266           else
8267           # We have old collect2
8268           hardcode_direct=unsupported
8269           # It fails to find uninstalled libraries when the uninstalled
8270           # path is not listed in the libpath.  Setting hardcode_minus_L
8271           # to unsupported forces relinking
8272           hardcode_minus_L=yes
8273           hardcode_libdir_flag_spec='-L$libdir'
8274           hardcode_libdir_separator=
8275           fi
8276         esac
8277         shared_flag='-shared'
8278         if test "$aix_use_runtimelinking" = yes; then
8279           shared_flag="$shared_flag "'${wl}-G'
8280         fi
8281       else
8282         # not using gcc
8283         if test "$host_cpu" = ia64; then
8284         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8285         # chokes on -Wl,-G. The following line is correct:
8286           shared_flag='-G'
8287         else
8288         if test "$aix_use_runtimelinking" = yes; then
8289             shared_flag='${wl}-G'
8290           else
8291             shared_flag='${wl}-bM:SRE'
8292         fi
8293         fi
8294       fi
8295
8296       # It seems that -bexpall does not export symbols beginning with
8297       # underscore (_), so it is better to generate a list of symbols to export.
8298       always_export_symbols=yes
8299       if test "$aix_use_runtimelinking" = yes; then
8300         # Warning - without using the other runtime loading flags (-brtl),
8301         # -berok will link without error, but may produce a broken library.
8302         allow_undefined_flag='-berok'
8303        # Determine the default libpath from the value encoded in an empty executable.
8304        cat >conftest.$ac_ext <<_ACEOF
8305 /* confdefs.h.  */
8306 _ACEOF
8307 cat confdefs.h >>conftest.$ac_ext
8308 cat >>conftest.$ac_ext <<_ACEOF
8309 /* end confdefs.h.  */
8310
8311 int
8312 main ()
8313 {
8314
8315   ;
8316   return 0;
8317 }
8318 _ACEOF
8319 rm -f conftest.$ac_objext conftest$ac_exeext
8320 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8321   (eval $ac_link) 2>conftest.er1
8322   ac_status=$?
8323   grep -v '^ *+' conftest.er1 >conftest.err
8324   rm -f conftest.er1
8325   cat conftest.err >&5
8326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327   (exit $ac_status); } &&
8328          { ac_try='test -z "$ac_c_werror_flag"
8329                          || test ! -s conftest.err'
8330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8331   (eval $ac_try) 2>&5
8332   ac_status=$?
8333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334   (exit $ac_status); }; } &&
8335          { ac_try='test -s conftest$ac_exeext'
8336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8337   (eval $ac_try) 2>&5
8338   ac_status=$?
8339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340   (exit $ac_status); }; }; then
8341
8342 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8343 }'`
8344 # Check for a 64-bit object if we didn't find anything.
8345 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; }
8346 }'`; fi
8347 else
8348   echo "$as_me: failed program was:" >&5
8349 sed 's/^/| /' conftest.$ac_ext >&5
8350
8351 fi
8352 rm -f conftest.err conftest.$ac_objext \
8353       conftest$ac_exeext conftest.$ac_ext
8354 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8355
8356        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8357         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"
8358        else
8359         if test "$host_cpu" = ia64; then
8360           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8361           allow_undefined_flag="-z nodefs"
8362           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"
8363         else
8364          # Determine the default libpath from the value encoded in an empty executable.
8365          cat >conftest.$ac_ext <<_ACEOF
8366 /* confdefs.h.  */
8367 _ACEOF
8368 cat confdefs.h >>conftest.$ac_ext
8369 cat >>conftest.$ac_ext <<_ACEOF
8370 /* end confdefs.h.  */
8371
8372 int
8373 main ()
8374 {
8375
8376   ;
8377   return 0;
8378 }
8379 _ACEOF
8380 rm -f conftest.$ac_objext conftest$ac_exeext
8381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8382   (eval $ac_link) 2>conftest.er1
8383   ac_status=$?
8384   grep -v '^ *+' conftest.er1 >conftest.err
8385   rm -f conftest.er1
8386   cat conftest.err >&5
8387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388   (exit $ac_status); } &&
8389          { ac_try='test -z "$ac_c_werror_flag"
8390                          || test ! -s conftest.err'
8391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392   (eval $ac_try) 2>&5
8393   ac_status=$?
8394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395   (exit $ac_status); }; } &&
8396          { ac_try='test -s conftest$ac_exeext'
8397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398   (eval $ac_try) 2>&5
8399   ac_status=$?
8400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401   (exit $ac_status); }; }; then
8402
8403 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
8404 }'`
8405 # Check for a 64-bit object if we didn't find anything.
8406 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; }
8407 }'`; fi
8408 else
8409   echo "$as_me: failed program was:" >&5
8410 sed 's/^/| /' conftest.$ac_ext >&5
8411
8412 fi
8413 rm -f conftest.err conftest.$ac_objext \
8414       conftest$ac_exeext conftest.$ac_ext
8415 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8416
8417          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8418           # Warning - without using the other run time loading flags,
8419           # -berok will link without error, but may produce a broken library.
8420           no_undefined_flag=' ${wl}-bernotok'
8421           allow_undefined_flag=' ${wl}-berok'
8422           # -bexpall does not export symbols beginning with underscore (_)
8423           always_export_symbols=yes
8424           # Exported symbols can be pulled into shared objects from archives
8425           whole_archive_flag_spec=' '
8426           archive_cmds_need_lc=yes
8427           # This is similar to how AIX traditionally builds its shared libraries.
8428           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'
8429         fi
8430       fi
8431       ;;
8432
8433     amigaos*)
8434       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)'
8435       hardcode_libdir_flag_spec='-L$libdir'
8436       hardcode_minus_L=yes
8437       # see comment about different semantics on the GNU ld section
8438       ld_shlibs=no
8439       ;;
8440
8441     bsdi[45]*)
8442       export_dynamic_flag_spec=-rdynamic
8443       ;;
8444
8445     cygwin* | mingw* | pw32*)
8446       # When not using gcc, we currently assume that we are using
8447       # Microsoft Visual C++.
8448       # hardcode_libdir_flag_spec is actually meaningless, as there is
8449       # no search path for DLLs.
8450       hardcode_libdir_flag_spec=' '
8451       allow_undefined_flag=unsupported
8452       # Tell ltmain to make .lib files, not .a files.
8453       libext=lib
8454       # Tell ltmain to make .dll files, not .so files.
8455       shrext_cmds=".dll"
8456       # FIXME: Setting linknames here is a bad hack.
8457       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8458       # The linker will automatically build a .lib file if we build a DLL.
8459       old_archive_From_new_cmds='true'
8460       # FIXME: Should let the user specify the lib program.
8461       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
8462       fix_srcfile_path='`cygpath -w "$srcfile"`'
8463       enable_shared_with_static_runtimes=yes
8464       ;;
8465
8466     darwin* | rhapsody*)
8467       case $host_os in
8468         rhapsody* | darwin1.[012])
8469          allow_undefined_flag='${wl}-undefined ${wl}suppress'
8470          ;;
8471        *) # Darwin 1.3 on
8472          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8473            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8474          else
8475            case ${MACOSX_DEPLOYMENT_TARGET} in
8476              10.[012])
8477                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8478                ;;
8479              10.*)
8480                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8481                ;;
8482            esac
8483          fi
8484          ;;
8485       esac
8486       archive_cmds_need_lc=no
8487       hardcode_direct=no
8488       hardcode_automatic=yes
8489       hardcode_shlibpath_var=unsupported
8490       whole_archive_flag_spec=''
8491       link_all_deplibs=yes
8492     if test "$GCC" = yes ; then
8493         output_verbose_link_cmd='echo'
8494         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8495       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8496       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8497       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}'
8498       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}'
8499     else
8500       case $cc_basename in
8501         xlc*)
8502          output_verbose_link_cmd='echo'
8503          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8504          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8505           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8506          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}'
8507           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}'
8508           ;;
8509        *)
8510          ld_shlibs=no
8511           ;;
8512       esac
8513     fi
8514       ;;
8515
8516     dgux*)
8517       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8518       hardcode_libdir_flag_spec='-L$libdir'
8519       hardcode_shlibpath_var=no
8520       ;;
8521
8522     freebsd1*)
8523       ld_shlibs=no
8524       ;;
8525
8526     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8527     # support.  Future versions do this automatically, but an explicit c++rt0.o
8528     # does not break anything, and helps significantly (at the cost of a little
8529     # extra space).
8530     freebsd2.2*)
8531       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8532       hardcode_libdir_flag_spec='-R$libdir'
8533       hardcode_direct=yes
8534       hardcode_shlibpath_var=no
8535       ;;
8536
8537     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8538     freebsd2*)
8539       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8540       hardcode_direct=yes
8541       hardcode_minus_L=yes
8542       hardcode_shlibpath_var=no
8543       ;;
8544
8545     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8546     freebsd* | kfreebsd*-gnu | dragonfly*)
8547       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8548       hardcode_libdir_flag_spec='-R$libdir'
8549       hardcode_direct=yes
8550       hardcode_shlibpath_var=no
8551       ;;
8552
8553     hpux9*)
8554       if test "$GCC" = yes; then
8555         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'
8556       else
8557         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'
8558       fi
8559       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8560       hardcode_libdir_separator=:
8561       hardcode_direct=yes
8562
8563       # hardcode_minus_L: Not really in the search PATH,
8564       # but as the default location of the library.
8565       hardcode_minus_L=yes
8566       export_dynamic_flag_spec='${wl}-E'
8567       ;;
8568
8569     hpux10* | hpux11*)
8570       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8571         case $host_cpu in
8572         hppa*64*|ia64*)
8573           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8574           ;;
8575         *)
8576           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8577           ;;
8578         esac
8579       else
8580         case $host_cpu in
8581         hppa*64*|ia64*)
8582           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8583           ;;
8584         *)
8585           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8586           ;;
8587         esac
8588       fi
8589       if test "$with_gnu_ld" = no; then
8590         case $host_cpu in
8591         hppa*64*)
8592           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8593           hardcode_libdir_flag_spec_ld='+b $libdir'
8594           hardcode_libdir_separator=:
8595           hardcode_direct=no
8596           hardcode_shlibpath_var=no
8597           ;;
8598         ia64*)
8599           hardcode_libdir_flag_spec='-L$libdir'
8600           hardcode_direct=no
8601           hardcode_shlibpath_var=no
8602
8603           # hardcode_minus_L: Not really in the search PATH,
8604           # but as the default location of the library.
8605           hardcode_minus_L=yes
8606           ;;
8607         *)
8608           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8609           hardcode_libdir_separator=:
8610           hardcode_direct=yes
8611           export_dynamic_flag_spec='${wl}-E'
8612
8613           # hardcode_minus_L: Not really in the search PATH,
8614           # but as the default location of the library.
8615           hardcode_minus_L=yes
8616           ;;
8617         esac
8618       fi
8619       ;;
8620
8621     irix5* | irix6* | nonstopux*)
8622       if test "$GCC" = yes; then
8623         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'
8624       else
8625         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'
8626         hardcode_libdir_flag_spec_ld='-rpath $libdir'
8627       fi
8628       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8629       hardcode_libdir_separator=:
8630       link_all_deplibs=yes
8631       ;;
8632
8633     netbsd*)
8634       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8635         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8636       else
8637         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8638       fi
8639       hardcode_libdir_flag_spec='-R$libdir'
8640       hardcode_direct=yes
8641       hardcode_shlibpath_var=no
8642       ;;
8643
8644     newsos6)
8645       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8646       hardcode_direct=yes
8647       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8648       hardcode_libdir_separator=:
8649       hardcode_shlibpath_var=no
8650       ;;
8651
8652     openbsd*)
8653       hardcode_direct=yes
8654       hardcode_shlibpath_var=no
8655       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8656         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8657         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8658         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8659         export_dynamic_flag_spec='${wl}-E'
8660       else
8661        case $host_os in
8662          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8663            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8664            hardcode_libdir_flag_spec='-R$libdir'
8665            ;;
8666          *)
8667            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8668            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8669            ;;
8670        esac
8671       fi
8672       ;;
8673
8674     os2*)
8675       hardcode_libdir_flag_spec='-L$libdir'
8676       hardcode_minus_L=yes
8677       allow_undefined_flag=unsupported
8678       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'
8679       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8680       ;;
8681
8682     osf3*)
8683       if test "$GCC" = yes; then
8684         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8685         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'
8686       else
8687         allow_undefined_flag=' -expect_unresolved \*'
8688         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'
8689       fi
8690       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8691       hardcode_libdir_separator=:
8692       ;;
8693
8694     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8695       if test "$GCC" = yes; then
8696         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8697         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'
8698         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8699       else
8700         allow_undefined_flag=' -expect_unresolved \*'
8701         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'
8702         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8703         $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'
8704
8705         # Both c and cxx compiler support -rpath directly
8706         hardcode_libdir_flag_spec='-rpath $libdir'
8707       fi
8708       hardcode_libdir_separator=:
8709       ;;
8710
8711     sco3.2v5*)
8712       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8713       hardcode_shlibpath_var=no
8714       export_dynamic_flag_spec='${wl}-Bexport'
8715       runpath_var=LD_RUN_PATH
8716       hardcode_runpath_var=yes
8717       ;;
8718
8719     solaris*)
8720       no_undefined_flag=' -z text'
8721       if test "$GCC" = yes; then
8722         wlarc='${wl}'
8723         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8724         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8725           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8726       else
8727         wlarc=''
8728         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8729         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8730         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8731       fi
8732       hardcode_libdir_flag_spec='-R$libdir'
8733       hardcode_shlibpath_var=no
8734       case $host_os in
8735       solaris2.[0-5] | solaris2.[0-5].*) ;;
8736       *)
8737         # The compiler driver will combine linker options so we
8738         # cannot just pass the convience library names through
8739         # without $wl, iff we do not link with $LD.
8740         # Luckily, gcc supports the same syntax we need for Sun Studio.
8741         # Supported since Solaris 2.6 (maybe 2.5.1?)
8742         case $wlarc in
8743         '')
8744           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8745         *)
8746           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' ;;
8747         esac ;;
8748       esac
8749       link_all_deplibs=yes
8750       ;;
8751
8752     sunos4*)
8753       if test "x$host_vendor" = xsequent; then
8754         # Use $CC to link under sequent, because it throws in some extra .o
8755         # files that make .init and .fini sections work.
8756         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8757       else
8758         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8759       fi
8760       hardcode_libdir_flag_spec='-L$libdir'
8761       hardcode_direct=yes
8762       hardcode_minus_L=yes
8763       hardcode_shlibpath_var=no
8764       ;;
8765
8766     sysv4)
8767       case $host_vendor in
8768         sni)
8769           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8770           hardcode_direct=yes # is this really true???
8771         ;;
8772         siemens)
8773           ## LD is ld it makes a PLAMLIB
8774           ## CC just makes a GrossModule.
8775           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8776           reload_cmds='$CC -r -o $output$reload_objs'
8777           hardcode_direct=no
8778         ;;
8779         motorola)
8780           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8781           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8782         ;;
8783       esac
8784       runpath_var='LD_RUN_PATH'
8785       hardcode_shlibpath_var=no
8786       ;;
8787
8788     sysv4.3*)
8789       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8790       hardcode_shlibpath_var=no
8791       export_dynamic_flag_spec='-Bexport'
8792       ;;
8793
8794     sysv4*MP*)
8795       if test -d /usr/nec; then
8796         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8797         hardcode_shlibpath_var=no
8798         runpath_var=LD_RUN_PATH
8799         hardcode_runpath_var=yes
8800         ld_shlibs=yes
8801       fi
8802       ;;
8803
8804     sysv4.2uw2*)
8805       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8806       hardcode_direct=yes
8807       hardcode_minus_L=no
8808       hardcode_shlibpath_var=no
8809       hardcode_runpath_var=yes
8810       runpath_var=LD_RUN_PATH
8811       ;;
8812
8813    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
8814       no_undefined_flag='${wl}-z ${wl}text'
8815       if test "$GCC" = yes; then
8816         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8817       else
8818         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8819       fi
8820       runpath_var='LD_RUN_PATH'
8821       hardcode_shlibpath_var=no
8822       ;;
8823
8824     sysv5*)
8825       no_undefined_flag=' -z text'
8826       # $CC -shared without GNU ld will not create a library from C++
8827       # object files and a static libstdc++, better avoid it by now
8828       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8829       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8830                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8831       hardcode_libdir_flag_spec=
8832       hardcode_shlibpath_var=no
8833       runpath_var='LD_RUN_PATH'
8834       ;;
8835
8836     uts4*)
8837       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8838       hardcode_libdir_flag_spec='-L$libdir'
8839       hardcode_shlibpath_var=no
8840       ;;
8841
8842     *)
8843       ld_shlibs=no
8844       ;;
8845     esac
8846   fi
8847
8848 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8849 echo "${ECHO_T}$ld_shlibs" >&6
8850 test "$ld_shlibs" = no && can_build_shared=no
8851
8852 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8853 if test "$GCC" = yes; then
8854   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8855 fi
8856
8857 #
8858 # Do we need to explicitly link libc?
8859 #
8860 case "x$archive_cmds_need_lc" in
8861 x|xyes)
8862   # Assume -lc should be added
8863   archive_cmds_need_lc=yes
8864
8865   if test "$enable_shared" = yes && test "$GCC" = yes; then
8866     case $archive_cmds in
8867     *'~'*)
8868       # FIXME: we may have to deal with multi-command sequences.
8869       ;;
8870     '$CC '*)
8871       # Test whether the compiler implicitly links with -lc since on some
8872       # systems, -lgcc has to come before -lc. If gcc already passes -lc
8873       # to ld, don't add -lc before -lgcc.
8874       echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8875 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8876       $rm conftest*
8877       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8878
8879       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8880   (eval $ac_compile) 2>&5
8881   ac_status=$?
8882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8883   (exit $ac_status); } 2>conftest.err; then
8884         soname=conftest
8885         lib=conftest
8886         libobjs=conftest.$ac_objext
8887         deplibs=
8888         wl=$lt_prog_compiler_wl
8889         compiler_flags=-v
8890         linker_flags=-v
8891         verstring=
8892         output_objdir=.
8893         libname=conftest
8894         lt_save_allow_undefined_flag=$allow_undefined_flag
8895         allow_undefined_flag=
8896         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8897   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8898   ac_status=$?
8899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900   (exit $ac_status); }
8901         then
8902           archive_cmds_need_lc=no
8903         else
8904           archive_cmds_need_lc=yes
8905         fi
8906         allow_undefined_flag=$lt_save_allow_undefined_flag
8907       else
8908         cat conftest.err 1>&5
8909       fi
8910       $rm conftest*
8911       echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
8912 echo "${ECHO_T}$archive_cmds_need_lc" >&6
8913       ;;
8914     esac
8915   fi
8916   ;;
8917 esac
8918
8919 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
8920 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
8921 library_names_spec=
8922 libname_spec='lib$name'
8923 soname_spec=
8924 shrext_cmds=".so"
8925 postinstall_cmds=
8926 postuninstall_cmds=
8927 finish_cmds=
8928 finish_eval=
8929 shlibpath_var=
8930 shlibpath_overrides_runpath=unknown
8931 version_type=none
8932 dynamic_linker="$host_os ld.so"
8933 sys_lib_dlsearch_path_spec="/lib /usr/lib"
8934 if test "$GCC" = yes; then
8935   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8936   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
8937     # if the path contains ";" then we assume it to be the separator
8938     # otherwise default to the standard path separator (i.e. ":") - it is
8939     # assumed that no part of a normal pathname contains ";" but that should
8940     # okay in the real world where ";" in dirpaths is itself problematic.
8941     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8942   else
8943     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
8944   fi
8945 else
8946   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8947 fi
8948 need_lib_prefix=unknown
8949 hardcode_into_libs=no
8950
8951 # when you set need_version to no, make sure it does not cause -set_version
8952 # flags to be left without arguments
8953 need_version=unknown
8954
8955 case $host_os in
8956 aix3*)
8957   version_type=linux
8958   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
8959   shlibpath_var=LIBPATH
8960
8961   # AIX 3 has no versioning support, so we append a major version to the name.
8962   soname_spec='${libname}${release}${shared_ext}$major'
8963   ;;
8964
8965 aix4* | aix5*)
8966   version_type=linux
8967   need_lib_prefix=no
8968   need_version=no
8969   hardcode_into_libs=yes
8970   if test "$host_cpu" = ia64; then
8971     # AIX 5 supports IA64
8972     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
8973     shlibpath_var=LD_LIBRARY_PATH
8974   else
8975     # With GCC up to 2.95.x, collect2 would create an import file
8976     # for dependence libraries.  The import file would start with
8977     # the line `#! .'.  This would cause the generated library to
8978     # depend on `.', always an invalid library.  This was fixed in
8979     # development snapshots of GCC prior to 3.0.
8980     case $host_os in
8981       aix4 | aix4.[01] | aix4.[01].*)
8982       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
8983            echo ' yes '
8984            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
8985         :
8986       else
8987         can_build_shared=no
8988       fi
8989       ;;
8990     esac
8991     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
8992     # soname into executable. Probably we can add versioning support to
8993     # collect2, so additional links can be useful in future.
8994     if test "$aix_use_runtimelinking" = yes; then
8995       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
8996       # instead of lib<name>.a to let people know that these are not
8997       # typical AIX shared libraries.
8998       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8999     else
9000       # We preserve .a as extension for shared libraries through AIX4.2
9001       # and later when we are not doing run time linking.
9002       library_names_spec='${libname}${release}.a $libname.a'
9003       soname_spec='${libname}${release}${shared_ext}$major'
9004     fi
9005     shlibpath_var=LIBPATH
9006   fi
9007   ;;
9008
9009 amigaos*)
9010   library_names_spec='$libname.ixlibrary $libname.a'
9011   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9012   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'
9013   ;;
9014
9015 beos*)
9016   library_names_spec='${libname}${shared_ext}'
9017   dynamic_linker="$host_os ld.so"
9018   shlibpath_var=LIBRARY_PATH
9019   ;;
9020
9021 bsdi[45]*)
9022   version_type=linux
9023   need_version=no
9024   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9025   soname_spec='${libname}${release}${shared_ext}$major'
9026   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9027   shlibpath_var=LD_LIBRARY_PATH
9028   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9029   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9030   # the default ld.so.conf also contains /usr/contrib/lib and
9031   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9032   # libtool to hard-code these into programs
9033   ;;
9034
9035 cygwin* | mingw* | pw32*)
9036   version_type=windows
9037   shrext_cmds=".dll"
9038   need_version=no
9039   need_lib_prefix=no
9040
9041   case $GCC,$host_os in
9042   yes,cygwin* | yes,mingw* | yes,pw32*)
9043     library_names_spec='$libname.dll.a'
9044     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9045     postinstall_cmds='base_file=`basename \${file}`~
9046       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9047       dldir=$destdir/`dirname \$dlpath`~
9048       test -d \$dldir || mkdir -p \$dldir~
9049       $install_prog $dir/$dlname \$dldir/$dlname~
9050       chmod a+x \$dldir/$dlname'
9051     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9052       dlpath=$dir/\$dldll~
9053        $rm \$dlpath'
9054     shlibpath_overrides_runpath=yes
9055
9056     case $host_os in
9057     cygwin*)
9058       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9059       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9060       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9061       ;;
9062     mingw*)
9063       # MinGW DLLs use traditional 'lib' prefix
9064       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9065       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9066       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9067         # It is most probably a Windows format PATH printed by
9068         # mingw gcc, but we are running on Cygwin. Gcc prints its search
9069         # path with ; separators, and with drive letters. We can handle the
9070         # drive letters (cygwin fileutils understands them), so leave them,
9071         # especially as we might pass files found there to a mingw objdump,
9072         # which wouldn't understand a cygwinified path. Ahh.
9073         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9074       else
9075         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9076       fi
9077       ;;
9078     pw32*)
9079       # pw32 DLLs use 'pw' prefix rather than 'lib'
9080       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9081       ;;
9082     esac
9083     ;;
9084
9085   *)
9086     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9087     ;;
9088   esac
9089   dynamic_linker='Win32 ld.exe'
9090   # FIXME: first we should search . and the directory the executable is in
9091   shlibpath_var=PATH
9092   ;;
9093
9094 darwin* | rhapsody*)
9095   dynamic_linker="$host_os dyld"
9096   version_type=darwin
9097   need_lib_prefix=no
9098   need_version=no
9099   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9100   soname_spec='${libname}${release}${major}$shared_ext'
9101   shlibpath_overrides_runpath=yes
9102   shlibpath_var=DYLD_LIBRARY_PATH
9103   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9104   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
9105   if test "$GCC" = yes; then
9106     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"`
9107   else
9108     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
9109   fi
9110   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9111   ;;
9112
9113 dgux*)
9114   version_type=linux
9115   need_lib_prefix=no
9116   need_version=no
9117   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9118   soname_spec='${libname}${release}${shared_ext}$major'
9119   shlibpath_var=LD_LIBRARY_PATH
9120   ;;
9121
9122 freebsd1*)
9123   dynamic_linker=no
9124   ;;
9125
9126 kfreebsd*-gnu)
9127   version_type=linux
9128   need_lib_prefix=no
9129   need_version=no
9130   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9131   soname_spec='${libname}${release}${shared_ext}$major'
9132   shlibpath_var=LD_LIBRARY_PATH
9133   shlibpath_overrides_runpath=no
9134   hardcode_into_libs=yes
9135   dynamic_linker='GNU ld.so'
9136   ;;
9137
9138 freebsd* | dragonfly*)
9139   # DragonFly does not have aout.  When/if they implement a new
9140   # versioning mechanism, adjust this.
9141   if test -x /usr/bin/objformat; then
9142     objformat=`/usr/bin/objformat`
9143   else
9144     case $host_os in
9145     freebsd[123]*) objformat=aout ;;
9146     *) objformat=elf ;;
9147     esac
9148   fi
9149   version_type=freebsd-$objformat
9150   case $version_type in
9151     freebsd-elf*)
9152       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9153       need_version=no
9154       need_lib_prefix=no
9155       ;;
9156     freebsd-*)
9157       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9158       need_version=yes
9159       ;;
9160   esac
9161   shlibpath_var=LD_LIBRARY_PATH
9162   case $host_os in
9163   freebsd2*)
9164     shlibpath_overrides_runpath=yes
9165     ;;
9166   freebsd3.[01]* | freebsdelf3.[01]*)
9167     shlibpath_overrides_runpath=yes
9168     hardcode_into_libs=yes
9169     ;;
9170   *) # from 3.2 on
9171     shlibpath_overrides_runpath=no
9172     hardcode_into_libs=yes
9173     ;;
9174   esac
9175   ;;
9176
9177 gnu*)
9178   version_type=linux
9179   need_lib_prefix=no
9180   need_version=no
9181   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9182   soname_spec='${libname}${release}${shared_ext}$major'
9183   shlibpath_var=LD_LIBRARY_PATH
9184   hardcode_into_libs=yes
9185   ;;
9186
9187 hpux9* | hpux10* | hpux11*)
9188   # Give a soname corresponding to the major version so that dld.sl refuses to
9189   # link against other versions.
9190   version_type=sunos
9191   need_lib_prefix=no
9192   need_version=no
9193   case $host_cpu in
9194   ia64*)
9195     shrext_cmds='.so'
9196     hardcode_into_libs=yes
9197     dynamic_linker="$host_os dld.so"
9198     shlibpath_var=LD_LIBRARY_PATH
9199     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9200     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9201     soname_spec='${libname}${release}${shared_ext}$major'
9202     if test "X$HPUX_IA64_MODE" = X32; then
9203       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9204     else
9205       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9206     fi
9207     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9208     ;;
9209    hppa*64*)
9210      shrext_cmds='.sl'
9211      hardcode_into_libs=yes
9212      dynamic_linker="$host_os dld.sl"
9213      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9214      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9215      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9216      soname_spec='${libname}${release}${shared_ext}$major'
9217      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9218      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9219      ;;
9220    *)
9221     shrext_cmds='.sl'
9222     dynamic_linker="$host_os dld.sl"
9223     shlibpath_var=SHLIB_PATH
9224     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9225     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9226     soname_spec='${libname}${release}${shared_ext}$major'
9227     ;;
9228   esac
9229   # HP-UX runs *really* slowly unless shared libraries are mode 555.
9230   postinstall_cmds='chmod 555 $lib'
9231   ;;
9232
9233 irix5* | irix6* | nonstopux*)
9234   case $host_os in
9235     nonstopux*) version_type=nonstopux ;;
9236     *)
9237         if test "$lt_cv_prog_gnu_ld" = yes; then
9238                 version_type=linux
9239         else
9240                 version_type=irix
9241         fi ;;
9242   esac
9243   need_lib_prefix=no
9244   need_version=no
9245   soname_spec='${libname}${release}${shared_ext}$major'
9246   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9247   case $host_os in
9248   irix5* | nonstopux*)
9249     libsuff= shlibsuff=
9250     ;;
9251   *)
9252     case $LD in # libtool.m4 will add one of these switches to LD
9253     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9254       libsuff= shlibsuff= libmagic=32-bit;;
9255     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9256       libsuff=32 shlibsuff=N32 libmagic=N32;;
9257     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9258       libsuff=64 shlibsuff=64 libmagic=64-bit;;
9259     *) libsuff= shlibsuff= libmagic=never-match;;
9260     esac
9261     ;;
9262   esac
9263   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9264   shlibpath_overrides_runpath=no
9265   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9266   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9267   hardcode_into_libs=yes
9268   ;;
9269
9270 # No shared lib support for Linux oldld, aout, or coff.
9271 linux*oldld* | linux*aout* | linux*coff*)
9272   dynamic_linker=no
9273   ;;
9274
9275 # This must be Linux ELF.
9276 linux*)
9277   version_type=linux
9278   need_lib_prefix=no
9279   need_version=no
9280   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9281   soname_spec='${libname}${release}${shared_ext}$major'
9282   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9283   shlibpath_var=LD_LIBRARY_PATH
9284   shlibpath_overrides_runpath=no
9285   # This implies no fast_install, which is unacceptable.
9286   # Some rework will be needed to allow for fast_install
9287   # before this can be enabled.
9288   hardcode_into_libs=yes
9289
9290   # Append ld.so.conf contents to the search path
9291   if test -f /etc/ld.so.conf; then
9292     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' ' '`
9293     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9294   fi
9295
9296   # We used to test for /lib/ld.so.1 and disable shared libraries on
9297   # powerpc, because MkLinux only supported shared libraries with the
9298   # GNU dynamic linker.  Since this was broken with cross compilers,
9299   # most powerpc-linux boxes support dynamic linking these days and
9300   # people can always --disable-shared, the test was removed, and we
9301   # assume the GNU/Linux dynamic linker is in use.
9302   dynamic_linker='GNU/Linux ld.so'
9303   ;;
9304
9305 knetbsd*-gnu)
9306   version_type=linux
9307   need_lib_prefix=no
9308   need_version=no
9309   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9310   soname_spec='${libname}${release}${shared_ext}$major'
9311   shlibpath_var=LD_LIBRARY_PATH
9312   shlibpath_overrides_runpath=no
9313   hardcode_into_libs=yes
9314   dynamic_linker='GNU ld.so'
9315   ;;
9316
9317 netbsd*)
9318   version_type=sunos
9319   need_lib_prefix=no
9320   need_version=no
9321   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9322     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9323     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9324     dynamic_linker='NetBSD (a.out) ld.so'
9325   else
9326     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9327     soname_spec='${libname}${release}${shared_ext}$major'
9328     dynamic_linker='NetBSD ld.elf_so'
9329   fi
9330   shlibpath_var=LD_LIBRARY_PATH
9331   shlibpath_overrides_runpath=yes
9332   hardcode_into_libs=yes
9333   ;;
9334
9335 newsos6)
9336   version_type=linux
9337   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9338   shlibpath_var=LD_LIBRARY_PATH
9339   shlibpath_overrides_runpath=yes
9340   ;;
9341
9342 nto-qnx*)
9343   version_type=linux
9344   need_lib_prefix=no
9345   need_version=no
9346   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9347   soname_spec='${libname}${release}${shared_ext}$major'
9348   shlibpath_var=LD_LIBRARY_PATH
9349   shlibpath_overrides_runpath=yes
9350   ;;
9351
9352 openbsd*)
9353   version_type=sunos
9354   need_lib_prefix=no
9355   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9356   case $host_os in
9357     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9358     *)                         need_version=no  ;;
9359   esac
9360   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9361   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9362   shlibpath_var=LD_LIBRARY_PATH
9363   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9364     case $host_os in
9365       openbsd2.[89] | openbsd2.[89].*)
9366         shlibpath_overrides_runpath=no
9367         ;;
9368       *)
9369         shlibpath_overrides_runpath=yes
9370         ;;
9371       esac
9372   else
9373     shlibpath_overrides_runpath=yes
9374   fi
9375   ;;
9376
9377 os2*)
9378   libname_spec='$name'
9379   shrext_cmds=".dll"
9380   need_lib_prefix=no
9381   library_names_spec='$libname${shared_ext} $libname.a'
9382   dynamic_linker='OS/2 ld.exe'
9383   shlibpath_var=LIBPATH
9384   ;;
9385
9386 osf3* | osf4* | osf5*)
9387   version_type=osf
9388   need_lib_prefix=no
9389   need_version=no
9390   soname_spec='${libname}${release}${shared_ext}$major'
9391   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9392   shlibpath_var=LD_LIBRARY_PATH
9393   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9394   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9395   ;;
9396
9397 sco3.2v5*)
9398   version_type=osf
9399   soname_spec='${libname}${release}${shared_ext}$major'
9400   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9401   shlibpath_var=LD_LIBRARY_PATH
9402   ;;
9403
9404 solaris*)
9405   version_type=linux
9406   need_lib_prefix=no
9407   need_version=no
9408   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9409   soname_spec='${libname}${release}${shared_ext}$major'
9410   shlibpath_var=LD_LIBRARY_PATH
9411   shlibpath_overrides_runpath=yes
9412   hardcode_into_libs=yes
9413   # ldd complains unless libraries are executable
9414   postinstall_cmds='chmod +x $lib'
9415   ;;
9416
9417 sunos4*)
9418   version_type=sunos
9419   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9420   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9421   shlibpath_var=LD_LIBRARY_PATH
9422   shlibpath_overrides_runpath=yes
9423   if test "$with_gnu_ld" = yes; then
9424     need_lib_prefix=no
9425   fi
9426   need_version=yes
9427   ;;
9428
9429 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9430   version_type=linux
9431   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9432   soname_spec='${libname}${release}${shared_ext}$major'
9433   shlibpath_var=LD_LIBRARY_PATH
9434   case $host_vendor in
9435     sni)
9436       shlibpath_overrides_runpath=no
9437       need_lib_prefix=no
9438       export_dynamic_flag_spec='${wl}-Blargedynsym'
9439       runpath_var=LD_RUN_PATH
9440       ;;
9441     siemens)
9442       need_lib_prefix=no
9443       ;;
9444     motorola)
9445       need_lib_prefix=no
9446       need_version=no
9447       shlibpath_overrides_runpath=no
9448       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9449       ;;
9450   esac
9451   ;;
9452
9453 sysv4*MP*)
9454   if test -d /usr/nec ;then
9455     version_type=linux
9456     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9457     soname_spec='$libname${shared_ext}.$major'
9458     shlibpath_var=LD_LIBRARY_PATH
9459   fi
9460   ;;
9461
9462 uts4*)
9463   version_type=linux
9464   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9465   soname_spec='${libname}${release}${shared_ext}$major'
9466   shlibpath_var=LD_LIBRARY_PATH
9467   ;;
9468
9469 *)
9470   dynamic_linker=no
9471   ;;
9472 esac
9473 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9474 echo "${ECHO_T}$dynamic_linker" >&6
9475 test "$dynamic_linker" = no && can_build_shared=no
9476
9477 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9478 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
9479 hardcode_action=
9480 if test -n "$hardcode_libdir_flag_spec" || \
9481    test -n "$runpath_var" || \
9482    test "X$hardcode_automatic" = "Xyes" ; then
9483
9484   # We can hardcode non-existant directories.
9485   if test "$hardcode_direct" != no &&
9486      # If the only mechanism to avoid hardcoding is shlibpath_var, we
9487      # have to relink, otherwise we might link with an installed library
9488      # when we should be linking with a yet-to-be-installed one
9489      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9490      test "$hardcode_minus_L" != no; then
9491     # Linking always hardcodes the temporary library directory.
9492     hardcode_action=relink
9493   else
9494     # We can link without hardcoding, and we can hardcode nonexisting dirs.
9495     hardcode_action=immediate
9496   fi
9497 else
9498   # We cannot hardcode anything, or else we can only hardcode existing
9499   # directories.
9500   hardcode_action=unsupported
9501 fi
9502 echo "$as_me:$LINENO: result: $hardcode_action" >&5
9503 echo "${ECHO_T}$hardcode_action" >&6
9504
9505 if test "$hardcode_action" = relink; then
9506   # Fast installation is not supported
9507   enable_fast_install=no
9508 elif test "$shlibpath_overrides_runpath" = yes ||
9509      test "$enable_shared" = no; then
9510   # Fast installation is not necessary
9511   enable_fast_install=needless
9512 fi
9513
9514 striplib=
9515 old_striplib=
9516 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9517 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
9518 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9519   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9520   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9521   echo "$as_me:$LINENO: result: yes" >&5
9522 echo "${ECHO_T}yes" >&6
9523 else
9524 # FIXME - insert some real tests, host_os isn't really good enough
9525   case $host_os in
9526    darwin*)
9527        if test -n "$STRIP" ; then
9528          striplib="$STRIP -x"
9529          echo "$as_me:$LINENO: result: yes" >&5
9530 echo "${ECHO_T}yes" >&6
9531        else
9532   echo "$as_me:$LINENO: result: no" >&5
9533 echo "${ECHO_T}no" >&6
9534 fi
9535        ;;
9536    *)
9537   echo "$as_me:$LINENO: result: no" >&5
9538 echo "${ECHO_T}no" >&6
9539     ;;
9540   esac
9541 fi
9542
9543 if test "x$enable_dlopen" != xyes; then
9544   enable_dlopen=unknown
9545   enable_dlopen_self=unknown
9546   enable_dlopen_self_static=unknown
9547 else
9548   lt_cv_dlopen=no
9549   lt_cv_dlopen_libs=
9550
9551   case $host_os in
9552   beos*)
9553     lt_cv_dlopen="load_add_on"
9554     lt_cv_dlopen_libs=
9555     lt_cv_dlopen_self=yes
9556     ;;
9557
9558   mingw* | pw32*)
9559     lt_cv_dlopen="LoadLibrary"
9560     lt_cv_dlopen_libs=
9561    ;;
9562
9563   cygwin*)
9564     lt_cv_dlopen="dlopen"
9565     lt_cv_dlopen_libs=
9566    ;;
9567
9568   darwin*)
9569   # if libdl is installed we need to link against it
9570     echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9571 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9572 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9573   echo $ECHO_N "(cached) $ECHO_C" >&6
9574 else
9575   ac_check_lib_save_LIBS=$LIBS
9576 LIBS="-ldl  $LIBS"
9577 cat >conftest.$ac_ext <<_ACEOF
9578 /* confdefs.h.  */
9579 _ACEOF
9580 cat confdefs.h >>conftest.$ac_ext
9581 cat >>conftest.$ac_ext <<_ACEOF
9582 /* end confdefs.h.  */
9583
9584 /* Override any gcc2 internal prototype to avoid an error.  */
9585 #ifdef __cplusplus
9586 extern "C"
9587 #endif
9588 /* We use char because int might match the return type of a gcc2
9589    builtin and then its argument prototype would still apply.  */
9590 char dlopen ();
9591 int
9592 main ()
9593 {
9594 dlopen ();
9595   ;
9596   return 0;
9597 }
9598 _ACEOF
9599 rm -f conftest.$ac_objext conftest$ac_exeext
9600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9601   (eval $ac_link) 2>conftest.er1
9602   ac_status=$?
9603   grep -v '^ *+' conftest.er1 >conftest.err
9604   rm -f conftest.er1
9605   cat conftest.err >&5
9606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9607   (exit $ac_status); } &&
9608          { ac_try='test -z "$ac_c_werror_flag"
9609                          || test ! -s conftest.err'
9610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9611   (eval $ac_try) 2>&5
9612   ac_status=$?
9613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9614   (exit $ac_status); }; } &&
9615          { ac_try='test -s conftest$ac_exeext'
9616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9617   (eval $ac_try) 2>&5
9618   ac_status=$?
9619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620   (exit $ac_status); }; }; then
9621   ac_cv_lib_dl_dlopen=yes
9622 else
9623   echo "$as_me: failed program was:" >&5
9624 sed 's/^/| /' conftest.$ac_ext >&5
9625
9626 ac_cv_lib_dl_dlopen=no
9627 fi
9628 rm -f conftest.err conftest.$ac_objext \
9629       conftest$ac_exeext conftest.$ac_ext
9630 LIBS=$ac_check_lib_save_LIBS
9631 fi
9632 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9633 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9634 if test $ac_cv_lib_dl_dlopen = yes; then
9635   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9636 else
9637
9638     lt_cv_dlopen="dyld"
9639     lt_cv_dlopen_libs=
9640     lt_cv_dlopen_self=yes
9641
9642 fi
9643
9644    ;;
9645
9646   *)
9647     echo "$as_me:$LINENO: checking for shl_load" >&5
9648 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
9649 if test "${ac_cv_func_shl_load+set}" = set; then
9650   echo $ECHO_N "(cached) $ECHO_C" >&6
9651 else
9652   cat >conftest.$ac_ext <<_ACEOF
9653 /* confdefs.h.  */
9654 _ACEOF
9655 cat confdefs.h >>conftest.$ac_ext
9656 cat >>conftest.$ac_ext <<_ACEOF
9657 /* end confdefs.h.  */
9658 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9659    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9660 #define shl_load innocuous_shl_load
9661
9662 /* System header to define __stub macros and hopefully few prototypes,
9663     which can conflict with char shl_load (); below.
9664     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9665     <limits.h> exists even on freestanding compilers.  */
9666
9667 #ifdef __STDC__
9668 # include <limits.h>
9669 #else
9670 # include <assert.h>
9671 #endif
9672
9673 #undef shl_load
9674
9675 /* Override any gcc2 internal prototype to avoid an error.  */
9676 #ifdef __cplusplus
9677 extern "C"
9678 {
9679 #endif
9680 /* We use char because int might match the return type of a gcc2
9681    builtin and then its argument prototype would still apply.  */
9682 char shl_load ();
9683 /* The GNU C library defines this for functions which it implements
9684     to always fail with ENOSYS.  Some functions are actually named
9685     something starting with __ and the normal name is an alias.  */
9686 #if defined (__stub_shl_load) || defined (__stub___shl_load)
9687 choke me
9688 #else
9689 char (*f) () = shl_load;
9690 #endif
9691 #ifdef __cplusplus
9692 }
9693 #endif
9694
9695 int
9696 main ()
9697 {
9698 return f != shl_load;
9699   ;
9700   return 0;
9701 }
9702 _ACEOF
9703 rm -f conftest.$ac_objext conftest$ac_exeext
9704 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9705   (eval $ac_link) 2>conftest.er1
9706   ac_status=$?
9707   grep -v '^ *+' conftest.er1 >conftest.err
9708   rm -f conftest.er1
9709   cat conftest.err >&5
9710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711   (exit $ac_status); } &&
9712          { ac_try='test -z "$ac_c_werror_flag"
9713                          || test ! -s conftest.err'
9714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9718   (exit $ac_status); }; } &&
9719          { ac_try='test -s conftest$ac_exeext'
9720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9721   (eval $ac_try) 2>&5
9722   ac_status=$?
9723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9724   (exit $ac_status); }; }; then
9725   ac_cv_func_shl_load=yes
9726 else
9727   echo "$as_me: failed program was:" >&5
9728 sed 's/^/| /' conftest.$ac_ext >&5
9729
9730 ac_cv_func_shl_load=no
9731 fi
9732 rm -f conftest.err conftest.$ac_objext \
9733       conftest$ac_exeext conftest.$ac_ext
9734 fi
9735 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9736 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
9737 if test $ac_cv_func_shl_load = yes; then
9738   lt_cv_dlopen="shl_load"
9739 else
9740   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9741 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9742 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9743   echo $ECHO_N "(cached) $ECHO_C" >&6
9744 else
9745   ac_check_lib_save_LIBS=$LIBS
9746 LIBS="-ldld  $LIBS"
9747 cat >conftest.$ac_ext <<_ACEOF
9748 /* confdefs.h.  */
9749 _ACEOF
9750 cat confdefs.h >>conftest.$ac_ext
9751 cat >>conftest.$ac_ext <<_ACEOF
9752 /* end confdefs.h.  */
9753
9754 /* Override any gcc2 internal prototype to avoid an error.  */
9755 #ifdef __cplusplus
9756 extern "C"
9757 #endif
9758 /* We use char because int might match the return type of a gcc2
9759    builtin and then its argument prototype would still apply.  */
9760 char shl_load ();
9761 int
9762 main ()
9763 {
9764 shl_load ();
9765   ;
9766   return 0;
9767 }
9768 _ACEOF
9769 rm -f conftest.$ac_objext conftest$ac_exeext
9770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9771   (eval $ac_link) 2>conftest.er1
9772   ac_status=$?
9773   grep -v '^ *+' conftest.er1 >conftest.err
9774   rm -f conftest.er1
9775   cat conftest.err >&5
9776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777   (exit $ac_status); } &&
9778          { ac_try='test -z "$ac_c_werror_flag"
9779                          || test ! -s conftest.err'
9780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781   (eval $ac_try) 2>&5
9782   ac_status=$?
9783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784   (exit $ac_status); }; } &&
9785          { ac_try='test -s conftest$ac_exeext'
9786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9787   (eval $ac_try) 2>&5
9788   ac_status=$?
9789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9790   (exit $ac_status); }; }; then
9791   ac_cv_lib_dld_shl_load=yes
9792 else
9793   echo "$as_me: failed program was:" >&5
9794 sed 's/^/| /' conftest.$ac_ext >&5
9795
9796 ac_cv_lib_dld_shl_load=no
9797 fi
9798 rm -f conftest.err conftest.$ac_objext \
9799       conftest$ac_exeext conftest.$ac_ext
9800 LIBS=$ac_check_lib_save_LIBS
9801 fi
9802 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9803 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9804 if test $ac_cv_lib_dld_shl_load = yes; then
9805   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9806 else
9807   echo "$as_me:$LINENO: checking for dlopen" >&5
9808 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
9809 if test "${ac_cv_func_dlopen+set}" = set; then
9810   echo $ECHO_N "(cached) $ECHO_C" >&6
9811 else
9812   cat >conftest.$ac_ext <<_ACEOF
9813 /* confdefs.h.  */
9814 _ACEOF
9815 cat confdefs.h >>conftest.$ac_ext
9816 cat >>conftest.$ac_ext <<_ACEOF
9817 /* end confdefs.h.  */
9818 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9819    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9820 #define dlopen innocuous_dlopen
9821
9822 /* System header to define __stub macros and hopefully few prototypes,
9823     which can conflict with char dlopen (); below.
9824     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9825     <limits.h> exists even on freestanding compilers.  */
9826
9827 #ifdef __STDC__
9828 # include <limits.h>
9829 #else
9830 # include <assert.h>
9831 #endif
9832
9833 #undef dlopen
9834
9835 /* Override any gcc2 internal prototype to avoid an error.  */
9836 #ifdef __cplusplus
9837 extern "C"
9838 {
9839 #endif
9840 /* We use char because int might match the return type of a gcc2
9841    builtin and then its argument prototype would still apply.  */
9842 char dlopen ();
9843 /* The GNU C library defines this for functions which it implements
9844     to always fail with ENOSYS.  Some functions are actually named
9845     something starting with __ and the normal name is an alias.  */
9846 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9847 choke me
9848 #else
9849 char (*f) () = dlopen;
9850 #endif
9851 #ifdef __cplusplus
9852 }
9853 #endif
9854
9855 int
9856 main ()
9857 {
9858 return f != dlopen;
9859   ;
9860   return 0;
9861 }
9862 _ACEOF
9863 rm -f conftest.$ac_objext conftest$ac_exeext
9864 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9865   (eval $ac_link) 2>conftest.er1
9866   ac_status=$?
9867   grep -v '^ *+' conftest.er1 >conftest.err
9868   rm -f conftest.er1
9869   cat conftest.err >&5
9870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9871   (exit $ac_status); } &&
9872          { ac_try='test -z "$ac_c_werror_flag"
9873                          || test ! -s conftest.err'
9874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9875   (eval $ac_try) 2>&5
9876   ac_status=$?
9877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878   (exit $ac_status); }; } &&
9879          { ac_try='test -s conftest$ac_exeext'
9880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9881   (eval $ac_try) 2>&5
9882   ac_status=$?
9883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884   (exit $ac_status); }; }; then
9885   ac_cv_func_dlopen=yes
9886 else
9887   echo "$as_me: failed program was:" >&5
9888 sed 's/^/| /' conftest.$ac_ext >&5
9889
9890 ac_cv_func_dlopen=no
9891 fi
9892 rm -f conftest.err conftest.$ac_objext \
9893       conftest$ac_exeext conftest.$ac_ext
9894 fi
9895 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
9896 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
9897 if test $ac_cv_func_dlopen = yes; then
9898   lt_cv_dlopen="dlopen"
9899 else
9900   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9901 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9902 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9903   echo $ECHO_N "(cached) $ECHO_C" >&6
9904 else
9905   ac_check_lib_save_LIBS=$LIBS
9906 LIBS="-ldl  $LIBS"
9907 cat >conftest.$ac_ext <<_ACEOF
9908 /* confdefs.h.  */
9909 _ACEOF
9910 cat confdefs.h >>conftest.$ac_ext
9911 cat >>conftest.$ac_ext <<_ACEOF
9912 /* end confdefs.h.  */
9913
9914 /* Override any gcc2 internal prototype to avoid an error.  */
9915 #ifdef __cplusplus
9916 extern "C"
9917 #endif
9918 /* We use char because int might match the return type of a gcc2
9919    builtin and then its argument prototype would still apply.  */
9920 char dlopen ();
9921 int
9922 main ()
9923 {
9924 dlopen ();
9925   ;
9926   return 0;
9927 }
9928 _ACEOF
9929 rm -f conftest.$ac_objext conftest$ac_exeext
9930 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9931   (eval $ac_link) 2>conftest.er1
9932   ac_status=$?
9933   grep -v '^ *+' conftest.er1 >conftest.err
9934   rm -f conftest.er1
9935   cat conftest.err >&5
9936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937   (exit $ac_status); } &&
9938          { ac_try='test -z "$ac_c_werror_flag"
9939                          || test ! -s conftest.err'
9940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9941   (eval $ac_try) 2>&5
9942   ac_status=$?
9943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9944   (exit $ac_status); }; } &&
9945          { ac_try='test -s conftest$ac_exeext'
9946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9947   (eval $ac_try) 2>&5
9948   ac_status=$?
9949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9950   (exit $ac_status); }; }; then
9951   ac_cv_lib_dl_dlopen=yes
9952 else
9953   echo "$as_me: failed program was:" >&5
9954 sed 's/^/| /' conftest.$ac_ext >&5
9955
9956 ac_cv_lib_dl_dlopen=no
9957 fi
9958 rm -f conftest.err conftest.$ac_objext \
9959       conftest$ac_exeext conftest.$ac_ext
9960 LIBS=$ac_check_lib_save_LIBS
9961 fi
9962 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9963 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9964 if test $ac_cv_lib_dl_dlopen = yes; then
9965   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9966 else
9967   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
9968 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
9969 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
9970   echo $ECHO_N "(cached) $ECHO_C" >&6
9971 else
9972   ac_check_lib_save_LIBS=$LIBS
9973 LIBS="-lsvld  $LIBS"
9974 cat >conftest.$ac_ext <<_ACEOF
9975 /* confdefs.h.  */
9976 _ACEOF
9977 cat confdefs.h >>conftest.$ac_ext
9978 cat >>conftest.$ac_ext <<_ACEOF
9979 /* end confdefs.h.  */
9980
9981 /* Override any gcc2 internal prototype to avoid an error.  */
9982 #ifdef __cplusplus
9983 extern "C"
9984 #endif
9985 /* We use char because int might match the return type of a gcc2
9986    builtin and then its argument prototype would still apply.  */
9987 char dlopen ();
9988 int
9989 main ()
9990 {
9991 dlopen ();
9992   ;
9993   return 0;
9994 }
9995 _ACEOF
9996 rm -f conftest.$ac_objext conftest$ac_exeext
9997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9998   (eval $ac_link) 2>conftest.er1
9999   ac_status=$?
10000   grep -v '^ *+' conftest.er1 >conftest.err
10001   rm -f conftest.er1
10002   cat conftest.err >&5
10003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004   (exit $ac_status); } &&
10005          { ac_try='test -z "$ac_c_werror_flag"
10006                          || test ! -s conftest.err'
10007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008   (eval $ac_try) 2>&5
10009   ac_status=$?
10010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011   (exit $ac_status); }; } &&
10012          { ac_try='test -s conftest$ac_exeext'
10013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014   (eval $ac_try) 2>&5
10015   ac_status=$?
10016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017   (exit $ac_status); }; }; then
10018   ac_cv_lib_svld_dlopen=yes
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 sed 's/^/| /' conftest.$ac_ext >&5
10022
10023 ac_cv_lib_svld_dlopen=no
10024 fi
10025 rm -f conftest.err conftest.$ac_objext \
10026       conftest$ac_exeext conftest.$ac_ext
10027 LIBS=$ac_check_lib_save_LIBS
10028 fi
10029 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10030 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
10031 if test $ac_cv_lib_svld_dlopen = yes; then
10032   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10033 else
10034   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10035 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
10036 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10037   echo $ECHO_N "(cached) $ECHO_C" >&6
10038 else
10039   ac_check_lib_save_LIBS=$LIBS
10040 LIBS="-ldld  $LIBS"
10041 cat >conftest.$ac_ext <<_ACEOF
10042 /* confdefs.h.  */
10043 _ACEOF
10044 cat confdefs.h >>conftest.$ac_ext
10045 cat >>conftest.$ac_ext <<_ACEOF
10046 /* end confdefs.h.  */
10047
10048 /* Override any gcc2 internal prototype to avoid an error.  */
10049 #ifdef __cplusplus
10050 extern "C"
10051 #endif
10052 /* We use char because int might match the return type of a gcc2
10053    builtin and then its argument prototype would still apply.  */
10054 char dld_link ();
10055 int
10056 main ()
10057 {
10058 dld_link ();
10059   ;
10060   return 0;
10061 }
10062 _ACEOF
10063 rm -f conftest.$ac_objext conftest$ac_exeext
10064 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10065   (eval $ac_link) 2>conftest.er1
10066   ac_status=$?
10067   grep -v '^ *+' conftest.er1 >conftest.err
10068   rm -f conftest.er1
10069   cat conftest.err >&5
10070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10071   (exit $ac_status); } &&
10072          { ac_try='test -z "$ac_c_werror_flag"
10073                          || test ! -s conftest.err'
10074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10075   (eval $ac_try) 2>&5
10076   ac_status=$?
10077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078   (exit $ac_status); }; } &&
10079          { ac_try='test -s conftest$ac_exeext'
10080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10081   (eval $ac_try) 2>&5
10082   ac_status=$?
10083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084   (exit $ac_status); }; }; then
10085   ac_cv_lib_dld_dld_link=yes
10086 else
10087   echo "$as_me: failed program was:" >&5
10088 sed 's/^/| /' conftest.$ac_ext >&5
10089
10090 ac_cv_lib_dld_dld_link=no
10091 fi
10092 rm -f conftest.err conftest.$ac_objext \
10093       conftest$ac_exeext conftest.$ac_ext
10094 LIBS=$ac_check_lib_save_LIBS
10095 fi
10096 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10097 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
10098 if test $ac_cv_lib_dld_dld_link = yes; then
10099   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10100 fi
10101
10102
10103 fi
10104
10105
10106 fi
10107
10108
10109 fi
10110
10111
10112 fi
10113
10114
10115 fi
10116
10117     ;;
10118   esac
10119
10120   if test "x$lt_cv_dlopen" != xno; then
10121     enable_dlopen=yes
10122   else
10123     enable_dlopen=no
10124   fi
10125
10126   case $lt_cv_dlopen in
10127   dlopen)
10128     save_CPPFLAGS="$CPPFLAGS"
10129     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10130
10131     save_LDFLAGS="$LDFLAGS"
10132     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10133
10134     save_LIBS="$LIBS"
10135     LIBS="$lt_cv_dlopen_libs $LIBS"
10136
10137     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10138 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
10139 if test "${lt_cv_dlopen_self+set}" = set; then
10140   echo $ECHO_N "(cached) $ECHO_C" >&6
10141 else
10142           if test "$cross_compiling" = yes; then :
10143   lt_cv_dlopen_self=cross
10144 else
10145   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10146   lt_status=$lt_dlunknown
10147   cat > conftest.$ac_ext <<EOF
10148 #line 10148 "configure"
10149 #include "confdefs.h"
10150
10151 #if HAVE_DLFCN_H
10152 #include <dlfcn.h>
10153 #endif
10154
10155 #include <stdio.h>
10156
10157 #ifdef RTLD_GLOBAL
10158 #  define LT_DLGLOBAL           RTLD_GLOBAL
10159 #else
10160 #  ifdef DL_GLOBAL
10161 #    define LT_DLGLOBAL         DL_GLOBAL
10162 #  else
10163 #    define LT_DLGLOBAL         0
10164 #  endif
10165 #endif
10166
10167 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10168    find out it does not work in some platform. */
10169 #ifndef LT_DLLAZY_OR_NOW
10170 #  ifdef RTLD_LAZY
10171 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10172 #  else
10173 #    ifdef DL_LAZY
10174 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10175 #    else
10176 #      ifdef RTLD_NOW
10177 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10178 #      else
10179 #        ifdef DL_NOW
10180 #          define LT_DLLAZY_OR_NOW      DL_NOW
10181 #        else
10182 #          define LT_DLLAZY_OR_NOW      0
10183 #        endif
10184 #      endif
10185 #    endif
10186 #  endif
10187 #endif
10188
10189 #ifdef __cplusplus
10190 extern "C" void exit (int);
10191 #endif
10192
10193 void fnord() { int i=42;}
10194 int main ()
10195 {
10196   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10197   int status = $lt_dlunknown;
10198
10199   if (self)
10200     {
10201       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10202       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10203       /* dlclose (self); */
10204     }
10205
10206     exit (status);
10207 }
10208 EOF
10209   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10210   (eval $ac_link) 2>&5
10211   ac_status=$?
10212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10213   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10214     (./conftest; exit; ) >&5 2>/dev/null
10215     lt_status=$?
10216     case x$lt_status in
10217       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10218       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10219       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10220     esac
10221   else :
10222     # compilation failed
10223     lt_cv_dlopen_self=no
10224   fi
10225 fi
10226 rm -fr conftest*
10227
10228
10229 fi
10230 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10231 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
10232
10233     if test "x$lt_cv_dlopen_self" = xyes; then
10234       LDFLAGS="$LDFLAGS $link_static_flag"
10235       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10236 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
10237 if test "${lt_cv_dlopen_self_static+set}" = set; then
10238   echo $ECHO_N "(cached) $ECHO_C" >&6
10239 else
10240           if test "$cross_compiling" = yes; then :
10241   lt_cv_dlopen_self_static=cross
10242 else
10243   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10244   lt_status=$lt_dlunknown
10245   cat > conftest.$ac_ext <<EOF
10246 #line 10246 "configure"
10247 #include "confdefs.h"
10248
10249 #if HAVE_DLFCN_H
10250 #include <dlfcn.h>
10251 #endif
10252
10253 #include <stdio.h>
10254
10255 #ifdef RTLD_GLOBAL
10256 #  define LT_DLGLOBAL           RTLD_GLOBAL
10257 #else
10258 #  ifdef DL_GLOBAL
10259 #    define LT_DLGLOBAL         DL_GLOBAL
10260 #  else
10261 #    define LT_DLGLOBAL         0
10262 #  endif
10263 #endif
10264
10265 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10266    find out it does not work in some platform. */
10267 #ifndef LT_DLLAZY_OR_NOW
10268 #  ifdef RTLD_LAZY
10269 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10270 #  else
10271 #    ifdef DL_LAZY
10272 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10273 #    else
10274 #      ifdef RTLD_NOW
10275 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10276 #      else
10277 #        ifdef DL_NOW
10278 #          define LT_DLLAZY_OR_NOW      DL_NOW
10279 #        else
10280 #          define LT_DLLAZY_OR_NOW      0
10281 #        endif
10282 #      endif
10283 #    endif
10284 #  endif
10285 #endif
10286
10287 #ifdef __cplusplus
10288 extern "C" void exit (int);
10289 #endif
10290
10291 void fnord() { int i=42;}
10292 int main ()
10293 {
10294   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10295   int status = $lt_dlunknown;
10296
10297   if (self)
10298     {
10299       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10300       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10301       /* dlclose (self); */
10302     }
10303
10304     exit (status);
10305 }
10306 EOF
10307   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10308   (eval $ac_link) 2>&5
10309   ac_status=$?
10310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10312     (./conftest; exit; ) >&5 2>/dev/null
10313     lt_status=$?
10314     case x$lt_status in
10315       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10316       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10317       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10318     esac
10319   else :
10320     # compilation failed
10321     lt_cv_dlopen_self_static=no
10322   fi
10323 fi
10324 rm -fr conftest*
10325
10326
10327 fi
10328 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10329 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
10330     fi
10331
10332     CPPFLAGS="$save_CPPFLAGS"
10333     LDFLAGS="$save_LDFLAGS"
10334     LIBS="$save_LIBS"
10335     ;;
10336   esac
10337
10338   case $lt_cv_dlopen_self in
10339   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10340   *) enable_dlopen_self=unknown ;;
10341   esac
10342
10343   case $lt_cv_dlopen_self_static in
10344   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10345   *) enable_dlopen_self_static=unknown ;;
10346   esac
10347 fi
10348
10349
10350 # Report which librarie types wil actually be built
10351 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10352 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
10353 echo "$as_me:$LINENO: result: $can_build_shared" >&5
10354 echo "${ECHO_T}$can_build_shared" >&6
10355
10356 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10357 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
10358 test "$can_build_shared" = "no" && enable_shared=no
10359
10360 # On AIX, shared libraries and static libraries use the same namespace, and
10361 # are all built from PIC.
10362 case $host_os in
10363 aix3*)
10364   test "$enable_shared" = yes && enable_static=no
10365   if test -n "$RANLIB"; then
10366     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10367     postinstall_cmds='$RANLIB $lib'
10368   fi
10369   ;;
10370
10371 aix4* | aix5*)
10372   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10373     test "$enable_shared" = yes && enable_static=no
10374   fi
10375     ;;
10376 esac
10377 echo "$as_me:$LINENO: result: $enable_shared" >&5
10378 echo "${ECHO_T}$enable_shared" >&6
10379
10380 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10381 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
10382 # Make sure either enable_shared or enable_static is yes.
10383 test "$enable_shared" = yes || enable_static=yes
10384 echo "$as_me:$LINENO: result: $enable_static" >&5
10385 echo "${ECHO_T}$enable_static" >&6
10386
10387 # The else clause should only fire when bootstrapping the
10388 # libtool distribution, otherwise you forgot to ship ltmain.sh
10389 # with your package, and you will get complaints that there are
10390 # no rules to generate ltmain.sh.
10391 if test -f "$ltmain"; then
10392   # See if we are running on zsh, and set the options which allow our commands through
10393   # without removal of \ escapes.
10394   if test -n "${ZSH_VERSION+set}" ; then
10395     setopt NO_GLOB_SUBST
10396   fi
10397   # Now quote all the things that may contain metacharacters while being
10398   # careful not to overquote the AC_SUBSTed values.  We take copies of the
10399   # variables and quote the copies for generation of the libtool script.
10400   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
10401     SED SHELL STRIP \
10402     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10403     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10404     deplibs_check_method reload_flag reload_cmds need_locks \
10405     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10406     lt_cv_sys_global_symbol_to_c_name_address \
10407     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10408     old_postinstall_cmds old_postuninstall_cmds \
10409     compiler \
10410     CC \
10411     LD \
10412     lt_prog_compiler_wl \
10413     lt_prog_compiler_pic \
10414     lt_prog_compiler_static \
10415     lt_prog_compiler_no_builtin_flag \
10416     export_dynamic_flag_spec \
10417     thread_safe_flag_spec \
10418     whole_archive_flag_spec \
10419     enable_shared_with_static_runtimes \
10420     old_archive_cmds \
10421     old_archive_from_new_cmds \
10422     predep_objects \
10423     postdep_objects \
10424     predeps \
10425     postdeps \
10426     compiler_lib_search_path \
10427     archive_cmds \
10428     archive_expsym_cmds \
10429     postinstall_cmds \
10430     postuninstall_cmds \
10431     old_archive_from_expsyms_cmds \
10432     allow_undefined_flag \
10433     no_undefined_flag \
10434     export_symbols_cmds \
10435     hardcode_libdir_flag_spec \
10436     hardcode_libdir_flag_spec_ld \
10437     hardcode_libdir_separator \
10438     hardcode_automatic \
10439     module_cmds \
10440     module_expsym_cmds \
10441     lt_cv_prog_compiler_c_o \
10442     exclude_expsyms \
10443     include_expsyms; do
10444
10445     case $var in
10446     old_archive_cmds | \
10447     old_archive_from_new_cmds | \
10448     archive_cmds | \
10449     archive_expsym_cmds | \
10450     module_cmds | \
10451     module_expsym_cmds | \
10452     old_archive_from_expsyms_cmds | \
10453     export_symbols_cmds | \
10454     extract_expsyms_cmds | reload_cmds | finish_cmds | \
10455     postinstall_cmds | postuninstall_cmds | \
10456     old_postinstall_cmds | old_postuninstall_cmds | \
10457     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10458       # Double-quote double-evaled strings.
10459       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10460       ;;
10461     *)
10462       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10463       ;;
10464     esac
10465   done
10466
10467   case $lt_echo in
10468   *'\$0 --fallback-echo"')
10469     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10470     ;;
10471   esac
10472
10473 cfgfile="${ofile}T"
10474   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10475   $rm -f "$cfgfile"
10476   { echo "$as_me:$LINENO: creating $ofile" >&5
10477 echo "$as_me: creating $ofile" >&6;}
10478
10479   cat <<__EOF__ >> "$cfgfile"
10480 #! $SHELL
10481
10482 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10483 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10484 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10485 #
10486 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
10487 # Free Software Foundation, Inc.
10488 #
10489 # This file is part of GNU Libtool:
10490 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10491 #
10492 # This program is free software; you can redistribute it and/or modify
10493 # it under the terms of the GNU General Public License as published by
10494 # the Free Software Foundation; either version 2 of the License, or
10495 # (at your option) any later version.
10496 #
10497 # This program is distributed in the hope that it will be useful, but
10498 # WITHOUT ANY WARRANTY; without even the implied warranty of
10499 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10500 # General Public License for more details.
10501 #
10502 # You should have received a copy of the GNU General Public License
10503 # along with this program; if not, write to the Free Software
10504 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10505 #
10506 # As a special exception to the GNU General Public License, if you
10507 # distribute this file as part of a program that contains a
10508 # configuration script generated by Autoconf, you may include it under
10509 # the same distribution terms that you use for the rest of that program.
10510
10511 # A sed program that does not truncate output.
10512 SED=$lt_SED
10513
10514 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10515 Xsed="$SED -e 1s/^X//"
10516
10517 # The HP-UX ksh and POSIX shell print the target directory to stdout
10518 # if CDPATH is set.
10519 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10520
10521 # The names of the tagged configurations supported by this script.
10522 available_tags=
10523
10524 # ### BEGIN LIBTOOL CONFIG
10525
10526 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10527
10528 # Shell to use when invoking shell scripts.
10529 SHELL=$lt_SHELL
10530
10531 # Whether or not to build shared libraries.
10532 build_libtool_libs=$enable_shared
10533
10534 # Whether or not to build static libraries.
10535 build_old_libs=$enable_static
10536
10537 # Whether or not to add -lc for building shared libraries.
10538 build_libtool_need_lc=$archive_cmds_need_lc
10539
10540 # Whether or not to disallow shared libs when runtime libs are static
10541 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10542
10543 # Whether or not to optimize for fast installation.
10544 fast_install=$enable_fast_install
10545
10546 # The host system.
10547 host_alias=$host_alias
10548 host=$host
10549 host_os=$host_os
10550
10551 # The build system.
10552 build_alias=$build_alias
10553 build=$build
10554 build_os=$build_os
10555
10556 # An echo program that does not interpret backslashes.
10557 echo=$lt_echo
10558
10559 # The archiver.
10560 AR=$lt_AR
10561 AR_FLAGS=$lt_AR_FLAGS
10562
10563 # A C compiler.
10564 LTCC=$lt_LTCC
10565
10566 # A language-specific compiler.
10567 CC=$lt_compiler
10568
10569 # Is the compiler the GNU C compiler?
10570 with_gcc=$GCC
10571
10572 # An ERE matcher.
10573 EGREP=$lt_EGREP
10574
10575 # The linker used to build libraries.
10576 LD=$lt_LD
10577
10578 # Whether we need hard or soft links.
10579 LN_S=$lt_LN_S
10580
10581 # A BSD-compatible nm program.
10582 NM=$lt_NM
10583
10584 # A symbol stripping program
10585 STRIP=$lt_STRIP
10586
10587 # Used to examine libraries when file_magic_cmd begins "file"
10588 MAGIC_CMD=$MAGIC_CMD
10589
10590 # Used on cygwin: DLL creation program.
10591 DLLTOOL="$DLLTOOL"
10592
10593 # Used on cygwin: object dumper.
10594 OBJDUMP="$OBJDUMP"
10595
10596 # Used on cygwin: assembler.
10597 AS="$AS"
10598
10599 # The name of the directory that contains temporary libtool files.
10600 objdir=$objdir
10601
10602 # How to create reloadable object files.
10603 reload_flag=$lt_reload_flag
10604 reload_cmds=$lt_reload_cmds
10605
10606 # How to pass a linker flag through the compiler.
10607 wl=$lt_lt_prog_compiler_wl
10608
10609 # Object file suffix (normally "o").
10610 objext="$ac_objext"
10611
10612 # Old archive suffix (normally "a").
10613 libext="$libext"
10614
10615 # Shared library suffix (normally ".so").
10616 shrext_cmds='$shrext_cmds'
10617
10618 # Executable file suffix (normally "").
10619 exeext="$exeext"
10620
10621 # Additional compiler flags for building library objects.
10622 pic_flag=$lt_lt_prog_compiler_pic
10623 pic_mode=$pic_mode
10624
10625 # What is the maximum length of a command?
10626 max_cmd_len=$lt_cv_sys_max_cmd_len
10627
10628 # Does compiler simultaneously support -c and -o options?
10629 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10630
10631 # Must we lock files when doing compilation?
10632 need_locks=$lt_need_locks
10633
10634 # Do we need the lib prefix for modules?
10635 need_lib_prefix=$need_lib_prefix
10636
10637 # Do we need a version for libraries?
10638 need_version=$need_version
10639
10640 # Whether dlopen is supported.
10641 dlopen_support=$enable_dlopen
10642
10643 # Whether dlopen of programs is supported.
10644 dlopen_self=$enable_dlopen_self
10645
10646 # Whether dlopen of statically linked programs is supported.
10647 dlopen_self_static=$enable_dlopen_self_static
10648
10649 # Compiler flag to prevent dynamic linking.
10650 link_static_flag=$lt_lt_prog_compiler_static
10651
10652 # Compiler flag to turn off builtin functions.
10653 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10654
10655 # Compiler flag to allow reflexive dlopens.
10656 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10657
10658 # Compiler flag to generate shared objects directly from archives.
10659 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10660
10661 # Compiler flag to generate thread-safe objects.
10662 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10663
10664 # Library versioning type.
10665 version_type=$version_type
10666
10667 # Format of library name prefix.
10668 libname_spec=$lt_libname_spec
10669
10670 # List of archive names.  First name is the real one, the rest are links.
10671 # The last name is the one that the linker finds with -lNAME.
10672 library_names_spec=$lt_library_names_spec
10673
10674 # The coded name of the library, if different from the real name.
10675 soname_spec=$lt_soname_spec
10676
10677 # Commands used to build and install an old-style archive.
10678 RANLIB=$lt_RANLIB
10679 old_archive_cmds=$lt_old_archive_cmds
10680 old_postinstall_cmds=$lt_old_postinstall_cmds
10681 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10682
10683 # Create an old-style archive from a shared archive.
10684 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10685
10686 # Create a temporary old-style archive to link instead of a shared archive.
10687 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10688
10689 # Commands used to build and install a shared archive.
10690 archive_cmds=$lt_archive_cmds
10691 archive_expsym_cmds=$lt_archive_expsym_cmds
10692 postinstall_cmds=$lt_postinstall_cmds
10693 postuninstall_cmds=$lt_postuninstall_cmds
10694
10695 # Commands used to build a loadable module (assumed same as above if empty)
10696 module_cmds=$lt_module_cmds
10697 module_expsym_cmds=$lt_module_expsym_cmds
10698
10699 # Commands to strip libraries.
10700 old_striplib=$lt_old_striplib
10701 striplib=$lt_striplib
10702
10703 # Dependencies to place before the objects being linked to create a
10704 # shared library.
10705 predep_objects=$lt_predep_objects
10706
10707 # Dependencies to place after the objects being linked to create a
10708 # shared library.
10709 postdep_objects=$lt_postdep_objects
10710
10711 # Dependencies to place before the objects being linked to create a
10712 # shared library.
10713 predeps=$lt_predeps
10714
10715 # Dependencies to place after the objects being linked to create a
10716 # shared library.
10717 postdeps=$lt_postdeps
10718
10719 # The library search path used internally by the compiler when linking
10720 # a shared library.
10721 compiler_lib_search_path=$lt_compiler_lib_search_path
10722
10723 # Method to check whether dependent libraries are shared objects.
10724 deplibs_check_method=$lt_deplibs_check_method
10725
10726 # Command to use when deplibs_check_method == file_magic.
10727 file_magic_cmd=$lt_file_magic_cmd
10728
10729 # Flag that allows shared libraries with undefined symbols to be built.
10730 allow_undefined_flag=$lt_allow_undefined_flag
10731
10732 # Flag that forces no undefined symbols.
10733 no_undefined_flag=$lt_no_undefined_flag
10734
10735 # Commands used to finish a libtool library installation in a directory.
10736 finish_cmds=$lt_finish_cmds
10737
10738 # Same as above, but a single script fragment to be evaled but not shown.
10739 finish_eval=$lt_finish_eval
10740
10741 # Take the output of nm and produce a listing of raw symbols and C names.
10742 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10743
10744 # Transform the output of nm in a proper C declaration
10745 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10746
10747 # Transform the output of nm in a C name address pair
10748 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10749
10750 # This is the shared library runtime path variable.
10751 runpath_var=$runpath_var
10752
10753 # This is the shared library path variable.
10754 shlibpath_var=$shlibpath_var
10755
10756 # Is shlibpath searched before the hard-coded library search path?
10757 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10758
10759 # How to hardcode a shared library path into an executable.
10760 hardcode_action=$hardcode_action
10761
10762 # Whether we should hardcode library paths into libraries.
10763 hardcode_into_libs=$hardcode_into_libs
10764
10765 # Flag to hardcode \$libdir into a binary during linking.
10766 # This must work even if \$libdir does not exist.
10767 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10768
10769 # If ld is used when linking, flag to hardcode \$libdir into
10770 # a binary during linking. This must work even if \$libdir does
10771 # not exist.
10772 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10773
10774 # Whether we need a single -rpath flag with a separated argument.
10775 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10776
10777 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10778 # resulting binary.
10779 hardcode_direct=$hardcode_direct
10780
10781 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10782 # resulting binary.
10783 hardcode_minus_L=$hardcode_minus_L
10784
10785 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10786 # the resulting binary.
10787 hardcode_shlibpath_var=$hardcode_shlibpath_var
10788
10789 # Set to yes if building a shared library automatically hardcodes DIR into the library
10790 # and all subsequent libraries and executables linked against it.
10791 hardcode_automatic=$hardcode_automatic
10792
10793 # Variables whose values should be saved in libtool wrapper scripts and
10794 # restored at relink time.
10795 variables_saved_for_relink="$variables_saved_for_relink"
10796
10797 # Whether libtool must link a program against all its dependency libraries.
10798 link_all_deplibs=$link_all_deplibs
10799
10800 # Compile-time system search path for libraries
10801 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10802
10803 # Run-time system search path for libraries
10804 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10805
10806 # Fix the shell variable \$srcfile for the compiler.
10807 fix_srcfile_path="$fix_srcfile_path"
10808
10809 # Set to yes if exported symbols are required.
10810 always_export_symbols=$always_export_symbols
10811
10812 # The commands to list exported symbols.
10813 export_symbols_cmds=$lt_export_symbols_cmds
10814
10815 # The commands to extract the exported symbol list from a shared archive.
10816 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10817
10818 # Symbols that should not be listed in the preloaded symbols.
10819 exclude_expsyms=$lt_exclude_expsyms
10820
10821 # Symbols that must always be exported.
10822 include_expsyms=$lt_include_expsyms
10823
10824 # ### END LIBTOOL CONFIG
10825
10826 __EOF__
10827
10828
10829   case $host_os in
10830   aix3*)
10831     cat <<\EOF >> "$cfgfile"
10832
10833 # AIX sometimes has problems with the GCC collect2 program.  For some
10834 # reason, if we set the COLLECT_NAMES environment variable, the problems
10835 # vanish in a puff of smoke.
10836 if test "X${COLLECT_NAMES+set}" != Xset; then
10837   COLLECT_NAMES=
10838   export COLLECT_NAMES
10839 fi
10840 EOF
10841     ;;
10842   esac
10843
10844   # We use sed instead of cat because bash on DJGPP gets confused if
10845   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
10846   # text mode, it properly converts lines to CR/LF.  This bash problem
10847   # is reportedly fixed, but why not run on old versions too?
10848   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10849
10850   mv -f "$cfgfile" "$ofile" || \
10851     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10852   chmod +x "$ofile"
10853
10854 else
10855   # If there is no Makefile yet, we rely on a make rule to execute
10856   # `config.status --recheck' to rerun these tests and create the
10857   # libtool script then.
10858   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10859   if test -f "$ltmain_in"; then
10860     test -f Makefile && make "$ltmain"
10861   fi
10862 fi
10863
10864
10865 ac_ext=c
10866 ac_cpp='$CPP $CPPFLAGS'
10867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10870
10871 CC="$lt_save_CC"
10872
10873
10874 # Check whether --with-tags or --without-tags was given.
10875 if test "${with_tags+set}" = set; then
10876   withval="$with_tags"
10877   tagnames="$withval"
10878 fi;
10879
10880 if test -f "$ltmain" && test -n "$tagnames"; then
10881   if test ! -f "${ofile}"; then
10882     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
10883 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10884   fi
10885
10886   if test -z "$LTCC"; then
10887     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10888     if test -z "$LTCC"; then
10889       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10890 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10891     else
10892       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10893 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10894     fi
10895   fi
10896
10897   # Extract list of available tagged configurations in $ofile.
10898   # Note that this assumes the entire list is on one line.
10899   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10900
10901   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10902   for tagname in $tagnames; do
10903     IFS="$lt_save_ifs"
10904     # Check whether tagname contains only valid characters
10905     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
10906     "") ;;
10907     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
10908 echo "$as_me: error: invalid tag name: $tagname" >&2;}
10909    { (exit 1); exit 1; }; }
10910         ;;
10911     esac
10912
10913     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
10914     then
10915       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
10916 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
10917    { (exit 1); exit 1; }; }
10918     fi
10919
10920     # Update the list of available tags.
10921     if test -n "$tagname"; then
10922       echo appending configuration tag \"$tagname\" to $ofile
10923
10924       case $tagname in
10925       CXX)
10926         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
10927             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
10928             (test "X$CXX" != "Xg++"))) ; then
10929           :
10930         else
10931           tagname=""
10932         fi
10933         ;;
10934
10935       F77)
10936         if test -n "$F77" && test "X$F77" != "Xno"; then
10937           :
10938         else
10939           tagname=""
10940         fi
10941         ;;
10942
10943       GCJ)
10944         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
10945           :
10946         else
10947           tagname=""
10948         fi
10949         ;;
10950
10951       RC)
10952
10953
10954
10955 # Source file extension for RC test sources.
10956 ac_ext=rc
10957
10958 # Object file extension for compiled RC test sources.
10959 objext=o
10960 objext_RC=$objext
10961
10962 # Code to be used in simple compile tests
10963 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
10964
10965 # Code to be used in simple link tests
10966 lt_simple_link_test_code="$lt_simple_compile_test_code"
10967
10968 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10969
10970 # If no C compiler was specified, use CC.
10971 LTCC=${LTCC-"$CC"}
10972
10973 # Allow CC to be a program name with arguments.
10974 compiler=$CC
10975
10976
10977 # save warnings/boilerplate of simple test code
10978 ac_outfile=conftest.$ac_objext
10979 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
10980 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
10981 _lt_compiler_boilerplate=`cat conftest.err`
10982 $rm conftest*
10983
10984 ac_outfile=conftest.$ac_objext
10985 printf "$lt_simple_link_test_code" >conftest.$ac_ext
10986 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
10987 _lt_linker_boilerplate=`cat conftest.err`
10988 $rm conftest*
10989
10990
10991 # Allow CC to be a program name with arguments.
10992 lt_save_CC="$CC"
10993 CC=${RC-"windres"}
10994 compiler=$CC
10995 compiler_RC=$CC
10996 for cc_temp in $compiler""; do
10997   case $cc_temp in
10998     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10999     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11000     \-*) ;;
11001     *) break;;
11002   esac
11003 done
11004 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11005
11006 lt_cv_prog_compiler_c_o_RC=yes
11007
11008 # The else clause should only fire when bootstrapping the
11009 # libtool distribution, otherwise you forgot to ship ltmain.sh
11010 # with your package, and you will get complaints that there are
11011 # no rules to generate ltmain.sh.
11012 if test -f "$ltmain"; then
11013   # See if we are running on zsh, and set the options which allow our commands through
11014   # without removal of \ escapes.
11015   if test -n "${ZSH_VERSION+set}" ; then
11016     setopt NO_GLOB_SUBST
11017   fi
11018   # Now quote all the things that may contain metacharacters while being
11019   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11020   # variables and quote the copies for generation of the libtool script.
11021   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11022     SED SHELL STRIP \
11023     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11024     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11025     deplibs_check_method reload_flag reload_cmds need_locks \
11026     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11027     lt_cv_sys_global_symbol_to_c_name_address \
11028     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11029     old_postinstall_cmds old_postuninstall_cmds \
11030     compiler_RC \
11031     CC_RC \
11032     LD_RC \
11033     lt_prog_compiler_wl_RC \
11034     lt_prog_compiler_pic_RC \
11035     lt_prog_compiler_static_RC \
11036     lt_prog_compiler_no_builtin_flag_RC \
11037     export_dynamic_flag_spec_RC \
11038     thread_safe_flag_spec_RC \
11039     whole_archive_flag_spec_RC \
11040     enable_shared_with_static_runtimes_RC \
11041     old_archive_cmds_RC \
11042     old_archive_from_new_cmds_RC \
11043     predep_objects_RC \
11044     postdep_objects_RC \
11045     predeps_RC \
11046     postdeps_RC \
11047     compiler_lib_search_path_RC \
11048     archive_cmds_RC \
11049     archive_expsym_cmds_RC \
11050     postinstall_cmds_RC \
11051     postuninstall_cmds_RC \
11052     old_archive_from_expsyms_cmds_RC \
11053     allow_undefined_flag_RC \
11054     no_undefined_flag_RC \
11055     export_symbols_cmds_RC \
11056     hardcode_libdir_flag_spec_RC \
11057     hardcode_libdir_flag_spec_ld_RC \
11058     hardcode_libdir_separator_RC \
11059     hardcode_automatic_RC \
11060     module_cmds_RC \
11061     module_expsym_cmds_RC \
11062     lt_cv_prog_compiler_c_o_RC \
11063     exclude_expsyms_RC \
11064     include_expsyms_RC; do
11065
11066     case $var in
11067     old_archive_cmds_RC | \
11068     old_archive_from_new_cmds_RC | \
11069     archive_cmds_RC | \
11070     archive_expsym_cmds_RC | \
11071     module_cmds_RC | \
11072     module_expsym_cmds_RC | \
11073     old_archive_from_expsyms_cmds_RC | \
11074     export_symbols_cmds_RC | \
11075     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11076     postinstall_cmds | postuninstall_cmds | \
11077     old_postinstall_cmds | old_postuninstall_cmds | \
11078     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11079       # Double-quote double-evaled strings.
11080       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11081       ;;
11082     *)
11083       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11084       ;;
11085     esac
11086   done
11087
11088   case $lt_echo in
11089   *'\$0 --fallback-echo"')
11090     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11091     ;;
11092   esac
11093
11094 cfgfile="$ofile"
11095
11096   cat <<__EOF__ >> "$cfgfile"
11097 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11098
11099 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11100
11101 # Shell to use when invoking shell scripts.
11102 SHELL=$lt_SHELL
11103
11104 # Whether or not to build shared libraries.
11105 build_libtool_libs=$enable_shared
11106
11107 # Whether or not to build static libraries.
11108 build_old_libs=$enable_static
11109
11110 # Whether or not to add -lc for building shared libraries.
11111 build_libtool_need_lc=$archive_cmds_need_lc_RC
11112
11113 # Whether or not to disallow shared libs when runtime libs are static
11114 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11115
11116 # Whether or not to optimize for fast installation.
11117 fast_install=$enable_fast_install
11118
11119 # The host system.
11120 host_alias=$host_alias
11121 host=$host
11122 host_os=$host_os
11123
11124 # The build system.
11125 build_alias=$build_alias
11126 build=$build
11127 build_os=$build_os
11128
11129 # An echo program that does not interpret backslashes.
11130 echo=$lt_echo
11131
11132 # The archiver.
11133 AR=$lt_AR
11134 AR_FLAGS=$lt_AR_FLAGS
11135
11136 # A C compiler.
11137 LTCC=$lt_LTCC
11138
11139 # A language-specific compiler.
11140 CC=$lt_compiler_RC
11141
11142 # Is the compiler the GNU C compiler?
11143 with_gcc=$GCC_RC
11144
11145 # An ERE matcher.
11146 EGREP=$lt_EGREP
11147
11148 # The linker used to build libraries.
11149 LD=$lt_LD_RC
11150
11151 # Whether we need hard or soft links.
11152 LN_S=$lt_LN_S
11153
11154 # A BSD-compatible nm program.
11155 NM=$lt_NM
11156
11157 # A symbol stripping program
11158 STRIP=$lt_STRIP
11159
11160 # Used to examine libraries when file_magic_cmd begins "file"
11161 MAGIC_CMD=$MAGIC_CMD
11162
11163 # Used on cygwin: DLL creation program.
11164 DLLTOOL="$DLLTOOL"
11165
11166 # Used on cygwin: object dumper.
11167 OBJDUMP="$OBJDUMP"
11168
11169 # Used on cygwin: assembler.
11170 AS="$AS"
11171
11172 # The name of the directory that contains temporary libtool files.
11173 objdir=$objdir
11174
11175 # How to create reloadable object files.
11176 reload_flag=$lt_reload_flag
11177 reload_cmds=$lt_reload_cmds
11178
11179 # How to pass a linker flag through the compiler.
11180 wl=$lt_lt_prog_compiler_wl_RC
11181
11182 # Object file suffix (normally "o").
11183 objext="$ac_objext"
11184
11185 # Old archive suffix (normally "a").
11186 libext="$libext"
11187
11188 # Shared library suffix (normally ".so").
11189 shrext_cmds='$shrext_cmds'
11190
11191 # Executable file suffix (normally "").
11192 exeext="$exeext"
11193
11194 # Additional compiler flags for building library objects.
11195 pic_flag=$lt_lt_prog_compiler_pic_RC
11196 pic_mode=$pic_mode
11197
11198 # What is the maximum length of a command?
11199 max_cmd_len=$lt_cv_sys_max_cmd_len
11200
11201 # Does compiler simultaneously support -c and -o options?
11202 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11203
11204 # Must we lock files when doing compilation?
11205 need_locks=$lt_need_locks
11206
11207 # Do we need the lib prefix for modules?
11208 need_lib_prefix=$need_lib_prefix
11209
11210 # Do we need a version for libraries?
11211 need_version=$need_version
11212
11213 # Whether dlopen is supported.
11214 dlopen_support=$enable_dlopen
11215
11216 # Whether dlopen of programs is supported.
11217 dlopen_self=$enable_dlopen_self
11218
11219 # Whether dlopen of statically linked programs is supported.
11220 dlopen_self_static=$enable_dlopen_self_static
11221
11222 # Compiler flag to prevent dynamic linking.
11223 link_static_flag=$lt_lt_prog_compiler_static_RC
11224
11225 # Compiler flag to turn off builtin functions.
11226 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11227
11228 # Compiler flag to allow reflexive dlopens.
11229 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11230
11231 # Compiler flag to generate shared objects directly from archives.
11232 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11233
11234 # Compiler flag to generate thread-safe objects.
11235 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11236
11237 # Library versioning type.
11238 version_type=$version_type
11239
11240 # Format of library name prefix.
11241 libname_spec=$lt_libname_spec
11242
11243 # List of archive names.  First name is the real one, the rest are links.
11244 # The last name is the one that the linker finds with -lNAME.
11245 library_names_spec=$lt_library_names_spec
11246
11247 # The coded name of the library, if different from the real name.
11248 soname_spec=$lt_soname_spec
11249
11250 # Commands used to build and install an old-style archive.
11251 RANLIB=$lt_RANLIB
11252 old_archive_cmds=$lt_old_archive_cmds_RC
11253 old_postinstall_cmds=$lt_old_postinstall_cmds
11254 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11255
11256 # Create an old-style archive from a shared archive.
11257 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11258
11259 # Create a temporary old-style archive to link instead of a shared archive.
11260 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11261
11262 # Commands used to build and install a shared archive.
11263 archive_cmds=$lt_archive_cmds_RC
11264 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11265 postinstall_cmds=$lt_postinstall_cmds
11266 postuninstall_cmds=$lt_postuninstall_cmds
11267
11268 # Commands used to build a loadable module (assumed same as above if empty)
11269 module_cmds=$lt_module_cmds_RC
11270 module_expsym_cmds=$lt_module_expsym_cmds_RC
11271
11272 # Commands to strip libraries.
11273 old_striplib=$lt_old_striplib
11274 striplib=$lt_striplib
11275
11276 # Dependencies to place before the objects being linked to create a
11277 # shared library.
11278 predep_objects=$lt_predep_objects_RC
11279
11280 # Dependencies to place after the objects being linked to create a
11281 # shared library.
11282 postdep_objects=$lt_postdep_objects_RC
11283
11284 # Dependencies to place before the objects being linked to create a
11285 # shared library.
11286 predeps=$lt_predeps_RC
11287
11288 # Dependencies to place after the objects being linked to create a
11289 # shared library.
11290 postdeps=$lt_postdeps_RC
11291
11292 # The library search path used internally by the compiler when linking
11293 # a shared library.
11294 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11295
11296 # Method to check whether dependent libraries are shared objects.
11297 deplibs_check_method=$lt_deplibs_check_method
11298
11299 # Command to use when deplibs_check_method == file_magic.
11300 file_magic_cmd=$lt_file_magic_cmd
11301
11302 # Flag that allows shared libraries with undefined symbols to be built.
11303 allow_undefined_flag=$lt_allow_undefined_flag_RC
11304
11305 # Flag that forces no undefined symbols.
11306 no_undefined_flag=$lt_no_undefined_flag_RC
11307
11308 # Commands used to finish a libtool library installation in a directory.
11309 finish_cmds=$lt_finish_cmds
11310
11311 # Same as above, but a single script fragment to be evaled but not shown.
11312 finish_eval=$lt_finish_eval
11313
11314 # Take the output of nm and produce a listing of raw symbols and C names.
11315 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11316
11317 # Transform the output of nm in a proper C declaration
11318 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11319
11320 # Transform the output of nm in a C name address pair
11321 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11322
11323 # This is the shared library runtime path variable.
11324 runpath_var=$runpath_var
11325
11326 # This is the shared library path variable.
11327 shlibpath_var=$shlibpath_var
11328
11329 # Is shlibpath searched before the hard-coded library search path?
11330 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11331
11332 # How to hardcode a shared library path into an executable.
11333 hardcode_action=$hardcode_action_RC
11334
11335 # Whether we should hardcode library paths into libraries.
11336 hardcode_into_libs=$hardcode_into_libs
11337
11338 # Flag to hardcode \$libdir into a binary during linking.
11339 # This must work even if \$libdir does not exist.
11340 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11341
11342 # If ld is used when linking, flag to hardcode \$libdir into
11343 # a binary during linking. This must work even if \$libdir does
11344 # not exist.
11345 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11346
11347 # Whether we need a single -rpath flag with a separated argument.
11348 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11349
11350 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11351 # resulting binary.
11352 hardcode_direct=$hardcode_direct_RC
11353
11354 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11355 # resulting binary.
11356 hardcode_minus_L=$hardcode_minus_L_RC
11357
11358 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11359 # the resulting binary.
11360 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11361
11362 # Set to yes if building a shared library automatically hardcodes DIR into the library
11363 # and all subsequent libraries and executables linked against it.
11364 hardcode_automatic=$hardcode_automatic_RC
11365
11366 # Variables whose values should be saved in libtool wrapper scripts and
11367 # restored at relink time.
11368 variables_saved_for_relink="$variables_saved_for_relink"
11369
11370 # Whether libtool must link a program against all its dependency libraries.
11371 link_all_deplibs=$link_all_deplibs_RC
11372
11373 # Compile-time system search path for libraries
11374 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11375
11376 # Run-time system search path for libraries
11377 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11378
11379 # Fix the shell variable \$srcfile for the compiler.
11380 fix_srcfile_path="$fix_srcfile_path_RC"
11381
11382 # Set to yes if exported symbols are required.
11383 always_export_symbols=$always_export_symbols_RC
11384
11385 # The commands to list exported symbols.
11386 export_symbols_cmds=$lt_export_symbols_cmds_RC
11387
11388 # The commands to extract the exported symbol list from a shared archive.
11389 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11390
11391 # Symbols that should not be listed in the preloaded symbols.
11392 exclude_expsyms=$lt_exclude_expsyms_RC
11393
11394 # Symbols that must always be exported.
11395 include_expsyms=$lt_include_expsyms_RC
11396
11397 # ### END LIBTOOL TAG CONFIG: $tagname
11398
11399 __EOF__
11400
11401
11402 else
11403   # If there is no Makefile yet, we rely on a make rule to execute
11404   # `config.status --recheck' to rerun these tests and create the
11405   # libtool script then.
11406   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11407   if test -f "$ltmain_in"; then
11408     test -f Makefile && make "$ltmain"
11409   fi
11410 fi
11411
11412
11413 ac_ext=c
11414 ac_cpp='$CPP $CPPFLAGS'
11415 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11416 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11417 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11418
11419 CC="$lt_save_CC"
11420
11421         ;;
11422
11423       *)
11424         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
11425 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
11426    { (exit 1); exit 1; }; }
11427         ;;
11428       esac
11429
11430       # Append the new tag name to the list of available tags.
11431       if test -n "$tagname" ; then
11432       available_tags="$available_tags $tagname"
11433     fi
11434     fi
11435   done
11436   IFS="$lt_save_ifs"
11437
11438   # Now substitute the updated list of available tags.
11439   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
11440     mv "${ofile}T" "$ofile"
11441     chmod +x "$ofile"
11442   else
11443     rm -f "${ofile}T"
11444     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
11445 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
11446    { (exit 1); exit 1; }; }
11447   fi
11448 fi
11449
11450
11451
11452 # This can be used to rebuild libtool when needed
11453 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
11454
11455 # Always use our own libtool.
11456 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
11457
11458 # Prevent multiple expansion
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469 ol_link_perl=no
11470 if test $ol_enable_perl != no ; then
11471         # Extract the first word of "perl", so it can be a program name with args.
11472 set dummy perl; ac_word=$2
11473 echo "$as_me:$LINENO: checking for $ac_word" >&5
11474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11475 if test "${ac_cv_path_PERLBIN+set}" = set; then
11476   echo $ECHO_N "(cached) $ECHO_C" >&6
11477 else
11478   case $PERLBIN in
11479   [\\/]* | ?:[\\/]*)
11480   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
11481   ;;
11482   *)
11483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11484 for as_dir in $PATH
11485 do
11486   IFS=$as_save_IFS
11487   test -z "$as_dir" && as_dir=.
11488   for ac_exec_ext in '' $ac_executable_extensions; do
11489   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11490     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
11491     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11492     break 2
11493   fi
11494 done
11495 done
11496
11497   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
11498   ;;
11499 esac
11500 fi
11501 PERLBIN=$ac_cv_path_PERLBIN
11502
11503 if test -n "$PERLBIN"; then
11504   echo "$as_me:$LINENO: result: $PERLBIN" >&5
11505 echo "${ECHO_T}$PERLBIN" >&6
11506 else
11507   echo "$as_me:$LINENO: result: no" >&5
11508 echo "${ECHO_T}no" >&6
11509 fi
11510
11511
11512         if test "no$PERLBIN" = "no" ; then
11513                 if test $ol_enable_perl = yes ; then
11514                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
11515 echo "$as_me: error: could not locate perl" >&2;}
11516    { (exit 1); exit 1; }; }
11517                 fi
11518
11519         else
11520                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
11521                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
11522
11523                 if test x"$ol_enable_perl" = "xyes" ; then
11524                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
11525                 else
11526                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
11527                 fi
11528                                 ol_link_perl=yes
11529         fi
11530 fi
11531
11532 ac_ext=c
11533 ac_cpp='$CPP $CPPFLAGS'
11534 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11535 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11536 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11537 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
11538 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
11539 # On Suns, sometimes $CPP names a directory.
11540 if test -n "$CPP" && test -d "$CPP"; then
11541   CPP=
11542 fi
11543 if test -z "$CPP"; then
11544   if test "${ac_cv_prog_CPP+set}" = set; then
11545   echo $ECHO_N "(cached) $ECHO_C" >&6
11546 else
11547       # Double quotes because CPP needs to be expanded
11548     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
11549     do
11550       ac_preproc_ok=false
11551 for ac_c_preproc_warn_flag in '' yes
11552 do
11553   # Use a header file that comes with gcc, so configuring glibc
11554   # with a fresh cross-compiler works.
11555   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11556   # <limits.h> exists even on freestanding compilers.
11557   # On the NeXT, cc -E runs the code through the compiler's parser,
11558   # not just through cpp. "Syntax error" is here to catch this case.
11559   cat >conftest.$ac_ext <<_ACEOF
11560 /* confdefs.h.  */
11561 _ACEOF
11562 cat confdefs.h >>conftest.$ac_ext
11563 cat >>conftest.$ac_ext <<_ACEOF
11564 /* end confdefs.h.  */
11565 #ifdef __STDC__
11566 # include <limits.h>
11567 #else
11568 # include <assert.h>
11569 #endif
11570                      Syntax error
11571 _ACEOF
11572 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11573   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11574   ac_status=$?
11575   grep -v '^ *+' conftest.er1 >conftest.err
11576   rm -f conftest.er1
11577   cat conftest.err >&5
11578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11579   (exit $ac_status); } >/dev/null; then
11580   if test -s conftest.err; then
11581     ac_cpp_err=$ac_c_preproc_warn_flag
11582     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11583   else
11584     ac_cpp_err=
11585   fi
11586 else
11587   ac_cpp_err=yes
11588 fi
11589 if test -z "$ac_cpp_err"; then
11590   :
11591 else
11592   echo "$as_me: failed program was:" >&5
11593 sed 's/^/| /' conftest.$ac_ext >&5
11594
11595   # Broken: fails on valid input.
11596 continue
11597 fi
11598 rm -f conftest.err conftest.$ac_ext
11599
11600   # OK, works on sane cases.  Now check whether non-existent headers
11601   # can be detected and how.
11602   cat >conftest.$ac_ext <<_ACEOF
11603 /* confdefs.h.  */
11604 _ACEOF
11605 cat confdefs.h >>conftest.$ac_ext
11606 cat >>conftest.$ac_ext <<_ACEOF
11607 /* end confdefs.h.  */
11608 #include <ac_nonexistent.h>
11609 _ACEOF
11610 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11611   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11612   ac_status=$?
11613   grep -v '^ *+' conftest.er1 >conftest.err
11614   rm -f conftest.er1
11615   cat conftest.err >&5
11616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11617   (exit $ac_status); } >/dev/null; then
11618   if test -s conftest.err; then
11619     ac_cpp_err=$ac_c_preproc_warn_flag
11620     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11621   else
11622     ac_cpp_err=
11623   fi
11624 else
11625   ac_cpp_err=yes
11626 fi
11627 if test -z "$ac_cpp_err"; then
11628   # Broken: success on invalid input.
11629 continue
11630 else
11631   echo "$as_me: failed program was:" >&5
11632 sed 's/^/| /' conftest.$ac_ext >&5
11633
11634   # Passes both tests.
11635 ac_preproc_ok=:
11636 break
11637 fi
11638 rm -f conftest.err conftest.$ac_ext
11639
11640 done
11641 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11642 rm -f conftest.err conftest.$ac_ext
11643 if $ac_preproc_ok; then
11644   break
11645 fi
11646
11647     done
11648     ac_cv_prog_CPP=$CPP
11649
11650 fi
11651   CPP=$ac_cv_prog_CPP
11652 else
11653   ac_cv_prog_CPP=$CPP
11654 fi
11655 echo "$as_me:$LINENO: result: $CPP" >&5
11656 echo "${ECHO_T}$CPP" >&6
11657 ac_preproc_ok=false
11658 for ac_c_preproc_warn_flag in '' yes
11659 do
11660   # Use a header file that comes with gcc, so configuring glibc
11661   # with a fresh cross-compiler works.
11662   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11663   # <limits.h> exists even on freestanding compilers.
11664   # On the NeXT, cc -E runs the code through the compiler's parser,
11665   # not just through cpp. "Syntax error" is here to catch this case.
11666   cat >conftest.$ac_ext <<_ACEOF
11667 /* confdefs.h.  */
11668 _ACEOF
11669 cat confdefs.h >>conftest.$ac_ext
11670 cat >>conftest.$ac_ext <<_ACEOF
11671 /* end confdefs.h.  */
11672 #ifdef __STDC__
11673 # include <limits.h>
11674 #else
11675 # include <assert.h>
11676 #endif
11677                      Syntax error
11678 _ACEOF
11679 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11680   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11681   ac_status=$?
11682   grep -v '^ *+' conftest.er1 >conftest.err
11683   rm -f conftest.er1
11684   cat conftest.err >&5
11685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11686   (exit $ac_status); } >/dev/null; then
11687   if test -s conftest.err; then
11688     ac_cpp_err=$ac_c_preproc_warn_flag
11689     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11690   else
11691     ac_cpp_err=
11692   fi
11693 else
11694   ac_cpp_err=yes
11695 fi
11696 if test -z "$ac_cpp_err"; then
11697   :
11698 else
11699   echo "$as_me: failed program was:" >&5
11700 sed 's/^/| /' conftest.$ac_ext >&5
11701
11702   # Broken: fails on valid input.
11703 continue
11704 fi
11705 rm -f conftest.err conftest.$ac_ext
11706
11707   # OK, works on sane cases.  Now check whether non-existent headers
11708   # can be detected and how.
11709   cat >conftest.$ac_ext <<_ACEOF
11710 /* confdefs.h.  */
11711 _ACEOF
11712 cat confdefs.h >>conftest.$ac_ext
11713 cat >>conftest.$ac_ext <<_ACEOF
11714 /* end confdefs.h.  */
11715 #include <ac_nonexistent.h>
11716 _ACEOF
11717 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11718   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11719   ac_status=$?
11720   grep -v '^ *+' conftest.er1 >conftest.err
11721   rm -f conftest.er1
11722   cat conftest.err >&5
11723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724   (exit $ac_status); } >/dev/null; then
11725   if test -s conftest.err; then
11726     ac_cpp_err=$ac_c_preproc_warn_flag
11727     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11728   else
11729     ac_cpp_err=
11730   fi
11731 else
11732   ac_cpp_err=yes
11733 fi
11734 if test -z "$ac_cpp_err"; then
11735   # Broken: success on invalid input.
11736 continue
11737 else
11738   echo "$as_me: failed program was:" >&5
11739 sed 's/^/| /' conftest.$ac_ext >&5
11740
11741   # Passes both tests.
11742 ac_preproc_ok=:
11743 break
11744 fi
11745 rm -f conftest.err conftest.$ac_ext
11746
11747 done
11748 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
11749 rm -f conftest.err conftest.$ac_ext
11750 if $ac_preproc_ok; then
11751   :
11752 else
11753   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
11754 See \`config.log' for more details." >&5
11755 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
11756 See \`config.log' for more details." >&2;}
11757    { (exit 1); exit 1; }; }
11758 fi
11759
11760 ac_ext=c
11761 ac_cpp='$CPP $CPPFLAGS'
11762 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11763 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11764 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11765
11766
11767 case $host_os in
11768   *mingw32* ) ac_cv_mingw32=yes ;;
11769   *cygwin* ) ac_cv_cygwin=yes ;;
11770 esac
11771
11772
11773
11774
11775 cat >>confdefs.h <<_ACEOF
11776 #define EXEEXT "${EXEEXT}"
11777 _ACEOF
11778
11779
11780 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
11781 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
11782 if test "${ac_cv_lib_be_be_app+set}" = set; then
11783   echo $ECHO_N "(cached) $ECHO_C" >&6
11784 else
11785   ac_check_lib_save_LIBS=$LIBS
11786 LIBS="-lbe -lroot -lnet $LIBS"
11787 cat >conftest.$ac_ext <<_ACEOF
11788 /* confdefs.h.  */
11789 _ACEOF
11790 cat confdefs.h >>conftest.$ac_ext
11791 cat >>conftest.$ac_ext <<_ACEOF
11792 /* end confdefs.h.  */
11793
11794 /* Override any gcc2 internal prototype to avoid an error.  */
11795 #ifdef __cplusplus
11796 extern "C"
11797 #endif
11798 /* We use char because int might match the return type of a gcc2
11799    builtin and then its argument prototype would still apply.  */
11800 char be_app ();
11801 int
11802 main ()
11803 {
11804 be_app ();
11805   ;
11806   return 0;
11807 }
11808 _ACEOF
11809 rm -f conftest.$ac_objext conftest$ac_exeext
11810 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11811   (eval $ac_link) 2>conftest.er1
11812   ac_status=$?
11813   grep -v '^ *+' conftest.er1 >conftest.err
11814   rm -f conftest.er1
11815   cat conftest.err >&5
11816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11817   (exit $ac_status); } &&
11818          { ac_try='test -z "$ac_c_werror_flag"
11819                          || test ! -s conftest.err'
11820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11821   (eval $ac_try) 2>&5
11822   ac_status=$?
11823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11824   (exit $ac_status); }; } &&
11825          { ac_try='test -s conftest$ac_exeext'
11826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11827   (eval $ac_try) 2>&5
11828   ac_status=$?
11829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11830   (exit $ac_status); }; }; then
11831   ac_cv_lib_be_be_app=yes
11832 else
11833   echo "$as_me: failed program was:" >&5
11834 sed 's/^/| /' conftest.$ac_ext >&5
11835
11836 ac_cv_lib_be_be_app=no
11837 fi
11838 rm -f conftest.err conftest.$ac_objext \
11839       conftest$ac_exeext conftest.$ac_ext
11840 LIBS=$ac_check_lib_save_LIBS
11841 fi
11842 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
11843 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
11844 if test $ac_cv_lib_be_be_app = yes; then
11845   LIBS="$LIBS -lbe -lroot -lnet"
11846 else
11847   :
11848 fi
11849
11850
11851 ac_ext=c
11852 ac_cpp='$CPP $CPPFLAGS'
11853 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11854 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11855 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11856 if test -n "$ac_tool_prefix"; then
11857   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
11858 set dummy ${ac_tool_prefix}gcc; ac_word=$2
11859 echo "$as_me:$LINENO: checking for $ac_word" >&5
11860 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11861 if test "${ac_cv_prog_CC+set}" = set; then
11862   echo $ECHO_N "(cached) $ECHO_C" >&6
11863 else
11864   if test -n "$CC"; then
11865   ac_cv_prog_CC="$CC" # Let the user override the test.
11866 else
11867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11868 for as_dir in $PATH
11869 do
11870   IFS=$as_save_IFS
11871   test -z "$as_dir" && as_dir=.
11872   for ac_exec_ext in '' $ac_executable_extensions; do
11873   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11874     ac_cv_prog_CC="${ac_tool_prefix}gcc"
11875     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11876     break 2
11877   fi
11878 done
11879 done
11880
11881 fi
11882 fi
11883 CC=$ac_cv_prog_CC
11884 if test -n "$CC"; then
11885   echo "$as_me:$LINENO: result: $CC" >&5
11886 echo "${ECHO_T}$CC" >&6
11887 else
11888   echo "$as_me:$LINENO: result: no" >&5
11889 echo "${ECHO_T}no" >&6
11890 fi
11891
11892 fi
11893 if test -z "$ac_cv_prog_CC"; then
11894   ac_ct_CC=$CC
11895   # Extract the first word of "gcc", so it can be a program name with args.
11896 set dummy gcc; ac_word=$2
11897 echo "$as_me:$LINENO: checking for $ac_word" >&5
11898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11899 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
11900   echo $ECHO_N "(cached) $ECHO_C" >&6
11901 else
11902   if test -n "$ac_ct_CC"; then
11903   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11904 else
11905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11906 for as_dir in $PATH
11907 do
11908   IFS=$as_save_IFS
11909   test -z "$as_dir" && as_dir=.
11910   for ac_exec_ext in '' $ac_executable_extensions; do
11911   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11912     ac_cv_prog_ac_ct_CC="gcc"
11913     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11914     break 2
11915   fi
11916 done
11917 done
11918
11919 fi
11920 fi
11921 ac_ct_CC=$ac_cv_prog_ac_ct_CC
11922 if test -n "$ac_ct_CC"; then
11923   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
11924 echo "${ECHO_T}$ac_ct_CC" >&6
11925 else
11926   echo "$as_me:$LINENO: result: no" >&5
11927 echo "${ECHO_T}no" >&6
11928 fi
11929
11930   CC=$ac_ct_CC
11931 else
11932   CC="$ac_cv_prog_CC"
11933 fi
11934
11935 if test -z "$CC"; then
11936   if test -n "$ac_tool_prefix"; then
11937   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
11938 set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
11942   echo $ECHO_N "(cached) $ECHO_C" >&6
11943 else
11944   if test -n "$CC"; then
11945   ac_cv_prog_CC="$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_CC="${ac_tool_prefix}cc"
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 CC=$ac_cv_prog_CC
11964 if test -n "$CC"; then
11965   echo "$as_me:$LINENO: result: $CC" >&5
11966 echo "${ECHO_T}$CC" >&6
11967 else
11968   echo "$as_me:$LINENO: result: no" >&5
11969 echo "${ECHO_T}no" >&6
11970 fi
11971
11972 fi
11973 if test -z "$ac_cv_prog_CC"; then
11974   ac_ct_CC=$CC
11975   # Extract the first word of "cc", so it can be a program name with args.
11976 set dummy cc; ac_word=$2
11977 echo "$as_me:$LINENO: checking for $ac_word" >&5
11978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11979 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
11980   echo $ECHO_N "(cached) $ECHO_C" >&6
11981 else
11982   if test -n "$ac_ct_CC"; then
11983   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11984 else
11985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11986 for as_dir in $PATH
11987 do
11988   IFS=$as_save_IFS
11989   test -z "$as_dir" && as_dir=.
11990   for ac_exec_ext in '' $ac_executable_extensions; do
11991   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11992     ac_cv_prog_ac_ct_CC="cc"
11993     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11994     break 2
11995   fi
11996 done
11997 done
11998
11999 fi
12000 fi
12001 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12002 if test -n "$ac_ct_CC"; then
12003   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12004 echo "${ECHO_T}$ac_ct_CC" >&6
12005 else
12006   echo "$as_me:$LINENO: result: no" >&5
12007 echo "${ECHO_T}no" >&6
12008 fi
12009
12010   CC=$ac_ct_CC
12011 else
12012   CC="$ac_cv_prog_CC"
12013 fi
12014
12015 fi
12016 if test -z "$CC"; then
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_CC+set}" = set; then
12022   echo $ECHO_N "(cached) $ECHO_C" >&6
12023 else
12024   if test -n "$CC"; then
12025   ac_cv_prog_CC="$CC" # Let the user override the test.
12026 else
12027   ac_prog_rejected=no
12028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029 for as_dir in $PATH
12030 do
12031   IFS=$as_save_IFS
12032   test -z "$as_dir" && as_dir=.
12033   for ac_exec_ext in '' $ac_executable_extensions; do
12034   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12035     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12036        ac_prog_rejected=yes
12037        continue
12038      fi
12039     ac_cv_prog_CC="cc"
12040     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12041     break 2
12042   fi
12043 done
12044 done
12045
12046 if test $ac_prog_rejected = yes; then
12047   # We found a bogon in the path, so make sure we never use it.
12048   set dummy $ac_cv_prog_CC
12049   shift
12050   if test $# != 0; then
12051     # We chose a different compiler from the bogus one.
12052     # However, it has the same basename, so the bogon will be chosen
12053     # first if we set CC to just the basename; use the full file name.
12054     shift
12055     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12056   fi
12057 fi
12058 fi
12059 fi
12060 CC=$ac_cv_prog_CC
12061 if test -n "$CC"; then
12062   echo "$as_me:$LINENO: result: $CC" >&5
12063 echo "${ECHO_T}$CC" >&6
12064 else
12065   echo "$as_me:$LINENO: result: no" >&5
12066 echo "${ECHO_T}no" >&6
12067 fi
12068
12069 fi
12070 if test -z "$CC"; then
12071   if test -n "$ac_tool_prefix"; then
12072   for ac_prog in cl
12073   do
12074     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12075 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12076 echo "$as_me:$LINENO: checking for $ac_word" >&5
12077 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12078 if test "${ac_cv_prog_CC+set}" = set; then
12079   echo $ECHO_N "(cached) $ECHO_C" >&6
12080 else
12081   if test -n "$CC"; then
12082   ac_cv_prog_CC="$CC" # Let the user override the test.
12083 else
12084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12085 for as_dir in $PATH
12086 do
12087   IFS=$as_save_IFS
12088   test -z "$as_dir" && as_dir=.
12089   for ac_exec_ext in '' $ac_executable_extensions; do
12090   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12091     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12092     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12093     break 2
12094   fi
12095 done
12096 done
12097
12098 fi
12099 fi
12100 CC=$ac_cv_prog_CC
12101 if test -n "$CC"; then
12102   echo "$as_me:$LINENO: result: $CC" >&5
12103 echo "${ECHO_T}$CC" >&6
12104 else
12105   echo "$as_me:$LINENO: result: no" >&5
12106 echo "${ECHO_T}no" >&6
12107 fi
12108
12109     test -n "$CC" && break
12110   done
12111 fi
12112 if test -z "$CC"; then
12113   ac_ct_CC=$CC
12114   for ac_prog in cl
12115 do
12116   # Extract the first word of "$ac_prog", so it can be a program name with args.
12117 set dummy $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_ac_ct_CC+set}" = set; then
12121   echo $ECHO_N "(cached) $ECHO_C" >&6
12122 else
12123   if test -n "$ac_ct_CC"; then
12124   ac_cv_prog_ac_ct_CC="$ac_ct_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_ac_ct_CC="$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 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12143 if test -n "$ac_ct_CC"; then
12144   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12145 echo "${ECHO_T}$ac_ct_CC" >&6
12146 else
12147   echo "$as_me:$LINENO: result: no" >&5
12148 echo "${ECHO_T}no" >&6
12149 fi
12150
12151   test -n "$ac_ct_CC" && break
12152 done
12153
12154   CC=$ac_ct_CC
12155 fi
12156
12157 fi
12158
12159
12160 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
12161 See \`config.log' for more details." >&5
12162 echo "$as_me: error: no acceptable C compiler found in \$PATH
12163 See \`config.log' for more details." >&2;}
12164    { (exit 1); exit 1; }; }
12165
12166 # Provide some information about the compiler.
12167 echo "$as_me:$LINENO:" \
12168      "checking for C compiler version" >&5
12169 ac_compiler=`set X $ac_compile; echo $2`
12170 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
12171   (eval $ac_compiler --version </dev/null >&5) 2>&5
12172   ac_status=$?
12173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12174   (exit $ac_status); }
12175 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
12176   (eval $ac_compiler -v </dev/null >&5) 2>&5
12177   ac_status=$?
12178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179   (exit $ac_status); }
12180 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
12181   (eval $ac_compiler -V </dev/null >&5) 2>&5
12182   ac_status=$?
12183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184   (exit $ac_status); }
12185
12186 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
12187 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
12188 if test "${ac_cv_c_compiler_gnu+set}" = set; then
12189   echo $ECHO_N "(cached) $ECHO_C" >&6
12190 else
12191   cat >conftest.$ac_ext <<_ACEOF
12192 /* confdefs.h.  */
12193 _ACEOF
12194 cat confdefs.h >>conftest.$ac_ext
12195 cat >>conftest.$ac_ext <<_ACEOF
12196 /* end confdefs.h.  */
12197
12198 int
12199 main ()
12200 {
12201 #ifndef __GNUC__
12202        choke me
12203 #endif
12204
12205   ;
12206   return 0;
12207 }
12208 _ACEOF
12209 rm -f conftest.$ac_objext
12210 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12211   (eval $ac_compile) 2>conftest.er1
12212   ac_status=$?
12213   grep -v '^ *+' conftest.er1 >conftest.err
12214   rm -f conftest.er1
12215   cat conftest.err >&5
12216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12217   (exit $ac_status); } &&
12218          { ac_try='test -z "$ac_c_werror_flag"
12219                          || test ! -s conftest.err'
12220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12221   (eval $ac_try) 2>&5
12222   ac_status=$?
12223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12224   (exit $ac_status); }; } &&
12225          { ac_try='test -s conftest.$ac_objext'
12226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12227   (eval $ac_try) 2>&5
12228   ac_status=$?
12229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12230   (exit $ac_status); }; }; then
12231   ac_compiler_gnu=yes
12232 else
12233   echo "$as_me: failed program was:" >&5
12234 sed 's/^/| /' conftest.$ac_ext >&5
12235
12236 ac_compiler_gnu=no
12237 fi
12238 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12239 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12240
12241 fi
12242 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
12243 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
12244 GCC=`test $ac_compiler_gnu = yes && echo yes`
12245 ac_test_CFLAGS=${CFLAGS+set}
12246 ac_save_CFLAGS=$CFLAGS
12247 CFLAGS="-g"
12248 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
12249 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
12250 if test "${ac_cv_prog_cc_g+set}" = set; then
12251   echo $ECHO_N "(cached) $ECHO_C" >&6
12252 else
12253   cat >conftest.$ac_ext <<_ACEOF
12254 /* confdefs.h.  */
12255 _ACEOF
12256 cat confdefs.h >>conftest.$ac_ext
12257 cat >>conftest.$ac_ext <<_ACEOF
12258 /* end confdefs.h.  */
12259
12260 int
12261 main ()
12262 {
12263
12264   ;
12265   return 0;
12266 }
12267 _ACEOF
12268 rm -f conftest.$ac_objext
12269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12270   (eval $ac_compile) 2>conftest.er1
12271   ac_status=$?
12272   grep -v '^ *+' conftest.er1 >conftest.err
12273   rm -f conftest.er1
12274   cat conftest.err >&5
12275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12276   (exit $ac_status); } &&
12277          { ac_try='test -z "$ac_c_werror_flag"
12278                          || test ! -s conftest.err'
12279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12280   (eval $ac_try) 2>&5
12281   ac_status=$?
12282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283   (exit $ac_status); }; } &&
12284          { ac_try='test -s conftest.$ac_objext'
12285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12286   (eval $ac_try) 2>&5
12287   ac_status=$?
12288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12289   (exit $ac_status); }; }; then
12290   ac_cv_prog_cc_g=yes
12291 else
12292   echo "$as_me: failed program was:" >&5
12293 sed 's/^/| /' conftest.$ac_ext >&5
12294
12295 ac_cv_prog_cc_g=no
12296 fi
12297 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12298 fi
12299 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
12300 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
12301 if test "$ac_test_CFLAGS" = set; then
12302   CFLAGS=$ac_save_CFLAGS
12303 elif test $ac_cv_prog_cc_g = yes; then
12304   if test "$GCC" = yes; then
12305     CFLAGS="-g -O2"
12306   else
12307     CFLAGS="-g"
12308   fi
12309 else
12310   if test "$GCC" = yes; then
12311     CFLAGS="-O2"
12312   else
12313     CFLAGS=
12314   fi
12315 fi
12316 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
12317 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12318 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321   ac_cv_prog_cc_stdc=no
12322 ac_save_CC=$CC
12323 cat >conftest.$ac_ext <<_ACEOF
12324 /* confdefs.h.  */
12325 _ACEOF
12326 cat confdefs.h >>conftest.$ac_ext
12327 cat >>conftest.$ac_ext <<_ACEOF
12328 /* end confdefs.h.  */
12329 #include <stdarg.h>
12330 #include <stdio.h>
12331 #include <sys/types.h>
12332 #include <sys/stat.h>
12333 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12334 struct buf { int x; };
12335 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12336 static char *e (p, i)
12337      char **p;
12338      int i;
12339 {
12340   return p[i];
12341 }
12342 static char *f (char * (*g) (char **, int), char **p, ...)
12343 {
12344   char *s;
12345   va_list v;
12346   va_start (v,p);
12347   s = g (p, va_arg (v,int));
12348   va_end (v);
12349   return s;
12350 }
12351
12352 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12353    function prototypes and stuff, but not '\xHH' hex character constants.
12354    These don't provoke an error unfortunately, instead are silently treated
12355    as 'x'.  The following induces an error, until -std1 is added to get
12356    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12357    array size at least.  It's necessary to write '\x00'==0 to get something
12358    that's true only with -std1.  */
12359 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12360
12361 int test (int i, double x);
12362 struct s1 {int (*f) (int a);};
12363 struct s2 {int (*f) (double a);};
12364 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12365 int argc;
12366 char **argv;
12367 int
12368 main ()
12369 {
12370 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12371   ;
12372   return 0;
12373 }
12374 _ACEOF
12375 # Don't try gcc -ansi; that turns off useful extensions and
12376 # breaks some systems' header files.
12377 # AIX                   -qlanglvl=ansi
12378 # Ultrix and OSF/1      -std1
12379 # HP-UX 10.20 and later -Ae
12380 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12381 # SVR4                  -Xc -D__EXTENSIONS__
12382 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12383 do
12384   CC="$ac_save_CC $ac_arg"
12385   rm -f conftest.$ac_objext
12386 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12387   (eval $ac_compile) 2>conftest.er1
12388   ac_status=$?
12389   grep -v '^ *+' conftest.er1 >conftest.err
12390   rm -f conftest.er1
12391   cat conftest.err >&5
12392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12393   (exit $ac_status); } &&
12394          { ac_try='test -z "$ac_c_werror_flag"
12395                          || test ! -s conftest.err'
12396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12397   (eval $ac_try) 2>&5
12398   ac_status=$?
12399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12400   (exit $ac_status); }; } &&
12401          { ac_try='test -s conftest.$ac_objext'
12402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12403   (eval $ac_try) 2>&5
12404   ac_status=$?
12405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12406   (exit $ac_status); }; }; then
12407   ac_cv_prog_cc_stdc=$ac_arg
12408 break
12409 else
12410   echo "$as_me: failed program was:" >&5
12411 sed 's/^/| /' conftest.$ac_ext >&5
12412
12413 fi
12414 rm -f conftest.err conftest.$ac_objext
12415 done
12416 rm -f conftest.$ac_ext conftest.$ac_objext
12417 CC=$ac_save_CC
12418
12419 fi
12420
12421 case "x$ac_cv_prog_cc_stdc" in
12422   x|xno)
12423     echo "$as_me:$LINENO: result: none needed" >&5
12424 echo "${ECHO_T}none needed" >&6 ;;
12425   *)
12426     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
12427 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12428     CC="$CC $ac_cv_prog_cc_stdc" ;;
12429 esac
12430
12431 # Some people use a C++ compiler to compile C.  Since we use `exit',
12432 # in C++ we need to declare it.  In case someone uses the same compiler
12433 # for both compiling C and C++ we need to have the C++ compiler decide
12434 # the declaration of exit, since it's the most demanding environment.
12435 cat >conftest.$ac_ext <<_ACEOF
12436 #ifndef __cplusplus
12437   choke me
12438 #endif
12439 _ACEOF
12440 rm -f conftest.$ac_objext
12441 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12442   (eval $ac_compile) 2>conftest.er1
12443   ac_status=$?
12444   grep -v '^ *+' conftest.er1 >conftest.err
12445   rm -f conftest.er1
12446   cat conftest.err >&5
12447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12448   (exit $ac_status); } &&
12449          { ac_try='test -z "$ac_c_werror_flag"
12450                          || test ! -s conftest.err'
12451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12452   (eval $ac_try) 2>&5
12453   ac_status=$?
12454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12455   (exit $ac_status); }; } &&
12456          { ac_try='test -s conftest.$ac_objext'
12457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12458   (eval $ac_try) 2>&5
12459   ac_status=$?
12460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461   (exit $ac_status); }; }; then
12462   for ac_declaration in \
12463    '' \
12464    'extern "C" void std::exit (int) throw (); using std::exit;' \
12465    'extern "C" void std::exit (int); using std::exit;' \
12466    'extern "C" void exit (int) throw ();' \
12467    'extern "C" void exit (int);' \
12468    'void exit (int);'
12469 do
12470   cat >conftest.$ac_ext <<_ACEOF
12471 /* confdefs.h.  */
12472 _ACEOF
12473 cat confdefs.h >>conftest.$ac_ext
12474 cat >>conftest.$ac_ext <<_ACEOF
12475 /* end confdefs.h.  */
12476 $ac_declaration
12477 #include <stdlib.h>
12478 int
12479 main ()
12480 {
12481 exit (42);
12482   ;
12483   return 0;
12484 }
12485 _ACEOF
12486 rm -f conftest.$ac_objext
12487 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12488   (eval $ac_compile) 2>conftest.er1
12489   ac_status=$?
12490   grep -v '^ *+' conftest.er1 >conftest.err
12491   rm -f conftest.er1
12492   cat conftest.err >&5
12493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12494   (exit $ac_status); } &&
12495          { ac_try='test -z "$ac_c_werror_flag"
12496                          || test ! -s conftest.err'
12497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12498   (eval $ac_try) 2>&5
12499   ac_status=$?
12500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501   (exit $ac_status); }; } &&
12502          { ac_try='test -s conftest.$ac_objext'
12503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12504   (eval $ac_try) 2>&5
12505   ac_status=$?
12506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507   (exit $ac_status); }; }; then
12508   :
12509 else
12510   echo "$as_me: failed program was:" >&5
12511 sed 's/^/| /' conftest.$ac_ext >&5
12512
12513 continue
12514 fi
12515 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12516   cat >conftest.$ac_ext <<_ACEOF
12517 /* confdefs.h.  */
12518 _ACEOF
12519 cat confdefs.h >>conftest.$ac_ext
12520 cat >>conftest.$ac_ext <<_ACEOF
12521 /* end confdefs.h.  */
12522 $ac_declaration
12523 int
12524 main ()
12525 {
12526 exit (42);
12527   ;
12528   return 0;
12529 }
12530 _ACEOF
12531 rm -f conftest.$ac_objext
12532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12533   (eval $ac_compile) 2>conftest.er1
12534   ac_status=$?
12535   grep -v '^ *+' conftest.er1 >conftest.err
12536   rm -f conftest.er1
12537   cat conftest.err >&5
12538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539   (exit $ac_status); } &&
12540          { ac_try='test -z "$ac_c_werror_flag"
12541                          || test ! -s conftest.err'
12542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); }; } &&
12547          { ac_try='test -s conftest.$ac_objext'
12548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12549   (eval $ac_try) 2>&5
12550   ac_status=$?
12551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552   (exit $ac_status); }; }; then
12553   break
12554 else
12555   echo "$as_me: failed program was:" >&5
12556 sed 's/^/| /' conftest.$ac_ext >&5
12557
12558 fi
12559 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12560 done
12561 rm -f conftest*
12562 if test -n "$ac_declaration"; then
12563   echo '#ifdef __cplusplus' >>confdefs.h
12564   echo $ac_declaration      >>confdefs.h
12565   echo '#endif'             >>confdefs.h
12566 fi
12567
12568 else
12569   echo "$as_me: failed program was:" >&5
12570 sed 's/^/| /' conftest.$ac_ext >&5
12571
12572 fi
12573 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12574 ac_ext=c
12575 ac_cpp='$CPP $CPPFLAGS'
12576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12579
12580 depcc="$CC"   am_compiler_list=
12581
12582 echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
12583 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
12584 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
12585   echo $ECHO_N "(cached) $ECHO_C" >&6
12586 else
12587   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12588   # We make a subdir and do the tests there.  Otherwise we can end up
12589   # making bogus files that we don't know about and never remove.  For
12590   # instance it was reported that on HP-UX the gcc test will end up
12591   # making a dummy file named `D' -- because `-MD' means `put the output
12592   # in D'.
12593   mkdir conftest.dir
12594   # Copy depcomp to subdir because otherwise we won't find it if we're
12595   # using a relative directory.
12596   cp "$am_depcomp" conftest.dir
12597   cd conftest.dir
12598   # We will build objects and dependencies in a subdirectory because
12599   # it helps to detect inapplicable dependency modes.  For instance
12600   # both Tru64's cc and ICC support -MD to output dependencies as a
12601   # side effect of compilation, but ICC will put the dependencies in
12602   # the current directory while Tru64 will put them in the object
12603   # directory.
12604   mkdir sub
12605
12606   am_cv_CC_dependencies_compiler_type=none
12607   if test "$am_compiler_list" = ""; then
12608      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12609   fi
12610   for depmode in $am_compiler_list; do
12611     # Setup a source with many dependencies, because some compilers
12612     # like to wrap large dependency lists on column 80 (with \), and
12613     # we should not choose a depcomp mode which is confused by this.
12614     #
12615     # We need to recreate these files for each test, as the compiler may
12616     # overwrite some of them when testing with obscure command lines.
12617     # This happens at least with the AIX C compiler.
12618     : > sub/conftest.c
12619     for i in 1 2 3 4 5 6; do
12620       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12621       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12622       # Solaris 8's {/usr,}/bin/sh.
12623       touch sub/conftst$i.h
12624     done
12625     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12626
12627     case $depmode in
12628     nosideeffect)
12629       # after this tag, mechanisms are not by side-effect, so they'll
12630       # only be used when explicitly requested
12631       if test "x$enable_dependency_tracking" = xyes; then
12632         continue
12633       else
12634         break
12635       fi
12636       ;;
12637     none) break ;;
12638     esac
12639     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12640     # mode.  It turns out that the SunPro C++ compiler does not properly
12641     # handle `-M -o', and we need to detect this.
12642     if depmode=$depmode \
12643        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12644        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12645        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12646          >/dev/null 2>conftest.err &&
12647        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12648        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12649        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12650       # icc doesn't choke on unknown options, it will just issue warnings
12651       # or remarks (even with -Werror).  So we grep stderr for any message
12652       # that says an option was ignored or not supported.
12653       # When given -MP, icc 7.0 and 7.1 complain thusly:
12654       #   icc: Command line warning: ignoring option '-M'; no argument required
12655       # The diagnosis changed in icc 8.0:
12656       #   icc: Command line remark: option '-MP' not supported
12657       if (grep 'ignoring option' conftest.err ||
12658           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12659         am_cv_CC_dependencies_compiler_type=$depmode
12660         break
12661       fi
12662     fi
12663   done
12664
12665   cd ..
12666   rm -rf conftest.dir
12667 else
12668   am_cv_CC_dependencies_compiler_type=none
12669 fi
12670
12671 fi
12672 echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
12673 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
12674 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12675
12676
12677
12678 if
12679   test "x$enable_dependency_tracking" != xno \
12680   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12681   am__fastdepCC_TRUE=
12682   am__fastdepCC_FALSE='#'
12683 else
12684   am__fastdepCC_TRUE='#'
12685   am__fastdepCC_FALSE=
12686 fi
12687
12688
12689 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
12690         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
12691 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
12692    { (exit 1); exit 1; }; }
12693 fi
12694
12695 # test for make depend flag
12696 OL_MKDEP=
12697 OL_MKDEP_FLAGS=
12698 if test -z "${MKDEP}"; then
12699         OL_MKDEP="${CC-cc}"
12700         if test -z "${MKDEP_FLAGS}"; then
12701                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
12702 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
12703 if test "${ol_cv_mkdep+set}" = set; then
12704   echo $ECHO_N "(cached) $ECHO_C" >&6
12705 else
12706
12707                         ol_cv_mkdep=no
12708                         for flag in "-M" "-xM"; do
12709                                 cat > conftest.c <<EOF
12710  noCode;
12711 EOF
12712                                 if { ac_try='$OL_MKDEP $flag conftest.c'
12713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12714   (eval $ac_try) 2>&5
12715   ac_status=$?
12716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717   (exit $ac_status); }; } \
12718                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
12719                                 then
12720                                         if test ! -f conftest."${ac_object}" ; then
12721                                                 ol_cv_mkdep=$flag
12722                                                 OL_MKDEP_FLAGS="$flag"
12723                                                 break
12724                                         fi
12725                                 fi
12726                         done
12727                         rm -f conftest*
12728
12729 fi
12730 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
12731 echo "${ECHO_T}$ol_cv_mkdep" >&6
12732                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
12733         else
12734                 cc_cv_mkdep=yes
12735                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12736         fi
12737 else
12738         cc_cv_mkdep=yes
12739         OL_MKDEP="${MKDEP}"
12740         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
12741 fi
12742
12743
12744
12745 if test "${ol_cv_mkdep}" = no ; then
12746         # this will soon become an error
12747         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
12748 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
12749 fi
12750
12751 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
12752 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
12753 if test "${ac_cv_lib_s_afopen+set}" = set; then
12754   echo $ECHO_N "(cached) $ECHO_C" >&6
12755 else
12756   ac_check_lib_save_LIBS=$LIBS
12757 LIBS="-ls  $LIBS"
12758 cat >conftest.$ac_ext <<_ACEOF
12759 /* confdefs.h.  */
12760 _ACEOF
12761 cat confdefs.h >>conftest.$ac_ext
12762 cat >>conftest.$ac_ext <<_ACEOF
12763 /* end confdefs.h.  */
12764
12765 /* Override any gcc2 internal prototype to avoid an error.  */
12766 #ifdef __cplusplus
12767 extern "C"
12768 #endif
12769 /* We use char because int might match the return type of a gcc2
12770    builtin and then its argument prototype would still apply.  */
12771 char afopen ();
12772 int
12773 main ()
12774 {
12775 afopen ();
12776   ;
12777   return 0;
12778 }
12779 _ACEOF
12780 rm -f conftest.$ac_objext conftest$ac_exeext
12781 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12782   (eval $ac_link) 2>conftest.er1
12783   ac_status=$?
12784   grep -v '^ *+' conftest.er1 >conftest.err
12785   rm -f conftest.er1
12786   cat conftest.err >&5
12787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12788   (exit $ac_status); } &&
12789          { ac_try='test -z "$ac_c_werror_flag"
12790                          || test ! -s conftest.err'
12791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12792   (eval $ac_try) 2>&5
12793   ac_status=$?
12794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12795   (exit $ac_status); }; } &&
12796          { ac_try='test -s conftest$ac_exeext'
12797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12798   (eval $ac_try) 2>&5
12799   ac_status=$?
12800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12801   (exit $ac_status); }; }; then
12802   ac_cv_lib_s_afopen=yes
12803 else
12804   echo "$as_me: failed program was:" >&5
12805 sed 's/^/| /' conftest.$ac_ext >&5
12806
12807 ac_cv_lib_s_afopen=no
12808 fi
12809 rm -f conftest.err conftest.$ac_objext \
12810       conftest$ac_exeext conftest.$ac_ext
12811 LIBS=$ac_check_lib_save_LIBS
12812 fi
12813 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
12814 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
12815 if test $ac_cv_lib_s_afopen = yes; then
12816
12817         AUTH_LIBS=-ls
12818
12819 cat >>confdefs.h <<\_ACEOF
12820 #define HAVE_AIX_SECURITY 1
12821 _ACEOF
12822
12823
12824 fi
12825
12826
12827 case "$target" in
12828 *-ibm-openedition)
12829         ac_cv_func_getopt=no
12830
12831 cat >>confdefs.h <<\_ACEOF
12832 #define BOTH_STRINGS_H 1
12833 _ACEOF
12834
12835         ;;
12836 esac
12837
12838 ol_link_modules=no
12839 WITH_MODULES_ENABLED=no
12840 if test $ol_enable_modules != no ; then
12841
12842 for ac_header in ltdl.h
12843 do
12844 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12845 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12846   echo "$as_me:$LINENO: checking for $ac_header" >&5
12847 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12848 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12849   echo $ECHO_N "(cached) $ECHO_C" >&6
12850 fi
12851 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12852 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12853 else
12854   # Is the header compilable?
12855 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12856 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12857 cat >conftest.$ac_ext <<_ACEOF
12858 /* confdefs.h.  */
12859 _ACEOF
12860 cat confdefs.h >>conftest.$ac_ext
12861 cat >>conftest.$ac_ext <<_ACEOF
12862 /* end confdefs.h.  */
12863 $ac_includes_default
12864 #include <$ac_header>
12865 _ACEOF
12866 rm -f conftest.$ac_objext
12867 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12868   (eval $ac_compile) 2>conftest.er1
12869   ac_status=$?
12870   grep -v '^ *+' conftest.er1 >conftest.err
12871   rm -f conftest.er1
12872   cat conftest.err >&5
12873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874   (exit $ac_status); } &&
12875          { ac_try='test -z "$ac_c_werror_flag"
12876                          || test ! -s conftest.err'
12877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12878   (eval $ac_try) 2>&5
12879   ac_status=$?
12880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12881   (exit $ac_status); }; } &&
12882          { ac_try='test -s conftest.$ac_objext'
12883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12884   (eval $ac_try) 2>&5
12885   ac_status=$?
12886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887   (exit $ac_status); }; }; then
12888   ac_header_compiler=yes
12889 else
12890   echo "$as_me: failed program was:" >&5
12891 sed 's/^/| /' conftest.$ac_ext >&5
12892
12893 ac_header_compiler=no
12894 fi
12895 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12896 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12897 echo "${ECHO_T}$ac_header_compiler" >&6
12898
12899 # Is the header present?
12900 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12901 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12902 cat >conftest.$ac_ext <<_ACEOF
12903 /* confdefs.h.  */
12904 _ACEOF
12905 cat confdefs.h >>conftest.$ac_ext
12906 cat >>conftest.$ac_ext <<_ACEOF
12907 /* end confdefs.h.  */
12908 #include <$ac_header>
12909 _ACEOF
12910 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12911   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12912   ac_status=$?
12913   grep -v '^ *+' conftest.er1 >conftest.err
12914   rm -f conftest.er1
12915   cat conftest.err >&5
12916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12917   (exit $ac_status); } >/dev/null; then
12918   if test -s conftest.err; then
12919     ac_cpp_err=$ac_c_preproc_warn_flag
12920     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12921   else
12922     ac_cpp_err=
12923   fi
12924 else
12925   ac_cpp_err=yes
12926 fi
12927 if test -z "$ac_cpp_err"; then
12928   ac_header_preproc=yes
12929 else
12930   echo "$as_me: failed program was:" >&5
12931 sed 's/^/| /' conftest.$ac_ext >&5
12932
12933   ac_header_preproc=no
12934 fi
12935 rm -f conftest.err conftest.$ac_ext
12936 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12937 echo "${ECHO_T}$ac_header_preproc" >&6
12938
12939 # So?  What about this header?
12940 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12941   yes:no: )
12942     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12943 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12944     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12945 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12946     ac_header_preproc=yes
12947     ;;
12948   no:yes:* )
12949     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12950 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12951     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12952 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12953     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12954 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12955     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12956 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12957     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12958 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12959     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12960 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12961     (
12962       cat <<\_ASBOX
12963 ## --------------------------------------------- ##
12964 ## Report this to <http://www.openldap.org/its/> ##
12965 ## --------------------------------------------- ##
12966 _ASBOX
12967     ) |
12968       sed "s/^/$as_me: WARNING:     /" >&2
12969     ;;
12970 esac
12971 echo "$as_me:$LINENO: checking for $ac_header" >&5
12972 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12973 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12974   echo $ECHO_N "(cached) $ECHO_C" >&6
12975 else
12976   eval "$as_ac_Header=\$ac_header_preproc"
12977 fi
12978 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12979 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12980
12981 fi
12982 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12983   cat >>confdefs.h <<_ACEOF
12984 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12985 _ACEOF
12986
12987 fi
12988
12989 done
12990
12991
12992         if test $ac_cv_header_ltdl_h = no ; then
12993                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
12994 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
12995    { (exit 1); exit 1; }; }
12996         fi
12997
12998         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
12999 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
13000 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13001   echo $ECHO_N "(cached) $ECHO_C" >&6
13002 else
13003   ac_check_lib_save_LIBS=$LIBS
13004 LIBS="-lltdl  $LIBS"
13005 cat >conftest.$ac_ext <<_ACEOF
13006 /* confdefs.h.  */
13007 _ACEOF
13008 cat confdefs.h >>conftest.$ac_ext
13009 cat >>conftest.$ac_ext <<_ACEOF
13010 /* end confdefs.h.  */
13011
13012 /* Override any gcc2 internal prototype to avoid an error.  */
13013 #ifdef __cplusplus
13014 extern "C"
13015 #endif
13016 /* We use char because int might match the return type of a gcc2
13017    builtin and then its argument prototype would still apply.  */
13018 char lt_dlinit ();
13019 int
13020 main ()
13021 {
13022 lt_dlinit ();
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 rm -f conftest.$ac_objext conftest$ac_exeext
13028 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13029   (eval $ac_link) 2>conftest.er1
13030   ac_status=$?
13031   grep -v '^ *+' conftest.er1 >conftest.err
13032   rm -f conftest.er1
13033   cat conftest.err >&5
13034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13035   (exit $ac_status); } &&
13036          { ac_try='test -z "$ac_c_werror_flag"
13037                          || test ! -s conftest.err'
13038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042   (exit $ac_status); }; } &&
13043          { ac_try='test -s conftest$ac_exeext'
13044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13045   (eval $ac_try) 2>&5
13046   ac_status=$?
13047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13048   (exit $ac_status); }; }; then
13049   ac_cv_lib_ltdl_lt_dlinit=yes
13050 else
13051   echo "$as_me: failed program was:" >&5
13052 sed 's/^/| /' conftest.$ac_ext >&5
13053
13054 ac_cv_lib_ltdl_lt_dlinit=no
13055 fi
13056 rm -f conftest.err conftest.$ac_objext \
13057       conftest$ac_exeext conftest.$ac_ext
13058 LIBS=$ac_check_lib_save_LIBS
13059 fi
13060 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13061 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
13062 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13063
13064                 MODULES_LIBS=-lltdl
13065
13066 cat >>confdefs.h <<\_ACEOF
13067 #define HAVE_LIBLTDL 1
13068 _ACEOF
13069
13070
13071 fi
13072
13073
13074         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13075                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13076 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13077    { (exit 1); exit 1; }; }
13078         fi
13079         ol_link_modules=yes
13080         WITH_MODULES_ENABLED=yes
13081
13082 else
13083         for i in $Backends; do
13084                 eval "ol_tmp=\$ol_enable_$i"
13085                 if test $ol_tmp = mod ; then
13086                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13087 echo "$as_me: WARNING: building static $i backend" >&2;}
13088                         eval "ol_enable_$i=yes"
13089                 fi
13090         done
13091         for i in $Overlays; do
13092                 eval "ol_tmp=\$ol_enable_$i"
13093                 if test $ol_tmp = mod ; then
13094                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13095 echo "$as_me: WARNING: building static $i overlay" >&2;}
13096                         eval "ol_enable_$i=yes"
13097                 fi
13098         done
13099 fi
13100
13101 # test for EBCDIC
13102 echo "$as_me:$LINENO: checking for EBCDIC" >&5
13103 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
13104 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13105   echo $ECHO_N "(cached) $ECHO_C" >&6
13106 else
13107
13108         cat >conftest.$ac_ext <<_ACEOF
13109 /* confdefs.h.  */
13110 _ACEOF
13111 cat confdefs.h >>conftest.$ac_ext
13112 cat >>conftest.$ac_ext <<_ACEOF
13113 /* end confdefs.h.  */
13114
13115 #if !('M' == 0xd4)
13116 #include <__ASCII__/generate_error.h>
13117 #endif
13118
13119 _ACEOF
13120 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13121   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13122   ac_status=$?
13123   grep -v '^ *+' conftest.er1 >conftest.err
13124   rm -f conftest.er1
13125   cat conftest.err >&5
13126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127   (exit $ac_status); } >/dev/null; then
13128   if test -s conftest.err; then
13129     ac_cpp_err=$ac_c_preproc_warn_flag
13130     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13131   else
13132     ac_cpp_err=
13133   fi
13134 else
13135   ac_cpp_err=yes
13136 fi
13137 if test -z "$ac_cpp_err"; then
13138   ol_cv_cpp_ebcdic=yes
13139 else
13140   echo "$as_me: failed program was:" >&5
13141 sed 's/^/| /' conftest.$ac_ext >&5
13142
13143   ol_cv_cpp_ebcdic=no
13144 fi
13145 rm -f conftest.err conftest.$ac_ext
13146 fi
13147 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13148 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
13149 if test $ol_cv_cpp_ebcdic = yes ; then
13150
13151 cat >>confdefs.h <<\_ACEOF
13152 #define HAVE_EBCDIC 1
13153 _ACEOF
13154
13155 fi
13156
13157 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
13158 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13159 if test "${ol_cv_header_stdc+set}" = set; then
13160   echo $ECHO_N "(cached) $ECHO_C" >&6
13161 else
13162   cat >conftest.$ac_ext <<_ACEOF
13163 /* confdefs.h.  */
13164 _ACEOF
13165 cat confdefs.h >>conftest.$ac_ext
13166 cat >>conftest.$ac_ext <<_ACEOF
13167 /* end confdefs.h.  */
13168 #include <stdlib.h>
13169 #include <stdarg.h>
13170 #include <string.h>
13171 #include <float.h>
13172 _ACEOF
13173 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13175   ac_status=$?
13176   grep -v '^ *+' conftest.er1 >conftest.err
13177   rm -f conftest.er1
13178   cat conftest.err >&5
13179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13180   (exit $ac_status); } >/dev/null; then
13181   if test -s conftest.err; then
13182     ac_cpp_err=$ac_c_preproc_warn_flag
13183     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13184   else
13185     ac_cpp_err=
13186   fi
13187 else
13188   ac_cpp_err=yes
13189 fi
13190 if test -z "$ac_cpp_err"; then
13191   ol_cv_header_stdc=yes
13192 else
13193   echo "$as_me: failed program was:" >&5
13194 sed 's/^/| /' conftest.$ac_ext >&5
13195
13196   ol_cv_header_stdc=no
13197 fi
13198 rm -f conftest.err conftest.$ac_ext
13199
13200 if test $ol_cv_header_stdc = yes; then
13201   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13202 cat >conftest.$ac_ext <<_ACEOF
13203 /* confdefs.h.  */
13204 _ACEOF
13205 cat confdefs.h >>conftest.$ac_ext
13206 cat >>conftest.$ac_ext <<_ACEOF
13207 /* end confdefs.h.  */
13208 #include <string.h>
13209
13210 _ACEOF
13211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13212   $EGREP "memchr" >/dev/null 2>&1; then
13213   :
13214 else
13215   ol_cv_header_stdc=no
13216 fi
13217 rm -f conftest*
13218
13219 fi
13220
13221 if test $ol_cv_header_stdc = yes; then
13222   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13223 cat >conftest.$ac_ext <<_ACEOF
13224 /* confdefs.h.  */
13225 _ACEOF
13226 cat confdefs.h >>conftest.$ac_ext
13227 cat >>conftest.$ac_ext <<_ACEOF
13228 /* end confdefs.h.  */
13229 #include <stdlib.h>
13230
13231 _ACEOF
13232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13233   $EGREP "free" >/dev/null 2>&1; then
13234   :
13235 else
13236   ol_cv_header_stdc=no
13237 fi
13238 rm -f conftest*
13239
13240 fi
13241
13242 if test $ol_cv_header_stdc = yes; then
13243   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13244 if test "$cross_compiling" = yes; then
13245   :
13246 else
13247   cat >conftest.$ac_ext <<_ACEOF
13248 /* confdefs.h.  */
13249 _ACEOF
13250 cat confdefs.h >>conftest.$ac_ext
13251 cat >>conftest.$ac_ext <<_ACEOF
13252 /* end confdefs.h.  */
13253 #include <ctype.h>
13254 #ifndef HAVE_EBCDIC
13255 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13256 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13257 #else
13258 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13259                 || ('j' <= (c) && (c) <= 'r') \
13260                 || ('s' <= (c) && (c) <= 'z'))
13261 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13262 #endif
13263 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13264 int main () { int i; for (i = 0; i < 256; i++)
13265 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13266 exit (0); }
13267
13268 _ACEOF
13269 rm -f conftest$ac_exeext
13270 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13271   (eval $ac_link) 2>&5
13272   ac_status=$?
13273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13276   (eval $ac_try) 2>&5
13277   ac_status=$?
13278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279   (exit $ac_status); }; }; then
13280   :
13281 else
13282   echo "$as_me: program exited with status $ac_status" >&5
13283 echo "$as_me: failed program was:" >&5
13284 sed 's/^/| /' conftest.$ac_ext >&5
13285
13286 ( exit $ac_status )
13287 ol_cv_header_stdc=no
13288 fi
13289 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13290 fi
13291 fi
13292 fi
13293 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
13294 echo "${ECHO_T}$ol_cv_header_stdc" >&6
13295 if test $ol_cv_header_stdc = yes; then
13296   cat >>confdefs.h <<\_ACEOF
13297 #define STDC_HEADERS 1
13298 _ACEOF
13299
13300 fi
13301 ac_cv_header_stdc=disable
13302
13303
13304 if test $ol_cv_header_stdc != yes; then
13305         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
13306 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13307 fi
13308
13309
13310
13311
13312
13313
13314 ac_header_dirent=no
13315 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13316   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13317 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
13318 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13319 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13320   echo $ECHO_N "(cached) $ECHO_C" >&6
13321 else
13322   cat >conftest.$ac_ext <<_ACEOF
13323 /* confdefs.h.  */
13324 _ACEOF
13325 cat confdefs.h >>conftest.$ac_ext
13326 cat >>conftest.$ac_ext <<_ACEOF
13327 /* end confdefs.h.  */
13328 #include <sys/types.h>
13329 #include <$ac_hdr>
13330
13331 int
13332 main ()
13333 {
13334 if ((DIR *) 0)
13335 return 0;
13336   ;
13337   return 0;
13338 }
13339 _ACEOF
13340 rm -f conftest.$ac_objext
13341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13342   (eval $ac_compile) 2>conftest.er1
13343   ac_status=$?
13344   grep -v '^ *+' conftest.er1 >conftest.err
13345   rm -f conftest.er1
13346   cat conftest.err >&5
13347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13348   (exit $ac_status); } &&
13349          { ac_try='test -z "$ac_c_werror_flag"
13350                          || test ! -s conftest.err'
13351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13352   (eval $ac_try) 2>&5
13353   ac_status=$?
13354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13355   (exit $ac_status); }; } &&
13356          { ac_try='test -s conftest.$ac_objext'
13357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13358   (eval $ac_try) 2>&5
13359   ac_status=$?
13360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13361   (exit $ac_status); }; }; then
13362   eval "$as_ac_Header=yes"
13363 else
13364   echo "$as_me: failed program was:" >&5
13365 sed 's/^/| /' conftest.$ac_ext >&5
13366
13367 eval "$as_ac_Header=no"
13368 fi
13369 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13370 fi
13371 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13372 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13373 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13374   cat >>confdefs.h <<_ACEOF
13375 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13376 _ACEOF
13377
13378 ac_header_dirent=$ac_hdr; break
13379 fi
13380
13381 done
13382 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13383 if test $ac_header_dirent = dirent.h; then
13384   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13385 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13386 if test "${ac_cv_search_opendir+set}" = set; then
13387   echo $ECHO_N "(cached) $ECHO_C" >&6
13388 else
13389   ac_func_search_save_LIBS=$LIBS
13390 ac_cv_search_opendir=no
13391 cat >conftest.$ac_ext <<_ACEOF
13392 /* confdefs.h.  */
13393 _ACEOF
13394 cat confdefs.h >>conftest.$ac_ext
13395 cat >>conftest.$ac_ext <<_ACEOF
13396 /* end confdefs.h.  */
13397
13398 /* Override any gcc2 internal prototype to avoid an error.  */
13399 #ifdef __cplusplus
13400 extern "C"
13401 #endif
13402 /* We use char because int might match the return type of a gcc2
13403    builtin and then its argument prototype would still apply.  */
13404 char opendir ();
13405 int
13406 main ()
13407 {
13408 opendir ();
13409   ;
13410   return 0;
13411 }
13412 _ACEOF
13413 rm -f conftest.$ac_objext conftest$ac_exeext
13414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13415   (eval $ac_link) 2>conftest.er1
13416   ac_status=$?
13417   grep -v '^ *+' conftest.er1 >conftest.err
13418   rm -f conftest.er1
13419   cat conftest.err >&5
13420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13421   (exit $ac_status); } &&
13422          { ac_try='test -z "$ac_c_werror_flag"
13423                          || test ! -s conftest.err'
13424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13425   (eval $ac_try) 2>&5
13426   ac_status=$?
13427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428   (exit $ac_status); }; } &&
13429          { ac_try='test -s conftest$ac_exeext'
13430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13431   (eval $ac_try) 2>&5
13432   ac_status=$?
13433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434   (exit $ac_status); }; }; then
13435   ac_cv_search_opendir="none required"
13436 else
13437   echo "$as_me: failed program was:" >&5
13438 sed 's/^/| /' conftest.$ac_ext >&5
13439
13440 fi
13441 rm -f conftest.err conftest.$ac_objext \
13442       conftest$ac_exeext conftest.$ac_ext
13443 if test "$ac_cv_search_opendir" = no; then
13444   for ac_lib in dir; do
13445     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13446     cat >conftest.$ac_ext <<_ACEOF
13447 /* confdefs.h.  */
13448 _ACEOF
13449 cat confdefs.h >>conftest.$ac_ext
13450 cat >>conftest.$ac_ext <<_ACEOF
13451 /* end confdefs.h.  */
13452
13453 /* Override any gcc2 internal prototype to avoid an error.  */
13454 #ifdef __cplusplus
13455 extern "C"
13456 #endif
13457 /* We use char because int might match the return type of a gcc2
13458    builtin and then its argument prototype would still apply.  */
13459 char opendir ();
13460 int
13461 main ()
13462 {
13463 opendir ();
13464   ;
13465   return 0;
13466 }
13467 _ACEOF
13468 rm -f conftest.$ac_objext conftest$ac_exeext
13469 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13470   (eval $ac_link) 2>conftest.er1
13471   ac_status=$?
13472   grep -v '^ *+' conftest.er1 >conftest.err
13473   rm -f conftest.er1
13474   cat conftest.err >&5
13475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13476   (exit $ac_status); } &&
13477          { ac_try='test -z "$ac_c_werror_flag"
13478                          || test ! -s conftest.err'
13479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13480   (eval $ac_try) 2>&5
13481   ac_status=$?
13482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13483   (exit $ac_status); }; } &&
13484          { ac_try='test -s conftest$ac_exeext'
13485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13486   (eval $ac_try) 2>&5
13487   ac_status=$?
13488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489   (exit $ac_status); }; }; then
13490   ac_cv_search_opendir="-l$ac_lib"
13491 break
13492 else
13493   echo "$as_me: failed program was:" >&5
13494 sed 's/^/| /' conftest.$ac_ext >&5
13495
13496 fi
13497 rm -f conftest.err conftest.$ac_objext \
13498       conftest$ac_exeext conftest.$ac_ext
13499   done
13500 fi
13501 LIBS=$ac_func_search_save_LIBS
13502 fi
13503 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13504 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13505 if test "$ac_cv_search_opendir" != no; then
13506   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13507
13508 fi
13509
13510 else
13511   echo "$as_me:$LINENO: checking for library containing opendir" >&5
13512 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
13513 if test "${ac_cv_search_opendir+set}" = set; then
13514   echo $ECHO_N "(cached) $ECHO_C" >&6
13515 else
13516   ac_func_search_save_LIBS=$LIBS
13517 ac_cv_search_opendir=no
13518 cat >conftest.$ac_ext <<_ACEOF
13519 /* confdefs.h.  */
13520 _ACEOF
13521 cat confdefs.h >>conftest.$ac_ext
13522 cat >>conftest.$ac_ext <<_ACEOF
13523 /* end confdefs.h.  */
13524
13525 /* Override any gcc2 internal prototype to avoid an error.  */
13526 #ifdef __cplusplus
13527 extern "C"
13528 #endif
13529 /* We use char because int might match the return type of a gcc2
13530    builtin and then its argument prototype would still apply.  */
13531 char opendir ();
13532 int
13533 main ()
13534 {
13535 opendir ();
13536   ;
13537   return 0;
13538 }
13539 _ACEOF
13540 rm -f conftest.$ac_objext conftest$ac_exeext
13541 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13542   (eval $ac_link) 2>conftest.er1
13543   ac_status=$?
13544   grep -v '^ *+' conftest.er1 >conftest.err
13545   rm -f conftest.er1
13546   cat conftest.err >&5
13547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548   (exit $ac_status); } &&
13549          { ac_try='test -z "$ac_c_werror_flag"
13550                          || test ! -s conftest.err'
13551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13552   (eval $ac_try) 2>&5
13553   ac_status=$?
13554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555   (exit $ac_status); }; } &&
13556          { ac_try='test -s conftest$ac_exeext'
13557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   ac_cv_search_opendir="none required"
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 sed 's/^/| /' conftest.$ac_ext >&5
13566
13567 fi
13568 rm -f conftest.err conftest.$ac_objext \
13569       conftest$ac_exeext conftest.$ac_ext
13570 if test "$ac_cv_search_opendir" = no; then
13571   for ac_lib in x; do
13572     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13573     cat >conftest.$ac_ext <<_ACEOF
13574 /* confdefs.h.  */
13575 _ACEOF
13576 cat confdefs.h >>conftest.$ac_ext
13577 cat >>conftest.$ac_ext <<_ACEOF
13578 /* end confdefs.h.  */
13579
13580 /* Override any gcc2 internal prototype to avoid an error.  */
13581 #ifdef __cplusplus
13582 extern "C"
13583 #endif
13584 /* We use char because int might match the return type of a gcc2
13585    builtin and then its argument prototype would still apply.  */
13586 char opendir ();
13587 int
13588 main ()
13589 {
13590 opendir ();
13591   ;
13592   return 0;
13593 }
13594 _ACEOF
13595 rm -f conftest.$ac_objext conftest$ac_exeext
13596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13597   (eval $ac_link) 2>conftest.er1
13598   ac_status=$?
13599   grep -v '^ *+' conftest.er1 >conftest.err
13600   rm -f conftest.er1
13601   cat conftest.err >&5
13602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13603   (exit $ac_status); } &&
13604          { ac_try='test -z "$ac_c_werror_flag"
13605                          || test ! -s conftest.err'
13606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13607   (eval $ac_try) 2>&5
13608   ac_status=$?
13609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13610   (exit $ac_status); }; } &&
13611          { ac_try='test -s conftest$ac_exeext'
13612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13613   (eval $ac_try) 2>&5
13614   ac_status=$?
13615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616   (exit $ac_status); }; }; then
13617   ac_cv_search_opendir="-l$ac_lib"
13618 break
13619 else
13620   echo "$as_me: failed program was:" >&5
13621 sed 's/^/| /' conftest.$ac_ext >&5
13622
13623 fi
13624 rm -f conftest.err conftest.$ac_objext \
13625       conftest$ac_exeext conftest.$ac_ext
13626   done
13627 fi
13628 LIBS=$ac_func_search_save_LIBS
13629 fi
13630 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
13631 echo "${ECHO_T}$ac_cv_search_opendir" >&6
13632 if test "$ac_cv_search_opendir" != no; then
13633   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
13634
13635 fi
13636
13637 fi
13638
13639 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
13640 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
13641 if test "${ac_cv_header_sys_wait_h+set}" = set; then
13642   echo $ECHO_N "(cached) $ECHO_C" >&6
13643 else
13644   cat >conftest.$ac_ext <<_ACEOF
13645 /* confdefs.h.  */
13646 _ACEOF
13647 cat confdefs.h >>conftest.$ac_ext
13648 cat >>conftest.$ac_ext <<_ACEOF
13649 /* end confdefs.h.  */
13650 #include <sys/types.h>
13651 #include <sys/wait.h>
13652 #ifndef WEXITSTATUS
13653 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
13654 #endif
13655 #ifndef WIFEXITED
13656 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13657 #endif
13658
13659 int
13660 main ()
13661 {
13662   int s;
13663   wait (&s);
13664   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13665   ;
13666   return 0;
13667 }
13668 _ACEOF
13669 rm -f conftest.$ac_objext
13670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13671   (eval $ac_compile) 2>conftest.er1
13672   ac_status=$?
13673   grep -v '^ *+' conftest.er1 >conftest.err
13674   rm -f conftest.er1
13675   cat conftest.err >&5
13676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13677   (exit $ac_status); } &&
13678          { ac_try='test -z "$ac_c_werror_flag"
13679                          || test ! -s conftest.err'
13680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13681   (eval $ac_try) 2>&5
13682   ac_status=$?
13683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13684   (exit $ac_status); }; } &&
13685          { ac_try='test -s conftest.$ac_objext'
13686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13687   (eval $ac_try) 2>&5
13688   ac_status=$?
13689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13690   (exit $ac_status); }; }; then
13691   ac_cv_header_sys_wait_h=yes
13692 else
13693   echo "$as_me: failed program was:" >&5
13694 sed 's/^/| /' conftest.$ac_ext >&5
13695
13696 ac_cv_header_sys_wait_h=no
13697 fi
13698 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13699 fi
13700 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
13701 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
13702 if test $ac_cv_header_sys_wait_h = yes; then
13703
13704 cat >>confdefs.h <<\_ACEOF
13705 #define HAVE_SYS_WAIT_H 1
13706 _ACEOF
13707
13708 fi
13709
13710 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
13711 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
13712 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
13713   echo $ECHO_N "(cached) $ECHO_C" >&6
13714 else
13715   cat >conftest.$ac_ext <<_ACEOF
13716 /* confdefs.h.  */
13717 _ACEOF
13718 cat confdefs.h >>conftest.$ac_ext
13719 cat >>conftest.$ac_ext <<_ACEOF
13720 /* end confdefs.h.  */
13721 #include <sys/types.h>
13722 #include <termios.h>
13723 #ifdef TIOCGWINSZ
13724   yes
13725 #endif
13726
13727 _ACEOF
13728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13729   $EGREP "yes" >/dev/null 2>&1; then
13730   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13731 else
13732   ac_cv_sys_tiocgwinsz_in_termios_h=no
13733 fi
13734 rm -f conftest*
13735
13736 fi
13737 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13738 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
13739
13740 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13741   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13742 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
13743 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
13744   echo $ECHO_N "(cached) $ECHO_C" >&6
13745 else
13746   cat >conftest.$ac_ext <<_ACEOF
13747 /* confdefs.h.  */
13748 _ACEOF
13749 cat confdefs.h >>conftest.$ac_ext
13750 cat >>conftest.$ac_ext <<_ACEOF
13751 /* end confdefs.h.  */
13752 #include <sys/types.h>
13753 #include <sys/ioctl.h>
13754 #ifdef TIOCGWINSZ
13755   yes
13756 #endif
13757
13758 _ACEOF
13759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13760   $EGREP "yes" >/dev/null 2>&1; then
13761   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13762 else
13763   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13764 fi
13765 rm -f conftest*
13766
13767 fi
13768 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13769 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
13770
13771   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13772
13773 cat >>confdefs.h <<\_ACEOF
13774 #define GWINSZ_IN_SYS_IOCTL 1
13775 _ACEOF
13776
13777   fi
13778 fi
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828 for ac_header in \
13829         arpa/inet.h             \
13830         arpa/nameser.h  \
13831         assert.h                \
13832         bits/types.h    \
13833         conio.h                 \
13834         crypt.h                 \
13835         direct.h                \
13836         errno.h                 \
13837         fcntl.h                 \
13838         filio.h                 \
13839         getopt.h                \
13840         grp.h                   \
13841         io.h                    \
13842         libutil.h               \
13843         limits.h                \
13844         locale.h                \
13845         malloc.h                \
13846         memory.h                \
13847         psap.h                  \
13848         pwd.h                   \
13849         process.h               \
13850         sgtty.h                 \
13851         shadow.h                \
13852         stddef.h                \
13853         string.h                \
13854         strings.h               \
13855         sysexits.h              \
13856         sys/file.h              \
13857         sys/filio.h             \
13858         sys/fstyp.h             \
13859         sys/errno.h             \
13860         sys/ioctl.h             \
13861         sys/param.h             \
13862         sys/privgrp.h   \
13863         sys/resource.h  \
13864         sys/select.h    \
13865         sys/socket.h    \
13866         sys/stat.h              \
13867         sys/syslog.h    \
13868         sys/time.h              \
13869         sys/types.h             \
13870         sys/uio.h               \
13871         sys/vmount.h    \
13872         syslog.h                \
13873         termios.h               \
13874         unistd.h                \
13875         utime.h                 \
13876
13877 do
13878 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13879 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13880   echo "$as_me:$LINENO: checking for $ac_header" >&5
13881 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13882 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13883   echo $ECHO_N "(cached) $ECHO_C" >&6
13884 fi
13885 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13886 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13887 else
13888   # Is the header compilable?
13889 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13890 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13891 cat >conftest.$ac_ext <<_ACEOF
13892 /* confdefs.h.  */
13893 _ACEOF
13894 cat confdefs.h >>conftest.$ac_ext
13895 cat >>conftest.$ac_ext <<_ACEOF
13896 /* end confdefs.h.  */
13897 $ac_includes_default
13898 #include <$ac_header>
13899 _ACEOF
13900 rm -f conftest.$ac_objext
13901 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13902   (eval $ac_compile) 2>conftest.er1
13903   ac_status=$?
13904   grep -v '^ *+' conftest.er1 >conftest.err
13905   rm -f conftest.er1
13906   cat conftest.err >&5
13907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13908   (exit $ac_status); } &&
13909          { ac_try='test -z "$ac_c_werror_flag"
13910                          || test ! -s conftest.err'
13911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13912   (eval $ac_try) 2>&5
13913   ac_status=$?
13914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13915   (exit $ac_status); }; } &&
13916          { ac_try='test -s conftest.$ac_objext'
13917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13921   (exit $ac_status); }; }; then
13922   ac_header_compiler=yes
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 sed 's/^/| /' conftest.$ac_ext >&5
13926
13927 ac_header_compiler=no
13928 fi
13929 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13930 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13931 echo "${ECHO_T}$ac_header_compiler" >&6
13932
13933 # Is the header present?
13934 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13935 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13936 cat >conftest.$ac_ext <<_ACEOF
13937 /* confdefs.h.  */
13938 _ACEOF
13939 cat confdefs.h >>conftest.$ac_ext
13940 cat >>conftest.$ac_ext <<_ACEOF
13941 /* end confdefs.h.  */
13942 #include <$ac_header>
13943 _ACEOF
13944 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13945   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13946   ac_status=$?
13947   grep -v '^ *+' conftest.er1 >conftest.err
13948   rm -f conftest.er1
13949   cat conftest.err >&5
13950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951   (exit $ac_status); } >/dev/null; then
13952   if test -s conftest.err; then
13953     ac_cpp_err=$ac_c_preproc_warn_flag
13954     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13955   else
13956     ac_cpp_err=
13957   fi
13958 else
13959   ac_cpp_err=yes
13960 fi
13961 if test -z "$ac_cpp_err"; then
13962   ac_header_preproc=yes
13963 else
13964   echo "$as_me: failed program was:" >&5
13965 sed 's/^/| /' conftest.$ac_ext >&5
13966
13967   ac_header_preproc=no
13968 fi
13969 rm -f conftest.err conftest.$ac_ext
13970 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13971 echo "${ECHO_T}$ac_header_preproc" >&6
13972
13973 # So?  What about this header?
13974 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13975   yes:no: )
13976     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13977 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13978     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13979 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13980     ac_header_preproc=yes
13981     ;;
13982   no:yes:* )
13983     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13984 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13985     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13986 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13987     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13988 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13989     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13990 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13991     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13992 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13993     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13994 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13995     (
13996       cat <<\_ASBOX
13997 ## --------------------------------------------- ##
13998 ## Report this to <http://www.openldap.org/its/> ##
13999 ## --------------------------------------------- ##
14000 _ASBOX
14001     ) |
14002       sed "s/^/$as_me: WARNING:     /" >&2
14003     ;;
14004 esac
14005 echo "$as_me:$LINENO: checking for $ac_header" >&5
14006 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14007 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14008   echo $ECHO_N "(cached) $ECHO_C" >&6
14009 else
14010   eval "$as_ac_Header=\$ac_header_preproc"
14011 fi
14012 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14013 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14014
14015 fi
14016 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14017   cat >>confdefs.h <<_ACEOF
14018 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14019 _ACEOF
14020
14021 fi
14022
14023 done
14024
14025
14026 if test "$ac_cv_mingw32" = yes ; then
14027
14028
14029 for ac_header in winsock.h winsock2.h
14030 do
14031 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14032 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14033   echo "$as_me:$LINENO: checking for $ac_header" >&5
14034 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14035 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 fi
14038 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14039 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14040 else
14041   # Is the header compilable?
14042 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14043 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14044 cat >conftest.$ac_ext <<_ACEOF
14045 /* confdefs.h.  */
14046 _ACEOF
14047 cat confdefs.h >>conftest.$ac_ext
14048 cat >>conftest.$ac_ext <<_ACEOF
14049 /* end confdefs.h.  */
14050 $ac_includes_default
14051 #include <$ac_header>
14052 _ACEOF
14053 rm -f conftest.$ac_objext
14054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14055   (eval $ac_compile) 2>conftest.er1
14056   ac_status=$?
14057   grep -v '^ *+' conftest.er1 >conftest.err
14058   rm -f conftest.er1
14059   cat conftest.err >&5
14060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14061   (exit $ac_status); } &&
14062          { ac_try='test -z "$ac_c_werror_flag"
14063                          || test ! -s conftest.err'
14064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14065   (eval $ac_try) 2>&5
14066   ac_status=$?
14067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068   (exit $ac_status); }; } &&
14069          { ac_try='test -s conftest.$ac_objext'
14070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14071   (eval $ac_try) 2>&5
14072   ac_status=$?
14073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074   (exit $ac_status); }; }; then
14075   ac_header_compiler=yes
14076 else
14077   echo "$as_me: failed program was:" >&5
14078 sed 's/^/| /' conftest.$ac_ext >&5
14079
14080 ac_header_compiler=no
14081 fi
14082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14083 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14084 echo "${ECHO_T}$ac_header_compiler" >&6
14085
14086 # Is the header present?
14087 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14088 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14089 cat >conftest.$ac_ext <<_ACEOF
14090 /* confdefs.h.  */
14091 _ACEOF
14092 cat confdefs.h >>conftest.$ac_ext
14093 cat >>conftest.$ac_ext <<_ACEOF
14094 /* end confdefs.h.  */
14095 #include <$ac_header>
14096 _ACEOF
14097 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14098   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14099   ac_status=$?
14100   grep -v '^ *+' conftest.er1 >conftest.err
14101   rm -f conftest.er1
14102   cat conftest.err >&5
14103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14104   (exit $ac_status); } >/dev/null; then
14105   if test -s conftest.err; then
14106     ac_cpp_err=$ac_c_preproc_warn_flag
14107     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14108   else
14109     ac_cpp_err=
14110   fi
14111 else
14112   ac_cpp_err=yes
14113 fi
14114 if test -z "$ac_cpp_err"; then
14115   ac_header_preproc=yes
14116 else
14117   echo "$as_me: failed program was:" >&5
14118 sed 's/^/| /' conftest.$ac_ext >&5
14119
14120   ac_header_preproc=no
14121 fi
14122 rm -f conftest.err conftest.$ac_ext
14123 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14124 echo "${ECHO_T}$ac_header_preproc" >&6
14125
14126 # So?  What about this header?
14127 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14128   yes:no: )
14129     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14130 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14131     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14132 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14133     ac_header_preproc=yes
14134     ;;
14135   no:yes:* )
14136     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14137 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14138     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14139 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14140     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14141 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14142     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14143 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14144     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14145 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14146     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14147 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14148     (
14149       cat <<\_ASBOX
14150 ## --------------------------------------------- ##
14151 ## Report this to <http://www.openldap.org/its/> ##
14152 ## --------------------------------------------- ##
14153 _ASBOX
14154     ) |
14155       sed "s/^/$as_me: WARNING:     /" >&2
14156     ;;
14157 esac
14158 echo "$as_me:$LINENO: checking for $ac_header" >&5
14159 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14160 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14161   echo $ECHO_N "(cached) $ECHO_C" >&6
14162 else
14163   eval "$as_ac_Header=\$ac_header_preproc"
14164 fi
14165 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14166 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14167
14168 fi
14169 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14170   cat >>confdefs.h <<_ACEOF
14171 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14172 _ACEOF
14173
14174 fi
14175
14176 done
14177
14178 fi
14179
14180
14181 for ac_header in resolv.h
14182 do
14183 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14184 echo "$as_me:$LINENO: checking for $ac_header" >&5
14185 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14187   echo $ECHO_N "(cached) $ECHO_C" >&6
14188 else
14189   cat >conftest.$ac_ext <<_ACEOF
14190 /* confdefs.h.  */
14191 _ACEOF
14192 cat confdefs.h >>conftest.$ac_ext
14193 cat >>conftest.$ac_ext <<_ACEOF
14194 /* end confdefs.h.  */
14195 $ac_includes_default
14196 #include <netinet/in.h>
14197
14198
14199 #include <$ac_header>
14200 _ACEOF
14201 rm -f conftest.$ac_objext
14202 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14203   (eval $ac_compile) 2>conftest.er1
14204   ac_status=$?
14205   grep -v '^ *+' conftest.er1 >conftest.err
14206   rm -f conftest.er1
14207   cat conftest.err >&5
14208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209   (exit $ac_status); } &&
14210          { ac_try='test -z "$ac_c_werror_flag"
14211                          || test ! -s conftest.err'
14212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14213   (eval $ac_try) 2>&5
14214   ac_status=$?
14215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216   (exit $ac_status); }; } &&
14217          { ac_try='test -s conftest.$ac_objext'
14218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14219   (eval $ac_try) 2>&5
14220   ac_status=$?
14221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14222   (exit $ac_status); }; }; then
14223   eval "$as_ac_Header=yes"
14224 else
14225   echo "$as_me: failed program was:" >&5
14226 sed 's/^/| /' conftest.$ac_ext >&5
14227
14228 eval "$as_ac_Header=no"
14229 fi
14230 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14231 fi
14232 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14233 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14234 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14235   cat >>confdefs.h <<_ACEOF
14236 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14237 _ACEOF
14238
14239 fi
14240
14241 done
14242
14243
14244
14245 for ac_header in netinet/tcp.h
14246 do
14247 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14248 echo "$as_me:$LINENO: checking for $ac_header" >&5
14249 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14250 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14251   echo $ECHO_N "(cached) $ECHO_C" >&6
14252 else
14253   cat >conftest.$ac_ext <<_ACEOF
14254 /* confdefs.h.  */
14255 _ACEOF
14256 cat confdefs.h >>conftest.$ac_ext
14257 cat >>conftest.$ac_ext <<_ACEOF
14258 /* end confdefs.h.  */
14259 $ac_includes_default
14260 #include <netinet/in.h>
14261
14262
14263 #include <$ac_header>
14264 _ACEOF
14265 rm -f conftest.$ac_objext
14266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14267   (eval $ac_compile) 2>conftest.er1
14268   ac_status=$?
14269   grep -v '^ *+' conftest.er1 >conftest.err
14270   rm -f conftest.er1
14271   cat conftest.err >&5
14272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273   (exit $ac_status); } &&
14274          { ac_try='test -z "$ac_c_werror_flag"
14275                          || test ! -s conftest.err'
14276   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14277   (eval $ac_try) 2>&5
14278   ac_status=$?
14279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14280   (exit $ac_status); }; } &&
14281          { ac_try='test -s conftest.$ac_objext'
14282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14283   (eval $ac_try) 2>&5
14284   ac_status=$?
14285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286   (exit $ac_status); }; }; then
14287   eval "$as_ac_Header=yes"
14288 else
14289   echo "$as_me: failed program was:" >&5
14290 sed 's/^/| /' conftest.$ac_ext >&5
14291
14292 eval "$as_ac_Header=no"
14293 fi
14294 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14295 fi
14296 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14297 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14298 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14299   cat >>confdefs.h <<_ACEOF
14300 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14301 _ACEOF
14302
14303 fi
14304
14305 done
14306
14307
14308
14309 for ac_header in sys/ucred.h
14310 do
14311 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14312 echo "$as_me:$LINENO: checking for $ac_header" >&5
14313 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14315   echo $ECHO_N "(cached) $ECHO_C" >&6
14316 else
14317   cat >conftest.$ac_ext <<_ACEOF
14318 /* confdefs.h.  */
14319 _ACEOF
14320 cat confdefs.h >>conftest.$ac_ext
14321 cat >>conftest.$ac_ext <<_ACEOF
14322 /* end confdefs.h.  */
14323 $ac_includes_default
14324 #ifdef HAVE_SYS_PARAM_H
14325 #include <sys/param.h>
14326 #endif
14327
14328
14329 #include <$ac_header>
14330 _ACEOF
14331 rm -f conftest.$ac_objext
14332 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14333   (eval $ac_compile) 2>conftest.er1
14334   ac_status=$?
14335   grep -v '^ *+' conftest.er1 >conftest.err
14336   rm -f conftest.er1
14337   cat conftest.err >&5
14338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14339   (exit $ac_status); } &&
14340          { ac_try='test -z "$ac_c_werror_flag"
14341                          || test ! -s conftest.err'
14342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14343   (eval $ac_try) 2>&5
14344   ac_status=$?
14345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14346   (exit $ac_status); }; } &&
14347          { ac_try='test -s conftest.$ac_objext'
14348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14349   (eval $ac_try) 2>&5
14350   ac_status=$?
14351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14352   (exit $ac_status); }; }; then
14353   eval "$as_ac_Header=yes"
14354 else
14355   echo "$as_me: failed program was:" >&5
14356 sed 's/^/| /' conftest.$ac_ext >&5
14357
14358 eval "$as_ac_Header=no"
14359 fi
14360 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14361 fi
14362 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14363 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14364 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14365   cat >>confdefs.h <<_ACEOF
14366 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14367 _ACEOF
14368
14369 fi
14370
14371 done
14372
14373
14374
14375
14376
14377 for ac_func in sigaction sigset
14378 do
14379 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14380 echo "$as_me:$LINENO: checking for $ac_func" >&5
14381 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14382 if eval "test \"\${$as_ac_var+set}\" = set"; then
14383   echo $ECHO_N "(cached) $ECHO_C" >&6
14384 else
14385   cat >conftest.$ac_ext <<_ACEOF
14386 /* confdefs.h.  */
14387 _ACEOF
14388 cat confdefs.h >>conftest.$ac_ext
14389 cat >>conftest.$ac_ext <<_ACEOF
14390 /* end confdefs.h.  */
14391 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14392    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14393 #define $ac_func innocuous_$ac_func
14394
14395 /* System header to define __stub macros and hopefully few prototypes,
14396     which can conflict with char $ac_func (); below.
14397     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14398     <limits.h> exists even on freestanding compilers.  */
14399
14400 #ifdef __STDC__
14401 # include <limits.h>
14402 #else
14403 # include <assert.h>
14404 #endif
14405
14406 #undef $ac_func
14407
14408 /* Override any gcc2 internal prototype to avoid an error.  */
14409 #ifdef __cplusplus
14410 extern "C"
14411 {
14412 #endif
14413 /* We use char because int might match the return type of a gcc2
14414    builtin and then its argument prototype would still apply.  */
14415 char $ac_func ();
14416 /* The GNU C library defines this for functions which it implements
14417     to always fail with ENOSYS.  Some functions are actually named
14418     something starting with __ and the normal name is an alias.  */
14419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14420 choke me
14421 #else
14422 char (*f) () = $ac_func;
14423 #endif
14424 #ifdef __cplusplus
14425 }
14426 #endif
14427
14428 int
14429 main ()
14430 {
14431 return f != $ac_func;
14432   ;
14433   return 0;
14434 }
14435 _ACEOF
14436 rm -f conftest.$ac_objext conftest$ac_exeext
14437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14438   (eval $ac_link) 2>conftest.er1
14439   ac_status=$?
14440   grep -v '^ *+' conftest.er1 >conftest.err
14441   rm -f conftest.er1
14442   cat conftest.err >&5
14443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444   (exit $ac_status); } &&
14445          { ac_try='test -z "$ac_c_werror_flag"
14446                          || test ! -s conftest.err'
14447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14448   (eval $ac_try) 2>&5
14449   ac_status=$?
14450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14451   (exit $ac_status); }; } &&
14452          { ac_try='test -s conftest$ac_exeext'
14453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14454   (eval $ac_try) 2>&5
14455   ac_status=$?
14456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14457   (exit $ac_status); }; }; then
14458   eval "$as_ac_var=yes"
14459 else
14460   echo "$as_me: failed program was:" >&5
14461 sed 's/^/| /' conftest.$ac_ext >&5
14462
14463 eval "$as_ac_var=no"
14464 fi
14465 rm -f conftest.err conftest.$ac_objext \
14466       conftest$ac_exeext conftest.$ac_ext
14467 fi
14468 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14469 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14470 if test `eval echo '${'$as_ac_var'}'` = yes; then
14471   cat >>confdefs.h <<_ACEOF
14472 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14473 _ACEOF
14474
14475 fi
14476 done
14477
14478
14479 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
14480
14481 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
14482 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
14483 if test "${ac_cv_lib_V3_sigset+set}" = set; then
14484   echo $ECHO_N "(cached) $ECHO_C" >&6
14485 else
14486   ac_check_lib_save_LIBS=$LIBS
14487 LIBS="-lV3  $LIBS"
14488 cat >conftest.$ac_ext <<_ACEOF
14489 /* confdefs.h.  */
14490 _ACEOF
14491 cat confdefs.h >>conftest.$ac_ext
14492 cat >>conftest.$ac_ext <<_ACEOF
14493 /* end confdefs.h.  */
14494
14495 /* Override any gcc2 internal prototype to avoid an error.  */
14496 #ifdef __cplusplus
14497 extern "C"
14498 #endif
14499 /* We use char because int might match the return type of a gcc2
14500    builtin and then its argument prototype would still apply.  */
14501 char sigset ();
14502 int
14503 main ()
14504 {
14505 sigset ();
14506   ;
14507   return 0;
14508 }
14509 _ACEOF
14510 rm -f conftest.$ac_objext conftest$ac_exeext
14511 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14512   (eval $ac_link) 2>conftest.er1
14513   ac_status=$?
14514   grep -v '^ *+' conftest.er1 >conftest.err
14515   rm -f conftest.er1
14516   cat conftest.err >&5
14517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518   (exit $ac_status); } &&
14519          { ac_try='test -z "$ac_c_werror_flag"
14520                          || test ! -s conftest.err'
14521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14522   (eval $ac_try) 2>&5
14523   ac_status=$?
14524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14525   (exit $ac_status); }; } &&
14526          { ac_try='test -s conftest$ac_exeext'
14527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14528   (eval $ac_try) 2>&5
14529   ac_status=$?
14530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14531   (exit $ac_status); }; }; then
14532   ac_cv_lib_V3_sigset=yes
14533 else
14534   echo "$as_me: failed program was:" >&5
14535 sed 's/^/| /' conftest.$ac_ext >&5
14536
14537 ac_cv_lib_V3_sigset=no
14538 fi
14539 rm -f conftest.err conftest.$ac_objext \
14540       conftest$ac_exeext conftest.$ac_ext
14541 LIBS=$ac_check_lib_save_LIBS
14542 fi
14543 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
14544 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
14545 if test $ac_cv_lib_V3_sigset = yes; then
14546   cat >>confdefs.h <<_ACEOF
14547 #define HAVE_LIBV3 1
14548 _ACEOF
14549
14550   LIBS="-lV3 $LIBS"
14551
14552 fi
14553
14554 fi
14555
14556 if test "$ac_cv_header_winsock_h" = yes; then
14557 echo "$as_me:$LINENO: checking for winsock" >&5
14558 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
14559 if test "${ol_cv_winsock+set}" = set; then
14560   echo $ECHO_N "(cached) $ECHO_C" >&6
14561 else
14562   save_LIBS="$LIBS"
14563 for curlib in ws2_32 wsock32; do
14564         LIBS="$LIBS -l$curlib"
14565         cat >conftest.$ac_ext <<_ACEOF
14566 /* confdefs.h.  */
14567 _ACEOF
14568 cat confdefs.h >>conftest.$ac_ext
14569 cat >>conftest.$ac_ext <<_ACEOF
14570 /* end confdefs.h.  */
14571 #include <winsock.h>
14572
14573 int
14574 main ()
14575 {
14576
14577                         socket(0,0,0);
14578                         select(0,NULL,NULL,NULL,NULL);
14579                         closesocket(0);
14580                         gethostname(NULL,0);
14581
14582   ;
14583   return 0;
14584 }
14585 _ACEOF
14586 rm -f conftest.$ac_objext conftest$ac_exeext
14587 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14588   (eval $ac_link) 2>conftest.er1
14589   ac_status=$?
14590   grep -v '^ *+' conftest.er1 >conftest.err
14591   rm -f conftest.er1
14592   cat conftest.err >&5
14593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594   (exit $ac_status); } &&
14595          { ac_try='test -z "$ac_c_werror_flag"
14596                          || test ! -s conftest.err'
14597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14598   (eval $ac_try) 2>&5
14599   ac_status=$?
14600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601   (exit $ac_status); }; } &&
14602          { ac_try='test -s conftest$ac_exeext'
14603   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14604   (eval $ac_try) 2>&5
14605   ac_status=$?
14606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607   (exit $ac_status); }; }; then
14608   ol_cv_winsock=yes
14609 else
14610   echo "$as_me: failed program was:" >&5
14611 sed 's/^/| /' conftest.$ac_ext >&5
14612
14613 ol_cv_winsock=no
14614 fi
14615 rm -f conftest.err conftest.$ac_objext \
14616       conftest$ac_exeext conftest.$ac_ext
14617
14618         if test $ol_cv_winsock = yes; then
14619
14620 cat >>confdefs.h <<\_ACEOF
14621 #define HAVE_WINSOCK 1
14622 _ACEOF
14623
14624                 ac_cv_func_socket=yes
14625                 ac_cv_func_select=yes
14626                 ac_cv_func_closesocket=yes
14627                 ac_cv_func_gethostname=yes
14628                 if test $curlib = ws2_32; then
14629                         ol_cv_winsock=winsock2
14630
14631 cat >>confdefs.h <<\_ACEOF
14632 #define HAVE_WINSOCK2 1
14633 _ACEOF
14634
14635                 fi
14636                 break
14637         fi
14638         LIBS="$save_LIBS"
14639 done
14640 fi
14641 echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
14642 echo "${ECHO_T}$ol_cv_winsock" >&6
14643 fi
14644
14645
14646 echo "$as_me:$LINENO: checking for socket" >&5
14647 echo $ECHO_N "checking for socket... $ECHO_C" >&6
14648 if test "${ac_cv_func_socket+set}" = set; then
14649   echo $ECHO_N "(cached) $ECHO_C" >&6
14650 else
14651   cat >conftest.$ac_ext <<_ACEOF
14652 /* confdefs.h.  */
14653 _ACEOF
14654 cat confdefs.h >>conftest.$ac_ext
14655 cat >>conftest.$ac_ext <<_ACEOF
14656 /* end confdefs.h.  */
14657 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
14658    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14659 #define socket innocuous_socket
14660
14661 /* System header to define __stub macros and hopefully few prototypes,
14662     which can conflict with char socket (); below.
14663     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14664     <limits.h> exists even on freestanding compilers.  */
14665
14666 #ifdef __STDC__
14667 # include <limits.h>
14668 #else
14669 # include <assert.h>
14670 #endif
14671
14672 #undef socket
14673
14674 /* Override any gcc2 internal prototype to avoid an error.  */
14675 #ifdef __cplusplus
14676 extern "C"
14677 {
14678 #endif
14679 /* We use char because int might match the return type of a gcc2
14680    builtin and then its argument prototype would still apply.  */
14681 char socket ();
14682 /* The GNU C library defines this for functions which it implements
14683     to always fail with ENOSYS.  Some functions are actually named
14684     something starting with __ and the normal name is an alias.  */
14685 #if defined (__stub_socket) || defined (__stub___socket)
14686 choke me
14687 #else
14688 char (*f) () = socket;
14689 #endif
14690 #ifdef __cplusplus
14691 }
14692 #endif
14693
14694 int
14695 main ()
14696 {
14697 return f != socket;
14698   ;
14699   return 0;
14700 }
14701 _ACEOF
14702 rm -f conftest.$ac_objext conftest$ac_exeext
14703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14704   (eval $ac_link) 2>conftest.er1
14705   ac_status=$?
14706   grep -v '^ *+' conftest.er1 >conftest.err
14707   rm -f conftest.er1
14708   cat conftest.err >&5
14709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14710   (exit $ac_status); } &&
14711          { ac_try='test -z "$ac_c_werror_flag"
14712                          || test ! -s conftest.err'
14713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14714   (eval $ac_try) 2>&5
14715   ac_status=$?
14716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717   (exit $ac_status); }; } &&
14718          { ac_try='test -s conftest$ac_exeext'
14719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723   (exit $ac_status); }; }; then
14724   ac_cv_func_socket=yes
14725 else
14726   echo "$as_me: failed program was:" >&5
14727 sed 's/^/| /' conftest.$ac_ext >&5
14728
14729 ac_cv_func_socket=no
14730 fi
14731 rm -f conftest.err conftest.$ac_objext \
14732       conftest$ac_exeext conftest.$ac_ext
14733 fi
14734 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
14735 echo "${ECHO_T}$ac_cv_func_socket" >&6
14736 if test $ac_cv_func_socket = yes; then
14737   :
14738 else
14739
14740
14741 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
14742 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
14743 if test "${ac_cv_lib_socket_main+set}" = set; then
14744   echo $ECHO_N "(cached) $ECHO_C" >&6
14745 else
14746   ac_check_lib_save_LIBS=$LIBS
14747 LIBS="-lsocket  $LIBS"
14748 cat >conftest.$ac_ext <<_ACEOF
14749 /* confdefs.h.  */
14750 _ACEOF
14751 cat confdefs.h >>conftest.$ac_ext
14752 cat >>conftest.$ac_ext <<_ACEOF
14753 /* end confdefs.h.  */
14754
14755
14756 int
14757 main ()
14758 {
14759 main ();
14760   ;
14761   return 0;
14762 }
14763 _ACEOF
14764 rm -f conftest.$ac_objext conftest$ac_exeext
14765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14766   (eval $ac_link) 2>conftest.er1
14767   ac_status=$?
14768   grep -v '^ *+' conftest.er1 >conftest.err
14769   rm -f conftest.er1
14770   cat conftest.err >&5
14771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772   (exit $ac_status); } &&
14773          { ac_try='test -z "$ac_c_werror_flag"
14774                          || test ! -s conftest.err'
14775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14776   (eval $ac_try) 2>&5
14777   ac_status=$?
14778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779   (exit $ac_status); }; } &&
14780          { ac_try='test -s conftest$ac_exeext'
14781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786   ac_cv_lib_socket_main=yes
14787 else
14788   echo "$as_me: failed program was:" >&5
14789 sed 's/^/| /' conftest.$ac_ext >&5
14790
14791 ac_cv_lib_socket_main=no
14792 fi
14793 rm -f conftest.err conftest.$ac_objext \
14794       conftest$ac_exeext conftest.$ac_ext
14795 LIBS=$ac_check_lib_save_LIBS
14796 fi
14797 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
14798 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
14799 if test $ac_cv_lib_socket_main = yes; then
14800   cat >>confdefs.h <<_ACEOF
14801 #define HAVE_LIBSOCKET 1
14802 _ACEOF
14803
14804   LIBS="-lsocket $LIBS"
14805
14806 fi
14807
14808
14809 echo "$as_me:$LINENO: checking for main in -lnet" >&5
14810 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
14811 if test "${ac_cv_lib_net_main+set}" = set; then
14812   echo $ECHO_N "(cached) $ECHO_C" >&6
14813 else
14814   ac_check_lib_save_LIBS=$LIBS
14815 LIBS="-lnet  $LIBS"
14816 cat >conftest.$ac_ext <<_ACEOF
14817 /* confdefs.h.  */
14818 _ACEOF
14819 cat confdefs.h >>conftest.$ac_ext
14820 cat >>conftest.$ac_ext <<_ACEOF
14821 /* end confdefs.h.  */
14822
14823
14824 int
14825 main ()
14826 {
14827 main ();
14828   ;
14829   return 0;
14830 }
14831 _ACEOF
14832 rm -f conftest.$ac_objext conftest$ac_exeext
14833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14834   (eval $ac_link) 2>conftest.er1
14835   ac_status=$?
14836   grep -v '^ *+' conftest.er1 >conftest.err
14837   rm -f conftest.er1
14838   cat conftest.err >&5
14839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14840   (exit $ac_status); } &&
14841          { ac_try='test -z "$ac_c_werror_flag"
14842                          || test ! -s conftest.err'
14843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14844   (eval $ac_try) 2>&5
14845   ac_status=$?
14846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847   (exit $ac_status); }; } &&
14848          { ac_try='test -s conftest$ac_exeext'
14849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14850   (eval $ac_try) 2>&5
14851   ac_status=$?
14852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853   (exit $ac_status); }; }; then
14854   ac_cv_lib_net_main=yes
14855 else
14856   echo "$as_me: failed program was:" >&5
14857 sed 's/^/| /' conftest.$ac_ext >&5
14858
14859 ac_cv_lib_net_main=no
14860 fi
14861 rm -f conftest.err conftest.$ac_objext \
14862       conftest$ac_exeext conftest.$ac_ext
14863 LIBS=$ac_check_lib_save_LIBS
14864 fi
14865 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
14866 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
14867 if test $ac_cv_lib_net_main = yes; then
14868   cat >>confdefs.h <<_ACEOF
14869 #define HAVE_LIBNET 1
14870 _ACEOF
14871
14872   LIBS="-lnet $LIBS"
14873
14874 fi
14875
14876
14877 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
14878 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
14879 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
14880   echo $ECHO_N "(cached) $ECHO_C" >&6
14881 else
14882   ac_check_lib_save_LIBS=$LIBS
14883 LIBS="-lnsl_s  $LIBS"
14884 cat >conftest.$ac_ext <<_ACEOF
14885 /* confdefs.h.  */
14886 _ACEOF
14887 cat confdefs.h >>conftest.$ac_ext
14888 cat >>conftest.$ac_ext <<_ACEOF
14889 /* end confdefs.h.  */
14890
14891
14892 int
14893 main ()
14894 {
14895 main ();
14896   ;
14897   return 0;
14898 }
14899 _ACEOF
14900 rm -f conftest.$ac_objext conftest$ac_exeext
14901 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14902   (eval $ac_link) 2>conftest.er1
14903   ac_status=$?
14904   grep -v '^ *+' conftest.er1 >conftest.err
14905   rm -f conftest.er1
14906   cat conftest.err >&5
14907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14908   (exit $ac_status); } &&
14909          { ac_try='test -z "$ac_c_werror_flag"
14910                          || test ! -s conftest.err'
14911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14912   (eval $ac_try) 2>&5
14913   ac_status=$?
14914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915   (exit $ac_status); }; } &&
14916          { ac_try='test -s conftest$ac_exeext'
14917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14918   (eval $ac_try) 2>&5
14919   ac_status=$?
14920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14921   (exit $ac_status); }; }; then
14922   ac_cv_lib_nsl_s_main=yes
14923 else
14924   echo "$as_me: failed program was:" >&5
14925 sed 's/^/| /' conftest.$ac_ext >&5
14926
14927 ac_cv_lib_nsl_s_main=no
14928 fi
14929 rm -f conftest.err conftest.$ac_objext \
14930       conftest$ac_exeext conftest.$ac_ext
14931 LIBS=$ac_check_lib_save_LIBS
14932 fi
14933 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
14934 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
14935 if test $ac_cv_lib_nsl_s_main = yes; then
14936   cat >>confdefs.h <<_ACEOF
14937 #define HAVE_LIBNSL_S 1
14938 _ACEOF
14939
14940   LIBS="-lnsl_s $LIBS"
14941
14942 fi
14943
14944
14945 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
14946 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
14947 if test "${ac_cv_lib_nsl_main+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950   ac_check_lib_save_LIBS=$LIBS
14951 LIBS="-lnsl  $LIBS"
14952 cat >conftest.$ac_ext <<_ACEOF
14953 /* confdefs.h.  */
14954 _ACEOF
14955 cat confdefs.h >>conftest.$ac_ext
14956 cat >>conftest.$ac_ext <<_ACEOF
14957 /* end confdefs.h.  */
14958
14959
14960 int
14961 main ()
14962 {
14963 main ();
14964   ;
14965   return 0;
14966 }
14967 _ACEOF
14968 rm -f conftest.$ac_objext conftest$ac_exeext
14969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14970   (eval $ac_link) 2>conftest.er1
14971   ac_status=$?
14972   grep -v '^ *+' conftest.er1 >conftest.err
14973   rm -f conftest.er1
14974   cat conftest.err >&5
14975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976   (exit $ac_status); } &&
14977          { ac_try='test -z "$ac_c_werror_flag"
14978                          || test ! -s conftest.err'
14979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14980   (eval $ac_try) 2>&5
14981   ac_status=$?
14982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14983   (exit $ac_status); }; } &&
14984          { ac_try='test -s conftest$ac_exeext'
14985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14986   (eval $ac_try) 2>&5
14987   ac_status=$?
14988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14989   (exit $ac_status); }; }; then
14990   ac_cv_lib_nsl_main=yes
14991 else
14992   echo "$as_me: failed program was:" >&5
14993 sed 's/^/| /' conftest.$ac_ext >&5
14994
14995 ac_cv_lib_nsl_main=no
14996 fi
14997 rm -f conftest.err conftest.$ac_objext \
14998       conftest$ac_exeext conftest.$ac_ext
14999 LIBS=$ac_check_lib_save_LIBS
15000 fi
15001 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
15002 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
15003 if test $ac_cv_lib_nsl_main = yes; then
15004   cat >>confdefs.h <<_ACEOF
15005 #define HAVE_LIBNSL 1
15006 _ACEOF
15007
15008   LIBS="-lnsl $LIBS"
15009
15010 fi
15011
15012
15013 echo "$as_me:$LINENO: checking for socket in -linet" >&5
15014 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
15015 if test "${ac_cv_lib_inet_socket+set}" = set; then
15016   echo $ECHO_N "(cached) $ECHO_C" >&6
15017 else
15018   ac_check_lib_save_LIBS=$LIBS
15019 LIBS="-linet  $LIBS"
15020 cat >conftest.$ac_ext <<_ACEOF
15021 /* confdefs.h.  */
15022 _ACEOF
15023 cat confdefs.h >>conftest.$ac_ext
15024 cat >>conftest.$ac_ext <<_ACEOF
15025 /* end confdefs.h.  */
15026
15027 /* Override any gcc2 internal prototype to avoid an error.  */
15028 #ifdef __cplusplus
15029 extern "C"
15030 #endif
15031 /* We use char because int might match the return type of a gcc2
15032    builtin and then its argument prototype would still apply.  */
15033 char socket ();
15034 int
15035 main ()
15036 {
15037 socket ();
15038   ;
15039   return 0;
15040 }
15041 _ACEOF
15042 rm -f conftest.$ac_objext conftest$ac_exeext
15043 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15044   (eval $ac_link) 2>conftest.er1
15045   ac_status=$?
15046   grep -v '^ *+' conftest.er1 >conftest.err
15047   rm -f conftest.er1
15048   cat conftest.err >&5
15049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15050   (exit $ac_status); } &&
15051          { ac_try='test -z "$ac_c_werror_flag"
15052                          || test ! -s conftest.err'
15053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15054   (eval $ac_try) 2>&5
15055   ac_status=$?
15056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15057   (exit $ac_status); }; } &&
15058          { ac_try='test -s conftest$ac_exeext'
15059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15060   (eval $ac_try) 2>&5
15061   ac_status=$?
15062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15063   (exit $ac_status); }; }; then
15064   ac_cv_lib_inet_socket=yes
15065 else
15066   echo "$as_me: failed program was:" >&5
15067 sed 's/^/| /' conftest.$ac_ext >&5
15068
15069 ac_cv_lib_inet_socket=no
15070 fi
15071 rm -f conftest.err conftest.$ac_objext \
15072       conftest$ac_exeext conftest.$ac_ext
15073 LIBS=$ac_check_lib_save_LIBS
15074 fi
15075 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15076 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
15077 if test $ac_cv_lib_inet_socket = yes; then
15078   cat >>confdefs.h <<_ACEOF
15079 #define HAVE_LIBINET 1
15080 _ACEOF
15081
15082   LIBS="-linet $LIBS"
15083
15084 fi
15085
15086
15087 echo "$as_me:$LINENO: checking for main in -lgen" >&5
15088 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
15089 if test "${ac_cv_lib_gen_main+set}" = set; then
15090   echo $ECHO_N "(cached) $ECHO_C" >&6
15091 else
15092   ac_check_lib_save_LIBS=$LIBS
15093 LIBS="-lgen  $LIBS"
15094 cat >conftest.$ac_ext <<_ACEOF
15095 /* confdefs.h.  */
15096 _ACEOF
15097 cat confdefs.h >>conftest.$ac_ext
15098 cat >>conftest.$ac_ext <<_ACEOF
15099 /* end confdefs.h.  */
15100
15101
15102 int
15103 main ()
15104 {
15105 main ();
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 rm -f conftest.$ac_objext conftest$ac_exeext
15111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15112   (eval $ac_link) 2>conftest.er1
15113   ac_status=$?
15114   grep -v '^ *+' conftest.er1 >conftest.err
15115   rm -f conftest.er1
15116   cat conftest.err >&5
15117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118   (exit $ac_status); } &&
15119          { ac_try='test -z "$ac_c_werror_flag"
15120                          || test ! -s conftest.err'
15121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15122   (eval $ac_try) 2>&5
15123   ac_status=$?
15124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15125   (exit $ac_status); }; } &&
15126          { ac_try='test -s conftest$ac_exeext'
15127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15128   (eval $ac_try) 2>&5
15129   ac_status=$?
15130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15131   (exit $ac_status); }; }; then
15132   ac_cv_lib_gen_main=yes
15133 else
15134   echo "$as_me: failed program was:" >&5
15135 sed 's/^/| /' conftest.$ac_ext >&5
15136
15137 ac_cv_lib_gen_main=no
15138 fi
15139 rm -f conftest.err conftest.$ac_objext \
15140       conftest$ac_exeext conftest.$ac_ext
15141 LIBS=$ac_check_lib_save_LIBS
15142 fi
15143 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15144 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
15145 if test $ac_cv_lib_gen_main = yes; then
15146   cat >>confdefs.h <<_ACEOF
15147 #define HAVE_LIBGEN 1
15148 _ACEOF
15149
15150   LIBS="-lgen $LIBS"
15151
15152 fi
15153
15154
15155 fi
15156
15157
15158 echo "$as_me:$LINENO: checking for select" >&5
15159 echo $ECHO_N "checking for select... $ECHO_C" >&6
15160 if test "${ac_cv_func_select+set}" = set; then
15161   echo $ECHO_N "(cached) $ECHO_C" >&6
15162 else
15163   cat >conftest.$ac_ext <<_ACEOF
15164 /* confdefs.h.  */
15165 _ACEOF
15166 cat confdefs.h >>conftest.$ac_ext
15167 cat >>conftest.$ac_ext <<_ACEOF
15168 /* end confdefs.h.  */
15169 /* Define select to an innocuous variant, in case <limits.h> declares select.
15170    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15171 #define select innocuous_select
15172
15173 /* System header to define __stub macros and hopefully few prototypes,
15174     which can conflict with char select (); below.
15175     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15176     <limits.h> exists even on freestanding compilers.  */
15177
15178 #ifdef __STDC__
15179 # include <limits.h>
15180 #else
15181 # include <assert.h>
15182 #endif
15183
15184 #undef select
15185
15186 /* Override any gcc2 internal prototype to avoid an error.  */
15187 #ifdef __cplusplus
15188 extern "C"
15189 {
15190 #endif
15191 /* We use char because int might match the return type of a gcc2
15192    builtin and then its argument prototype would still apply.  */
15193 char select ();
15194 /* The GNU C library defines this for functions which it implements
15195     to always fail with ENOSYS.  Some functions are actually named
15196     something starting with __ and the normal name is an alias.  */
15197 #if defined (__stub_select) || defined (__stub___select)
15198 choke me
15199 #else
15200 char (*f) () = select;
15201 #endif
15202 #ifdef __cplusplus
15203 }
15204 #endif
15205
15206 int
15207 main ()
15208 {
15209 return f != select;
15210   ;
15211   return 0;
15212 }
15213 _ACEOF
15214 rm -f conftest.$ac_objext conftest$ac_exeext
15215 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15216   (eval $ac_link) 2>conftest.er1
15217   ac_status=$?
15218   grep -v '^ *+' conftest.er1 >conftest.err
15219   rm -f conftest.er1
15220   cat conftest.err >&5
15221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15222   (exit $ac_status); } &&
15223          { ac_try='test -z "$ac_c_werror_flag"
15224                          || test ! -s conftest.err'
15225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15226   (eval $ac_try) 2>&5
15227   ac_status=$?
15228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15229   (exit $ac_status); }; } &&
15230          { ac_try='test -s conftest$ac_exeext'
15231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15232   (eval $ac_try) 2>&5
15233   ac_status=$?
15234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15235   (exit $ac_status); }; }; then
15236   ac_cv_func_select=yes
15237 else
15238   echo "$as_me: failed program was:" >&5
15239 sed 's/^/| /' conftest.$ac_ext >&5
15240
15241 ac_cv_func_select=no
15242 fi
15243 rm -f conftest.err conftest.$ac_objext \
15244       conftest$ac_exeext conftest.$ac_ext
15245 fi
15246 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15247 echo "${ECHO_T}$ac_cv_func_select" >&6
15248 if test $ac_cv_func_select = yes; then
15249   :
15250 else
15251   { { echo "$as_me:$LINENO: error: select() required." >&5
15252 echo "$as_me: error: select() required." >&2;}
15253    { (exit 1); exit 1; }; }
15254 fi
15255
15256
15257 if test "${ac_cv_header_winsock_h}" != yes; then
15258
15259
15260 for ac_header in sys/select.h sys/socket.h
15261 do
15262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15263 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15264   echo "$as_me:$LINENO: checking for $ac_header" >&5
15265 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15266 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15267   echo $ECHO_N "(cached) $ECHO_C" >&6
15268 fi
15269 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15270 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15271 else
15272   # Is the header compilable?
15273 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15274 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15275 cat >conftest.$ac_ext <<_ACEOF
15276 /* confdefs.h.  */
15277 _ACEOF
15278 cat confdefs.h >>conftest.$ac_ext
15279 cat >>conftest.$ac_ext <<_ACEOF
15280 /* end confdefs.h.  */
15281 $ac_includes_default
15282 #include <$ac_header>
15283 _ACEOF
15284 rm -f conftest.$ac_objext
15285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15286   (eval $ac_compile) 2>conftest.er1
15287   ac_status=$?
15288   grep -v '^ *+' conftest.er1 >conftest.err
15289   rm -f conftest.er1
15290   cat conftest.err >&5
15291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292   (exit $ac_status); } &&
15293          { ac_try='test -z "$ac_c_werror_flag"
15294                          || test ! -s conftest.err'
15295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15296   (eval $ac_try) 2>&5
15297   ac_status=$?
15298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299   (exit $ac_status); }; } &&
15300          { ac_try='test -s conftest.$ac_objext'
15301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15302   (eval $ac_try) 2>&5
15303   ac_status=$?
15304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15305   (exit $ac_status); }; }; then
15306   ac_header_compiler=yes
15307 else
15308   echo "$as_me: failed program was:" >&5
15309 sed 's/^/| /' conftest.$ac_ext >&5
15310
15311 ac_header_compiler=no
15312 fi
15313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15314 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15315 echo "${ECHO_T}$ac_header_compiler" >&6
15316
15317 # Is the header present?
15318 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15319 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15320 cat >conftest.$ac_ext <<_ACEOF
15321 /* confdefs.h.  */
15322 _ACEOF
15323 cat confdefs.h >>conftest.$ac_ext
15324 cat >>conftest.$ac_ext <<_ACEOF
15325 /* end confdefs.h.  */
15326 #include <$ac_header>
15327 _ACEOF
15328 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15329   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15330   ac_status=$?
15331   grep -v '^ *+' conftest.er1 >conftest.err
15332   rm -f conftest.er1
15333   cat conftest.err >&5
15334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335   (exit $ac_status); } >/dev/null; then
15336   if test -s conftest.err; then
15337     ac_cpp_err=$ac_c_preproc_warn_flag
15338     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15339   else
15340     ac_cpp_err=
15341   fi
15342 else
15343   ac_cpp_err=yes
15344 fi
15345 if test -z "$ac_cpp_err"; then
15346   ac_header_preproc=yes
15347 else
15348   echo "$as_me: failed program was:" >&5
15349 sed 's/^/| /' conftest.$ac_ext >&5
15350
15351   ac_header_preproc=no
15352 fi
15353 rm -f conftest.err conftest.$ac_ext
15354 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15355 echo "${ECHO_T}$ac_header_preproc" >&6
15356
15357 # So?  What about this header?
15358 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15359   yes:no: )
15360     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15361 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15362     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15363 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15364     ac_header_preproc=yes
15365     ;;
15366   no:yes:* )
15367     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15368 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15369     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15370 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15371     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15372 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15373     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15374 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15375     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15376 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15377     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15378 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15379     (
15380       cat <<\_ASBOX
15381 ## --------------------------------------------- ##
15382 ## Report this to <http://www.openldap.org/its/> ##
15383 ## --------------------------------------------- ##
15384 _ASBOX
15385     ) |
15386       sed "s/^/$as_me: WARNING:     /" >&2
15387     ;;
15388 esac
15389 echo "$as_me:$LINENO: checking for $ac_header" >&5
15390 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15391 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15392   echo $ECHO_N "(cached) $ECHO_C" >&6
15393 else
15394   eval "$as_ac_Header=\$ac_header_preproc"
15395 fi
15396 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15397 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15398
15399 fi
15400 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15401   cat >>confdefs.h <<_ACEOF
15402 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15403 _ACEOF
15404
15405 fi
15406
15407 done
15408
15409 echo "$as_me:$LINENO: checking types of arguments for select" >&5
15410 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
15411 if test "${ac_cv_func_select_args+set}" = set; then
15412   echo $ECHO_N "(cached) $ECHO_C" >&6
15413 else
15414   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
15415  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
15416   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
15417    cat >conftest.$ac_ext <<_ACEOF
15418 /* confdefs.h.  */
15419 _ACEOF
15420 cat confdefs.h >>conftest.$ac_ext
15421 cat >>conftest.$ac_ext <<_ACEOF
15422 /* end confdefs.h.  */
15423 $ac_includes_default
15424 #if HAVE_SYS_SELECT_H
15425 # include <sys/select.h>
15426 #endif
15427 #if HAVE_SYS_SOCKET_H
15428 # include <sys/socket.h>
15429 #endif
15430
15431 int
15432 main ()
15433 {
15434 extern int select ($ac_arg1,
15435                                             $ac_arg234, $ac_arg234, $ac_arg234,
15436                                             $ac_arg5);
15437   ;
15438   return 0;
15439 }
15440 _ACEOF
15441 rm -f conftest.$ac_objext
15442 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15443   (eval $ac_compile) 2>conftest.er1
15444   ac_status=$?
15445   grep -v '^ *+' conftest.er1 >conftest.err
15446   rm -f conftest.er1
15447   cat conftest.err >&5
15448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449   (exit $ac_status); } &&
15450          { ac_try='test -z "$ac_c_werror_flag"
15451                          || test ! -s conftest.err'
15452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15453   (eval $ac_try) 2>&5
15454   ac_status=$?
15455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456   (exit $ac_status); }; } &&
15457          { ac_try='test -s conftest.$ac_objext'
15458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15459   (eval $ac_try) 2>&5
15460   ac_status=$?
15461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462   (exit $ac_status); }; }; then
15463   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
15464 else
15465   echo "$as_me: failed program was:" >&5
15466 sed 's/^/| /' conftest.$ac_ext >&5
15467
15468 fi
15469 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15470   done
15471  done
15472 done
15473 # Provide a safe default value.
15474 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
15475
15476 fi
15477 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
15478 echo "${ECHO_T}$ac_cv_func_select_args" >&6
15479 ac_save_IFS=$IFS; IFS=','
15480 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
15481 IFS=$ac_save_IFS
15482 shift
15483
15484 cat >>confdefs.h <<_ACEOF
15485 #define SELECT_TYPE_ARG1 $1
15486 _ACEOF
15487
15488
15489 cat >>confdefs.h <<_ACEOF
15490 #define SELECT_TYPE_ARG234 ($2)
15491 _ACEOF
15492
15493
15494 cat >>confdefs.h <<_ACEOF
15495 #define SELECT_TYPE_ARG5 ($3)
15496 _ACEOF
15497
15498 rm -f conftest*
15499
15500 fi
15501
15502
15503
15504 for ac_func in poll
15505 do
15506 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15507 echo "$as_me:$LINENO: checking for $ac_func" >&5
15508 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15509 if eval "test \"\${$as_ac_var+set}\" = set"; then
15510   echo $ECHO_N "(cached) $ECHO_C" >&6
15511 else
15512   cat >conftest.$ac_ext <<_ACEOF
15513 /* confdefs.h.  */
15514 _ACEOF
15515 cat confdefs.h >>conftest.$ac_ext
15516 cat >>conftest.$ac_ext <<_ACEOF
15517 /* end confdefs.h.  */
15518 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15519    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15520 #define $ac_func innocuous_$ac_func
15521
15522 /* System header to define __stub macros and hopefully few prototypes,
15523     which can conflict with char $ac_func (); below.
15524     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15525     <limits.h> exists even on freestanding compilers.  */
15526
15527 #ifdef __STDC__
15528 # include <limits.h>
15529 #else
15530 # include <assert.h>
15531 #endif
15532
15533 #undef $ac_func
15534
15535 /* Override any gcc2 internal prototype to avoid an error.  */
15536 #ifdef __cplusplus
15537 extern "C"
15538 {
15539 #endif
15540 /* We use char because int might match the return type of a gcc2
15541    builtin and then its argument prototype would still apply.  */
15542 char $ac_func ();
15543 /* The GNU C library defines this for functions which it implements
15544     to always fail with ENOSYS.  Some functions are actually named
15545     something starting with __ and the normal name is an alias.  */
15546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15547 choke me
15548 #else
15549 char (*f) () = $ac_func;
15550 #endif
15551 #ifdef __cplusplus
15552 }
15553 #endif
15554
15555 int
15556 main ()
15557 {
15558 return f != $ac_func;
15559   ;
15560   return 0;
15561 }
15562 _ACEOF
15563 rm -f conftest.$ac_objext conftest$ac_exeext
15564 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15565   (eval $ac_link) 2>conftest.er1
15566   ac_status=$?
15567   grep -v '^ *+' conftest.er1 >conftest.err
15568   rm -f conftest.er1
15569   cat conftest.err >&5
15570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15571   (exit $ac_status); } &&
15572          { ac_try='test -z "$ac_c_werror_flag"
15573                          || test ! -s conftest.err'
15574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15575   (eval $ac_try) 2>&5
15576   ac_status=$?
15577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578   (exit $ac_status); }; } &&
15579          { ac_try='test -s conftest$ac_exeext'
15580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15581   (eval $ac_try) 2>&5
15582   ac_status=$?
15583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15584   (exit $ac_status); }; }; then
15585   eval "$as_ac_var=yes"
15586 else
15587   echo "$as_me: failed program was:" >&5
15588 sed 's/^/| /' conftest.$ac_ext >&5
15589
15590 eval "$as_ac_var=no"
15591 fi
15592 rm -f conftest.err conftest.$ac_objext \
15593       conftest$ac_exeext conftest.$ac_ext
15594 fi
15595 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15596 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15597 if test `eval echo '${'$as_ac_var'}'` = yes; then
15598   cat >>confdefs.h <<_ACEOF
15599 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15600 _ACEOF
15601
15602 fi
15603 done
15604
15605 if test $ac_cv_func_poll = yes; then
15606
15607
15608 for ac_header in poll.h sys/poll.h
15609 do
15610 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15612   echo "$as_me:$LINENO: checking for $ac_header" >&5
15613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15615   echo $ECHO_N "(cached) $ECHO_C" >&6
15616 fi
15617 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15618 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15619 else
15620   # Is the header compilable?
15621 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15622 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15623 cat >conftest.$ac_ext <<_ACEOF
15624 /* confdefs.h.  */
15625 _ACEOF
15626 cat confdefs.h >>conftest.$ac_ext
15627 cat >>conftest.$ac_ext <<_ACEOF
15628 /* end confdefs.h.  */
15629 $ac_includes_default
15630 #include <$ac_header>
15631 _ACEOF
15632 rm -f conftest.$ac_objext
15633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15634   (eval $ac_compile) 2>conftest.er1
15635   ac_status=$?
15636   grep -v '^ *+' conftest.er1 >conftest.err
15637   rm -f conftest.er1
15638   cat conftest.err >&5
15639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -z "$ac_c_werror_flag"
15642                          || test ! -s conftest.err'
15643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647   (exit $ac_status); }; } &&
15648          { ac_try='test -s conftest.$ac_objext'
15649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15650   (eval $ac_try) 2>&5
15651   ac_status=$?
15652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653   (exit $ac_status); }; }; then
15654   ac_header_compiler=yes
15655 else
15656   echo "$as_me: failed program was:" >&5
15657 sed 's/^/| /' conftest.$ac_ext >&5
15658
15659 ac_header_compiler=no
15660 fi
15661 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15662 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15663 echo "${ECHO_T}$ac_header_compiler" >&6
15664
15665 # Is the header present?
15666 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15667 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15668 cat >conftest.$ac_ext <<_ACEOF
15669 /* confdefs.h.  */
15670 _ACEOF
15671 cat confdefs.h >>conftest.$ac_ext
15672 cat >>conftest.$ac_ext <<_ACEOF
15673 /* end confdefs.h.  */
15674 #include <$ac_header>
15675 _ACEOF
15676 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15678   ac_status=$?
15679   grep -v '^ *+' conftest.er1 >conftest.err
15680   rm -f conftest.er1
15681   cat conftest.err >&5
15682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15683   (exit $ac_status); } >/dev/null; then
15684   if test -s conftest.err; then
15685     ac_cpp_err=$ac_c_preproc_warn_flag
15686     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15687   else
15688     ac_cpp_err=
15689   fi
15690 else
15691   ac_cpp_err=yes
15692 fi
15693 if test -z "$ac_cpp_err"; then
15694   ac_header_preproc=yes
15695 else
15696   echo "$as_me: failed program was:" >&5
15697 sed 's/^/| /' conftest.$ac_ext >&5
15698
15699   ac_header_preproc=no
15700 fi
15701 rm -f conftest.err conftest.$ac_ext
15702 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15703 echo "${ECHO_T}$ac_header_preproc" >&6
15704
15705 # So?  What about this header?
15706 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15707   yes:no: )
15708     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15709 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15710     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15711 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15712     ac_header_preproc=yes
15713     ;;
15714   no:yes:* )
15715     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15716 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15717     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15718 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15719     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15720 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15721     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15722 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15723     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15724 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15725     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15726 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15727     (
15728       cat <<\_ASBOX
15729 ## --------------------------------------------- ##
15730 ## Report this to <http://www.openldap.org/its/> ##
15731 ## --------------------------------------------- ##
15732 _ASBOX
15733     ) |
15734       sed "s/^/$as_me: WARNING:     /" >&2
15735     ;;
15736 esac
15737 echo "$as_me:$LINENO: checking for $ac_header" >&5
15738 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15739 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15740   echo $ECHO_N "(cached) $ECHO_C" >&6
15741 else
15742   eval "$as_ac_Header=\$ac_header_preproc"
15743 fi
15744 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15745 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15746
15747 fi
15748 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15749   cat >>confdefs.h <<_ACEOF
15750 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15751 _ACEOF
15752
15753 fi
15754
15755 done
15756
15757 fi
15758
15759
15760 for ac_header in sys/epoll.h
15761 do
15762 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15764   echo "$as_me:$LINENO: checking for $ac_header" >&5
15765 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15766 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15767   echo $ECHO_N "(cached) $ECHO_C" >&6
15768 fi
15769 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15770 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15771 else
15772   # Is the header compilable?
15773 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15774 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15775 cat >conftest.$ac_ext <<_ACEOF
15776 /* confdefs.h.  */
15777 _ACEOF
15778 cat confdefs.h >>conftest.$ac_ext
15779 cat >>conftest.$ac_ext <<_ACEOF
15780 /* end confdefs.h.  */
15781 $ac_includes_default
15782 #include <$ac_header>
15783 _ACEOF
15784 rm -f conftest.$ac_objext
15785 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15786   (eval $ac_compile) 2>conftest.er1
15787   ac_status=$?
15788   grep -v '^ *+' conftest.er1 >conftest.err
15789   rm -f conftest.er1
15790   cat conftest.err >&5
15791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15792   (exit $ac_status); } &&
15793          { ac_try='test -z "$ac_c_werror_flag"
15794                          || test ! -s conftest.err'
15795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15796   (eval $ac_try) 2>&5
15797   ac_status=$?
15798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15799   (exit $ac_status); }; } &&
15800          { ac_try='test -s conftest.$ac_objext'
15801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15802   (eval $ac_try) 2>&5
15803   ac_status=$?
15804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15805   (exit $ac_status); }; }; then
15806   ac_header_compiler=yes
15807 else
15808   echo "$as_me: failed program was:" >&5
15809 sed 's/^/| /' conftest.$ac_ext >&5
15810
15811 ac_header_compiler=no
15812 fi
15813 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15814 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15815 echo "${ECHO_T}$ac_header_compiler" >&6
15816
15817 # Is the header present?
15818 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15819 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15820 cat >conftest.$ac_ext <<_ACEOF
15821 /* confdefs.h.  */
15822 _ACEOF
15823 cat confdefs.h >>conftest.$ac_ext
15824 cat >>conftest.$ac_ext <<_ACEOF
15825 /* end confdefs.h.  */
15826 #include <$ac_header>
15827 _ACEOF
15828 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15830   ac_status=$?
15831   grep -v '^ *+' conftest.er1 >conftest.err
15832   rm -f conftest.er1
15833   cat conftest.err >&5
15834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835   (exit $ac_status); } >/dev/null; then
15836   if test -s conftest.err; then
15837     ac_cpp_err=$ac_c_preproc_warn_flag
15838     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15839   else
15840     ac_cpp_err=
15841   fi
15842 else
15843   ac_cpp_err=yes
15844 fi
15845 if test -z "$ac_cpp_err"; then
15846   ac_header_preproc=yes
15847 else
15848   echo "$as_me: failed program was:" >&5
15849 sed 's/^/| /' conftest.$ac_ext >&5
15850
15851   ac_header_preproc=no
15852 fi
15853 rm -f conftest.err conftest.$ac_ext
15854 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15855 echo "${ECHO_T}$ac_header_preproc" >&6
15856
15857 # So?  What about this header?
15858 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15859   yes:no: )
15860     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15861 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15862     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15863 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15864     ac_header_preproc=yes
15865     ;;
15866   no:yes:* )
15867     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15868 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15869     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
15870 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
15871     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15872 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15873     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
15874 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
15875     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15876 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15877     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15878 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15879     (
15880       cat <<\_ASBOX
15881 ## --------------------------------------------- ##
15882 ## Report this to <http://www.openldap.org/its/> ##
15883 ## --------------------------------------------- ##
15884 _ASBOX
15885     ) |
15886       sed "s/^/$as_me: WARNING:     /" >&2
15887     ;;
15888 esac
15889 echo "$as_me:$LINENO: checking for $ac_header" >&5
15890 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15891 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15892   echo $ECHO_N "(cached) $ECHO_C" >&6
15893 else
15894   eval "$as_ac_Header=\$ac_header_preproc"
15895 fi
15896 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15897 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15898
15899 fi
15900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15901   cat >>confdefs.h <<_ACEOF
15902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15903 _ACEOF
15904
15905 fi
15906
15907 done
15908
15909 if test "${ac_cv_header_sys_epoll_h}" = yes; then
15910         echo "$as_me:$LINENO: checking for epoll system call" >&5
15911 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6
15912         if test "$cross_compiling" = yes; then
15913   echo "$as_me:$LINENO: result: no" >&5
15914 echo "${ECHO_T}no" >&6
15915 else
15916   cat >conftest.$ac_ext <<_ACEOF
15917 /* confdefs.h.  */
15918 _ACEOF
15919 cat confdefs.h >>conftest.$ac_ext
15920 cat >>conftest.$ac_ext <<_ACEOF
15921 /* end confdefs.h.  */
15922 int main(int argc, char **argv)
15923 {
15924         int epfd = epoll_create(256);
15925         exit (epfd == -1 ? 1 : 0);
15926 }
15927 _ACEOF
15928 rm -f conftest$ac_exeext
15929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15930   (eval $ac_link) 2>&5
15931   ac_status=$?
15932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15933   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15935   (eval $ac_try) 2>&5
15936   ac_status=$?
15937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938   (exit $ac_status); }; }; then
15939   echo "$as_me:$LINENO: result: yes" >&5
15940 echo "${ECHO_T}yes" >&6
15941
15942 cat >>confdefs.h <<\_ACEOF
15943 #define HAVE_EPOLL 1
15944 _ACEOF
15945
15946 else
15947   echo "$as_me: program exited with status $ac_status" >&5
15948 echo "$as_me: failed program was:" >&5
15949 sed 's/^/| /' conftest.$ac_ext >&5
15950
15951 ( exit $ac_status )
15952 echo "$as_me:$LINENO: result: no" >&5
15953 echo "${ECHO_T}no" >&6
15954 fi
15955 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15956 fi
15957 fi
15958
15959
15960 for ac_header in sys/devpoll.h
15961 do
15962 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15964   echo "$as_me:$LINENO: checking for $ac_header" >&5
15965 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15967   echo $ECHO_N "(cached) $ECHO_C" >&6
15968 fi
15969 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15971 else
15972   # Is the header compilable?
15973 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15974 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15975 cat >conftest.$ac_ext <<_ACEOF
15976 /* confdefs.h.  */
15977 _ACEOF
15978 cat confdefs.h >>conftest.$ac_ext
15979 cat >>conftest.$ac_ext <<_ACEOF
15980 /* end confdefs.h.  */
15981 $ac_includes_default
15982 #include <$ac_header>
15983 _ACEOF
15984 rm -f conftest.$ac_objext
15985 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15986   (eval $ac_compile) 2>conftest.er1
15987   ac_status=$?
15988   grep -v '^ *+' conftest.er1 >conftest.err
15989   rm -f conftest.er1
15990   cat conftest.err >&5
15991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15992   (exit $ac_status); } &&
15993          { ac_try='test -z "$ac_c_werror_flag"
15994                          || test ! -s conftest.err'
15995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15996   (eval $ac_try) 2>&5
15997   ac_status=$?
15998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15999   (exit $ac_status); }; } &&
16000          { ac_try='test -s conftest.$ac_objext'
16001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16002   (eval $ac_try) 2>&5
16003   ac_status=$?
16004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16005   (exit $ac_status); }; }; then
16006   ac_header_compiler=yes
16007 else
16008   echo "$as_me: failed program was:" >&5
16009 sed 's/^/| /' conftest.$ac_ext >&5
16010
16011 ac_header_compiler=no
16012 fi
16013 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16014 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16015 echo "${ECHO_T}$ac_header_compiler" >&6
16016
16017 # Is the header present?
16018 echo "$as_me:$LINENO: checking $ac_header presence" >&5
16019 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
16020 cat >conftest.$ac_ext <<_ACEOF
16021 /* confdefs.h.  */
16022 _ACEOF
16023 cat confdefs.h >>conftest.$ac_ext
16024 cat >>conftest.$ac_ext <<_ACEOF
16025 /* end confdefs.h.  */
16026 #include <$ac_header>
16027 _ACEOF
16028 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16029   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16030   ac_status=$?
16031   grep -v '^ *+' conftest.er1 >conftest.err
16032   rm -f conftest.er1
16033   cat conftest.err >&5
16034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16035   (exit $ac_status); } >/dev/null; then
16036   if test -s conftest.err; then
16037     ac_cpp_err=$ac_c_preproc_warn_flag
16038     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16039   else
16040     ac_cpp_err=
16041   fi
16042 else
16043   ac_cpp_err=yes
16044 fi
16045 if test -z "$ac_cpp_err"; then
16046   ac_header_preproc=yes
16047 else
16048   echo "$as_me: failed program was:" >&5
16049 sed 's/^/| /' conftest.$ac_ext >&5
16050
16051   ac_header_preproc=no
16052 fi
16053 rm -f conftest.err conftest.$ac_ext
16054 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16055 echo "${ECHO_T}$ac_header_preproc" >&6
16056
16057 # So?  What about this header?
16058 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16059   yes:no: )
16060     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16061 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16062     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16063 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16064     ac_header_preproc=yes
16065     ;;
16066   no:yes:* )
16067     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16068 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16069     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16070 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16071     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16072 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16073     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16074 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16075     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16076 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16077     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16078 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16079     (
16080       cat <<\_ASBOX
16081 ## --------------------------------------------- ##
16082 ## Report this to <http://www.openldap.org/its/> ##
16083 ## --------------------------------------------- ##
16084 _ASBOX
16085     ) |
16086       sed "s/^/$as_me: WARNING:     /" >&2
16087     ;;
16088 esac
16089 echo "$as_me:$LINENO: checking for $ac_header" >&5
16090 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16092   echo $ECHO_N "(cached) $ECHO_C" >&6
16093 else
16094   eval "$as_ac_Header=\$ac_header_preproc"
16095 fi
16096 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16097 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16098
16099 fi
16100 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16101   cat >>confdefs.h <<_ACEOF
16102 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16103 _ACEOF
16104
16105 fi
16106
16107 done
16108
16109 if test "${ac_cv_header_sys_devpoll_h}" = yes \
16110                 -a "${ac_cv_header_poll_h}" = yes ; \
16111 then
16112         echo "$as_me:$LINENO: checking for /dev/poll" >&5
16113 echo $ECHO_N "checking for /dev/poll... $ECHO_C" >&6
16114         if test "$cross_compiling" = yes; then
16115   echo "$as_me:$LINENO: result: no" >&5
16116 echo "${ECHO_T}no" >&6
16117 else
16118   cat >conftest.$ac_ext <<_ACEOF
16119 /* confdefs.h.  */
16120 _ACEOF
16121 cat confdefs.h >>conftest.$ac_ext
16122 cat >>conftest.$ac_ext <<_ACEOF
16123 /* end confdefs.h.  */
16124 int main(int argc, char **argv)
16125 {
16126         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
16127         exit (devpollfd == -1 ? 1 : 0);
16128 }
16129 _ACEOF
16130 rm -f conftest$ac_exeext
16131 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16132   (eval $ac_link) 2>&5
16133   ac_status=$?
16134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16137   (eval $ac_try) 2>&5
16138   ac_status=$?
16139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16140   (exit $ac_status); }; }; then
16141   echo "$as_me:$LINENO: result: yes" >&5
16142 echo "${ECHO_T}yes" >&6
16143
16144 cat >>confdefs.h <<\_ACEOF
16145 #define HAVE_DEVPOLL 1
16146 _ACEOF
16147
16148 else
16149   echo "$as_me: program exited with status $ac_status" >&5
16150 echo "$as_me: failed program was:" >&5
16151 sed 's/^/| /' conftest.$ac_ext >&5
16152
16153 ( exit $ac_status )
16154 echo "$as_me:$LINENO: result: no" >&5
16155 echo "${ECHO_T}no" >&6
16156 fi
16157 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16158 fi
16159 fi
16160
16161 # strerror checks
16162 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16163 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16164 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16165   echo $ECHO_N "(cached) $ECHO_C" >&6
16166 else
16167
16168         cat >conftest.$ac_ext <<_ACEOF
16169 /* confdefs.h.  */
16170 _ACEOF
16171 cat confdefs.h >>conftest.$ac_ext
16172 cat >>conftest.$ac_ext <<_ACEOF
16173 /* end confdefs.h.  */
16174
16175 #include <stdio.h>
16176 #include <sys/types.h>
16177 #include <errno.h>
16178 #ifdef _WIN32
16179 #include <stdlib.h>
16180 #endif
16181 int
16182 main ()
16183 {
16184 char *c = (char *) *sys_errlist
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext
16190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16191   (eval $ac_compile) 2>conftest.er1
16192   ac_status=$?
16193   grep -v '^ *+' conftest.er1 >conftest.err
16194   rm -f conftest.er1
16195   cat conftest.err >&5
16196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197   (exit $ac_status); } &&
16198          { ac_try='test -z "$ac_c_werror_flag"
16199                          || test ! -s conftest.err'
16200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16201   (eval $ac_try) 2>&5
16202   ac_status=$?
16203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16204   (exit $ac_status); }; } &&
16205          { ac_try='test -s conftest.$ac_objext'
16206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16207   (eval $ac_try) 2>&5
16208   ac_status=$?
16209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210   (exit $ac_status); }; }; then
16211   ol_cv_dcl_sys_errlist=yes
16212         ol_cv_have_sys_errlist=yes
16213 else
16214   echo "$as_me: failed program was:" >&5
16215 sed 's/^/| /' conftest.$ac_ext >&5
16216
16217 ol_cv_dcl_sys_errlist=no
16218 fi
16219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16220 fi
16221 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16222 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16223 #
16224 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16225 if test $ol_cv_dcl_sys_errlist = no ; then
16226
16227 cat >>confdefs.h <<\_ACEOF
16228 #define DECL_SYS_ERRLIST 1
16229 _ACEOF
16230
16231
16232         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16233 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16234 if test "${ol_cv_have_sys_errlist+set}" = set; then
16235   echo $ECHO_N "(cached) $ECHO_C" >&6
16236 else
16237
16238                 cat >conftest.$ac_ext <<_ACEOF
16239 /* confdefs.h.  */
16240 _ACEOF
16241 cat confdefs.h >>conftest.$ac_ext
16242 cat >>conftest.$ac_ext <<_ACEOF
16243 /* end confdefs.h.  */
16244 #include <errno.h>
16245 int
16246 main ()
16247 {
16248 char *c = (char *) *sys_errlist
16249   ;
16250   return 0;
16251 }
16252 _ACEOF
16253 rm -f conftest.$ac_objext conftest$ac_exeext
16254 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16255   (eval $ac_link) 2>conftest.er1
16256   ac_status=$?
16257   grep -v '^ *+' conftest.er1 >conftest.err
16258   rm -f conftest.er1
16259   cat conftest.err >&5
16260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16261   (exit $ac_status); } &&
16262          { ac_try='test -z "$ac_c_werror_flag"
16263                          || test ! -s conftest.err'
16264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16265   (eval $ac_try) 2>&5
16266   ac_status=$?
16267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16268   (exit $ac_status); }; } &&
16269          { ac_try='test -s conftest$ac_exeext'
16270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16271   (eval $ac_try) 2>&5
16272   ac_status=$?
16273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16274   (exit $ac_status); }; }; then
16275   ol_cv_have_sys_errlist=yes
16276 else
16277   echo "$as_me: failed program was:" >&5
16278 sed 's/^/| /' conftest.$ac_ext >&5
16279
16280 ol_cv_have_sys_errlist=no
16281 fi
16282 rm -f conftest.err conftest.$ac_objext \
16283       conftest$ac_exeext conftest.$ac_ext
16284 fi
16285 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16286 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16287 fi
16288 if test $ol_cv_have_sys_errlist = yes ; then
16289
16290 cat >>confdefs.h <<\_ACEOF
16291 #define HAVE_SYS_ERRLIST 1
16292 _ACEOF
16293
16294 fi
16295
16296
16297 for ac_func in strerror strerror_r
16298 do
16299 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16300 echo "$as_me:$LINENO: checking for $ac_func" >&5
16301 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16302 if eval "test \"\${$as_ac_var+set}\" = set"; then
16303   echo $ECHO_N "(cached) $ECHO_C" >&6
16304 else
16305   cat >conftest.$ac_ext <<_ACEOF
16306 /* confdefs.h.  */
16307 _ACEOF
16308 cat confdefs.h >>conftest.$ac_ext
16309 cat >>conftest.$ac_ext <<_ACEOF
16310 /* end confdefs.h.  */
16311 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16312    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16313 #define $ac_func innocuous_$ac_func
16314
16315 /* System header to define __stub macros and hopefully few prototypes,
16316     which can conflict with char $ac_func (); below.
16317     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16318     <limits.h> exists even on freestanding compilers.  */
16319
16320 #ifdef __STDC__
16321 # include <limits.h>
16322 #else
16323 # include <assert.h>
16324 #endif
16325
16326 #undef $ac_func
16327
16328 /* Override any gcc2 internal prototype to avoid an error.  */
16329 #ifdef __cplusplus
16330 extern "C"
16331 {
16332 #endif
16333 /* We use char because int might match the return type of a gcc2
16334    builtin and then its argument prototype would still apply.  */
16335 char $ac_func ();
16336 /* The GNU C library defines this for functions which it implements
16337     to always fail with ENOSYS.  Some functions are actually named
16338     something starting with __ and the normal name is an alias.  */
16339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16340 choke me
16341 #else
16342 char (*f) () = $ac_func;
16343 #endif
16344 #ifdef __cplusplus
16345 }
16346 #endif
16347
16348 int
16349 main ()
16350 {
16351 return f != $ac_func;
16352   ;
16353   return 0;
16354 }
16355 _ACEOF
16356 rm -f conftest.$ac_objext conftest$ac_exeext
16357 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16358   (eval $ac_link) 2>conftest.er1
16359   ac_status=$?
16360   grep -v '^ *+' conftest.er1 >conftest.err
16361   rm -f conftest.er1
16362   cat conftest.err >&5
16363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16364   (exit $ac_status); } &&
16365          { ac_try='test -z "$ac_c_werror_flag"
16366                          || test ! -s conftest.err'
16367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16368   (eval $ac_try) 2>&5
16369   ac_status=$?
16370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371   (exit $ac_status); }; } &&
16372          { ac_try='test -s conftest$ac_exeext'
16373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16374   (eval $ac_try) 2>&5
16375   ac_status=$?
16376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16377   (exit $ac_status); }; }; then
16378   eval "$as_ac_var=yes"
16379 else
16380   echo "$as_me: failed program was:" >&5
16381 sed 's/^/| /' conftest.$ac_ext >&5
16382
16383 eval "$as_ac_var=no"
16384 fi
16385 rm -f conftest.err conftest.$ac_objext \
16386       conftest$ac_exeext conftest.$ac_ext
16387 fi
16388 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16389 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16390 if test `eval echo '${'$as_ac_var'}'` = yes; then
16391   cat >>confdefs.h <<_ACEOF
16392 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16393 _ACEOF
16394
16395 fi
16396 done
16397
16398 ol_cv_func_strerror_r=no
16399 if test "${ac_cv_func_strerror_r}" = yes ; then
16400         echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
16401 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6
16402 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
16403   echo $ECHO_N "(cached) $ECHO_C" >&6
16404 else
16405
16406         cat >conftest.$ac_ext <<_ACEOF
16407 /* confdefs.h.  */
16408 _ACEOF
16409 cat confdefs.h >>conftest.$ac_ext
16410 cat >>conftest.$ac_ext <<_ACEOF
16411 /* end confdefs.h.  */
16412 #include <string.h>
16413 _ACEOF
16414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16415   $EGREP "strerror_r" >/dev/null 2>&1; then
16416   ol_decl_strerror_r=yes
16417 else
16418   ol_decl_strerror_r=no
16419 fi
16420 rm -f conftest*
16421
16422         if test $ol_decl_strerror_r = yes ; then
16423                 cat >conftest.$ac_ext <<_ACEOF
16424 /* confdefs.h.  */
16425 _ACEOF
16426 cat confdefs.h >>conftest.$ac_ext
16427 cat >>conftest.$ac_ext <<_ACEOF
16428 /* end confdefs.h.  */
16429 #include <string.h>
16430 int
16431 main ()
16432 {
16433    /* from autoconf 2.59 */
16434                                 char buf[100];
16435                                 char x = *strerror_r (0, buf, sizeof buf);
16436                                 char *p = strerror_r (0, buf, sizeof buf);
16437
16438   ;
16439   return 0;
16440 }
16441 _ACEOF
16442 rm -f conftest.$ac_objext
16443 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16444   (eval $ac_compile) 2>conftest.er1
16445   ac_status=$?
16446   grep -v '^ *+' conftest.er1 >conftest.err
16447   rm -f conftest.er1
16448   cat conftest.err >&5
16449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16450   (exit $ac_status); } &&
16451          { ac_try='test -z "$ac_c_werror_flag"
16452                          || test ! -s conftest.err'
16453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16454   (eval $ac_try) 2>&5
16455   ac_status=$?
16456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16457   (exit $ac_status); }; } &&
16458          { ac_try='test -s conftest.$ac_objext'
16459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16460   (eval $ac_try) 2>&5
16461   ac_status=$?
16462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16463   (exit $ac_status); }; }; then
16464   ol_cv_nonposix_strerror_r=yes
16465 else
16466   echo "$as_me: failed program was:" >&5
16467 sed 's/^/| /' conftest.$ac_ext >&5
16468
16469 ol_cv_nonposix_strerror_r=no
16470 fi
16471 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16472         else
16473                 if test "$cross_compiling" = yes; then
16474   ol_cv_nonposix_strerror=no
16475 else
16476   cat >conftest.$ac_ext <<_ACEOF
16477 /* confdefs.h.  */
16478 _ACEOF
16479 cat confdefs.h >>conftest.$ac_ext
16480 cat >>conftest.$ac_ext <<_ACEOF
16481 /* end confdefs.h.  */
16482
16483                         main() {
16484                                 char buf[100];
16485                                 buf[0] = 0;
16486                                 strerror_r( 1, buf, sizeof buf );
16487                                 exit( buf[0] == 0 );
16488                         }
16489
16490 _ACEOF
16491 rm -f conftest$ac_exeext
16492 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16493   (eval $ac_link) 2>&5
16494   ac_status=$?
16495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16496   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16498   (eval $ac_try) 2>&5
16499   ac_status=$?
16500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16501   (exit $ac_status); }; }; then
16502   ol_cv_nonposix_strerror_r=yes
16503 else
16504   echo "$as_me: program exited with status $ac_status" >&5
16505 echo "$as_me: failed program was:" >&5
16506 sed 's/^/| /' conftest.$ac_ext >&5
16507
16508 ( exit $ac_status )
16509 ol_cv_nonposix_strerror=no
16510 fi
16511 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16512 fi
16513         fi
16514
16515 fi
16516 echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
16517 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6
16518 if test $ol_cv_nonposix_strerror_r = yes ; then
16519
16520 cat >>confdefs.h <<\_ACEOF
16521 #define HAVE_NONPOSIX_STRERROR_R 1
16522 _ACEOF
16523
16524 fi
16525
16526 elif test "${ac_cv_func_strerror}" = no ; then
16527         echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16528 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
16529 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16530   echo $ECHO_N "(cached) $ECHO_C" >&6
16531 else
16532
16533         cat >conftest.$ac_ext <<_ACEOF
16534 /* confdefs.h.  */
16535 _ACEOF
16536 cat confdefs.h >>conftest.$ac_ext
16537 cat >>conftest.$ac_ext <<_ACEOF
16538 /* end confdefs.h.  */
16539
16540 #include <stdio.h>
16541 #include <sys/types.h>
16542 #include <errno.h>
16543 #ifdef _WIN32
16544 #include <stdlib.h>
16545 #endif
16546 int
16547 main ()
16548 {
16549 char *c = (char *) *sys_errlist
16550   ;
16551   return 0;
16552 }
16553 _ACEOF
16554 rm -f conftest.$ac_objext
16555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16556   (eval $ac_compile) 2>conftest.er1
16557   ac_status=$?
16558   grep -v '^ *+' conftest.er1 >conftest.err
16559   rm -f conftest.er1
16560   cat conftest.err >&5
16561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562   (exit $ac_status); } &&
16563          { ac_try='test -z "$ac_c_werror_flag"
16564                          || test ! -s conftest.err'
16565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16566   (eval $ac_try) 2>&5
16567   ac_status=$?
16568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16569   (exit $ac_status); }; } &&
16570          { ac_try='test -s conftest.$ac_objext'
16571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16572   (eval $ac_try) 2>&5
16573   ac_status=$?
16574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16575   (exit $ac_status); }; }; then
16576   ol_cv_dcl_sys_errlist=yes
16577         ol_cv_have_sys_errlist=yes
16578 else
16579   echo "$as_me: failed program was:" >&5
16580 sed 's/^/| /' conftest.$ac_ext >&5
16581
16582 ol_cv_dcl_sys_errlist=no
16583 fi
16584 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16585 fi
16586 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16587 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
16588 #
16589 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16590 if test $ol_cv_dcl_sys_errlist = no ; then
16591
16592 cat >>confdefs.h <<\_ACEOF
16593 #define DECL_SYS_ERRLIST 1
16594 _ACEOF
16595
16596
16597         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16598 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
16599 if test "${ol_cv_have_sys_errlist+set}" = set; then
16600   echo $ECHO_N "(cached) $ECHO_C" >&6
16601 else
16602
16603                 cat >conftest.$ac_ext <<_ACEOF
16604 /* confdefs.h.  */
16605 _ACEOF
16606 cat confdefs.h >>conftest.$ac_ext
16607 cat >>conftest.$ac_ext <<_ACEOF
16608 /* end confdefs.h.  */
16609 #include <errno.h>
16610 int
16611 main ()
16612 {
16613 char *c = (char *) *sys_errlist
16614   ;
16615   return 0;
16616 }
16617 _ACEOF
16618 rm -f conftest.$ac_objext conftest$ac_exeext
16619 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16620   (eval $ac_link) 2>conftest.er1
16621   ac_status=$?
16622   grep -v '^ *+' conftest.er1 >conftest.err
16623   rm -f conftest.er1
16624   cat conftest.err >&5
16625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626   (exit $ac_status); } &&
16627          { ac_try='test -z "$ac_c_werror_flag"
16628                          || test ! -s conftest.err'
16629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16630   (eval $ac_try) 2>&5
16631   ac_status=$?
16632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16633   (exit $ac_status); }; } &&
16634          { ac_try='test -s conftest$ac_exeext'
16635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16636   (eval $ac_try) 2>&5
16637   ac_status=$?
16638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16639   (exit $ac_status); }; }; then
16640   ol_cv_have_sys_errlist=yes
16641 else
16642   echo "$as_me: failed program was:" >&5
16643 sed 's/^/| /' conftest.$ac_ext >&5
16644
16645 ol_cv_have_sys_errlist=no
16646 fi
16647 rm -f conftest.err conftest.$ac_objext \
16648       conftest$ac_exeext conftest.$ac_ext
16649 fi
16650 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16651 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
16652 fi
16653 if test $ol_cv_have_sys_errlist = yes ; then
16654
16655 cat >>confdefs.h <<\_ACEOF
16656 #define HAVE_SYS_ERRLIST 1
16657 _ACEOF
16658
16659 fi
16660
16661 fi
16662
16663
16664
16665 for ac_header in regex.h
16666 do
16667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16668 echo "$as_me:$LINENO: checking for $ac_header" >&5
16669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16671   echo $ECHO_N "(cached) $ECHO_C" >&6
16672 else
16673   cat >conftest.$ac_ext <<_ACEOF
16674 /* confdefs.h.  */
16675 _ACEOF
16676 cat confdefs.h >>conftest.$ac_ext
16677 cat >>conftest.$ac_ext <<_ACEOF
16678 /* end confdefs.h.  */
16679 $ac_includes_default
16680 #ifdef HAVE_SYS_TYPES_H
16681 #include <sys/types.h>
16682 #endif
16683
16684
16685 #include <$ac_header>
16686 _ACEOF
16687 rm -f conftest.$ac_objext
16688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16689   (eval $ac_compile) 2>conftest.er1
16690   ac_status=$?
16691   grep -v '^ *+' conftest.er1 >conftest.err
16692   rm -f conftest.er1
16693   cat conftest.err >&5
16694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695   (exit $ac_status); } &&
16696          { ac_try='test -z "$ac_c_werror_flag"
16697                          || test ! -s conftest.err'
16698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16699   (eval $ac_try) 2>&5
16700   ac_status=$?
16701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16702   (exit $ac_status); }; } &&
16703          { ac_try='test -s conftest.$ac_objext'
16704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16705   (eval $ac_try) 2>&5
16706   ac_status=$?
16707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16708   (exit $ac_status); }; }; then
16709   eval "$as_ac_Header=yes"
16710 else
16711   echo "$as_me: failed program was:" >&5
16712 sed 's/^/| /' conftest.$ac_ext >&5
16713
16714 eval "$as_ac_Header=no"
16715 fi
16716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16717 fi
16718 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16721   cat >>confdefs.h <<_ACEOF
16722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16723 _ACEOF
16724
16725 fi
16726
16727 done
16728
16729
16730 if test "$ac_cv_header_regex_h" != yes ; then
16731         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
16732 echo "$as_me: error: POSIX regex.h required." >&2;}
16733    { (exit 1); exit 1; }; }
16734 fi
16735 echo "$as_me:$LINENO: checking for library containing regfree" >&5
16736 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
16737 if test "${ac_cv_search_regfree+set}" = set; then
16738   echo $ECHO_N "(cached) $ECHO_C" >&6
16739 else
16740   ac_func_search_save_LIBS=$LIBS
16741 ac_cv_search_regfree=no
16742 cat >conftest.$ac_ext <<_ACEOF
16743 /* confdefs.h.  */
16744 _ACEOF
16745 cat confdefs.h >>conftest.$ac_ext
16746 cat >>conftest.$ac_ext <<_ACEOF
16747 /* end confdefs.h.  */
16748
16749 /* Override any gcc2 internal prototype to avoid an error.  */
16750 #ifdef __cplusplus
16751 extern "C"
16752 #endif
16753 /* We use char because int might match the return type of a gcc2
16754    builtin and then its argument prototype would still apply.  */
16755 char regfree ();
16756 int
16757 main ()
16758 {
16759 regfree ();
16760   ;
16761   return 0;
16762 }
16763 _ACEOF
16764 rm -f conftest.$ac_objext conftest$ac_exeext
16765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16766   (eval $ac_link) 2>conftest.er1
16767   ac_status=$?
16768   grep -v '^ *+' conftest.er1 >conftest.err
16769   rm -f conftest.er1
16770   cat conftest.err >&5
16771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772   (exit $ac_status); } &&
16773          { ac_try='test -z "$ac_c_werror_flag"
16774                          || test ! -s conftest.err'
16775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16776   (eval $ac_try) 2>&5
16777   ac_status=$?
16778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16779   (exit $ac_status); }; } &&
16780          { ac_try='test -s conftest$ac_exeext'
16781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16782   (eval $ac_try) 2>&5
16783   ac_status=$?
16784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16785   (exit $ac_status); }; }; then
16786   ac_cv_search_regfree="none required"
16787 else
16788   echo "$as_me: failed program was:" >&5
16789 sed 's/^/| /' conftest.$ac_ext >&5
16790
16791 fi
16792 rm -f conftest.err conftest.$ac_objext \
16793       conftest$ac_exeext conftest.$ac_ext
16794 if test "$ac_cv_search_regfree" = no; then
16795   for ac_lib in regex gnuregex; do
16796     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16797     cat >conftest.$ac_ext <<_ACEOF
16798 /* confdefs.h.  */
16799 _ACEOF
16800 cat confdefs.h >>conftest.$ac_ext
16801 cat >>conftest.$ac_ext <<_ACEOF
16802 /* end confdefs.h.  */
16803
16804 /* Override any gcc2 internal prototype to avoid an error.  */
16805 #ifdef __cplusplus
16806 extern "C"
16807 #endif
16808 /* We use char because int might match the return type of a gcc2
16809    builtin and then its argument prototype would still apply.  */
16810 char regfree ();
16811 int
16812 main ()
16813 {
16814 regfree ();
16815   ;
16816   return 0;
16817 }
16818 _ACEOF
16819 rm -f conftest.$ac_objext conftest$ac_exeext
16820 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16821   (eval $ac_link) 2>conftest.er1
16822   ac_status=$?
16823   grep -v '^ *+' conftest.er1 >conftest.err
16824   rm -f conftest.er1
16825   cat conftest.err >&5
16826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16827   (exit $ac_status); } &&
16828          { ac_try='test -z "$ac_c_werror_flag"
16829                          || test ! -s conftest.err'
16830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16831   (eval $ac_try) 2>&5
16832   ac_status=$?
16833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834   (exit $ac_status); }; } &&
16835          { ac_try='test -s conftest$ac_exeext'
16836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16837   (eval $ac_try) 2>&5
16838   ac_status=$?
16839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16840   (exit $ac_status); }; }; then
16841   ac_cv_search_regfree="-l$ac_lib"
16842 break
16843 else
16844   echo "$as_me: failed program was:" >&5
16845 sed 's/^/| /' conftest.$ac_ext >&5
16846
16847 fi
16848 rm -f conftest.err conftest.$ac_objext \
16849       conftest$ac_exeext conftest.$ac_ext
16850   done
16851 fi
16852 LIBS=$ac_func_search_save_LIBS
16853 fi
16854 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
16855 echo "${ECHO_T}$ac_cv_search_regfree" >&6
16856 if test "$ac_cv_search_regfree" != no; then
16857   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
16858   :
16859 else
16860   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
16861 echo "$as_me: error: POSIX regex required." >&2;}
16862    { (exit 1); exit 1; }; }
16863 fi
16864
16865
16866
16867 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
16868 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
16869 if test "${ol_cv_c_posix_regex+set}" = set; then
16870   echo $ECHO_N "(cached) $ECHO_C" >&6
16871 else
16872
16873         if test "$cross_compiling" = yes; then
16874   ol_cv_c_posix_regex=cross
16875 else
16876   cat >conftest.$ac_ext <<_ACEOF
16877 /* confdefs.h.  */
16878 _ACEOF
16879 cat confdefs.h >>conftest.$ac_ext
16880 cat >>conftest.$ac_ext <<_ACEOF
16881 /* end confdefs.h.  */
16882
16883 #include <sys/types.h>
16884 #include <regex.h>
16885 static char *pattern, *string;
16886 main()
16887 {
16888         int rc;
16889         regex_t re;
16890
16891         pattern = "^A";
16892
16893         if(regcomp(&re, pattern, 0)) {
16894                 return -1;
16895         }
16896
16897         string = "ALL MATCH";
16898
16899         rc = regexec(&re, string, 0, (void*)0, 0);
16900
16901         regfree(&re);
16902
16903         return rc;
16904 }
16905 _ACEOF
16906 rm -f conftest$ac_exeext
16907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16908   (eval $ac_link) 2>&5
16909   ac_status=$?
16910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16913   (eval $ac_try) 2>&5
16914   ac_status=$?
16915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16916   (exit $ac_status); }; }; then
16917   ol_cv_c_posix_regex=yes
16918 else
16919   echo "$as_me: program exited with status $ac_status" >&5
16920 echo "$as_me: failed program was:" >&5
16921 sed 's/^/| /' conftest.$ac_ext >&5
16922
16923 ( exit $ac_status )
16924 ol_cv_c_posix_regex=no
16925 fi
16926 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16927 fi
16928 fi
16929 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
16930 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
16931
16932 if test "$ol_cv_c_posix_regex" = no ; then
16933         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
16934 echo "$as_me: error: broken POSIX regex!" >&2;}
16935    { (exit 1); exit 1; }; }
16936 fi
16937
16938
16939 have_uuid=no
16940
16941 for ac_header in sys/uuid.h
16942 do
16943 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16944 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16945   echo "$as_me:$LINENO: checking for $ac_header" >&5
16946 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16947 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16948   echo $ECHO_N "(cached) $ECHO_C" >&6
16949 fi
16950 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
16951 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16952 else
16953   # Is the header compilable?
16954 echo "$as_me:$LINENO: checking $ac_header usability" >&5
16955 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
16956 cat >conftest.$ac_ext <<_ACEOF
16957 /* confdefs.h.  */
16958 _ACEOF
16959 cat confdefs.h >>conftest.$ac_ext
16960 cat >>conftest.$ac_ext <<_ACEOF
16961 /* end confdefs.h.  */
16962 $ac_includes_default
16963 #include <$ac_header>
16964 _ACEOF
16965 rm -f conftest.$ac_objext
16966 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16967   (eval $ac_compile) 2>conftest.er1
16968   ac_status=$?
16969   grep -v '^ *+' conftest.er1 >conftest.err
16970   rm -f conftest.er1
16971   cat conftest.err >&5
16972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16973   (exit $ac_status); } &&
16974          { ac_try='test -z "$ac_c_werror_flag"
16975                          || test ! -s conftest.err'
16976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16977   (eval $ac_try) 2>&5
16978   ac_status=$?
16979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16980   (exit $ac_status); }; } &&
16981          { ac_try='test -s conftest.$ac_objext'
16982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16983   (eval $ac_try) 2>&5
16984   ac_status=$?
16985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16986   (exit $ac_status); }; }; then
16987   ac_header_compiler=yes
16988 else
16989   echo "$as_me: failed program was:" >&5
16990 sed 's/^/| /' conftest.$ac_ext >&5
16991
16992 ac_header_compiler=no
16993 fi
16994 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16995 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16996 echo "${ECHO_T}$ac_header_compiler" >&6
16997
16998 # Is the header present?
16999 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17000 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17001 cat >conftest.$ac_ext <<_ACEOF
17002 /* confdefs.h.  */
17003 _ACEOF
17004 cat confdefs.h >>conftest.$ac_ext
17005 cat >>conftest.$ac_ext <<_ACEOF
17006 /* end confdefs.h.  */
17007 #include <$ac_header>
17008 _ACEOF
17009 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17011   ac_status=$?
17012   grep -v '^ *+' conftest.er1 >conftest.err
17013   rm -f conftest.er1
17014   cat conftest.err >&5
17015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17016   (exit $ac_status); } >/dev/null; then
17017   if test -s conftest.err; then
17018     ac_cpp_err=$ac_c_preproc_warn_flag
17019     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17020   else
17021     ac_cpp_err=
17022   fi
17023 else
17024   ac_cpp_err=yes
17025 fi
17026 if test -z "$ac_cpp_err"; then
17027   ac_header_preproc=yes
17028 else
17029   echo "$as_me: failed program was:" >&5
17030 sed 's/^/| /' conftest.$ac_ext >&5
17031
17032   ac_header_preproc=no
17033 fi
17034 rm -f conftest.err conftest.$ac_ext
17035 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17036 echo "${ECHO_T}$ac_header_preproc" >&6
17037
17038 # So?  What about this header?
17039 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17040   yes:no: )
17041     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17042 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17043     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17044 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17045     ac_header_preproc=yes
17046     ;;
17047   no:yes:* )
17048     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17049 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17050     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17051 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17052     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17053 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17054     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17055 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17056     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17057 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17058     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17059 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17060     (
17061       cat <<\_ASBOX
17062 ## --------------------------------------------- ##
17063 ## Report this to <http://www.openldap.org/its/> ##
17064 ## --------------------------------------------- ##
17065 _ASBOX
17066     ) |
17067       sed "s/^/$as_me: WARNING:     /" >&2
17068     ;;
17069 esac
17070 echo "$as_me:$LINENO: checking for $ac_header" >&5
17071 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17073   echo $ECHO_N "(cached) $ECHO_C" >&6
17074 else
17075   eval "$as_ac_Header=\$ac_header_preproc"
17076 fi
17077 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17078 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17079
17080 fi
17081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17082   cat >>confdefs.h <<_ACEOF
17083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17084 _ACEOF
17085
17086 fi
17087
17088 done
17089
17090 if test $ac_cv_header_sys_uuid_h = yes ; then
17091         save_LIBS="$LIBS"
17092         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
17093 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
17094 if test "${ac_cv_search_uuid_to_str+set}" = set; then
17095   echo $ECHO_N "(cached) $ECHO_C" >&6
17096 else
17097   ac_func_search_save_LIBS=$LIBS
17098 ac_cv_search_uuid_to_str=no
17099 cat >conftest.$ac_ext <<_ACEOF
17100 /* confdefs.h.  */
17101 _ACEOF
17102 cat confdefs.h >>conftest.$ac_ext
17103 cat >>conftest.$ac_ext <<_ACEOF
17104 /* end confdefs.h.  */
17105
17106 /* Override any gcc2 internal prototype to avoid an error.  */
17107 #ifdef __cplusplus
17108 extern "C"
17109 #endif
17110 /* We use char because int might match the return type of a gcc2
17111    builtin and then its argument prototype would still apply.  */
17112 char uuid_to_str ();
17113 int
17114 main ()
17115 {
17116 uuid_to_str ();
17117   ;
17118   return 0;
17119 }
17120 _ACEOF
17121 rm -f conftest.$ac_objext conftest$ac_exeext
17122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17123   (eval $ac_link) 2>conftest.er1
17124   ac_status=$?
17125   grep -v '^ *+' conftest.er1 >conftest.err
17126   rm -f conftest.er1
17127   cat conftest.err >&5
17128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17129   (exit $ac_status); } &&
17130          { ac_try='test -z "$ac_c_werror_flag"
17131                          || test ! -s conftest.err'
17132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17133   (eval $ac_try) 2>&5
17134   ac_status=$?
17135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17136   (exit $ac_status); }; } &&
17137          { ac_try='test -s conftest$ac_exeext'
17138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17142   (exit $ac_status); }; }; then
17143   ac_cv_search_uuid_to_str="none required"
17144 else
17145   echo "$as_me: failed program was:" >&5
17146 sed 's/^/| /' conftest.$ac_ext >&5
17147
17148 fi
17149 rm -f conftest.err conftest.$ac_objext \
17150       conftest$ac_exeext conftest.$ac_ext
17151 if test "$ac_cv_search_uuid_to_str" = no; then
17152   for ac_lib in uuid; do
17153     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17154     cat >conftest.$ac_ext <<_ACEOF
17155 /* confdefs.h.  */
17156 _ACEOF
17157 cat confdefs.h >>conftest.$ac_ext
17158 cat >>conftest.$ac_ext <<_ACEOF
17159 /* end confdefs.h.  */
17160
17161 /* Override any gcc2 internal prototype to avoid an error.  */
17162 #ifdef __cplusplus
17163 extern "C"
17164 #endif
17165 /* We use char because int might match the return type of a gcc2
17166    builtin and then its argument prototype would still apply.  */
17167 char uuid_to_str ();
17168 int
17169 main ()
17170 {
17171 uuid_to_str ();
17172   ;
17173   return 0;
17174 }
17175 _ACEOF
17176 rm -f conftest.$ac_objext conftest$ac_exeext
17177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17178   (eval $ac_link) 2>conftest.er1
17179   ac_status=$?
17180   grep -v '^ *+' conftest.er1 >conftest.err
17181   rm -f conftest.er1
17182   cat conftest.err >&5
17183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17184   (exit $ac_status); } &&
17185          { ac_try='test -z "$ac_c_werror_flag"
17186                          || test ! -s conftest.err'
17187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17188   (eval $ac_try) 2>&5
17189   ac_status=$?
17190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17191   (exit $ac_status); }; } &&
17192          { ac_try='test -s conftest$ac_exeext'
17193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17194   (eval $ac_try) 2>&5
17195   ac_status=$?
17196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197   (exit $ac_status); }; }; then
17198   ac_cv_search_uuid_to_str="-l$ac_lib"
17199 break
17200 else
17201   echo "$as_me: failed program was:" >&5
17202 sed 's/^/| /' conftest.$ac_ext >&5
17203
17204 fi
17205 rm -f conftest.err conftest.$ac_objext \
17206       conftest$ac_exeext conftest.$ac_ext
17207   done
17208 fi
17209 LIBS=$ac_func_search_save_LIBS
17210 fi
17211 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17212 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
17213 if test "$ac_cv_search_uuid_to_str" != no; then
17214   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
17215   have_uuid=yes
17216 else
17217   :
17218 fi
17219
17220         LIBS="$save_LIBS"
17221
17222         if test have_uuid = yes ; then
17223
17224 cat >>confdefs.h <<\_ACEOF
17225 #define HAVE_UUID_TO_STR 1
17226 _ACEOF
17227
17228
17229                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17230                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17231         fi
17232 fi
17233
17234 if test $have_uuid = no ; then
17235
17236 for ac_header in uuid/uuid.h
17237 do
17238 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17240   echo "$as_me:$LINENO: checking for $ac_header" >&5
17241 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17242 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17243   echo $ECHO_N "(cached) $ECHO_C" >&6
17244 fi
17245 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17246 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17247 else
17248   # Is the header compilable?
17249 echo "$as_me:$LINENO: checking $ac_header usability" >&5
17250 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
17251 cat >conftest.$ac_ext <<_ACEOF
17252 /* confdefs.h.  */
17253 _ACEOF
17254 cat confdefs.h >>conftest.$ac_ext
17255 cat >>conftest.$ac_ext <<_ACEOF
17256 /* end confdefs.h.  */
17257 $ac_includes_default
17258 #include <$ac_header>
17259 _ACEOF
17260 rm -f conftest.$ac_objext
17261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17262   (eval $ac_compile) 2>conftest.er1
17263   ac_status=$?
17264   grep -v '^ *+' conftest.er1 >conftest.err
17265   rm -f conftest.er1
17266   cat conftest.err >&5
17267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17268   (exit $ac_status); } &&
17269          { ac_try='test -z "$ac_c_werror_flag"
17270                          || test ! -s conftest.err'
17271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17272   (eval $ac_try) 2>&5
17273   ac_status=$?
17274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17275   (exit $ac_status); }; } &&
17276          { ac_try='test -s conftest.$ac_objext'
17277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17278   (eval $ac_try) 2>&5
17279   ac_status=$?
17280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281   (exit $ac_status); }; }; then
17282   ac_header_compiler=yes
17283 else
17284   echo "$as_me: failed program was:" >&5
17285 sed 's/^/| /' conftest.$ac_ext >&5
17286
17287 ac_header_compiler=no
17288 fi
17289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17290 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17291 echo "${ECHO_T}$ac_header_compiler" >&6
17292
17293 # Is the header present?
17294 echo "$as_me:$LINENO: checking $ac_header presence" >&5
17295 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
17296 cat >conftest.$ac_ext <<_ACEOF
17297 /* confdefs.h.  */
17298 _ACEOF
17299 cat confdefs.h >>conftest.$ac_ext
17300 cat >>conftest.$ac_ext <<_ACEOF
17301 /* end confdefs.h.  */
17302 #include <$ac_header>
17303 _ACEOF
17304 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17305   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17306   ac_status=$?
17307   grep -v '^ *+' conftest.er1 >conftest.err
17308   rm -f conftest.er1
17309   cat conftest.err >&5
17310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311   (exit $ac_status); } >/dev/null; then
17312   if test -s conftest.err; then
17313     ac_cpp_err=$ac_c_preproc_warn_flag
17314     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17315   else
17316     ac_cpp_err=
17317   fi
17318 else
17319   ac_cpp_err=yes
17320 fi
17321 if test -z "$ac_cpp_err"; then
17322   ac_header_preproc=yes
17323 else
17324   echo "$as_me: failed program was:" >&5
17325 sed 's/^/| /' conftest.$ac_ext >&5
17326
17327   ac_header_preproc=no
17328 fi
17329 rm -f conftest.err conftest.$ac_ext
17330 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17331 echo "${ECHO_T}$ac_header_preproc" >&6
17332
17333 # So?  What about this header?
17334 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17335   yes:no: )
17336     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17337 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17338     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17339 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17340     ac_header_preproc=yes
17341     ;;
17342   no:yes:* )
17343     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17344 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17345     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17346 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17347     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17348 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17349     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17350 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17351     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17352 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17353     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17354 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17355     (
17356       cat <<\_ASBOX
17357 ## --------------------------------------------- ##
17358 ## Report this to <http://www.openldap.org/its/> ##
17359 ## --------------------------------------------- ##
17360 _ASBOX
17361     ) |
17362       sed "s/^/$as_me: WARNING:     /" >&2
17363     ;;
17364 esac
17365 echo "$as_me:$LINENO: checking for $ac_header" >&5
17366 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17367 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17368   echo $ECHO_N "(cached) $ECHO_C" >&6
17369 else
17370   eval "$as_ac_Header=\$ac_header_preproc"
17371 fi
17372 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
17373 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17374
17375 fi
17376 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17377   cat >>confdefs.h <<_ACEOF
17378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17379 _ACEOF
17380
17381 fi
17382
17383 done
17384
17385         if test $ac_cv_header_uuid_uuid_h = yes ; then
17386                 save_LIBS="$LIBS"
17387                 echo "$as_me:$LINENO: checking for library containing uuid_generate" >&5
17388 echo $ECHO_N "checking for library containing uuid_generate... $ECHO_C" >&6
17389 if test "${ac_cv_search_uuid_generate+set}" = set; then
17390   echo $ECHO_N "(cached) $ECHO_C" >&6
17391 else
17392   ac_func_search_save_LIBS=$LIBS
17393 ac_cv_search_uuid_generate=no
17394 cat >conftest.$ac_ext <<_ACEOF
17395 /* confdefs.h.  */
17396 _ACEOF
17397 cat confdefs.h >>conftest.$ac_ext
17398 cat >>conftest.$ac_ext <<_ACEOF
17399 /* end confdefs.h.  */
17400
17401 /* Override any gcc2 internal prototype to avoid an error.  */
17402 #ifdef __cplusplus
17403 extern "C"
17404 #endif
17405 /* We use char because int might match the return type of a gcc2
17406    builtin and then its argument prototype would still apply.  */
17407 char uuid_generate ();
17408 int
17409 main ()
17410 {
17411 uuid_generate ();
17412   ;
17413   return 0;
17414 }
17415 _ACEOF
17416 rm -f conftest.$ac_objext conftest$ac_exeext
17417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17418   (eval $ac_link) 2>conftest.er1
17419   ac_status=$?
17420   grep -v '^ *+' conftest.er1 >conftest.err
17421   rm -f conftest.er1
17422   cat conftest.err >&5
17423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17424   (exit $ac_status); } &&
17425          { ac_try='test -z "$ac_c_werror_flag"
17426                          || test ! -s conftest.err'
17427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17428   (eval $ac_try) 2>&5
17429   ac_status=$?
17430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17431   (exit $ac_status); }; } &&
17432          { ac_try='test -s conftest$ac_exeext'
17433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17434   (eval $ac_try) 2>&5
17435   ac_status=$?
17436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17437   (exit $ac_status); }; }; then
17438   ac_cv_search_uuid_generate="none required"
17439 else
17440   echo "$as_me: failed program was:" >&5
17441 sed 's/^/| /' conftest.$ac_ext >&5
17442
17443 fi
17444 rm -f conftest.err conftest.$ac_objext \
17445       conftest$ac_exeext conftest.$ac_ext
17446 if test "$ac_cv_search_uuid_generate" = no; then
17447   for ac_lib in uuid; do
17448     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17449     cat >conftest.$ac_ext <<_ACEOF
17450 /* confdefs.h.  */
17451 _ACEOF
17452 cat confdefs.h >>conftest.$ac_ext
17453 cat >>conftest.$ac_ext <<_ACEOF
17454 /* end confdefs.h.  */
17455
17456 /* Override any gcc2 internal prototype to avoid an error.  */
17457 #ifdef __cplusplus
17458 extern "C"
17459 #endif
17460 /* We use char because int might match the return type of a gcc2
17461    builtin and then its argument prototype would still apply.  */
17462 char uuid_generate ();
17463 int
17464 main ()
17465 {
17466 uuid_generate ();
17467   ;
17468   return 0;
17469 }
17470 _ACEOF
17471 rm -f conftest.$ac_objext conftest$ac_exeext
17472 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17473   (eval $ac_link) 2>conftest.er1
17474   ac_status=$?
17475   grep -v '^ *+' conftest.er1 >conftest.err
17476   rm -f conftest.er1
17477   cat conftest.err >&5
17478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17479   (exit $ac_status); } &&
17480          { ac_try='test -z "$ac_c_werror_flag"
17481                          || test ! -s conftest.err'
17482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17483   (eval $ac_try) 2>&5
17484   ac_status=$?
17485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17486   (exit $ac_status); }; } &&
17487          { ac_try='test -s conftest$ac_exeext'
17488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17489   (eval $ac_try) 2>&5
17490   ac_status=$?
17491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17492   (exit $ac_status); }; }; then
17493   ac_cv_search_uuid_generate="-l$ac_lib"
17494 break
17495 else
17496   echo "$as_me: failed program was:" >&5
17497 sed 's/^/| /' conftest.$ac_ext >&5
17498
17499 fi
17500 rm -f conftest.err conftest.$ac_objext \
17501       conftest$ac_exeext conftest.$ac_ext
17502   done
17503 fi
17504 LIBS=$ac_func_search_save_LIBS
17505 fi
17506 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_generate" >&5
17507 echo "${ECHO_T}$ac_cv_search_uuid_generate" >&6
17508 if test "$ac_cv_search_uuid_generate" != no; then
17509   test "$ac_cv_search_uuid_generate" = "none required" || LIBS="$ac_cv_search_uuid_generate $LIBS"
17510   have_uuid=yes
17511 else
17512   :
17513 fi
17514
17515                 LIBS="$save_LIBS"
17516
17517                 if test have_uuid = yes ; then
17518
17519 cat >>confdefs.h <<\_ACEOF
17520 #define HAVE_UUID_GENERATE 1
17521 _ACEOF
17522
17523
17524                         test "$ac_cv_search_uuid_generate" = "none required" || \
17525                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
17526                 fi
17527         fi
17528 fi
17529
17530 if test $have_uuid = no ; then
17531         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
17532 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
17533         save_LIBS="$LIBS"
17534         LIBS="$LIBS -lrpcrt4"
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
17542                 int __stdcall UuidCreate(void *);
17543                 int __stdcall UuidToStringA(void *,void **);
17544
17545 int
17546 main ()
17547 {
17548
17549                 UuidCreate(0);
17550                 UuidToStringA(0,0);
17551
17552   ;
17553   return 0;
17554 }
17555 _ACEOF
17556 rm -f conftest.$ac_objext conftest$ac_exeext
17557 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17558   (eval $ac_link) 2>conftest.er1
17559   ac_status=$?
17560   grep -v '^ *+' conftest.er1 >conftest.err
17561   rm -f conftest.er1
17562   cat conftest.err >&5
17563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17564   (exit $ac_status); } &&
17565          { ac_try='test -z "$ac_c_werror_flag"
17566                          || test ! -s conftest.err'
17567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17568   (eval $ac_try) 2>&5
17569   ac_status=$?
17570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17571   (exit $ac_status); }; } &&
17572          { ac_try='test -s conftest$ac_exeext'
17573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17574   (eval $ac_try) 2>&5
17575   ac_status=$?
17576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17577   (exit $ac_status); }; }; then
17578   need_rpcrt=yes
17579 else
17580   echo "$as_me: failed program was:" >&5
17581 sed 's/^/| /' conftest.$ac_ext >&5
17582
17583 need_rpcrt=no
17584 fi
17585 rm -f conftest.err conftest.$ac_objext \
17586       conftest$ac_exeext conftest.$ac_ext
17587         if test $need_rpcrt = yes; then
17588                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
17589         fi
17590         LIBS="$save_LIBS"
17591         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
17592 echo "${ECHO_T}$need_rpcrt" >&6
17593 fi
17594
17595 ol_cv_lib_resolver=no
17596 if test $ol_cv_lib_resolver = no ; then
17597         echo "$as_me:$LINENO: checking for resolver link (default)" >&5
17598 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6
17599 if test "${ol_cv_resolver_none+set}" = set; then
17600   echo $ECHO_N "(cached) $ECHO_C" >&6
17601 else
17602
17603         ol_RESOLVER_LIB=
17604         ol_LIBS=$LIBS
17605         LIBS="$ol_RESOLVER_LIB $LIBS"
17606
17607         cat >conftest.$ac_ext <<_ACEOF
17608 /* confdefs.h.  */
17609 _ACEOF
17610 cat confdefs.h >>conftest.$ac_ext
17611 cat >>conftest.$ac_ext <<_ACEOF
17612 /* end confdefs.h.  */
17613
17614 #ifdef HAVE_SYS_TYPES_H
17615 #       include <sys/types.h>
17616 #endif
17617 #include <netinet/in.h>
17618 #ifdef HAVE_ARPA_NAMESER_H
17619 #       include <arpa/nameser.h>
17620 #endif
17621 #ifdef HAVE_RESOLV_H
17622 #       include <resolv.h>
17623 #endif
17624
17625 int
17626 main ()
17627 {
17628 {
17629         int len, status;
17630         char *request = NULL;
17631         unsigned char reply[64*1024];
17632         unsigned char host[64*1024];
17633         unsigned char *p;
17634
17635 #ifdef NS_HFIXEDSZ
17636         /* Bind 8/9 interface */
17637         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17638 #else
17639         /* Bind 4 interface */
17640 # ifndef T_SRV
17641 #  define T_SRV 33
17642 # endif
17643         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17644 #endif
17645         p = reply;
17646 #ifdef NS_HFIXEDSZ
17647         /* Bind 8/9 interface */
17648         p += NS_HFIXEDSZ;
17649 #elif defined(HFIXEDSZ)
17650         /* Bind 4 interface w/ HFIXEDSZ */
17651         p += HFIXEDSZ;
17652 #else
17653         /* Bind 4 interface w/o HFIXEDSZ */
17654         p += sizeof(HEADER);
17655 #endif
17656         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17657 }
17658   ;
17659   return 0;
17660 }
17661 _ACEOF
17662 rm -f conftest.$ac_objext conftest$ac_exeext
17663 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17664   (eval $ac_link) 2>conftest.er1
17665   ac_status=$?
17666   grep -v '^ *+' conftest.er1 >conftest.err
17667   rm -f conftest.er1
17668   cat conftest.err >&5
17669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17670   (exit $ac_status); } &&
17671          { ac_try='test -z "$ac_c_werror_flag"
17672                          || test ! -s conftest.err'
17673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17674   (eval $ac_try) 2>&5
17675   ac_status=$?
17676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17677   (exit $ac_status); }; } &&
17678          { ac_try='test -s conftest$ac_exeext'
17679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17680   (eval $ac_try) 2>&5
17681   ac_status=$?
17682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17683   (exit $ac_status); }; }; then
17684   ol_cv_resolver_none=yes
17685 else
17686   echo "$as_me: failed program was:" >&5
17687 sed 's/^/| /' conftest.$ac_ext >&5
17688
17689 ol_cv_resolver_none=no
17690 fi
17691 rm -f conftest.err conftest.$ac_objext \
17692       conftest$ac_exeext conftest.$ac_ext
17693
17694         LIBS="$ol_LIBS"
17695
17696 fi
17697 echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
17698 echo "${ECHO_T}$ol_cv_resolver_none" >&6
17699
17700         if test $ol_cv_resolver_none = yes ; then
17701                 ol_cv_lib_resolver=yes
17702         fi
17703 fi
17704
17705 if test $ol_cv_lib_resolver = no ; then
17706         echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
17707 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6
17708 if test "${ol_cv_resolver_resolv+set}" = set; then
17709   echo $ECHO_N "(cached) $ECHO_C" >&6
17710 else
17711
17712         ol_RESOLVER_LIB=-lresolv
17713         ol_LIBS=$LIBS
17714         LIBS="$ol_RESOLVER_LIB $LIBS"
17715
17716         cat >conftest.$ac_ext <<_ACEOF
17717 /* confdefs.h.  */
17718 _ACEOF
17719 cat confdefs.h >>conftest.$ac_ext
17720 cat >>conftest.$ac_ext <<_ACEOF
17721 /* end confdefs.h.  */
17722
17723 #ifdef HAVE_SYS_TYPES_H
17724 #       include <sys/types.h>
17725 #endif
17726 #include <netinet/in.h>
17727 #ifdef HAVE_ARPA_NAMESER_H
17728 #       include <arpa/nameser.h>
17729 #endif
17730 #ifdef HAVE_RESOLV_H
17731 #       include <resolv.h>
17732 #endif
17733
17734 int
17735 main ()
17736 {
17737 {
17738         int len, status;
17739         char *request = NULL;
17740         unsigned char reply[64*1024];
17741         unsigned char host[64*1024];
17742         unsigned char *p;
17743
17744 #ifdef NS_HFIXEDSZ
17745         /* Bind 8/9 interface */
17746         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17747 #else
17748         /* Bind 4 interface */
17749 # ifndef T_SRV
17750 #  define T_SRV 33
17751 # endif
17752         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17753 #endif
17754         p = reply;
17755 #ifdef NS_HFIXEDSZ
17756         /* Bind 8/9 interface */
17757         p += NS_HFIXEDSZ;
17758 #elif defined(HFIXEDSZ)
17759         /* Bind 4 interface w/ HFIXEDSZ */
17760         p += HFIXEDSZ;
17761 #else
17762         /* Bind 4 interface w/o HFIXEDSZ */
17763         p += sizeof(HEADER);
17764 #endif
17765         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17766 }
17767   ;
17768   return 0;
17769 }
17770 _ACEOF
17771 rm -f conftest.$ac_objext conftest$ac_exeext
17772 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17773   (eval $ac_link) 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_exeext'
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   ol_cv_resolver_resolv=yes
17794 else
17795   echo "$as_me: failed program was:" >&5
17796 sed 's/^/| /' conftest.$ac_ext >&5
17797
17798 ol_cv_resolver_resolv=no
17799 fi
17800 rm -f conftest.err conftest.$ac_objext \
17801       conftest$ac_exeext conftest.$ac_ext
17802
17803         LIBS="$ol_LIBS"
17804
17805 fi
17806 echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
17807 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6
17808
17809         if test $ol_cv_resolver_resolv = yes ; then
17810                 ol_cv_lib_resolver=-lresolv
17811         fi
17812 fi
17813
17814 if test $ol_cv_lib_resolver = no ; then
17815         echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
17816 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6
17817 if test "${ol_cv_resolver_bind+set}" = set; then
17818   echo $ECHO_N "(cached) $ECHO_C" >&6
17819 else
17820
17821         ol_RESOLVER_LIB=-lbind
17822         ol_LIBS=$LIBS
17823         LIBS="$ol_RESOLVER_LIB $LIBS"
17824
17825         cat >conftest.$ac_ext <<_ACEOF
17826 /* confdefs.h.  */
17827 _ACEOF
17828 cat confdefs.h >>conftest.$ac_ext
17829 cat >>conftest.$ac_ext <<_ACEOF
17830 /* end confdefs.h.  */
17831
17832 #ifdef HAVE_SYS_TYPES_H
17833 #       include <sys/types.h>
17834 #endif
17835 #include <netinet/in.h>
17836 #ifdef HAVE_ARPA_NAMESER_H
17837 #       include <arpa/nameser.h>
17838 #endif
17839 #ifdef HAVE_RESOLV_H
17840 #       include <resolv.h>
17841 #endif
17842
17843 int
17844 main ()
17845 {
17846 {
17847         int len, status;
17848         char *request = NULL;
17849         unsigned char reply[64*1024];
17850         unsigned char host[64*1024];
17851         unsigned char *p;
17852
17853 #ifdef NS_HFIXEDSZ
17854         /* Bind 8/9 interface */
17855         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
17856 #else
17857         /* Bind 4 interface */
17858 # ifndef T_SRV
17859 #  define T_SRV 33
17860 # endif
17861         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
17862 #endif
17863         p = reply;
17864 #ifdef NS_HFIXEDSZ
17865         /* Bind 8/9 interface */
17866         p += NS_HFIXEDSZ;
17867 #elif defined(HFIXEDSZ)
17868         /* Bind 4 interface w/ HFIXEDSZ */
17869         p += HFIXEDSZ;
17870 #else
17871         /* Bind 4 interface w/o HFIXEDSZ */
17872         p += sizeof(HEADER);
17873 #endif
17874         status = dn_expand( reply, reply+len, p, host, sizeof(host));
17875 }
17876   ;
17877   return 0;
17878 }
17879 _ACEOF
17880 rm -f conftest.$ac_objext conftest$ac_exeext
17881 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17882   (eval $ac_link) 2>conftest.er1
17883   ac_status=$?
17884   grep -v '^ *+' conftest.er1 >conftest.err
17885   rm -f conftest.er1
17886   cat conftest.err >&5
17887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17888   (exit $ac_status); } &&
17889          { ac_try='test -z "$ac_c_werror_flag"
17890                          || test ! -s conftest.err'
17891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17892   (eval $ac_try) 2>&5
17893   ac_status=$?
17894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17895   (exit $ac_status); }; } &&
17896          { ac_try='test -s conftest$ac_exeext'
17897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17898   (eval $ac_try) 2>&5
17899   ac_status=$?
17900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17901   (exit $ac_status); }; }; then
17902   ol_cv_resolver_bind=yes
17903 else
17904   echo "$as_me: failed program was:" >&5
17905 sed 's/^/| /' conftest.$ac_ext >&5
17906
17907 ol_cv_resolver_bind=no
17908 fi
17909 rm -f conftest.err conftest.$ac_objext \
17910       conftest$ac_exeext conftest.$ac_ext
17911
17912         LIBS="$ol_LIBS"
17913
17914 fi
17915 echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
17916 echo "${ECHO_T}$ol_cv_resolver_bind" >&6
17917
17918         if test $ol_cv_resolver_bind = yes ; then
17919                 ol_cv_lib_resolver=-lbind
17920         fi
17921 fi
17922
17923
17924
17925 ol_link_dnssrv=no
17926 if test "$ol_cv_lib_resolver" != no ; then
17927
17928 cat >>confdefs.h <<\_ACEOF
17929 #define HAVE_RES_QUERY 1
17930 _ACEOF
17931
17932
17933         if test "$ol_enable_dnssrv" != no ; then
17934                 ol_link_dnssrv=yes
17935         fi
17936
17937         if test "$ol_cv_lib_resolver" != yes ; then
17938                 LIBS="$ol_cv_lib_resolver $LIBS"
17939         fi
17940 fi
17941
17942 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
17943         if test "$ol_link_dnssrv" = no ; then
17944                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
17945 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
17946    { (exit 1); exit 1; }; }
17947         fi
17948 else
17949         ol_enable_dnssrv=no
17950 fi
17951
17952
17953 for ac_func in hstrerror
17954 do
17955 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17956 echo "$as_me:$LINENO: checking for $ac_func" >&5
17957 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17958 if eval "test \"\${$as_ac_var+set}\" = set"; then
17959   echo $ECHO_N "(cached) $ECHO_C" >&6
17960 else
17961   cat >conftest.$ac_ext <<_ACEOF
17962 /* confdefs.h.  */
17963 _ACEOF
17964 cat confdefs.h >>conftest.$ac_ext
17965 cat >>conftest.$ac_ext <<_ACEOF
17966 /* end confdefs.h.  */
17967 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17968    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17969 #define $ac_func innocuous_$ac_func
17970
17971 /* System header to define __stub macros and hopefully few prototypes,
17972     which can conflict with char $ac_func (); below.
17973     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17974     <limits.h> exists even on freestanding compilers.  */
17975
17976 #ifdef __STDC__
17977 # include <limits.h>
17978 #else
17979 # include <assert.h>
17980 #endif
17981
17982 #undef $ac_func
17983
17984 /* Override any gcc2 internal prototype to avoid an error.  */
17985 #ifdef __cplusplus
17986 extern "C"
17987 {
17988 #endif
17989 /* We use char because int might match the return type of a gcc2
17990    builtin and then its argument prototype would still apply.  */
17991 char $ac_func ();
17992 /* The GNU C library defines this for functions which it implements
17993     to always fail with ENOSYS.  Some functions are actually named
17994     something starting with __ and the normal name is an alias.  */
17995 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17996 choke me
17997 #else
17998 char (*f) () = $ac_func;
17999 #endif
18000 #ifdef __cplusplus
18001 }
18002 #endif
18003
18004 int
18005 main ()
18006 {
18007 return f != $ac_func;
18008   ;
18009   return 0;
18010 }
18011 _ACEOF
18012 rm -f conftest.$ac_objext conftest$ac_exeext
18013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18014   (eval $ac_link) 2>conftest.er1
18015   ac_status=$?
18016   grep -v '^ *+' conftest.er1 >conftest.err
18017   rm -f conftest.er1
18018   cat conftest.err >&5
18019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18020   (exit $ac_status); } &&
18021          { ac_try='test -z "$ac_c_werror_flag"
18022                          || test ! -s conftest.err'
18023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18024   (eval $ac_try) 2>&5
18025   ac_status=$?
18026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18027   (exit $ac_status); }; } &&
18028          { ac_try='test -s conftest$ac_exeext'
18029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18030   (eval $ac_try) 2>&5
18031   ac_status=$?
18032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18033   (exit $ac_status); }; }; then
18034   eval "$as_ac_var=yes"
18035 else
18036   echo "$as_me: failed program was:" >&5
18037 sed 's/^/| /' conftest.$ac_ext >&5
18038
18039 eval "$as_ac_var=no"
18040 fi
18041 rm -f conftest.err conftest.$ac_objext \
18042       conftest$ac_exeext conftest.$ac_ext
18043 fi
18044 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18045 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18046 if test `eval echo '${'$as_ac_var'}'` = yes; then
18047   cat >>confdefs.h <<_ACEOF
18048 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18049 _ACEOF
18050
18051 fi
18052 done
18053
18054
18055
18056
18057
18058
18059 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
18060 do
18061 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18062 echo "$as_me:$LINENO: checking for $ac_func" >&5
18063 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18064 if eval "test \"\${$as_ac_var+set}\" = set"; then
18065   echo $ECHO_N "(cached) $ECHO_C" >&6
18066 else
18067   cat >conftest.$ac_ext <<_ACEOF
18068 /* confdefs.h.  */
18069 _ACEOF
18070 cat confdefs.h >>conftest.$ac_ext
18071 cat >>conftest.$ac_ext <<_ACEOF
18072 /* end confdefs.h.  */
18073 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18074    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18075 #define $ac_func innocuous_$ac_func
18076
18077 /* System header to define __stub macros and hopefully few prototypes,
18078     which can conflict with char $ac_func (); below.
18079     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18080     <limits.h> exists even on freestanding compilers.  */
18081
18082 #ifdef __STDC__
18083 # include <limits.h>
18084 #else
18085 # include <assert.h>
18086 #endif
18087
18088 #undef $ac_func
18089
18090 /* Override any gcc2 internal prototype to avoid an error.  */
18091 #ifdef __cplusplus
18092 extern "C"
18093 {
18094 #endif
18095 /* We use char because int might match the return type of a gcc2
18096    builtin and then its argument prototype would still apply.  */
18097 char $ac_func ();
18098 /* The GNU C library defines this for functions which it implements
18099     to always fail with ENOSYS.  Some functions are actually named
18100     something starting with __ and the normal name is an alias.  */
18101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18102 choke me
18103 #else
18104 char (*f) () = $ac_func;
18105 #endif
18106 #ifdef __cplusplus
18107 }
18108 #endif
18109
18110 int
18111 main ()
18112 {
18113 return f != $ac_func;
18114   ;
18115   return 0;
18116 }
18117 _ACEOF
18118 rm -f conftest.$ac_objext conftest$ac_exeext
18119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18120   (eval $ac_link) 2>conftest.er1
18121   ac_status=$?
18122   grep -v '^ *+' conftest.er1 >conftest.err
18123   rm -f conftest.er1
18124   cat conftest.err >&5
18125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18126   (exit $ac_status); } &&
18127          { ac_try='test -z "$ac_c_werror_flag"
18128                          || test ! -s conftest.err'
18129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18130   (eval $ac_try) 2>&5
18131   ac_status=$?
18132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18133   (exit $ac_status); }; } &&
18134          { ac_try='test -s conftest$ac_exeext'
18135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18136   (eval $ac_try) 2>&5
18137   ac_status=$?
18138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18139   (exit $ac_status); }; }; then
18140   eval "$as_ac_var=yes"
18141 else
18142   echo "$as_me: failed program was:" >&5
18143 sed 's/^/| /' conftest.$ac_ext >&5
18144
18145 eval "$as_ac_var=no"
18146 fi
18147 rm -f conftest.err conftest.$ac_objext \
18148       conftest$ac_exeext conftest.$ac_ext
18149 fi
18150 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18151 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18152 if test `eval echo '${'$as_ac_var'}'` = yes; then
18153   cat >>confdefs.h <<_ACEOF
18154 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18155 _ACEOF
18156
18157 fi
18158 done
18159
18160
18161 ol_link_ipv6=no
18162 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
18163         if test $ol_enable_ipv6 = yes ; then
18164                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
18165 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
18166    { (exit 1); exit 1; }; }
18167         fi
18168 elif test $ol_enable_ipv6 != no ; then
18169         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
18170 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
18171 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
18172   echo $ECHO_N "(cached) $ECHO_C" >&6
18173 else
18174
18175                 cat >conftest.$ac_ext <<_ACEOF
18176 /* confdefs.h.  */
18177 _ACEOF
18178 cat confdefs.h >>conftest.$ac_ext
18179 cat >>conftest.$ac_ext <<_ACEOF
18180 /* end confdefs.h.  */
18181
18182 #                       include <netinet/in.h>
18183 #                       ifdef INET6_ADDRSTRLEN
18184                                 __has_inet6_addrstrlen__;
18185 #                       endif
18186
18187 _ACEOF
18188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18189   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
18190   ol_cv_inet6_addrstrlen=yes
18191 else
18192   ol_cv_inet6_addrstrlen=no
18193 fi
18194 rm -f conftest*
18195
18196 fi
18197 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
18198 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
18199
18200
18201         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
18202 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
18203 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
18204   echo $ECHO_N "(cached) $ECHO_C" >&6
18205 else
18206
18207                 cat >conftest.$ac_ext <<_ACEOF
18208 /* confdefs.h.  */
18209 _ACEOF
18210 cat confdefs.h >>conftest.$ac_ext
18211 cat >>conftest.$ac_ext <<_ACEOF
18212 /* end confdefs.h.  */
18213
18214 #include <sys/types.h>
18215 #include <sys/socket.h>
18216
18217 int
18218 main ()
18219 {
18220
18221                         struct sockaddr_storage ss;
18222
18223   ;
18224   return 0;
18225 }
18226 _ACEOF
18227 rm -f conftest.$ac_objext
18228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18229   (eval $ac_compile) 2>conftest.er1
18230   ac_status=$?
18231   grep -v '^ *+' conftest.er1 >conftest.err
18232   rm -f conftest.er1
18233   cat conftest.err >&5
18234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18235   (exit $ac_status); } &&
18236          { ac_try='test -z "$ac_c_werror_flag"
18237                          || test ! -s conftest.err'
18238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18239   (eval $ac_try) 2>&5
18240   ac_status=$?
18241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18242   (exit $ac_status); }; } &&
18243          { ac_try='test -s conftest.$ac_objext'
18244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18245   (eval $ac_try) 2>&5
18246   ac_status=$?
18247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18248   (exit $ac_status); }; }; then
18249   ol_cv_struct_sockaddr_storage=yes
18250 else
18251   echo "$as_me: failed program was:" >&5
18252 sed 's/^/| /' conftest.$ac_ext >&5
18253
18254 ol_cv_struct_sockaddr_storage=no
18255 fi
18256 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18257 fi
18258 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
18259 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
18260
18261         if test $ol_cv_inet6_addrstrlen = yes &&
18262            test $ol_cv_struct_sockaddr_storage = yes ; then
18263                 ol_link_ipv6=yes
18264         elif test $ol_enable_ipv6 = yes &&
18265              test $ol_cv_inet6_addrstrlen = no ; then
18266                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
18267 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
18268    { (exit 1); exit 1; }; }
18269         elif test $ol_enable_ipv6 = yes &&
18270              test $ol_cv_struct_sockaddr_storage = no ; then
18271                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
18272 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
18273    { (exit 1); exit 1; }; }
18274         fi
18275 fi
18276
18277 if test $ol_enable_local != no ; then
18278
18279 for ac_header in sys/un.h
18280 do
18281 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18282 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18283   echo "$as_me:$LINENO: checking for $ac_header" >&5
18284 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18285 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18286   echo $ECHO_N "(cached) $ECHO_C" >&6
18287 fi
18288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18290 else
18291   # Is the header compilable?
18292 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18293 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18294 cat >conftest.$ac_ext <<_ACEOF
18295 /* confdefs.h.  */
18296 _ACEOF
18297 cat confdefs.h >>conftest.$ac_ext
18298 cat >>conftest.$ac_ext <<_ACEOF
18299 /* end confdefs.h.  */
18300 $ac_includes_default
18301 #include <$ac_header>
18302 _ACEOF
18303 rm -f conftest.$ac_objext
18304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18305   (eval $ac_compile) 2>conftest.er1
18306   ac_status=$?
18307   grep -v '^ *+' conftest.er1 >conftest.err
18308   rm -f conftest.er1
18309   cat conftest.err >&5
18310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18311   (exit $ac_status); } &&
18312          { ac_try='test -z "$ac_c_werror_flag"
18313                          || test ! -s conftest.err'
18314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18315   (eval $ac_try) 2>&5
18316   ac_status=$?
18317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18318   (exit $ac_status); }; } &&
18319          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
18325   ac_header_compiler=yes
18326 else
18327   echo "$as_me: failed program was:" >&5
18328 sed 's/^/| /' conftest.$ac_ext >&5
18329
18330 ac_header_compiler=no
18331 fi
18332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18333 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18334 echo "${ECHO_T}$ac_header_compiler" >&6
18335
18336 # Is the header present?
18337 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18338 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18339 cat >conftest.$ac_ext <<_ACEOF
18340 /* confdefs.h.  */
18341 _ACEOF
18342 cat confdefs.h >>conftest.$ac_ext
18343 cat >>conftest.$ac_ext <<_ACEOF
18344 /* end confdefs.h.  */
18345 #include <$ac_header>
18346 _ACEOF
18347 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18349   ac_status=$?
18350   grep -v '^ *+' conftest.er1 >conftest.err
18351   rm -f conftest.er1
18352   cat conftest.err >&5
18353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18354   (exit $ac_status); } >/dev/null; then
18355   if test -s conftest.err; then
18356     ac_cpp_err=$ac_c_preproc_warn_flag
18357     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18358   else
18359     ac_cpp_err=
18360   fi
18361 else
18362   ac_cpp_err=yes
18363 fi
18364 if test -z "$ac_cpp_err"; then
18365   ac_header_preproc=yes
18366 else
18367   echo "$as_me: failed program was:" >&5
18368 sed 's/^/| /' conftest.$ac_ext >&5
18369
18370   ac_header_preproc=no
18371 fi
18372 rm -f conftest.err conftest.$ac_ext
18373 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18374 echo "${ECHO_T}$ac_header_preproc" >&6
18375
18376 # So?  What about this header?
18377 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18378   yes:no: )
18379     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18380 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18381     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18382 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18383     ac_header_preproc=yes
18384     ;;
18385   no:yes:* )
18386     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18387 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18388     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18389 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18390     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18391 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18392     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18393 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18394     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18395 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18396     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18397 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18398     (
18399       cat <<\_ASBOX
18400 ## --------------------------------------------- ##
18401 ## Report this to <http://www.openldap.org/its/> ##
18402 ## --------------------------------------------- ##
18403 _ASBOX
18404     ) |
18405       sed "s/^/$as_me: WARNING:     /" >&2
18406     ;;
18407 esac
18408 echo "$as_me:$LINENO: checking for $ac_header" >&5
18409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18411   echo $ECHO_N "(cached) $ECHO_C" >&6
18412 else
18413   eval "$as_ac_Header=\$ac_header_preproc"
18414 fi
18415 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18417
18418 fi
18419 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18420   cat >>confdefs.h <<_ACEOF
18421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18422 _ACEOF
18423
18424 fi
18425
18426 done
18427
18428
18429         if test $ol_enable_local = auto ; then
18430                 ol_enable_local=$ac_cv_header_sys_un_h
18431         elif test $ac_cv_header_sys_un_h = no ; then
18432                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
18433 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
18434    { (exit 1); exit 1; }; }
18435         fi
18436 fi
18437
18438
18439 if test $ol_with_tls = yes ; then
18440         ol_with_tls=auto
18441 fi
18442
18443 ol_link_tls=no
18444 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
18445
18446 for ac_header in openssl/ssl.h
18447 do
18448 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18449 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18450   echo "$as_me:$LINENO: checking for $ac_header" >&5
18451 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18452 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18453   echo $ECHO_N "(cached) $ECHO_C" >&6
18454 fi
18455 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18456 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18457 else
18458   # Is the header compilable?
18459 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18460 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18461 cat >conftest.$ac_ext <<_ACEOF
18462 /* confdefs.h.  */
18463 _ACEOF
18464 cat confdefs.h >>conftest.$ac_ext
18465 cat >>conftest.$ac_ext <<_ACEOF
18466 /* end confdefs.h.  */
18467 $ac_includes_default
18468 #include <$ac_header>
18469 _ACEOF
18470 rm -f conftest.$ac_objext
18471 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18472   (eval $ac_compile) 2>conftest.er1
18473   ac_status=$?
18474   grep -v '^ *+' conftest.er1 >conftest.err
18475   rm -f conftest.er1
18476   cat conftest.err >&5
18477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18478   (exit $ac_status); } &&
18479          { ac_try='test -z "$ac_c_werror_flag"
18480                          || test ! -s conftest.err'
18481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18482   (eval $ac_try) 2>&5
18483   ac_status=$?
18484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18485   (exit $ac_status); }; } &&
18486          { ac_try='test -s conftest.$ac_objext'
18487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18491   (exit $ac_status); }; }; then
18492   ac_header_compiler=yes
18493 else
18494   echo "$as_me: failed program was:" >&5
18495 sed 's/^/| /' conftest.$ac_ext >&5
18496
18497 ac_header_compiler=no
18498 fi
18499 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18500 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18501 echo "${ECHO_T}$ac_header_compiler" >&6
18502
18503 # Is the header present?
18504 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18505 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18506 cat >conftest.$ac_ext <<_ACEOF
18507 /* confdefs.h.  */
18508 _ACEOF
18509 cat confdefs.h >>conftest.$ac_ext
18510 cat >>conftest.$ac_ext <<_ACEOF
18511 /* end confdefs.h.  */
18512 #include <$ac_header>
18513 _ACEOF
18514 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18515   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18516   ac_status=$?
18517   grep -v '^ *+' conftest.er1 >conftest.err
18518   rm -f conftest.er1
18519   cat conftest.err >&5
18520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18521   (exit $ac_status); } >/dev/null; then
18522   if test -s conftest.err; then
18523     ac_cpp_err=$ac_c_preproc_warn_flag
18524     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18525   else
18526     ac_cpp_err=
18527   fi
18528 else
18529   ac_cpp_err=yes
18530 fi
18531 if test -z "$ac_cpp_err"; then
18532   ac_header_preproc=yes
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 sed 's/^/| /' conftest.$ac_ext >&5
18536
18537   ac_header_preproc=no
18538 fi
18539 rm -f conftest.err conftest.$ac_ext
18540 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18541 echo "${ECHO_T}$ac_header_preproc" >&6
18542
18543 # So?  What about this header?
18544 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18545   yes:no: )
18546     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18547 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18548     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18549 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18550     ac_header_preproc=yes
18551     ;;
18552   no:yes:* )
18553     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18554 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18555     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18556 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18557     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18558 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18559     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18560 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18561     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18562 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18563     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18564 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18565     (
18566       cat <<\_ASBOX
18567 ## --------------------------------------------- ##
18568 ## Report this to <http://www.openldap.org/its/> ##
18569 ## --------------------------------------------- ##
18570 _ASBOX
18571     ) |
18572       sed "s/^/$as_me: WARNING:     /" >&2
18573     ;;
18574 esac
18575 echo "$as_me:$LINENO: checking for $ac_header" >&5
18576 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18578   echo $ECHO_N "(cached) $ECHO_C" >&6
18579 else
18580   eval "$as_ac_Header=\$ac_header_preproc"
18581 fi
18582 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18583 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18584
18585 fi
18586 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18587   cat >>confdefs.h <<_ACEOF
18588 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18589 _ACEOF
18590
18591 fi
18592
18593 done
18594
18595
18596         if test $ac_cv_header_openssl_ssl_h = yes ; then
18597                 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
18598 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
18599 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
18600   echo $ECHO_N "(cached) $ECHO_C" >&6
18601 else
18602   ac_check_lib_save_LIBS=$LIBS
18603 LIBS="-lssl -lcrypto $LIBS"
18604 cat >conftest.$ac_ext <<_ACEOF
18605 /* confdefs.h.  */
18606 _ACEOF
18607 cat confdefs.h >>conftest.$ac_ext
18608 cat >>conftest.$ac_ext <<_ACEOF
18609 /* end confdefs.h.  */
18610
18611 /* Override any gcc2 internal prototype to avoid an error.  */
18612 #ifdef __cplusplus
18613 extern "C"
18614 #endif
18615 /* We use char because int might match the return type of a gcc2
18616    builtin and then its argument prototype would still apply.  */
18617 char SSL_library_init ();
18618 int
18619 main ()
18620 {
18621 SSL_library_init ();
18622   ;
18623   return 0;
18624 }
18625 _ACEOF
18626 rm -f conftest.$ac_objext conftest$ac_exeext
18627 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18628   (eval $ac_link) 2>conftest.er1
18629   ac_status=$?
18630   grep -v '^ *+' conftest.er1 >conftest.err
18631   rm -f conftest.er1
18632   cat conftest.err >&5
18633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18634   (exit $ac_status); } &&
18635          { ac_try='test -z "$ac_c_werror_flag"
18636                          || test ! -s conftest.err'
18637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18638   (eval $ac_try) 2>&5
18639   ac_status=$?
18640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641   (exit $ac_status); }; } &&
18642          { ac_try='test -s conftest$ac_exeext'
18643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18644   (eval $ac_try) 2>&5
18645   ac_status=$?
18646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18647   (exit $ac_status); }; }; then
18648   ac_cv_lib_ssl_SSL_library_init=yes
18649 else
18650   echo "$as_me: failed program was:" >&5
18651 sed 's/^/| /' conftest.$ac_ext >&5
18652
18653 ac_cv_lib_ssl_SSL_library_init=no
18654 fi
18655 rm -f conftest.err conftest.$ac_objext \
18656       conftest$ac_exeext conftest.$ac_ext
18657 LIBS=$ac_check_lib_save_LIBS
18658 fi
18659 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
18660 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
18661 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
18662   have_openssl=yes
18663                         need_rsaref=no
18664 else
18665   have_openssl=no
18666 fi
18667
18668
18669                 if test $have_openssl = no ; then
18670                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
18671 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
18672 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
18673   echo $ECHO_N "(cached) $ECHO_C" >&6
18674 else
18675   ac_check_lib_save_LIBS=$LIBS
18676 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
18677 cat >conftest.$ac_ext <<_ACEOF
18678 /* confdefs.h.  */
18679 _ACEOF
18680 cat confdefs.h >>conftest.$ac_ext
18681 cat >>conftest.$ac_ext <<_ACEOF
18682 /* end confdefs.h.  */
18683
18684 /* Override any gcc2 internal prototype to avoid an error.  */
18685 #ifdef __cplusplus
18686 extern "C"
18687 #endif
18688 /* We use char because int might match the return type of a gcc2
18689    builtin and then its argument prototype would still apply.  */
18690 char ssl3_accept ();
18691 int
18692 main ()
18693 {
18694 ssl3_accept ();
18695   ;
18696   return 0;
18697 }
18698 _ACEOF
18699 rm -f conftest.$ac_objext conftest$ac_exeext
18700 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18701   (eval $ac_link) 2>conftest.er1
18702   ac_status=$?
18703   grep -v '^ *+' conftest.er1 >conftest.err
18704   rm -f conftest.er1
18705   cat conftest.err >&5
18706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18707   (exit $ac_status); } &&
18708          { ac_try='test -z "$ac_c_werror_flag"
18709                          || test ! -s conftest.err'
18710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18711   (eval $ac_try) 2>&5
18712   ac_status=$?
18713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18714   (exit $ac_status); }; } &&
18715          { ac_try='test -s conftest$ac_exeext'
18716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18717   (eval $ac_try) 2>&5
18718   ac_status=$?
18719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18720   (exit $ac_status); }; }; then
18721   ac_cv_lib_ssl_ssl3_accept=yes
18722 else
18723   echo "$as_me: failed program was:" >&5
18724 sed 's/^/| /' conftest.$ac_ext >&5
18725
18726 ac_cv_lib_ssl_ssl3_accept=no
18727 fi
18728 rm -f conftest.err conftest.$ac_objext \
18729       conftest$ac_exeext conftest.$ac_ext
18730 LIBS=$ac_check_lib_save_LIBS
18731 fi
18732 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
18733 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
18734 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
18735   have_openssl=yes
18736                                 need_rsaref=yes
18737 else
18738   have_openssl=no
18739 fi
18740
18741                 fi
18742
18743                 if test $have_openssl = yes ; then
18744                         ol_with_tls=openssl
18745                         ol_link_tls=yes
18746
18747
18748 cat >>confdefs.h <<\_ACEOF
18749 #define HAVE_OPENSSL 1
18750 _ACEOF
18751
18752
18753                         if test $need_rsaref = yes; then
18754
18755 cat >>confdefs.h <<\_ACEOF
18756 #define HAVE_RSAREF 1
18757 _ACEOF
18758
18759
18760                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
18761                         else
18762                                 TLS_LIBS="-lssl -lcrypto"
18763                         fi
18764
18765                         echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
18766 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6
18767 if test "${ol_cv_ssl_crl_compat+set}" = set; then
18768   echo $ECHO_N "(cached) $ECHO_C" >&6
18769 else
18770
18771                 cat >conftest.$ac_ext <<_ACEOF
18772 /* confdefs.h.  */
18773 _ACEOF
18774 cat confdefs.h >>conftest.$ac_ext
18775 cat >>conftest.$ac_ext <<_ACEOF
18776 /* end confdefs.h.  */
18777
18778 #ifdef HAVE_OPENSSL_SSL_H
18779 #include <openssl/ssl.h>
18780 #endif
18781
18782 /* Require 0.9.7d+ */
18783 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
18784         char *__ssl_compat = "0.9.7d";
18785 #endif
18786
18787 _ACEOF
18788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18789   $EGREP "__ssl_compat" >/dev/null 2>&1; then
18790   ol_cv_ssl_crl_compat=yes
18791 else
18792   ol_cv_ssl_crl_compat=no
18793 fi
18794 rm -f conftest*
18795
18796 fi
18797 echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
18798 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6
18799
18800                         if test $ol_cv_ssl_crl_compat = yes ; then
18801
18802 cat >>confdefs.h <<\_ACEOF
18803 #define HAVE_OPENSSL_CRL 1
18804 _ACEOF
18805
18806                         fi
18807                 fi
18808         fi
18809 fi
18810
18811 if test $ol_link_tls = no ; then
18812         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
18813
18814 for ac_header in gnutls/gnutls.h
18815 do
18816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18818   echo "$as_me:$LINENO: checking for $ac_header" >&5
18819 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18820 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18821   echo $ECHO_N "(cached) $ECHO_C" >&6
18822 fi
18823 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18825 else
18826   # Is the header compilable?
18827 echo "$as_me:$LINENO: checking $ac_header usability" >&5
18828 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
18829 cat >conftest.$ac_ext <<_ACEOF
18830 /* confdefs.h.  */
18831 _ACEOF
18832 cat confdefs.h >>conftest.$ac_ext
18833 cat >>conftest.$ac_ext <<_ACEOF
18834 /* end confdefs.h.  */
18835 $ac_includes_default
18836 #include <$ac_header>
18837 _ACEOF
18838 rm -f conftest.$ac_objext
18839 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18840   (eval $ac_compile) 2>conftest.er1
18841   ac_status=$?
18842   grep -v '^ *+' conftest.er1 >conftest.err
18843   rm -f conftest.er1
18844   cat conftest.err >&5
18845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18846   (exit $ac_status); } &&
18847          { ac_try='test -z "$ac_c_werror_flag"
18848                          || test ! -s conftest.err'
18849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18850   (eval $ac_try) 2>&5
18851   ac_status=$?
18852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18853   (exit $ac_status); }; } &&
18854          { ac_try='test -s conftest.$ac_objext'
18855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18856   (eval $ac_try) 2>&5
18857   ac_status=$?
18858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18859   (exit $ac_status); }; }; then
18860   ac_header_compiler=yes
18861 else
18862   echo "$as_me: failed program was:" >&5
18863 sed 's/^/| /' conftest.$ac_ext >&5
18864
18865 ac_header_compiler=no
18866 fi
18867 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18868 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18869 echo "${ECHO_T}$ac_header_compiler" >&6
18870
18871 # Is the header present?
18872 echo "$as_me:$LINENO: checking $ac_header presence" >&5
18873 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
18874 cat >conftest.$ac_ext <<_ACEOF
18875 /* confdefs.h.  */
18876 _ACEOF
18877 cat confdefs.h >>conftest.$ac_ext
18878 cat >>conftest.$ac_ext <<_ACEOF
18879 /* end confdefs.h.  */
18880 #include <$ac_header>
18881 _ACEOF
18882 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18883   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18884   ac_status=$?
18885   grep -v '^ *+' conftest.er1 >conftest.err
18886   rm -f conftest.er1
18887   cat conftest.err >&5
18888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18889   (exit $ac_status); } >/dev/null; then
18890   if test -s conftest.err; then
18891     ac_cpp_err=$ac_c_preproc_warn_flag
18892     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
18893   else
18894     ac_cpp_err=
18895   fi
18896 else
18897   ac_cpp_err=yes
18898 fi
18899 if test -z "$ac_cpp_err"; then
18900   ac_header_preproc=yes
18901 else
18902   echo "$as_me: failed program was:" >&5
18903 sed 's/^/| /' conftest.$ac_ext >&5
18904
18905   ac_header_preproc=no
18906 fi
18907 rm -f conftest.err conftest.$ac_ext
18908 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18909 echo "${ECHO_T}$ac_header_preproc" >&6
18910
18911 # So?  What about this header?
18912 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18913   yes:no: )
18914     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18915 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18916     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18917 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18918     ac_header_preproc=yes
18919     ;;
18920   no:yes:* )
18921     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18922 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18923     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18924 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18925     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18926 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18927     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18928 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18929     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18930 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18931     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18932 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18933     (
18934       cat <<\_ASBOX
18935 ## --------------------------------------------- ##
18936 ## Report this to <http://www.openldap.org/its/> ##
18937 ## --------------------------------------------- ##
18938 _ASBOX
18939     ) |
18940       sed "s/^/$as_me: WARNING:     /" >&2
18941     ;;
18942 esac
18943 echo "$as_me:$LINENO: checking for $ac_header" >&5
18944 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18946   echo $ECHO_N "(cached) $ECHO_C" >&6
18947 else
18948   eval "$as_ac_Header=\$ac_header_preproc"
18949 fi
18950 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
18951 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18952
18953 fi
18954 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18955   cat >>confdefs.h <<_ACEOF
18956 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18957 _ACEOF
18958
18959 fi
18960
18961 done
18962
18963
18964                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
18965                         echo "$as_me:$LINENO: checking for gnutls_init in -lgnutls" >&5
18966 echo $ECHO_N "checking for gnutls_init in -lgnutls... $ECHO_C" >&6
18967 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then
18968   echo $ECHO_N "(cached) $ECHO_C" >&6
18969 else
18970   ac_check_lib_save_LIBS=$LIBS
18971 LIBS="-lgnutls  $LIBS"
18972 cat >conftest.$ac_ext <<_ACEOF
18973 /* confdefs.h.  */
18974 _ACEOF
18975 cat confdefs.h >>conftest.$ac_ext
18976 cat >>conftest.$ac_ext <<_ACEOF
18977 /* end confdefs.h.  */
18978
18979 /* Override any gcc2 internal prototype to avoid an error.  */
18980 #ifdef __cplusplus
18981 extern "C"
18982 #endif
18983 /* We use char because int might match the return type of a gcc2
18984    builtin and then its argument prototype would still apply.  */
18985 char gnutls_init ();
18986 int
18987 main ()
18988 {
18989 gnutls_init ();
18990   ;
18991   return 0;
18992 }
18993 _ACEOF
18994 rm -f conftest.$ac_objext conftest$ac_exeext
18995 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18996   (eval $ac_link) 2>conftest.er1
18997   ac_status=$?
18998   grep -v '^ *+' conftest.er1 >conftest.err
18999   rm -f conftest.er1
19000   cat conftest.err >&5
19001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19002   (exit $ac_status); } &&
19003          { ac_try='test -z "$ac_c_werror_flag"
19004                          || test ! -s conftest.err'
19005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19006   (eval $ac_try) 2>&5
19007   ac_status=$?
19008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009   (exit $ac_status); }; } &&
19010          { ac_try='test -s conftest$ac_exeext'
19011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19012   (eval $ac_try) 2>&5
19013   ac_status=$?
19014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19015   (exit $ac_status); }; }; then
19016   ac_cv_lib_gnutls_gnutls_init=yes
19017 else
19018   echo "$as_me: failed program was:" >&5
19019 sed 's/^/| /' conftest.$ac_ext >&5
19020
19021 ac_cv_lib_gnutls_gnutls_init=no
19022 fi
19023 rm -f conftest.err conftest.$ac_objext \
19024       conftest$ac_exeext conftest.$ac_ext
19025 LIBS=$ac_check_lib_save_LIBS
19026 fi
19027 echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_init" >&5
19028 echo "${ECHO_T}$ac_cv_lib_gnutls_gnutls_init" >&6
19029 if test $ac_cv_lib_gnutls_gnutls_init = yes; then
19030   have_gnutls=yes
19031 else
19032   have_gnutls=no
19033 fi
19034
19035
19036                         if test $have_gnutls = yes ; then
19037                                 ol_with_tls=gnutls
19038                                 ol_link_tls=yes
19039
19040                                 TLS_LIBS="-lgnutls"
19041
19042
19043 cat >>confdefs.h <<\_ACEOF
19044 #define HAVE_GNUTLS 1
19045 _ACEOF
19046
19047                         fi
19048                 fi
19049         fi
19050 fi
19051
19052 WITH_TLS=no
19053 if test $ol_link_tls = yes ; then
19054
19055 cat >>confdefs.h <<\_ACEOF
19056 #define HAVE_TLS 1
19057 _ACEOF
19058
19059         WITH_TLS=yes
19060 elif test $ol_with_tls = auto ; then
19061         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
19062 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
19063         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19064 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19065 elif test $ol_with_tls != no ; then
19066         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
19067 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
19068    { (exit 1); exit 1; }; }
19069 else
19070         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
19071 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
19072 fi
19073
19074 if test $ol_enable_lmpasswd != no; then
19075         if test $ol_link_tls != yes ; then
19076                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
19077 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
19078    { (exit 1); exit 1; }; }
19079         fi
19080
19081
19082 cat >>confdefs.h <<\_ACEOF
19083 #define SLAPD_LMHASH 1
19084 _ACEOF
19085
19086 fi
19087
19088 ol_link_threads=no
19089
19090 case $ol_with_threads in auto | yes | nt)
19091
19092
19093         echo "$as_me:$LINENO: checking for _beginthread" >&5
19094 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
19095 if test "${ac_cv_func__beginthread+set}" = set; then
19096   echo $ECHO_N "(cached) $ECHO_C" >&6
19097 else
19098   cat >conftest.$ac_ext <<_ACEOF
19099 /* confdefs.h.  */
19100 _ACEOF
19101 cat confdefs.h >>conftest.$ac_ext
19102 cat >>conftest.$ac_ext <<_ACEOF
19103 /* end confdefs.h.  */
19104 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
19105    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19106 #define _beginthread innocuous__beginthread
19107
19108 /* System header to define __stub macros and hopefully few prototypes,
19109     which can conflict with char _beginthread (); below.
19110     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19111     <limits.h> exists even on freestanding compilers.  */
19112
19113 #ifdef __STDC__
19114 # include <limits.h>
19115 #else
19116 # include <assert.h>
19117 #endif
19118
19119 #undef _beginthread
19120
19121 /* Override any gcc2 internal prototype to avoid an error.  */
19122 #ifdef __cplusplus
19123 extern "C"
19124 {
19125 #endif
19126 /* We use char because int might match the return type of a gcc2
19127    builtin and then its argument prototype would still apply.  */
19128 char _beginthread ();
19129 /* The GNU C library defines this for functions which it implements
19130     to always fail with ENOSYS.  Some functions are actually named
19131     something starting with __ and the normal name is an alias.  */
19132 #if defined (__stub__beginthread) || defined (__stub____beginthread)
19133 choke me
19134 #else
19135 char (*f) () = _beginthread;
19136 #endif
19137 #ifdef __cplusplus
19138 }
19139 #endif
19140
19141 int
19142 main ()
19143 {
19144 return f != _beginthread;
19145   ;
19146   return 0;
19147 }
19148 _ACEOF
19149 rm -f conftest.$ac_objext conftest$ac_exeext
19150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19151   (eval $ac_link) 2>conftest.er1
19152   ac_status=$?
19153   grep -v '^ *+' conftest.er1 >conftest.err
19154   rm -f conftest.er1
19155   cat conftest.err >&5
19156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19157   (exit $ac_status); } &&
19158          { ac_try='test -z "$ac_c_werror_flag"
19159                          || test ! -s conftest.err'
19160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19161   (eval $ac_try) 2>&5
19162   ac_status=$?
19163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19164   (exit $ac_status); }; } &&
19165          { ac_try='test -s conftest$ac_exeext'
19166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19167   (eval $ac_try) 2>&5
19168   ac_status=$?
19169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19170   (exit $ac_status); }; }; then
19171   ac_cv_func__beginthread=yes
19172 else
19173   echo "$as_me: failed program was:" >&5
19174 sed 's/^/| /' conftest.$ac_ext >&5
19175
19176 ac_cv_func__beginthread=no
19177 fi
19178 rm -f conftest.err conftest.$ac_objext \
19179       conftest$ac_exeext conftest.$ac_ext
19180 fi
19181 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
19182 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
19183
19184
19185         if test $ac_cv_func__beginthread = yes ; then
19186
19187 cat >>confdefs.h <<\_ACEOF
19188 #define HAVE_NT_THREADS 1
19189 _ACEOF
19190
19191                 ol_cv_nt_threads=yes
19192         fi
19193
19194
19195         if test "$ol_cv_nt_threads" = yes ; then
19196                 ol_link_threads=nt
19197                 ol_with_threads=found
19198                 ol_with_yielding_select=yes
19199
19200
19201 cat >>confdefs.h <<\_ACEOF
19202 #define HAVE_NT_SERVICE_MANAGER 1
19203 _ACEOF
19204
19205
19206 cat >>confdefs.h <<\_ACEOF
19207 #define HAVE_NT_EVENT_LOG 1
19208 _ACEOF
19209
19210         fi
19211
19212         if test $ol_with_threads = nt ; then
19213                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
19214 echo "$as_me: error: could not locate NT Threads" >&2;}
19215    { (exit 1); exit 1; }; }
19216         fi
19217         ;;
19218 esac
19219
19220 case $ol_with_threads in auto | yes | posix)
19221
19222
19223 for ac_header in pthread.h
19224 do
19225 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19226 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19227   echo "$as_me:$LINENO: checking for $ac_header" >&5
19228 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19229 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19230   echo $ECHO_N "(cached) $ECHO_C" >&6
19231 fi
19232 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19233 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19234 else
19235   # Is the header compilable?
19236 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19237 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19238 cat >conftest.$ac_ext <<_ACEOF
19239 /* confdefs.h.  */
19240 _ACEOF
19241 cat confdefs.h >>conftest.$ac_ext
19242 cat >>conftest.$ac_ext <<_ACEOF
19243 /* end confdefs.h.  */
19244 $ac_includes_default
19245 #include <$ac_header>
19246 _ACEOF
19247 rm -f conftest.$ac_objext
19248 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19249   (eval $ac_compile) 2>conftest.er1
19250   ac_status=$?
19251   grep -v '^ *+' conftest.er1 >conftest.err
19252   rm -f conftest.er1
19253   cat conftest.err >&5
19254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19255   (exit $ac_status); } &&
19256          { ac_try='test -z "$ac_c_werror_flag"
19257                          || test ! -s conftest.err'
19258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19259   (eval $ac_try) 2>&5
19260   ac_status=$?
19261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19262   (exit $ac_status); }; } &&
19263          { ac_try='test -s conftest.$ac_objext'
19264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19268   (exit $ac_status); }; }; then
19269   ac_header_compiler=yes
19270 else
19271   echo "$as_me: failed program was:" >&5
19272 sed 's/^/| /' conftest.$ac_ext >&5
19273
19274 ac_header_compiler=no
19275 fi
19276 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19277 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19278 echo "${ECHO_T}$ac_header_compiler" >&6
19279
19280 # Is the header present?
19281 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19282 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19283 cat >conftest.$ac_ext <<_ACEOF
19284 /* confdefs.h.  */
19285 _ACEOF
19286 cat confdefs.h >>conftest.$ac_ext
19287 cat >>conftest.$ac_ext <<_ACEOF
19288 /* end confdefs.h.  */
19289 #include <$ac_header>
19290 _ACEOF
19291 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19293   ac_status=$?
19294   grep -v '^ *+' conftest.er1 >conftest.err
19295   rm -f conftest.er1
19296   cat conftest.err >&5
19297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19298   (exit $ac_status); } >/dev/null; then
19299   if test -s conftest.err; then
19300     ac_cpp_err=$ac_c_preproc_warn_flag
19301     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19302   else
19303     ac_cpp_err=
19304   fi
19305 else
19306   ac_cpp_err=yes
19307 fi
19308 if test -z "$ac_cpp_err"; then
19309   ac_header_preproc=yes
19310 else
19311   echo "$as_me: failed program was:" >&5
19312 sed 's/^/| /' conftest.$ac_ext >&5
19313
19314   ac_header_preproc=no
19315 fi
19316 rm -f conftest.err conftest.$ac_ext
19317 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19318 echo "${ECHO_T}$ac_header_preproc" >&6
19319
19320 # So?  What about this header?
19321 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19322   yes:no: )
19323     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19324 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19325     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19326 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19327     ac_header_preproc=yes
19328     ;;
19329   no:yes:* )
19330     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19331 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19332     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19333 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19334     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19335 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19336     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19337 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19338     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19339 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19340     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19341 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19342     (
19343       cat <<\_ASBOX
19344 ## --------------------------------------------- ##
19345 ## Report this to <http://www.openldap.org/its/> ##
19346 ## --------------------------------------------- ##
19347 _ASBOX
19348     ) |
19349       sed "s/^/$as_me: WARNING:     /" >&2
19350     ;;
19351 esac
19352 echo "$as_me:$LINENO: checking for $ac_header" >&5
19353 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19354 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19355   echo $ECHO_N "(cached) $ECHO_C" >&6
19356 else
19357   eval "$as_ac_Header=\$ac_header_preproc"
19358 fi
19359 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19360 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19361
19362 fi
19363 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19364   cat >>confdefs.h <<_ACEOF
19365 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19366 _ACEOF
19367
19368 fi
19369
19370 done
19371
19372
19373         if test $ac_cv_header_pthread_h = yes ; then
19374                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
19375 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
19376 if test "${ol_cv_pthread_version+set}" = set; then
19377   echo $ECHO_N "(cached) $ECHO_C" >&6
19378 else
19379
19380         cat >conftest.$ac_ext <<_ACEOF
19381 /* confdefs.h.  */
19382 _ACEOF
19383 cat confdefs.h >>conftest.$ac_ext
19384 cat >>conftest.$ac_ext <<_ACEOF
19385 /* end confdefs.h.  */
19386
19387 #               include <pthread.h>
19388
19389 int
19390 main ()
19391 {
19392
19393                 int i = PTHREAD_CREATE_JOINABLE;
19394
19395   ;
19396   return 0;
19397 }
19398 _ACEOF
19399 rm -f conftest.$ac_objext
19400 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19401   (eval $ac_compile) 2>conftest.er1
19402   ac_status=$?
19403   grep -v '^ *+' conftest.er1 >conftest.err
19404   rm -f conftest.er1
19405   cat conftest.err >&5
19406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19407   (exit $ac_status); } &&
19408          { ac_try='test -z "$ac_c_werror_flag"
19409                          || test ! -s conftest.err'
19410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19411   (eval $ac_try) 2>&5
19412   ac_status=$?
19413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19414   (exit $ac_status); }; } &&
19415          { ac_try='test -s conftest.$ac_objext'
19416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19417   (eval $ac_try) 2>&5
19418   ac_status=$?
19419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19420   (exit $ac_status); }; }; then
19421
19422         cat >conftest.$ac_ext <<_ACEOF
19423 /* confdefs.h.  */
19424 _ACEOF
19425 cat confdefs.h >>conftest.$ac_ext
19426 cat >>conftest.$ac_ext <<_ACEOF
19427 /* end confdefs.h.  */
19428 #include <pthread.h>
19429
19430 _ACEOF
19431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19432   $EGREP "pthread_detach" >/dev/null 2>&1; then
19433   ol_cv_pthread_version=10
19434 else
19435   ol_cv_pthread_version=8
19436 fi
19437 rm -f conftest*
19438
19439 else
19440   echo "$as_me: failed program was:" >&5
19441 sed 's/^/| /' conftest.$ac_ext >&5
19442
19443
19444         cat >conftest.$ac_ext <<_ACEOF
19445 /* confdefs.h.  */
19446 _ACEOF
19447 cat confdefs.h >>conftest.$ac_ext
19448 cat >>conftest.$ac_ext <<_ACEOF
19449 /* end confdefs.h.  */
19450
19451 #               include <pthread.h>
19452 #               ifdef PTHREAD_CREATE_UNDETACHED
19453                 draft7
19454 #               endif
19455
19456 _ACEOF
19457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19458   $EGREP "draft7" >/dev/null 2>&1; then
19459   ol_cv_pthread_version=7
19460 else
19461
19462         cat >conftest.$ac_ext <<_ACEOF
19463 /* confdefs.h.  */
19464 _ACEOF
19465 cat confdefs.h >>conftest.$ac_ext
19466 cat >>conftest.$ac_ext <<_ACEOF
19467 /* end confdefs.h.  */
19468 #include <pthread.h>
19469
19470 _ACEOF
19471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19472   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
19473   ol_cv_pthread_version=6
19474 else
19475
19476         cat >conftest.$ac_ext <<_ACEOF
19477 /* confdefs.h.  */
19478 _ACEOF
19479 cat confdefs.h >>conftest.$ac_ext
19480 cat >>conftest.$ac_ext <<_ACEOF
19481 /* end confdefs.h.  */
19482
19483 #               include <pthread.h>
19484 #ifdef          PTHREAD_MUTEX_INITIALIZER
19485                 draft5
19486 #endif
19487
19488 _ACEOF
19489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19490   $EGREP "draft5" >/dev/null 2>&1; then
19491   ol_cv_pthread_version=5
19492 else
19493   ol_cv_pthread_version=4
19494 fi
19495 rm -f conftest*
19496
19497 fi
19498 rm -f conftest*
19499
19500 fi
19501 rm -f conftest*
19502
19503 fi
19504 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19505
19506 fi
19507 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
19508 echo "${ECHO_T}$ol_cv_pthread_version" >&6
19509
19510
19511                 if test $ol_cv_pthread_version != 0 ; then
19512
19513 cat >>confdefs.h <<_ACEOF
19514 #define HAVE_PTHREADS $ol_cv_pthread_version
19515 _ACEOF
19516
19517                 else
19518                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
19519 echo "$as_me: error: unknown pthread version" >&2;}
19520    { (exit 1); exit 1; }; }
19521                 fi
19522
19523                 # consider threads found
19524                 ol_with_threads=found
19525
19526
19527         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
19528 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
19529 if test "${ol_cv_header_linux_threads+set}" = set; then
19530   echo $ECHO_N "(cached) $ECHO_C" >&6
19531 else
19532   cat >conftest.$ac_ext <<_ACEOF
19533 /* confdefs.h.  */
19534 _ACEOF
19535 cat confdefs.h >>conftest.$ac_ext
19536 cat >>conftest.$ac_ext <<_ACEOF
19537 /* end confdefs.h.  */
19538 #include <pthread.h>
19539 _ACEOF
19540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19541   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
19542   ol_cv_header_linux_threads=yes
19543 else
19544   ol_cv_header_linux_threads=no
19545 fi
19546 rm -f conftest*
19547
19548
19549 fi
19550 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
19551 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
19552         if test $ol_cv_header_linux_threads = yes; then
19553
19554 cat >>confdefs.h <<\_ACEOF
19555 #define HAVE_LINUX_THREADS 1
19556 _ACEOF
19557
19558         fi
19559
19560
19561         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
19562 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
19563 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
19564   echo $ECHO_N "(cached) $ECHO_C" >&6
19565 else
19566   cat >conftest.$ac_ext <<_ACEOF
19567 /* confdefs.h.  */
19568 _ACEOF
19569 cat confdefs.h >>conftest.$ac_ext
19570 cat >>conftest.$ac_ext <<_ACEOF
19571 /* end confdefs.h.  */
19572 #include <pthread.h>
19573 #ifdef _POSIX_THREAD_IS_GNU_PTH
19574         __gnu_pth__;
19575 #endif
19576
19577 _ACEOF
19578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19579   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
19580   ol_cv_header_gnu_pth_pthread_h=yes
19581 else
19582   ol_cv_header_gnu_pth_pthread_h=no
19583 fi
19584 rm -f conftest*
19585
19586
19587 fi
19588 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
19589 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
19590
19591
19592                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
19593
19594 for ac_header in sched.h
19595 do
19596 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19598   echo "$as_me:$LINENO: checking for $ac_header" >&5
19599 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19600 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19601   echo $ECHO_N "(cached) $ECHO_C" >&6
19602 fi
19603 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19605 else
19606   # Is the header compilable?
19607 echo "$as_me:$LINENO: checking $ac_header usability" >&5
19608 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
19609 cat >conftest.$ac_ext <<_ACEOF
19610 /* confdefs.h.  */
19611 _ACEOF
19612 cat confdefs.h >>conftest.$ac_ext
19613 cat >>conftest.$ac_ext <<_ACEOF
19614 /* end confdefs.h.  */
19615 $ac_includes_default
19616 #include <$ac_header>
19617 _ACEOF
19618 rm -f conftest.$ac_objext
19619 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19620   (eval $ac_compile) 2>conftest.er1
19621   ac_status=$?
19622   grep -v '^ *+' conftest.er1 >conftest.err
19623   rm -f conftest.er1
19624   cat conftest.err >&5
19625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19626   (exit $ac_status); } &&
19627          { ac_try='test -z "$ac_c_werror_flag"
19628                          || test ! -s conftest.err'
19629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19630   (eval $ac_try) 2>&5
19631   ac_status=$?
19632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19633   (exit $ac_status); }; } &&
19634          { ac_try='test -s conftest.$ac_objext'
19635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19636   (eval $ac_try) 2>&5
19637   ac_status=$?
19638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19639   (exit $ac_status); }; }; then
19640   ac_header_compiler=yes
19641 else
19642   echo "$as_me: failed program was:" >&5
19643 sed 's/^/| /' conftest.$ac_ext >&5
19644
19645 ac_header_compiler=no
19646 fi
19647 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19648 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19649 echo "${ECHO_T}$ac_header_compiler" >&6
19650
19651 # Is the header present?
19652 echo "$as_me:$LINENO: checking $ac_header presence" >&5
19653 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
19654 cat >conftest.$ac_ext <<_ACEOF
19655 /* confdefs.h.  */
19656 _ACEOF
19657 cat confdefs.h >>conftest.$ac_ext
19658 cat >>conftest.$ac_ext <<_ACEOF
19659 /* end confdefs.h.  */
19660 #include <$ac_header>
19661 _ACEOF
19662 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19664   ac_status=$?
19665   grep -v '^ *+' conftest.er1 >conftest.err
19666   rm -f conftest.er1
19667   cat conftest.err >&5
19668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19669   (exit $ac_status); } >/dev/null; then
19670   if test -s conftest.err; then
19671     ac_cpp_err=$ac_c_preproc_warn_flag
19672     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19673   else
19674     ac_cpp_err=
19675   fi
19676 else
19677   ac_cpp_err=yes
19678 fi
19679 if test -z "$ac_cpp_err"; then
19680   ac_header_preproc=yes
19681 else
19682   echo "$as_me: failed program was:" >&5
19683 sed 's/^/| /' conftest.$ac_ext >&5
19684
19685   ac_header_preproc=no
19686 fi
19687 rm -f conftest.err conftest.$ac_ext
19688 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19689 echo "${ECHO_T}$ac_header_preproc" >&6
19690
19691 # So?  What about this header?
19692 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19693   yes:no: )
19694     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19695 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19696     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19697 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19698     ac_header_preproc=yes
19699     ;;
19700   no:yes:* )
19701     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19702 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19703     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19704 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19705     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19706 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19707     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19708 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19709     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19710 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19711     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19712 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19713     (
19714       cat <<\_ASBOX
19715 ## --------------------------------------------- ##
19716 ## Report this to <http://www.openldap.org/its/> ##
19717 ## --------------------------------------------- ##
19718 _ASBOX
19719     ) |
19720       sed "s/^/$as_me: WARNING:     /" >&2
19721     ;;
19722 esac
19723 echo "$as_me:$LINENO: checking for $ac_header" >&5
19724 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19725 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19726   echo $ECHO_N "(cached) $ECHO_C" >&6
19727 else
19728   eval "$as_ac_Header=\$ac_header_preproc"
19729 fi
19730 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
19731 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19732
19733 fi
19734 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19735   cat >>confdefs.h <<_ACEOF
19736 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19737 _ACEOF
19738
19739 fi
19740
19741 done
19742
19743                 fi
19744
19745
19746                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
19747 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
19748 if test "${ol_cv_pthread_create+set}" = set; then
19749   echo $ECHO_N "(cached) $ECHO_C" >&6
19750 else
19751
19752                         if test "$cross_compiling" = yes; then
19753   cat >conftest.$ac_ext <<_ACEOF
19754 /* confdefs.h.  */
19755 _ACEOF
19756 cat confdefs.h >>conftest.$ac_ext
19757 cat >>conftest.$ac_ext <<_ACEOF
19758 /* end confdefs.h.  */
19759
19760 /* pthread test headers */
19761 #include <pthread.h>
19762 #if HAVE_PTHREADS < 7
19763 #include <errno.h>
19764 #endif
19765 #ifndef NULL
19766 #define NULL (void*)0
19767 #endif
19768
19769 static void *task(p)
19770         void *p;
19771 {
19772         return (void *) (p == NULL);
19773 }
19774
19775 int
19776 main ()
19777 {
19778
19779         /* pthread test function */
19780 #ifndef PTHREAD_CREATE_DETACHED
19781 #define PTHREAD_CREATE_DETACHED 1
19782 #endif
19783         pthread_t t;
19784         int status;
19785         int detach = PTHREAD_CREATE_DETACHED;
19786
19787 #if HAVE_PTHREADS > 4
19788         /* Final pthreads */
19789         pthread_attr_t attr;
19790
19791         status = pthread_attr_init(&attr);
19792         if( status ) return status;
19793
19794 #if HAVE_PTHREADS < 7
19795         status = pthread_attr_setdetachstate(&attr, &detach);
19796         if( status < 0 ) status = errno;
19797 #else
19798         status = pthread_attr_setdetachstate(&attr, detach);
19799 #endif
19800         if( status ) return status;
19801         status = pthread_create( &t, &attr, task, NULL );
19802 #if HAVE_PTHREADS < 7
19803         if( status < 0 ) status = errno;
19804 #endif
19805         if( status ) return status;
19806 #else
19807         /* Draft 4 pthreads */
19808         status = pthread_create( &t, pthread_attr_default, task, NULL );
19809         if( status ) return errno;
19810
19811         /* give thread a chance to complete */
19812         /* it should remain joinable and hence detachable */
19813         sleep( 1 );
19814
19815         status = pthread_detach( &t );
19816         if( status ) return errno;
19817 #endif
19818
19819 #ifdef HAVE_LINUX_THREADS
19820         pthread_kill_other_threads_np();
19821 #endif
19822
19823         return 0;
19824
19825   ;
19826   return 0;
19827 }
19828 _ACEOF
19829 rm -f conftest.$ac_objext conftest$ac_exeext
19830 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19831   (eval $ac_link) 2>conftest.er1
19832   ac_status=$?
19833   grep -v '^ *+' conftest.er1 >conftest.err
19834   rm -f conftest.er1
19835   cat conftest.err >&5
19836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19837   (exit $ac_status); } &&
19838          { ac_try='test -z "$ac_c_werror_flag"
19839                          || test ! -s conftest.err'
19840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19841   (eval $ac_try) 2>&5
19842   ac_status=$?
19843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19844   (exit $ac_status); }; } &&
19845          { ac_try='test -s conftest$ac_exeext'
19846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19847   (eval $ac_try) 2>&5
19848   ac_status=$?
19849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19850   (exit $ac_status); }; }; then
19851   ol_cv_pthread_create=yes
19852 else
19853   echo "$as_me: failed program was:" >&5
19854 sed 's/^/| /' conftest.$ac_ext >&5
19855
19856 ol_cv_pthread_create=no
19857 fi
19858 rm -f conftest.err conftest.$ac_objext \
19859       conftest$ac_exeext conftest.$ac_ext
19860 else
19861   cat >conftest.$ac_ext <<_ACEOF
19862 /* confdefs.h.  */
19863 _ACEOF
19864 cat confdefs.h >>conftest.$ac_ext
19865 cat >>conftest.$ac_ext <<_ACEOF
19866 /* end confdefs.h.  */
19867
19868 /* pthread test headers */
19869 #include <pthread.h>
19870 #if HAVE_PTHREADS < 7
19871 #include <errno.h>
19872 #endif
19873 #ifndef NULL
19874 #define NULL (void*)0
19875 #endif
19876
19877 static void *task(p)
19878         void *p;
19879 {
19880         return (void *) (p == NULL);
19881 }
19882
19883
19884 int main(argc, argv)
19885         int argc;
19886         char **argv;
19887 {
19888
19889         /* pthread test function */
19890 #ifndef PTHREAD_CREATE_DETACHED
19891 #define PTHREAD_CREATE_DETACHED 1
19892 #endif
19893         pthread_t t;
19894         int status;
19895         int detach = PTHREAD_CREATE_DETACHED;
19896
19897 #if HAVE_PTHREADS > 4
19898         /* Final pthreads */
19899         pthread_attr_t attr;
19900
19901         status = pthread_attr_init(&attr);
19902         if( status ) return status;
19903
19904 #if HAVE_PTHREADS < 7
19905         status = pthread_attr_setdetachstate(&attr, &detach);
19906         if( status < 0 ) status = errno;
19907 #else
19908         status = pthread_attr_setdetachstate(&attr, detach);
19909 #endif
19910         if( status ) return status;
19911         status = pthread_create( &t, &attr, task, NULL );
19912 #if HAVE_PTHREADS < 7
19913         if( status < 0 ) status = errno;
19914 #endif
19915         if( status ) return status;
19916 #else
19917         /* Draft 4 pthreads */
19918         status = pthread_create( &t, pthread_attr_default, task, NULL );
19919         if( status ) return errno;
19920
19921         /* give thread a chance to complete */
19922         /* it should remain joinable and hence detachable */
19923         sleep( 1 );
19924
19925         status = pthread_detach( &t );
19926         if( status ) return errno;
19927 #endif
19928
19929 #ifdef HAVE_LINUX_THREADS
19930         pthread_kill_other_threads_np();
19931 #endif
19932
19933         return 0;
19934
19935 }
19936
19937 _ACEOF
19938 rm -f conftest$ac_exeext
19939 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19940   (eval $ac_link) 2>&5
19941   ac_status=$?
19942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19943   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19945   (eval $ac_try) 2>&5
19946   ac_status=$?
19947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19948   (exit $ac_status); }; }; then
19949   ol_cv_pthread_create=yes
19950 else
19951   echo "$as_me: program exited with status $ac_status" >&5
19952 echo "$as_me: failed program was:" >&5
19953 sed 's/^/| /' conftest.$ac_ext >&5
19954
19955 ( exit $ac_status )
19956 ol_cv_pthread_create=no
19957 fi
19958 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19959 fi
19960 fi
19961 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
19962 echo "${ECHO_T}$ol_cv_pthread_create" >&6
19963
19964                 if test $ol_cv_pthread_create != no ; then
19965                         ol_link_threads=posix
19966                         ol_link_pthreads=""
19967                 fi
19968
19969                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
19970 if test "$ol_link_threads" = no ; then
19971         # try -kthread
19972         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
19973 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
19974 if test "${ol_cv_pthread_kthread+set}" = set; then
19975   echo $ECHO_N "(cached) $ECHO_C" >&6
19976 else
19977
19978                 # save the flags
19979                 ol_LIBS="$LIBS"
19980                 LIBS="-kthread $LIBS"
19981
19982                 if test "$cross_compiling" = yes; then
19983   cat >conftest.$ac_ext <<_ACEOF
19984 /* confdefs.h.  */
19985 _ACEOF
19986 cat confdefs.h >>conftest.$ac_ext
19987 cat >>conftest.$ac_ext <<_ACEOF
19988 /* end confdefs.h.  */
19989
19990 /* pthread test headers */
19991 #include <pthread.h>
19992 #if HAVE_PTHREADS < 7
19993 #include <errno.h>
19994 #endif
19995 #ifndef NULL
19996 #define NULL (void*)0
19997 #endif
19998
19999 static void *task(p)
20000         void *p;
20001 {
20002         return (void *) (p == NULL);
20003 }
20004
20005 int
20006 main ()
20007 {
20008
20009         /* pthread test function */
20010 #ifndef PTHREAD_CREATE_DETACHED
20011 #define PTHREAD_CREATE_DETACHED 1
20012 #endif
20013         pthread_t t;
20014         int status;
20015         int detach = PTHREAD_CREATE_DETACHED;
20016
20017 #if HAVE_PTHREADS > 4
20018         /* Final pthreads */
20019         pthread_attr_t attr;
20020
20021         status = pthread_attr_init(&attr);
20022         if( status ) return status;
20023
20024 #if HAVE_PTHREADS < 7
20025         status = pthread_attr_setdetachstate(&attr, &detach);
20026         if( status < 0 ) status = errno;
20027 #else
20028         status = pthread_attr_setdetachstate(&attr, detach);
20029 #endif
20030         if( status ) return status;
20031         status = pthread_create( &t, &attr, task, NULL );
20032 #if HAVE_PTHREADS < 7
20033         if( status < 0 ) status = errno;
20034 #endif
20035         if( status ) return status;
20036 #else
20037         /* Draft 4 pthreads */
20038         status = pthread_create( &t, pthread_attr_default, task, NULL );
20039         if( status ) return errno;
20040
20041         /* give thread a chance to complete */
20042         /* it should remain joinable and hence detachable */
20043         sleep( 1 );
20044
20045         status = pthread_detach( &t );
20046         if( status ) return errno;
20047 #endif
20048
20049 #ifdef HAVE_LINUX_THREADS
20050         pthread_kill_other_threads_np();
20051 #endif
20052
20053         return 0;
20054
20055   ;
20056   return 0;
20057 }
20058 _ACEOF
20059 rm -f conftest.$ac_objext conftest$ac_exeext
20060 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20061   (eval $ac_link) 2>conftest.er1
20062   ac_status=$?
20063   grep -v '^ *+' conftest.er1 >conftest.err
20064   rm -f conftest.er1
20065   cat conftest.err >&5
20066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20067   (exit $ac_status); } &&
20068          { ac_try='test -z "$ac_c_werror_flag"
20069                          || test ! -s conftest.err'
20070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20071   (eval $ac_try) 2>&5
20072   ac_status=$?
20073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20074   (exit $ac_status); }; } &&
20075          { ac_try='test -s conftest$ac_exeext'
20076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20077   (eval $ac_try) 2>&5
20078   ac_status=$?
20079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20080   (exit $ac_status); }; }; then
20081   ol_cv_pthread_kthread=yes
20082 else
20083   echo "$as_me: failed program was:" >&5
20084 sed 's/^/| /' conftest.$ac_ext >&5
20085
20086 ol_cv_pthread_kthread=no
20087 fi
20088 rm -f conftest.err conftest.$ac_objext \
20089       conftest$ac_exeext conftest.$ac_ext
20090 else
20091   cat >conftest.$ac_ext <<_ACEOF
20092 /* confdefs.h.  */
20093 _ACEOF
20094 cat confdefs.h >>conftest.$ac_ext
20095 cat >>conftest.$ac_ext <<_ACEOF
20096 /* end confdefs.h.  */
20097
20098 /* pthread test headers */
20099 #include <pthread.h>
20100 #if HAVE_PTHREADS < 7
20101 #include <errno.h>
20102 #endif
20103 #ifndef NULL
20104 #define NULL (void*)0
20105 #endif
20106
20107 static void *task(p)
20108         void *p;
20109 {
20110         return (void *) (p == NULL);
20111 }
20112
20113
20114 int main(argc, argv)
20115         int argc;
20116         char **argv;
20117 {
20118
20119         /* pthread test function */
20120 #ifndef PTHREAD_CREATE_DETACHED
20121 #define PTHREAD_CREATE_DETACHED 1
20122 #endif
20123         pthread_t t;
20124         int status;
20125         int detach = PTHREAD_CREATE_DETACHED;
20126
20127 #if HAVE_PTHREADS > 4
20128         /* Final pthreads */
20129         pthread_attr_t attr;
20130
20131         status = pthread_attr_init(&attr);
20132         if( status ) return status;
20133
20134 #if HAVE_PTHREADS < 7
20135         status = pthread_attr_setdetachstate(&attr, &detach);
20136         if( status < 0 ) status = errno;
20137 #else
20138         status = pthread_attr_setdetachstate(&attr, detach);
20139 #endif
20140         if( status ) return status;
20141         status = pthread_create( &t, &attr, task, NULL );
20142 #if HAVE_PTHREADS < 7
20143         if( status < 0 ) status = errno;
20144 #endif
20145         if( status ) return status;
20146 #else
20147         /* Draft 4 pthreads */
20148         status = pthread_create( &t, pthread_attr_default, task, NULL );
20149         if( status ) return errno;
20150
20151         /* give thread a chance to complete */
20152         /* it should remain joinable and hence detachable */
20153         sleep( 1 );
20154
20155         status = pthread_detach( &t );
20156         if( status ) return errno;
20157 #endif
20158
20159 #ifdef HAVE_LINUX_THREADS
20160         pthread_kill_other_threads_np();
20161 #endif
20162
20163         return 0;
20164
20165 }
20166
20167 _ACEOF
20168 rm -f conftest$ac_exeext
20169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20170   (eval $ac_link) 2>&5
20171   ac_status=$?
20172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20173   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20175   (eval $ac_try) 2>&5
20176   ac_status=$?
20177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20178   (exit $ac_status); }; }; then
20179   ol_cv_pthread_kthread=yes
20180 else
20181   echo "$as_me: program exited with status $ac_status" >&5
20182 echo "$as_me: failed program was:" >&5
20183 sed 's/^/| /' conftest.$ac_ext >&5
20184
20185 ( exit $ac_status )
20186 ol_cv_pthread_kthread=no
20187 fi
20188 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20189 fi
20190
20191                 # restore the LIBS
20192                 LIBS="$ol_LIBS"
20193
20194 fi
20195 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
20196 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
20197
20198         if test $ol_cv_pthread_kthread = yes ; then
20199                 ol_link_pthreads="-kthread"
20200                 ol_link_threads=posix
20201         fi
20202 fi
20203
20204                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
20205 if test "$ol_link_threads" = no ; then
20206         # try -pthread
20207         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
20208 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
20209 if test "${ol_cv_pthread_pthread+set}" = set; then
20210   echo $ECHO_N "(cached) $ECHO_C" >&6
20211 else
20212
20213                 # save the flags
20214                 ol_LIBS="$LIBS"
20215                 LIBS="-pthread $LIBS"
20216
20217                 if test "$cross_compiling" = yes; then
20218   cat >conftest.$ac_ext <<_ACEOF
20219 /* confdefs.h.  */
20220 _ACEOF
20221 cat confdefs.h >>conftest.$ac_ext
20222 cat >>conftest.$ac_ext <<_ACEOF
20223 /* end confdefs.h.  */
20224
20225 /* pthread test headers */
20226 #include <pthread.h>
20227 #if HAVE_PTHREADS < 7
20228 #include <errno.h>
20229 #endif
20230 #ifndef NULL
20231 #define NULL (void*)0
20232 #endif
20233
20234 static void *task(p)
20235         void *p;
20236 {
20237         return (void *) (p == NULL);
20238 }
20239
20240 int
20241 main ()
20242 {
20243
20244         /* pthread test function */
20245 #ifndef PTHREAD_CREATE_DETACHED
20246 #define PTHREAD_CREATE_DETACHED 1
20247 #endif
20248         pthread_t t;
20249         int status;
20250         int detach = PTHREAD_CREATE_DETACHED;
20251
20252 #if HAVE_PTHREADS > 4
20253         /* Final pthreads */
20254         pthread_attr_t attr;
20255
20256         status = pthread_attr_init(&attr);
20257         if( status ) return status;
20258
20259 #if HAVE_PTHREADS < 7
20260         status = pthread_attr_setdetachstate(&attr, &detach);
20261         if( status < 0 ) status = errno;
20262 #else
20263         status = pthread_attr_setdetachstate(&attr, detach);
20264 #endif
20265         if( status ) return status;
20266         status = pthread_create( &t, &attr, task, NULL );
20267 #if HAVE_PTHREADS < 7
20268         if( status < 0 ) status = errno;
20269 #endif
20270         if( status ) return status;
20271 #else
20272         /* Draft 4 pthreads */
20273         status = pthread_create( &t, pthread_attr_default, task, NULL );
20274         if( status ) return errno;
20275
20276         /* give thread a chance to complete */
20277         /* it should remain joinable and hence detachable */
20278         sleep( 1 );
20279
20280         status = pthread_detach( &t );
20281         if( status ) return errno;
20282 #endif
20283
20284 #ifdef HAVE_LINUX_THREADS
20285         pthread_kill_other_threads_np();
20286 #endif
20287
20288         return 0;
20289
20290   ;
20291   return 0;
20292 }
20293 _ACEOF
20294 rm -f conftest.$ac_objext conftest$ac_exeext
20295 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20296   (eval $ac_link) 2>conftest.er1
20297   ac_status=$?
20298   grep -v '^ *+' conftest.er1 >conftest.err
20299   rm -f conftest.er1
20300   cat conftest.err >&5
20301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20302   (exit $ac_status); } &&
20303          { ac_try='test -z "$ac_c_werror_flag"
20304                          || test ! -s conftest.err'
20305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20306   (eval $ac_try) 2>&5
20307   ac_status=$?
20308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20309   (exit $ac_status); }; } &&
20310          { ac_try='test -s conftest$ac_exeext'
20311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20312   (eval $ac_try) 2>&5
20313   ac_status=$?
20314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20315   (exit $ac_status); }; }; then
20316   ol_cv_pthread_pthread=yes
20317 else
20318   echo "$as_me: failed program was:" >&5
20319 sed 's/^/| /' conftest.$ac_ext >&5
20320
20321 ol_cv_pthread_pthread=no
20322 fi
20323 rm -f conftest.err conftest.$ac_objext \
20324       conftest$ac_exeext conftest.$ac_ext
20325 else
20326   cat >conftest.$ac_ext <<_ACEOF
20327 /* confdefs.h.  */
20328 _ACEOF
20329 cat confdefs.h >>conftest.$ac_ext
20330 cat >>conftest.$ac_ext <<_ACEOF
20331 /* end confdefs.h.  */
20332
20333 /* pthread test headers */
20334 #include <pthread.h>
20335 #if HAVE_PTHREADS < 7
20336 #include <errno.h>
20337 #endif
20338 #ifndef NULL
20339 #define NULL (void*)0
20340 #endif
20341
20342 static void *task(p)
20343         void *p;
20344 {
20345         return (void *) (p == NULL);
20346 }
20347
20348
20349 int main(argc, argv)
20350         int argc;
20351         char **argv;
20352 {
20353
20354         /* pthread test function */
20355 #ifndef PTHREAD_CREATE_DETACHED
20356 #define PTHREAD_CREATE_DETACHED 1
20357 #endif
20358         pthread_t t;
20359         int status;
20360         int detach = PTHREAD_CREATE_DETACHED;
20361
20362 #if HAVE_PTHREADS > 4
20363         /* Final pthreads */
20364         pthread_attr_t attr;
20365
20366         status = pthread_attr_init(&attr);
20367         if( status ) return status;
20368
20369 #if HAVE_PTHREADS < 7
20370         status = pthread_attr_setdetachstate(&attr, &detach);
20371         if( status < 0 ) status = errno;
20372 #else
20373         status = pthread_attr_setdetachstate(&attr, detach);
20374 #endif
20375         if( status ) return status;
20376         status = pthread_create( &t, &attr, task, NULL );
20377 #if HAVE_PTHREADS < 7
20378         if( status < 0 ) status = errno;
20379 #endif
20380         if( status ) return status;
20381 #else
20382         /* Draft 4 pthreads */
20383         status = pthread_create( &t, pthread_attr_default, task, NULL );
20384         if( status ) return errno;
20385
20386         /* give thread a chance to complete */
20387         /* it should remain joinable and hence detachable */
20388         sleep( 1 );
20389
20390         status = pthread_detach( &t );
20391         if( status ) return errno;
20392 #endif
20393
20394 #ifdef HAVE_LINUX_THREADS
20395         pthread_kill_other_threads_np();
20396 #endif
20397
20398         return 0;
20399
20400 }
20401
20402 _ACEOF
20403 rm -f conftest$ac_exeext
20404 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20405   (eval $ac_link) 2>&5
20406   ac_status=$?
20407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20408   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20410   (eval $ac_try) 2>&5
20411   ac_status=$?
20412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20413   (exit $ac_status); }; }; then
20414   ol_cv_pthread_pthread=yes
20415 else
20416   echo "$as_me: program exited with status $ac_status" >&5
20417 echo "$as_me: failed program was:" >&5
20418 sed 's/^/| /' conftest.$ac_ext >&5
20419
20420 ( exit $ac_status )
20421 ol_cv_pthread_pthread=no
20422 fi
20423 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20424 fi
20425
20426                 # restore the LIBS
20427                 LIBS="$ol_LIBS"
20428
20429 fi
20430 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
20431 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
20432
20433         if test $ol_cv_pthread_pthread = yes ; then
20434                 ol_link_pthreads="-pthread"
20435                 ol_link_threads=posix
20436         fi
20437 fi
20438
20439                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
20440 if test "$ol_link_threads" = no ; then
20441         # try -pthreads
20442         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
20443 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
20444 if test "${ol_cv_pthread_pthreads+set}" = set; then
20445   echo $ECHO_N "(cached) $ECHO_C" >&6
20446 else
20447
20448                 # save the flags
20449                 ol_LIBS="$LIBS"
20450                 LIBS="-pthreads $LIBS"
20451
20452                 if test "$cross_compiling" = yes; then
20453   cat >conftest.$ac_ext <<_ACEOF
20454 /* confdefs.h.  */
20455 _ACEOF
20456 cat confdefs.h >>conftest.$ac_ext
20457 cat >>conftest.$ac_ext <<_ACEOF
20458 /* end confdefs.h.  */
20459
20460 /* pthread test headers */
20461 #include <pthread.h>
20462 #if HAVE_PTHREADS < 7
20463 #include <errno.h>
20464 #endif
20465 #ifndef NULL
20466 #define NULL (void*)0
20467 #endif
20468
20469 static void *task(p)
20470         void *p;
20471 {
20472         return (void *) (p == NULL);
20473 }
20474
20475 int
20476 main ()
20477 {
20478
20479         /* pthread test function */
20480 #ifndef PTHREAD_CREATE_DETACHED
20481 #define PTHREAD_CREATE_DETACHED 1
20482 #endif
20483         pthread_t t;
20484         int status;
20485         int detach = PTHREAD_CREATE_DETACHED;
20486
20487 #if HAVE_PTHREADS > 4
20488         /* Final pthreads */
20489         pthread_attr_t attr;
20490
20491         status = pthread_attr_init(&attr);
20492         if( status ) return status;
20493
20494 #if HAVE_PTHREADS < 7
20495         status = pthread_attr_setdetachstate(&attr, &detach);
20496         if( status < 0 ) status = errno;
20497 #else
20498         status = pthread_attr_setdetachstate(&attr, detach);
20499 #endif
20500         if( status ) return status;
20501         status = pthread_create( &t, &attr, task, NULL );
20502 #if HAVE_PTHREADS < 7
20503         if( status < 0 ) status = errno;
20504 #endif
20505         if( status ) return status;
20506 #else
20507         /* Draft 4 pthreads */
20508         status = pthread_create( &t, pthread_attr_default, task, NULL );
20509         if( status ) return errno;
20510
20511         /* give thread a chance to complete */
20512         /* it should remain joinable and hence detachable */
20513         sleep( 1 );
20514
20515         status = pthread_detach( &t );
20516         if( status ) return errno;
20517 #endif
20518
20519 #ifdef HAVE_LINUX_THREADS
20520         pthread_kill_other_threads_np();
20521 #endif
20522
20523         return 0;
20524
20525   ;
20526   return 0;
20527 }
20528 _ACEOF
20529 rm -f conftest.$ac_objext conftest$ac_exeext
20530 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20531   (eval $ac_link) 2>conftest.er1
20532   ac_status=$?
20533   grep -v '^ *+' conftest.er1 >conftest.err
20534   rm -f conftest.er1
20535   cat conftest.err >&5
20536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537   (exit $ac_status); } &&
20538          { ac_try='test -z "$ac_c_werror_flag"
20539                          || test ! -s conftest.err'
20540   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20541   (eval $ac_try) 2>&5
20542   ac_status=$?
20543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20544   (exit $ac_status); }; } &&
20545          { ac_try='test -s conftest$ac_exeext'
20546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20547   (eval $ac_try) 2>&5
20548   ac_status=$?
20549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20550   (exit $ac_status); }; }; then
20551   ol_cv_pthread_pthreads=yes
20552 else
20553   echo "$as_me: failed program was:" >&5
20554 sed 's/^/| /' conftest.$ac_ext >&5
20555
20556 ol_cv_pthread_pthreads=no
20557 fi
20558 rm -f conftest.err conftest.$ac_objext \
20559       conftest$ac_exeext conftest.$ac_ext
20560 else
20561   cat >conftest.$ac_ext <<_ACEOF
20562 /* confdefs.h.  */
20563 _ACEOF
20564 cat confdefs.h >>conftest.$ac_ext
20565 cat >>conftest.$ac_ext <<_ACEOF
20566 /* end confdefs.h.  */
20567
20568 /* pthread test headers */
20569 #include <pthread.h>
20570 #if HAVE_PTHREADS < 7
20571 #include <errno.h>
20572 #endif
20573 #ifndef NULL
20574 #define NULL (void*)0
20575 #endif
20576
20577 static void *task(p)
20578         void *p;
20579 {
20580         return (void *) (p == NULL);
20581 }
20582
20583
20584 int main(argc, argv)
20585         int argc;
20586         char **argv;
20587 {
20588
20589         /* pthread test function */
20590 #ifndef PTHREAD_CREATE_DETACHED
20591 #define PTHREAD_CREATE_DETACHED 1
20592 #endif
20593         pthread_t t;
20594         int status;
20595         int detach = PTHREAD_CREATE_DETACHED;
20596
20597 #if HAVE_PTHREADS > 4
20598         /* Final pthreads */
20599         pthread_attr_t attr;
20600
20601         status = pthread_attr_init(&attr);
20602         if( status ) return status;
20603
20604 #if HAVE_PTHREADS < 7
20605         status = pthread_attr_setdetachstate(&attr, &detach);
20606         if( status < 0 ) status = errno;
20607 #else
20608         status = pthread_attr_setdetachstate(&attr, detach);
20609 #endif
20610         if( status ) return status;
20611         status = pthread_create( &t, &attr, task, NULL );
20612 #if HAVE_PTHREADS < 7
20613         if( status < 0 ) status = errno;
20614 #endif
20615         if( status ) return status;
20616 #else
20617         /* Draft 4 pthreads */
20618         status = pthread_create( &t, pthread_attr_default, task, NULL );
20619         if( status ) return errno;
20620
20621         /* give thread a chance to complete */
20622         /* it should remain joinable and hence detachable */
20623         sleep( 1 );
20624
20625         status = pthread_detach( &t );
20626         if( status ) return errno;
20627 #endif
20628
20629 #ifdef HAVE_LINUX_THREADS
20630         pthread_kill_other_threads_np();
20631 #endif
20632
20633         return 0;
20634
20635 }
20636
20637 _ACEOF
20638 rm -f conftest$ac_exeext
20639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20640   (eval $ac_link) 2>&5
20641   ac_status=$?
20642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20643   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20645   (eval $ac_try) 2>&5
20646   ac_status=$?
20647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20648   (exit $ac_status); }; }; then
20649   ol_cv_pthread_pthreads=yes
20650 else
20651   echo "$as_me: program exited with status $ac_status" >&5
20652 echo "$as_me: failed program was:" >&5
20653 sed 's/^/| /' conftest.$ac_ext >&5
20654
20655 ( exit $ac_status )
20656 ol_cv_pthread_pthreads=no
20657 fi
20658 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20659 fi
20660
20661                 # restore the LIBS
20662                 LIBS="$ol_LIBS"
20663
20664 fi
20665 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
20666 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
20667
20668         if test $ol_cv_pthread_pthreads = yes ; then
20669                 ol_link_pthreads="-pthreads"
20670                 ol_link_threads=posix
20671         fi
20672 fi
20673
20674                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
20675 if test "$ol_link_threads" = no ; then
20676         # try -mthreads
20677         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
20678 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
20679 if test "${ol_cv_pthread_mthreads+set}" = set; then
20680   echo $ECHO_N "(cached) $ECHO_C" >&6
20681 else
20682
20683                 # save the flags
20684                 ol_LIBS="$LIBS"
20685                 LIBS="-mthreads $LIBS"
20686
20687                 if test "$cross_compiling" = yes; then
20688   cat >conftest.$ac_ext <<_ACEOF
20689 /* confdefs.h.  */
20690 _ACEOF
20691 cat confdefs.h >>conftest.$ac_ext
20692 cat >>conftest.$ac_ext <<_ACEOF
20693 /* end confdefs.h.  */
20694
20695 /* pthread test headers */
20696 #include <pthread.h>
20697 #if HAVE_PTHREADS < 7
20698 #include <errno.h>
20699 #endif
20700 #ifndef NULL
20701 #define NULL (void*)0
20702 #endif
20703
20704 static void *task(p)
20705         void *p;
20706 {
20707         return (void *) (p == NULL);
20708 }
20709
20710 int
20711 main ()
20712 {
20713
20714         /* pthread test function */
20715 #ifndef PTHREAD_CREATE_DETACHED
20716 #define PTHREAD_CREATE_DETACHED 1
20717 #endif
20718         pthread_t t;
20719         int status;
20720         int detach = PTHREAD_CREATE_DETACHED;
20721
20722 #if HAVE_PTHREADS > 4
20723         /* Final pthreads */
20724         pthread_attr_t attr;
20725
20726         status = pthread_attr_init(&attr);
20727         if( status ) return status;
20728
20729 #if HAVE_PTHREADS < 7
20730         status = pthread_attr_setdetachstate(&attr, &detach);
20731         if( status < 0 ) status = errno;
20732 #else
20733         status = pthread_attr_setdetachstate(&attr, detach);
20734 #endif
20735         if( status ) return status;
20736         status = pthread_create( &t, &attr, task, NULL );
20737 #if HAVE_PTHREADS < 7
20738         if( status < 0 ) status = errno;
20739 #endif
20740         if( status ) return status;
20741 #else
20742         /* Draft 4 pthreads */
20743         status = pthread_create( &t, pthread_attr_default, task, NULL );
20744         if( status ) return errno;
20745
20746         /* give thread a chance to complete */
20747         /* it should remain joinable and hence detachable */
20748         sleep( 1 );
20749
20750         status = pthread_detach( &t );
20751         if( status ) return errno;
20752 #endif
20753
20754 #ifdef HAVE_LINUX_THREADS
20755         pthread_kill_other_threads_np();
20756 #endif
20757
20758         return 0;
20759
20760   ;
20761   return 0;
20762 }
20763 _ACEOF
20764 rm -f conftest.$ac_objext conftest$ac_exeext
20765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20766   (eval $ac_link) 2>conftest.er1
20767   ac_status=$?
20768   grep -v '^ *+' conftest.er1 >conftest.err
20769   rm -f conftest.er1
20770   cat conftest.err >&5
20771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20772   (exit $ac_status); } &&
20773          { ac_try='test -z "$ac_c_werror_flag"
20774                          || test ! -s conftest.err'
20775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20776   (eval $ac_try) 2>&5
20777   ac_status=$?
20778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20779   (exit $ac_status); }; } &&
20780          { ac_try='test -s conftest$ac_exeext'
20781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20782   (eval $ac_try) 2>&5
20783   ac_status=$?
20784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20785   (exit $ac_status); }; }; then
20786   ol_cv_pthread_mthreads=yes
20787 else
20788   echo "$as_me: failed program was:" >&5
20789 sed 's/^/| /' conftest.$ac_ext >&5
20790
20791 ol_cv_pthread_mthreads=no
20792 fi
20793 rm -f conftest.err conftest.$ac_objext \
20794       conftest$ac_exeext conftest.$ac_ext
20795 else
20796   cat >conftest.$ac_ext <<_ACEOF
20797 /* confdefs.h.  */
20798 _ACEOF
20799 cat confdefs.h >>conftest.$ac_ext
20800 cat >>conftest.$ac_ext <<_ACEOF
20801 /* end confdefs.h.  */
20802
20803 /* pthread test headers */
20804 #include <pthread.h>
20805 #if HAVE_PTHREADS < 7
20806 #include <errno.h>
20807 #endif
20808 #ifndef NULL
20809 #define NULL (void*)0
20810 #endif
20811
20812 static void *task(p)
20813         void *p;
20814 {
20815         return (void *) (p == NULL);
20816 }
20817
20818
20819 int main(argc, argv)
20820         int argc;
20821         char **argv;
20822 {
20823
20824         /* pthread test function */
20825 #ifndef PTHREAD_CREATE_DETACHED
20826 #define PTHREAD_CREATE_DETACHED 1
20827 #endif
20828         pthread_t t;
20829         int status;
20830         int detach = PTHREAD_CREATE_DETACHED;
20831
20832 #if HAVE_PTHREADS > 4
20833         /* Final pthreads */
20834         pthread_attr_t attr;
20835
20836         status = pthread_attr_init(&attr);
20837         if( status ) return status;
20838
20839 #if HAVE_PTHREADS < 7
20840         status = pthread_attr_setdetachstate(&attr, &detach);
20841         if( status < 0 ) status = errno;
20842 #else
20843         status = pthread_attr_setdetachstate(&attr, detach);
20844 #endif
20845         if( status ) return status;
20846         status = pthread_create( &t, &attr, task, NULL );
20847 #if HAVE_PTHREADS < 7
20848         if( status < 0 ) status = errno;
20849 #endif
20850         if( status ) return status;
20851 #else
20852         /* Draft 4 pthreads */
20853         status = pthread_create( &t, pthread_attr_default, task, NULL );
20854         if( status ) return errno;
20855
20856         /* give thread a chance to complete */
20857         /* it should remain joinable and hence detachable */
20858         sleep( 1 );
20859
20860         status = pthread_detach( &t );
20861         if( status ) return errno;
20862 #endif
20863
20864 #ifdef HAVE_LINUX_THREADS
20865         pthread_kill_other_threads_np();
20866 #endif
20867
20868         return 0;
20869
20870 }
20871
20872 _ACEOF
20873 rm -f conftest$ac_exeext
20874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20875   (eval $ac_link) 2>&5
20876   ac_status=$?
20877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20878   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20880   (eval $ac_try) 2>&5
20881   ac_status=$?
20882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20883   (exit $ac_status); }; }; then
20884   ol_cv_pthread_mthreads=yes
20885 else
20886   echo "$as_me: program exited with status $ac_status" >&5
20887 echo "$as_me: failed program was:" >&5
20888 sed 's/^/| /' conftest.$ac_ext >&5
20889
20890 ( exit $ac_status )
20891 ol_cv_pthread_mthreads=no
20892 fi
20893 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20894 fi
20895
20896                 # restore the LIBS
20897                 LIBS="$ol_LIBS"
20898
20899 fi
20900 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
20901 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
20902
20903         if test $ol_cv_pthread_mthreads = yes ; then
20904                 ol_link_pthreads="-mthreads"
20905                 ol_link_threads=posix
20906         fi
20907 fi
20908
20909                 # Pthread try link: -thread (ol_cv_pthread_thread)
20910 if test "$ol_link_threads" = no ; then
20911         # try -thread
20912         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
20913 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
20914 if test "${ol_cv_pthread_thread+set}" = set; then
20915   echo $ECHO_N "(cached) $ECHO_C" >&6
20916 else
20917
20918                 # save the flags
20919                 ol_LIBS="$LIBS"
20920                 LIBS="-thread $LIBS"
20921
20922                 if test "$cross_compiling" = yes; then
20923   cat >conftest.$ac_ext <<_ACEOF
20924 /* confdefs.h.  */
20925 _ACEOF
20926 cat confdefs.h >>conftest.$ac_ext
20927 cat >>conftest.$ac_ext <<_ACEOF
20928 /* end confdefs.h.  */
20929
20930 /* pthread test headers */
20931 #include <pthread.h>
20932 #if HAVE_PTHREADS < 7
20933 #include <errno.h>
20934 #endif
20935 #ifndef NULL
20936 #define NULL (void*)0
20937 #endif
20938
20939 static void *task(p)
20940         void *p;
20941 {
20942         return (void *) (p == NULL);
20943 }
20944
20945 int
20946 main ()
20947 {
20948
20949         /* pthread test function */
20950 #ifndef PTHREAD_CREATE_DETACHED
20951 #define PTHREAD_CREATE_DETACHED 1
20952 #endif
20953         pthread_t t;
20954         int status;
20955         int detach = PTHREAD_CREATE_DETACHED;
20956
20957 #if HAVE_PTHREADS > 4
20958         /* Final pthreads */
20959         pthread_attr_t attr;
20960
20961         status = pthread_attr_init(&attr);
20962         if( status ) return status;
20963
20964 #if HAVE_PTHREADS < 7
20965         status = pthread_attr_setdetachstate(&attr, &detach);
20966         if( status < 0 ) status = errno;
20967 #else
20968         status = pthread_attr_setdetachstate(&attr, detach);
20969 #endif
20970         if( status ) return status;
20971         status = pthread_create( &t, &attr, task, NULL );
20972 #if HAVE_PTHREADS < 7
20973         if( status < 0 ) status = errno;
20974 #endif
20975         if( status ) return status;
20976 #else
20977         /* Draft 4 pthreads */
20978         status = pthread_create( &t, pthread_attr_default, task, NULL );
20979         if( status ) return errno;
20980
20981         /* give thread a chance to complete */
20982         /* it should remain joinable and hence detachable */
20983         sleep( 1 );
20984
20985         status = pthread_detach( &t );
20986         if( status ) return errno;
20987 #endif
20988
20989 #ifdef HAVE_LINUX_THREADS
20990         pthread_kill_other_threads_np();
20991 #endif
20992
20993         return 0;
20994
20995   ;
20996   return 0;
20997 }
20998 _ACEOF
20999 rm -f conftest.$ac_objext conftest$ac_exeext
21000 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21001   (eval $ac_link) 2>conftest.er1
21002   ac_status=$?
21003   grep -v '^ *+' conftest.er1 >conftest.err
21004   rm -f conftest.er1
21005   cat conftest.err >&5
21006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21007   (exit $ac_status); } &&
21008          { ac_try='test -z "$ac_c_werror_flag"
21009                          || test ! -s conftest.err'
21010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21011   (eval $ac_try) 2>&5
21012   ac_status=$?
21013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21014   (exit $ac_status); }; } &&
21015          { ac_try='test -s conftest$ac_exeext'
21016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21017   (eval $ac_try) 2>&5
21018   ac_status=$?
21019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21020   (exit $ac_status); }; }; then
21021   ol_cv_pthread_thread=yes
21022 else
21023   echo "$as_me: failed program was:" >&5
21024 sed 's/^/| /' conftest.$ac_ext >&5
21025
21026 ol_cv_pthread_thread=no
21027 fi
21028 rm -f conftest.err conftest.$ac_objext \
21029       conftest$ac_exeext conftest.$ac_ext
21030 else
21031   cat >conftest.$ac_ext <<_ACEOF
21032 /* confdefs.h.  */
21033 _ACEOF
21034 cat confdefs.h >>conftest.$ac_ext
21035 cat >>conftest.$ac_ext <<_ACEOF
21036 /* end confdefs.h.  */
21037
21038 /* pthread test headers */
21039 #include <pthread.h>
21040 #if HAVE_PTHREADS < 7
21041 #include <errno.h>
21042 #endif
21043 #ifndef NULL
21044 #define NULL (void*)0
21045 #endif
21046
21047 static void *task(p)
21048         void *p;
21049 {
21050         return (void *) (p == NULL);
21051 }
21052
21053
21054 int main(argc, argv)
21055         int argc;
21056         char **argv;
21057 {
21058
21059         /* pthread test function */
21060 #ifndef PTHREAD_CREATE_DETACHED
21061 #define PTHREAD_CREATE_DETACHED 1
21062 #endif
21063         pthread_t t;
21064         int status;
21065         int detach = PTHREAD_CREATE_DETACHED;
21066
21067 #if HAVE_PTHREADS > 4
21068         /* Final pthreads */
21069         pthread_attr_t attr;
21070
21071         status = pthread_attr_init(&attr);
21072         if( status ) return status;
21073
21074 #if HAVE_PTHREADS < 7
21075         status = pthread_attr_setdetachstate(&attr, &detach);
21076         if( status < 0 ) status = errno;
21077 #else
21078         status = pthread_attr_setdetachstate(&attr, detach);
21079 #endif
21080         if( status ) return status;
21081         status = pthread_create( &t, &attr, task, NULL );
21082 #if HAVE_PTHREADS < 7
21083         if( status < 0 ) status = errno;
21084 #endif
21085         if( status ) return status;
21086 #else
21087         /* Draft 4 pthreads */
21088         status = pthread_create( &t, pthread_attr_default, task, NULL );
21089         if( status ) return errno;
21090
21091         /* give thread a chance to complete */
21092         /* it should remain joinable and hence detachable */
21093         sleep( 1 );
21094
21095         status = pthread_detach( &t );
21096         if( status ) return errno;
21097 #endif
21098
21099 #ifdef HAVE_LINUX_THREADS
21100         pthread_kill_other_threads_np();
21101 #endif
21102
21103         return 0;
21104
21105 }
21106
21107 _ACEOF
21108 rm -f conftest$ac_exeext
21109 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21110   (eval $ac_link) 2>&5
21111   ac_status=$?
21112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21113   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21115   (eval $ac_try) 2>&5
21116   ac_status=$?
21117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21118   (exit $ac_status); }; }; then
21119   ol_cv_pthread_thread=yes
21120 else
21121   echo "$as_me: program exited with status $ac_status" >&5
21122 echo "$as_me: failed program was:" >&5
21123 sed 's/^/| /' conftest.$ac_ext >&5
21124
21125 ( exit $ac_status )
21126 ol_cv_pthread_thread=no
21127 fi
21128 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21129 fi
21130
21131                 # restore the LIBS
21132                 LIBS="$ol_LIBS"
21133
21134 fi
21135 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
21136 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
21137
21138         if test $ol_cv_pthread_thread = yes ; then
21139                 ol_link_pthreads="-thread"
21140                 ol_link_threads=posix
21141         fi
21142 fi
21143
21144
21145                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21146 if test "$ol_link_threads" = no ; then
21147         # try -lpthread -lmach -lexc -lc_r
21148         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21149 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
21150 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
21151   echo $ECHO_N "(cached) $ECHO_C" >&6
21152 else
21153
21154                 # save the flags
21155                 ol_LIBS="$LIBS"
21156                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21157
21158                 if test "$cross_compiling" = yes; then
21159   cat >conftest.$ac_ext <<_ACEOF
21160 /* confdefs.h.  */
21161 _ACEOF
21162 cat confdefs.h >>conftest.$ac_ext
21163 cat >>conftest.$ac_ext <<_ACEOF
21164 /* end confdefs.h.  */
21165
21166 /* pthread test headers */
21167 #include <pthread.h>
21168 #if HAVE_PTHREADS < 7
21169 #include <errno.h>
21170 #endif
21171 #ifndef NULL
21172 #define NULL (void*)0
21173 #endif
21174
21175 static void *task(p)
21176         void *p;
21177 {
21178         return (void *) (p == NULL);
21179 }
21180
21181 int
21182 main ()
21183 {
21184
21185         /* pthread test function */
21186 #ifndef PTHREAD_CREATE_DETACHED
21187 #define PTHREAD_CREATE_DETACHED 1
21188 #endif
21189         pthread_t t;
21190         int status;
21191         int detach = PTHREAD_CREATE_DETACHED;
21192
21193 #if HAVE_PTHREADS > 4
21194         /* Final pthreads */
21195         pthread_attr_t attr;
21196
21197         status = pthread_attr_init(&attr);
21198         if( status ) return status;
21199
21200 #if HAVE_PTHREADS < 7
21201         status = pthread_attr_setdetachstate(&attr, &detach);
21202         if( status < 0 ) status = errno;
21203 #else
21204         status = pthread_attr_setdetachstate(&attr, detach);
21205 #endif
21206         if( status ) return status;
21207         status = pthread_create( &t, &attr, task, NULL );
21208 #if HAVE_PTHREADS < 7
21209         if( status < 0 ) status = errno;
21210 #endif
21211         if( status ) return status;
21212 #else
21213         /* Draft 4 pthreads */
21214         status = pthread_create( &t, pthread_attr_default, task, NULL );
21215         if( status ) return errno;
21216
21217         /* give thread a chance to complete */
21218         /* it should remain joinable and hence detachable */
21219         sleep( 1 );
21220
21221         status = pthread_detach( &t );
21222         if( status ) return errno;
21223 #endif
21224
21225 #ifdef HAVE_LINUX_THREADS
21226         pthread_kill_other_threads_np();
21227 #endif
21228
21229         return 0;
21230
21231   ;
21232   return 0;
21233 }
21234 _ACEOF
21235 rm -f conftest.$ac_objext conftest$ac_exeext
21236 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21237   (eval $ac_link) 2>conftest.er1
21238   ac_status=$?
21239   grep -v '^ *+' conftest.er1 >conftest.err
21240   rm -f conftest.er1
21241   cat conftest.err >&5
21242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21243   (exit $ac_status); } &&
21244          { ac_try='test -z "$ac_c_werror_flag"
21245                          || test ! -s conftest.err'
21246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21247   (eval $ac_try) 2>&5
21248   ac_status=$?
21249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21250   (exit $ac_status); }; } &&
21251          { ac_try='test -s conftest$ac_exeext'
21252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21253   (eval $ac_try) 2>&5
21254   ac_status=$?
21255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21256   (exit $ac_status); }; }; then
21257   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21258 else
21259   echo "$as_me: failed program was:" >&5
21260 sed 's/^/| /' conftest.$ac_ext >&5
21261
21262 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21263 fi
21264 rm -f conftest.err conftest.$ac_objext \
21265       conftest$ac_exeext conftest.$ac_ext
21266 else
21267   cat >conftest.$ac_ext <<_ACEOF
21268 /* confdefs.h.  */
21269 _ACEOF
21270 cat confdefs.h >>conftest.$ac_ext
21271 cat >>conftest.$ac_ext <<_ACEOF
21272 /* end confdefs.h.  */
21273
21274 /* pthread test headers */
21275 #include <pthread.h>
21276 #if HAVE_PTHREADS < 7
21277 #include <errno.h>
21278 #endif
21279 #ifndef NULL
21280 #define NULL (void*)0
21281 #endif
21282
21283 static void *task(p)
21284         void *p;
21285 {
21286         return (void *) (p == NULL);
21287 }
21288
21289
21290 int main(argc, argv)
21291         int argc;
21292         char **argv;
21293 {
21294
21295         /* pthread test function */
21296 #ifndef PTHREAD_CREATE_DETACHED
21297 #define PTHREAD_CREATE_DETACHED 1
21298 #endif
21299         pthread_t t;
21300         int status;
21301         int detach = PTHREAD_CREATE_DETACHED;
21302
21303 #if HAVE_PTHREADS > 4
21304         /* Final pthreads */
21305         pthread_attr_t attr;
21306
21307         status = pthread_attr_init(&attr);
21308         if( status ) return status;
21309
21310 #if HAVE_PTHREADS < 7
21311         status = pthread_attr_setdetachstate(&attr, &detach);
21312         if( status < 0 ) status = errno;
21313 #else
21314         status = pthread_attr_setdetachstate(&attr, detach);
21315 #endif
21316         if( status ) return status;
21317         status = pthread_create( &t, &attr, task, NULL );
21318 #if HAVE_PTHREADS < 7
21319         if( status < 0 ) status = errno;
21320 #endif
21321         if( status ) return status;
21322 #else
21323         /* Draft 4 pthreads */
21324         status = pthread_create( &t, pthread_attr_default, task, NULL );
21325         if( status ) return errno;
21326
21327         /* give thread a chance to complete */
21328         /* it should remain joinable and hence detachable */
21329         sleep( 1 );
21330
21331         status = pthread_detach( &t );
21332         if( status ) return errno;
21333 #endif
21334
21335 #ifdef HAVE_LINUX_THREADS
21336         pthread_kill_other_threads_np();
21337 #endif
21338
21339         return 0;
21340
21341 }
21342
21343 _ACEOF
21344 rm -f conftest$ac_exeext
21345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21346   (eval $ac_link) 2>&5
21347   ac_status=$?
21348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21349   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21351   (eval $ac_try) 2>&5
21352   ac_status=$?
21353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21354   (exit $ac_status); }; }; then
21355   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21356 else
21357   echo "$as_me: program exited with status $ac_status" >&5
21358 echo "$as_me: failed program was:" >&5
21359 sed 's/^/| /' conftest.$ac_ext >&5
21360
21361 ( exit $ac_status )
21362 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21363 fi
21364 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21365 fi
21366
21367                 # restore the LIBS
21368                 LIBS="$ol_LIBS"
21369
21370 fi
21371 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
21372 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
21373
21374         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
21375                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
21376                 ol_link_threads=posix
21377         fi
21378 fi
21379
21380                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
21381 if test "$ol_link_threads" = no ; then
21382         # try -lpthread -lmach -lexc
21383         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
21384 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
21385 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
21386   echo $ECHO_N "(cached) $ECHO_C" >&6
21387 else
21388
21389                 # save the flags
21390                 ol_LIBS="$LIBS"
21391                 LIBS="-lpthread -lmach -lexc $LIBS"
21392
21393                 if test "$cross_compiling" = yes; then
21394   cat >conftest.$ac_ext <<_ACEOF
21395 /* confdefs.h.  */
21396 _ACEOF
21397 cat confdefs.h >>conftest.$ac_ext
21398 cat >>conftest.$ac_ext <<_ACEOF
21399 /* end confdefs.h.  */
21400
21401 /* pthread test headers */
21402 #include <pthread.h>
21403 #if HAVE_PTHREADS < 7
21404 #include <errno.h>
21405 #endif
21406 #ifndef NULL
21407 #define NULL (void*)0
21408 #endif
21409
21410 static void *task(p)
21411         void *p;
21412 {
21413         return (void *) (p == NULL);
21414 }
21415
21416 int
21417 main ()
21418 {
21419
21420         /* pthread test function */
21421 #ifndef PTHREAD_CREATE_DETACHED
21422 #define PTHREAD_CREATE_DETACHED 1
21423 #endif
21424         pthread_t t;
21425         int status;
21426         int detach = PTHREAD_CREATE_DETACHED;
21427
21428 #if HAVE_PTHREADS > 4
21429         /* Final pthreads */
21430         pthread_attr_t attr;
21431
21432         status = pthread_attr_init(&attr);
21433         if( status ) return status;
21434
21435 #if HAVE_PTHREADS < 7
21436         status = pthread_attr_setdetachstate(&attr, &detach);
21437         if( status < 0 ) status = errno;
21438 #else
21439         status = pthread_attr_setdetachstate(&attr, detach);
21440 #endif
21441         if( status ) return status;
21442         status = pthread_create( &t, &attr, task, NULL );
21443 #if HAVE_PTHREADS < 7
21444         if( status < 0 ) status = errno;
21445 #endif
21446         if( status ) return status;
21447 #else
21448         /* Draft 4 pthreads */
21449         status = pthread_create( &t, pthread_attr_default, task, NULL );
21450         if( status ) return errno;
21451
21452         /* give thread a chance to complete */
21453         /* it should remain joinable and hence detachable */
21454         sleep( 1 );
21455
21456         status = pthread_detach( &t );
21457         if( status ) return errno;
21458 #endif
21459
21460 #ifdef HAVE_LINUX_THREADS
21461         pthread_kill_other_threads_np();
21462 #endif
21463
21464         return 0;
21465
21466   ;
21467   return 0;
21468 }
21469 _ACEOF
21470 rm -f conftest.$ac_objext conftest$ac_exeext
21471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21472   (eval $ac_link) 2>conftest.er1
21473   ac_status=$?
21474   grep -v '^ *+' conftest.er1 >conftest.err
21475   rm -f conftest.er1
21476   cat conftest.err >&5
21477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21478   (exit $ac_status); } &&
21479          { ac_try='test -z "$ac_c_werror_flag"
21480                          || test ! -s conftest.err'
21481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21482   (eval $ac_try) 2>&5
21483   ac_status=$?
21484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21485   (exit $ac_status); }; } &&
21486          { ac_try='test -s conftest$ac_exeext'
21487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21488   (eval $ac_try) 2>&5
21489   ac_status=$?
21490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21491   (exit $ac_status); }; }; then
21492   ol_cv_pthread_lpthread_lmach_lexc=yes
21493 else
21494   echo "$as_me: failed program was:" >&5
21495 sed 's/^/| /' conftest.$ac_ext >&5
21496
21497 ol_cv_pthread_lpthread_lmach_lexc=no
21498 fi
21499 rm -f conftest.err conftest.$ac_objext \
21500       conftest$ac_exeext conftest.$ac_ext
21501 else
21502   cat >conftest.$ac_ext <<_ACEOF
21503 /* confdefs.h.  */
21504 _ACEOF
21505 cat confdefs.h >>conftest.$ac_ext
21506 cat >>conftest.$ac_ext <<_ACEOF
21507 /* end confdefs.h.  */
21508
21509 /* pthread test headers */
21510 #include <pthread.h>
21511 #if HAVE_PTHREADS < 7
21512 #include <errno.h>
21513 #endif
21514 #ifndef NULL
21515 #define NULL (void*)0
21516 #endif
21517
21518 static void *task(p)
21519         void *p;
21520 {
21521         return (void *) (p == NULL);
21522 }
21523
21524
21525 int main(argc, argv)
21526         int argc;
21527         char **argv;
21528 {
21529
21530         /* pthread test function */
21531 #ifndef PTHREAD_CREATE_DETACHED
21532 #define PTHREAD_CREATE_DETACHED 1
21533 #endif
21534         pthread_t t;
21535         int status;
21536         int detach = PTHREAD_CREATE_DETACHED;
21537
21538 #if HAVE_PTHREADS > 4
21539         /* Final pthreads */
21540         pthread_attr_t attr;
21541
21542         status = pthread_attr_init(&attr);
21543         if( status ) return status;
21544
21545 #if HAVE_PTHREADS < 7
21546         status = pthread_attr_setdetachstate(&attr, &detach);
21547         if( status < 0 ) status = errno;
21548 #else
21549         status = pthread_attr_setdetachstate(&attr, detach);
21550 #endif
21551         if( status ) return status;
21552         status = pthread_create( &t, &attr, task, NULL );
21553 #if HAVE_PTHREADS < 7
21554         if( status < 0 ) status = errno;
21555 #endif
21556         if( status ) return status;
21557 #else
21558         /* Draft 4 pthreads */
21559         status = pthread_create( &t, pthread_attr_default, task, NULL );
21560         if( status ) return errno;
21561
21562         /* give thread a chance to complete */
21563         /* it should remain joinable and hence detachable */
21564         sleep( 1 );
21565
21566         status = pthread_detach( &t );
21567         if( status ) return errno;
21568 #endif
21569
21570 #ifdef HAVE_LINUX_THREADS
21571         pthread_kill_other_threads_np();
21572 #endif
21573
21574         return 0;
21575
21576 }
21577
21578 _ACEOF
21579 rm -f conftest$ac_exeext
21580 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21581   (eval $ac_link) 2>&5
21582   ac_status=$?
21583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21584   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21586   (eval $ac_try) 2>&5
21587   ac_status=$?
21588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21589   (exit $ac_status); }; }; then
21590   ol_cv_pthread_lpthread_lmach_lexc=yes
21591 else
21592   echo "$as_me: program exited with status $ac_status" >&5
21593 echo "$as_me: failed program was:" >&5
21594 sed 's/^/| /' conftest.$ac_ext >&5
21595
21596 ( exit $ac_status )
21597 ol_cv_pthread_lpthread_lmach_lexc=no
21598 fi
21599 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21600 fi
21601
21602                 # restore the LIBS
21603                 LIBS="$ol_LIBS"
21604
21605 fi
21606 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
21607 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
21608
21609         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
21610                 ol_link_pthreads="-lpthread -lmach -lexc"
21611                 ol_link_threads=posix
21612         fi
21613 fi
21614
21615
21616                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
21617 if test "$ol_link_threads" = no ; then
21618         # try -lpthread -Wl,-woff,85
21619         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
21620 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
21621 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
21622   echo $ECHO_N "(cached) $ECHO_C" >&6
21623 else
21624
21625                 # save the flags
21626                 ol_LIBS="$LIBS"
21627                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
21628
21629                 if test "$cross_compiling" = yes; then
21630   cat >conftest.$ac_ext <<_ACEOF
21631 /* confdefs.h.  */
21632 _ACEOF
21633 cat confdefs.h >>conftest.$ac_ext
21634 cat >>conftest.$ac_ext <<_ACEOF
21635 /* end confdefs.h.  */
21636
21637 /* pthread test headers */
21638 #include <pthread.h>
21639 #if HAVE_PTHREADS < 7
21640 #include <errno.h>
21641 #endif
21642 #ifndef NULL
21643 #define NULL (void*)0
21644 #endif
21645
21646 static void *task(p)
21647         void *p;
21648 {
21649         return (void *) (p == NULL);
21650 }
21651
21652 int
21653 main ()
21654 {
21655
21656         /* pthread test function */
21657 #ifndef PTHREAD_CREATE_DETACHED
21658 #define PTHREAD_CREATE_DETACHED 1
21659 #endif
21660         pthread_t t;
21661         int status;
21662         int detach = PTHREAD_CREATE_DETACHED;
21663
21664 #if HAVE_PTHREADS > 4
21665         /* Final pthreads */
21666         pthread_attr_t attr;
21667
21668         status = pthread_attr_init(&attr);
21669         if( status ) return status;
21670
21671 #if HAVE_PTHREADS < 7
21672         status = pthread_attr_setdetachstate(&attr, &detach);
21673         if( status < 0 ) status = errno;
21674 #else
21675         status = pthread_attr_setdetachstate(&attr, detach);
21676 #endif
21677         if( status ) return status;
21678         status = pthread_create( &t, &attr, task, NULL );
21679 #if HAVE_PTHREADS < 7
21680         if( status < 0 ) status = errno;
21681 #endif
21682         if( status ) return status;
21683 #else
21684         /* Draft 4 pthreads */
21685         status = pthread_create( &t, pthread_attr_default, task, NULL );
21686         if( status ) return errno;
21687
21688         /* give thread a chance to complete */
21689         /* it should remain joinable and hence detachable */
21690         sleep( 1 );
21691
21692         status = pthread_detach( &t );
21693         if( status ) return errno;
21694 #endif
21695
21696 #ifdef HAVE_LINUX_THREADS
21697         pthread_kill_other_threads_np();
21698 #endif
21699
21700         return 0;
21701
21702   ;
21703   return 0;
21704 }
21705 _ACEOF
21706 rm -f conftest.$ac_objext conftest$ac_exeext
21707 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21708   (eval $ac_link) 2>conftest.er1
21709   ac_status=$?
21710   grep -v '^ *+' conftest.er1 >conftest.err
21711   rm -f conftest.er1
21712   cat conftest.err >&5
21713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714   (exit $ac_status); } &&
21715          { ac_try='test -z "$ac_c_werror_flag"
21716                          || test ! -s conftest.err'
21717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21718   (eval $ac_try) 2>&5
21719   ac_status=$?
21720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21721   (exit $ac_status); }; } &&
21722          { ac_try='test -s conftest$ac_exeext'
21723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21724   (eval $ac_try) 2>&5
21725   ac_status=$?
21726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21727   (exit $ac_status); }; }; then
21728   ol_cv_pthread_lib_lpthread_woff=yes
21729 else
21730   echo "$as_me: failed program was:" >&5
21731 sed 's/^/| /' conftest.$ac_ext >&5
21732
21733 ol_cv_pthread_lib_lpthread_woff=no
21734 fi
21735 rm -f conftest.err conftest.$ac_objext \
21736       conftest$ac_exeext conftest.$ac_ext
21737 else
21738   cat >conftest.$ac_ext <<_ACEOF
21739 /* confdefs.h.  */
21740 _ACEOF
21741 cat confdefs.h >>conftest.$ac_ext
21742 cat >>conftest.$ac_ext <<_ACEOF
21743 /* end confdefs.h.  */
21744
21745 /* pthread test headers */
21746 #include <pthread.h>
21747 #if HAVE_PTHREADS < 7
21748 #include <errno.h>
21749 #endif
21750 #ifndef NULL
21751 #define NULL (void*)0
21752 #endif
21753
21754 static void *task(p)
21755         void *p;
21756 {
21757         return (void *) (p == NULL);
21758 }
21759
21760
21761 int main(argc, argv)
21762         int argc;
21763         char **argv;
21764 {
21765
21766         /* pthread test function */
21767 #ifndef PTHREAD_CREATE_DETACHED
21768 #define PTHREAD_CREATE_DETACHED 1
21769 #endif
21770         pthread_t t;
21771         int status;
21772         int detach = PTHREAD_CREATE_DETACHED;
21773
21774 #if HAVE_PTHREADS > 4
21775         /* Final pthreads */
21776         pthread_attr_t attr;
21777
21778         status = pthread_attr_init(&attr);
21779         if( status ) return status;
21780
21781 #if HAVE_PTHREADS < 7
21782         status = pthread_attr_setdetachstate(&attr, &detach);
21783         if( status < 0 ) status = errno;
21784 #else
21785         status = pthread_attr_setdetachstate(&attr, detach);
21786 #endif
21787         if( status ) return status;
21788         status = pthread_create( &t, &attr, task, NULL );
21789 #if HAVE_PTHREADS < 7
21790         if( status < 0 ) status = errno;
21791 #endif
21792         if( status ) return status;
21793 #else
21794         /* Draft 4 pthreads */
21795         status = pthread_create( &t, pthread_attr_default, task, NULL );
21796         if( status ) return errno;
21797
21798         /* give thread a chance to complete */
21799         /* it should remain joinable and hence detachable */
21800         sleep( 1 );
21801
21802         status = pthread_detach( &t );
21803         if( status ) return errno;
21804 #endif
21805
21806 #ifdef HAVE_LINUX_THREADS
21807         pthread_kill_other_threads_np();
21808 #endif
21809
21810         return 0;
21811
21812 }
21813
21814 _ACEOF
21815 rm -f conftest$ac_exeext
21816 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21817   (eval $ac_link) 2>&5
21818   ac_status=$?
21819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21820   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21822   (eval $ac_try) 2>&5
21823   ac_status=$?
21824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21825   (exit $ac_status); }; }; then
21826   ol_cv_pthread_lib_lpthread_woff=yes
21827 else
21828   echo "$as_me: program exited with status $ac_status" >&5
21829 echo "$as_me: failed program was:" >&5
21830 sed 's/^/| /' conftest.$ac_ext >&5
21831
21832 ( exit $ac_status )
21833 ol_cv_pthread_lib_lpthread_woff=no
21834 fi
21835 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21836 fi
21837
21838                 # restore the LIBS
21839                 LIBS="$ol_LIBS"
21840
21841 fi
21842 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
21843 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
21844
21845         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
21846                 ol_link_pthreads="-lpthread -Wl,-woff,85"
21847                 ol_link_threads=posix
21848         fi
21849 fi
21850
21851
21852                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
21853 if test "$ol_link_threads" = no ; then
21854         # try -lpthread
21855         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
21856 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
21857 if test "${ol_cv_pthread_lpthread+set}" = set; then
21858   echo $ECHO_N "(cached) $ECHO_C" >&6
21859 else
21860
21861                 # save the flags
21862                 ol_LIBS="$LIBS"
21863                 LIBS="-lpthread $LIBS"
21864
21865                 if test "$cross_compiling" = yes; then
21866   cat >conftest.$ac_ext <<_ACEOF
21867 /* confdefs.h.  */
21868 _ACEOF
21869 cat confdefs.h >>conftest.$ac_ext
21870 cat >>conftest.$ac_ext <<_ACEOF
21871 /* end confdefs.h.  */
21872
21873 /* pthread test headers */
21874 #include <pthread.h>
21875 #if HAVE_PTHREADS < 7
21876 #include <errno.h>
21877 #endif
21878 #ifndef NULL
21879 #define NULL (void*)0
21880 #endif
21881
21882 static void *task(p)
21883         void *p;
21884 {
21885         return (void *) (p == NULL);
21886 }
21887
21888 int
21889 main ()
21890 {
21891
21892         /* pthread test function */
21893 #ifndef PTHREAD_CREATE_DETACHED
21894 #define PTHREAD_CREATE_DETACHED 1
21895 #endif
21896         pthread_t t;
21897         int status;
21898         int detach = PTHREAD_CREATE_DETACHED;
21899
21900 #if HAVE_PTHREADS > 4
21901         /* Final pthreads */
21902         pthread_attr_t attr;
21903
21904         status = pthread_attr_init(&attr);
21905         if( status ) return status;
21906
21907 #if HAVE_PTHREADS < 7
21908         status = pthread_attr_setdetachstate(&attr, &detach);
21909         if( status < 0 ) status = errno;
21910 #else
21911         status = pthread_attr_setdetachstate(&attr, detach);
21912 #endif
21913         if( status ) return status;
21914         status = pthread_create( &t, &attr, task, NULL );
21915 #if HAVE_PTHREADS < 7
21916         if( status < 0 ) status = errno;
21917 #endif
21918         if( status ) return status;
21919 #else
21920         /* Draft 4 pthreads */
21921         status = pthread_create( &t, pthread_attr_default, task, NULL );
21922         if( status ) return errno;
21923
21924         /* give thread a chance to complete */
21925         /* it should remain joinable and hence detachable */
21926         sleep( 1 );
21927
21928         status = pthread_detach( &t );
21929         if( status ) return errno;
21930 #endif
21931
21932 #ifdef HAVE_LINUX_THREADS
21933         pthread_kill_other_threads_np();
21934 #endif
21935
21936         return 0;
21937
21938   ;
21939   return 0;
21940 }
21941 _ACEOF
21942 rm -f conftest.$ac_objext conftest$ac_exeext
21943 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21944   (eval $ac_link) 2>conftest.er1
21945   ac_status=$?
21946   grep -v '^ *+' conftest.er1 >conftest.err
21947   rm -f conftest.er1
21948   cat conftest.err >&5
21949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21950   (exit $ac_status); } &&
21951          { ac_try='test -z "$ac_c_werror_flag"
21952                          || test ! -s conftest.err'
21953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21954   (eval $ac_try) 2>&5
21955   ac_status=$?
21956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21957   (exit $ac_status); }; } &&
21958          { ac_try='test -s conftest$ac_exeext'
21959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21960   (eval $ac_try) 2>&5
21961   ac_status=$?
21962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21963   (exit $ac_status); }; }; then
21964   ol_cv_pthread_lpthread=yes
21965 else
21966   echo "$as_me: failed program was:" >&5
21967 sed 's/^/| /' conftest.$ac_ext >&5
21968
21969 ol_cv_pthread_lpthread=no
21970 fi
21971 rm -f conftest.err conftest.$ac_objext \
21972       conftest$ac_exeext conftest.$ac_ext
21973 else
21974   cat >conftest.$ac_ext <<_ACEOF
21975 /* confdefs.h.  */
21976 _ACEOF
21977 cat confdefs.h >>conftest.$ac_ext
21978 cat >>conftest.$ac_ext <<_ACEOF
21979 /* end confdefs.h.  */
21980
21981 /* pthread test headers */
21982 #include <pthread.h>
21983 #if HAVE_PTHREADS < 7
21984 #include <errno.h>
21985 #endif
21986 #ifndef NULL
21987 #define NULL (void*)0
21988 #endif
21989
21990 static void *task(p)
21991         void *p;
21992 {
21993         return (void *) (p == NULL);
21994 }
21995
21996
21997 int main(argc, argv)
21998         int argc;
21999         char **argv;
22000 {
22001
22002         /* pthread test function */
22003 #ifndef PTHREAD_CREATE_DETACHED
22004 #define PTHREAD_CREATE_DETACHED 1
22005 #endif
22006         pthread_t t;
22007         int status;
22008         int detach = PTHREAD_CREATE_DETACHED;
22009
22010 #if HAVE_PTHREADS > 4
22011         /* Final pthreads */
22012         pthread_attr_t attr;
22013
22014         status = pthread_attr_init(&attr);
22015         if( status ) return status;
22016
22017 #if HAVE_PTHREADS < 7
22018         status = pthread_attr_setdetachstate(&attr, &detach);
22019         if( status < 0 ) status = errno;
22020 #else
22021         status = pthread_attr_setdetachstate(&attr, detach);
22022 #endif
22023         if( status ) return status;
22024         status = pthread_create( &t, &attr, task, NULL );
22025 #if HAVE_PTHREADS < 7
22026         if( status < 0 ) status = errno;
22027 #endif
22028         if( status ) return status;
22029 #else
22030         /* Draft 4 pthreads */
22031         status = pthread_create( &t, pthread_attr_default, task, NULL );
22032         if( status ) return errno;
22033
22034         /* give thread a chance to complete */
22035         /* it should remain joinable and hence detachable */
22036         sleep( 1 );
22037
22038         status = pthread_detach( &t );
22039         if( status ) return errno;
22040 #endif
22041
22042 #ifdef HAVE_LINUX_THREADS
22043         pthread_kill_other_threads_np();
22044 #endif
22045
22046         return 0;
22047
22048 }
22049
22050 _ACEOF
22051 rm -f conftest$ac_exeext
22052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22053   (eval $ac_link) 2>&5
22054   ac_status=$?
22055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22056   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22058   (eval $ac_try) 2>&5
22059   ac_status=$?
22060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22061   (exit $ac_status); }; }; then
22062   ol_cv_pthread_lpthread=yes
22063 else
22064   echo "$as_me: program exited with status $ac_status" >&5
22065 echo "$as_me: failed program was:" >&5
22066 sed 's/^/| /' conftest.$ac_ext >&5
22067
22068 ( exit $ac_status )
22069 ol_cv_pthread_lpthread=no
22070 fi
22071 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22072 fi
22073
22074                 # restore the LIBS
22075                 LIBS="$ol_LIBS"
22076
22077 fi
22078 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
22079 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
22080
22081         if test $ol_cv_pthread_lpthread = yes ; then
22082                 ol_link_pthreads="-lpthread"
22083                 ol_link_threads=posix
22084         fi
22085 fi
22086
22087                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
22088 if test "$ol_link_threads" = no ; then
22089         # try -lc_r
22090         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
22091 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
22092 if test "${ol_cv_pthread_lc_r+set}" = set; then
22093   echo $ECHO_N "(cached) $ECHO_C" >&6
22094 else
22095
22096                 # save the flags
22097                 ol_LIBS="$LIBS"
22098                 LIBS="-lc_r $LIBS"
22099
22100                 if test "$cross_compiling" = yes; then
22101   cat >conftest.$ac_ext <<_ACEOF
22102 /* confdefs.h.  */
22103 _ACEOF
22104 cat confdefs.h >>conftest.$ac_ext
22105 cat >>conftest.$ac_ext <<_ACEOF
22106 /* end confdefs.h.  */
22107
22108 /* pthread test headers */
22109 #include <pthread.h>
22110 #if HAVE_PTHREADS < 7
22111 #include <errno.h>
22112 #endif
22113 #ifndef NULL
22114 #define NULL (void*)0
22115 #endif
22116
22117 static void *task(p)
22118         void *p;
22119 {
22120         return (void *) (p == NULL);
22121 }
22122
22123 int
22124 main ()
22125 {
22126
22127         /* pthread test function */
22128 #ifndef PTHREAD_CREATE_DETACHED
22129 #define PTHREAD_CREATE_DETACHED 1
22130 #endif
22131         pthread_t t;
22132         int status;
22133         int detach = PTHREAD_CREATE_DETACHED;
22134
22135 #if HAVE_PTHREADS > 4
22136         /* Final pthreads */
22137         pthread_attr_t attr;
22138
22139         status = pthread_attr_init(&attr);
22140         if( status ) return status;
22141
22142 #if HAVE_PTHREADS < 7
22143         status = pthread_attr_setdetachstate(&attr, &detach);
22144         if( status < 0 ) status = errno;
22145 #else
22146         status = pthread_attr_setdetachstate(&attr, detach);
22147 #endif
22148         if( status ) return status;
22149         status = pthread_create( &t, &attr, task, NULL );
22150 #if HAVE_PTHREADS < 7
22151         if( status < 0 ) status = errno;
22152 #endif
22153         if( status ) return status;
22154 #else
22155         /* Draft 4 pthreads */
22156         status = pthread_create( &t, pthread_attr_default, task, NULL );
22157         if( status ) return errno;
22158
22159         /* give thread a chance to complete */
22160         /* it should remain joinable and hence detachable */
22161         sleep( 1 );
22162
22163         status = pthread_detach( &t );
22164         if( status ) return errno;
22165 #endif
22166
22167 #ifdef HAVE_LINUX_THREADS
22168         pthread_kill_other_threads_np();
22169 #endif
22170
22171         return 0;
22172
22173   ;
22174   return 0;
22175 }
22176 _ACEOF
22177 rm -f conftest.$ac_objext conftest$ac_exeext
22178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22179   (eval $ac_link) 2>conftest.er1
22180   ac_status=$?
22181   grep -v '^ *+' conftest.er1 >conftest.err
22182   rm -f conftest.er1
22183   cat conftest.err >&5
22184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22185   (exit $ac_status); } &&
22186          { ac_try='test -z "$ac_c_werror_flag"
22187                          || test ! -s conftest.err'
22188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22189   (eval $ac_try) 2>&5
22190   ac_status=$?
22191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22192   (exit $ac_status); }; } &&
22193          { ac_try='test -s conftest$ac_exeext'
22194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22195   (eval $ac_try) 2>&5
22196   ac_status=$?
22197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22198   (exit $ac_status); }; }; then
22199   ol_cv_pthread_lc_r=yes
22200 else
22201   echo "$as_me: failed program was:" >&5
22202 sed 's/^/| /' conftest.$ac_ext >&5
22203
22204 ol_cv_pthread_lc_r=no
22205 fi
22206 rm -f conftest.err conftest.$ac_objext \
22207       conftest$ac_exeext conftest.$ac_ext
22208 else
22209   cat >conftest.$ac_ext <<_ACEOF
22210 /* confdefs.h.  */
22211 _ACEOF
22212 cat confdefs.h >>conftest.$ac_ext
22213 cat >>conftest.$ac_ext <<_ACEOF
22214 /* end confdefs.h.  */
22215
22216 /* pthread test headers */
22217 #include <pthread.h>
22218 #if HAVE_PTHREADS < 7
22219 #include <errno.h>
22220 #endif
22221 #ifndef NULL
22222 #define NULL (void*)0
22223 #endif
22224
22225 static void *task(p)
22226         void *p;
22227 {
22228         return (void *) (p == NULL);
22229 }
22230
22231
22232 int main(argc, argv)
22233         int argc;
22234         char **argv;
22235 {
22236
22237         /* pthread test function */
22238 #ifndef PTHREAD_CREATE_DETACHED
22239 #define PTHREAD_CREATE_DETACHED 1
22240 #endif
22241         pthread_t t;
22242         int status;
22243         int detach = PTHREAD_CREATE_DETACHED;
22244
22245 #if HAVE_PTHREADS > 4
22246         /* Final pthreads */
22247         pthread_attr_t attr;
22248
22249         status = pthread_attr_init(&attr);
22250         if( status ) return status;
22251
22252 #if HAVE_PTHREADS < 7
22253         status = pthread_attr_setdetachstate(&attr, &detach);
22254         if( status < 0 ) status = errno;
22255 #else
22256         status = pthread_attr_setdetachstate(&attr, detach);
22257 #endif
22258         if( status ) return status;
22259         status = pthread_create( &t, &attr, task, NULL );
22260 #if HAVE_PTHREADS < 7
22261         if( status < 0 ) status = errno;
22262 #endif
22263         if( status ) return status;
22264 #else
22265         /* Draft 4 pthreads */
22266         status = pthread_create( &t, pthread_attr_default, task, NULL );
22267         if( status ) return errno;
22268
22269         /* give thread a chance to complete */
22270         /* it should remain joinable and hence detachable */
22271         sleep( 1 );
22272
22273         status = pthread_detach( &t );
22274         if( status ) return errno;
22275 #endif
22276
22277 #ifdef HAVE_LINUX_THREADS
22278         pthread_kill_other_threads_np();
22279 #endif
22280
22281         return 0;
22282
22283 }
22284
22285 _ACEOF
22286 rm -f conftest$ac_exeext
22287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22288   (eval $ac_link) 2>&5
22289   ac_status=$?
22290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22291   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22293   (eval $ac_try) 2>&5
22294   ac_status=$?
22295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22296   (exit $ac_status); }; }; then
22297   ol_cv_pthread_lc_r=yes
22298 else
22299   echo "$as_me: program exited with status $ac_status" >&5
22300 echo "$as_me: failed program was:" >&5
22301 sed 's/^/| /' conftest.$ac_ext >&5
22302
22303 ( exit $ac_status )
22304 ol_cv_pthread_lc_r=no
22305 fi
22306 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22307 fi
22308
22309                 # restore the LIBS
22310                 LIBS="$ol_LIBS"
22311
22312 fi
22313 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
22314 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
22315
22316         if test $ol_cv_pthread_lc_r = yes ; then
22317                 ol_link_pthreads="-lc_r"
22318                 ol_link_threads=posix
22319         fi
22320 fi
22321
22322
22323                 # Pthread try link: -threads (ol_cv_pthread_threads)
22324 if test "$ol_link_threads" = no ; then
22325         # try -threads
22326         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
22327 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
22328 if test "${ol_cv_pthread_threads+set}" = set; then
22329   echo $ECHO_N "(cached) $ECHO_C" >&6
22330 else
22331
22332                 # save the flags
22333                 ol_LIBS="$LIBS"
22334                 LIBS="-threads $LIBS"
22335
22336                 if test "$cross_compiling" = yes; then
22337   cat >conftest.$ac_ext <<_ACEOF
22338 /* confdefs.h.  */
22339 _ACEOF
22340 cat confdefs.h >>conftest.$ac_ext
22341 cat >>conftest.$ac_ext <<_ACEOF
22342 /* end confdefs.h.  */
22343
22344 /* pthread test headers */
22345 #include <pthread.h>
22346 #if HAVE_PTHREADS < 7
22347 #include <errno.h>
22348 #endif
22349 #ifndef NULL
22350 #define NULL (void*)0
22351 #endif
22352
22353 static void *task(p)
22354         void *p;
22355 {
22356         return (void *) (p == NULL);
22357 }
22358
22359 int
22360 main ()
22361 {
22362
22363         /* pthread test function */
22364 #ifndef PTHREAD_CREATE_DETACHED
22365 #define PTHREAD_CREATE_DETACHED 1
22366 #endif
22367         pthread_t t;
22368         int status;
22369         int detach = PTHREAD_CREATE_DETACHED;
22370
22371 #if HAVE_PTHREADS > 4
22372         /* Final pthreads */
22373         pthread_attr_t attr;
22374
22375         status = pthread_attr_init(&attr);
22376         if( status ) return status;
22377
22378 #if HAVE_PTHREADS < 7
22379         status = pthread_attr_setdetachstate(&attr, &detach);
22380         if( status < 0 ) status = errno;
22381 #else
22382         status = pthread_attr_setdetachstate(&attr, detach);
22383 #endif
22384         if( status ) return status;
22385         status = pthread_create( &t, &attr, task, NULL );
22386 #if HAVE_PTHREADS < 7
22387         if( status < 0 ) status = errno;
22388 #endif
22389         if( status ) return status;
22390 #else
22391         /* Draft 4 pthreads */
22392         status = pthread_create( &t, pthread_attr_default, task, NULL );
22393         if( status ) return errno;
22394
22395         /* give thread a chance to complete */
22396         /* it should remain joinable and hence detachable */
22397         sleep( 1 );
22398
22399         status = pthread_detach( &t );
22400         if( status ) return errno;
22401 #endif
22402
22403 #ifdef HAVE_LINUX_THREADS
22404         pthread_kill_other_threads_np();
22405 #endif
22406
22407         return 0;
22408
22409   ;
22410   return 0;
22411 }
22412 _ACEOF
22413 rm -f conftest.$ac_objext conftest$ac_exeext
22414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22415   (eval $ac_link) 2>conftest.er1
22416   ac_status=$?
22417   grep -v '^ *+' conftest.er1 >conftest.err
22418   rm -f conftest.er1
22419   cat conftest.err >&5
22420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22421   (exit $ac_status); } &&
22422          { ac_try='test -z "$ac_c_werror_flag"
22423                          || test ! -s conftest.err'
22424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22425   (eval $ac_try) 2>&5
22426   ac_status=$?
22427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22428   (exit $ac_status); }; } &&
22429          { ac_try='test -s conftest$ac_exeext'
22430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22431   (eval $ac_try) 2>&5
22432   ac_status=$?
22433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22434   (exit $ac_status); }; }; then
22435   ol_cv_pthread_threads=yes
22436 else
22437   echo "$as_me: failed program was:" >&5
22438 sed 's/^/| /' conftest.$ac_ext >&5
22439
22440 ol_cv_pthread_threads=no
22441 fi
22442 rm -f conftest.err conftest.$ac_objext \
22443       conftest$ac_exeext conftest.$ac_ext
22444 else
22445   cat >conftest.$ac_ext <<_ACEOF
22446 /* confdefs.h.  */
22447 _ACEOF
22448 cat confdefs.h >>conftest.$ac_ext
22449 cat >>conftest.$ac_ext <<_ACEOF
22450 /* end confdefs.h.  */
22451
22452 /* pthread test headers */
22453 #include <pthread.h>
22454 #if HAVE_PTHREADS < 7
22455 #include <errno.h>
22456 #endif
22457 #ifndef NULL
22458 #define NULL (void*)0
22459 #endif
22460
22461 static void *task(p)
22462         void *p;
22463 {
22464         return (void *) (p == NULL);
22465 }
22466
22467
22468 int main(argc, argv)
22469         int argc;
22470         char **argv;
22471 {
22472
22473         /* pthread test function */
22474 #ifndef PTHREAD_CREATE_DETACHED
22475 #define PTHREAD_CREATE_DETACHED 1
22476 #endif
22477         pthread_t t;
22478         int status;
22479         int detach = PTHREAD_CREATE_DETACHED;
22480
22481 #if HAVE_PTHREADS > 4
22482         /* Final pthreads */
22483         pthread_attr_t attr;
22484
22485         status = pthread_attr_init(&attr);
22486         if( status ) return status;
22487
22488 #if HAVE_PTHREADS < 7
22489         status = pthread_attr_setdetachstate(&attr, &detach);
22490         if( status < 0 ) status = errno;
22491 #else
22492         status = pthread_attr_setdetachstate(&attr, detach);
22493 #endif
22494         if( status ) return status;
22495         status = pthread_create( &t, &attr, task, NULL );
22496 #if HAVE_PTHREADS < 7
22497         if( status < 0 ) status = errno;
22498 #endif
22499         if( status ) return status;
22500 #else
22501         /* Draft 4 pthreads */
22502         status = pthread_create( &t, pthread_attr_default, task, NULL );
22503         if( status ) return errno;
22504
22505         /* give thread a chance to complete */
22506         /* it should remain joinable and hence detachable */
22507         sleep( 1 );
22508
22509         status = pthread_detach( &t );
22510         if( status ) return errno;
22511 #endif
22512
22513 #ifdef HAVE_LINUX_THREADS
22514         pthread_kill_other_threads_np();
22515 #endif
22516
22517         return 0;
22518
22519 }
22520
22521 _ACEOF
22522 rm -f conftest$ac_exeext
22523 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22524   (eval $ac_link) 2>&5
22525   ac_status=$?
22526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22527   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22529   (eval $ac_try) 2>&5
22530   ac_status=$?
22531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22532   (exit $ac_status); }; }; then
22533   ol_cv_pthread_threads=yes
22534 else
22535   echo "$as_me: program exited with status $ac_status" >&5
22536 echo "$as_me: failed program was:" >&5
22537 sed 's/^/| /' conftest.$ac_ext >&5
22538
22539 ( exit $ac_status )
22540 ol_cv_pthread_threads=no
22541 fi
22542 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22543 fi
22544
22545                 # restore the LIBS
22546                 LIBS="$ol_LIBS"
22547
22548 fi
22549 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
22550 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
22551
22552         if test $ol_cv_pthread_threads = yes ; then
22553                 ol_link_pthreads="-threads"
22554                 ol_link_threads=posix
22555         fi
22556 fi
22557
22558
22559                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
22560 if test "$ol_link_threads" = no ; then
22561         # try -lpthreads -lmach -lexc -lc_r
22562         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
22563 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
22564 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
22565   echo $ECHO_N "(cached) $ECHO_C" >&6
22566 else
22567
22568                 # save the flags
22569                 ol_LIBS="$LIBS"
22570                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
22571
22572                 if test "$cross_compiling" = yes; then
22573   cat >conftest.$ac_ext <<_ACEOF
22574 /* confdefs.h.  */
22575 _ACEOF
22576 cat confdefs.h >>conftest.$ac_ext
22577 cat >>conftest.$ac_ext <<_ACEOF
22578 /* end confdefs.h.  */
22579
22580 /* pthread test headers */
22581 #include <pthread.h>
22582 #if HAVE_PTHREADS < 7
22583 #include <errno.h>
22584 #endif
22585 #ifndef NULL
22586 #define NULL (void*)0
22587 #endif
22588
22589 static void *task(p)
22590         void *p;
22591 {
22592         return (void *) (p == NULL);
22593 }
22594
22595 int
22596 main ()
22597 {
22598
22599         /* pthread test function */
22600 #ifndef PTHREAD_CREATE_DETACHED
22601 #define PTHREAD_CREATE_DETACHED 1
22602 #endif
22603         pthread_t t;
22604         int status;
22605         int detach = PTHREAD_CREATE_DETACHED;
22606
22607 #if HAVE_PTHREADS > 4
22608         /* Final pthreads */
22609         pthread_attr_t attr;
22610
22611         status = pthread_attr_init(&attr);
22612         if( status ) return status;
22613
22614 #if HAVE_PTHREADS < 7
22615         status = pthread_attr_setdetachstate(&attr, &detach);
22616         if( status < 0 ) status = errno;
22617 #else
22618         status = pthread_attr_setdetachstate(&attr, detach);
22619 #endif
22620         if( status ) return status;
22621         status = pthread_create( &t, &attr, task, NULL );
22622 #if HAVE_PTHREADS < 7
22623         if( status < 0 ) status = errno;
22624 #endif
22625         if( status ) return status;
22626 #else
22627         /* Draft 4 pthreads */
22628         status = pthread_create( &t, pthread_attr_default, task, NULL );
22629         if( status ) return errno;
22630
22631         /* give thread a chance to complete */
22632         /* it should remain joinable and hence detachable */
22633         sleep( 1 );
22634
22635         status = pthread_detach( &t );
22636         if( status ) return errno;
22637 #endif
22638
22639 #ifdef HAVE_LINUX_THREADS
22640         pthread_kill_other_threads_np();
22641 #endif
22642
22643         return 0;
22644
22645   ;
22646   return 0;
22647 }
22648 _ACEOF
22649 rm -f conftest.$ac_objext conftest$ac_exeext
22650 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22651   (eval $ac_link) 2>conftest.er1
22652   ac_status=$?
22653   grep -v '^ *+' conftest.er1 >conftest.err
22654   rm -f conftest.er1
22655   cat conftest.err >&5
22656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22657   (exit $ac_status); } &&
22658          { ac_try='test -z "$ac_c_werror_flag"
22659                          || test ! -s conftest.err'
22660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22661   (eval $ac_try) 2>&5
22662   ac_status=$?
22663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22664   (exit $ac_status); }; } &&
22665          { ac_try='test -s conftest$ac_exeext'
22666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22667   (eval $ac_try) 2>&5
22668   ac_status=$?
22669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22670   (exit $ac_status); }; }; then
22671   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
22672 else
22673   echo "$as_me: failed program was:" >&5
22674 sed 's/^/| /' conftest.$ac_ext >&5
22675
22676 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
22677 fi
22678 rm -f conftest.err conftest.$ac_objext \
22679       conftest$ac_exeext conftest.$ac_ext
22680 else
22681   cat >conftest.$ac_ext <<_ACEOF
22682 /* confdefs.h.  */
22683 _ACEOF
22684 cat confdefs.h >>conftest.$ac_ext
22685 cat >>conftest.$ac_ext <<_ACEOF
22686 /* end confdefs.h.  */
22687
22688 /* pthread test headers */
22689 #include <pthread.h>
22690 #if HAVE_PTHREADS < 7
22691 #include <errno.h>
22692 #endif
22693 #ifndef NULL
22694 #define NULL (void*)0
22695 #endif
22696
22697 static void *task(p)
22698         void *p;
22699 {
22700         return (void *) (p == NULL);
22701 }
22702
22703
22704 int main(argc, argv)
22705         int argc;
22706         char **argv;
22707 {
22708
22709         /* pthread test function */
22710 #ifndef PTHREAD_CREATE_DETACHED
22711 #define PTHREAD_CREATE_DETACHED 1
22712 #endif
22713         pthread_t t;
22714         int status;
22715         int detach = PTHREAD_CREATE_DETACHED;
22716
22717 #if HAVE_PTHREADS > 4
22718         /* Final pthreads */
22719         pthread_attr_t attr;
22720
22721         status = pthread_attr_init(&attr);
22722         if( status ) return status;
22723
22724 #if HAVE_PTHREADS < 7
22725         status = pthread_attr_setdetachstate(&attr, &detach);
22726         if( status < 0 ) status = errno;
22727 #else
22728         status = pthread_attr_setdetachstate(&attr, detach);
22729 #endif
22730         if( status ) return status;
22731         status = pthread_create( &t, &attr, task, NULL );
22732 #if HAVE_PTHREADS < 7
22733         if( status < 0 ) status = errno;
22734 #endif
22735         if( status ) return status;
22736 #else
22737         /* Draft 4 pthreads */
22738         status = pthread_create( &t, pthread_attr_default, task, NULL );
22739         if( status ) return errno;
22740
22741         /* give thread a chance to complete */
22742         /* it should remain joinable and hence detachable */
22743         sleep( 1 );
22744
22745         status = pthread_detach( &t );
22746         if( status ) return errno;
22747 #endif
22748
22749 #ifdef HAVE_LINUX_THREADS
22750         pthread_kill_other_threads_np();
22751 #endif
22752
22753         return 0;
22754
22755 }
22756
22757 _ACEOF
22758 rm -f conftest$ac_exeext
22759 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22760   (eval $ac_link) 2>&5
22761   ac_status=$?
22762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22763   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22765   (eval $ac_try) 2>&5
22766   ac_status=$?
22767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22768   (exit $ac_status); }; }; then
22769   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
22770 else
22771   echo "$as_me: program exited with status $ac_status" >&5
22772 echo "$as_me: failed program was:" >&5
22773 sed 's/^/| /' conftest.$ac_ext >&5
22774
22775 ( exit $ac_status )
22776 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
22777 fi
22778 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22779 fi
22780
22781                 # restore the LIBS
22782                 LIBS="$ol_LIBS"
22783
22784 fi
22785 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
22786 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
22787
22788         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
22789                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
22790                 ol_link_threads=posix
22791         fi
22792 fi
22793
22794                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
22795 if test "$ol_link_threads" = no ; then
22796         # try -lpthreads -lmach -lexc
22797         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
22798 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
22799 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
22800   echo $ECHO_N "(cached) $ECHO_C" >&6
22801 else
22802
22803                 # save the flags
22804                 ol_LIBS="$LIBS"
22805                 LIBS="-lpthreads -lmach -lexc $LIBS"
22806
22807                 if test "$cross_compiling" = yes; then
22808   cat >conftest.$ac_ext <<_ACEOF
22809 /* confdefs.h.  */
22810 _ACEOF
22811 cat confdefs.h >>conftest.$ac_ext
22812 cat >>conftest.$ac_ext <<_ACEOF
22813 /* end confdefs.h.  */
22814
22815 /* pthread test headers */
22816 #include <pthread.h>
22817 #if HAVE_PTHREADS < 7
22818 #include <errno.h>
22819 #endif
22820 #ifndef NULL
22821 #define NULL (void*)0
22822 #endif
22823
22824 static void *task(p)
22825         void *p;
22826 {
22827         return (void *) (p == NULL);
22828 }
22829
22830 int
22831 main ()
22832 {
22833
22834         /* pthread test function */
22835 #ifndef PTHREAD_CREATE_DETACHED
22836 #define PTHREAD_CREATE_DETACHED 1
22837 #endif
22838         pthread_t t;
22839         int status;
22840         int detach = PTHREAD_CREATE_DETACHED;
22841
22842 #if HAVE_PTHREADS > 4
22843         /* Final pthreads */
22844         pthread_attr_t attr;
22845
22846         status = pthread_attr_init(&attr);
22847         if( status ) return status;
22848
22849 #if HAVE_PTHREADS < 7
22850         status = pthread_attr_setdetachstate(&attr, &detach);
22851         if( status < 0 ) status = errno;
22852 #else
22853         status = pthread_attr_setdetachstate(&attr, detach);
22854 #endif
22855         if( status ) return status;
22856         status = pthread_create( &t, &attr, task, NULL );
22857 #if HAVE_PTHREADS < 7
22858         if( status < 0 ) status = errno;
22859 #endif
22860         if( status ) return status;
22861 #else
22862         /* Draft 4 pthreads */
22863         status = pthread_create( &t, pthread_attr_default, task, NULL );
22864         if( status ) return errno;
22865
22866         /* give thread a chance to complete */
22867         /* it should remain joinable and hence detachable */
22868         sleep( 1 );
22869
22870         status = pthread_detach( &t );
22871         if( status ) return errno;
22872 #endif
22873
22874 #ifdef HAVE_LINUX_THREADS
22875         pthread_kill_other_threads_np();
22876 #endif
22877
22878         return 0;
22879
22880   ;
22881   return 0;
22882 }
22883 _ACEOF
22884 rm -f conftest.$ac_objext conftest$ac_exeext
22885 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22886   (eval $ac_link) 2>conftest.er1
22887   ac_status=$?
22888   grep -v '^ *+' conftest.er1 >conftest.err
22889   rm -f conftest.er1
22890   cat conftest.err >&5
22891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22892   (exit $ac_status); } &&
22893          { ac_try='test -z "$ac_c_werror_flag"
22894                          || test ! -s conftest.err'
22895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22896   (eval $ac_try) 2>&5
22897   ac_status=$?
22898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22899   (exit $ac_status); }; } &&
22900          { ac_try='test -s conftest$ac_exeext'
22901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22902   (eval $ac_try) 2>&5
22903   ac_status=$?
22904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22905   (exit $ac_status); }; }; then
22906   ol_cv_pthread_lpthreads_lmach_lexc=yes
22907 else
22908   echo "$as_me: failed program was:" >&5
22909 sed 's/^/| /' conftest.$ac_ext >&5
22910
22911 ol_cv_pthread_lpthreads_lmach_lexc=no
22912 fi
22913 rm -f conftest.err conftest.$ac_objext \
22914       conftest$ac_exeext conftest.$ac_ext
22915 else
22916   cat >conftest.$ac_ext <<_ACEOF
22917 /* confdefs.h.  */
22918 _ACEOF
22919 cat confdefs.h >>conftest.$ac_ext
22920 cat >>conftest.$ac_ext <<_ACEOF
22921 /* end confdefs.h.  */
22922
22923 /* pthread test headers */
22924 #include <pthread.h>
22925 #if HAVE_PTHREADS < 7
22926 #include <errno.h>
22927 #endif
22928 #ifndef NULL
22929 #define NULL (void*)0
22930 #endif
22931
22932 static void *task(p)
22933         void *p;
22934 {
22935         return (void *) (p == NULL);
22936 }
22937
22938
22939 int main(argc, argv)
22940         int argc;
22941         char **argv;
22942 {
22943
22944         /* pthread test function */
22945 #ifndef PTHREAD_CREATE_DETACHED
22946 #define PTHREAD_CREATE_DETACHED 1
22947 #endif
22948         pthread_t t;
22949         int status;
22950         int detach = PTHREAD_CREATE_DETACHED;
22951
22952 #if HAVE_PTHREADS > 4
22953         /* Final pthreads */
22954         pthread_attr_t attr;
22955
22956         status = pthread_attr_init(&attr);
22957         if( status ) return status;
22958
22959 #if HAVE_PTHREADS < 7
22960         status = pthread_attr_setdetachstate(&attr, &detach);
22961         if( status < 0 ) status = errno;
22962 #else
22963         status = pthread_attr_setdetachstate(&attr, detach);
22964 #endif
22965         if( status ) return status;
22966         status = pthread_create( &t, &attr, task, NULL );
22967 #if HAVE_PTHREADS < 7
22968         if( status < 0 ) status = errno;
22969 #endif
22970         if( status ) return status;
22971 #else
22972         /* Draft 4 pthreads */
22973         status = pthread_create( &t, pthread_attr_default, task, NULL );
22974         if( status ) return errno;
22975
22976         /* give thread a chance to complete */
22977         /* it should remain joinable and hence detachable */
22978         sleep( 1 );
22979
22980         status = pthread_detach( &t );
22981         if( status ) return errno;
22982 #endif
22983
22984 #ifdef HAVE_LINUX_THREADS
22985         pthread_kill_other_threads_np();
22986 #endif
22987
22988         return 0;
22989
22990 }
22991
22992 _ACEOF
22993 rm -f conftest$ac_exeext
22994 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22995   (eval $ac_link) 2>&5
22996   ac_status=$?
22997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22998   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22999   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23000   (eval $ac_try) 2>&5
23001   ac_status=$?
23002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23003   (exit $ac_status); }; }; then
23004   ol_cv_pthread_lpthreads_lmach_lexc=yes
23005 else
23006   echo "$as_me: program exited with status $ac_status" >&5
23007 echo "$as_me: failed program was:" >&5
23008 sed 's/^/| /' conftest.$ac_ext >&5
23009
23010 ( exit $ac_status )
23011 ol_cv_pthread_lpthreads_lmach_lexc=no
23012 fi
23013 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23014 fi
23015
23016                 # restore the LIBS
23017                 LIBS="$ol_LIBS"
23018
23019 fi
23020 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
23021 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
23022
23023         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
23024                 ol_link_pthreads="-lpthreads -lmach -lexc"
23025                 ol_link_threads=posix
23026         fi
23027 fi
23028
23029                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
23030 if test "$ol_link_threads" = no ; then
23031         # try -lpthreads -lexc
23032         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
23033 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
23034 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
23035   echo $ECHO_N "(cached) $ECHO_C" >&6
23036 else
23037
23038                 # save the flags
23039                 ol_LIBS="$LIBS"
23040                 LIBS="-lpthreads -lexc $LIBS"
23041
23042                 if test "$cross_compiling" = yes; then
23043   cat >conftest.$ac_ext <<_ACEOF
23044 /* confdefs.h.  */
23045 _ACEOF
23046 cat confdefs.h >>conftest.$ac_ext
23047 cat >>conftest.$ac_ext <<_ACEOF
23048 /* end confdefs.h.  */
23049
23050 /* pthread test headers */
23051 #include <pthread.h>
23052 #if HAVE_PTHREADS < 7
23053 #include <errno.h>
23054 #endif
23055 #ifndef NULL
23056 #define NULL (void*)0
23057 #endif
23058
23059 static void *task(p)
23060         void *p;
23061 {
23062         return (void *) (p == NULL);
23063 }
23064
23065 int
23066 main ()
23067 {
23068
23069         /* pthread test function */
23070 #ifndef PTHREAD_CREATE_DETACHED
23071 #define PTHREAD_CREATE_DETACHED 1
23072 #endif
23073         pthread_t t;
23074         int status;
23075         int detach = PTHREAD_CREATE_DETACHED;
23076
23077 #if HAVE_PTHREADS > 4
23078         /* Final pthreads */
23079         pthread_attr_t attr;
23080
23081         status = pthread_attr_init(&attr);
23082         if( status ) return status;
23083
23084 #if HAVE_PTHREADS < 7
23085         status = pthread_attr_setdetachstate(&attr, &detach);
23086         if( status < 0 ) status = errno;
23087 #else
23088         status = pthread_attr_setdetachstate(&attr, detach);
23089 #endif
23090         if( status ) return status;
23091         status = pthread_create( &t, &attr, task, NULL );
23092 #if HAVE_PTHREADS < 7
23093         if( status < 0 ) status = errno;
23094 #endif
23095         if( status ) return status;
23096 #else
23097         /* Draft 4 pthreads */
23098         status = pthread_create( &t, pthread_attr_default, task, NULL );
23099         if( status ) return errno;
23100
23101         /* give thread a chance to complete */
23102         /* it should remain joinable and hence detachable */
23103         sleep( 1 );
23104
23105         status = pthread_detach( &t );
23106         if( status ) return errno;
23107 #endif
23108
23109 #ifdef HAVE_LINUX_THREADS
23110         pthread_kill_other_threads_np();
23111 #endif
23112
23113         return 0;
23114
23115   ;
23116   return 0;
23117 }
23118 _ACEOF
23119 rm -f conftest.$ac_objext conftest$ac_exeext
23120 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23121   (eval $ac_link) 2>conftest.er1
23122   ac_status=$?
23123   grep -v '^ *+' conftest.er1 >conftest.err
23124   rm -f conftest.er1
23125   cat conftest.err >&5
23126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23127   (exit $ac_status); } &&
23128          { ac_try='test -z "$ac_c_werror_flag"
23129                          || test ! -s conftest.err'
23130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23131   (eval $ac_try) 2>&5
23132   ac_status=$?
23133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23134   (exit $ac_status); }; } &&
23135          { ac_try='test -s conftest$ac_exeext'
23136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23137   (eval $ac_try) 2>&5
23138   ac_status=$?
23139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23140   (exit $ac_status); }; }; then
23141   ol_cv_pthread_lpthreads_lexc=yes
23142 else
23143   echo "$as_me: failed program was:" >&5
23144 sed 's/^/| /' conftest.$ac_ext >&5
23145
23146 ol_cv_pthread_lpthreads_lexc=no
23147 fi
23148 rm -f conftest.err conftest.$ac_objext \
23149       conftest$ac_exeext conftest.$ac_ext
23150 else
23151   cat >conftest.$ac_ext <<_ACEOF
23152 /* confdefs.h.  */
23153 _ACEOF
23154 cat confdefs.h >>conftest.$ac_ext
23155 cat >>conftest.$ac_ext <<_ACEOF
23156 /* end confdefs.h.  */
23157
23158 /* pthread test headers */
23159 #include <pthread.h>
23160 #if HAVE_PTHREADS < 7
23161 #include <errno.h>
23162 #endif
23163 #ifndef NULL
23164 #define NULL (void*)0
23165 #endif
23166
23167 static void *task(p)
23168         void *p;
23169 {
23170         return (void *) (p == NULL);
23171 }
23172
23173
23174 int main(argc, argv)
23175         int argc;
23176         char **argv;
23177 {
23178
23179         /* pthread test function */
23180 #ifndef PTHREAD_CREATE_DETACHED
23181 #define PTHREAD_CREATE_DETACHED 1
23182 #endif
23183         pthread_t t;
23184         int status;
23185         int detach = PTHREAD_CREATE_DETACHED;
23186
23187 #if HAVE_PTHREADS > 4
23188         /* Final pthreads */
23189         pthread_attr_t attr;
23190
23191         status = pthread_attr_init(&attr);
23192         if( status ) return status;
23193
23194 #if HAVE_PTHREADS < 7
23195         status = pthread_attr_setdetachstate(&attr, &detach);
23196         if( status < 0 ) status = errno;
23197 #else
23198         status = pthread_attr_setdetachstate(&attr, detach);
23199 #endif
23200         if( status ) return status;
23201         status = pthread_create( &t, &attr, task, NULL );
23202 #if HAVE_PTHREADS < 7
23203         if( status < 0 ) status = errno;
23204 #endif
23205         if( status ) return status;
23206 #else
23207         /* Draft 4 pthreads */
23208         status = pthread_create( &t, pthread_attr_default, task, NULL );
23209         if( status ) return errno;
23210
23211         /* give thread a chance to complete */
23212         /* it should remain joinable and hence detachable */
23213         sleep( 1 );
23214
23215         status = pthread_detach( &t );
23216         if( status ) return errno;
23217 #endif
23218
23219 #ifdef HAVE_LINUX_THREADS
23220         pthread_kill_other_threads_np();
23221 #endif
23222
23223         return 0;
23224
23225 }
23226
23227 _ACEOF
23228 rm -f conftest$ac_exeext
23229 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23230   (eval $ac_link) 2>&5
23231   ac_status=$?
23232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23233   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23235   (eval $ac_try) 2>&5
23236   ac_status=$?
23237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23238   (exit $ac_status); }; }; then
23239   ol_cv_pthread_lpthreads_lexc=yes
23240 else
23241   echo "$as_me: program exited with status $ac_status" >&5
23242 echo "$as_me: failed program was:" >&5
23243 sed 's/^/| /' conftest.$ac_ext >&5
23244
23245 ( exit $ac_status )
23246 ol_cv_pthread_lpthreads_lexc=no
23247 fi
23248 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23249 fi
23250
23251                 # restore the LIBS
23252                 LIBS="$ol_LIBS"
23253
23254 fi
23255 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
23256 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
23257
23258         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
23259                 ol_link_pthreads="-lpthreads -lexc"
23260                 ol_link_threads=posix
23261         fi
23262 fi
23263
23264
23265                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
23266 if test "$ol_link_threads" = no ; then
23267         # try -lpthreads
23268         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
23269 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
23270 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
23271   echo $ECHO_N "(cached) $ECHO_C" >&6
23272 else
23273
23274                 # save the flags
23275                 ol_LIBS="$LIBS"
23276                 LIBS="-lpthreads $LIBS"
23277
23278                 if test "$cross_compiling" = yes; then
23279   cat >conftest.$ac_ext <<_ACEOF
23280 /* confdefs.h.  */
23281 _ACEOF
23282 cat confdefs.h >>conftest.$ac_ext
23283 cat >>conftest.$ac_ext <<_ACEOF
23284 /* end confdefs.h.  */
23285
23286 /* pthread test headers */
23287 #include <pthread.h>
23288 #if HAVE_PTHREADS < 7
23289 #include <errno.h>
23290 #endif
23291 #ifndef NULL
23292 #define NULL (void*)0
23293 #endif
23294
23295 static void *task(p)
23296         void *p;
23297 {
23298         return (void *) (p == NULL);
23299 }
23300
23301 int
23302 main ()
23303 {
23304
23305         /* pthread test function */
23306 #ifndef PTHREAD_CREATE_DETACHED
23307 #define PTHREAD_CREATE_DETACHED 1
23308 #endif
23309         pthread_t t;
23310         int status;
23311         int detach = PTHREAD_CREATE_DETACHED;
23312
23313 #if HAVE_PTHREADS > 4
23314         /* Final pthreads */
23315         pthread_attr_t attr;
23316
23317         status = pthread_attr_init(&attr);
23318         if( status ) return status;
23319
23320 #if HAVE_PTHREADS < 7
23321         status = pthread_attr_setdetachstate(&attr, &detach);
23322         if( status < 0 ) status = errno;
23323 #else
23324         status = pthread_attr_setdetachstate(&attr, detach);
23325 #endif
23326         if( status ) return status;
23327         status = pthread_create( &t, &attr, task, NULL );
23328 #if HAVE_PTHREADS < 7
23329         if( status < 0 ) status = errno;
23330 #endif
23331         if( status ) return status;
23332 #else
23333         /* Draft 4 pthreads */
23334         status = pthread_create( &t, pthread_attr_default, task, NULL );
23335         if( status ) return errno;
23336
23337         /* give thread a chance to complete */
23338         /* it should remain joinable and hence detachable */
23339         sleep( 1 );
23340
23341         status = pthread_detach( &t );
23342         if( status ) return errno;
23343 #endif
23344
23345 #ifdef HAVE_LINUX_THREADS
23346         pthread_kill_other_threads_np();
23347 #endif
23348
23349         return 0;
23350
23351   ;
23352   return 0;
23353 }
23354 _ACEOF
23355 rm -f conftest.$ac_objext conftest$ac_exeext
23356 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23357   (eval $ac_link) 2>conftest.er1
23358   ac_status=$?
23359   grep -v '^ *+' conftest.er1 >conftest.err
23360   rm -f conftest.er1
23361   cat conftest.err >&5
23362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23363   (exit $ac_status); } &&
23364          { ac_try='test -z "$ac_c_werror_flag"
23365                          || test ! -s conftest.err'
23366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23367   (eval $ac_try) 2>&5
23368   ac_status=$?
23369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23370   (exit $ac_status); }; } &&
23371          { ac_try='test -s conftest$ac_exeext'
23372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23373   (eval $ac_try) 2>&5
23374   ac_status=$?
23375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23376   (exit $ac_status); }; }; then
23377   ol_cv_pthread_lib_lpthreads=yes
23378 else
23379   echo "$as_me: failed program was:" >&5
23380 sed 's/^/| /' conftest.$ac_ext >&5
23381
23382 ol_cv_pthread_lib_lpthreads=no
23383 fi
23384 rm -f conftest.err conftest.$ac_objext \
23385       conftest$ac_exeext conftest.$ac_ext
23386 else
23387   cat >conftest.$ac_ext <<_ACEOF
23388 /* confdefs.h.  */
23389 _ACEOF
23390 cat confdefs.h >>conftest.$ac_ext
23391 cat >>conftest.$ac_ext <<_ACEOF
23392 /* end confdefs.h.  */
23393
23394 /* pthread test headers */
23395 #include <pthread.h>
23396 #if HAVE_PTHREADS < 7
23397 #include <errno.h>
23398 #endif
23399 #ifndef NULL
23400 #define NULL (void*)0
23401 #endif
23402
23403 static void *task(p)
23404         void *p;
23405 {
23406         return (void *) (p == NULL);
23407 }
23408
23409
23410 int main(argc, argv)
23411         int argc;
23412         char **argv;
23413 {
23414
23415         /* pthread test function */
23416 #ifndef PTHREAD_CREATE_DETACHED
23417 #define PTHREAD_CREATE_DETACHED 1
23418 #endif
23419         pthread_t t;
23420         int status;
23421         int detach = PTHREAD_CREATE_DETACHED;
23422
23423 #if HAVE_PTHREADS > 4
23424         /* Final pthreads */
23425         pthread_attr_t attr;
23426
23427         status = pthread_attr_init(&attr);
23428         if( status ) return status;
23429
23430 #if HAVE_PTHREADS < 7
23431         status = pthread_attr_setdetachstate(&attr, &detach);
23432         if( status < 0 ) status = errno;
23433 #else
23434         status = pthread_attr_setdetachstate(&attr, detach);
23435 #endif
23436         if( status ) return status;
23437         status = pthread_create( &t, &attr, task, NULL );
23438 #if HAVE_PTHREADS < 7
23439         if( status < 0 ) status = errno;
23440 #endif
23441         if( status ) return status;
23442 #else
23443         /* Draft 4 pthreads */
23444         status = pthread_create( &t, pthread_attr_default, task, NULL );
23445         if( status ) return errno;
23446
23447         /* give thread a chance to complete */
23448         /* it should remain joinable and hence detachable */
23449         sleep( 1 );
23450
23451         status = pthread_detach( &t );
23452         if( status ) return errno;
23453 #endif
23454
23455 #ifdef HAVE_LINUX_THREADS
23456         pthread_kill_other_threads_np();
23457 #endif
23458
23459         return 0;
23460
23461 }
23462
23463 _ACEOF
23464 rm -f conftest$ac_exeext
23465 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23466   (eval $ac_link) 2>&5
23467   ac_status=$?
23468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23469   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23471   (eval $ac_try) 2>&5
23472   ac_status=$?
23473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23474   (exit $ac_status); }; }; then
23475   ol_cv_pthread_lib_lpthreads=yes
23476 else
23477   echo "$as_me: program exited with status $ac_status" >&5
23478 echo "$as_me: failed program was:" >&5
23479 sed 's/^/| /' conftest.$ac_ext >&5
23480
23481 ( exit $ac_status )
23482 ol_cv_pthread_lib_lpthreads=no
23483 fi
23484 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23485 fi
23486
23487                 # restore the LIBS
23488                 LIBS="$ol_LIBS"
23489
23490 fi
23491 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
23492 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
23493
23494         if test $ol_cv_pthread_lib_lpthreads = yes ; then
23495                 ol_link_pthreads="-lpthreads"
23496                 ol_link_threads=posix
23497         fi
23498 fi
23499
23500
23501                 if test $ol_link_threads != no ; then
23502                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
23503
23504                                                 save_CPPFLAGS="$CPPFLAGS"
23505                         save_LIBS="$LIBS"
23506                         LIBS="$LTHREAD_LIBS $LIBS"
23507
23508
23509
23510
23511 for ac_func in sched_yield pthread_yield thr_yield
23512 do
23513 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23514 echo "$as_me:$LINENO: checking for $ac_func" >&5
23515 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23516 if eval "test \"\${$as_ac_var+set}\" = set"; then
23517   echo $ECHO_N "(cached) $ECHO_C" >&6
23518 else
23519   cat >conftest.$ac_ext <<_ACEOF
23520 /* confdefs.h.  */
23521 _ACEOF
23522 cat confdefs.h >>conftest.$ac_ext
23523 cat >>conftest.$ac_ext <<_ACEOF
23524 /* end confdefs.h.  */
23525 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23526    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23527 #define $ac_func innocuous_$ac_func
23528
23529 /* System header to define __stub macros and hopefully few prototypes,
23530     which can conflict with char $ac_func (); below.
23531     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23532     <limits.h> exists even on freestanding compilers.  */
23533
23534 #ifdef __STDC__
23535 # include <limits.h>
23536 #else
23537 # include <assert.h>
23538 #endif
23539
23540 #undef $ac_func
23541
23542 /* Override any gcc2 internal prototype to avoid an error.  */
23543 #ifdef __cplusplus
23544 extern "C"
23545 {
23546 #endif
23547 /* We use char because int might match the return type of a gcc2
23548    builtin and then its argument prototype would still apply.  */
23549 char $ac_func ();
23550 /* The GNU C library defines this for functions which it implements
23551     to always fail with ENOSYS.  Some functions are actually named
23552     something starting with __ and the normal name is an alias.  */
23553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23554 choke me
23555 #else
23556 char (*f) () = $ac_func;
23557 #endif
23558 #ifdef __cplusplus
23559 }
23560 #endif
23561
23562 int
23563 main ()
23564 {
23565 return f != $ac_func;
23566   ;
23567   return 0;
23568 }
23569 _ACEOF
23570 rm -f conftest.$ac_objext conftest$ac_exeext
23571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23572   (eval $ac_link) 2>conftest.er1
23573   ac_status=$?
23574   grep -v '^ *+' conftest.er1 >conftest.err
23575   rm -f conftest.er1
23576   cat conftest.err >&5
23577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23578   (exit $ac_status); } &&
23579          { ac_try='test -z "$ac_c_werror_flag"
23580                          || test ! -s conftest.err'
23581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23582   (eval $ac_try) 2>&5
23583   ac_status=$?
23584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23585   (exit $ac_status); }; } &&
23586          { ac_try='test -s conftest$ac_exeext'
23587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23588   (eval $ac_try) 2>&5
23589   ac_status=$?
23590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23591   (exit $ac_status); }; }; then
23592   eval "$as_ac_var=yes"
23593 else
23594   echo "$as_me: failed program was:" >&5
23595 sed 's/^/| /' conftest.$ac_ext >&5
23596
23597 eval "$as_ac_var=no"
23598 fi
23599 rm -f conftest.err conftest.$ac_objext \
23600       conftest$ac_exeext conftest.$ac_ext
23601 fi
23602 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
23603 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
23604 if test `eval echo '${'$as_ac_var'}'` = yes; then
23605   cat >>confdefs.h <<_ACEOF
23606 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23607 _ACEOF
23608
23609 fi
23610 done
23611
23612
23613                         if test $ac_cv_func_sched_yield = no &&
23614                            test $ac_cv_func_pthread_yield = no &&
23615                            test $ac_cv_func_thr_yield = no ; then
23616                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
23617 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
23618 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
23619   echo $ECHO_N "(cached) $ECHO_C" >&6
23620 else
23621   ac_check_lib_save_LIBS=$LIBS
23622 LIBS="-lrt  $LIBS"
23623 cat >conftest.$ac_ext <<_ACEOF
23624 /* confdefs.h.  */
23625 _ACEOF
23626 cat confdefs.h >>conftest.$ac_ext
23627 cat >>conftest.$ac_ext <<_ACEOF
23628 /* end confdefs.h.  */
23629
23630 /* Override any gcc2 internal prototype to avoid an error.  */
23631 #ifdef __cplusplus
23632 extern "C"
23633 #endif
23634 /* We use char because int might match the return type of a gcc2
23635    builtin and then its argument prototype would still apply.  */
23636 char sched_yield ();
23637 int
23638 main ()
23639 {
23640 sched_yield ();
23641   ;
23642   return 0;
23643 }
23644 _ACEOF
23645 rm -f conftest.$ac_objext conftest$ac_exeext
23646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23647   (eval $ac_link) 2>conftest.er1
23648   ac_status=$?
23649   grep -v '^ *+' conftest.er1 >conftest.err
23650   rm -f conftest.er1
23651   cat conftest.err >&5
23652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23653   (exit $ac_status); } &&
23654          { ac_try='test -z "$ac_c_werror_flag"
23655                          || test ! -s conftest.err'
23656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23657   (eval $ac_try) 2>&5
23658   ac_status=$?
23659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23660   (exit $ac_status); }; } &&
23661          { ac_try='test -s conftest$ac_exeext'
23662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23663   (eval $ac_try) 2>&5
23664   ac_status=$?
23665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23666   (exit $ac_status); }; }; then
23667   ac_cv_lib_rt_sched_yield=yes
23668 else
23669   echo "$as_me: failed program was:" >&5
23670 sed 's/^/| /' conftest.$ac_ext >&5
23671
23672 ac_cv_lib_rt_sched_yield=no
23673 fi
23674 rm -f conftest.err conftest.$ac_objext \
23675       conftest$ac_exeext conftest.$ac_ext
23676 LIBS=$ac_check_lib_save_LIBS
23677 fi
23678 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
23679 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
23680 if test $ac_cv_lib_rt_sched_yield = yes; then
23681   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
23682
23683 cat >>confdefs.h <<\_ACEOF
23684 #define HAVE_SCHED_YIELD 1
23685 _ACEOF
23686
23687                                         ac_cv_func_sched_yield=yes
23688 else
23689   ac_cv_func_sched_yield=no
23690 fi
23691
23692                         fi
23693                         if test $ac_cv_func_sched_yield = no &&
23694                            test $ac_cv_func_pthread_yield = no &&
23695                            test "$ac_cv_func_thr_yield" = no ; then
23696                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
23697 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
23698                         fi
23699
23700
23701 for ac_func in pthread_kill
23702 do
23703 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23704 echo "$as_me:$LINENO: checking for $ac_func" >&5
23705 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23706 if eval "test \"\${$as_ac_var+set}\" = set"; then
23707   echo $ECHO_N "(cached) $ECHO_C" >&6
23708 else
23709   cat >conftest.$ac_ext <<_ACEOF
23710 /* confdefs.h.  */
23711 _ACEOF
23712 cat confdefs.h >>conftest.$ac_ext
23713 cat >>conftest.$ac_ext <<_ACEOF
23714 /* end confdefs.h.  */
23715 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23716    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23717 #define $ac_func innocuous_$ac_func
23718
23719 /* System header to define __stub macros and hopefully few prototypes,
23720     which can conflict with char $ac_func (); below.
23721     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23722     <limits.h> exists even on freestanding compilers.  */
23723
23724 #ifdef __STDC__
23725 # include <limits.h>
23726 #else
23727 # include <assert.h>
23728 #endif
23729
23730 #undef $ac_func
23731
23732 /* Override any gcc2 internal prototype to avoid an error.  */
23733 #ifdef __cplusplus
23734 extern "C"
23735 {
23736 #endif
23737 /* We use char because int might match the return type of a gcc2
23738    builtin and then its argument prototype would still apply.  */
23739 char $ac_func ();
23740 /* The GNU C library defines this for functions which it implements
23741     to always fail with ENOSYS.  Some functions are actually named
23742     something starting with __ and the normal name is an alias.  */
23743 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23744 choke me
23745 #else
23746 char (*f) () = $ac_func;
23747 #endif
23748 #ifdef __cplusplus
23749 }
23750 #endif
23751
23752 int
23753 main ()
23754 {
23755 return f != $ac_func;
23756   ;
23757   return 0;
23758 }
23759 _ACEOF
23760 rm -f conftest.$ac_objext conftest$ac_exeext
23761 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23762   (eval $ac_link) 2>conftest.er1
23763   ac_status=$?
23764   grep -v '^ *+' conftest.er1 >conftest.err
23765   rm -f conftest.er1
23766   cat conftest.err >&5
23767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23768   (exit $ac_status); } &&
23769          { ac_try='test -z "$ac_c_werror_flag"
23770                          || test ! -s conftest.err'
23771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23772   (eval $ac_try) 2>&5
23773   ac_status=$?
23774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23775   (exit $ac_status); }; } &&
23776          { ac_try='test -s conftest$ac_exeext'
23777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23778   (eval $ac_try) 2>&5
23779   ac_status=$?
23780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23781   (exit $ac_status); }; }; then
23782   eval "$as_ac_var=yes"
23783 else
23784   echo "$as_me: failed program was:" >&5
23785 sed 's/^/| /' conftest.$ac_ext >&5
23786
23787 eval "$as_ac_var=no"
23788 fi
23789 rm -f conftest.err conftest.$ac_objext \
23790       conftest$ac_exeext conftest.$ac_ext
23791 fi
23792 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
23793 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
23794 if test `eval echo '${'$as_ac_var'}'` = yes; then
23795   cat >>confdefs.h <<_ACEOF
23796 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23797 _ACEOF
23798
23799 fi
23800 done
23801
23802
23803                                                                         echo "$as_me:$LINENO: checking for pthread_rwlock_destroy with <pthread.h>" >&5
23804 echo $ECHO_N "checking for pthread_rwlock_destroy with <pthread.h>... $ECHO_C" >&6
23805 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then
23806   echo $ECHO_N "(cached) $ECHO_C" >&6
23807 else
23808
23809                                                                 cat >conftest.$ac_ext <<_ACEOF
23810 /* confdefs.h.  */
23811 _ACEOF
23812 cat confdefs.h >>conftest.$ac_ext
23813 cat >>conftest.$ac_ext <<_ACEOF
23814 /* end confdefs.h.  */
23815
23816 #include <pthread.h>
23817 pthread_rwlock_t rwlock;
23818
23819 int
23820 main ()
23821 {
23822 pthread_rwlock_destroy(&rwlock);
23823   ;
23824   return 0;
23825 }
23826 _ACEOF
23827 rm -f conftest.$ac_objext conftest$ac_exeext
23828 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23829   (eval $ac_link) 2>conftest.er1
23830   ac_status=$?
23831   grep -v '^ *+' conftest.er1 >conftest.err
23832   rm -f conftest.er1
23833   cat conftest.err >&5
23834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23835   (exit $ac_status); } &&
23836          { ac_try='test -z "$ac_c_werror_flag"
23837                          || test ! -s conftest.err'
23838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23839   (eval $ac_try) 2>&5
23840   ac_status=$?
23841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23842   (exit $ac_status); }; } &&
23843          { ac_try='test -s conftest$ac_exeext'
23844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23845   (eval $ac_try) 2>&5
23846   ac_status=$?
23847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23848   (exit $ac_status); }; }; then
23849   ol_cv_func_pthread_rwlock_destroy=yes
23850 else
23851   echo "$as_me: failed program was:" >&5
23852 sed 's/^/| /' conftest.$ac_ext >&5
23853
23854 ol_cv_func_pthread_rwlock_destroy=no
23855 fi
23856 rm -f conftest.err conftest.$ac_objext \
23857       conftest$ac_exeext conftest.$ac_ext
23858
23859 fi
23860 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_rwlock_destroy" >&5
23861 echo "${ECHO_T}$ol_cv_func_pthread_rwlock_destroy" >&6
23862                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
23863
23864 cat >>confdefs.h <<\_ACEOF
23865 #define HAVE_PTHREAD_RWLOCK_DESTROY 1
23866 _ACEOF
23867
23868                         fi
23869
23870                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
23871 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
23872 if test "${ol_cv_func_pthread_detach+set}" = set; then
23873   echo $ECHO_N "(cached) $ECHO_C" >&6
23874 else
23875
23876                                                                 cat >conftest.$ac_ext <<_ACEOF
23877 /* confdefs.h.  */
23878 _ACEOF
23879 cat confdefs.h >>conftest.$ac_ext
23880 cat >>conftest.$ac_ext <<_ACEOF
23881 /* end confdefs.h.  */
23882
23883 #include <pthread.h>
23884 #ifndef NULL
23885 #define NULL (void*)0
23886 #endif
23887
23888 int
23889 main ()
23890 {
23891 pthread_detach(NULL);
23892   ;
23893   return 0;
23894 }
23895 _ACEOF
23896 rm -f conftest.$ac_objext conftest$ac_exeext
23897 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23898   (eval $ac_link) 2>conftest.er1
23899   ac_status=$?
23900   grep -v '^ *+' conftest.er1 >conftest.err
23901   rm -f conftest.er1
23902   cat conftest.err >&5
23903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23904   (exit $ac_status); } &&
23905          { ac_try='test -z "$ac_c_werror_flag"
23906                          || test ! -s conftest.err'
23907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23908   (eval $ac_try) 2>&5
23909   ac_status=$?
23910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23911   (exit $ac_status); }; } &&
23912          { ac_try='test -s conftest$ac_exeext'
23913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23914   (eval $ac_try) 2>&5
23915   ac_status=$?
23916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23917   (exit $ac_status); }; }; then
23918   ol_cv_func_pthread_detach=yes
23919 else
23920   echo "$as_me: failed program was:" >&5
23921 sed 's/^/| /' conftest.$ac_ext >&5
23922
23923 ol_cv_func_pthread_detach=no
23924 fi
23925 rm -f conftest.err conftest.$ac_objext \
23926       conftest$ac_exeext conftest.$ac_ext
23927
23928 fi
23929 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
23930 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
23931
23932                         if test $ol_cv_func_pthread_detach = no ; then
23933                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
23934 echo "$as_me: error: could not locate pthread_detach()" >&2;}
23935    { (exit 1); exit 1; }; }
23936                         fi
23937
23938
23939 cat >>confdefs.h <<\_ACEOF
23940 #define HAVE_PTHREAD_DETACH 1
23941 _ACEOF
23942
23943
23944
23945
23946
23947
23948 for ac_func in \
23949                                 pthread_setconcurrency \
23950                                 pthread_getconcurrency \
23951                                 thr_setconcurrency \
23952                                 thr_getconcurrency \
23953
23954 do
23955 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23956 echo "$as_me:$LINENO: checking for $ac_func" >&5
23957 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23958 if eval "test \"\${$as_ac_var+set}\" = set"; then
23959   echo $ECHO_N "(cached) $ECHO_C" >&6
23960 else
23961   cat >conftest.$ac_ext <<_ACEOF
23962 /* confdefs.h.  */
23963 _ACEOF
23964 cat confdefs.h >>conftest.$ac_ext
23965 cat >>conftest.$ac_ext <<_ACEOF
23966 /* end confdefs.h.  */
23967 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23968    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23969 #define $ac_func innocuous_$ac_func
23970
23971 /* System header to define __stub macros and hopefully few prototypes,
23972     which can conflict with char $ac_func (); below.
23973     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23974     <limits.h> exists even on freestanding compilers.  */
23975
23976 #ifdef __STDC__
23977 # include <limits.h>
23978 #else
23979 # include <assert.h>
23980 #endif
23981
23982 #undef $ac_func
23983
23984 /* Override any gcc2 internal prototype to avoid an error.  */
23985 #ifdef __cplusplus
23986 extern "C"
23987 {
23988 #endif
23989 /* We use char because int might match the return type of a gcc2
23990    builtin and then its argument prototype would still apply.  */
23991 char $ac_func ();
23992 /* The GNU C library defines this for functions which it implements
23993     to always fail with ENOSYS.  Some functions are actually named
23994     something starting with __ and the normal name is an alias.  */
23995 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23996 choke me
23997 #else
23998 char (*f) () = $ac_func;
23999 #endif
24000 #ifdef __cplusplus
24001 }
24002 #endif
24003
24004 int
24005 main ()
24006 {
24007 return f != $ac_func;
24008   ;
24009   return 0;
24010 }
24011 _ACEOF
24012 rm -f conftest.$ac_objext conftest$ac_exeext
24013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24014   (eval $ac_link) 2>conftest.er1
24015   ac_status=$?
24016   grep -v '^ *+' conftest.er1 >conftest.err
24017   rm -f conftest.er1
24018   cat conftest.err >&5
24019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24020   (exit $ac_status); } &&
24021          { ac_try='test -z "$ac_c_werror_flag"
24022                          || test ! -s conftest.err'
24023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24024   (eval $ac_try) 2>&5
24025   ac_status=$?
24026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24027   (exit $ac_status); }; } &&
24028          { ac_try='test -s conftest$ac_exeext'
24029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24030   (eval $ac_try) 2>&5
24031   ac_status=$?
24032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24033   (exit $ac_status); }; }; then
24034   eval "$as_ac_var=yes"
24035 else
24036   echo "$as_me: failed program was:" >&5
24037 sed 's/^/| /' conftest.$ac_ext >&5
24038
24039 eval "$as_ac_var=no"
24040 fi
24041 rm -f conftest.err conftest.$ac_objext \
24042       conftest$ac_exeext conftest.$ac_ext
24043 fi
24044 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24045 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24046 if test `eval echo '${'$as_ac_var'}'` = yes; then
24047   cat >>confdefs.h <<_ACEOF
24048 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24049 _ACEOF
24050
24051 fi
24052 done
24053
24054
24055
24056
24057 for ac_func in pthread_kill_other_threads_np
24058 do
24059 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24060 echo "$as_me:$LINENO: checking for $ac_func" >&5
24061 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24062 if eval "test \"\${$as_ac_var+set}\" = set"; then
24063   echo $ECHO_N "(cached) $ECHO_C" >&6
24064 else
24065   cat >conftest.$ac_ext <<_ACEOF
24066 /* confdefs.h.  */
24067 _ACEOF
24068 cat confdefs.h >>conftest.$ac_ext
24069 cat >>conftest.$ac_ext <<_ACEOF
24070 /* end confdefs.h.  */
24071 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24072    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24073 #define $ac_func innocuous_$ac_func
24074
24075 /* System header to define __stub macros and hopefully few prototypes,
24076     which can conflict with char $ac_func (); below.
24077     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24078     <limits.h> exists even on freestanding compilers.  */
24079
24080 #ifdef __STDC__
24081 # include <limits.h>
24082 #else
24083 # include <assert.h>
24084 #endif
24085
24086 #undef $ac_func
24087
24088 /* Override any gcc2 internal prototype to avoid an error.  */
24089 #ifdef __cplusplus
24090 extern "C"
24091 {
24092 #endif
24093 /* We use char because int might match the return type of a gcc2
24094    builtin and then its argument prototype would still apply.  */
24095 char $ac_func ();
24096 /* The GNU C library defines this for functions which it implements
24097     to always fail with ENOSYS.  Some functions are actually named
24098     something starting with __ and the normal name is an alias.  */
24099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24100 choke me
24101 #else
24102 char (*f) () = $ac_func;
24103 #endif
24104 #ifdef __cplusplus
24105 }
24106 #endif
24107
24108 int
24109 main ()
24110 {
24111 return f != $ac_func;
24112   ;
24113   return 0;
24114 }
24115 _ACEOF
24116 rm -f conftest.$ac_objext conftest$ac_exeext
24117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24118   (eval $ac_link) 2>conftest.er1
24119   ac_status=$?
24120   grep -v '^ *+' conftest.er1 >conftest.err
24121   rm -f conftest.er1
24122   cat conftest.err >&5
24123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24124   (exit $ac_status); } &&
24125          { ac_try='test -z "$ac_c_werror_flag"
24126                          || test ! -s conftest.err'
24127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24128   (eval $ac_try) 2>&5
24129   ac_status=$?
24130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24131   (exit $ac_status); }; } &&
24132          { ac_try='test -s conftest$ac_exeext'
24133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24134   (eval $ac_try) 2>&5
24135   ac_status=$?
24136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24137   (exit $ac_status); }; }; then
24138   eval "$as_ac_var=yes"
24139 else
24140   echo "$as_me: failed program was:" >&5
24141 sed 's/^/| /' conftest.$ac_ext >&5
24142
24143 eval "$as_ac_var=no"
24144 fi
24145 rm -f conftest.err conftest.$ac_objext \
24146       conftest$ac_exeext conftest.$ac_ext
24147 fi
24148 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
24149 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24150 if test `eval echo '${'$as_ac_var'}'` = yes; then
24151   cat >>confdefs.h <<_ACEOF
24152 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24153 _ACEOF
24154
24155 fi
24156 done
24157
24158         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
24159 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
24160 if test "${ol_cv_sys_linux_threads+set}" = set; then
24161   echo $ECHO_N "(cached) $ECHO_C" >&6
24162 else
24163   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
24164 fi
24165 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
24166 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
24167
24168
24169
24170
24171         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
24172 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
24173 if test "${ol_cv_linux_threads+set}" = set; then
24174   echo $ECHO_N "(cached) $ECHO_C" >&6
24175 else
24176
24177                 if test $ol_cv_header_linux_threads = yes &&
24178                    test $ol_cv_sys_linux_threads = yes; then
24179                         ol_cv_linux_threads=yes
24180                 elif test $ol_cv_header_linux_threads = no &&
24181                      test $ol_cv_sys_linux_threads = no; then
24182                         ol_cv_linux_threads=no
24183                 else
24184                         ol_cv_linux_threads=error
24185                 fi
24186
24187 fi
24188 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
24189 echo "${ECHO_T}$ol_cv_linux_threads" >&6
24190
24191
24192                         if test $ol_cv_linux_threads = error; then
24193                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
24194 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
24195    { (exit 1); exit 1; }; };
24196                         fi
24197
24198                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
24199 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
24200 if test "${ol_cv_pthread_create_works+set}" = set; then
24201   echo $ECHO_N "(cached) $ECHO_C" >&6
24202 else
24203
24204                         if test "$cross_compiling" = yes; then
24205                                 ol_cv_pthread_create_works=yes
24206 else
24207   cat >conftest.$ac_ext <<_ACEOF
24208 /* confdefs.h.  */
24209 _ACEOF
24210 cat confdefs.h >>conftest.$ac_ext
24211 cat >>conftest.$ac_ext <<_ACEOF
24212 /* end confdefs.h.  */
24213
24214 /* pthread test headers */
24215 #include <pthread.h>
24216 #if HAVE_PTHREADS < 7
24217 #include <errno.h>
24218 #endif
24219 #ifndef NULL
24220 #define NULL (void*)0
24221 #endif
24222
24223 static void *task(p)
24224         void *p;
24225 {
24226         return (void *) (p == NULL);
24227 }
24228
24229
24230 int main(argc, argv)
24231         int argc;
24232         char **argv;
24233 {
24234
24235         /* pthread test function */
24236 #ifndef PTHREAD_CREATE_DETACHED
24237 #define PTHREAD_CREATE_DETACHED 1
24238 #endif
24239         pthread_t t;
24240         int status;
24241         int detach = PTHREAD_CREATE_DETACHED;
24242
24243 #if HAVE_PTHREADS > 4
24244         /* Final pthreads */
24245         pthread_attr_t attr;
24246
24247         status = pthread_attr_init(&attr);
24248         if( status ) return status;
24249
24250 #if HAVE_PTHREADS < 7
24251         status = pthread_attr_setdetachstate(&attr, &detach);
24252         if( status < 0 ) status = errno;
24253 #else
24254         status = pthread_attr_setdetachstate(&attr, detach);
24255 #endif
24256         if( status ) return status;
24257         status = pthread_create( &t, &attr, task, NULL );
24258 #if HAVE_PTHREADS < 7
24259         if( status < 0 ) status = errno;
24260 #endif
24261         if( status ) return status;
24262 #else
24263         /* Draft 4 pthreads */
24264         status = pthread_create( &t, pthread_attr_default, task, NULL );
24265         if( status ) return errno;
24266
24267         /* give thread a chance to complete */
24268         /* it should remain joinable and hence detachable */
24269         sleep( 1 );
24270
24271         status = pthread_detach( &t );
24272         if( status ) return errno;
24273 #endif
24274
24275 #ifdef HAVE_LINUX_THREADS
24276         pthread_kill_other_threads_np();
24277 #endif
24278
24279         return 0;
24280
24281 }
24282
24283 _ACEOF
24284 rm -f conftest$ac_exeext
24285 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24286   (eval $ac_link) 2>&5
24287   ac_status=$?
24288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24289   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24291   (eval $ac_try) 2>&5
24292   ac_status=$?
24293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24294   (exit $ac_status); }; }; then
24295   ol_cv_pthread_create_works=yes
24296 else
24297   echo "$as_me: program exited with status $ac_status" >&5
24298 echo "$as_me: failed program was:" >&5
24299 sed 's/^/| /' conftest.$ac_ext >&5
24300
24301 ( exit $ac_status )
24302 ol_cv_pthread_create_works=no
24303 fi
24304 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24305 fi
24306 fi
24307 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
24308 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
24309
24310                         if test $ol_cv_pthread_create_works = no ; then
24311                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
24312 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
24313    { (exit 1); exit 1; }; }
24314                         fi
24315
24316                         ol_replace_broken_yield=no
24317
24318                         if test $ol_replace_broken_yield = yes ; then
24319
24320 cat >>confdefs.h <<\_ACEOF
24321 #define REPLACE_BROKEN_YIELD 1
24322 _ACEOF
24323
24324                         fi
24325
24326                                                 if test $ol_with_yielding_select = auto ; then
24327                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
24328 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
24329 if test "${ol_cv_pthread_select_yields+set}" = set; then
24330   echo $ECHO_N "(cached) $ECHO_C" >&6
24331 else
24332
24333                                 if test "$cross_compiling" = yes; then
24334   ol_cv_pthread_select_yields=cross
24335 else
24336   cat >conftest.$ac_ext <<_ACEOF
24337 /* confdefs.h.  */
24338 _ACEOF
24339 cat confdefs.h >>conftest.$ac_ext
24340 cat >>conftest.$ac_ext <<_ACEOF
24341 /* end confdefs.h.  */
24342
24343 #include <sys/types.h>
24344 #include <sys/time.h>
24345 #include <unistd.h>
24346 #include <pthread.h>
24347 #ifndef NULL
24348 #define NULL (void*) 0
24349 #endif
24350
24351 static int fildes[2];
24352
24353 static void *task(p)
24354         void *p;
24355 {
24356         int i;
24357         struct timeval tv;
24358
24359         fd_set rfds;
24360
24361         tv.tv_sec=10;
24362         tv.tv_usec=0;
24363
24364         FD_ZERO(&rfds);
24365         FD_SET(fildes[0], &rfds);
24366
24367         /* we're not interested in any fds */
24368         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
24369
24370         if(i < 0) {
24371                 perror("select");
24372                 exit(10);
24373         }
24374
24375         exit(0); /* if we exit here, the select blocked the whole process */
24376 }
24377
24378 int main(argc, argv)
24379         int argc;
24380         char **argv;
24381 {
24382         pthread_t t;
24383
24384         /* create a pipe to select */
24385         if(pipe(&fildes[0])) {
24386                 perror("select");
24387                 exit(1);
24388         }
24389
24390 #ifdef HAVE_PTHREAD_SETCONCURRENCY
24391         (void) pthread_setconcurrency(2);
24392 #else
24393 #ifdef HAVE_THR_SETCONCURRENCY
24394         /* Set Solaris LWP concurrency to 2 */
24395         thr_setconcurrency(2);
24396 #endif
24397 #endif
24398
24399 #if HAVE_PTHREADS < 6
24400         pthread_create(&t, pthread_attr_default, task, NULL);
24401 #else
24402         pthread_create(&t, NULL, task, NULL);
24403 #endif
24404
24405         /* make sure task runs first */
24406 #ifdef HAVE_THR_YIELD
24407         thr_yield();
24408 #elif defined( HAVE_SCHED_YIELD )
24409         sched_yield();
24410 #elif defined( HAVE_PTHREAD_YIELD )
24411         pthread_yield();
24412 #endif
24413
24414         exit(2);
24415 }
24416 _ACEOF
24417 rm -f conftest$ac_exeext
24418 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24419   (eval $ac_link) 2>&5
24420   ac_status=$?
24421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24422   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24424   (eval $ac_try) 2>&5
24425   ac_status=$?
24426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24427   (exit $ac_status); }; }; then
24428   ol_cv_pthread_select_yields=no
24429 else
24430   echo "$as_me: program exited with status $ac_status" >&5
24431 echo "$as_me: failed program was:" >&5
24432 sed 's/^/| /' conftest.$ac_ext >&5
24433
24434 ( exit $ac_status )
24435 ol_cv_pthread_select_yields=yes
24436 fi
24437 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24438 fi
24439 fi
24440 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
24441 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
24442
24443                                 if test $ol_cv_pthread_select_yields = cross ; then
24444                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
24445 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
24446    { (exit 1); exit 1; }; }
24447                                 fi
24448
24449                                 if test $ol_cv_pthread_select_yields = yes ; then
24450                                         ol_with_yielding_select=yes
24451                                 fi
24452                         fi
24453
24454                                                 CPPFLAGS="$save_CPPFLAGS"
24455                         LIBS="$save_LIBS"
24456                 else
24457                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
24458 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
24459    { (exit 1); exit 1; }; }
24460                 fi
24461         fi
24462
24463         if test $ol_with_threads = posix ; then
24464                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
24465 echo "$as_me: error: could not locate POSIX Threads" >&2;}
24466    { (exit 1); exit 1; }; }
24467         fi
24468         ;;
24469 esac
24470
24471 case $ol_with_threads in auto | yes | mach)
24472
24473
24474
24475 for ac_header in mach/cthreads.h cthreads.h
24476 do
24477 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24478 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24479   echo "$as_me:$LINENO: checking for $ac_header" >&5
24480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24481 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24482   echo $ECHO_N "(cached) $ECHO_C" >&6
24483 fi
24484 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24485 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24486 else
24487   # Is the header compilable?
24488 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24489 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24490 cat >conftest.$ac_ext <<_ACEOF
24491 /* confdefs.h.  */
24492 _ACEOF
24493 cat confdefs.h >>conftest.$ac_ext
24494 cat >>conftest.$ac_ext <<_ACEOF
24495 /* end confdefs.h.  */
24496 $ac_includes_default
24497 #include <$ac_header>
24498 _ACEOF
24499 rm -f conftest.$ac_objext
24500 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24501   (eval $ac_compile) 2>conftest.er1
24502   ac_status=$?
24503   grep -v '^ *+' conftest.er1 >conftest.err
24504   rm -f conftest.er1
24505   cat conftest.err >&5
24506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24507   (exit $ac_status); } &&
24508          { ac_try='test -z "$ac_c_werror_flag"
24509                          || test ! -s conftest.err'
24510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24511   (eval $ac_try) 2>&5
24512   ac_status=$?
24513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24514   (exit $ac_status); }; } &&
24515          { ac_try='test -s conftest.$ac_objext'
24516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24517   (eval $ac_try) 2>&5
24518   ac_status=$?
24519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24520   (exit $ac_status); }; }; then
24521   ac_header_compiler=yes
24522 else
24523   echo "$as_me: failed program was:" >&5
24524 sed 's/^/| /' conftest.$ac_ext >&5
24525
24526 ac_header_compiler=no
24527 fi
24528 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24529 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24530 echo "${ECHO_T}$ac_header_compiler" >&6
24531
24532 # Is the header present?
24533 echo "$as_me:$LINENO: checking $ac_header presence" >&5
24534 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
24535 cat >conftest.$ac_ext <<_ACEOF
24536 /* confdefs.h.  */
24537 _ACEOF
24538 cat confdefs.h >>conftest.$ac_ext
24539 cat >>conftest.$ac_ext <<_ACEOF
24540 /* end confdefs.h.  */
24541 #include <$ac_header>
24542 _ACEOF
24543 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
24544   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24545   ac_status=$?
24546   grep -v '^ *+' conftest.er1 >conftest.err
24547   rm -f conftest.er1
24548   cat conftest.err >&5
24549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24550   (exit $ac_status); } >/dev/null; then
24551   if test -s conftest.err; then
24552     ac_cpp_err=$ac_c_preproc_warn_flag
24553     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
24554   else
24555     ac_cpp_err=
24556   fi
24557 else
24558   ac_cpp_err=yes
24559 fi
24560 if test -z "$ac_cpp_err"; then
24561   ac_header_preproc=yes
24562 else
24563   echo "$as_me: failed program was:" >&5
24564 sed 's/^/| /' conftest.$ac_ext >&5
24565
24566   ac_header_preproc=no
24567 fi
24568 rm -f conftest.err conftest.$ac_ext
24569 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24570 echo "${ECHO_T}$ac_header_preproc" >&6
24571
24572 # So?  What about this header?
24573 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24574   yes:no: )
24575     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
24576 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
24577     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
24578 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
24579     ac_header_preproc=yes
24580     ;;
24581   no:yes:* )
24582     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
24583 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
24584     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
24585 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
24586     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
24587 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
24588     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
24589 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
24590     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
24591 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
24592     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
24593 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
24594     (
24595       cat <<\_ASBOX
24596 ## --------------------------------------------- ##
24597 ## Report this to <http://www.openldap.org/its/> ##
24598 ## --------------------------------------------- ##
24599 _ASBOX
24600     ) |
24601       sed "s/^/$as_me: WARNING:     /" >&2
24602     ;;
24603 esac
24604 echo "$as_me:$LINENO: checking for $ac_header" >&5
24605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24607   echo $ECHO_N "(cached) $ECHO_C" >&6
24608 else
24609   eval "$as_ac_Header=\$ac_header_preproc"
24610 fi
24611 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24612 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24613
24614 fi
24615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24616   cat >>confdefs.h <<_ACEOF
24617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24618 _ACEOF
24619
24620 fi
24621
24622 done
24623
24624         if test $ac_cv_header_mach_cthreads_h = yes ; then
24625                 ol_with_threads=found
24626
24627                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
24628 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
24629 if test "${ac_cv_func_cthread_fork+set}" = set; then
24630   echo $ECHO_N "(cached) $ECHO_C" >&6
24631 else
24632   cat >conftest.$ac_ext <<_ACEOF
24633 /* confdefs.h.  */
24634 _ACEOF
24635 cat confdefs.h >>conftest.$ac_ext
24636 cat >>conftest.$ac_ext <<_ACEOF
24637 /* end confdefs.h.  */
24638 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
24639    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24640 #define cthread_fork innocuous_cthread_fork
24641
24642 /* System header to define __stub macros and hopefully few prototypes,
24643     which can conflict with char cthread_fork (); below.
24644     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24645     <limits.h> exists even on freestanding compilers.  */
24646
24647 #ifdef __STDC__
24648 # include <limits.h>
24649 #else
24650 # include <assert.h>
24651 #endif
24652
24653 #undef cthread_fork
24654
24655 /* Override any gcc2 internal prototype to avoid an error.  */
24656 #ifdef __cplusplus
24657 extern "C"
24658 {
24659 #endif
24660 /* We use char because int might match the return type of a gcc2
24661    builtin and then its argument prototype would still apply.  */
24662 char cthread_fork ();
24663 /* The GNU C library defines this for functions which it implements
24664     to always fail with ENOSYS.  Some functions are actually named
24665     something starting with __ and the normal name is an alias.  */
24666 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
24667 choke me
24668 #else
24669 char (*f) () = cthread_fork;
24670 #endif
24671 #ifdef __cplusplus
24672 }
24673 #endif
24674
24675 int
24676 main ()
24677 {
24678 return f != cthread_fork;
24679   ;
24680   return 0;
24681 }
24682 _ACEOF
24683 rm -f conftest.$ac_objext conftest$ac_exeext
24684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24685   (eval $ac_link) 2>conftest.er1
24686   ac_status=$?
24687   grep -v '^ *+' conftest.er1 >conftest.err
24688   rm -f conftest.er1
24689   cat conftest.err >&5
24690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24691   (exit $ac_status); } &&
24692          { ac_try='test -z "$ac_c_werror_flag"
24693                          || test ! -s conftest.err'
24694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24695   (eval $ac_try) 2>&5
24696   ac_status=$?
24697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24698   (exit $ac_status); }; } &&
24699          { ac_try='test -s conftest$ac_exeext'
24700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24701   (eval $ac_try) 2>&5
24702   ac_status=$?
24703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24704   (exit $ac_status); }; }; then
24705   ac_cv_func_cthread_fork=yes
24706 else
24707   echo "$as_me: failed program was:" >&5
24708 sed 's/^/| /' conftest.$ac_ext >&5
24709
24710 ac_cv_func_cthread_fork=no
24711 fi
24712 rm -f conftest.err conftest.$ac_objext \
24713       conftest$ac_exeext conftest.$ac_ext
24714 fi
24715 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
24716 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
24717 if test $ac_cv_func_cthread_fork = yes; then
24718   ol_link_threads=yes
24719 fi
24720
24721
24722                 if test $ol_link_threads = no ; then
24723                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
24724 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
24725 if test "${ol_cv_cthread_all_load+set}" = set; then
24726   echo $ECHO_N "(cached) $ECHO_C" >&6
24727 else
24728
24729                                                                 save_LIBS="$LIBS"
24730                                 LIBS="-all_load $LIBS"
24731                                 cat >conftest.$ac_ext <<_ACEOF
24732 /* confdefs.h.  */
24733 _ACEOF
24734 cat confdefs.h >>conftest.$ac_ext
24735 cat >>conftest.$ac_ext <<_ACEOF
24736 /* end confdefs.h.  */
24737 #include <mach/cthreads.h>
24738 int
24739 main ()
24740 {
24741
24742                                         cthread_fork((void *)0, (void *)0);
24743
24744   ;
24745   return 0;
24746 }
24747 _ACEOF
24748 rm -f conftest.$ac_objext conftest$ac_exeext
24749 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24750   (eval $ac_link) 2>conftest.er1
24751   ac_status=$?
24752   grep -v '^ *+' conftest.er1 >conftest.err
24753   rm -f conftest.er1
24754   cat conftest.err >&5
24755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24756   (exit $ac_status); } &&
24757          { ac_try='test -z "$ac_c_werror_flag"
24758                          || test ! -s conftest.err'
24759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24760   (eval $ac_try) 2>&5
24761   ac_status=$?
24762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24763   (exit $ac_status); }; } &&
24764          { ac_try='test -s conftest$ac_exeext'
24765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24766   (eval $ac_try) 2>&5
24767   ac_status=$?
24768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24769   (exit $ac_status); }; }; then
24770   ol_cv_cthread_all_load=yes
24771 else
24772   echo "$as_me: failed program was:" >&5
24773 sed 's/^/| /' conftest.$ac_ext >&5
24774
24775 ol_cv_cthread_all_load=no
24776 fi
24777 rm -f conftest.err conftest.$ac_objext \
24778       conftest$ac_exeext conftest.$ac_ext
24779                                                                 LIBS="$save_LIBS"
24780
24781 fi
24782 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
24783 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
24784
24785                         if test $ol_cv_cthread_all_load = yes ; then
24786                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
24787                                 ol_link_threads=mach
24788                                 ol_with_threads=found
24789                         fi
24790                 fi
24791
24792         elif test $ac_cv_header_cthreads_h = yes ; then
24793
24794                 ol_with_threads=found
24795
24796                                 save_LIBS="$LIBS"
24797                 LIBS="$LIBS -lthreads"
24798                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
24799 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
24800 if test "${ac_cv_func_cthread_fork+set}" = set; then
24801   echo $ECHO_N "(cached) $ECHO_C" >&6
24802 else
24803   cat >conftest.$ac_ext <<_ACEOF
24804 /* confdefs.h.  */
24805 _ACEOF
24806 cat confdefs.h >>conftest.$ac_ext
24807 cat >>conftest.$ac_ext <<_ACEOF
24808 /* end confdefs.h.  */
24809 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
24810    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24811 #define cthread_fork innocuous_cthread_fork
24812
24813 /* System header to define __stub macros and hopefully few prototypes,
24814     which can conflict with char cthread_fork (); below.
24815     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24816     <limits.h> exists even on freestanding compilers.  */
24817
24818 #ifdef __STDC__
24819 # include <limits.h>
24820 #else
24821 # include <assert.h>
24822 #endif
24823
24824 #undef cthread_fork
24825
24826 /* Override any gcc2 internal prototype to avoid an error.  */
24827 #ifdef __cplusplus
24828 extern "C"
24829 {
24830 #endif
24831 /* We use char because int might match the return type of a gcc2
24832    builtin and then its argument prototype would still apply.  */
24833 char cthread_fork ();
24834 /* The GNU C library defines this for functions which it implements
24835     to always fail with ENOSYS.  Some functions are actually named
24836     something starting with __ and the normal name is an alias.  */
24837 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
24838 choke me
24839 #else
24840 char (*f) () = cthread_fork;
24841 #endif
24842 #ifdef __cplusplus
24843 }
24844 #endif
24845
24846 int
24847 main ()
24848 {
24849 return f != cthread_fork;
24850   ;
24851   return 0;
24852 }
24853 _ACEOF
24854 rm -f conftest.$ac_objext conftest$ac_exeext
24855 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24856   (eval $ac_link) 2>conftest.er1
24857   ac_status=$?
24858   grep -v '^ *+' conftest.er1 >conftest.err
24859   rm -f conftest.er1
24860   cat conftest.err >&5
24861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24862   (exit $ac_status); } &&
24863          { ac_try='test -z "$ac_c_werror_flag"
24864                          || test ! -s conftest.err'
24865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24866   (eval $ac_try) 2>&5
24867   ac_status=$?
24868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24869   (exit $ac_status); }; } &&
24870          { ac_try='test -s conftest$ac_exeext'
24871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24872   (eval $ac_try) 2>&5
24873   ac_status=$?
24874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24875   (exit $ac_status); }; }; then
24876   ac_cv_func_cthread_fork=yes
24877 else
24878   echo "$as_me: failed program was:" >&5
24879 sed 's/^/| /' conftest.$ac_ext >&5
24880
24881 ac_cv_func_cthread_fork=no
24882 fi
24883 rm -f conftest.err conftest.$ac_objext \
24884       conftest$ac_exeext conftest.$ac_ext
24885 fi
24886 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
24887 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
24888 if test $ac_cv_func_cthread_fork = yes; then
24889   ol_link_threads=yes
24890 fi
24891
24892                 LIBS="$save_LIBS"
24893
24894                 if test $ol_link_threads = yes ; then
24895                         LTHREAD_LIBS="-lthreads"
24896                         ol_link_threads=mach
24897                         ol_with_threads=found
24898                 else
24899                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
24900 echo "$as_me: error: could not link with Mach CThreads" >&2;}
24901    { (exit 1); exit 1; }; }
24902                 fi
24903
24904         elif test $ol_with_threads = mach ; then
24905                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
24906 echo "$as_me: error: could not locate Mach CThreads" >&2;}
24907    { (exit 1); exit 1; }; }
24908         fi
24909
24910         if test $ol_link_threads = mach ; then
24911
24912 cat >>confdefs.h <<\_ACEOF
24913 #define HAVE_MACH_CTHREADS 1
24914 _ACEOF
24915
24916         elif test $ol_with_threads = found ; then
24917                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
24918 echo "$as_me: error: could not link with Mach CThreads" >&2;}
24919    { (exit 1); exit 1; }; }
24920         fi
24921         ;;
24922 esac
24923
24924 case $ol_with_threads in auto | yes | pth)
24925
24926
24927 for ac_header in pth.h
24928 do
24929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24930 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24931   echo "$as_me:$LINENO: checking for $ac_header" >&5
24932 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24933 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24934   echo $ECHO_N "(cached) $ECHO_C" >&6
24935 fi
24936 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24937 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24938 else
24939   # Is the header compilable?
24940 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24941 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24942 cat >conftest.$ac_ext <<_ACEOF
24943 /* confdefs.h.  */
24944 _ACEOF
24945 cat confdefs.h >>conftest.$ac_ext
24946 cat >>conftest.$ac_ext <<_ACEOF
24947 /* end confdefs.h.  */
24948 $ac_includes_default
24949 #include <$ac_header>
24950 _ACEOF
24951 rm -f conftest.$ac_objext
24952 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24953   (eval $ac_compile) 2>conftest.er1
24954   ac_status=$?
24955   grep -v '^ *+' conftest.er1 >conftest.err
24956   rm -f conftest.er1
24957   cat conftest.err >&5
24958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24959   (exit $ac_status); } &&
24960          { ac_try='test -z "$ac_c_werror_flag"
24961                          || test ! -s conftest.err'
24962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24963   (eval $ac_try) 2>&5
24964   ac_status=$?
24965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24966   (exit $ac_status); }; } &&
24967          { ac_try='test -s conftest.$ac_objext'
24968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24969   (eval $ac_try) 2>&5
24970   ac_status=$?
24971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24972   (exit $ac_status); }; }; then
24973   ac_header_compiler=yes
24974 else
24975   echo "$as_me: failed program was:" >&5
24976 sed 's/^/| /' conftest.$ac_ext >&5
24977
24978 ac_header_compiler=no
24979 fi
24980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24981 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24982 echo "${ECHO_T}$ac_header_compiler" >&6
24983
24984 # Is the header present?
24985 echo "$as_me:$LINENO: checking $ac_header presence" >&5
24986 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
24987 cat >conftest.$ac_ext <<_ACEOF
24988 /* confdefs.h.  */
24989 _ACEOF
24990 cat confdefs.h >>conftest.$ac_ext
24991 cat >>conftest.$ac_ext <<_ACEOF
24992 /* end confdefs.h.  */
24993 #include <$ac_header>
24994 _ACEOF
24995 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
24996   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24997   ac_status=$?
24998   grep -v '^ *+' conftest.er1 >conftest.err
24999   rm -f conftest.er1
25000   cat conftest.err >&5
25001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25002   (exit $ac_status); } >/dev/null; then
25003   if test -s conftest.err; then
25004     ac_cpp_err=$ac_c_preproc_warn_flag
25005     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25006   else
25007     ac_cpp_err=
25008   fi
25009 else
25010   ac_cpp_err=yes
25011 fi
25012 if test -z "$ac_cpp_err"; then
25013   ac_header_preproc=yes
25014 else
25015   echo "$as_me: failed program was:" >&5
25016 sed 's/^/| /' conftest.$ac_ext >&5
25017
25018   ac_header_preproc=no
25019 fi
25020 rm -f conftest.err conftest.$ac_ext
25021 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25022 echo "${ECHO_T}$ac_header_preproc" >&6
25023
25024 # So?  What about this header?
25025 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25026   yes:no: )
25027     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25028 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25029     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25030 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25031     ac_header_preproc=yes
25032     ;;
25033   no:yes:* )
25034     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25035 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25036     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25037 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25038     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25039 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25040     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25041 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25042     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25043 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25044     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25045 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25046     (
25047       cat <<\_ASBOX
25048 ## --------------------------------------------- ##
25049 ## Report this to <http://www.openldap.org/its/> ##
25050 ## --------------------------------------------- ##
25051 _ASBOX
25052     ) |
25053       sed "s/^/$as_me: WARNING:     /" >&2
25054     ;;
25055 esac
25056 echo "$as_me:$LINENO: checking for $ac_header" >&5
25057 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25058 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25059   echo $ECHO_N "(cached) $ECHO_C" >&6
25060 else
25061   eval "$as_ac_Header=\$ac_header_preproc"
25062 fi
25063 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25064 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25065
25066 fi
25067 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25068   cat >>confdefs.h <<_ACEOF
25069 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25070 _ACEOF
25071
25072 fi
25073
25074 done
25075
25076
25077         if test $ac_cv_header_pth_h = yes ; then
25078                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
25079 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
25080 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
25081   echo $ECHO_N "(cached) $ECHO_C" >&6
25082 else
25083   ac_check_lib_save_LIBS=$LIBS
25084 LIBS="-lpth  $LIBS"
25085 cat >conftest.$ac_ext <<_ACEOF
25086 /* confdefs.h.  */
25087 _ACEOF
25088 cat confdefs.h >>conftest.$ac_ext
25089 cat >>conftest.$ac_ext <<_ACEOF
25090 /* end confdefs.h.  */
25091
25092 /* Override any gcc2 internal prototype to avoid an error.  */
25093 #ifdef __cplusplus
25094 extern "C"
25095 #endif
25096 /* We use char because int might match the return type of a gcc2
25097    builtin and then its argument prototype would still apply.  */
25098 char pth_version ();
25099 int
25100 main ()
25101 {
25102 pth_version ();
25103   ;
25104   return 0;
25105 }
25106 _ACEOF
25107 rm -f conftest.$ac_objext conftest$ac_exeext
25108 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25109   (eval $ac_link) 2>conftest.er1
25110   ac_status=$?
25111   grep -v '^ *+' conftest.er1 >conftest.err
25112   rm -f conftest.er1
25113   cat conftest.err >&5
25114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25115   (exit $ac_status); } &&
25116          { ac_try='test -z "$ac_c_werror_flag"
25117                          || test ! -s conftest.err'
25118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25119   (eval $ac_try) 2>&5
25120   ac_status=$?
25121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25122   (exit $ac_status); }; } &&
25123          { ac_try='test -s conftest$ac_exeext'
25124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25125   (eval $ac_try) 2>&5
25126   ac_status=$?
25127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25128   (exit $ac_status); }; }; then
25129   ac_cv_lib_pth_pth_version=yes
25130 else
25131   echo "$as_me: failed program was:" >&5
25132 sed 's/^/| /' conftest.$ac_ext >&5
25133
25134 ac_cv_lib_pth_pth_version=no
25135 fi
25136 rm -f conftest.err conftest.$ac_objext \
25137       conftest$ac_exeext conftest.$ac_ext
25138 LIBS=$ac_check_lib_save_LIBS
25139 fi
25140 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
25141 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
25142 if test $ac_cv_lib_pth_pth_version = yes; then
25143   have_pth=yes
25144 else
25145   have_pth=no
25146 fi
25147
25148
25149                 if test $have_pth = yes ; then
25150
25151 cat >>confdefs.h <<\_ACEOF
25152 #define HAVE_GNU_PTH 1
25153 _ACEOF
25154
25155                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
25156                         ol_link_threads=pth
25157                         ol_with_threads=found
25158
25159                         if test $ol_with_yielding_select = auto ; then
25160                                 ol_with_yielding_select=yes
25161                         fi
25162                 fi
25163         fi
25164         ;;
25165 esac
25166
25167 case $ol_with_threads in auto | yes | lwp)
25168
25169
25170
25171 for ac_header in thread.h synch.h
25172 do
25173 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25174 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25175   echo "$as_me:$LINENO: checking for $ac_header" >&5
25176 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25177 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25178   echo $ECHO_N "(cached) $ECHO_C" >&6
25179 fi
25180 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25181 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25182 else
25183   # Is the header compilable?
25184 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25185 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25186 cat >conftest.$ac_ext <<_ACEOF
25187 /* confdefs.h.  */
25188 _ACEOF
25189 cat confdefs.h >>conftest.$ac_ext
25190 cat >>conftest.$ac_ext <<_ACEOF
25191 /* end confdefs.h.  */
25192 $ac_includes_default
25193 #include <$ac_header>
25194 _ACEOF
25195 rm -f conftest.$ac_objext
25196 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25197   (eval $ac_compile) 2>conftest.er1
25198   ac_status=$?
25199   grep -v '^ *+' conftest.er1 >conftest.err
25200   rm -f conftest.er1
25201   cat conftest.err >&5
25202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25203   (exit $ac_status); } &&
25204          { ac_try='test -z "$ac_c_werror_flag"
25205                          || test ! -s conftest.err'
25206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25207   (eval $ac_try) 2>&5
25208   ac_status=$?
25209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25210   (exit $ac_status); }; } &&
25211          { ac_try='test -s conftest.$ac_objext'
25212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25213   (eval $ac_try) 2>&5
25214   ac_status=$?
25215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25216   (exit $ac_status); }; }; then
25217   ac_header_compiler=yes
25218 else
25219   echo "$as_me: failed program was:" >&5
25220 sed 's/^/| /' conftest.$ac_ext >&5
25221
25222 ac_header_compiler=no
25223 fi
25224 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25225 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25226 echo "${ECHO_T}$ac_header_compiler" >&6
25227
25228 # Is the header present?
25229 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25230 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25231 cat >conftest.$ac_ext <<_ACEOF
25232 /* confdefs.h.  */
25233 _ACEOF
25234 cat confdefs.h >>conftest.$ac_ext
25235 cat >>conftest.$ac_ext <<_ACEOF
25236 /* end confdefs.h.  */
25237 #include <$ac_header>
25238 _ACEOF
25239 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25240   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25241   ac_status=$?
25242   grep -v '^ *+' conftest.er1 >conftest.err
25243   rm -f conftest.er1
25244   cat conftest.err >&5
25245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25246   (exit $ac_status); } >/dev/null; then
25247   if test -s conftest.err; then
25248     ac_cpp_err=$ac_c_preproc_warn_flag
25249     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25250   else
25251     ac_cpp_err=
25252   fi
25253 else
25254   ac_cpp_err=yes
25255 fi
25256 if test -z "$ac_cpp_err"; then
25257   ac_header_preproc=yes
25258 else
25259   echo "$as_me: failed program was:" >&5
25260 sed 's/^/| /' conftest.$ac_ext >&5
25261
25262   ac_header_preproc=no
25263 fi
25264 rm -f conftest.err conftest.$ac_ext
25265 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25266 echo "${ECHO_T}$ac_header_preproc" >&6
25267
25268 # So?  What about this header?
25269 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25270   yes:no: )
25271     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25272 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25273     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25274 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25275     ac_header_preproc=yes
25276     ;;
25277   no:yes:* )
25278     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25279 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25280     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25281 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25282     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25283 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25284     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25285 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25286     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25287 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25288     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25289 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25290     (
25291       cat <<\_ASBOX
25292 ## --------------------------------------------- ##
25293 ## Report this to <http://www.openldap.org/its/> ##
25294 ## --------------------------------------------- ##
25295 _ASBOX
25296     ) |
25297       sed "s/^/$as_me: WARNING:     /" >&2
25298     ;;
25299 esac
25300 echo "$as_me:$LINENO: checking for $ac_header" >&5
25301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25303   echo $ECHO_N "(cached) $ECHO_C" >&6
25304 else
25305   eval "$as_ac_Header=\$ac_header_preproc"
25306 fi
25307 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25308 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25309
25310 fi
25311 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25312   cat >>confdefs.h <<_ACEOF
25313 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25314 _ACEOF
25315
25316 fi
25317
25318 done
25319
25320         if test $ac_cv_header_thread_h = yes &&
25321            test $ac_cv_header_synch_h = yes ; then
25322                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
25323 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
25324 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
25325   echo $ECHO_N "(cached) $ECHO_C" >&6
25326 else
25327   ac_check_lib_save_LIBS=$LIBS
25328 LIBS="-lthread  $LIBS"
25329 cat >conftest.$ac_ext <<_ACEOF
25330 /* confdefs.h.  */
25331 _ACEOF
25332 cat confdefs.h >>conftest.$ac_ext
25333 cat >>conftest.$ac_ext <<_ACEOF
25334 /* end confdefs.h.  */
25335
25336 /* Override any gcc2 internal prototype to avoid an error.  */
25337 #ifdef __cplusplus
25338 extern "C"
25339 #endif
25340 /* We use char because int might match the return type of a gcc2
25341    builtin and then its argument prototype would still apply.  */
25342 char thr_create ();
25343 int
25344 main ()
25345 {
25346 thr_create ();
25347   ;
25348   return 0;
25349 }
25350 _ACEOF
25351 rm -f conftest.$ac_objext conftest$ac_exeext
25352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25353   (eval $ac_link) 2>conftest.er1
25354   ac_status=$?
25355   grep -v '^ *+' conftest.er1 >conftest.err
25356   rm -f conftest.er1
25357   cat conftest.err >&5
25358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25359   (exit $ac_status); } &&
25360          { ac_try='test -z "$ac_c_werror_flag"
25361                          || test ! -s conftest.err'
25362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25363   (eval $ac_try) 2>&5
25364   ac_status=$?
25365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25366   (exit $ac_status); }; } &&
25367          { ac_try='test -s conftest$ac_exeext'
25368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25369   (eval $ac_try) 2>&5
25370   ac_status=$?
25371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25372   (exit $ac_status); }; }; then
25373   ac_cv_lib_thread_thr_create=yes
25374 else
25375   echo "$as_me: failed program was:" >&5
25376 sed 's/^/| /' conftest.$ac_ext >&5
25377
25378 ac_cv_lib_thread_thr_create=no
25379 fi
25380 rm -f conftest.err conftest.$ac_objext \
25381       conftest$ac_exeext conftest.$ac_ext
25382 LIBS=$ac_check_lib_save_LIBS
25383 fi
25384 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
25385 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
25386 if test $ac_cv_lib_thread_thr_create = yes; then
25387   have_thr=yes
25388 else
25389   have_thr=no
25390 fi
25391
25392
25393                 if test $have_thr = yes ; then
25394
25395 cat >>confdefs.h <<\_ACEOF
25396 #define HAVE_THR 1
25397 _ACEOF
25398
25399                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
25400                         ol_link_threads=thr
25401
25402                         if test $ol_with_yielding_select = auto ; then
25403                                 ol_with_yielding_select=yes
25404                         fi
25405
25406
25407
25408 for ac_func in \
25409                                 thr_setconcurrency \
25410                                 thr_getconcurrency \
25411
25412 do
25413 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25414 echo "$as_me:$LINENO: checking for $ac_func" >&5
25415 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
25416 if eval "test \"\${$as_ac_var+set}\" = set"; then
25417   echo $ECHO_N "(cached) $ECHO_C" >&6
25418 else
25419   cat >conftest.$ac_ext <<_ACEOF
25420 /* confdefs.h.  */
25421 _ACEOF
25422 cat confdefs.h >>conftest.$ac_ext
25423 cat >>conftest.$ac_ext <<_ACEOF
25424 /* end confdefs.h.  */
25425 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25426    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25427 #define $ac_func innocuous_$ac_func
25428
25429 /* System header to define __stub macros and hopefully few prototypes,
25430     which can conflict with char $ac_func (); below.
25431     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25432     <limits.h> exists even on freestanding compilers.  */
25433
25434 #ifdef __STDC__
25435 # include <limits.h>
25436 #else
25437 # include <assert.h>
25438 #endif
25439
25440 #undef $ac_func
25441
25442 /* Override any gcc2 internal prototype to avoid an error.  */
25443 #ifdef __cplusplus
25444 extern "C"
25445 {
25446 #endif
25447 /* We use char because int might match the return type of a gcc2
25448    builtin and then its argument prototype would still apply.  */
25449 char $ac_func ();
25450 /* The GNU C library defines this for functions which it implements
25451     to always fail with ENOSYS.  Some functions are actually named
25452     something starting with __ and the normal name is an alias.  */
25453 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
25454 choke me
25455 #else
25456 char (*f) () = $ac_func;
25457 #endif
25458 #ifdef __cplusplus
25459 }
25460 #endif
25461
25462 int
25463 main ()
25464 {
25465 return f != $ac_func;
25466   ;
25467   return 0;
25468 }
25469 _ACEOF
25470 rm -f conftest.$ac_objext conftest$ac_exeext
25471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25472   (eval $ac_link) 2>conftest.er1
25473   ac_status=$?
25474   grep -v '^ *+' conftest.er1 >conftest.err
25475   rm -f conftest.er1
25476   cat conftest.err >&5
25477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25478   (exit $ac_status); } &&
25479          { ac_try='test -z "$ac_c_werror_flag"
25480                          || test ! -s conftest.err'
25481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25482   (eval $ac_try) 2>&5
25483   ac_status=$?
25484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25485   (exit $ac_status); }; } &&
25486          { ac_try='test -s conftest$ac_exeext'
25487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25488   (eval $ac_try) 2>&5
25489   ac_status=$?
25490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25491   (exit $ac_status); }; }; then
25492   eval "$as_ac_var=yes"
25493 else
25494   echo "$as_me: failed program was:" >&5
25495 sed 's/^/| /' conftest.$ac_ext >&5
25496
25497 eval "$as_ac_var=no"
25498 fi
25499 rm -f conftest.err conftest.$ac_objext \
25500       conftest$ac_exeext conftest.$ac_ext
25501 fi
25502 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
25503 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
25504 if test `eval echo '${'$as_ac_var'}'` = yes; then
25505   cat >>confdefs.h <<_ACEOF
25506 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25507 _ACEOF
25508
25509 fi
25510 done
25511
25512                 fi
25513         fi
25514
25515
25516 for ac_header in lwp/lwp.h
25517 do
25518 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25520   echo "$as_me:$LINENO: checking for $ac_header" >&5
25521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25523   echo $ECHO_N "(cached) $ECHO_C" >&6
25524 fi
25525 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25526 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25527 else
25528   # Is the header compilable?
25529 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25530 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25531 cat >conftest.$ac_ext <<_ACEOF
25532 /* confdefs.h.  */
25533 _ACEOF
25534 cat confdefs.h >>conftest.$ac_ext
25535 cat >>conftest.$ac_ext <<_ACEOF
25536 /* end confdefs.h.  */
25537 $ac_includes_default
25538 #include <$ac_header>
25539 _ACEOF
25540 rm -f conftest.$ac_objext
25541 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25542   (eval $ac_compile) 2>conftest.er1
25543   ac_status=$?
25544   grep -v '^ *+' conftest.er1 >conftest.err
25545   rm -f conftest.er1
25546   cat conftest.err >&5
25547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25548   (exit $ac_status); } &&
25549          { ac_try='test -z "$ac_c_werror_flag"
25550                          || test ! -s conftest.err'
25551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25552   (eval $ac_try) 2>&5
25553   ac_status=$?
25554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25555   (exit $ac_status); }; } &&
25556          { ac_try='test -s conftest.$ac_objext'
25557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25558   (eval $ac_try) 2>&5
25559   ac_status=$?
25560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25561   (exit $ac_status); }; }; then
25562   ac_header_compiler=yes
25563 else
25564   echo "$as_me: failed program was:" >&5
25565 sed 's/^/| /' conftest.$ac_ext >&5
25566
25567 ac_header_compiler=no
25568 fi
25569 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25570 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25571 echo "${ECHO_T}$ac_header_compiler" >&6
25572
25573 # Is the header present?
25574 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25575 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25576 cat >conftest.$ac_ext <<_ACEOF
25577 /* confdefs.h.  */
25578 _ACEOF
25579 cat confdefs.h >>conftest.$ac_ext
25580 cat >>conftest.$ac_ext <<_ACEOF
25581 /* end confdefs.h.  */
25582 #include <$ac_header>
25583 _ACEOF
25584 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25586   ac_status=$?
25587   grep -v '^ *+' conftest.er1 >conftest.err
25588   rm -f conftest.er1
25589   cat conftest.err >&5
25590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25591   (exit $ac_status); } >/dev/null; then
25592   if test -s conftest.err; then
25593     ac_cpp_err=$ac_c_preproc_warn_flag
25594     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25595   else
25596     ac_cpp_err=
25597   fi
25598 else
25599   ac_cpp_err=yes
25600 fi
25601 if test -z "$ac_cpp_err"; then
25602   ac_header_preproc=yes
25603 else
25604   echo "$as_me: failed program was:" >&5
25605 sed 's/^/| /' conftest.$ac_ext >&5
25606
25607   ac_header_preproc=no
25608 fi
25609 rm -f conftest.err conftest.$ac_ext
25610 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25611 echo "${ECHO_T}$ac_header_preproc" >&6
25612
25613 # So?  What about this header?
25614 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25615   yes:no: )
25616     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25617 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25618     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25619 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25620     ac_header_preproc=yes
25621     ;;
25622   no:yes:* )
25623     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25624 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25625     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25626 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25627     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25628 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25629     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25630 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25631     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25632 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25633     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25634 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25635     (
25636       cat <<\_ASBOX
25637 ## --------------------------------------------- ##
25638 ## Report this to <http://www.openldap.org/its/> ##
25639 ## --------------------------------------------- ##
25640 _ASBOX
25641     ) |
25642       sed "s/^/$as_me: WARNING:     /" >&2
25643     ;;
25644 esac
25645 echo "$as_me:$LINENO: checking for $ac_header" >&5
25646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25648   echo $ECHO_N "(cached) $ECHO_C" >&6
25649 else
25650   eval "$as_ac_Header=\$ac_header_preproc"
25651 fi
25652 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25653 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25654
25655 fi
25656 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25657   cat >>confdefs.h <<_ACEOF
25658 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25659 _ACEOF
25660
25661 fi
25662
25663 done
25664
25665         if test $ac_cv_header_lwp_lwp_h = yes ; then
25666                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
25667 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
25668 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
25669   echo $ECHO_N "(cached) $ECHO_C" >&6
25670 else
25671   ac_check_lib_save_LIBS=$LIBS
25672 LIBS="-llwp  $LIBS"
25673 cat >conftest.$ac_ext <<_ACEOF
25674 /* confdefs.h.  */
25675 _ACEOF
25676 cat confdefs.h >>conftest.$ac_ext
25677 cat >>conftest.$ac_ext <<_ACEOF
25678 /* end confdefs.h.  */
25679
25680 /* Override any gcc2 internal prototype to avoid an error.  */
25681 #ifdef __cplusplus
25682 extern "C"
25683 #endif
25684 /* We use char because int might match the return type of a gcc2
25685    builtin and then its argument prototype would still apply.  */
25686 char lwp_create ();
25687 int
25688 main ()
25689 {
25690 lwp_create ();
25691   ;
25692   return 0;
25693 }
25694 _ACEOF
25695 rm -f conftest.$ac_objext conftest$ac_exeext
25696 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25697   (eval $ac_link) 2>conftest.er1
25698   ac_status=$?
25699   grep -v '^ *+' conftest.er1 >conftest.err
25700   rm -f conftest.er1
25701   cat conftest.err >&5
25702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25703   (exit $ac_status); } &&
25704          { ac_try='test -z "$ac_c_werror_flag"
25705                          || test ! -s conftest.err'
25706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25707   (eval $ac_try) 2>&5
25708   ac_status=$?
25709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25710   (exit $ac_status); }; } &&
25711          { ac_try='test -s conftest$ac_exeext'
25712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25713   (eval $ac_try) 2>&5
25714   ac_status=$?
25715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25716   (exit $ac_status); }; }; then
25717   ac_cv_lib_lwp_lwp_create=yes
25718 else
25719   echo "$as_me: failed program was:" >&5
25720 sed 's/^/| /' conftest.$ac_ext >&5
25721
25722 ac_cv_lib_lwp_lwp_create=no
25723 fi
25724 rm -f conftest.err conftest.$ac_objext \
25725       conftest$ac_exeext conftest.$ac_ext
25726 LIBS=$ac_check_lib_save_LIBS
25727 fi
25728 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
25729 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
25730 if test $ac_cv_lib_lwp_lwp_create = yes; then
25731   have_lwp=yes
25732 else
25733   have_lwp=no
25734 fi
25735
25736
25737                 if test $have_lwp = yes ; then
25738
25739 cat >>confdefs.h <<\_ACEOF
25740 #define HAVE_LWP 1
25741 _ACEOF
25742
25743                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
25744                         ol_link_threads=lwp
25745
25746                         if test $ol_with_yielding_select = auto ; then
25747                                 ol_with_yielding_select=no
25748                         fi
25749                 fi
25750         fi
25751         ;;
25752 esac
25753
25754 if test $ol_with_yielding_select = yes ; then
25755
25756 cat >>confdefs.h <<\_ACEOF
25757 #define HAVE_YIELDING_SELECT 1
25758 _ACEOF
25759
25760 fi
25761
25762 if test $ol_with_threads = manual ; then
25763                 ol_link_threads=yes
25764
25765         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
25766 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
25767
25768
25769
25770 for ac_header in pthread.h sched.h
25771 do
25772 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25774   echo "$as_me:$LINENO: checking for $ac_header" >&5
25775 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25776 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25777   echo $ECHO_N "(cached) $ECHO_C" >&6
25778 fi
25779 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25780 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25781 else
25782   # Is the header compilable?
25783 echo "$as_me:$LINENO: checking $ac_header usability" >&5
25784 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
25785 cat >conftest.$ac_ext <<_ACEOF
25786 /* confdefs.h.  */
25787 _ACEOF
25788 cat confdefs.h >>conftest.$ac_ext
25789 cat >>conftest.$ac_ext <<_ACEOF
25790 /* end confdefs.h.  */
25791 $ac_includes_default
25792 #include <$ac_header>
25793 _ACEOF
25794 rm -f conftest.$ac_objext
25795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
25796   (eval $ac_compile) 2>conftest.er1
25797   ac_status=$?
25798   grep -v '^ *+' conftest.er1 >conftest.err
25799   rm -f conftest.er1
25800   cat conftest.err >&5
25801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25802   (exit $ac_status); } &&
25803          { ac_try='test -z "$ac_c_werror_flag"
25804                          || test ! -s conftest.err'
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); }; } &&
25810          { ac_try='test -s conftest.$ac_objext'
25811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25812   (eval $ac_try) 2>&5
25813   ac_status=$?
25814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25815   (exit $ac_status); }; }; then
25816   ac_header_compiler=yes
25817 else
25818   echo "$as_me: failed program was:" >&5
25819 sed 's/^/| /' conftest.$ac_ext >&5
25820
25821 ac_header_compiler=no
25822 fi
25823 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25824 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25825 echo "${ECHO_T}$ac_header_compiler" >&6
25826
25827 # Is the header present?
25828 echo "$as_me:$LINENO: checking $ac_header presence" >&5
25829 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
25830 cat >conftest.$ac_ext <<_ACEOF
25831 /* confdefs.h.  */
25832 _ACEOF
25833 cat confdefs.h >>conftest.$ac_ext
25834 cat >>conftest.$ac_ext <<_ACEOF
25835 /* end confdefs.h.  */
25836 #include <$ac_header>
25837 _ACEOF
25838 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
25839   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
25840   ac_status=$?
25841   grep -v '^ *+' conftest.er1 >conftest.err
25842   rm -f conftest.er1
25843   cat conftest.err >&5
25844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25845   (exit $ac_status); } >/dev/null; then
25846   if test -s conftest.err; then
25847     ac_cpp_err=$ac_c_preproc_warn_flag
25848     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
25849   else
25850     ac_cpp_err=
25851   fi
25852 else
25853   ac_cpp_err=yes
25854 fi
25855 if test -z "$ac_cpp_err"; then
25856   ac_header_preproc=yes
25857 else
25858   echo "$as_me: failed program was:" >&5
25859 sed 's/^/| /' conftest.$ac_ext >&5
25860
25861   ac_header_preproc=no
25862 fi
25863 rm -f conftest.err conftest.$ac_ext
25864 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25865 echo "${ECHO_T}$ac_header_preproc" >&6
25866
25867 # So?  What about this header?
25868 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25869   yes:no: )
25870     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25871 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25872     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25873 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25874     ac_header_preproc=yes
25875     ;;
25876   no:yes:* )
25877     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25878 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25879     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25880 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25881     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25882 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25883     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25884 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25885     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25886 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25887     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25888 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25889     (
25890       cat <<\_ASBOX
25891 ## --------------------------------------------- ##
25892 ## Report this to <http://www.openldap.org/its/> ##
25893 ## --------------------------------------------- ##
25894 _ASBOX
25895     ) |
25896       sed "s/^/$as_me: WARNING:     /" >&2
25897     ;;
25898 esac
25899 echo "$as_me:$LINENO: checking for $ac_header" >&5
25900 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25901 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25902   echo $ECHO_N "(cached) $ECHO_C" >&6
25903 else
25904   eval "$as_ac_Header=\$ac_header_preproc"
25905 fi
25906 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
25907 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
25908
25909 fi
25910 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25911   cat >>confdefs.h <<_ACEOF
25912 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25913 _ACEOF
25914
25915 fi
25916
25917 done
25918
25919
25920
25921 for ac_func in sched_yield pthread_yield
25922 do
25923 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25924 echo "$as_me:$LINENO: checking for $ac_func" >&5
25925 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
25926 if eval "test \"\${$as_ac_var+set}\" = set"; then
25927   echo $ECHO_N "(cached) $ECHO_C" >&6
25928 else
25929   cat >conftest.$ac_ext <<_ACEOF
25930 /* confdefs.h.  */
25931 _ACEOF
25932 cat confdefs.h >>conftest.$ac_ext
25933 cat >>conftest.$ac_ext <<_ACEOF
25934 /* end confdefs.h.  */
25935 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25936    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25937 #define $ac_func innocuous_$ac_func
25938
25939 /* System header to define __stub macros and hopefully few prototypes,
25940     which can conflict with char $ac_func (); below.
25941     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25942     <limits.h> exists even on freestanding compilers.  */
25943
25944 #ifdef __STDC__
25945 # include <limits.h>
25946 #else
25947 # include <assert.h>
25948 #endif
25949
25950 #undef $ac_func
25951
25952 /* Override any gcc2 internal prototype to avoid an error.  */
25953 #ifdef __cplusplus
25954 extern "C"
25955 {
25956 #endif
25957 /* We use char because int might match the return type of a gcc2
25958    builtin and then its argument prototype would still apply.  */
25959 char $ac_func ();
25960 /* The GNU C library defines this for functions which it implements
25961     to always fail with ENOSYS.  Some functions are actually named
25962     something starting with __ and the normal name is an alias.  */
25963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
25964 choke me
25965 #else
25966 char (*f) () = $ac_func;
25967 #endif
25968 #ifdef __cplusplus
25969 }
25970 #endif
25971
25972 int
25973 main ()
25974 {
25975 return f != $ac_func;
25976   ;
25977   return 0;
25978 }
25979 _ACEOF
25980 rm -f conftest.$ac_objext conftest$ac_exeext
25981 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25982   (eval $ac_link) 2>conftest.er1
25983   ac_status=$?
25984   grep -v '^ *+' conftest.er1 >conftest.err
25985   rm -f conftest.er1
25986   cat conftest.err >&5
25987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25988   (exit $ac_status); } &&
25989          { ac_try='test -z "$ac_c_werror_flag"
25990                          || test ! -s conftest.err'
25991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25992   (eval $ac_try) 2>&5
25993   ac_status=$?
25994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25995   (exit $ac_status); }; } &&
25996          { ac_try='test -s conftest$ac_exeext'
25997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25998   (eval $ac_try) 2>&5
25999   ac_status=$?
26000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26001   (exit $ac_status); }; }; then
26002   eval "$as_ac_var=yes"
26003 else
26004   echo "$as_me: failed program was:" >&5
26005 sed 's/^/| /' conftest.$ac_ext >&5
26006
26007 eval "$as_ac_var=no"
26008 fi
26009 rm -f conftest.err conftest.$ac_objext \
26010       conftest$ac_exeext conftest.$ac_ext
26011 fi
26012 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26013 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26014 if test `eval echo '${'$as_ac_var'}'` = yes; then
26015   cat >>confdefs.h <<_ACEOF
26016 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26017 _ACEOF
26018
26019 fi
26020 done
26021
26022
26023         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
26024 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
26025 if test "${ol_cv_header_linux_threads+set}" = set; then
26026   echo $ECHO_N "(cached) $ECHO_C" >&6
26027 else
26028   cat >conftest.$ac_ext <<_ACEOF
26029 /* confdefs.h.  */
26030 _ACEOF
26031 cat confdefs.h >>conftest.$ac_ext
26032 cat >>conftest.$ac_ext <<_ACEOF
26033 /* end confdefs.h.  */
26034 #include <pthread.h>
26035 _ACEOF
26036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26037   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
26038   ol_cv_header_linux_threads=yes
26039 else
26040   ol_cv_header_linux_threads=no
26041 fi
26042 rm -f conftest*
26043
26044
26045 fi
26046 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
26047 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
26048         if test $ol_cv_header_linux_threads = yes; then
26049
26050 cat >>confdefs.h <<\_ACEOF
26051 #define HAVE_LINUX_THREADS 1
26052 _ACEOF
26053
26054         fi
26055
26056
26057
26058 for ac_header in mach/cthreads.h
26059 do
26060 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26061 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26062   echo "$as_me:$LINENO: checking for $ac_header" >&5
26063 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26064 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26065   echo $ECHO_N "(cached) $ECHO_C" >&6
26066 fi
26067 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26068 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26069 else
26070   # Is the header compilable?
26071 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26072 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26073 cat >conftest.$ac_ext <<_ACEOF
26074 /* confdefs.h.  */
26075 _ACEOF
26076 cat confdefs.h >>conftest.$ac_ext
26077 cat >>conftest.$ac_ext <<_ACEOF
26078 /* end confdefs.h.  */
26079 $ac_includes_default
26080 #include <$ac_header>
26081 _ACEOF
26082 rm -f conftest.$ac_objext
26083 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26084   (eval $ac_compile) 2>conftest.er1
26085   ac_status=$?
26086   grep -v '^ *+' conftest.er1 >conftest.err
26087   rm -f conftest.er1
26088   cat conftest.err >&5
26089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26090   (exit $ac_status); } &&
26091          { ac_try='test -z "$ac_c_werror_flag"
26092                          || test ! -s conftest.err'
26093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26094   (eval $ac_try) 2>&5
26095   ac_status=$?
26096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26097   (exit $ac_status); }; } &&
26098          { ac_try='test -s conftest.$ac_objext'
26099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26100   (eval $ac_try) 2>&5
26101   ac_status=$?
26102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26103   (exit $ac_status); }; }; then
26104   ac_header_compiler=yes
26105 else
26106   echo "$as_me: failed program was:" >&5
26107 sed 's/^/| /' conftest.$ac_ext >&5
26108
26109 ac_header_compiler=no
26110 fi
26111 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26112 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26113 echo "${ECHO_T}$ac_header_compiler" >&6
26114
26115 # Is the header present?
26116 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26117 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26118 cat >conftest.$ac_ext <<_ACEOF
26119 /* confdefs.h.  */
26120 _ACEOF
26121 cat confdefs.h >>conftest.$ac_ext
26122 cat >>conftest.$ac_ext <<_ACEOF
26123 /* end confdefs.h.  */
26124 #include <$ac_header>
26125 _ACEOF
26126 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26128   ac_status=$?
26129   grep -v '^ *+' conftest.er1 >conftest.err
26130   rm -f conftest.er1
26131   cat conftest.err >&5
26132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26133   (exit $ac_status); } >/dev/null; then
26134   if test -s conftest.err; then
26135     ac_cpp_err=$ac_c_preproc_warn_flag
26136     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26137   else
26138     ac_cpp_err=
26139   fi
26140 else
26141   ac_cpp_err=yes
26142 fi
26143 if test -z "$ac_cpp_err"; then
26144   ac_header_preproc=yes
26145 else
26146   echo "$as_me: failed program was:" >&5
26147 sed 's/^/| /' conftest.$ac_ext >&5
26148
26149   ac_header_preproc=no
26150 fi
26151 rm -f conftest.err conftest.$ac_ext
26152 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26153 echo "${ECHO_T}$ac_header_preproc" >&6
26154
26155 # So?  What about this header?
26156 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26157   yes:no: )
26158     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26159 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26160     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26161 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26162     ac_header_preproc=yes
26163     ;;
26164   no:yes:* )
26165     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26166 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26167     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26168 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26169     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26170 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26171     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26172 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26173     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26174 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26175     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26176 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26177     (
26178       cat <<\_ASBOX
26179 ## --------------------------------------------- ##
26180 ## Report this to <http://www.openldap.org/its/> ##
26181 ## --------------------------------------------- ##
26182 _ASBOX
26183     ) |
26184       sed "s/^/$as_me: WARNING:     /" >&2
26185     ;;
26186 esac
26187 echo "$as_me:$LINENO: checking for $ac_header" >&5
26188 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26189 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26190   echo $ECHO_N "(cached) $ECHO_C" >&6
26191 else
26192   eval "$as_ac_Header=\$ac_header_preproc"
26193 fi
26194 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26195 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26196
26197 fi
26198 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26199   cat >>confdefs.h <<_ACEOF
26200 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26201 _ACEOF
26202
26203 fi
26204
26205 done
26206
26207
26208 for ac_header in lwp/lwp.h
26209 do
26210 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26211 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26212   echo "$as_me:$LINENO: checking for $ac_header" >&5
26213 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26214 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26215   echo $ECHO_N "(cached) $ECHO_C" >&6
26216 fi
26217 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26218 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26219 else
26220   # Is the header compilable?
26221 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26222 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26223 cat >conftest.$ac_ext <<_ACEOF
26224 /* confdefs.h.  */
26225 _ACEOF
26226 cat confdefs.h >>conftest.$ac_ext
26227 cat >>conftest.$ac_ext <<_ACEOF
26228 /* end confdefs.h.  */
26229 $ac_includes_default
26230 #include <$ac_header>
26231 _ACEOF
26232 rm -f conftest.$ac_objext
26233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26234   (eval $ac_compile) 2>conftest.er1
26235   ac_status=$?
26236   grep -v '^ *+' conftest.er1 >conftest.err
26237   rm -f conftest.er1
26238   cat conftest.err >&5
26239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26240   (exit $ac_status); } &&
26241          { ac_try='test -z "$ac_c_werror_flag"
26242                          || test ! -s conftest.err'
26243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26244   (eval $ac_try) 2>&5
26245   ac_status=$?
26246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26247   (exit $ac_status); }; } &&
26248          { ac_try='test -s conftest.$ac_objext'
26249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26250   (eval $ac_try) 2>&5
26251   ac_status=$?
26252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26253   (exit $ac_status); }; }; then
26254   ac_header_compiler=yes
26255 else
26256   echo "$as_me: failed program was:" >&5
26257 sed 's/^/| /' conftest.$ac_ext >&5
26258
26259 ac_header_compiler=no
26260 fi
26261 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26262 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26263 echo "${ECHO_T}$ac_header_compiler" >&6
26264
26265 # Is the header present?
26266 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26267 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26268 cat >conftest.$ac_ext <<_ACEOF
26269 /* confdefs.h.  */
26270 _ACEOF
26271 cat confdefs.h >>conftest.$ac_ext
26272 cat >>conftest.$ac_ext <<_ACEOF
26273 /* end confdefs.h.  */
26274 #include <$ac_header>
26275 _ACEOF
26276 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26277   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26278   ac_status=$?
26279   grep -v '^ *+' conftest.er1 >conftest.err
26280   rm -f conftest.er1
26281   cat conftest.err >&5
26282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26283   (exit $ac_status); } >/dev/null; then
26284   if test -s conftest.err; then
26285     ac_cpp_err=$ac_c_preproc_warn_flag
26286     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26287   else
26288     ac_cpp_err=
26289   fi
26290 else
26291   ac_cpp_err=yes
26292 fi
26293 if test -z "$ac_cpp_err"; then
26294   ac_header_preproc=yes
26295 else
26296   echo "$as_me: failed program was:" >&5
26297 sed 's/^/| /' conftest.$ac_ext >&5
26298
26299   ac_header_preproc=no
26300 fi
26301 rm -f conftest.err conftest.$ac_ext
26302 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26303 echo "${ECHO_T}$ac_header_preproc" >&6
26304
26305 # So?  What about this header?
26306 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26307   yes:no: )
26308     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26309 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26310     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26311 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26312     ac_header_preproc=yes
26313     ;;
26314   no:yes:* )
26315     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26316 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26317     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26318 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26319     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26320 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26321     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26322 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26323     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26324 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26325     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26326 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26327     (
26328       cat <<\_ASBOX
26329 ## --------------------------------------------- ##
26330 ## Report this to <http://www.openldap.org/its/> ##
26331 ## --------------------------------------------- ##
26332 _ASBOX
26333     ) |
26334       sed "s/^/$as_me: WARNING:     /" >&2
26335     ;;
26336 esac
26337 echo "$as_me:$LINENO: checking for $ac_header" >&5
26338 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26339 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26340   echo $ECHO_N "(cached) $ECHO_C" >&6
26341 else
26342   eval "$as_ac_Header=\$ac_header_preproc"
26343 fi
26344 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26345 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26346
26347 fi
26348 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26349   cat >>confdefs.h <<_ACEOF
26350 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26351 _ACEOF
26352
26353 fi
26354
26355 done
26356
26357
26358
26359 for ac_header in thread.h synch.h
26360 do
26361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26363   echo "$as_me:$LINENO: checking for $ac_header" >&5
26364 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26365 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26366   echo $ECHO_N "(cached) $ECHO_C" >&6
26367 fi
26368 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26369 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26370 else
26371   # Is the header compilable?
26372 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26373 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26374 cat >conftest.$ac_ext <<_ACEOF
26375 /* confdefs.h.  */
26376 _ACEOF
26377 cat confdefs.h >>conftest.$ac_ext
26378 cat >>conftest.$ac_ext <<_ACEOF
26379 /* end confdefs.h.  */
26380 $ac_includes_default
26381 #include <$ac_header>
26382 _ACEOF
26383 rm -f conftest.$ac_objext
26384 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26385   (eval $ac_compile) 2>conftest.er1
26386   ac_status=$?
26387   grep -v '^ *+' conftest.er1 >conftest.err
26388   rm -f conftest.er1
26389   cat conftest.err >&5
26390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26391   (exit $ac_status); } &&
26392          { ac_try='test -z "$ac_c_werror_flag"
26393                          || test ! -s conftest.err'
26394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26395   (eval $ac_try) 2>&5
26396   ac_status=$?
26397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26398   (exit $ac_status); }; } &&
26399          { ac_try='test -s conftest.$ac_objext'
26400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26401   (eval $ac_try) 2>&5
26402   ac_status=$?
26403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26404   (exit $ac_status); }; }; then
26405   ac_header_compiler=yes
26406 else
26407   echo "$as_me: failed program was:" >&5
26408 sed 's/^/| /' conftest.$ac_ext >&5
26409
26410 ac_header_compiler=no
26411 fi
26412 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26413 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26414 echo "${ECHO_T}$ac_header_compiler" >&6
26415
26416 # Is the header present?
26417 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26418 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26419 cat >conftest.$ac_ext <<_ACEOF
26420 /* confdefs.h.  */
26421 _ACEOF
26422 cat confdefs.h >>conftest.$ac_ext
26423 cat >>conftest.$ac_ext <<_ACEOF
26424 /* end confdefs.h.  */
26425 #include <$ac_header>
26426 _ACEOF
26427 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26428   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26429   ac_status=$?
26430   grep -v '^ *+' conftest.er1 >conftest.err
26431   rm -f conftest.er1
26432   cat conftest.err >&5
26433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26434   (exit $ac_status); } >/dev/null; then
26435   if test -s conftest.err; then
26436     ac_cpp_err=$ac_c_preproc_warn_flag
26437     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
26438   else
26439     ac_cpp_err=
26440   fi
26441 else
26442   ac_cpp_err=yes
26443 fi
26444 if test -z "$ac_cpp_err"; then
26445   ac_header_preproc=yes
26446 else
26447   echo "$as_me: failed program was:" >&5
26448 sed 's/^/| /' conftest.$ac_ext >&5
26449
26450   ac_header_preproc=no
26451 fi
26452 rm -f conftest.err conftest.$ac_ext
26453 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26454 echo "${ECHO_T}$ac_header_preproc" >&6
26455
26456 # So?  What about this header?
26457 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26458   yes:no: )
26459     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26460 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26461     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26462 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26463     ac_header_preproc=yes
26464     ;;
26465   no:yes:* )
26466     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26467 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26468     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26469 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26470     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26471 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26472     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26473 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26474     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26475 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26476     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26477 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26478     (
26479       cat <<\_ASBOX
26480 ## --------------------------------------------- ##
26481 ## Report this to <http://www.openldap.org/its/> ##
26482 ## --------------------------------------------- ##
26483 _ASBOX
26484     ) |
26485       sed "s/^/$as_me: WARNING:     /" >&2
26486     ;;
26487 esac
26488 echo "$as_me:$LINENO: checking for $ac_header" >&5
26489 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26490 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26491   echo $ECHO_N "(cached) $ECHO_C" >&6
26492 else
26493   eval "$as_ac_Header=\$ac_header_preproc"
26494 fi
26495 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26496 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26497
26498 fi
26499 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26500   cat >>confdefs.h <<_ACEOF
26501 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26502 _ACEOF
26503
26504 fi
26505
26506 done
26507
26508 fi
26509
26510 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
26511                         cat >>confdefs.h <<\_ACEOF
26512 #define REENTRANT 1
26513 _ACEOF
26514
26515         cat >>confdefs.h <<\_ACEOF
26516 #define _REENTRANT 1
26517 _ACEOF
26518
26519         cat >>confdefs.h <<\_ACEOF
26520 #define THREAD_SAFE 1
26521 _ACEOF
26522
26523         cat >>confdefs.h <<\_ACEOF
26524 #define _THREAD_SAFE 1
26525 _ACEOF
26526
26527         cat >>confdefs.h <<\_ACEOF
26528 #define THREADSAFE 1
26529 _ACEOF
26530
26531         cat >>confdefs.h <<\_ACEOF
26532 #define _THREADSAFE 1
26533 _ACEOF
26534
26535         cat >>confdefs.h <<\_ACEOF
26536 #define _SGI_MP_SOURCE 1
26537 _ACEOF
26538
26539
26540                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
26541 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
26542 if test "${ol_cv_errno_thread_specific+set}" = set; then
26543   echo $ECHO_N "(cached) $ECHO_C" >&6
26544 else
26545
26546                 cat >conftest.$ac_ext <<_ACEOF
26547 /* confdefs.h.  */
26548 _ACEOF
26549 cat confdefs.h >>conftest.$ac_ext
26550 cat >>conftest.$ac_ext <<_ACEOF
26551 /* end confdefs.h.  */
26552 #include <errno.h>
26553 int
26554 main ()
26555 {
26556 errno = 0;
26557   ;
26558   return 0;
26559 }
26560 _ACEOF
26561 rm -f conftest.$ac_objext conftest$ac_exeext
26562 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26563   (eval $ac_link) 2>conftest.er1
26564   ac_status=$?
26565   grep -v '^ *+' conftest.er1 >conftest.err
26566   rm -f conftest.er1
26567   cat conftest.err >&5
26568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26569   (exit $ac_status); } &&
26570          { ac_try='test -z "$ac_c_werror_flag"
26571                          || test ! -s conftest.err'
26572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26573   (eval $ac_try) 2>&5
26574   ac_status=$?
26575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26576   (exit $ac_status); }; } &&
26577          { ac_try='test -s conftest$ac_exeext'
26578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26579   (eval $ac_try) 2>&5
26580   ac_status=$?
26581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26582   (exit $ac_status); }; }; then
26583   ol_cv_errno_thread_specific=yes
26584 else
26585   echo "$as_me: failed program was:" >&5
26586 sed 's/^/| /' conftest.$ac_ext >&5
26587
26588 ol_cv_errno_thread_specific=no
26589 fi
26590 rm -f conftest.err conftest.$ac_objext \
26591       conftest$ac_exeext conftest.$ac_ext
26592
26593 fi
26594 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
26595 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
26596
26597                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
26598 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
26599 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
26600   echo $ECHO_N "(cached) $ECHO_C" >&6
26601 else
26602
26603                 cat >conftest.$ac_ext <<_ACEOF
26604 /* confdefs.h.  */
26605 _ACEOF
26606 cat confdefs.h >>conftest.$ac_ext
26607 cat >>conftest.$ac_ext <<_ACEOF
26608 /* end confdefs.h.  */
26609 #include <netdb.h>
26610 int
26611 main ()
26612 {
26613 h_errno = 0;
26614   ;
26615   return 0;
26616 }
26617 _ACEOF
26618 rm -f conftest.$ac_objext conftest$ac_exeext
26619 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26620   (eval $ac_link) 2>conftest.er1
26621   ac_status=$?
26622   grep -v '^ *+' conftest.er1 >conftest.err
26623   rm -f conftest.er1
26624   cat conftest.err >&5
26625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26626   (exit $ac_status); } &&
26627          { ac_try='test -z "$ac_c_werror_flag"
26628                          || test ! -s conftest.err'
26629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26630   (eval $ac_try) 2>&5
26631   ac_status=$?
26632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26633   (exit $ac_status); }; } &&
26634          { ac_try='test -s conftest$ac_exeext'
26635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26636   (eval $ac_try) 2>&5
26637   ac_status=$?
26638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26639   (exit $ac_status); }; }; then
26640   ol_cv_h_errno_thread_specific=yes
26641 else
26642   echo "$as_me: failed program was:" >&5
26643 sed 's/^/| /' conftest.$ac_ext >&5
26644
26645 ol_cv_h_errno_thread_specific=no
26646 fi
26647 rm -f conftest.err conftest.$ac_objext \
26648       conftest$ac_exeext conftest.$ac_ext
26649
26650 fi
26651 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
26652 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
26653
26654         if test $ol_cv_errno_thread_specific != yes ||
26655            test $ol_cv_h_errno_thread_specific != yes ; then
26656                 LIBS="$LTHREAD_LIBS $LIBS"
26657                 LTHREAD_LIBS=""
26658         fi
26659
26660 fi
26661
26662 if test $ol_link_threads = no ; then
26663         if test $ol_with_threads = yes ; then
26664                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
26665 echo "$as_me: error: no suitable thread support" >&2;}
26666    { (exit 1); exit 1; }; }
26667         fi
26668
26669         if test $ol_with_threads = auto ; then
26670                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
26671 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
26672                 ol_with_threads=no
26673         fi
26674
26675
26676 cat >>confdefs.h <<\_ACEOF
26677 #define NO_THREADS 1
26678 _ACEOF
26679
26680         LTHREAD_LIBS=""
26681         BUILD_THREAD=no
26682 else
26683         BUILD_THREAD=yes
26684 fi
26685
26686 if test $ol_link_threads != no ; then
26687
26688 cat >>confdefs.h <<\_ACEOF
26689 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
26690 _ACEOF
26691
26692 fi
26693
26694
26695
26696
26697 for ac_func in \
26698         ctime_r                 \
26699         gethostbyname_r gethostbyaddr_r \
26700
26701 do
26702 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26703 echo "$as_me:$LINENO: checking for $ac_func" >&5
26704 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26705 if eval "test \"\${$as_ac_var+set}\" = set"; then
26706   echo $ECHO_N "(cached) $ECHO_C" >&6
26707 else
26708   cat >conftest.$ac_ext <<_ACEOF
26709 /* confdefs.h.  */
26710 _ACEOF
26711 cat confdefs.h >>conftest.$ac_ext
26712 cat >>conftest.$ac_ext <<_ACEOF
26713 /* end confdefs.h.  */
26714 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26715    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26716 #define $ac_func innocuous_$ac_func
26717
26718 /* System header to define __stub macros and hopefully few prototypes,
26719     which can conflict with char $ac_func (); below.
26720     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26721     <limits.h> exists even on freestanding compilers.  */
26722
26723 #ifdef __STDC__
26724 # include <limits.h>
26725 #else
26726 # include <assert.h>
26727 #endif
26728
26729 #undef $ac_func
26730
26731 /* Override any gcc2 internal prototype to avoid an error.  */
26732 #ifdef __cplusplus
26733 extern "C"
26734 {
26735 #endif
26736 /* We use char because int might match the return type of a gcc2
26737    builtin and then its argument prototype would still apply.  */
26738 char $ac_func ();
26739 /* The GNU C library defines this for functions which it implements
26740     to always fail with ENOSYS.  Some functions are actually named
26741     something starting with __ and the normal name is an alias.  */
26742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26743 choke me
26744 #else
26745 char (*f) () = $ac_func;
26746 #endif
26747 #ifdef __cplusplus
26748 }
26749 #endif
26750
26751 int
26752 main ()
26753 {
26754 return f != $ac_func;
26755   ;
26756   return 0;
26757 }
26758 _ACEOF
26759 rm -f conftest.$ac_objext conftest$ac_exeext
26760 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26761   (eval $ac_link) 2>conftest.er1
26762   ac_status=$?
26763   grep -v '^ *+' conftest.er1 >conftest.err
26764   rm -f conftest.er1
26765   cat conftest.err >&5
26766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26767   (exit $ac_status); } &&
26768          { ac_try='test -z "$ac_c_werror_flag"
26769                          || test ! -s conftest.err'
26770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26771   (eval $ac_try) 2>&5
26772   ac_status=$?
26773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26774   (exit $ac_status); }; } &&
26775          { ac_try='test -s conftest$ac_exeext'
26776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26777   (eval $ac_try) 2>&5
26778   ac_status=$?
26779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26780   (exit $ac_status); }; }; then
26781   eval "$as_ac_var=yes"
26782 else
26783   echo "$as_me: failed program was:" >&5
26784 sed 's/^/| /' conftest.$ac_ext >&5
26785
26786 eval "$as_ac_var=no"
26787 fi
26788 rm -f conftest.err conftest.$ac_objext \
26789       conftest$ac_exeext conftest.$ac_ext
26790 fi
26791 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
26792 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26793 if test `eval echo '${'$as_ac_var'}'` = yes; then
26794   cat >>confdefs.h <<_ACEOF
26795 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26796 _ACEOF
26797
26798 fi
26799 done
26800
26801
26802 if test "$ac_cv_func_ctime_r" = no ; then
26803         ol_cv_func_ctime_r_nargs=0
26804 else
26805         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
26806 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
26807 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
26808   echo $ECHO_N "(cached) $ECHO_C" >&6
26809 else
26810   cat >conftest.$ac_ext <<_ACEOF
26811 /* confdefs.h.  */
26812 _ACEOF
26813 cat confdefs.h >>conftest.$ac_ext
26814 cat >>conftest.$ac_ext <<_ACEOF
26815 /* end confdefs.h.  */
26816 #include <time.h>
26817 int
26818 main ()
26819 {
26820 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
26821   ;
26822   return 0;
26823 }
26824 _ACEOF
26825 rm -f conftest.$ac_objext
26826 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26827   (eval $ac_compile) 2>conftest.er1
26828   ac_status=$?
26829   grep -v '^ *+' conftest.er1 >conftest.err
26830   rm -f conftest.er1
26831   cat conftest.err >&5
26832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26833   (exit $ac_status); } &&
26834          { ac_try='test -z "$ac_c_werror_flag"
26835                          || test ! -s conftest.err'
26836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26837   (eval $ac_try) 2>&5
26838   ac_status=$?
26839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26840   (exit $ac_status); }; } &&
26841          { ac_try='test -s conftest.$ac_objext'
26842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26843   (eval $ac_try) 2>&5
26844   ac_status=$?
26845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26846   (exit $ac_status); }; }; then
26847   ol_cv_func_ctime_r_nargs3=yes
26848 else
26849   echo "$as_me: failed program was:" >&5
26850 sed 's/^/| /' conftest.$ac_ext >&5
26851
26852 ol_cv_func_ctime_r_nargs3=no
26853 fi
26854 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26855
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 <time.h>
26863 int
26864 main ()
26865 {
26866 time_t ti; char *buffer; ctime_r(&ti,buffer);
26867   ;
26868   return 0;
26869 }
26870 _ACEOF
26871 rm -f conftest.$ac_objext
26872 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26873   (eval $ac_compile) 2>conftest.er1
26874   ac_status=$?
26875   grep -v '^ *+' conftest.er1 >conftest.err
26876   rm -f conftest.er1
26877   cat conftest.err >&5
26878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26879   (exit $ac_status); } &&
26880          { ac_try='test -z "$ac_c_werror_flag"
26881                          || test ! -s conftest.err'
26882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26883   (eval $ac_try) 2>&5
26884   ac_status=$?
26885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26886   (exit $ac_status); }; } &&
26887          { ac_try='test -s conftest.$ac_objext'
26888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26889   (eval $ac_try) 2>&5
26890   ac_status=$?
26891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26892   (exit $ac_status); }; }; then
26893   ol_cv_func_ctime_r_nargs2=yes
26894 else
26895   echo "$as_me: failed program was:" >&5
26896 sed 's/^/| /' conftest.$ac_ext >&5
26897
26898 ol_cv_func_ctime_r_nargs2=no
26899 fi
26900 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26901
26902         if test $ol_cv_func_ctime_r_nargs3 = yes &&
26903            test $ol_cv_func_ctime_r_nargs2 = no ; then
26904
26905                 ol_cv_func_ctime_r_nargs=3
26906
26907         elif test $ol_cv_func_ctime_r_nargs3 = no &&
26908              test $ol_cv_func_ctime_r_nargs2 = yes ; then
26909
26910                 ol_cv_func_ctime_r_nargs=2
26911
26912         else
26913                 ol_cv_func_ctime_r_nargs=0
26914         fi
26915
26916 fi
26917 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
26918 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
26919
26920   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
26921
26922 cat >>confdefs.h <<_ACEOF
26923 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
26924 _ACEOF
26925
26926   fi
26927
26928 fi
26929
26930 if test "$ac_cv_func_gethostbyname_r" = yes ; then
26931         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
26932 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
26933 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
26934   echo $ECHO_N "(cached) $ECHO_C" >&6
26935 else
26936   cat >conftest.$ac_ext <<_ACEOF
26937 /* confdefs.h.  */
26938 _ACEOF
26939 cat confdefs.h >>conftest.$ac_ext
26940 cat >>conftest.$ac_ext <<_ACEOF
26941 /* end confdefs.h.  */
26942 #include <sys/types.h>
26943 #include <sys/socket.h>
26944 #include <netinet/in.h>
26945 #include <netdb.h>
26946 #define BUFSIZE (sizeof(struct hostent)+10)
26947 int
26948 main ()
26949 {
26950 struct hostent hent; char buffer[BUFSIZE];
26951                 int bufsize=BUFSIZE;int h_errno;
26952                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
26953                         buffer, bufsize, &h_errno);
26954   ;
26955   return 0;
26956 }
26957 _ACEOF
26958 rm -f conftest.$ac_objext
26959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26960   (eval $ac_compile) 2>conftest.er1
26961   ac_status=$?
26962   grep -v '^ *+' conftest.er1 >conftest.err
26963   rm -f conftest.er1
26964   cat conftest.err >&5
26965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26966   (exit $ac_status); } &&
26967          { ac_try='test -z "$ac_c_werror_flag"
26968                          || test ! -s conftest.err'
26969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26970   (eval $ac_try) 2>&5
26971   ac_status=$?
26972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26973   (exit $ac_status); }; } &&
26974          { ac_try='test -s conftest.$ac_objext'
26975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26976   (eval $ac_try) 2>&5
26977   ac_status=$?
26978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26979   (exit $ac_status); }; }; then
26980   ol_cv_func_gethostbyname_r_nargs5=yes
26981 else
26982   echo "$as_me: failed program was:" >&5
26983 sed 's/^/| /' conftest.$ac_ext >&5
26984
26985 ol_cv_func_gethostbyname_r_nargs5=no
26986 fi
26987 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
26988
26989         cat >conftest.$ac_ext <<_ACEOF
26990 /* confdefs.h.  */
26991 _ACEOF
26992 cat confdefs.h >>conftest.$ac_ext
26993 cat >>conftest.$ac_ext <<_ACEOF
26994 /* end confdefs.h.  */
26995 #include <sys/types.h>
26996 #include <sys/socket.h>
26997 #include <netinet/in.h>
26998 #include <netdb.h>
26999 #define BUFSIZE (sizeof(struct hostent)+10)
27000 int
27001 main ()
27002 {
27003 struct hostent hent;struct hostent *rhent;
27004                 char buffer[BUFSIZE];
27005                 int bufsize=BUFSIZE;int h_errno;
27006                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
27007                         &rhent, &h_errno);
27008   ;
27009   return 0;
27010 }
27011 _ACEOF
27012 rm -f conftest.$ac_objext
27013 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27014   (eval $ac_compile) 2>conftest.er1
27015   ac_status=$?
27016   grep -v '^ *+' conftest.er1 >conftest.err
27017   rm -f conftest.er1
27018   cat conftest.err >&5
27019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27020   (exit $ac_status); } &&
27021          { ac_try='test -z "$ac_c_werror_flag"
27022                          || test ! -s conftest.err'
27023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27024   (eval $ac_try) 2>&5
27025   ac_status=$?
27026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27027   (exit $ac_status); }; } &&
27028          { ac_try='test -s conftest.$ac_objext'
27029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27030   (eval $ac_try) 2>&5
27031   ac_status=$?
27032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27033   (exit $ac_status); }; }; then
27034   ol_cv_func_gethostbyname_r_nargs6=yes
27035 else
27036   echo "$as_me: failed program was:" >&5
27037 sed 's/^/| /' conftest.$ac_ext >&5
27038
27039 ol_cv_func_gethostbyname_r_nargs6=no
27040 fi
27041 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27042
27043         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
27044            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
27045
27046                 ol_cv_func_gethostbyname_r_nargs=5
27047
27048         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
27049              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
27050
27051                 ol_cv_func_gethostbyname_r_nargs=6
27052
27053         else
27054                 ol_cv_func_gethostbyname_r_nargs=0
27055         fi
27056
27057 fi
27058 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
27059 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
27060   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
27061
27062 cat >>confdefs.h <<_ACEOF
27063 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
27064 _ACEOF
27065
27066   fi
27067
27068 else
27069         ol_cv_func_gethostbyname_r_nargs=0
27070 fi
27071
27072 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
27073         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
27074 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
27075 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
27076   echo $ECHO_N "(cached) $ECHO_C" >&6
27077 else
27078   cat >conftest.$ac_ext <<_ACEOF
27079 /* confdefs.h.  */
27080 _ACEOF
27081 cat confdefs.h >>conftest.$ac_ext
27082 cat >>conftest.$ac_ext <<_ACEOF
27083 /* end confdefs.h.  */
27084 #include <sys/types.h>
27085 #include <sys/socket.h>
27086 #include <netinet/in.h>
27087 #include <netdb.h>
27088 #define BUFSIZE (sizeof(struct hostent)+10)
27089 int
27090 main ()
27091 {
27092 struct hostent hent; char buffer[BUFSIZE];
27093             struct in_addr add;
27094             size_t alen=sizeof(struct in_addr);
27095             int bufsize=BUFSIZE;int h_errno;
27096                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27097                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
27098   ;
27099   return 0;
27100 }
27101 _ACEOF
27102 rm -f conftest.$ac_objext
27103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27104   (eval $ac_compile) 2>conftest.er1
27105   ac_status=$?
27106   grep -v '^ *+' conftest.er1 >conftest.err
27107   rm -f conftest.er1
27108   cat conftest.err >&5
27109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27110   (exit $ac_status); } &&
27111          { ac_try='test -z "$ac_c_werror_flag"
27112                          || test ! -s conftest.err'
27113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27114   (eval $ac_try) 2>&5
27115   ac_status=$?
27116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27117   (exit $ac_status); }; } &&
27118          { ac_try='test -s conftest.$ac_objext'
27119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27120   (eval $ac_try) 2>&5
27121   ac_status=$?
27122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27123   (exit $ac_status); }; }; then
27124   ol_cv_func_gethostbyaddr_r_nargs7=yes
27125 else
27126   echo "$as_me: failed program was:" >&5
27127 sed 's/^/| /' conftest.$ac_ext >&5
27128
27129 ol_cv_func_gethostbyaddr_r_nargs7=no
27130 fi
27131 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27132
27133         cat >conftest.$ac_ext <<_ACEOF
27134 /* confdefs.h.  */
27135 _ACEOF
27136 cat confdefs.h >>conftest.$ac_ext
27137 cat >>conftest.$ac_ext <<_ACEOF
27138 /* end confdefs.h.  */
27139 #include <sys/types.h>
27140 #include <sys/socket.h>
27141 #include <netinet/in.h>
27142 #include <netdb.h>
27143 #define BUFSIZE (sizeof(struct hostent)+10)
27144 int
27145 main ()
27146 {
27147 struct hostent hent;
27148                 struct hostent *rhent; char buffer[BUFSIZE];
27149                 struct in_addr add;
27150                 size_t alen=sizeof(struct in_addr);
27151                 int bufsize=BUFSIZE;int h_errno;
27152                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
27153                         alen, AF_INET, &hent, buffer, bufsize,
27154                         &rhent, &h_errno);
27155   ;
27156   return 0;
27157 }
27158 _ACEOF
27159 rm -f conftest.$ac_objext
27160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27161   (eval $ac_compile) 2>conftest.er1
27162   ac_status=$?
27163   grep -v '^ *+' conftest.er1 >conftest.err
27164   rm -f conftest.er1
27165   cat conftest.err >&5
27166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27167   (exit $ac_status); } &&
27168          { ac_try='test -z "$ac_c_werror_flag"
27169                          || test ! -s conftest.err'
27170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27171   (eval $ac_try) 2>&5
27172   ac_status=$?
27173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27174   (exit $ac_status); }; } &&
27175          { ac_try='test -s conftest.$ac_objext'
27176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27177   (eval $ac_try) 2>&5
27178   ac_status=$?
27179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27180   (exit $ac_status); }; }; then
27181   ol_cv_func_gethostbyaddr_r_nargs8=yes
27182 else
27183   echo "$as_me: failed program was:" >&5
27184 sed 's/^/| /' conftest.$ac_ext >&5
27185
27186 ol_cv_func_gethostbyaddr_r_nargs8=no
27187 fi
27188 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27189
27190         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
27191            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
27192
27193                 ol_cv_func_gethostbyaddr_r_nargs=7
27194
27195         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
27196              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
27197
27198                 ol_cv_func_gethostbyaddr_r_nargs=8
27199
27200         else
27201                 ol_cv_func_gethostbyaddr_r_nargs=0
27202         fi
27203
27204 fi
27205 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
27206 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
27207   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
27208
27209 cat >>confdefs.h <<_ACEOF
27210 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
27211 _ACEOF
27212
27213   fi
27214
27215 else
27216         ol_cv_func_gethostbyaddr_r_nargs=0
27217 fi
27218
27219 ol_link_bdb=no
27220
27221 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
27222         ol_cv_berkeley_db=no
27223
27224 for ac_header in db.h
27225 do
27226 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27228   echo "$as_me:$LINENO: checking for $ac_header" >&5
27229 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27230 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27231   echo $ECHO_N "(cached) $ECHO_C" >&6
27232 fi
27233 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27234 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27235 else
27236   # Is the header compilable?
27237 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27238 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27239 cat >conftest.$ac_ext <<_ACEOF
27240 /* confdefs.h.  */
27241 _ACEOF
27242 cat confdefs.h >>conftest.$ac_ext
27243 cat >>conftest.$ac_ext <<_ACEOF
27244 /* end confdefs.h.  */
27245 $ac_includes_default
27246 #include <$ac_header>
27247 _ACEOF
27248 rm -f conftest.$ac_objext
27249 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27250   (eval $ac_compile) 2>conftest.er1
27251   ac_status=$?
27252   grep -v '^ *+' conftest.er1 >conftest.err
27253   rm -f conftest.er1
27254   cat conftest.err >&5
27255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27256   (exit $ac_status); } &&
27257          { ac_try='test -z "$ac_c_werror_flag"
27258                          || test ! -s conftest.err'
27259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27260   (eval $ac_try) 2>&5
27261   ac_status=$?
27262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27263   (exit $ac_status); }; } &&
27264          { ac_try='test -s conftest.$ac_objext'
27265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27266   (eval $ac_try) 2>&5
27267   ac_status=$?
27268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27269   (exit $ac_status); }; }; then
27270   ac_header_compiler=yes
27271 else
27272   echo "$as_me: failed program was:" >&5
27273 sed 's/^/| /' conftest.$ac_ext >&5
27274
27275 ac_header_compiler=no
27276 fi
27277 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
27278 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27279 echo "${ECHO_T}$ac_header_compiler" >&6
27280
27281 # Is the header present?
27282 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27283 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27284 cat >conftest.$ac_ext <<_ACEOF
27285 /* confdefs.h.  */
27286 _ACEOF
27287 cat confdefs.h >>conftest.$ac_ext
27288 cat >>conftest.$ac_ext <<_ACEOF
27289 /* end confdefs.h.  */
27290 #include <$ac_header>
27291 _ACEOF
27292 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27294   ac_status=$?
27295   grep -v '^ *+' conftest.er1 >conftest.err
27296   rm -f conftest.er1
27297   cat conftest.err >&5
27298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27299   (exit $ac_status); } >/dev/null; then
27300   if test -s conftest.err; then
27301     ac_cpp_err=$ac_c_preproc_warn_flag
27302     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
27303   else
27304     ac_cpp_err=
27305   fi
27306 else
27307   ac_cpp_err=yes
27308 fi
27309 if test -z "$ac_cpp_err"; then
27310   ac_header_preproc=yes
27311 else
27312   echo "$as_me: failed program was:" >&5
27313 sed 's/^/| /' conftest.$ac_ext >&5
27314
27315   ac_header_preproc=no
27316 fi
27317 rm -f conftest.err conftest.$ac_ext
27318 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27319 echo "${ECHO_T}$ac_header_preproc" >&6
27320
27321 # So?  What about this header?
27322 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27323   yes:no: )
27324     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27325 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27326     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27327 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27328     ac_header_preproc=yes
27329     ;;
27330   no:yes:* )
27331     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27332 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27333     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27334 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27335     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27336 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27337     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27338 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27339     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27340 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27341     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27342 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27343     (
27344       cat <<\_ASBOX
27345 ## --------------------------------------------- ##
27346 ## Report this to <http://www.openldap.org/its/> ##
27347 ## --------------------------------------------- ##
27348 _ASBOX
27349     ) |
27350       sed "s/^/$as_me: WARNING:     /" >&2
27351     ;;
27352 esac
27353 echo "$as_me:$LINENO: checking for $ac_header" >&5
27354 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27355 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27356   echo $ECHO_N "(cached) $ECHO_C" >&6
27357 else
27358   eval "$as_ac_Header=\$ac_header_preproc"
27359 fi
27360 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27362
27363 fi
27364 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27365   cat >>confdefs.h <<_ACEOF
27366 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27367 _ACEOF
27368
27369 fi
27370
27371 done
27372
27373 if test $ac_cv_header_db_h = yes; then
27374         ol_cv_lib_db=no
27375
27376 echo "$as_me:$LINENO: checking for Berkeley DB major version" >&5
27377 echo $ECHO_N "checking for Berkeley DB major version... $ECHO_C" >&6
27378 if test "${ol_cv_bdb_major+set}" = set; then
27379   echo $ECHO_N "(cached) $ECHO_C" >&6
27380 else
27381
27382         ol_cv_bdb_major=0
27383         if test $ol_cv_bdb_major = 0 ; then
27384                 cat >conftest.$ac_ext <<_ACEOF
27385 /* confdefs.h.  */
27386 _ACEOF
27387 cat confdefs.h >>conftest.$ac_ext
27388 cat >>conftest.$ac_ext <<_ACEOF
27389 /* end confdefs.h.  */
27390
27391 #include <db.h>
27392 #ifndef DB_VERSION_MAJOR
27393 #       define DB_VERSION_MAJOR 1
27394 #endif
27395 #if DB_VERSION_MAJOR == 4
27396 __db_version
27397 #endif
27398
27399 _ACEOF
27400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27401   $EGREP "__db_version" >/dev/null 2>&1; then
27402   ol_cv_bdb_major=4
27403 else
27404   :
27405 fi
27406 rm -f conftest*
27407
27408         fi
27409         if test $ol_cv_bdb_major = 0 ; then
27410                 cat >conftest.$ac_ext <<_ACEOF
27411 /* confdefs.h.  */
27412 _ACEOF
27413 cat confdefs.h >>conftest.$ac_ext
27414 cat >>conftest.$ac_ext <<_ACEOF
27415 /* end confdefs.h.  */
27416
27417 #include <db.h>
27418 #ifndef DB_VERSION_MAJOR
27419 #       define DB_VERSION_MAJOR 1
27420 #endif
27421 #if DB_VERSION_MAJOR == 3
27422 __db_version
27423 #endif
27424
27425 _ACEOF
27426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27427   $EGREP "__db_version" >/dev/null 2>&1; then
27428   ol_cv_bdb_major=3
27429 else
27430   :
27431 fi
27432 rm -f conftest*
27433
27434         fi
27435         if test $ol_cv_bdb_major = 0 ; then
27436                 cat >conftest.$ac_ext <<_ACEOF
27437 /* confdefs.h.  */
27438 _ACEOF
27439 cat confdefs.h >>conftest.$ac_ext
27440 cat >>conftest.$ac_ext <<_ACEOF
27441 /* end confdefs.h.  */
27442
27443 #include <db.h>
27444 #ifndef DB_VERSION_MAJOR
27445 #       define DB_VERSION_MAJOR 1
27446 #endif
27447 #if DB_VERSION_MAJOR == 2
27448 __db_version
27449 #endif
27450
27451 _ACEOF
27452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27453   $EGREP "__db_version" >/dev/null 2>&1; then
27454   ol_cv_bdb_major=2
27455 else
27456   :
27457 fi
27458 rm -f conftest*
27459
27460         fi
27461         if test $ol_cv_bdb_major = 0 ; then
27462                 cat >conftest.$ac_ext <<_ACEOF
27463 /* confdefs.h.  */
27464 _ACEOF
27465 cat confdefs.h >>conftest.$ac_ext
27466 cat >>conftest.$ac_ext <<_ACEOF
27467 /* end confdefs.h.  */
27468
27469 #include <db.h>
27470 #ifndef DB_VERSION_MAJOR
27471 #       define DB_VERSION_MAJOR 1
27472 #endif
27473 #if DB_VERSION_MAJOR == 1
27474 __db_version
27475 #endif
27476
27477 _ACEOF
27478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27479   $EGREP "__db_version" >/dev/null 2>&1; then
27480   ol_cv_bdb_major=1
27481 else
27482   :
27483 fi
27484 rm -f conftest*
27485
27486         fi
27487
27488         if test $ol_cv_bdb_major = 0 ; then
27489                 { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version" >&5
27490 echo "$as_me: error: Unknown Berkeley DB major version" >&2;}
27491    { (exit 1); exit 1; }; }
27492         fi
27493
27494 fi
27495 echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
27496 echo "${ECHO_T}$ol_cv_bdb_major" >&6
27497
27498 echo "$as_me:$LINENO: checking for Berkeley DB minor version" >&5
27499 echo $ECHO_N "checking for Berkeley DB minor version... $ECHO_C" >&6
27500 if test "${ol_cv_bdb_minor+set}" = set; then
27501   echo $ECHO_N "(cached) $ECHO_C" >&6
27502 else
27503
27504         ol_cv_bdb_minor=0
27505         if test $ol_cv_bdb_minor = 0 ; then
27506                 cat >conftest.$ac_ext <<_ACEOF
27507 /* confdefs.h.  */
27508 _ACEOF
27509 cat confdefs.h >>conftest.$ac_ext
27510 cat >>conftest.$ac_ext <<_ACEOF
27511 /* end confdefs.h.  */
27512
27513 #include <db.h>
27514 #ifndef DB_VERSION_MINOR
27515 #       define DB_VERSION_MINOR 0
27516 #endif
27517 #if DB_VERSION_MINOR == 9
27518 __db_version
27519 #endif
27520
27521 _ACEOF
27522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27523   $EGREP "__db_version" >/dev/null 2>&1; then
27524   ol_cv_bdb_minor=9
27525 else
27526   :
27527 fi
27528 rm -f conftest*
27529
27530         fi
27531         if test $ol_cv_bdb_minor = 0 ; then
27532                 cat >conftest.$ac_ext <<_ACEOF
27533 /* confdefs.h.  */
27534 _ACEOF
27535 cat confdefs.h >>conftest.$ac_ext
27536 cat >>conftest.$ac_ext <<_ACEOF
27537 /* end confdefs.h.  */
27538
27539 #include <db.h>
27540 #ifndef DB_VERSION_MINOR
27541 #       define DB_VERSION_MINOR 0
27542 #endif
27543 #if DB_VERSION_MINOR == 8
27544 __db_version
27545 #endif
27546
27547 _ACEOF
27548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27549   $EGREP "__db_version" >/dev/null 2>&1; then
27550   ol_cv_bdb_minor=8
27551 else
27552   :
27553 fi
27554 rm -f conftest*
27555
27556         fi
27557         if test $ol_cv_bdb_minor = 0 ; then
27558                 cat >conftest.$ac_ext <<_ACEOF
27559 /* confdefs.h.  */
27560 _ACEOF
27561 cat confdefs.h >>conftest.$ac_ext
27562 cat >>conftest.$ac_ext <<_ACEOF
27563 /* end confdefs.h.  */
27564
27565 #include <db.h>
27566 #ifndef DB_VERSION_MINOR
27567 #       define DB_VERSION_MINOR 0
27568 #endif
27569 #if DB_VERSION_MINOR == 7
27570 __db_version
27571 #endif
27572
27573 _ACEOF
27574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27575   $EGREP "__db_version" >/dev/null 2>&1; then
27576   ol_cv_bdb_minor=7
27577 else
27578   :
27579 fi
27580 rm -f conftest*
27581
27582         fi
27583         if test $ol_cv_bdb_minor = 0 ; then
27584                 cat >conftest.$ac_ext <<_ACEOF
27585 /* confdefs.h.  */
27586 _ACEOF
27587 cat confdefs.h >>conftest.$ac_ext
27588 cat >>conftest.$ac_ext <<_ACEOF
27589 /* end confdefs.h.  */
27590
27591 #include <db.h>
27592 #ifndef DB_VERSION_MINOR
27593 #       define DB_VERSION_MINOR 0
27594 #endif
27595 #if DB_VERSION_MINOR == 6
27596 __db_version
27597 #endif
27598
27599 _ACEOF
27600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27601   $EGREP "__db_version" >/dev/null 2>&1; then
27602   ol_cv_bdb_minor=6
27603 else
27604   :
27605 fi
27606 rm -f conftest*
27607
27608         fi
27609         if test $ol_cv_bdb_minor = 0 ; then
27610                 cat >conftest.$ac_ext <<_ACEOF
27611 /* confdefs.h.  */
27612 _ACEOF
27613 cat confdefs.h >>conftest.$ac_ext
27614 cat >>conftest.$ac_ext <<_ACEOF
27615 /* end confdefs.h.  */
27616
27617 #include <db.h>
27618 #ifndef DB_VERSION_MINOR
27619 #       define DB_VERSION_MINOR 0
27620 #endif
27621 #if DB_VERSION_MINOR == 5
27622 __db_version
27623 #endif
27624
27625 _ACEOF
27626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27627   $EGREP "__db_version" >/dev/null 2>&1; then
27628   ol_cv_bdb_minor=5
27629 else
27630   :
27631 fi
27632 rm -f conftest*
27633
27634         fi
27635         if test $ol_cv_bdb_minor = 0 ; then
27636                 cat >conftest.$ac_ext <<_ACEOF
27637 /* confdefs.h.  */
27638 _ACEOF
27639 cat confdefs.h >>conftest.$ac_ext
27640 cat >>conftest.$ac_ext <<_ACEOF
27641 /* end confdefs.h.  */
27642
27643 #include <db.h>
27644 #ifndef DB_VERSION_MINOR
27645 #       define DB_VERSION_MINOR 0
27646 #endif
27647 #if DB_VERSION_MINOR == 4
27648 __db_version
27649 #endif
27650
27651 _ACEOF
27652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27653   $EGREP "__db_version" >/dev/null 2>&1; then
27654   ol_cv_bdb_minor=4
27655 else
27656   :
27657 fi
27658 rm -f conftest*
27659
27660         fi
27661         if test $ol_cv_bdb_minor = 0 ; then
27662                 cat >conftest.$ac_ext <<_ACEOF
27663 /* confdefs.h.  */
27664 _ACEOF
27665 cat confdefs.h >>conftest.$ac_ext
27666 cat >>conftest.$ac_ext <<_ACEOF
27667 /* end confdefs.h.  */
27668
27669 #include <db.h>
27670 #ifndef DB_VERSION_MINOR
27671 #       define DB_VERSION_MINOR 0
27672 #endif
27673 #if DB_VERSION_MINOR == 3
27674 __db_version
27675 #endif
27676
27677 _ACEOF
27678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27679   $EGREP "__db_version" >/dev/null 2>&1; then
27680   ol_cv_bdb_minor=3
27681 else
27682   :
27683 fi
27684 rm -f conftest*
27685
27686         fi
27687         if test $ol_cv_bdb_minor = 0 ; then
27688                 cat >conftest.$ac_ext <<_ACEOF
27689 /* confdefs.h.  */
27690 _ACEOF
27691 cat confdefs.h >>conftest.$ac_ext
27692 cat >>conftest.$ac_ext <<_ACEOF
27693 /* end confdefs.h.  */
27694
27695 #include <db.h>
27696 #ifndef DB_VERSION_MINOR
27697 #       define DB_VERSION_MINOR 0
27698 #endif
27699 #if DB_VERSION_MINOR == 2
27700 __db_version
27701 #endif
27702
27703 _ACEOF
27704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27705   $EGREP "__db_version" >/dev/null 2>&1; then
27706   ol_cv_bdb_minor=2
27707 else
27708   :
27709 fi
27710 rm -f conftest*
27711
27712         fi
27713         if test $ol_cv_bdb_minor = 0 ; then
27714                 cat >conftest.$ac_ext <<_ACEOF
27715 /* confdefs.h.  */
27716 _ACEOF
27717 cat confdefs.h >>conftest.$ac_ext
27718 cat >>conftest.$ac_ext <<_ACEOF
27719 /* end confdefs.h.  */
27720
27721 #include <db.h>
27722 #ifndef DB_VERSION_MINOR
27723 #       define DB_VERSION_MINOR 0
27724 #endif
27725 #if DB_VERSION_MINOR == 1
27726 __db_version
27727 #endif
27728
27729 _ACEOF
27730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27731   $EGREP "__db_version" >/dev/null 2>&1; then
27732   ol_cv_bdb_minor=1
27733 else
27734   :
27735 fi
27736 rm -f conftest*
27737
27738         fi
27739
27740 fi
27741 echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
27742 echo "${ECHO_T}$ol_cv_bdb_minor" >&6
27743
27744 if test $ol_cv_bdb_major = 4 ; then
27745         if test $ol_cv_bdb_minor = 6 ; then
27746                 if test $ol_cv_lib_db = no ; then
27747         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.6)" >&5
27748 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.6)... $ECHO_C" >&6
27749 if test "${ol_cv_db_db_4_dot_6+set}" = set; then
27750   echo $ECHO_N "(cached) $ECHO_C" >&6
27751 else
27752
27753         ol_DB_LIB=-ldb-4.6
27754         ol_LIBS=$LIBS
27755         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
27756
27757         cat >conftest.$ac_ext <<_ACEOF
27758 /* confdefs.h.  */
27759 _ACEOF
27760 cat confdefs.h >>conftest.$ac_ext
27761 cat >>conftest.$ac_ext <<_ACEOF
27762 /* end confdefs.h.  */
27763
27764 #ifdef HAVE_DB_185_H
27765 # include <db_185.h>
27766 #else
27767 # include <db.h>
27768 #endif
27769
27770 #ifndef DB_VERSION_MAJOR
27771 # define DB_VERSION_MAJOR 1
27772 #endif
27773
27774 #ifndef NULL
27775 #define NULL ((void*)0)
27776 #endif
27777
27778 int
27779 main ()
27780 {
27781
27782 #if DB_VERSION_MAJOR > 1
27783         {
27784                 char *version;
27785                 int major, minor, patch;
27786
27787                 version = db_version( &major, &minor, &patch );
27788
27789                 if( major != DB_VERSION_MAJOR ||
27790                         minor < DB_VERSION_MINOR )
27791                 {
27792                         printf("Berkeley DB version mismatch\n"
27793                                 "\theader: %s\n\tlibrary: %s\n",
27794                                 DB_VERSION_STRING, version);
27795                         return 1;
27796                 }
27797         }
27798 #endif
27799
27800 #if DB_VERSION_MAJOR > 2
27801         db_env_create( NULL, 0 );
27802 #elif DB_VERSION_MAJOR > 1
27803         db_appexit( NULL );
27804 #else
27805         (void) dbopen( NULL, 0, 0, 0, NULL);
27806 #endif
27807
27808   ;
27809   return 0;
27810 }
27811 _ACEOF
27812 rm -f conftest.$ac_objext conftest$ac_exeext
27813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27814   (eval $ac_link) 2>conftest.er1
27815   ac_status=$?
27816   grep -v '^ *+' conftest.er1 >conftest.err
27817   rm -f conftest.er1
27818   cat conftest.err >&5
27819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27820   (exit $ac_status); } &&
27821          { ac_try='test -z "$ac_c_werror_flag"
27822                          || test ! -s conftest.err'
27823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27824   (eval $ac_try) 2>&5
27825   ac_status=$?
27826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27827   (exit $ac_status); }; } &&
27828          { ac_try='test -s conftest$ac_exeext'
27829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27830   (eval $ac_try) 2>&5
27831   ac_status=$?
27832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27833   (exit $ac_status); }; }; then
27834   ol_cv_db_db_4_dot_6=yes
27835 else
27836   echo "$as_me: failed program was:" >&5
27837 sed 's/^/| /' conftest.$ac_ext >&5
27838
27839 ol_cv_db_db_4_dot_6=no
27840 fi
27841 rm -f conftest.err conftest.$ac_objext \
27842       conftest$ac_exeext conftest.$ac_ext
27843
27844         LIBS="$ol_LIBS"
27845
27846 fi
27847 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_6" >&5
27848 echo "${ECHO_T}$ol_cv_db_db_4_dot_6" >&6
27849
27850         if test $ol_cv_db_db_4_dot_6 = yes ; then
27851                 ol_cv_lib_db=-ldb-4.6
27852         fi
27853 fi
27854
27855                 if test $ol_cv_lib_db = no ; then
27856         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb46)" >&5
27857 echo $ECHO_N "checking for Berkeley DB link (-ldb46)... $ECHO_C" >&6
27858 if test "${ol_cv_db_db46+set}" = set; then
27859   echo $ECHO_N "(cached) $ECHO_C" >&6
27860 else
27861
27862         ol_DB_LIB=-ldb46
27863         ol_LIBS=$LIBS
27864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
27865
27866         cat >conftest.$ac_ext <<_ACEOF
27867 /* confdefs.h.  */
27868 _ACEOF
27869 cat confdefs.h >>conftest.$ac_ext
27870 cat >>conftest.$ac_ext <<_ACEOF
27871 /* end confdefs.h.  */
27872
27873 #ifdef HAVE_DB_185_H
27874 # include <db_185.h>
27875 #else
27876 # include <db.h>
27877 #endif
27878
27879 #ifndef DB_VERSION_MAJOR
27880 # define DB_VERSION_MAJOR 1
27881 #endif
27882
27883 #ifndef NULL
27884 #define NULL ((void*)0)
27885 #endif
27886
27887 int
27888 main ()
27889 {
27890
27891 #if DB_VERSION_MAJOR > 1
27892         {
27893                 char *version;
27894                 int major, minor, patch;
27895
27896                 version = db_version( &major, &minor, &patch );
27897
27898                 if( major != DB_VERSION_MAJOR ||
27899                         minor < DB_VERSION_MINOR )
27900                 {
27901                         printf("Berkeley DB version mismatch\n"
27902                                 "\theader: %s\n\tlibrary: %s\n",
27903                                 DB_VERSION_STRING, version);
27904                         return 1;
27905                 }
27906         }
27907 #endif
27908
27909 #if DB_VERSION_MAJOR > 2
27910         db_env_create( NULL, 0 );
27911 #elif DB_VERSION_MAJOR > 1
27912         db_appexit( NULL );
27913 #else
27914         (void) dbopen( NULL, 0, 0, 0, NULL);
27915 #endif
27916
27917   ;
27918   return 0;
27919 }
27920 _ACEOF
27921 rm -f conftest.$ac_objext conftest$ac_exeext
27922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27923   (eval $ac_link) 2>conftest.er1
27924   ac_status=$?
27925   grep -v '^ *+' conftest.er1 >conftest.err
27926   rm -f conftest.er1
27927   cat conftest.err >&5
27928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27929   (exit $ac_status); } &&
27930          { ac_try='test -z "$ac_c_werror_flag"
27931                          || test ! -s conftest.err'
27932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27933   (eval $ac_try) 2>&5
27934   ac_status=$?
27935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27936   (exit $ac_status); }; } &&
27937          { ac_try='test -s conftest$ac_exeext'
27938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27939   (eval $ac_try) 2>&5
27940   ac_status=$?
27941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27942   (exit $ac_status); }; }; then
27943   ol_cv_db_db46=yes
27944 else
27945   echo "$as_me: failed program was:" >&5
27946 sed 's/^/| /' conftest.$ac_ext >&5
27947
27948 ol_cv_db_db46=no
27949 fi
27950 rm -f conftest.err conftest.$ac_objext \
27951       conftest$ac_exeext conftest.$ac_ext
27952
27953         LIBS="$ol_LIBS"
27954
27955 fi
27956 echo "$as_me:$LINENO: result: $ol_cv_db_db46" >&5
27957 echo "${ECHO_T}$ol_cv_db_db46" >&6
27958
27959         if test $ol_cv_db_db46 = yes ; then
27960                 ol_cv_lib_db=-ldb46
27961         fi
27962 fi
27963
27964                 if test $ol_cv_lib_db = no ; then
27965         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-46)" >&5
27966 echo $ECHO_N "checking for Berkeley DB link (-ldb-46)... $ECHO_C" >&6
27967 if test "${ol_cv_db_db_46+set}" = set; then
27968   echo $ECHO_N "(cached) $ECHO_C" >&6
27969 else
27970
27971         ol_DB_LIB=-ldb-46
27972         ol_LIBS=$LIBS
27973         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
27974
27975         cat >conftest.$ac_ext <<_ACEOF
27976 /* confdefs.h.  */
27977 _ACEOF
27978 cat confdefs.h >>conftest.$ac_ext
27979 cat >>conftest.$ac_ext <<_ACEOF
27980 /* end confdefs.h.  */
27981
27982 #ifdef HAVE_DB_185_H
27983 # include <db_185.h>
27984 #else
27985 # include <db.h>
27986 #endif
27987
27988 #ifndef DB_VERSION_MAJOR
27989 # define DB_VERSION_MAJOR 1
27990 #endif
27991
27992 #ifndef NULL
27993 #define NULL ((void*)0)
27994 #endif
27995
27996 int
27997 main ()
27998 {
27999
28000 #if DB_VERSION_MAJOR > 1
28001         {
28002                 char *version;
28003                 int major, minor, patch;
28004
28005                 version = db_version( &major, &minor, &patch );
28006
28007                 if( major != DB_VERSION_MAJOR ||
28008                         minor < DB_VERSION_MINOR )
28009                 {
28010                         printf("Berkeley DB version mismatch\n"
28011                                 "\theader: %s\n\tlibrary: %s\n",
28012                                 DB_VERSION_STRING, version);
28013                         return 1;
28014                 }
28015         }
28016 #endif
28017
28018 #if DB_VERSION_MAJOR > 2
28019         db_env_create( NULL, 0 );
28020 #elif DB_VERSION_MAJOR > 1
28021         db_appexit( NULL );
28022 #else
28023         (void) dbopen( NULL, 0, 0, 0, NULL);
28024 #endif
28025
28026   ;
28027   return 0;
28028 }
28029 _ACEOF
28030 rm -f conftest.$ac_objext conftest$ac_exeext
28031 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28032   (eval $ac_link) 2>conftest.er1
28033   ac_status=$?
28034   grep -v '^ *+' conftest.er1 >conftest.err
28035   rm -f conftest.er1
28036   cat conftest.err >&5
28037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28038   (exit $ac_status); } &&
28039          { ac_try='test -z "$ac_c_werror_flag"
28040                          || test ! -s conftest.err'
28041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28042   (eval $ac_try) 2>&5
28043   ac_status=$?
28044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28045   (exit $ac_status); }; } &&
28046          { ac_try='test -s conftest$ac_exeext'
28047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28048   (eval $ac_try) 2>&5
28049   ac_status=$?
28050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28051   (exit $ac_status); }; }; then
28052   ol_cv_db_db_46=yes
28053 else
28054   echo "$as_me: failed program was:" >&5
28055 sed 's/^/| /' conftest.$ac_ext >&5
28056
28057 ol_cv_db_db_46=no
28058 fi
28059 rm -f conftest.err conftest.$ac_objext \
28060       conftest$ac_exeext conftest.$ac_ext
28061
28062         LIBS="$ol_LIBS"
28063
28064 fi
28065 echo "$as_me:$LINENO: result: $ol_cv_db_db_46" >&5
28066 echo "${ECHO_T}$ol_cv_db_db_46" >&6
28067
28068         if test $ol_cv_db_db_46 = yes ; then
28069                 ol_cv_lib_db=-ldb-46
28070         fi
28071 fi
28072
28073                 if test $ol_cv_lib_db = no ; then
28074         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-6)" >&5
28075 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-6)... $ECHO_C" >&6
28076 if test "${ol_cv_db_db_4_6+set}" = set; then
28077   echo $ECHO_N "(cached) $ECHO_C" >&6
28078 else
28079
28080         ol_DB_LIB=-ldb-4-6
28081         ol_LIBS=$LIBS
28082         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28083
28084         cat >conftest.$ac_ext <<_ACEOF
28085 /* confdefs.h.  */
28086 _ACEOF
28087 cat confdefs.h >>conftest.$ac_ext
28088 cat >>conftest.$ac_ext <<_ACEOF
28089 /* end confdefs.h.  */
28090
28091 #ifdef HAVE_DB_185_H
28092 # include <db_185.h>
28093 #else
28094 # include <db.h>
28095 #endif
28096
28097 #ifndef DB_VERSION_MAJOR
28098 # define DB_VERSION_MAJOR 1
28099 #endif
28100
28101 #ifndef NULL
28102 #define NULL ((void*)0)
28103 #endif
28104
28105 int
28106 main ()
28107 {
28108
28109 #if DB_VERSION_MAJOR > 1
28110         {
28111                 char *version;
28112                 int major, minor, patch;
28113
28114                 version = db_version( &major, &minor, &patch );
28115
28116                 if( major != DB_VERSION_MAJOR ||
28117                         minor < DB_VERSION_MINOR )
28118                 {
28119                         printf("Berkeley DB version mismatch\n"
28120                                 "\theader: %s\n\tlibrary: %s\n",
28121                                 DB_VERSION_STRING, version);
28122                         return 1;
28123                 }
28124         }
28125 #endif
28126
28127 #if DB_VERSION_MAJOR > 2
28128         db_env_create( NULL, 0 );
28129 #elif DB_VERSION_MAJOR > 1
28130         db_appexit( NULL );
28131 #else
28132         (void) dbopen( NULL, 0, 0, 0, NULL);
28133 #endif
28134
28135   ;
28136   return 0;
28137 }
28138 _ACEOF
28139 rm -f conftest.$ac_objext conftest$ac_exeext
28140 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28141   (eval $ac_link) 2>conftest.er1
28142   ac_status=$?
28143   grep -v '^ *+' conftest.er1 >conftest.err
28144   rm -f conftest.er1
28145   cat conftest.err >&5
28146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28147   (exit $ac_status); } &&
28148          { ac_try='test -z "$ac_c_werror_flag"
28149                          || test ! -s conftest.err'
28150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28151   (eval $ac_try) 2>&5
28152   ac_status=$?
28153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28154   (exit $ac_status); }; } &&
28155          { ac_try='test -s conftest$ac_exeext'
28156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28157   (eval $ac_try) 2>&5
28158   ac_status=$?
28159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28160   (exit $ac_status); }; }; then
28161   ol_cv_db_db_4_6=yes
28162 else
28163   echo "$as_me: failed program was:" >&5
28164 sed 's/^/| /' conftest.$ac_ext >&5
28165
28166 ol_cv_db_db_4_6=no
28167 fi
28168 rm -f conftest.err conftest.$ac_objext \
28169       conftest$ac_exeext conftest.$ac_ext
28170
28171         LIBS="$ol_LIBS"
28172
28173 fi
28174 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_6" >&5
28175 echo "${ECHO_T}$ol_cv_db_db_4_6" >&6
28176
28177         if test $ol_cv_db_db_4_6 = yes ; then
28178                 ol_cv_lib_db=-ldb-4-6
28179         fi
28180 fi
28181
28182         elif test $ol_cv_bdb_minor = 5 ; then
28183                 if test $ol_cv_lib_db = no ; then
28184         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.5)" >&5
28185 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.5)... $ECHO_C" >&6
28186 if test "${ol_cv_db_db_4_dot_5+set}" = set; then
28187   echo $ECHO_N "(cached) $ECHO_C" >&6
28188 else
28189
28190         ol_DB_LIB=-ldb-4.5
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_db_4_dot_5=yes
28272 else
28273   echo "$as_me: failed program was:" >&5
28274 sed 's/^/| /' conftest.$ac_ext >&5
28275
28276 ol_cv_db_db_4_dot_5=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_db_4_dot_5" >&5
28285 echo "${ECHO_T}$ol_cv_db_db_4_dot_5" >&6
28286
28287         if test $ol_cv_db_db_4_dot_5 = yes ; then
28288                 ol_cv_lib_db=-ldb-4.5
28289         fi
28290 fi
28291
28292                 if test $ol_cv_lib_db = no ; then
28293         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb45)" >&5
28294 echo $ECHO_N "checking for Berkeley DB link (-ldb45)... $ECHO_C" >&6
28295 if test "${ol_cv_db_db45+set}" = set; then
28296   echo $ECHO_N "(cached) $ECHO_C" >&6
28297 else
28298
28299         ol_DB_LIB=-ldb45
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_db45=yes
28381 else
28382   echo "$as_me: failed program was:" >&5
28383 sed 's/^/| /' conftest.$ac_ext >&5
28384
28385 ol_cv_db_db45=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_db45" >&5
28394 echo "${ECHO_T}$ol_cv_db_db45" >&6
28395
28396         if test $ol_cv_db_db45 = yes ; then
28397                 ol_cv_lib_db=-ldb45
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-45)" >&5
28403 echo $ECHO_N "checking for Berkeley DB link (-ldb-45)... $ECHO_C" >&6
28404 if test "${ol_cv_db_db_45+set}" = set; then
28405   echo $ECHO_N "(cached) $ECHO_C" >&6
28406 else
28407
28408         ol_DB_LIB=-ldb-45
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_45=yes
28490 else
28491   echo "$as_me: failed program was:" >&5
28492 sed 's/^/| /' conftest.$ac_ext >&5
28493
28494 ol_cv_db_db_45=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_45" >&5
28503 echo "${ECHO_T}$ol_cv_db_db_45" >&6
28504
28505         if test $ol_cv_db_db_45 = yes ; then
28506                 ol_cv_lib_db=-ldb-45
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-5)" >&5
28512 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-5)... $ECHO_C" >&6
28513 if test "${ol_cv_db_db_4_5+set}" = set; then
28514   echo $ECHO_N "(cached) $ECHO_C" >&6
28515 else
28516
28517         ol_DB_LIB=-ldb-4-5
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_5=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_5=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_5" >&5
28612 echo "${ECHO_T}$ol_cv_db_db_4_5" >&6
28613
28614         if test $ol_cv_db_db_4_5 = yes ; then
28615                 ol_cv_lib_db=-ldb-4-5
28616         fi
28617 fi
28618
28619         elif test $ol_cv_bdb_minor = 4 ; then
28620                 if test $ol_cv_lib_db = no ; then
28621         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.4)" >&5
28622 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.4)... $ECHO_C" >&6
28623 if test "${ol_cv_db_db_4_dot_4+set}" = set; then
28624   echo $ECHO_N "(cached) $ECHO_C" >&6
28625 else
28626
28627         ol_DB_LIB=-ldb-4.4
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_db_4_dot_4=yes
28709 else
28710   echo "$as_me: failed program was:" >&5
28711 sed 's/^/| /' conftest.$ac_ext >&5
28712
28713 ol_cv_db_db_4_dot_4=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_db_4_dot_4" >&5
28722 echo "${ECHO_T}$ol_cv_db_db_4_dot_4" >&6
28723
28724         if test $ol_cv_db_db_4_dot_4 = yes ; then
28725                 ol_cv_lib_db=-ldb-4.4
28726         fi
28727 fi
28728
28729                 if test $ol_cv_lib_db = no ; then
28730         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb44)" >&5
28731 echo $ECHO_N "checking for Berkeley DB link (-ldb44)... $ECHO_C" >&6
28732 if test "${ol_cv_db_db44+set}" = set; then
28733   echo $ECHO_N "(cached) $ECHO_C" >&6
28734 else
28735
28736         ol_DB_LIB=-ldb44
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_db44=yes
28818 else
28819   echo "$as_me: failed program was:" >&5
28820 sed 's/^/| /' conftest.$ac_ext >&5
28821
28822 ol_cv_db_db44=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_db44" >&5
28831 echo "${ECHO_T}$ol_cv_db_db44" >&6
28832
28833         if test $ol_cv_db_db44 = yes ; then
28834                 ol_cv_lib_db=-ldb44
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-44)" >&5
28840 echo $ECHO_N "checking for Berkeley DB link (-ldb-44)... $ECHO_C" >&6
28841 if test "${ol_cv_db_db_44+set}" = set; then
28842   echo $ECHO_N "(cached) $ECHO_C" >&6
28843 else
28844
28845         ol_DB_LIB=-ldb-44
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_44=yes
28927 else
28928   echo "$as_me: failed program was:" >&5
28929 sed 's/^/| /' conftest.$ac_ext >&5
28930
28931 ol_cv_db_db_44=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_44" >&5
28940 echo "${ECHO_T}$ol_cv_db_db_44" >&6
28941
28942         if test $ol_cv_db_db_44 = yes ; then
28943                 ol_cv_lib_db=-ldb-44
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-4)" >&5
28949 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-4)... $ECHO_C" >&6
28950 if test "${ol_cv_db_db_4_4+set}" = set; then
28951   echo $ECHO_N "(cached) $ECHO_C" >&6
28952 else
28953
28954         ol_DB_LIB=-ldb-4-4
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_4=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_4=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_4" >&5
29049 echo "${ECHO_T}$ol_cv_db_db_4_4" >&6
29050
29051         if test $ol_cv_db_db_4_4 = yes ; then
29052                 ol_cv_lib_db=-ldb-4-4
29053         fi
29054 fi
29055
29056         elif test $ol_cv_bdb_minor = 3 ; then
29057                 if test $ol_cv_lib_db = no ; then
29058         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.3)" >&5
29059 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.3)... $ECHO_C" >&6
29060 if test "${ol_cv_db_db_4_dot_3+set}" = set; then
29061   echo $ECHO_N "(cached) $ECHO_C" >&6
29062 else
29063
29064         ol_DB_LIB=-ldb-4.3
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_db_4_dot_3=yes
29146 else
29147   echo "$as_me: failed program was:" >&5
29148 sed 's/^/| /' conftest.$ac_ext >&5
29149
29150 ol_cv_db_db_4_dot_3=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_db_4_dot_3" >&5
29159 echo "${ECHO_T}$ol_cv_db_db_4_dot_3" >&6
29160
29161         if test $ol_cv_db_db_4_dot_3 = yes ; then
29162                 ol_cv_lib_db=-ldb-4.3
29163         fi
29164 fi
29165
29166                 if test $ol_cv_lib_db = no ; then
29167         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb43)" >&5
29168 echo $ECHO_N "checking for Berkeley DB link (-ldb43)... $ECHO_C" >&6
29169 if test "${ol_cv_db_db43+set}" = set; then
29170   echo $ECHO_N "(cached) $ECHO_C" >&6
29171 else
29172
29173         ol_DB_LIB=-ldb43
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_db43=yes
29255 else
29256   echo "$as_me: failed program was:" >&5
29257 sed 's/^/| /' conftest.$ac_ext >&5
29258
29259 ol_cv_db_db43=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_db43" >&5
29268 echo "${ECHO_T}$ol_cv_db_db43" >&6
29269
29270         if test $ol_cv_db_db43 = yes ; then
29271                 ol_cv_lib_db=-ldb43
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-43)" >&5
29277 echo $ECHO_N "checking for Berkeley DB link (-ldb-43)... $ECHO_C" >&6
29278 if test "${ol_cv_db_db_43+set}" = set; then
29279   echo $ECHO_N "(cached) $ECHO_C" >&6
29280 else
29281
29282         ol_DB_LIB=-ldb-43
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_43=yes
29364 else
29365   echo "$as_me: failed program was:" >&5
29366 sed 's/^/| /' conftest.$ac_ext >&5
29367
29368 ol_cv_db_db_43=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_43" >&5
29377 echo "${ECHO_T}$ol_cv_db_db_43" >&6
29378
29379         if test $ol_cv_db_db_43 = yes ; then
29380                 ol_cv_lib_db=-ldb-43
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-3)" >&5
29386 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-3)... $ECHO_C" >&6
29387 if test "${ol_cv_db_db_4_3+set}" = set; then
29388   echo $ECHO_N "(cached) $ECHO_C" >&6
29389 else
29390
29391         ol_DB_LIB=-ldb-4-3
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_3=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_3=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_3" >&5
29486 echo "${ECHO_T}$ol_cv_db_db_4_3" >&6
29487
29488         if test $ol_cv_db_db_4_3 = yes ; then
29489                 ol_cv_lib_db=-ldb-4-3
29490         fi
29491 fi
29492
29493         elif test $ol_cv_bdb_minor = 2 ; then
29494                 if test $ol_cv_lib_db = no ; then
29495         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.2)" >&5
29496 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.2)... $ECHO_C" >&6
29497 if test "${ol_cv_db_db_4_dot_2+set}" = set; then
29498   echo $ECHO_N "(cached) $ECHO_C" >&6
29499 else
29500
29501         ol_DB_LIB=-ldb-4.2
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_db_4_dot_2=yes
29583 else
29584   echo "$as_me: failed program was:" >&5
29585 sed 's/^/| /' conftest.$ac_ext >&5
29586
29587 ol_cv_db_db_4_dot_2=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_db_4_dot_2" >&5
29596 echo "${ECHO_T}$ol_cv_db_db_4_dot_2" >&6
29597
29598         if test $ol_cv_db_db_4_dot_2 = yes ; then
29599                 ol_cv_lib_db=-ldb-4.2
29600         fi
29601 fi
29602
29603                 if test $ol_cv_lib_db = no ; then
29604         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb42)" >&5
29605 echo $ECHO_N "checking for Berkeley DB link (-ldb42)... $ECHO_C" >&6
29606 if test "${ol_cv_db_db42+set}" = set; then
29607   echo $ECHO_N "(cached) $ECHO_C" >&6
29608 else
29609
29610         ol_DB_LIB=-ldb42
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_db42=yes
29692 else
29693   echo "$as_me: failed program was:" >&5
29694 sed 's/^/| /' conftest.$ac_ext >&5
29695
29696 ol_cv_db_db42=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_db42" >&5
29705 echo "${ECHO_T}$ol_cv_db_db42" >&6
29706
29707         if test $ol_cv_db_db42 = yes ; then
29708                 ol_cv_lib_db=-ldb42
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-42)" >&5
29714 echo $ECHO_N "checking for Berkeley DB link (-ldb-42)... $ECHO_C" >&6
29715 if test "${ol_cv_db_db_42+set}" = set; then
29716   echo $ECHO_N "(cached) $ECHO_C" >&6
29717 else
29718
29719         ol_DB_LIB=-ldb-42
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_42=yes
29801 else
29802   echo "$as_me: failed program was:" >&5
29803 sed 's/^/| /' conftest.$ac_ext >&5
29804
29805 ol_cv_db_db_42=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_42" >&5
29814 echo "${ECHO_T}$ol_cv_db_db_42" >&6
29815
29816         if test $ol_cv_db_db_42 = yes ; then
29817                 ol_cv_lib_db=-ldb-42
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-2)" >&5
29823 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-2)... $ECHO_C" >&6
29824 if test "${ol_cv_db_db_4_2+set}" = set; then
29825   echo $ECHO_N "(cached) $ECHO_C" >&6
29826 else
29827
29828         ol_DB_LIB=-ldb-4-2
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_2=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_2=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_2" >&5
29923 echo "${ECHO_T}$ol_cv_db_db_4_2" >&6
29924
29925         if test $ol_cv_db_db_4_2 = yes ; then
29926                 ol_cv_lib_db=-ldb-4-2
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, but exclude 4.3 */
31288 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2) && (DB_VERSION_MINOR !=3)
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         if test $ol_with_odbc = auto ; then
31890                 ol_with_odbc="iodbc unixodbc"
31891         fi
31892
31893         for odbc in $ol_with_odbc ; do
31894                 if test $ol_link_sql = no ; then
31895                         case $odbc in
31896                         iodbc)
31897                                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
31898 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
31899 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
31900   echo $ECHO_N "(cached) $ECHO_C" >&6
31901 else
31902   ac_check_lib_save_LIBS=$LIBS
31903 LIBS="-liodbc  $LIBS"
31904 cat >conftest.$ac_ext <<_ACEOF
31905 /* confdefs.h.  */
31906 _ACEOF
31907 cat confdefs.h >>conftest.$ac_ext
31908 cat >>conftest.$ac_ext <<_ACEOF
31909 /* end confdefs.h.  */
31910
31911 /* Override any gcc2 internal prototype to avoid an error.  */
31912 #ifdef __cplusplus
31913 extern "C"
31914 #endif
31915 /* We use char because int might match the return type of a gcc2
31916    builtin and then its argument prototype would still apply.  */
31917 char SQLDriverConnect ();
31918 int
31919 main ()
31920 {
31921 SQLDriverConnect ();
31922   ;
31923   return 0;
31924 }
31925 _ACEOF
31926 rm -f conftest.$ac_objext conftest$ac_exeext
31927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31928   (eval $ac_link) 2>conftest.er1
31929   ac_status=$?
31930   grep -v '^ *+' conftest.er1 >conftest.err
31931   rm -f conftest.er1
31932   cat conftest.err >&5
31933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31934   (exit $ac_status); } &&
31935          { ac_try='test -z "$ac_c_werror_flag"
31936                          || test ! -s conftest.err'
31937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31938   (eval $ac_try) 2>&5
31939   ac_status=$?
31940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31941   (exit $ac_status); }; } &&
31942          { ac_try='test -s conftest$ac_exeext'
31943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31944   (eval $ac_try) 2>&5
31945   ac_status=$?
31946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31947   (exit $ac_status); }; }; then
31948   ac_cv_lib_iodbc_SQLDriverConnect=yes
31949 else
31950   echo "$as_me: failed program was:" >&5
31951 sed 's/^/| /' conftest.$ac_ext >&5
31952
31953 ac_cv_lib_iodbc_SQLDriverConnect=no
31954 fi
31955 rm -f conftest.err conftest.$ac_objext \
31956       conftest$ac_exeext conftest.$ac_ext
31957 LIBS=$ac_check_lib_save_LIBS
31958 fi
31959 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
31960 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
31961 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
31962   have_iodbc=yes
31963 else
31964   have_iodbc=no
31965 fi
31966
31967                                 if test $have_iodbc = yes ; then
31968                                         ol_link_sql="-liodbc"
31969                                 fi
31970                                 ;;
31971
31972                         unixodbc)
31973                                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
31974 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
31975 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
31976   echo $ECHO_N "(cached) $ECHO_C" >&6
31977 else
31978   ac_check_lib_save_LIBS=$LIBS
31979 LIBS="-lodbc  $LIBS"
31980 cat >conftest.$ac_ext <<_ACEOF
31981 /* confdefs.h.  */
31982 _ACEOF
31983 cat confdefs.h >>conftest.$ac_ext
31984 cat >>conftest.$ac_ext <<_ACEOF
31985 /* end confdefs.h.  */
31986
31987 /* Override any gcc2 internal prototype to avoid an error.  */
31988 #ifdef __cplusplus
31989 extern "C"
31990 #endif
31991 /* We use char because int might match the return type of a gcc2
31992    builtin and then its argument prototype would still apply.  */
31993 char SQLDriverConnect ();
31994 int
31995 main ()
31996 {
31997 SQLDriverConnect ();
31998   ;
31999   return 0;
32000 }
32001 _ACEOF
32002 rm -f conftest.$ac_objext conftest$ac_exeext
32003 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32004   (eval $ac_link) 2>conftest.er1
32005   ac_status=$?
32006   grep -v '^ *+' conftest.er1 >conftest.err
32007   rm -f conftest.er1
32008   cat conftest.err >&5
32009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32010   (exit $ac_status); } &&
32011          { ac_try='test -z "$ac_c_werror_flag"
32012                          || test ! -s conftest.err'
32013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32014   (eval $ac_try) 2>&5
32015   ac_status=$?
32016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32017   (exit $ac_status); }; } &&
32018          { ac_try='test -s conftest$ac_exeext'
32019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32020   (eval $ac_try) 2>&5
32021   ac_status=$?
32022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32023   (exit $ac_status); }; }; then
32024   ac_cv_lib_odbc_SQLDriverConnect=yes
32025 else
32026   echo "$as_me: failed program was:" >&5
32027 sed 's/^/| /' conftest.$ac_ext >&5
32028
32029 ac_cv_lib_odbc_SQLDriverConnect=no
32030 fi
32031 rm -f conftest.err conftest.$ac_objext \
32032       conftest$ac_exeext conftest.$ac_ext
32033 LIBS=$ac_check_lib_save_LIBS
32034 fi
32035 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
32036 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
32037 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
32038   have_odbc=yes
32039 else
32040   have_odbc=no
32041 fi
32042
32043                                 if test $have_odbc = yes ; then
32044                                         ol_link_sql="-lodbc"
32045                                 fi
32046                                 ;;
32047
32048                         *)
32049                                 { { echo "$as_me:$LINENO: error: unknown ODBC library" >&5
32050 echo "$as_me: error: unknown ODBC library" >&2;}
32051    { (exit 1); exit 1; }; }
32052                                 ;;
32053                         esac
32054                 fi
32055         done
32056
32057         LIBS="$sql_LIBS"
32058
32059         if test $ol_link_sql != no ; then
32060                 SLAPD_SQL_LIBS="$ol_link_sql"
32061
32062         elif test $ol_enable_sql != auto ; then
32063                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
32064 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
32065    { (exit 1); exit 1; }; }
32066         fi
32067 fi
32068
32069 ol_icu=no
32070
32071 for ac_header in unicode/utypes.h
32072 do
32073 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
32074 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32075   echo "$as_me:$LINENO: checking for $ac_header" >&5
32076 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32077 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32078   echo $ECHO_N "(cached) $ECHO_C" >&6
32079 fi
32080 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32081 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32082 else
32083   # Is the header compilable?
32084 echo "$as_me:$LINENO: checking $ac_header usability" >&5
32085 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
32086 cat >conftest.$ac_ext <<_ACEOF
32087 /* confdefs.h.  */
32088 _ACEOF
32089 cat confdefs.h >>conftest.$ac_ext
32090 cat >>conftest.$ac_ext <<_ACEOF
32091 /* end confdefs.h.  */
32092 $ac_includes_default
32093 #include <$ac_header>
32094 _ACEOF
32095 rm -f conftest.$ac_objext
32096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32097   (eval $ac_compile) 2>conftest.er1
32098   ac_status=$?
32099   grep -v '^ *+' conftest.er1 >conftest.err
32100   rm -f conftest.er1
32101   cat conftest.err >&5
32102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32103   (exit $ac_status); } &&
32104          { ac_try='test -z "$ac_c_werror_flag"
32105                          || test ! -s conftest.err'
32106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32107   (eval $ac_try) 2>&5
32108   ac_status=$?
32109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32110   (exit $ac_status); }; } &&
32111          { ac_try='test -s conftest.$ac_objext'
32112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32113   (eval $ac_try) 2>&5
32114   ac_status=$?
32115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32116   (exit $ac_status); }; }; then
32117   ac_header_compiler=yes
32118 else
32119   echo "$as_me: failed program was:" >&5
32120 sed 's/^/| /' conftest.$ac_ext >&5
32121
32122 ac_header_compiler=no
32123 fi
32124 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
32125 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32126 echo "${ECHO_T}$ac_header_compiler" >&6
32127
32128 # Is the header present?
32129 echo "$as_me:$LINENO: checking $ac_header presence" >&5
32130 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
32131 cat >conftest.$ac_ext <<_ACEOF
32132 /* confdefs.h.  */
32133 _ACEOF
32134 cat confdefs.h >>conftest.$ac_ext
32135 cat >>conftest.$ac_ext <<_ACEOF
32136 /* end confdefs.h.  */
32137 #include <$ac_header>
32138 _ACEOF
32139 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
32140   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
32141   ac_status=$?
32142   grep -v '^ *+' conftest.er1 >conftest.err
32143   rm -f conftest.er1
32144   cat conftest.err >&5
32145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32146   (exit $ac_status); } >/dev/null; then
32147   if test -s conftest.err; then
32148     ac_cpp_err=$ac_c_preproc_warn_flag
32149     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
32150   else
32151     ac_cpp_err=
32152   fi
32153 else
32154   ac_cpp_err=yes
32155 fi
32156 if test -z "$ac_cpp_err"; then
32157   ac_header_preproc=yes
32158 else
32159   echo "$as_me: failed program was:" >&5
32160 sed 's/^/| /' conftest.$ac_ext >&5
32161
32162   ac_header_preproc=no
32163 fi
32164 rm -f conftest.err conftest.$ac_ext
32165 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32166 echo "${ECHO_T}$ac_header_preproc" >&6
32167
32168 # So?  What about this header?
32169 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
32170   yes:no: )
32171     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32172 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32173     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32174 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32175     ac_header_preproc=yes
32176     ;;
32177   no:yes:* )
32178     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32179 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32180     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32181 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32182     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32183 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32184     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32185 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32186     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32187 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32188     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32189 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32190     (
32191       cat <<\_ASBOX
32192 ## --------------------------------------------- ##
32193 ## Report this to <http://www.openldap.org/its/> ##
32194 ## --------------------------------------------- ##
32195 _ASBOX
32196     ) |
32197       sed "s/^/$as_me: WARNING:     /" >&2
32198     ;;
32199 esac
32200 echo "$as_me:$LINENO: checking for $ac_header" >&5
32201 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32203   echo $ECHO_N "(cached) $ECHO_C" >&6
32204 else
32205   eval "$as_ac_Header=\$ac_header_preproc"
32206 fi
32207 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32208 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32209
32210 fi
32211 if test `eval echo '${'$as_ac_Header'}'` = yes; then
32212   cat >>confdefs.h <<_ACEOF
32213 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
32214 _ACEOF
32215
32216 fi
32217
32218 done
32219
32220 if test $ac_cv_header_unicode_utypes_h = yes ; then
32221                 OL_ICULIBS="-licuuc -licudata"
32222
32223         echo "$as_me:$LINENO: checking for ICU libraries" >&5
32224 echo $ECHO_N "checking for ICU libraries... $ECHO_C" >&6
32225 if test "${ol_cv_lib_icu+set}" = set; then
32226   echo $ECHO_N "(cached) $ECHO_C" >&6
32227 else
32228
32229                 ol_LIBS="$LIBS"
32230                 LIBS="$OL_ICULIBS $LIBS"
32231                 cat >conftest.$ac_ext <<_ACEOF
32232 /* confdefs.h.  */
32233 _ACEOF
32234 cat confdefs.h >>conftest.$ac_ext
32235 cat >>conftest.$ac_ext <<_ACEOF
32236 /* end confdefs.h.  */
32237
32238 #include <unicode/utypes.h>
32239
32240 int
32241 main ()
32242 {
32243
32244 (void) u_errorName(0);
32245
32246   ;
32247   return 0;
32248 }
32249 _ACEOF
32250 rm -f conftest.$ac_objext conftest$ac_exeext
32251 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32252   (eval $ac_link) 2>conftest.er1
32253   ac_status=$?
32254   grep -v '^ *+' conftest.er1 >conftest.err
32255   rm -f conftest.er1
32256   cat conftest.err >&5
32257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32258   (exit $ac_status); } &&
32259          { ac_try='test -z "$ac_c_werror_flag"
32260                          || test ! -s conftest.err'
32261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32262   (eval $ac_try) 2>&5
32263   ac_status=$?
32264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32265   (exit $ac_status); }; } &&
32266          { ac_try='test -s conftest$ac_exeext'
32267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32268   (eval $ac_try) 2>&5
32269   ac_status=$?
32270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32271   (exit $ac_status); }; }; then
32272   ol_cv_lib_icu=yes
32273 else
32274   echo "$as_me: failed program was:" >&5
32275 sed 's/^/| /' conftest.$ac_ext >&5
32276
32277 ol_cv_lib_icu=no
32278 fi
32279 rm -f conftest.err conftest.$ac_objext \
32280       conftest$ac_exeext conftest.$ac_ext
32281                 LIBS="$ol_LIBS"
32282
32283 fi
32284 echo "$as_me:$LINENO: result: $ol_cv_lib_icu" >&5
32285 echo "${ECHO_T}$ol_cv_lib_icu" >&6
32286
32287         if test $ol_cv_lib_icu != no ; then
32288                 ol_icu="$OL_ICULIBS"
32289
32290 cat >>confdefs.h <<\_ACEOF
32291 #define HAVE_ICU 1
32292 _ACEOF
32293
32294         fi
32295 fi
32296
32297 if test "$ol_icu" = no ; then
32298         { echo "$as_me:$LINENO: WARNING: ICU not available" >&5
32299 echo "$as_me: WARNING: ICU not available" >&2;}
32300 else
32301         ICU_LIBS="$ol_icu"
32302 fi
32303 WITH_SASL=no
32304 ol_link_sasl=no
32305 ol_link_spasswd=no
32306 if test $ol_with_cyrus_sasl != no ; then
32307
32308
32309 for ac_header in sasl/sasl.h sasl.h
32310 do
32311 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
32312 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32313   echo "$as_me:$LINENO: checking for $ac_header" >&5
32314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32316   echo $ECHO_N "(cached) $ECHO_C" >&6
32317 fi
32318 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32319 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32320 else
32321   # Is the header compilable?
32322 echo "$as_me:$LINENO: checking $ac_header usability" >&5
32323 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
32324 cat >conftest.$ac_ext <<_ACEOF
32325 /* confdefs.h.  */
32326 _ACEOF
32327 cat confdefs.h >>conftest.$ac_ext
32328 cat >>conftest.$ac_ext <<_ACEOF
32329 /* end confdefs.h.  */
32330 $ac_includes_default
32331 #include <$ac_header>
32332 _ACEOF
32333 rm -f conftest.$ac_objext
32334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32335   (eval $ac_compile) 2>conftest.er1
32336   ac_status=$?
32337   grep -v '^ *+' conftest.er1 >conftest.err
32338   rm -f conftest.er1
32339   cat conftest.err >&5
32340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32341   (exit $ac_status); } &&
32342          { ac_try='test -z "$ac_c_werror_flag"
32343                          || test ! -s conftest.err'
32344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32345   (eval $ac_try) 2>&5
32346   ac_status=$?
32347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32348   (exit $ac_status); }; } &&
32349          { ac_try='test -s conftest.$ac_objext'
32350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32351   (eval $ac_try) 2>&5
32352   ac_status=$?
32353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32354   (exit $ac_status); }; }; then
32355   ac_header_compiler=yes
32356 else
32357   echo "$as_me: failed program was:" >&5
32358 sed 's/^/| /' conftest.$ac_ext >&5
32359
32360 ac_header_compiler=no
32361 fi
32362 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
32363 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32364 echo "${ECHO_T}$ac_header_compiler" >&6
32365
32366 # Is the header present?
32367 echo "$as_me:$LINENO: checking $ac_header presence" >&5
32368 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
32369 cat >conftest.$ac_ext <<_ACEOF
32370 /* confdefs.h.  */
32371 _ACEOF
32372 cat confdefs.h >>conftest.$ac_ext
32373 cat >>conftest.$ac_ext <<_ACEOF
32374 /* end confdefs.h.  */
32375 #include <$ac_header>
32376 _ACEOF
32377 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
32378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
32379   ac_status=$?
32380   grep -v '^ *+' conftest.er1 >conftest.err
32381   rm -f conftest.er1
32382   cat conftest.err >&5
32383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32384   (exit $ac_status); } >/dev/null; then
32385   if test -s conftest.err; then
32386     ac_cpp_err=$ac_c_preproc_warn_flag
32387     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
32388   else
32389     ac_cpp_err=
32390   fi
32391 else
32392   ac_cpp_err=yes
32393 fi
32394 if test -z "$ac_cpp_err"; then
32395   ac_header_preproc=yes
32396 else
32397   echo "$as_me: failed program was:" >&5
32398 sed 's/^/| /' conftest.$ac_ext >&5
32399
32400   ac_header_preproc=no
32401 fi
32402 rm -f conftest.err conftest.$ac_ext
32403 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32404 echo "${ECHO_T}$ac_header_preproc" >&6
32405
32406 # So?  What about this header?
32407 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
32408   yes:no: )
32409     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32410 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32411     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
32412 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
32413     ac_header_preproc=yes
32414     ;;
32415   no:yes:* )
32416     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32417 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32418     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
32419 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
32420     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
32421 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
32422     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
32423 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
32424     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32425 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32426     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
32427 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
32428     (
32429       cat <<\_ASBOX
32430 ## --------------------------------------------- ##
32431 ## Report this to <http://www.openldap.org/its/> ##
32432 ## --------------------------------------------- ##
32433 _ASBOX
32434     ) |
32435       sed "s/^/$as_me: WARNING:     /" >&2
32436     ;;
32437 esac
32438 echo "$as_me:$LINENO: checking for $ac_header" >&5
32439 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32441   echo $ECHO_N "(cached) $ECHO_C" >&6
32442 else
32443   eval "$as_ac_Header=\$ac_header_preproc"
32444 fi
32445 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32446 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32447
32448 fi
32449 if test `eval echo '${'$as_ac_Header'}'` = yes; then
32450   cat >>confdefs.h <<_ACEOF
32451 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
32452 _ACEOF
32453
32454 fi
32455
32456 done
32457
32458
32459         if test $ac_cv_header_sasl_sasl_h = yes ||
32460            test $ac_cv_header_sasl_h = yes; then
32461                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
32462 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
32463 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
32464   echo $ECHO_N "(cached) $ECHO_C" >&6
32465 else
32466   ac_check_lib_save_LIBS=$LIBS
32467 LIBS="-lsasl2  $LIBS"
32468 cat >conftest.$ac_ext <<_ACEOF
32469 /* confdefs.h.  */
32470 _ACEOF
32471 cat confdefs.h >>conftest.$ac_ext
32472 cat >>conftest.$ac_ext <<_ACEOF
32473 /* end confdefs.h.  */
32474
32475 /* Override any gcc2 internal prototype to avoid an error.  */
32476 #ifdef __cplusplus
32477 extern "C"
32478 #endif
32479 /* We use char because int might match the return type of a gcc2
32480    builtin and then its argument prototype would still apply.  */
32481 char sasl_client_init ();
32482 int
32483 main ()
32484 {
32485 sasl_client_init ();
32486   ;
32487   return 0;
32488 }
32489 _ACEOF
32490 rm -f conftest.$ac_objext conftest$ac_exeext
32491 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32492   (eval $ac_link) 2>conftest.er1
32493   ac_status=$?
32494   grep -v '^ *+' conftest.er1 >conftest.err
32495   rm -f conftest.er1
32496   cat conftest.err >&5
32497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32498   (exit $ac_status); } &&
32499          { ac_try='test -z "$ac_c_werror_flag"
32500                          || test ! -s conftest.err'
32501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32502   (eval $ac_try) 2>&5
32503   ac_status=$?
32504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32505   (exit $ac_status); }; } &&
32506          { ac_try='test -s conftest$ac_exeext'
32507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32508   (eval $ac_try) 2>&5
32509   ac_status=$?
32510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32511   (exit $ac_status); }; }; then
32512   ac_cv_lib_sasl2_sasl_client_init=yes
32513 else
32514   echo "$as_me: failed program was:" >&5
32515 sed 's/^/| /' conftest.$ac_ext >&5
32516
32517 ac_cv_lib_sasl2_sasl_client_init=no
32518 fi
32519 rm -f conftest.err conftest.$ac_objext \
32520       conftest$ac_exeext conftest.$ac_ext
32521 LIBS=$ac_check_lib_save_LIBS
32522 fi
32523 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
32524 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
32525 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
32526   ol_link_sasl="-lsasl2"
32527 else
32528   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
32529 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
32530 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
32531   echo $ECHO_N "(cached) $ECHO_C" >&6
32532 else
32533   ac_check_lib_save_LIBS=$LIBS
32534 LIBS="-lsasl  $LIBS"
32535 cat >conftest.$ac_ext <<_ACEOF
32536 /* confdefs.h.  */
32537 _ACEOF
32538 cat confdefs.h >>conftest.$ac_ext
32539 cat >>conftest.$ac_ext <<_ACEOF
32540 /* end confdefs.h.  */
32541
32542 /* Override any gcc2 internal prototype to avoid an error.  */
32543 #ifdef __cplusplus
32544 extern "C"
32545 #endif
32546 /* We use char because int might match the return type of a gcc2
32547    builtin and then its argument prototype would still apply.  */
32548 char sasl_client_init ();
32549 int
32550 main ()
32551 {
32552 sasl_client_init ();
32553   ;
32554   return 0;
32555 }
32556 _ACEOF
32557 rm -f conftest.$ac_objext conftest$ac_exeext
32558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32559   (eval $ac_link) 2>conftest.er1
32560   ac_status=$?
32561   grep -v '^ *+' conftest.er1 >conftest.err
32562   rm -f conftest.er1
32563   cat conftest.err >&5
32564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32565   (exit $ac_status); } &&
32566          { ac_try='test -z "$ac_c_werror_flag"
32567                          || test ! -s conftest.err'
32568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32569   (eval $ac_try) 2>&5
32570   ac_status=$?
32571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32572   (exit $ac_status); }; } &&
32573          { ac_try='test -s conftest$ac_exeext'
32574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32575   (eval $ac_try) 2>&5
32576   ac_status=$?
32577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32578   (exit $ac_status); }; }; then
32579   ac_cv_lib_sasl_sasl_client_init=yes
32580 else
32581   echo "$as_me: failed program was:" >&5
32582 sed 's/^/| /' conftest.$ac_ext >&5
32583
32584 ac_cv_lib_sasl_sasl_client_init=no
32585 fi
32586 rm -f conftest.err conftest.$ac_objext \
32587       conftest$ac_exeext conftest.$ac_ext
32588 LIBS=$ac_check_lib_save_LIBS
32589 fi
32590 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
32591 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
32592 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
32593   ol_link_sasl="-lsasl"
32594 fi
32595
32596 fi
32597
32598         fi
32599
32600         if test $ol_link_sasl = no ; then
32601                 if test $ol_with_cyrus_sasl != auto ; then
32602                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
32603 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
32604    { (exit 1); exit 1; }; }
32605                 else
32606                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
32607 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
32608                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
32609 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
32610                         if test $ol_link_tls = no ; then
32611                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
32612 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
32613                         fi
32614                 fi
32615         else
32616                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
32617 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
32618 if test "${ol_cv_sasl_compat+set}" = set; then
32619   echo $ECHO_N "(cached) $ECHO_C" >&6
32620 else
32621
32622         cat >conftest.$ac_ext <<_ACEOF
32623 /* confdefs.h.  */
32624 _ACEOF
32625 cat confdefs.h >>conftest.$ac_ext
32626 cat >>conftest.$ac_ext <<_ACEOF
32627 /* end confdefs.h.  */
32628
32629 #ifdef HAVE_SASL_SASL_H
32630 #include <sasl/sasl.h>
32631 #else
32632 #include <sasl.h>
32633 #endif
32634
32635 /* Require 2.1.15+ */
32636 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
32637         char *__sasl_compat = "2.2+ or better okay (we guess)";
32638 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
32639         && SASL_VERSION_STEP >=15
32640         char *__sasl_compat = "2.1.15+ or better okay";
32641 #endif
32642
32643 _ACEOF
32644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32645   $EGREP "__sasl_compat" >/dev/null 2>&1; then
32646   ol_cv_sasl_compat=yes
32647 else
32648   ol_cv_sasl_compat=no
32649 fi
32650 rm -f conftest*
32651
32652 fi
32653 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
32654 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
32655
32656                 if test $ol_cv_sasl_compat = no ; then
32657                         ol_link_sasl=no
32658                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
32659 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
32660    { (exit 1); exit 1; }; }
32661                 fi
32662
32663
32664 cat >>confdefs.h <<\_ACEOF
32665 #define HAVE_CYRUS_SASL 1
32666 _ACEOF
32667
32668                 SASL_LIBS="$ol_link_sasl"
32669                 if test $ol_enable_spasswd != no ; then
32670                         ol_link_spasswd=yes
32671                 fi
32672
32673                 ac_save_LIBS="$LIBS"
32674                 LIBS="$LIBS $ol_link_sasl"
32675                 echo "$as_me:$LINENO: checking for sasl_version" >&5
32676 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
32677 if test "${ac_cv_func_sasl_version+set}" = set; then
32678   echo $ECHO_N "(cached) $ECHO_C" >&6
32679 else
32680   cat >conftest.$ac_ext <<_ACEOF
32681 /* confdefs.h.  */
32682 _ACEOF
32683 cat confdefs.h >>conftest.$ac_ext
32684 cat >>conftest.$ac_ext <<_ACEOF
32685 /* end confdefs.h.  */
32686 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
32687    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
32688 #define sasl_version innocuous_sasl_version
32689
32690 /* System header to define __stub macros and hopefully few prototypes,
32691     which can conflict with char sasl_version (); below.
32692     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32693     <limits.h> exists even on freestanding compilers.  */
32694
32695 #ifdef __STDC__
32696 # include <limits.h>
32697 #else
32698 # include <assert.h>
32699 #endif
32700
32701 #undef sasl_version
32702
32703 /* Override any gcc2 internal prototype to avoid an error.  */
32704 #ifdef __cplusplus
32705 extern "C"
32706 {
32707 #endif
32708 /* We use char because int might match the return type of a gcc2
32709    builtin and then its argument prototype would still apply.  */
32710 char sasl_version ();
32711 /* The GNU C library defines this for functions which it implements
32712     to always fail with ENOSYS.  Some functions are actually named
32713     something starting with __ and the normal name is an alias.  */
32714 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
32715 choke me
32716 #else
32717 char (*f) () = sasl_version;
32718 #endif
32719 #ifdef __cplusplus
32720 }
32721 #endif
32722
32723 int
32724 main ()
32725 {
32726 return f != sasl_version;
32727   ;
32728   return 0;
32729 }
32730 _ACEOF
32731 rm -f conftest.$ac_objext conftest$ac_exeext
32732 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32733   (eval $ac_link) 2>conftest.er1
32734   ac_status=$?
32735   grep -v '^ *+' conftest.er1 >conftest.err
32736   rm -f conftest.er1
32737   cat conftest.err >&5
32738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32739   (exit $ac_status); } &&
32740          { ac_try='test -z "$ac_c_werror_flag"
32741                          || test ! -s conftest.err'
32742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32743   (eval $ac_try) 2>&5
32744   ac_status=$?
32745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32746   (exit $ac_status); }; } &&
32747          { ac_try='test -s conftest$ac_exeext'
32748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32749   (eval $ac_try) 2>&5
32750   ac_status=$?
32751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32752   (exit $ac_status); }; }; then
32753   ac_cv_func_sasl_version=yes
32754 else
32755   echo "$as_me: failed program was:" >&5
32756 sed 's/^/| /' conftest.$ac_ext >&5
32757
32758 ac_cv_func_sasl_version=no
32759 fi
32760 rm -f conftest.err conftest.$ac_objext \
32761       conftest$ac_exeext conftest.$ac_ext
32762 fi
32763 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
32764 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
32765 if test $ac_cv_func_sasl_version = yes; then
32766
32767 cat >>confdefs.h <<\_ACEOF
32768 #define HAVE_SASL_VERSION 1
32769 _ACEOF
32770
32771 fi
32772
32773                 LIBS="$ac_save_LIBS"
32774
32775                 WITH_SASL=yes
32776         fi
32777
32778 else
32779         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
32780 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
32781         if test $ol_link_tls = no ; then
32782                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
32783 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
32784         fi
32785 fi
32786
32787 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
32788         dev=no
32789         if test -r /dev/urandom ; then
32790                 dev="/dev/urandom";
32791         elif test -r /idev/urandom ; then
32792                 dev="/idev/urandom";
32793         elif test -r /dev/srandom ; then
32794                 dev="/dev/srandom";
32795         elif test -r /dev/random ; then
32796                 dev="/dev/random";
32797         elif test -r /idev/random ; then
32798                 dev="/idev/random";
32799         fi
32800
32801         if test $dev != no ; then
32802
32803 cat >>confdefs.h <<_ACEOF
32804 #define URANDOM_DEVICE "$dev"
32805 _ACEOF
32806
32807         fi
32808 fi
32809
32810 ol_link_fetch=no
32811 if test $ol_with_fetch != no ; then
32812         ol_LIBS=$LIBS
32813 LIBS="-lfetch -lcom_err $LIBS"
32814 echo "$as_me:$LINENO: checking fetch(3) library" >&5
32815 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
32816 if test "${ol_cv_lib_fetch+set}" = set; then
32817   echo $ECHO_N "(cached) $ECHO_C" >&6
32818 else
32819
32820         cat >conftest.$ac_ext <<_ACEOF
32821 /* confdefs.h.  */
32822 _ACEOF
32823 cat confdefs.h >>conftest.$ac_ext
32824 cat >>conftest.$ac_ext <<_ACEOF
32825 /* end confdefs.h.  */
32826
32827 #include <sys/param.h>
32828 #include <stdio.h>
32829 #include <fetch.h>
32830 int
32831 main ()
32832 {
32833 struct url *u = fetchParseURL("file:///");
32834   ;
32835   return 0;
32836 }
32837 _ACEOF
32838 rm -f conftest.$ac_objext conftest$ac_exeext
32839 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32840   (eval $ac_link) 2>conftest.er1
32841   ac_status=$?
32842   grep -v '^ *+' conftest.er1 >conftest.err
32843   rm -f conftest.er1
32844   cat conftest.err >&5
32845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32846   (exit $ac_status); } &&
32847          { ac_try='test -z "$ac_c_werror_flag"
32848                          || test ! -s conftest.err'
32849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32850   (eval $ac_try) 2>&5
32851   ac_status=$?
32852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32853   (exit $ac_status); }; } &&
32854          { ac_try='test -s conftest$ac_exeext'
32855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32856   (eval $ac_try) 2>&5
32857   ac_status=$?
32858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32859   (exit $ac_status); }; }; then
32860   ol_cv_lib_fetch=yes
32861 else
32862   echo "$as_me: failed program was:" >&5
32863 sed 's/^/| /' conftest.$ac_ext >&5
32864
32865 ol_cv_lib_fetch=no
32866 fi
32867 rm -f conftest.err conftest.$ac_objext \
32868       conftest$ac_exeext conftest.$ac_ext
32869 fi
32870 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
32871 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
32872 LIBS=$ol_LIBS
32873 if test $ol_cv_lib_fetch != no ; then
32874         ol_link_fetch="-lfetch -lcom_err"
32875
32876 cat >>confdefs.h <<\_ACEOF
32877 #define HAVE_FETCH 1
32878 _ACEOF
32879
32880 fi
32881
32882
32883         if test $ol_cv_lib_fetch != no ; then
32884                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
32885                 ol_link_fetch=freebsd
32886
32887         elif test $ol_with_fetch != auto ; then
32888                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
32889 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
32890    { (exit 1); exit 1; }; }
32891         fi
32892 fi
32893
32894 if test $ol_enable_crypt != no ; then
32895         save_LIBS="$LIBS"
32896         LIBS="$TLS_LIBS $LIBS"
32897
32898         echo "$as_me:$LINENO: checking for crypt" >&5
32899 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
32900 if test "${ac_cv_func_crypt+set}" = set; then
32901   echo $ECHO_N "(cached) $ECHO_C" >&6
32902 else
32903   cat >conftest.$ac_ext <<_ACEOF
32904 /* confdefs.h.  */
32905 _ACEOF
32906 cat confdefs.h >>conftest.$ac_ext
32907 cat >>conftest.$ac_ext <<_ACEOF
32908 /* end confdefs.h.  */
32909 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
32910    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
32911 #define crypt innocuous_crypt
32912
32913 /* System header to define __stub macros and hopefully few prototypes,
32914     which can conflict with char crypt (); below.
32915     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32916     <limits.h> exists even on freestanding compilers.  */
32917
32918 #ifdef __STDC__
32919 # include <limits.h>
32920 #else
32921 # include <assert.h>
32922 #endif
32923
32924 #undef crypt
32925
32926 /* Override any gcc2 internal prototype to avoid an error.  */
32927 #ifdef __cplusplus
32928 extern "C"
32929 {
32930 #endif
32931 /* We use char because int might match the return type of a gcc2
32932    builtin and then its argument prototype would still apply.  */
32933 char crypt ();
32934 /* The GNU C library defines this for functions which it implements
32935     to always fail with ENOSYS.  Some functions are actually named
32936     something starting with __ and the normal name is an alias.  */
32937 #if defined (__stub_crypt) || defined (__stub___crypt)
32938 choke me
32939 #else
32940 char (*f) () = crypt;
32941 #endif
32942 #ifdef __cplusplus
32943 }
32944 #endif
32945
32946 int
32947 main ()
32948 {
32949 return f != crypt;
32950   ;
32951   return 0;
32952 }
32953 _ACEOF
32954 rm -f conftest.$ac_objext conftest$ac_exeext
32955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32956   (eval $ac_link) 2>conftest.er1
32957   ac_status=$?
32958   grep -v '^ *+' conftest.er1 >conftest.err
32959   rm -f conftest.er1
32960   cat conftest.err >&5
32961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32962   (exit $ac_status); } &&
32963          { ac_try='test -z "$ac_c_werror_flag"
32964                          || test ! -s conftest.err'
32965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32966   (eval $ac_try) 2>&5
32967   ac_status=$?
32968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32969   (exit $ac_status); }; } &&
32970          { ac_try='test -s conftest$ac_exeext'
32971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32972   (eval $ac_try) 2>&5
32973   ac_status=$?
32974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32975   (exit $ac_status); }; }; then
32976   ac_cv_func_crypt=yes
32977 else
32978   echo "$as_me: failed program was:" >&5
32979 sed 's/^/| /' conftest.$ac_ext >&5
32980
32981 ac_cv_func_crypt=no
32982 fi
32983 rm -f conftest.err conftest.$ac_objext \
32984       conftest$ac_exeext conftest.$ac_ext
32985 fi
32986 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
32987 echo "${ECHO_T}$ac_cv_func_crypt" >&6
32988 if test $ac_cv_func_crypt = yes; then
32989   have_crypt=yes
32990 else
32991
32992                 LIBS="$save_LIBS"
32993                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
32994 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
32995 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
32996   echo $ECHO_N "(cached) $ECHO_C" >&6
32997 else
32998   ac_check_lib_save_LIBS=$LIBS
32999 LIBS="-lcrypt  $LIBS"
33000 cat >conftest.$ac_ext <<_ACEOF
33001 /* confdefs.h.  */
33002 _ACEOF
33003 cat confdefs.h >>conftest.$ac_ext
33004 cat >>conftest.$ac_ext <<_ACEOF
33005 /* end confdefs.h.  */
33006
33007 /* Override any gcc2 internal prototype to avoid an error.  */
33008 #ifdef __cplusplus
33009 extern "C"
33010 #endif
33011 /* We use char because int might match the return type of a gcc2
33012    builtin and then its argument prototype would still apply.  */
33013 char crypt ();
33014 int
33015 main ()
33016 {
33017 crypt ();
33018   ;
33019   return 0;
33020 }
33021 _ACEOF
33022 rm -f conftest.$ac_objext conftest$ac_exeext
33023 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33024   (eval $ac_link) 2>conftest.er1
33025   ac_status=$?
33026   grep -v '^ *+' conftest.er1 >conftest.err
33027   rm -f conftest.er1
33028   cat conftest.err >&5
33029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33030   (exit $ac_status); } &&
33031          { ac_try='test -z "$ac_c_werror_flag"
33032                          || test ! -s conftest.err'
33033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33034   (eval $ac_try) 2>&5
33035   ac_status=$?
33036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33037   (exit $ac_status); }; } &&
33038          { ac_try='test -s conftest$ac_exeext'
33039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33040   (eval $ac_try) 2>&5
33041   ac_status=$?
33042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33043   (exit $ac_status); }; }; then
33044   ac_cv_lib_crypt_crypt=yes
33045 else
33046   echo "$as_me: failed program was:" >&5
33047 sed 's/^/| /' conftest.$ac_ext >&5
33048
33049 ac_cv_lib_crypt_crypt=no
33050 fi
33051 rm -f conftest.err conftest.$ac_objext \
33052       conftest$ac_exeext conftest.$ac_ext
33053 LIBS=$ac_check_lib_save_LIBS
33054 fi
33055 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
33056 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
33057 if test $ac_cv_lib_crypt_crypt = yes; then
33058   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
33059                         have_crypt=yes
33060 else
33061   have_crypt=no
33062 fi
33063
33064 fi
33065
33066
33067         LIBS="$save_LIBS"
33068
33069         if test $have_crypt = yes ; then
33070
33071 cat >>confdefs.h <<\_ACEOF
33072 #define HAVE_CRYPT 1
33073 _ACEOF
33074
33075         else
33076                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
33077 echo "$as_me: WARNING: could not find crypt" >&2;}
33078                 if test $ol_enable_crypt = yes ; then
33079                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
33080 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
33081    { (exit 1); exit 1; }; }
33082                 fi
33083
33084                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
33085 echo "$as_me: WARNING: disabling crypt support" >&2;}
33086                 ol_enable_crypt=no
33087         fi
33088 fi
33089
33090 if test $ol_enable_proctitle != no ; then
33091         echo "$as_me:$LINENO: checking for setproctitle" >&5
33092 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
33093 if test "${ac_cv_func_setproctitle+set}" = set; then
33094   echo $ECHO_N "(cached) $ECHO_C" >&6
33095 else
33096   cat >conftest.$ac_ext <<_ACEOF
33097 /* confdefs.h.  */
33098 _ACEOF
33099 cat confdefs.h >>conftest.$ac_ext
33100 cat >>conftest.$ac_ext <<_ACEOF
33101 /* end confdefs.h.  */
33102 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
33103    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
33104 #define setproctitle innocuous_setproctitle
33105
33106 /* System header to define __stub macros and hopefully few prototypes,
33107     which can conflict with char setproctitle (); below.
33108     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33109     <limits.h> exists even on freestanding compilers.  */
33110
33111 #ifdef __STDC__
33112 # include <limits.h>
33113 #else
33114 # include <assert.h>
33115 #endif
33116
33117 #undef setproctitle
33118
33119 /* Override any gcc2 internal prototype to avoid an error.  */
33120 #ifdef __cplusplus
33121 extern "C"
33122 {
33123 #endif
33124 /* We use char because int might match the return type of a gcc2
33125    builtin and then its argument prototype would still apply.  */
33126 char setproctitle ();
33127 /* The GNU C library defines this for functions which it implements
33128     to always fail with ENOSYS.  Some functions are actually named
33129     something starting with __ and the normal name is an alias.  */
33130 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
33131 choke me
33132 #else
33133 char (*f) () = setproctitle;
33134 #endif
33135 #ifdef __cplusplus
33136 }
33137 #endif
33138
33139 int
33140 main ()
33141 {
33142 return f != setproctitle;
33143   ;
33144   return 0;
33145 }
33146 _ACEOF
33147 rm -f conftest.$ac_objext conftest$ac_exeext
33148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33149   (eval $ac_link) 2>conftest.er1
33150   ac_status=$?
33151   grep -v '^ *+' conftest.er1 >conftest.err
33152   rm -f conftest.er1
33153   cat conftest.err >&5
33154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33155   (exit $ac_status); } &&
33156          { ac_try='test -z "$ac_c_werror_flag"
33157                          || test ! -s conftest.err'
33158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33159   (eval $ac_try) 2>&5
33160   ac_status=$?
33161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33162   (exit $ac_status); }; } &&
33163          { ac_try='test -s conftest$ac_exeext'
33164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33165   (eval $ac_try) 2>&5
33166   ac_status=$?
33167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33168   (exit $ac_status); }; }; then
33169   ac_cv_func_setproctitle=yes
33170 else
33171   echo "$as_me: failed program was:" >&5
33172 sed 's/^/| /' conftest.$ac_ext >&5
33173
33174 ac_cv_func_setproctitle=no
33175 fi
33176 rm -f conftest.err conftest.$ac_objext \
33177       conftest$ac_exeext conftest.$ac_ext
33178 fi
33179 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
33180 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
33181 if test $ac_cv_func_setproctitle = yes; then
33182   have_setproctitle=yes
33183 else
33184
33185                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
33186 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
33187 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
33188   echo $ECHO_N "(cached) $ECHO_C" >&6
33189 else
33190   ac_check_lib_save_LIBS=$LIBS
33191 LIBS="-lutil  $LIBS"
33192 cat >conftest.$ac_ext <<_ACEOF
33193 /* confdefs.h.  */
33194 _ACEOF
33195 cat confdefs.h >>conftest.$ac_ext
33196 cat >>conftest.$ac_ext <<_ACEOF
33197 /* end confdefs.h.  */
33198
33199 /* Override any gcc2 internal prototype to avoid an error.  */
33200 #ifdef __cplusplus
33201 extern "C"
33202 #endif
33203 /* We use char because int might match the return type of a gcc2
33204    builtin and then its argument prototype would still apply.  */
33205 char setproctitle ();
33206 int
33207 main ()
33208 {
33209 setproctitle ();
33210   ;
33211   return 0;
33212 }
33213 _ACEOF
33214 rm -f conftest.$ac_objext conftest$ac_exeext
33215 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33216   (eval $ac_link) 2>conftest.er1
33217   ac_status=$?
33218   grep -v '^ *+' conftest.er1 >conftest.err
33219   rm -f conftest.er1
33220   cat conftest.err >&5
33221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33222   (exit $ac_status); } &&
33223          { ac_try='test -z "$ac_c_werror_flag"
33224                          || test ! -s conftest.err'
33225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33226   (eval $ac_try) 2>&5
33227   ac_status=$?
33228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33229   (exit $ac_status); }; } &&
33230          { ac_try='test -s conftest$ac_exeext'
33231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33232   (eval $ac_try) 2>&5
33233   ac_status=$?
33234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33235   (exit $ac_status); }; }; then
33236   ac_cv_lib_util_setproctitle=yes
33237 else
33238   echo "$as_me: failed program was:" >&5
33239 sed 's/^/| /' conftest.$ac_ext >&5
33240
33241 ac_cv_lib_util_setproctitle=no
33242 fi
33243 rm -f conftest.err conftest.$ac_objext \
33244       conftest$ac_exeext conftest.$ac_ext
33245 LIBS=$ac_check_lib_save_LIBS
33246 fi
33247 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
33248 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
33249 if test $ac_cv_lib_util_setproctitle = yes; then
33250   have_setproctitle=yes
33251                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
33252 else
33253   have_setproctitle=no
33254                         case $LIBOBJS in
33255     "setproctitle.$ac_objext"   | \
33256   *" setproctitle.$ac_objext"   | \
33257     "setproctitle.$ac_objext "* | \
33258   *" setproctitle.$ac_objext "* ) ;;
33259   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext" ;;
33260 esac
33261
33262                         LIBSRCS="$LIBSRCS setproctitle.c"
33263 fi
33264
33265 fi
33266
33267
33268         if test $have_setproctitle = yes ; then
33269
33270 cat >>confdefs.h <<\_ACEOF
33271 #define HAVE_SETPROCTITLE 1
33272 _ACEOF
33273
33274         fi
33275 fi
33276
33277 if test $ol_enable_slp != no ; then
33278
33279 for ac_header in slp.h
33280 do
33281 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
33282 if eval "test \"\${$as_ac_Header+set}\" = set"; then
33283   echo "$as_me:$LINENO: checking for $ac_header" >&5
33284 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
33285 if eval "test \"\${$as_ac_Header+set}\" = set"; then
33286   echo $ECHO_N "(cached) $ECHO_C" >&6
33287 fi
33288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
33289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
33290 else
33291   # Is the header compilable?
33292 echo "$as_me:$LINENO: checking $ac_header usability" >&5
33293 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
33294 cat >conftest.$ac_ext <<_ACEOF
33295 /* confdefs.h.  */
33296 _ACEOF
33297 cat confdefs.h >>conftest.$ac_ext
33298 cat >>conftest.$ac_ext <<_ACEOF
33299 /* end confdefs.h.  */
33300 $ac_includes_default
33301 #include <$ac_header>
33302 _ACEOF
33303 rm -f conftest.$ac_objext
33304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33305   (eval $ac_compile) 2>conftest.er1
33306   ac_status=$?
33307   grep -v '^ *+' conftest.er1 >conftest.err
33308   rm -f conftest.er1
33309   cat conftest.err >&5
33310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33311   (exit $ac_status); } &&
33312          { ac_try='test -z "$ac_c_werror_flag"
33313                          || test ! -s conftest.err'
33314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33315   (eval $ac_try) 2>&5
33316   ac_status=$?
33317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33318   (exit $ac_status); }; } &&
33319          { ac_try='test -s conftest.$ac_objext'
33320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33321   (eval $ac_try) 2>&5
33322   ac_status=$?
33323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33324   (exit $ac_status); }; }; then
33325   ac_header_compiler=yes
33326 else
33327   echo "$as_me: failed program was:" >&5
33328 sed 's/^/| /' conftest.$ac_ext >&5
33329
33330 ac_header_compiler=no
33331 fi
33332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33333 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
33334 echo "${ECHO_T}$ac_header_compiler" >&6
33335
33336 # Is the header present?
33337 echo "$as_me:$LINENO: checking $ac_header presence" >&5
33338 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
33339 cat >conftest.$ac_ext <<_ACEOF
33340 /* confdefs.h.  */
33341 _ACEOF
33342 cat confdefs.h >>conftest.$ac_ext
33343 cat >>conftest.$ac_ext <<_ACEOF
33344 /* end confdefs.h.  */
33345 #include <$ac_header>
33346 _ACEOF
33347 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
33348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
33349   ac_status=$?
33350   grep -v '^ *+' conftest.er1 >conftest.err
33351   rm -f conftest.er1
33352   cat conftest.err >&5
33353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33354   (exit $ac_status); } >/dev/null; then
33355   if test -s conftest.err; then
33356     ac_cpp_err=$ac_c_preproc_warn_flag
33357     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
33358   else
33359     ac_cpp_err=
33360   fi
33361 else
33362   ac_cpp_err=yes
33363 fi
33364 if test -z "$ac_cpp_err"; then
33365   ac_header_preproc=yes
33366 else
33367   echo "$as_me: failed program was:" >&5
33368 sed 's/^/| /' conftest.$ac_ext >&5
33369
33370   ac_header_preproc=no
33371 fi
33372 rm -f conftest.err conftest.$ac_ext
33373 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
33374 echo "${ECHO_T}$ac_header_preproc" >&6
33375
33376 # So?  What about this header?
33377 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
33378   yes:no: )
33379     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
33380 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
33381     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
33382 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
33383     ac_header_preproc=yes
33384     ;;
33385   no:yes:* )
33386     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
33387 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
33388     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
33389 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
33390     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
33391 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
33392     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
33393 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
33394     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
33395 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
33396     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
33397 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
33398     (
33399       cat <<\_ASBOX
33400 ## --------------------------------------------- ##
33401 ## Report this to <http://www.openldap.org/its/> ##
33402 ## --------------------------------------------- ##
33403 _ASBOX
33404     ) |
33405       sed "s/^/$as_me: WARNING:     /" >&2
33406     ;;
33407 esac
33408 echo "$as_me:$LINENO: checking for $ac_header" >&5
33409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
33410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
33411   echo $ECHO_N "(cached) $ECHO_C" >&6
33412 else
33413   eval "$as_ac_Header=\$ac_header_preproc"
33414 fi
33415 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
33416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
33417
33418 fi
33419 if test `eval echo '${'$as_ac_Header'}'` = yes; then
33420   cat >>confdefs.h <<_ACEOF
33421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
33422 _ACEOF
33423
33424 fi
33425
33426 done
33427
33428
33429         if test $ac_cv_header_slp_h = yes ; then
33430                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
33431 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
33432 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
33433   echo $ECHO_N "(cached) $ECHO_C" >&6
33434 else
33435   ac_check_lib_save_LIBS=$LIBS
33436 LIBS="-lslp  $LIBS"
33437 cat >conftest.$ac_ext <<_ACEOF
33438 /* confdefs.h.  */
33439 _ACEOF
33440 cat confdefs.h >>conftest.$ac_ext
33441 cat >>conftest.$ac_ext <<_ACEOF
33442 /* end confdefs.h.  */
33443
33444 /* Override any gcc2 internal prototype to avoid an error.  */
33445 #ifdef __cplusplus
33446 extern "C"
33447 #endif
33448 /* We use char because int might match the return type of a gcc2
33449    builtin and then its argument prototype would still apply.  */
33450 char SLPOpen ();
33451 int
33452 main ()
33453 {
33454 SLPOpen ();
33455   ;
33456   return 0;
33457 }
33458 _ACEOF
33459 rm -f conftest.$ac_objext conftest$ac_exeext
33460 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
33461   (eval $ac_link) 2>conftest.er1
33462   ac_status=$?
33463   grep -v '^ *+' conftest.er1 >conftest.err
33464   rm -f conftest.er1
33465   cat conftest.err >&5
33466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33467   (exit $ac_status); } &&
33468          { ac_try='test -z "$ac_c_werror_flag"
33469                          || test ! -s conftest.err'
33470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33471   (eval $ac_try) 2>&5
33472   ac_status=$?
33473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33474   (exit $ac_status); }; } &&
33475          { ac_try='test -s conftest$ac_exeext'
33476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33477   (eval $ac_try) 2>&5
33478   ac_status=$?
33479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33480   (exit $ac_status); }; }; then
33481   ac_cv_lib_slp_SLPOpen=yes
33482 else
33483   echo "$as_me: failed program was:" >&5
33484 sed 's/^/| /' conftest.$ac_ext >&5
33485
33486 ac_cv_lib_slp_SLPOpen=no
33487 fi
33488 rm -f conftest.err conftest.$ac_objext \
33489       conftest$ac_exeext conftest.$ac_ext
33490 LIBS=$ac_check_lib_save_LIBS
33491 fi
33492 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
33493 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
33494 if test $ac_cv_lib_slp_SLPOpen = yes; then
33495   have_slp=yes
33496 else
33497   have_slp=no
33498 fi
33499
33500                 if test $have_slp = yes ; then
33501
33502 cat >>confdefs.h <<\_ACEOF
33503 #define HAVE_SLP 1
33504 _ACEOF
33505
33506                         SLAPD_SLP_LIBS=-lslp
33507                 fi
33508
33509         elif test $ol_enable_slp = yes ; then
33510                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
33511 echo "$as_me: error: SLP not found" >&2;}
33512    { (exit 1); exit 1; }; }
33513         fi
33514 fi
33515
33516
33517 echo "$as_me:$LINENO: checking for mode_t" >&5
33518 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
33519 if test "${ac_cv_type_mode_t+set}" = set; then
33520   echo $ECHO_N "(cached) $ECHO_C" >&6
33521 else
33522   cat >conftest.$ac_ext <<_ACEOF
33523 /* confdefs.h.  */
33524 _ACEOF
33525 cat confdefs.h >>conftest.$ac_ext
33526 cat >>conftest.$ac_ext <<_ACEOF
33527 /* end confdefs.h.  */
33528 $ac_includes_default
33529 int
33530 main ()
33531 {
33532 if ((mode_t *) 0)
33533   return 0;
33534 if (sizeof (mode_t))
33535   return 0;
33536   ;
33537   return 0;
33538 }
33539 _ACEOF
33540 rm -f conftest.$ac_objext
33541 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33542   (eval $ac_compile) 2>conftest.er1
33543   ac_status=$?
33544   grep -v '^ *+' conftest.er1 >conftest.err
33545   rm -f conftest.er1
33546   cat conftest.err >&5
33547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33548   (exit $ac_status); } &&
33549          { ac_try='test -z "$ac_c_werror_flag"
33550                          || test ! -s conftest.err'
33551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33552   (eval $ac_try) 2>&5
33553   ac_status=$?
33554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33555   (exit $ac_status); }; } &&
33556          { ac_try='test -s conftest.$ac_objext'
33557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33558   (eval $ac_try) 2>&5
33559   ac_status=$?
33560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33561   (exit $ac_status); }; }; then
33562   ac_cv_type_mode_t=yes
33563 else
33564   echo "$as_me: failed program was:" >&5
33565 sed 's/^/| /' conftest.$ac_ext >&5
33566
33567 ac_cv_type_mode_t=no
33568 fi
33569 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33570 fi
33571 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
33572 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
33573 if test $ac_cv_type_mode_t = yes; then
33574   :
33575 else
33576
33577 cat >>confdefs.h <<_ACEOF
33578 #define mode_t int
33579 _ACEOF
33580
33581 fi
33582
33583 echo "$as_me:$LINENO: checking for off_t" >&5
33584 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
33585 if test "${ac_cv_type_off_t+set}" = set; then
33586   echo $ECHO_N "(cached) $ECHO_C" >&6
33587 else
33588   cat >conftest.$ac_ext <<_ACEOF
33589 /* confdefs.h.  */
33590 _ACEOF
33591 cat confdefs.h >>conftest.$ac_ext
33592 cat >>conftest.$ac_ext <<_ACEOF
33593 /* end confdefs.h.  */
33594 $ac_includes_default
33595 int
33596 main ()
33597 {
33598 if ((off_t *) 0)
33599   return 0;
33600 if (sizeof (off_t))
33601   return 0;
33602   ;
33603   return 0;
33604 }
33605 _ACEOF
33606 rm -f conftest.$ac_objext
33607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33608   (eval $ac_compile) 2>conftest.er1
33609   ac_status=$?
33610   grep -v '^ *+' conftest.er1 >conftest.err
33611   rm -f conftest.er1
33612   cat conftest.err >&5
33613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33614   (exit $ac_status); } &&
33615          { ac_try='test -z "$ac_c_werror_flag"
33616                          || test ! -s conftest.err'
33617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33618   (eval $ac_try) 2>&5
33619   ac_status=$?
33620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33621   (exit $ac_status); }; } &&
33622          { ac_try='test -s conftest.$ac_objext'
33623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33624   (eval $ac_try) 2>&5
33625   ac_status=$?
33626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33627   (exit $ac_status); }; }; then
33628   ac_cv_type_off_t=yes
33629 else
33630   echo "$as_me: failed program was:" >&5
33631 sed 's/^/| /' conftest.$ac_ext >&5
33632
33633 ac_cv_type_off_t=no
33634 fi
33635 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33636 fi
33637 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
33638 echo "${ECHO_T}$ac_cv_type_off_t" >&6
33639 if test $ac_cv_type_off_t = yes; then
33640   :
33641 else
33642
33643 cat >>confdefs.h <<_ACEOF
33644 #define off_t long
33645 _ACEOF
33646
33647 fi
33648
33649 echo "$as_me:$LINENO: checking for pid_t" >&5
33650 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
33651 if test "${ac_cv_type_pid_t+set}" = set; then
33652   echo $ECHO_N "(cached) $ECHO_C" >&6
33653 else
33654   cat >conftest.$ac_ext <<_ACEOF
33655 /* confdefs.h.  */
33656 _ACEOF
33657 cat confdefs.h >>conftest.$ac_ext
33658 cat >>conftest.$ac_ext <<_ACEOF
33659 /* end confdefs.h.  */
33660 $ac_includes_default
33661 int
33662 main ()
33663 {
33664 if ((pid_t *) 0)
33665   return 0;
33666 if (sizeof (pid_t))
33667   return 0;
33668   ;
33669   return 0;
33670 }
33671 _ACEOF
33672 rm -f conftest.$ac_objext
33673 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33674   (eval $ac_compile) 2>conftest.er1
33675   ac_status=$?
33676   grep -v '^ *+' conftest.er1 >conftest.err
33677   rm -f conftest.er1
33678   cat conftest.err >&5
33679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33680   (exit $ac_status); } &&
33681          { ac_try='test -z "$ac_c_werror_flag"
33682                          || test ! -s conftest.err'
33683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33684   (eval $ac_try) 2>&5
33685   ac_status=$?
33686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33687   (exit $ac_status); }; } &&
33688          { ac_try='test -s conftest.$ac_objext'
33689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33690   (eval $ac_try) 2>&5
33691   ac_status=$?
33692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33693   (exit $ac_status); }; }; then
33694   ac_cv_type_pid_t=yes
33695 else
33696   echo "$as_me: failed program was:" >&5
33697 sed 's/^/| /' conftest.$ac_ext >&5
33698
33699 ac_cv_type_pid_t=no
33700 fi
33701 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33702 fi
33703 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
33704 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
33705 if test $ac_cv_type_pid_t = yes; then
33706   :
33707 else
33708
33709 cat >>confdefs.h <<_ACEOF
33710 #define pid_t int
33711 _ACEOF
33712
33713 fi
33714
33715 echo "$as_me:$LINENO: checking for ssize_t" >&5
33716 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
33717 if test "${ac_cv_type_ssize_t+set}" = set; then
33718   echo $ECHO_N "(cached) $ECHO_C" >&6
33719 else
33720   cat >conftest.$ac_ext <<_ACEOF
33721 /* confdefs.h.  */
33722 _ACEOF
33723 cat confdefs.h >>conftest.$ac_ext
33724 cat >>conftest.$ac_ext <<_ACEOF
33725 /* end confdefs.h.  */
33726 $ac_includes_default
33727 int
33728 main ()
33729 {
33730 if ((ssize_t *) 0)
33731   return 0;
33732 if (sizeof (ssize_t))
33733   return 0;
33734   ;
33735   return 0;
33736 }
33737 _ACEOF
33738 rm -f conftest.$ac_objext
33739 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33740   (eval $ac_compile) 2>conftest.er1
33741   ac_status=$?
33742   grep -v '^ *+' conftest.er1 >conftest.err
33743   rm -f conftest.er1
33744   cat conftest.err >&5
33745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33746   (exit $ac_status); } &&
33747          { ac_try='test -z "$ac_c_werror_flag"
33748                          || test ! -s conftest.err'
33749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33750   (eval $ac_try) 2>&5
33751   ac_status=$?
33752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33753   (exit $ac_status); }; } &&
33754          { ac_try='test -s conftest.$ac_objext'
33755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33756   (eval $ac_try) 2>&5
33757   ac_status=$?
33758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33759   (exit $ac_status); }; }; then
33760   ac_cv_type_ssize_t=yes
33761 else
33762   echo "$as_me: failed program was:" >&5
33763 sed 's/^/| /' conftest.$ac_ext >&5
33764
33765 ac_cv_type_ssize_t=no
33766 fi
33767 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33768 fi
33769 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
33770 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
33771 if test $ac_cv_type_ssize_t = yes; then
33772   :
33773 else
33774
33775 cat >>confdefs.h <<_ACEOF
33776 #define ssize_t signed int
33777 _ACEOF
33778
33779 fi
33780
33781 echo "$as_me:$LINENO: checking for caddr_t" >&5
33782 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
33783 if test "${ac_cv_type_caddr_t+set}" = set; then
33784   echo $ECHO_N "(cached) $ECHO_C" >&6
33785 else
33786   cat >conftest.$ac_ext <<_ACEOF
33787 /* confdefs.h.  */
33788 _ACEOF
33789 cat confdefs.h >>conftest.$ac_ext
33790 cat >>conftest.$ac_ext <<_ACEOF
33791 /* end confdefs.h.  */
33792 $ac_includes_default
33793 int
33794 main ()
33795 {
33796 if ((caddr_t *) 0)
33797   return 0;
33798 if (sizeof (caddr_t))
33799   return 0;
33800   ;
33801   return 0;
33802 }
33803 _ACEOF
33804 rm -f conftest.$ac_objext
33805 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33806   (eval $ac_compile) 2>conftest.er1
33807   ac_status=$?
33808   grep -v '^ *+' conftest.er1 >conftest.err
33809   rm -f conftest.er1
33810   cat conftest.err >&5
33811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33812   (exit $ac_status); } &&
33813          { ac_try='test -z "$ac_c_werror_flag"
33814                          || test ! -s conftest.err'
33815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33816   (eval $ac_try) 2>&5
33817   ac_status=$?
33818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33819   (exit $ac_status); }; } &&
33820          { ac_try='test -s conftest.$ac_objext'
33821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33822   (eval $ac_try) 2>&5
33823   ac_status=$?
33824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33825   (exit $ac_status); }; }; then
33826   ac_cv_type_caddr_t=yes
33827 else
33828   echo "$as_me: failed program was:" >&5
33829 sed 's/^/| /' conftest.$ac_ext >&5
33830
33831 ac_cv_type_caddr_t=no
33832 fi
33833 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33834 fi
33835 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
33836 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
33837 if test $ac_cv_type_caddr_t = yes; then
33838   :
33839 else
33840
33841 cat >>confdefs.h <<_ACEOF
33842 #define caddr_t char *
33843 _ACEOF
33844
33845 fi
33846
33847 echo "$as_me:$LINENO: checking for size_t" >&5
33848 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
33849 if test "${ac_cv_type_size_t+set}" = set; then
33850   echo $ECHO_N "(cached) $ECHO_C" >&6
33851 else
33852   cat >conftest.$ac_ext <<_ACEOF
33853 /* confdefs.h.  */
33854 _ACEOF
33855 cat confdefs.h >>conftest.$ac_ext
33856 cat >>conftest.$ac_ext <<_ACEOF
33857 /* end confdefs.h.  */
33858 $ac_includes_default
33859 int
33860 main ()
33861 {
33862 if ((size_t *) 0)
33863   return 0;
33864 if (sizeof (size_t))
33865   return 0;
33866   ;
33867   return 0;
33868 }
33869 _ACEOF
33870 rm -f conftest.$ac_objext
33871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33872   (eval $ac_compile) 2>conftest.er1
33873   ac_status=$?
33874   grep -v '^ *+' conftest.er1 >conftest.err
33875   rm -f conftest.er1
33876   cat conftest.err >&5
33877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33878   (exit $ac_status); } &&
33879          { ac_try='test -z "$ac_c_werror_flag"
33880                          || test ! -s conftest.err'
33881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33882   (eval $ac_try) 2>&5
33883   ac_status=$?
33884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33885   (exit $ac_status); }; } &&
33886          { ac_try='test -s conftest.$ac_objext'
33887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33888   (eval $ac_try) 2>&5
33889   ac_status=$?
33890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33891   (exit $ac_status); }; }; then
33892   ac_cv_type_size_t=yes
33893 else
33894   echo "$as_me: failed program was:" >&5
33895 sed 's/^/| /' conftest.$ac_ext >&5
33896
33897 ac_cv_type_size_t=no
33898 fi
33899 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33900 fi
33901 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
33902 echo "${ECHO_T}$ac_cv_type_size_t" >&6
33903 if test $ac_cv_type_size_t = yes; then
33904   :
33905 else
33906
33907 cat >>confdefs.h <<_ACEOF
33908 #define size_t unsigned
33909 _ACEOF
33910
33911 fi
33912
33913
33914 echo "$as_me:$LINENO: checking for long long" >&5
33915 echo $ECHO_N "checking for long long... $ECHO_C" >&6
33916 if test "${ac_cv_type_long_long+set}" = set; then
33917   echo $ECHO_N "(cached) $ECHO_C" >&6
33918 else
33919   cat >conftest.$ac_ext <<_ACEOF
33920 /* confdefs.h.  */
33921 _ACEOF
33922 cat confdefs.h >>conftest.$ac_ext
33923 cat >>conftest.$ac_ext <<_ACEOF
33924 /* end confdefs.h.  */
33925 $ac_includes_default
33926 int
33927 main ()
33928 {
33929 if ((long long *) 0)
33930   return 0;
33931 if (sizeof (long long))
33932   return 0;
33933   ;
33934   return 0;
33935 }
33936 _ACEOF
33937 rm -f conftest.$ac_objext
33938 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
33939   (eval $ac_compile) 2>conftest.er1
33940   ac_status=$?
33941   grep -v '^ *+' conftest.er1 >conftest.err
33942   rm -f conftest.er1
33943   cat conftest.err >&5
33944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33945   (exit $ac_status); } &&
33946          { ac_try='test -z "$ac_c_werror_flag"
33947                          || test ! -s conftest.err'
33948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33949   (eval $ac_try) 2>&5
33950   ac_status=$?
33951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33952   (exit $ac_status); }; } &&
33953          { ac_try='test -s conftest.$ac_objext'
33954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33955   (eval $ac_try) 2>&5
33956   ac_status=$?
33957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33958   (exit $ac_status); }; }; then
33959   ac_cv_type_long_long=yes
33960 else
33961   echo "$as_me: failed program was:" >&5
33962 sed 's/^/| /' conftest.$ac_ext >&5
33963
33964 ac_cv_type_long_long=no
33965 fi
33966 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
33967 fi
33968 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
33969 echo "${ECHO_T}$ac_cv_type_long_long" >&6
33970 if test $ac_cv_type_long_long = yes; then
33971
33972 cat >>confdefs.h <<_ACEOF
33973 #define HAVE_LONG_LONG 1
33974 _ACEOF
33975
33976
33977 fi
33978
33979 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
33980 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
33981 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
33982   echo $ECHO_N "(cached) $ECHO_C" >&6
33983 else
33984   cat >conftest.$ac_ext <<_ACEOF
33985 /* confdefs.h.  */
33986 _ACEOF
33987 cat confdefs.h >>conftest.$ac_ext
33988 cat >>conftest.$ac_ext <<_ACEOF
33989 /* end confdefs.h.  */
33990 $ac_includes_default
33991 int
33992 main ()
33993 {
33994 if ((ptrdiff_t *) 0)
33995   return 0;
33996 if (sizeof (ptrdiff_t))
33997   return 0;
33998   ;
33999   return 0;
34000 }
34001 _ACEOF
34002 rm -f conftest.$ac_objext
34003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34004   (eval $ac_compile) 2>conftest.er1
34005   ac_status=$?
34006   grep -v '^ *+' conftest.er1 >conftest.err
34007   rm -f conftest.er1
34008   cat conftest.err >&5
34009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34010   (exit $ac_status); } &&
34011          { ac_try='test -z "$ac_c_werror_flag"
34012                          || test ! -s conftest.err'
34013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34014   (eval $ac_try) 2>&5
34015   ac_status=$?
34016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34017   (exit $ac_status); }; } &&
34018          { ac_try='test -s conftest.$ac_objext'
34019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34020   (eval $ac_try) 2>&5
34021   ac_status=$?
34022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34023   (exit $ac_status); }; }; then
34024   ac_cv_type_ptrdiff_t=yes
34025 else
34026   echo "$as_me: failed program was:" >&5
34027 sed 's/^/| /' conftest.$ac_ext >&5
34028
34029 ac_cv_type_ptrdiff_t=no
34030 fi
34031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34032 fi
34033 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
34034 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
34035 if test $ac_cv_type_ptrdiff_t = yes; then
34036
34037 cat >>confdefs.h <<_ACEOF
34038 #define HAVE_PTRDIFF_T 1
34039 _ACEOF
34040
34041
34042 fi
34043
34044
34045
34046 echo "$as_me:$LINENO: checking for socklen_t" >&5
34047 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
34048 if test "${ac_cv_type_socklen_t+set}" = set; then
34049   echo $ECHO_N "(cached) $ECHO_C" >&6
34050 else
34051   cat >conftest.$ac_ext <<_ACEOF
34052 /* confdefs.h.  */
34053 _ACEOF
34054 cat confdefs.h >>conftest.$ac_ext
34055 cat >>conftest.$ac_ext <<_ACEOF
34056 /* end confdefs.h.  */
34057 $ac_includes_default
34058 #ifdef HAVE_SYS_SOCKET_H
34059 #include <sys/socket.h>
34060 #endif
34061
34062 int
34063 main ()
34064 {
34065 if ((socklen_t *) 0)
34066   return 0;
34067 if (sizeof (socklen_t))
34068   return 0;
34069   ;
34070   return 0;
34071 }
34072 _ACEOF
34073 rm -f conftest.$ac_objext
34074 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34075   (eval $ac_compile) 2>conftest.er1
34076   ac_status=$?
34077   grep -v '^ *+' conftest.er1 >conftest.err
34078   rm -f conftest.er1
34079   cat conftest.err >&5
34080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34081   (exit $ac_status); } &&
34082          { ac_try='test -z "$ac_c_werror_flag"
34083                          || test ! -s conftest.err'
34084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34085   (eval $ac_try) 2>&5
34086   ac_status=$?
34087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34088   (exit $ac_status); }; } &&
34089          { ac_try='test -s conftest.$ac_objext'
34090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34091   (eval $ac_try) 2>&5
34092   ac_status=$?
34093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34094   (exit $ac_status); }; }; then
34095   ac_cv_type_socklen_t=yes
34096 else
34097   echo "$as_me: failed program was:" >&5
34098 sed 's/^/| /' conftest.$ac_ext >&5
34099
34100 ac_cv_type_socklen_t=no
34101 fi
34102 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34103 fi
34104 echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
34105 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
34106
34107
34108 echo "$as_me:$LINENO: checking the type of arg 3 to accept()" >&5
34109 echo $ECHO_N "checking the type of arg 3 to accept()... $ECHO_C" >&6
34110 if test "${ol_cv_type_ber_socklen_t+set}" = set; then
34111   echo $ECHO_N "(cached) $ECHO_C" >&6
34112 else
34113
34114         set socklen_t int unsigned "unsigned long" long size_t
34115         test "$ac_cv_type_socklen_t" = yes || shift
34116         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
34117         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
34118                 cat >conftest.$ac_ext <<_ACEOF
34119 /* confdefs.h.  */
34120 _ACEOF
34121 cat confdefs.h >>conftest.$ac_ext
34122 cat >>conftest.$ac_ext <<_ACEOF
34123 /* end confdefs.h.  */
34124 $ac_includes_default
34125 #ifdef HAVE_SYS_SOCKET_H
34126 #include <sys/socket.h>
34127 #endif
34128 extern int accept(int s, $addrtype *ap, $lentype *lp);
34129
34130 int
34131 main ()
34132 {
34133
34134 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
34135
34136   ;
34137   return 0;
34138 }
34139 _ACEOF
34140 rm -f conftest.$ac_objext
34141 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34142   (eval $ac_compile) 2>conftest.er1
34143   ac_status=$?
34144   grep -v '^ *+' conftest.er1 >conftest.err
34145   rm -f conftest.er1
34146   cat conftest.err >&5
34147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34148   (exit $ac_status); } &&
34149          { ac_try='test -z "$ac_c_werror_flag"
34150                          || test ! -s conftest.err'
34151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34152   (eval $ac_try) 2>&5
34153   ac_status=$?
34154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34155   (exit $ac_status); }; } &&
34156          { ac_try='test -s conftest.$ac_objext'
34157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34158   (eval $ac_try) 2>&5
34159   ac_status=$?
34160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34161   (exit $ac_status); }; }; then
34162   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
34163 else
34164   echo "$as_me: failed program was:" >&5
34165 sed 's/^/| /' conftest.$ac_ext >&5
34166
34167 fi
34168 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34169         done ; done
34170 fi
34171
34172 echo "$as_me:$LINENO: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
34173 echo "${ECHO_T}$guessing$ol_cv_type_ber_socklen_t *" >&6
34174
34175 cat >>confdefs.h <<_ACEOF
34176 #define ber_socklen_t $ol_cv_type_ber_socklen_t
34177 _ACEOF
34178
34179
34180 if test "$ac_cv_type_socklen_t" != yes; then
34181
34182 cat >>confdefs.h <<_ACEOF
34183 #define socklen_t $ol_cv_type_ber_socklen_t
34184 _ACEOF
34185
34186 fi
34187
34188
34189 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
34190 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
34191 if test "${ac_cv_type_signal+set}" = set; then
34192   echo $ECHO_N "(cached) $ECHO_C" >&6
34193 else
34194   cat >conftest.$ac_ext <<_ACEOF
34195 /* confdefs.h.  */
34196 _ACEOF
34197 cat confdefs.h >>conftest.$ac_ext
34198 cat >>conftest.$ac_ext <<_ACEOF
34199 /* end confdefs.h.  */
34200 #include <sys/types.h>
34201 #include <signal.h>
34202 #ifdef signal
34203 # undef signal
34204 #endif
34205 #ifdef __cplusplus
34206 extern "C" void (*signal (int, void (*)(int)))(int);
34207 #else
34208 void (*signal ()) ();
34209 #endif
34210
34211 int
34212 main ()
34213 {
34214 int i;
34215   ;
34216   return 0;
34217 }
34218 _ACEOF
34219 rm -f conftest.$ac_objext
34220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34221   (eval $ac_compile) 2>conftest.er1
34222   ac_status=$?
34223   grep -v '^ *+' conftest.er1 >conftest.err
34224   rm -f conftest.er1
34225   cat conftest.err >&5
34226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34227   (exit $ac_status); } &&
34228          { ac_try='test -z "$ac_c_werror_flag"
34229                          || test ! -s conftest.err'
34230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34231   (eval $ac_try) 2>&5
34232   ac_status=$?
34233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34234   (exit $ac_status); }; } &&
34235          { ac_try='test -s conftest.$ac_objext'
34236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34237   (eval $ac_try) 2>&5
34238   ac_status=$?
34239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34240   (exit $ac_status); }; }; then
34241   ac_cv_type_signal=void
34242 else
34243   echo "$as_me: failed program was:" >&5
34244 sed 's/^/| /' conftest.$ac_ext >&5
34245
34246 ac_cv_type_signal=int
34247 fi
34248 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34249 fi
34250 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
34251 echo "${ECHO_T}$ac_cv_type_signal" >&6
34252
34253 cat >>confdefs.h <<_ACEOF
34254 #define RETSIGTYPE $ac_cv_type_signal
34255 _ACEOF
34256
34257
34258
34259 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
34260 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
34261 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
34262   echo $ECHO_N "(cached) $ECHO_C" >&6
34263 else
34264   cat >conftest.$ac_ext <<_ACEOF
34265 /* confdefs.h.  */
34266 _ACEOF
34267 cat confdefs.h >>conftest.$ac_ext
34268 cat >>conftest.$ac_ext <<_ACEOF
34269 /* end confdefs.h.  */
34270 $ac_includes_default
34271 #include <signal.h>
34272
34273
34274 int
34275 main ()
34276 {
34277 if ((sig_atomic_t *) 0)
34278   return 0;
34279 if (sizeof (sig_atomic_t))
34280   return 0;
34281   ;
34282   return 0;
34283 }
34284 _ACEOF
34285 rm -f conftest.$ac_objext
34286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34287   (eval $ac_compile) 2>conftest.er1
34288   ac_status=$?
34289   grep -v '^ *+' conftest.er1 >conftest.err
34290   rm -f conftest.er1
34291   cat conftest.err >&5
34292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34293   (exit $ac_status); } &&
34294          { ac_try='test -z "$ac_c_werror_flag"
34295                          || test ! -s conftest.err'
34296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34297   (eval $ac_try) 2>&5
34298   ac_status=$?
34299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34300   (exit $ac_status); }; } &&
34301          { ac_try='test -s conftest.$ac_objext'
34302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34303   (eval $ac_try) 2>&5
34304   ac_status=$?
34305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34306   (exit $ac_status); }; }; then
34307   ac_cv_type_sig_atomic_t=yes
34308 else
34309   echo "$as_me: failed program was:" >&5
34310 sed 's/^/| /' conftest.$ac_ext >&5
34311
34312 ac_cv_type_sig_atomic_t=no
34313 fi
34314 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34315 fi
34316 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
34317 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
34318 if test $ac_cv_type_sig_atomic_t = yes; then
34319   :
34320 else
34321
34322 cat >>confdefs.h <<_ACEOF
34323 #define sig_atomic_t int
34324 _ACEOF
34325
34326 fi
34327
34328
34329 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
34330 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
34331 if test "${ac_cv_type_uid_t+set}" = set; then
34332   echo $ECHO_N "(cached) $ECHO_C" >&6
34333 else
34334   cat >conftest.$ac_ext <<_ACEOF
34335 /* confdefs.h.  */
34336 _ACEOF
34337 cat confdefs.h >>conftest.$ac_ext
34338 cat >>conftest.$ac_ext <<_ACEOF
34339 /* end confdefs.h.  */
34340 #include <sys/types.h>
34341
34342 _ACEOF
34343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34344   $EGREP "uid_t" >/dev/null 2>&1; then
34345   ac_cv_type_uid_t=yes
34346 else
34347   ac_cv_type_uid_t=no
34348 fi
34349 rm -f conftest*
34350
34351 fi
34352 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
34353 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
34354 if test $ac_cv_type_uid_t = no; then
34355
34356 cat >>confdefs.h <<\_ACEOF
34357 #define uid_t int
34358 _ACEOF
34359
34360
34361 cat >>confdefs.h <<\_ACEOF
34362 #define gid_t int
34363 _ACEOF
34364
34365 fi
34366
34367
34368 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
34369 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
34370 if test "${ac_cv_header_time+set}" = set; then
34371   echo $ECHO_N "(cached) $ECHO_C" >&6
34372 else
34373   cat >conftest.$ac_ext <<_ACEOF
34374 /* confdefs.h.  */
34375 _ACEOF
34376 cat confdefs.h >>conftest.$ac_ext
34377 cat >>conftest.$ac_ext <<_ACEOF
34378 /* end confdefs.h.  */
34379 #include <sys/types.h>
34380 #include <sys/time.h>
34381 #include <time.h>
34382
34383 int
34384 main ()
34385 {
34386 if ((struct tm *) 0)
34387 return 0;
34388   ;
34389   return 0;
34390 }
34391 _ACEOF
34392 rm -f conftest.$ac_objext
34393 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34394   (eval $ac_compile) 2>conftest.er1
34395   ac_status=$?
34396   grep -v '^ *+' conftest.er1 >conftest.err
34397   rm -f conftest.er1
34398   cat conftest.err >&5
34399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34400   (exit $ac_status); } &&
34401          { ac_try='test -z "$ac_c_werror_flag"
34402                          || test ! -s conftest.err'
34403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34404   (eval $ac_try) 2>&5
34405   ac_status=$?
34406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34407   (exit $ac_status); }; } &&
34408          { ac_try='test -s conftest.$ac_objext'
34409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34410   (eval $ac_try) 2>&5
34411   ac_status=$?
34412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34413   (exit $ac_status); }; }; then
34414   ac_cv_header_time=yes
34415 else
34416   echo "$as_me: failed program was:" >&5
34417 sed 's/^/| /' conftest.$ac_ext >&5
34418
34419 ac_cv_header_time=no
34420 fi
34421 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34422 fi
34423 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
34424 echo "${ECHO_T}$ac_cv_header_time" >&6
34425 if test $ac_cv_header_time = yes; then
34426
34427 cat >>confdefs.h <<\_ACEOF
34428 #define TIME_WITH_SYS_TIME 1
34429 _ACEOF
34430
34431 fi
34432
34433 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
34434 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
34435 if test "${ac_cv_struct_tm+set}" = set; then
34436   echo $ECHO_N "(cached) $ECHO_C" >&6
34437 else
34438   cat >conftest.$ac_ext <<_ACEOF
34439 /* confdefs.h.  */
34440 _ACEOF
34441 cat confdefs.h >>conftest.$ac_ext
34442 cat >>conftest.$ac_ext <<_ACEOF
34443 /* end confdefs.h.  */
34444 #include <sys/types.h>
34445 #include <time.h>
34446
34447 int
34448 main ()
34449 {
34450 struct tm *tp; tp->tm_sec;
34451   ;
34452   return 0;
34453 }
34454 _ACEOF
34455 rm -f conftest.$ac_objext
34456 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34457   (eval $ac_compile) 2>conftest.er1
34458   ac_status=$?
34459   grep -v '^ *+' conftest.er1 >conftest.err
34460   rm -f conftest.er1
34461   cat conftest.err >&5
34462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34463   (exit $ac_status); } &&
34464          { ac_try='test -z "$ac_c_werror_flag"
34465                          || test ! -s conftest.err'
34466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34467   (eval $ac_try) 2>&5
34468   ac_status=$?
34469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34470   (exit $ac_status); }; } &&
34471          { ac_try='test -s conftest.$ac_objext'
34472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34473   (eval $ac_try) 2>&5
34474   ac_status=$?
34475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34476   (exit $ac_status); }; }; then
34477   ac_cv_struct_tm=time.h
34478 else
34479   echo "$as_me: failed program was:" >&5
34480 sed 's/^/| /' conftest.$ac_ext >&5
34481
34482 ac_cv_struct_tm=sys/time.h
34483 fi
34484 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34485 fi
34486 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
34487 echo "${ECHO_T}$ac_cv_struct_tm" >&6
34488 if test $ac_cv_struct_tm = sys/time.h; then
34489
34490 cat >>confdefs.h <<\_ACEOF
34491 #define TM_IN_SYS_TIME 1
34492 _ACEOF
34493
34494 fi
34495
34496 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
34497 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
34498 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
34499   echo $ECHO_N "(cached) $ECHO_C" >&6
34500 else
34501   cat >conftest.$ac_ext <<_ACEOF
34502 /* confdefs.h.  */
34503 _ACEOF
34504 cat confdefs.h >>conftest.$ac_ext
34505 cat >>conftest.$ac_ext <<_ACEOF
34506 /* end confdefs.h.  */
34507 $ac_includes_default
34508 int
34509 main ()
34510 {
34511 static struct stat ac_aggr;
34512 if (ac_aggr.st_blksize)
34513 return 0;
34514   ;
34515   return 0;
34516 }
34517 _ACEOF
34518 rm -f conftest.$ac_objext
34519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34520   (eval $ac_compile) 2>conftest.er1
34521   ac_status=$?
34522   grep -v '^ *+' conftest.er1 >conftest.err
34523   rm -f conftest.er1
34524   cat conftest.err >&5
34525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34526   (exit $ac_status); } &&
34527          { ac_try='test -z "$ac_c_werror_flag"
34528                          || test ! -s conftest.err'
34529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34530   (eval $ac_try) 2>&5
34531   ac_status=$?
34532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34533   (exit $ac_status); }; } &&
34534          { ac_try='test -s conftest.$ac_objext'
34535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34536   (eval $ac_try) 2>&5
34537   ac_status=$?
34538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34539   (exit $ac_status); }; }; then
34540   ac_cv_member_struct_stat_st_blksize=yes
34541 else
34542   echo "$as_me: failed program was:" >&5
34543 sed 's/^/| /' conftest.$ac_ext >&5
34544
34545 cat >conftest.$ac_ext <<_ACEOF
34546 /* confdefs.h.  */
34547 _ACEOF
34548 cat confdefs.h >>conftest.$ac_ext
34549 cat >>conftest.$ac_ext <<_ACEOF
34550 /* end confdefs.h.  */
34551 $ac_includes_default
34552 int
34553 main ()
34554 {
34555 static struct stat ac_aggr;
34556 if (sizeof ac_aggr.st_blksize)
34557 return 0;
34558   ;
34559   return 0;
34560 }
34561 _ACEOF
34562 rm -f conftest.$ac_objext
34563 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34564   (eval $ac_compile) 2>conftest.er1
34565   ac_status=$?
34566   grep -v '^ *+' conftest.er1 >conftest.err
34567   rm -f conftest.er1
34568   cat conftest.err >&5
34569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34570   (exit $ac_status); } &&
34571          { ac_try='test -z "$ac_c_werror_flag"
34572                          || test ! -s conftest.err'
34573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34574   (eval $ac_try) 2>&5
34575   ac_status=$?
34576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34577   (exit $ac_status); }; } &&
34578          { ac_try='test -s conftest.$ac_objext'
34579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34580   (eval $ac_try) 2>&5
34581   ac_status=$?
34582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34583   (exit $ac_status); }; }; then
34584   ac_cv_member_struct_stat_st_blksize=yes
34585 else
34586   echo "$as_me: failed program was:" >&5
34587 sed 's/^/| /' conftest.$ac_ext >&5
34588
34589 ac_cv_member_struct_stat_st_blksize=no
34590 fi
34591 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34592 fi
34593 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34594 fi
34595 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
34596 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
34597 if test $ac_cv_member_struct_stat_st_blksize = yes; then
34598
34599 cat >>confdefs.h <<_ACEOF
34600 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
34601 _ACEOF
34602
34603
34604 fi
34605
34606 echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
34607 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
34608 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
34609   echo $ECHO_N "(cached) $ECHO_C" >&6
34610 else
34611   cat >conftest.$ac_ext <<_ACEOF
34612 /* confdefs.h.  */
34613 _ACEOF
34614 cat confdefs.h >>conftest.$ac_ext
34615 cat >>conftest.$ac_ext <<_ACEOF
34616 /* end confdefs.h.  */
34617 $ac_includes_default
34618 #include <pwd.h>
34619
34620 int
34621 main ()
34622 {
34623 static struct passwd ac_aggr;
34624 if (ac_aggr.pw_gecos)
34625 return 0;
34626   ;
34627   return 0;
34628 }
34629 _ACEOF
34630 rm -f conftest.$ac_objext
34631 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34632   (eval $ac_compile) 2>conftest.er1
34633   ac_status=$?
34634   grep -v '^ *+' conftest.er1 >conftest.err
34635   rm -f conftest.er1
34636   cat conftest.err >&5
34637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34638   (exit $ac_status); } &&
34639          { ac_try='test -z "$ac_c_werror_flag"
34640                          || test ! -s conftest.err'
34641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34642   (eval $ac_try) 2>&5
34643   ac_status=$?
34644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34645   (exit $ac_status); }; } &&
34646          { ac_try='test -s conftest.$ac_objext'
34647   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34648   (eval $ac_try) 2>&5
34649   ac_status=$?
34650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34651   (exit $ac_status); }; }; then
34652   ac_cv_member_struct_passwd_pw_gecos=yes
34653 else
34654   echo "$as_me: failed program was:" >&5
34655 sed 's/^/| /' conftest.$ac_ext >&5
34656
34657 cat >conftest.$ac_ext <<_ACEOF
34658 /* confdefs.h.  */
34659 _ACEOF
34660 cat confdefs.h >>conftest.$ac_ext
34661 cat >>conftest.$ac_ext <<_ACEOF
34662 /* end confdefs.h.  */
34663 $ac_includes_default
34664 #include <pwd.h>
34665
34666 int
34667 main ()
34668 {
34669 static struct passwd ac_aggr;
34670 if (sizeof ac_aggr.pw_gecos)
34671 return 0;
34672   ;
34673   return 0;
34674 }
34675 _ACEOF
34676 rm -f conftest.$ac_objext
34677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34678   (eval $ac_compile) 2>conftest.er1
34679   ac_status=$?
34680   grep -v '^ *+' conftest.er1 >conftest.err
34681   rm -f conftest.er1
34682   cat conftest.err >&5
34683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34684   (exit $ac_status); } &&
34685          { ac_try='test -z "$ac_c_werror_flag"
34686                          || test ! -s conftest.err'
34687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34688   (eval $ac_try) 2>&5
34689   ac_status=$?
34690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34691   (exit $ac_status); }; } &&
34692          { ac_try='test -s conftest.$ac_objext'
34693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34694   (eval $ac_try) 2>&5
34695   ac_status=$?
34696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34697   (exit $ac_status); }; }; then
34698   ac_cv_member_struct_passwd_pw_gecos=yes
34699 else
34700   echo "$as_me: failed program was:" >&5
34701 sed 's/^/| /' conftest.$ac_ext >&5
34702
34703 ac_cv_member_struct_passwd_pw_gecos=no
34704 fi
34705 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34706 fi
34707 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34708 fi
34709 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
34710 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
34711 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
34712
34713 cat >>confdefs.h <<_ACEOF
34714 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
34715 _ACEOF
34716
34717
34718 fi
34719
34720 echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
34721 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
34722 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
34723   echo $ECHO_N "(cached) $ECHO_C" >&6
34724 else
34725   cat >conftest.$ac_ext <<_ACEOF
34726 /* confdefs.h.  */
34727 _ACEOF
34728 cat confdefs.h >>conftest.$ac_ext
34729 cat >>conftest.$ac_ext <<_ACEOF
34730 /* end confdefs.h.  */
34731 $ac_includes_default
34732 #include <pwd.h>
34733
34734 int
34735 main ()
34736 {
34737 static struct passwd ac_aggr;
34738 if (ac_aggr.pw_passwd)
34739 return 0;
34740   ;
34741   return 0;
34742 }
34743 _ACEOF
34744 rm -f conftest.$ac_objext
34745 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34746   (eval $ac_compile) 2>conftest.er1
34747   ac_status=$?
34748   grep -v '^ *+' conftest.er1 >conftest.err
34749   rm -f conftest.er1
34750   cat conftest.err >&5
34751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34752   (exit $ac_status); } &&
34753          { ac_try='test -z "$ac_c_werror_flag"
34754                          || test ! -s conftest.err'
34755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34756   (eval $ac_try) 2>&5
34757   ac_status=$?
34758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34759   (exit $ac_status); }; } &&
34760          { ac_try='test -s conftest.$ac_objext'
34761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34762   (eval $ac_try) 2>&5
34763   ac_status=$?
34764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34765   (exit $ac_status); }; }; then
34766   ac_cv_member_struct_passwd_pw_passwd=yes
34767 else
34768   echo "$as_me: failed program was:" >&5
34769 sed 's/^/| /' conftest.$ac_ext >&5
34770
34771 cat >conftest.$ac_ext <<_ACEOF
34772 /* confdefs.h.  */
34773 _ACEOF
34774 cat confdefs.h >>conftest.$ac_ext
34775 cat >>conftest.$ac_ext <<_ACEOF
34776 /* end confdefs.h.  */
34777 $ac_includes_default
34778 #include <pwd.h>
34779
34780 int
34781 main ()
34782 {
34783 static struct passwd ac_aggr;
34784 if (sizeof ac_aggr.pw_passwd)
34785 return 0;
34786   ;
34787   return 0;
34788 }
34789 _ACEOF
34790 rm -f conftest.$ac_objext
34791 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34792   (eval $ac_compile) 2>conftest.er1
34793   ac_status=$?
34794   grep -v '^ *+' conftest.er1 >conftest.err
34795   rm -f conftest.er1
34796   cat conftest.err >&5
34797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34798   (exit $ac_status); } &&
34799          { ac_try='test -z "$ac_c_werror_flag"
34800                          || test ! -s conftest.err'
34801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34802   (eval $ac_try) 2>&5
34803   ac_status=$?
34804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34805   (exit $ac_status); }; } &&
34806          { ac_try='test -s conftest.$ac_objext'
34807   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34808   (eval $ac_try) 2>&5
34809   ac_status=$?
34810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34811   (exit $ac_status); }; }; then
34812   ac_cv_member_struct_passwd_pw_passwd=yes
34813 else
34814   echo "$as_me: failed program was:" >&5
34815 sed 's/^/| /' conftest.$ac_ext >&5
34816
34817 ac_cv_member_struct_passwd_pw_passwd=no
34818 fi
34819 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34820 fi
34821 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34822 fi
34823 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
34824 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
34825 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
34826
34827 cat >>confdefs.h <<_ACEOF
34828 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
34829 _ACEOF
34830
34831
34832 fi
34833
34834
34835 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
34836 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
34837 if test "${ol_cv_c_upper_lower+set}" = set; then
34838   echo $ECHO_N "(cached) $ECHO_C" >&6
34839 else
34840
34841         if test "$cross_compiling" = yes; then
34842   ol_cv_c_upper_lower=safe
34843 else
34844   cat >conftest.$ac_ext <<_ACEOF
34845 /* confdefs.h.  */
34846 _ACEOF
34847 cat confdefs.h >>conftest.$ac_ext
34848 cat >>conftest.$ac_ext <<_ACEOF
34849 /* end confdefs.h.  */
34850
34851 #include <ctype.h>
34852 main()
34853 {
34854         if ('C' == toupper('C'))
34855                 exit(0);
34856         else
34857                 exit(1);
34858 }
34859 _ACEOF
34860 rm -f conftest$ac_exeext
34861 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
34862   (eval $ac_link) 2>&5
34863   ac_status=$?
34864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34865   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34867   (eval $ac_try) 2>&5
34868   ac_status=$?
34869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34870   (exit $ac_status); }; }; then
34871   ol_cv_c_upper_lower=no
34872 else
34873   echo "$as_me: program exited with status $ac_status" >&5
34874 echo "$as_me: failed program was:" >&5
34875 sed 's/^/| /' conftest.$ac_ext >&5
34876
34877 ( exit $ac_status )
34878 ol_cv_c_upper_lower=yes
34879 fi
34880 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34881 fi
34882 fi
34883 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
34884 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
34885 if test $ol_cv_c_upper_lower != no ; then
34886
34887 cat >>confdefs.h <<\_ACEOF
34888 #define C_UPPER_LOWER 1
34889 _ACEOF
34890
34891 fi
34892
34893 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
34894 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
34895 if test "${ac_cv_c_const+set}" = set; then
34896   echo $ECHO_N "(cached) $ECHO_C" >&6
34897 else
34898   cat >conftest.$ac_ext <<_ACEOF
34899 /* confdefs.h.  */
34900 _ACEOF
34901 cat confdefs.h >>conftest.$ac_ext
34902 cat >>conftest.$ac_ext <<_ACEOF
34903 /* end confdefs.h.  */
34904
34905 int
34906 main ()
34907 {
34908 /* FIXME: Include the comments suggested by Paul. */
34909 #ifndef __cplusplus
34910   /* Ultrix mips cc rejects this.  */
34911   typedef int charset[2];
34912   const charset x;
34913   /* SunOS 4.1.1 cc rejects this.  */
34914   char const *const *ccp;
34915   char **p;
34916   /* NEC SVR4.0.2 mips cc rejects this.  */
34917   struct point {int x, y;};
34918   static struct point const zero = {0,0};
34919   /* AIX XL C 1.02.0.0 rejects this.
34920      It does not let you subtract one const X* pointer from another in
34921      an arm of an if-expression whose if-part is not a constant
34922      expression */
34923   const char *g = "string";
34924   ccp = &g + (g ? g-g : 0);
34925   /* HPUX 7.0 cc rejects these. */
34926   ++ccp;
34927   p = (char**) ccp;
34928   ccp = (char const *const *) p;
34929   { /* SCO 3.2v4 cc rejects this.  */
34930     char *t;
34931     char const *s = 0 ? (char *) 0 : (char const *) 0;
34932
34933     *t++ = 0;
34934   }
34935   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
34936     int x[] = {25, 17};
34937     const int *foo = &x[0];
34938     ++foo;
34939   }
34940   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
34941     typedef const int *iptr;
34942     iptr p = 0;
34943     ++p;
34944   }
34945   { /* AIX XL C 1.02.0.0 rejects this saying
34946        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
34947     struct s { int j; const int *ap[3]; };
34948     struct s *b; b->j = 5;
34949   }
34950   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
34951     const int foo = 10;
34952   }
34953 #endif
34954
34955   ;
34956   return 0;
34957 }
34958 _ACEOF
34959 rm -f conftest.$ac_objext
34960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
34961   (eval $ac_compile) 2>conftest.er1
34962   ac_status=$?
34963   grep -v '^ *+' conftest.er1 >conftest.err
34964   rm -f conftest.er1
34965   cat conftest.err >&5
34966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34967   (exit $ac_status); } &&
34968          { ac_try='test -z "$ac_c_werror_flag"
34969                          || test ! -s conftest.err'
34970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34971   (eval $ac_try) 2>&5
34972   ac_status=$?
34973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34974   (exit $ac_status); }; } &&
34975          { ac_try='test -s conftest.$ac_objext'
34976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
34977   (eval $ac_try) 2>&5
34978   ac_status=$?
34979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34980   (exit $ac_status); }; }; then
34981   ac_cv_c_const=yes
34982 else
34983   echo "$as_me: failed program was:" >&5
34984 sed 's/^/| /' conftest.$ac_ext >&5
34985
34986 ac_cv_c_const=no
34987 fi
34988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
34989 fi
34990 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
34991 echo "${ECHO_T}$ac_cv_c_const" >&6
34992 if test $ac_cv_c_const = no; then
34993
34994 cat >>confdefs.h <<\_ACEOF
34995 #define const
34996 _ACEOF
34997
34998 fi
34999
35000 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
35001 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
35002 if test "${ol_cv_c_volatile+set}" = set; then
35003   echo $ECHO_N "(cached) $ECHO_C" >&6
35004 else
35005   cat >conftest.$ac_ext <<_ACEOF
35006 /* confdefs.h.  */
35007 _ACEOF
35008 cat confdefs.h >>conftest.$ac_ext
35009 cat >>conftest.$ac_ext <<_ACEOF
35010 /* end confdefs.h.  */
35011 int x, y, z;
35012 int
35013 main ()
35014 {
35015 volatile int a; int * volatile b = x ? &y : &z;
35016       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
35017       *b = 0;
35018   ;
35019   return 0;
35020 }
35021 _ACEOF
35022 rm -f conftest.$ac_objext
35023 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35024   (eval $ac_compile) 2>conftest.er1
35025   ac_status=$?
35026   grep -v '^ *+' conftest.er1 >conftest.err
35027   rm -f conftest.er1
35028   cat conftest.err >&5
35029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35030   (exit $ac_status); } &&
35031          { ac_try='test -z "$ac_c_werror_flag"
35032                          || test ! -s conftest.err'
35033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35034   (eval $ac_try) 2>&5
35035   ac_status=$?
35036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35037   (exit $ac_status); }; } &&
35038          { ac_try='test -s conftest.$ac_objext'
35039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35040   (eval $ac_try) 2>&5
35041   ac_status=$?
35042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35043   (exit $ac_status); }; }; then
35044   ol_cv_c_volatile=yes
35045 else
35046   echo "$as_me: failed program was:" >&5
35047 sed 's/^/| /' conftest.$ac_ext >&5
35048
35049 ol_cv_c_volatile=no
35050 fi
35051 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35052 fi
35053 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
35054 echo "${ECHO_T}$ol_cv_c_volatile" >&6
35055   if test $ol_cv_c_volatile = yes; then
35056     :
35057   else
35058
35059 cat >>confdefs.h <<\_ACEOF
35060 #define volatile
35061 _ACEOF
35062
35063   fi
35064
35065
35066 if test $cross_compiling = yes ; then
35067         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
35068 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
35069
35070 cat >>confdefs.h <<\_ACEOF
35071 #define CROSS_COMPILING 1
35072 _ACEOF
35073
35074 else
35075         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
35076 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
35077 if test "${ac_cv_c_bigendian+set}" = set; then
35078   echo $ECHO_N "(cached) $ECHO_C" >&6
35079 else
35080   # See if sys/param.h defines the BYTE_ORDER macro.
35081 cat >conftest.$ac_ext <<_ACEOF
35082 /* confdefs.h.  */
35083 _ACEOF
35084 cat confdefs.h >>conftest.$ac_ext
35085 cat >>conftest.$ac_ext <<_ACEOF
35086 /* end confdefs.h.  */
35087 #include <sys/types.h>
35088 #include <sys/param.h>
35089
35090 int
35091 main ()
35092 {
35093 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
35094  bogus endian macros
35095 #endif
35096
35097   ;
35098   return 0;
35099 }
35100 _ACEOF
35101 rm -f conftest.$ac_objext
35102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35103   (eval $ac_compile) 2>conftest.er1
35104   ac_status=$?
35105   grep -v '^ *+' conftest.er1 >conftest.err
35106   rm -f conftest.er1
35107   cat conftest.err >&5
35108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35109   (exit $ac_status); } &&
35110          { ac_try='test -z "$ac_c_werror_flag"
35111                          || test ! -s conftest.err'
35112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35113   (eval $ac_try) 2>&5
35114   ac_status=$?
35115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35116   (exit $ac_status); }; } &&
35117          { ac_try='test -s conftest.$ac_objext'
35118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35119   (eval $ac_try) 2>&5
35120   ac_status=$?
35121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35122   (exit $ac_status); }; }; then
35123   # It does; now see whether it defined to BIG_ENDIAN or not.
35124 cat >conftest.$ac_ext <<_ACEOF
35125 /* confdefs.h.  */
35126 _ACEOF
35127 cat confdefs.h >>conftest.$ac_ext
35128 cat >>conftest.$ac_ext <<_ACEOF
35129 /* end confdefs.h.  */
35130 #include <sys/types.h>
35131 #include <sys/param.h>
35132
35133 int
35134 main ()
35135 {
35136 #if BYTE_ORDER != BIG_ENDIAN
35137  not big endian
35138 #endif
35139
35140   ;
35141   return 0;
35142 }
35143 _ACEOF
35144 rm -f conftest.$ac_objext
35145 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35146   (eval $ac_compile) 2>conftest.er1
35147   ac_status=$?
35148   grep -v '^ *+' conftest.er1 >conftest.err
35149   rm -f conftest.er1
35150   cat conftest.err >&5
35151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35152   (exit $ac_status); } &&
35153          { ac_try='test -z "$ac_c_werror_flag"
35154                          || test ! -s conftest.err'
35155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35156   (eval $ac_try) 2>&5
35157   ac_status=$?
35158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35159   (exit $ac_status); }; } &&
35160          { ac_try='test -s conftest.$ac_objext'
35161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35162   (eval $ac_try) 2>&5
35163   ac_status=$?
35164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35165   (exit $ac_status); }; }; then
35166   ac_cv_c_bigendian=yes
35167 else
35168   echo "$as_me: failed program was:" >&5
35169 sed 's/^/| /' conftest.$ac_ext >&5
35170
35171 ac_cv_c_bigendian=no
35172 fi
35173 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35174 else
35175   echo "$as_me: failed program was:" >&5
35176 sed 's/^/| /' conftest.$ac_ext >&5
35177
35178 # It does not; compile a test program.
35179 if test "$cross_compiling" = yes; then
35180   # try to guess the endianness by grepping values into an object file
35181   ac_cv_c_bigendian=unknown
35182   cat >conftest.$ac_ext <<_ACEOF
35183 /* confdefs.h.  */
35184 _ACEOF
35185 cat confdefs.h >>conftest.$ac_ext
35186 cat >>conftest.$ac_ext <<_ACEOF
35187 /* end confdefs.h.  */
35188 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
35189 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
35190 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
35191 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
35192 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
35193 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
35194 int
35195 main ()
35196 {
35197  _ascii (); _ebcdic ();
35198   ;
35199   return 0;
35200 }
35201 _ACEOF
35202 rm -f conftest.$ac_objext
35203 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35204   (eval $ac_compile) 2>conftest.er1
35205   ac_status=$?
35206   grep -v '^ *+' conftest.er1 >conftest.err
35207   rm -f conftest.er1
35208   cat conftest.err >&5
35209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35210   (exit $ac_status); } &&
35211          { ac_try='test -z "$ac_c_werror_flag"
35212                          || test ! -s conftest.err'
35213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35214   (eval $ac_try) 2>&5
35215   ac_status=$?
35216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35217   (exit $ac_status); }; } &&
35218          { ac_try='test -s conftest.$ac_objext'
35219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35220   (eval $ac_try) 2>&5
35221   ac_status=$?
35222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35223   (exit $ac_status); }; }; then
35224   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
35225   ac_cv_c_bigendian=yes
35226 fi
35227 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
35228   if test "$ac_cv_c_bigendian" = unknown; then
35229     ac_cv_c_bigendian=no
35230   else
35231     # finding both strings is unlikely to happen, but who knows?
35232     ac_cv_c_bigendian=unknown
35233   fi
35234 fi
35235 else
35236   echo "$as_me: failed program was:" >&5
35237 sed 's/^/| /' conftest.$ac_ext >&5
35238
35239 fi
35240 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35241 else
35242   cat >conftest.$ac_ext <<_ACEOF
35243 /* confdefs.h.  */
35244 _ACEOF
35245 cat confdefs.h >>conftest.$ac_ext
35246 cat >>conftest.$ac_ext <<_ACEOF
35247 /* end confdefs.h.  */
35248 int
35249 main ()
35250 {
35251   /* Are we little or big endian?  From Harbison&Steele.  */
35252   union
35253   {
35254     long l;
35255     char c[sizeof (long)];
35256   } u;
35257   u.l = 1;
35258   exit (u.c[sizeof (long) - 1] == 1);
35259 }
35260 _ACEOF
35261 rm -f conftest$ac_exeext
35262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35263   (eval $ac_link) 2>&5
35264   ac_status=$?
35265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35268   (eval $ac_try) 2>&5
35269   ac_status=$?
35270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35271   (exit $ac_status); }; }; then
35272   ac_cv_c_bigendian=no
35273 else
35274   echo "$as_me: program exited with status $ac_status" >&5
35275 echo "$as_me: failed program was:" >&5
35276 sed 's/^/| /' conftest.$ac_ext >&5
35277
35278 ( exit $ac_status )
35279 ac_cv_c_bigendian=yes
35280 fi
35281 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35282 fi
35283 fi
35284 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35285 fi
35286 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
35287 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
35288 case $ac_cv_c_bigendian in
35289   yes)
35290
35291 cat >>confdefs.h <<\_ACEOF
35292 #define WORDS_BIGENDIAN 1
35293 _ACEOF
35294  ;;
35295   no)
35296      ;;
35297   *)
35298     { { echo "$as_me:$LINENO: error: unknown endianness
35299 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
35300 echo "$as_me: error: unknown endianness
35301 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
35302    { (exit 1); exit 1; }; } ;;
35303 esac
35304
35305 fi
35306
35307 echo "$as_me:$LINENO: checking for short" >&5
35308 echo $ECHO_N "checking for short... $ECHO_C" >&6
35309 if test "${ac_cv_type_short+set}" = set; then
35310   echo $ECHO_N "(cached) $ECHO_C" >&6
35311 else
35312   cat >conftest.$ac_ext <<_ACEOF
35313 /* confdefs.h.  */
35314 _ACEOF
35315 cat confdefs.h >>conftest.$ac_ext
35316 cat >>conftest.$ac_ext <<_ACEOF
35317 /* end confdefs.h.  */
35318 $ac_includes_default
35319 int
35320 main ()
35321 {
35322 if ((short *) 0)
35323   return 0;
35324 if (sizeof (short))
35325   return 0;
35326   ;
35327   return 0;
35328 }
35329 _ACEOF
35330 rm -f conftest.$ac_objext
35331 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35332   (eval $ac_compile) 2>conftest.er1
35333   ac_status=$?
35334   grep -v '^ *+' conftest.er1 >conftest.err
35335   rm -f conftest.er1
35336   cat conftest.err >&5
35337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35338   (exit $ac_status); } &&
35339          { ac_try='test -z "$ac_c_werror_flag"
35340                          || test ! -s conftest.err'
35341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35342   (eval $ac_try) 2>&5
35343   ac_status=$?
35344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35345   (exit $ac_status); }; } &&
35346          { ac_try='test -s conftest.$ac_objext'
35347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35348   (eval $ac_try) 2>&5
35349   ac_status=$?
35350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35351   (exit $ac_status); }; }; then
35352   ac_cv_type_short=yes
35353 else
35354   echo "$as_me: failed program was:" >&5
35355 sed 's/^/| /' conftest.$ac_ext >&5
35356
35357 ac_cv_type_short=no
35358 fi
35359 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35360 fi
35361 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
35362 echo "${ECHO_T}$ac_cv_type_short" >&6
35363
35364 echo "$as_me:$LINENO: checking size of short" >&5
35365 echo $ECHO_N "checking size of short... $ECHO_C" >&6
35366 if test "${ac_cv_sizeof_short+set}" = set; then
35367   echo $ECHO_N "(cached) $ECHO_C" >&6
35368 else
35369   if test "$ac_cv_type_short" = yes; then
35370   # The cast to unsigned long works around a bug in the HP C Compiler
35371   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
35372   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
35373   # This bug is HP SR number 8606223364.
35374   if test "$cross_compiling" = yes; then
35375   # Depending upon the size, compute the lo and hi bounds.
35376 cat >conftest.$ac_ext <<_ACEOF
35377 /* confdefs.h.  */
35378 _ACEOF
35379 cat confdefs.h >>conftest.$ac_ext
35380 cat >>conftest.$ac_ext <<_ACEOF
35381 /* end confdefs.h.  */
35382 $ac_includes_default
35383 int
35384 main ()
35385 {
35386 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
35387 test_array [0] = 0
35388
35389   ;
35390   return 0;
35391 }
35392 _ACEOF
35393 rm -f conftest.$ac_objext
35394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35395   (eval $ac_compile) 2>conftest.er1
35396   ac_status=$?
35397   grep -v '^ *+' conftest.er1 >conftest.err
35398   rm -f conftest.er1
35399   cat conftest.err >&5
35400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35401   (exit $ac_status); } &&
35402          { ac_try='test -z "$ac_c_werror_flag"
35403                          || test ! -s conftest.err'
35404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35405   (eval $ac_try) 2>&5
35406   ac_status=$?
35407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35408   (exit $ac_status); }; } &&
35409          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
35415   ac_lo=0 ac_mid=0
35416   while :; do
35417     cat >conftest.$ac_ext <<_ACEOF
35418 /* confdefs.h.  */
35419 _ACEOF
35420 cat confdefs.h >>conftest.$ac_ext
35421 cat >>conftest.$ac_ext <<_ACEOF
35422 /* end confdefs.h.  */
35423 $ac_includes_default
35424 int
35425 main ()
35426 {
35427 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
35428 test_array [0] = 0
35429
35430   ;
35431   return 0;
35432 }
35433 _ACEOF
35434 rm -f conftest.$ac_objext
35435 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35436   (eval $ac_compile) 2>conftest.er1
35437   ac_status=$?
35438   grep -v '^ *+' conftest.er1 >conftest.err
35439   rm -f conftest.er1
35440   cat conftest.err >&5
35441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35442   (exit $ac_status); } &&
35443          { ac_try='test -z "$ac_c_werror_flag"
35444                          || test ! -s conftest.err'
35445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35446   (eval $ac_try) 2>&5
35447   ac_status=$?
35448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35449   (exit $ac_status); }; } &&
35450          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
35456   ac_hi=$ac_mid; break
35457 else
35458   echo "$as_me: failed program was:" >&5
35459 sed 's/^/| /' conftest.$ac_ext >&5
35460
35461 ac_lo=`expr $ac_mid + 1`
35462                     if test $ac_lo -le $ac_mid; then
35463                       ac_lo= ac_hi=
35464                       break
35465                     fi
35466                     ac_mid=`expr 2 '*' $ac_mid + 1`
35467 fi
35468 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35469   done
35470 else
35471   echo "$as_me: failed program was:" >&5
35472 sed 's/^/| /' conftest.$ac_ext >&5
35473
35474 cat >conftest.$ac_ext <<_ACEOF
35475 /* confdefs.h.  */
35476 _ACEOF
35477 cat confdefs.h >>conftest.$ac_ext
35478 cat >>conftest.$ac_ext <<_ACEOF
35479 /* end confdefs.h.  */
35480 $ac_includes_default
35481 int
35482 main ()
35483 {
35484 static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
35485 test_array [0] = 0
35486
35487   ;
35488   return 0;
35489 }
35490 _ACEOF
35491 rm -f conftest.$ac_objext
35492 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35493   (eval $ac_compile) 2>conftest.er1
35494   ac_status=$?
35495   grep -v '^ *+' conftest.er1 >conftest.err
35496   rm -f conftest.er1
35497   cat conftest.err >&5
35498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35499   (exit $ac_status); } &&
35500          { ac_try='test -z "$ac_c_werror_flag"
35501                          || test ! -s conftest.err'
35502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35503   (eval $ac_try) 2>&5
35504   ac_status=$?
35505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35506   (exit $ac_status); }; } &&
35507          { ac_try='test -s conftest.$ac_objext'
35508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35509   (eval $ac_try) 2>&5
35510   ac_status=$?
35511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35512   (exit $ac_status); }; }; then
35513   ac_hi=-1 ac_mid=-1
35514   while :; do
35515     cat >conftest.$ac_ext <<_ACEOF
35516 /* confdefs.h.  */
35517 _ACEOF
35518 cat confdefs.h >>conftest.$ac_ext
35519 cat >>conftest.$ac_ext <<_ACEOF
35520 /* end confdefs.h.  */
35521 $ac_includes_default
35522 int
35523 main ()
35524 {
35525 static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
35526 test_array [0] = 0
35527
35528   ;
35529   return 0;
35530 }
35531 _ACEOF
35532 rm -f conftest.$ac_objext
35533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35534   (eval $ac_compile) 2>conftest.er1
35535   ac_status=$?
35536   grep -v '^ *+' conftest.er1 >conftest.err
35537   rm -f conftest.er1
35538   cat conftest.err >&5
35539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35540   (exit $ac_status); } &&
35541          { ac_try='test -z "$ac_c_werror_flag"
35542                          || test ! -s conftest.err'
35543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35544   (eval $ac_try) 2>&5
35545   ac_status=$?
35546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35547   (exit $ac_status); }; } &&
35548          { ac_try='test -s conftest.$ac_objext'
35549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35550   (eval $ac_try) 2>&5
35551   ac_status=$?
35552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35553   (exit $ac_status); }; }; then
35554   ac_lo=$ac_mid; break
35555 else
35556   echo "$as_me: failed program was:" >&5
35557 sed 's/^/| /' conftest.$ac_ext >&5
35558
35559 ac_hi=`expr '(' $ac_mid ')' - 1`
35560                        if test $ac_mid -le $ac_hi; then
35561                          ac_lo= ac_hi=
35562                          break
35563                        fi
35564                        ac_mid=`expr 2 '*' $ac_mid`
35565 fi
35566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35567   done
35568 else
35569   echo "$as_me: failed program was:" >&5
35570 sed 's/^/| /' conftest.$ac_ext >&5
35571
35572 ac_lo= ac_hi=
35573 fi
35574 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35575 fi
35576 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35577 # Binary search between lo and hi bounds.
35578 while test "x$ac_lo" != "x$ac_hi"; do
35579   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
35580   cat >conftest.$ac_ext <<_ACEOF
35581 /* confdefs.h.  */
35582 _ACEOF
35583 cat confdefs.h >>conftest.$ac_ext
35584 cat >>conftest.$ac_ext <<_ACEOF
35585 /* end confdefs.h.  */
35586 $ac_includes_default
35587 int
35588 main ()
35589 {
35590 static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
35591 test_array [0] = 0
35592
35593   ;
35594   return 0;
35595 }
35596 _ACEOF
35597 rm -f conftest.$ac_objext
35598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35599   (eval $ac_compile) 2>conftest.er1
35600   ac_status=$?
35601   grep -v '^ *+' conftest.er1 >conftest.err
35602   rm -f conftest.er1
35603   cat conftest.err >&5
35604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35605   (exit $ac_status); } &&
35606          { ac_try='test -z "$ac_c_werror_flag"
35607                          || test ! -s conftest.err'
35608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35609   (eval $ac_try) 2>&5
35610   ac_status=$?
35611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35612   (exit $ac_status); }; } &&
35613          { ac_try='test -s conftest.$ac_objext'
35614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35615   (eval $ac_try) 2>&5
35616   ac_status=$?
35617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35618   (exit $ac_status); }; }; then
35619   ac_hi=$ac_mid
35620 else
35621   echo "$as_me: failed program was:" >&5
35622 sed 's/^/| /' conftest.$ac_ext >&5
35623
35624 ac_lo=`expr '(' $ac_mid ')' + 1`
35625 fi
35626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35627 done
35628 case $ac_lo in
35629 ?*) ac_cv_sizeof_short=$ac_lo;;
35630 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
35631 See \`config.log' for more details." >&5
35632 echo "$as_me: error: cannot compute sizeof (short), 77
35633 See \`config.log' for more details." >&2;}
35634    { (exit 1); exit 1; }; } ;;
35635 esac
35636 else
35637   if test "$cross_compiling" = yes; then
35638   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
35639 See \`config.log' for more details." >&5
35640 echo "$as_me: error: cannot run test program while cross compiling
35641 See \`config.log' for more details." >&2;}
35642    { (exit 1); exit 1; }; }
35643 else
35644   cat >conftest.$ac_ext <<_ACEOF
35645 /* confdefs.h.  */
35646 _ACEOF
35647 cat confdefs.h >>conftest.$ac_ext
35648 cat >>conftest.$ac_ext <<_ACEOF
35649 /* end confdefs.h.  */
35650 $ac_includes_default
35651 long longval () { return (long) (sizeof (short)); }
35652 unsigned long ulongval () { return (long) (sizeof (short)); }
35653 #include <stdio.h>
35654 #include <stdlib.h>
35655 int
35656 main ()
35657 {
35658
35659   FILE *f = fopen ("conftest.val", "w");
35660   if (! f)
35661     exit (1);
35662   if (((long) (sizeof (short))) < 0)
35663     {
35664       long i = longval ();
35665       if (i != ((long) (sizeof (short))))
35666         exit (1);
35667       fprintf (f, "%ld\n", i);
35668     }
35669   else
35670     {
35671       unsigned long i = ulongval ();
35672       if (i != ((long) (sizeof (short))))
35673         exit (1);
35674       fprintf (f, "%lu\n", i);
35675     }
35676   exit (ferror (f) || fclose (f) != 0);
35677
35678   ;
35679   return 0;
35680 }
35681 _ACEOF
35682 rm -f conftest$ac_exeext
35683 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
35684   (eval $ac_link) 2>&5
35685   ac_status=$?
35686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35689   (eval $ac_try) 2>&5
35690   ac_status=$?
35691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35692   (exit $ac_status); }; }; then
35693   ac_cv_sizeof_short=`cat conftest.val`
35694 else
35695   echo "$as_me: program exited with status $ac_status" >&5
35696 echo "$as_me: failed program was:" >&5
35697 sed 's/^/| /' conftest.$ac_ext >&5
35698
35699 ( exit $ac_status )
35700 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
35701 See \`config.log' for more details." >&5
35702 echo "$as_me: error: cannot compute sizeof (short), 77
35703 See \`config.log' for more details." >&2;}
35704    { (exit 1); exit 1; }; }
35705 fi
35706 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35707 fi
35708 fi
35709 rm -f conftest.val
35710 else
35711   ac_cv_sizeof_short=0
35712 fi
35713 fi
35714 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
35715 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
35716 cat >>confdefs.h <<_ACEOF
35717 #define SIZEOF_SHORT $ac_cv_sizeof_short
35718 _ACEOF
35719
35720
35721 echo "$as_me:$LINENO: checking for int" >&5
35722 echo $ECHO_N "checking for int... $ECHO_C" >&6
35723 if test "${ac_cv_type_int+set}" = set; then
35724   echo $ECHO_N "(cached) $ECHO_C" >&6
35725 else
35726   cat >conftest.$ac_ext <<_ACEOF
35727 /* confdefs.h.  */
35728 _ACEOF
35729 cat confdefs.h >>conftest.$ac_ext
35730 cat >>conftest.$ac_ext <<_ACEOF
35731 /* end confdefs.h.  */
35732 $ac_includes_default
35733 int
35734 main ()
35735 {
35736 if ((int *) 0)
35737   return 0;
35738 if (sizeof (int))
35739   return 0;
35740   ;
35741   return 0;
35742 }
35743 _ACEOF
35744 rm -f conftest.$ac_objext
35745 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35746   (eval $ac_compile) 2>conftest.er1
35747   ac_status=$?
35748   grep -v '^ *+' conftest.er1 >conftest.err
35749   rm -f conftest.er1
35750   cat conftest.err >&5
35751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35752   (exit $ac_status); } &&
35753          { ac_try='test -z "$ac_c_werror_flag"
35754                          || test ! -s conftest.err'
35755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35756   (eval $ac_try) 2>&5
35757   ac_status=$?
35758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35759   (exit $ac_status); }; } &&
35760          { ac_try='test -s conftest.$ac_objext'
35761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35762   (eval $ac_try) 2>&5
35763   ac_status=$?
35764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35765   (exit $ac_status); }; }; then
35766   ac_cv_type_int=yes
35767 else
35768   echo "$as_me: failed program was:" >&5
35769 sed 's/^/| /' conftest.$ac_ext >&5
35770
35771 ac_cv_type_int=no
35772 fi
35773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35774 fi
35775 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
35776 echo "${ECHO_T}$ac_cv_type_int" >&6
35777
35778 echo "$as_me:$LINENO: checking size of int" >&5
35779 echo $ECHO_N "checking size of int... $ECHO_C" >&6
35780 if test "${ac_cv_sizeof_int+set}" = set; then
35781   echo $ECHO_N "(cached) $ECHO_C" >&6
35782 else
35783   if test "$ac_cv_type_int" = yes; then
35784   # The cast to unsigned long works around a bug in the HP C Compiler
35785   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
35786   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
35787   # This bug is HP SR number 8606223364.
35788   if test "$cross_compiling" = yes; then
35789   # Depending upon the size, compute the lo and hi bounds.
35790 cat >conftest.$ac_ext <<_ACEOF
35791 /* confdefs.h.  */
35792 _ACEOF
35793 cat confdefs.h >>conftest.$ac_ext
35794 cat >>conftest.$ac_ext <<_ACEOF
35795 /* end confdefs.h.  */
35796 $ac_includes_default
35797 int
35798 main ()
35799 {
35800 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
35801 test_array [0] = 0
35802
35803   ;
35804   return 0;
35805 }
35806 _ACEOF
35807 rm -f conftest.$ac_objext
35808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35809   (eval $ac_compile) 2>conftest.er1
35810   ac_status=$?
35811   grep -v '^ *+' conftest.er1 >conftest.err
35812   rm -f conftest.er1
35813   cat conftest.err >&5
35814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35815   (exit $ac_status); } &&
35816          { ac_try='test -z "$ac_c_werror_flag"
35817                          || test ! -s conftest.err'
35818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35819   (eval $ac_try) 2>&5
35820   ac_status=$?
35821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35822   (exit $ac_status); }; } &&
35823          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
35829   ac_lo=0 ac_mid=0
35830   while :; do
35831     cat >conftest.$ac_ext <<_ACEOF
35832 /* confdefs.h.  */
35833 _ACEOF
35834 cat confdefs.h >>conftest.$ac_ext
35835 cat >>conftest.$ac_ext <<_ACEOF
35836 /* end confdefs.h.  */
35837 $ac_includes_default
35838 int
35839 main ()
35840 {
35841 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
35842 test_array [0] = 0
35843
35844   ;
35845   return 0;
35846 }
35847 _ACEOF
35848 rm -f conftest.$ac_objext
35849 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35850   (eval $ac_compile) 2>conftest.er1
35851   ac_status=$?
35852   grep -v '^ *+' conftest.er1 >conftest.err
35853   rm -f conftest.er1
35854   cat conftest.err >&5
35855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35856   (exit $ac_status); } &&
35857          { ac_try='test -z "$ac_c_werror_flag"
35858                          || test ! -s conftest.err'
35859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35860   (eval $ac_try) 2>&5
35861   ac_status=$?
35862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35863   (exit $ac_status); }; } &&
35864          { ac_try='test -s conftest.$ac_objext'
35865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35866   (eval $ac_try) 2>&5
35867   ac_status=$?
35868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35869   (exit $ac_status); }; }; then
35870   ac_hi=$ac_mid; break
35871 else
35872   echo "$as_me: failed program was:" >&5
35873 sed 's/^/| /' conftest.$ac_ext >&5
35874
35875 ac_lo=`expr $ac_mid + 1`
35876                     if test $ac_lo -le $ac_mid; then
35877                       ac_lo= ac_hi=
35878                       break
35879                     fi
35880                     ac_mid=`expr 2 '*' $ac_mid + 1`
35881 fi
35882 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35883   done
35884 else
35885   echo "$as_me: failed program was:" >&5
35886 sed 's/^/| /' conftest.$ac_ext >&5
35887
35888 cat >conftest.$ac_ext <<_ACEOF
35889 /* confdefs.h.  */
35890 _ACEOF
35891 cat confdefs.h >>conftest.$ac_ext
35892 cat >>conftest.$ac_ext <<_ACEOF
35893 /* end confdefs.h.  */
35894 $ac_includes_default
35895 int
35896 main ()
35897 {
35898 static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
35899 test_array [0] = 0
35900
35901   ;
35902   return 0;
35903 }
35904 _ACEOF
35905 rm -f conftest.$ac_objext
35906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35907   (eval $ac_compile) 2>conftest.er1
35908   ac_status=$?
35909   grep -v '^ *+' conftest.er1 >conftest.err
35910   rm -f conftest.er1
35911   cat conftest.err >&5
35912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35913   (exit $ac_status); } &&
35914          { ac_try='test -z "$ac_c_werror_flag"
35915                          || test ! -s conftest.err'
35916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35917   (eval $ac_try) 2>&5
35918   ac_status=$?
35919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35920   (exit $ac_status); }; } &&
35921          { ac_try='test -s conftest.$ac_objext'
35922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35923   (eval $ac_try) 2>&5
35924   ac_status=$?
35925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35926   (exit $ac_status); }; }; then
35927   ac_hi=-1 ac_mid=-1
35928   while :; do
35929     cat >conftest.$ac_ext <<_ACEOF
35930 /* confdefs.h.  */
35931 _ACEOF
35932 cat confdefs.h >>conftest.$ac_ext
35933 cat >>conftest.$ac_ext <<_ACEOF
35934 /* end confdefs.h.  */
35935 $ac_includes_default
35936 int
35937 main ()
35938 {
35939 static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
35940 test_array [0] = 0
35941
35942   ;
35943   return 0;
35944 }
35945 _ACEOF
35946 rm -f conftest.$ac_objext
35947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
35948   (eval $ac_compile) 2>conftest.er1
35949   ac_status=$?
35950   grep -v '^ *+' conftest.er1 >conftest.err
35951   rm -f conftest.er1
35952   cat conftest.err >&5
35953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35954   (exit $ac_status); } &&
35955          { ac_try='test -z "$ac_c_werror_flag"
35956                          || test ! -s conftest.err'
35957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35958   (eval $ac_try) 2>&5
35959   ac_status=$?
35960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35961   (exit $ac_status); }; } &&
35962          { ac_try='test -s conftest.$ac_objext'
35963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
35964   (eval $ac_try) 2>&5
35965   ac_status=$?
35966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35967   (exit $ac_status); }; }; then
35968   ac_lo=$ac_mid; break
35969 else
35970   echo "$as_me: failed program was:" >&5
35971 sed 's/^/| /' conftest.$ac_ext >&5
35972
35973 ac_hi=`expr '(' $ac_mid ')' - 1`
35974                        if test $ac_mid -le $ac_hi; then
35975                          ac_lo= ac_hi=
35976                          break
35977                        fi
35978                        ac_mid=`expr 2 '*' $ac_mid`
35979 fi
35980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35981   done
35982 else
35983   echo "$as_me: failed program was:" >&5
35984 sed 's/^/| /' conftest.$ac_ext >&5
35985
35986 ac_lo= ac_hi=
35987 fi
35988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35989 fi
35990 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
35991 # Binary search between lo and hi bounds.
35992 while test "x$ac_lo" != "x$ac_hi"; do
35993   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
35994   cat >conftest.$ac_ext <<_ACEOF
35995 /* confdefs.h.  */
35996 _ACEOF
35997 cat confdefs.h >>conftest.$ac_ext
35998 cat >>conftest.$ac_ext <<_ACEOF
35999 /* end confdefs.h.  */
36000 $ac_includes_default
36001 int
36002 main ()
36003 {
36004 static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
36005 test_array [0] = 0
36006
36007   ;
36008   return 0;
36009 }
36010 _ACEOF
36011 rm -f conftest.$ac_objext
36012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36013   (eval $ac_compile) 2>conftest.er1
36014   ac_status=$?
36015   grep -v '^ *+' conftest.er1 >conftest.err
36016   rm -f conftest.er1
36017   cat conftest.err >&5
36018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36019   (exit $ac_status); } &&
36020          { ac_try='test -z "$ac_c_werror_flag"
36021                          || test ! -s conftest.err'
36022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36023   (eval $ac_try) 2>&5
36024   ac_status=$?
36025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36026   (exit $ac_status); }; } &&
36027          { ac_try='test -s conftest.$ac_objext'
36028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36029   (eval $ac_try) 2>&5
36030   ac_status=$?
36031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36032   (exit $ac_status); }; }; then
36033   ac_hi=$ac_mid
36034 else
36035   echo "$as_me: failed program was:" >&5
36036 sed 's/^/| /' conftest.$ac_ext >&5
36037
36038 ac_lo=`expr '(' $ac_mid ')' + 1`
36039 fi
36040 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36041 done
36042 case $ac_lo in
36043 ?*) ac_cv_sizeof_int=$ac_lo;;
36044 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
36045 See \`config.log' for more details." >&5
36046 echo "$as_me: error: cannot compute sizeof (int), 77
36047 See \`config.log' for more details." >&2;}
36048    { (exit 1); exit 1; }; } ;;
36049 esac
36050 else
36051   if test "$cross_compiling" = yes; then
36052   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
36053 See \`config.log' for more details." >&5
36054 echo "$as_me: error: cannot run test program while cross compiling
36055 See \`config.log' for more details." >&2;}
36056    { (exit 1); exit 1; }; }
36057 else
36058   cat >conftest.$ac_ext <<_ACEOF
36059 /* confdefs.h.  */
36060 _ACEOF
36061 cat confdefs.h >>conftest.$ac_ext
36062 cat >>conftest.$ac_ext <<_ACEOF
36063 /* end confdefs.h.  */
36064 $ac_includes_default
36065 long longval () { return (long) (sizeof (int)); }
36066 unsigned long ulongval () { return (long) (sizeof (int)); }
36067 #include <stdio.h>
36068 #include <stdlib.h>
36069 int
36070 main ()
36071 {
36072
36073   FILE *f = fopen ("conftest.val", "w");
36074   if (! f)
36075     exit (1);
36076   if (((long) (sizeof (int))) < 0)
36077     {
36078       long i = longval ();
36079       if (i != ((long) (sizeof (int))))
36080         exit (1);
36081       fprintf (f, "%ld\n", i);
36082     }
36083   else
36084     {
36085       unsigned long i = ulongval ();
36086       if (i != ((long) (sizeof (int))))
36087         exit (1);
36088       fprintf (f, "%lu\n", i);
36089     }
36090   exit (ferror (f) || fclose (f) != 0);
36091
36092   ;
36093   return 0;
36094 }
36095 _ACEOF
36096 rm -f conftest$ac_exeext
36097 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36098   (eval $ac_link) 2>&5
36099   ac_status=$?
36100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36101   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36103   (eval $ac_try) 2>&5
36104   ac_status=$?
36105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36106   (exit $ac_status); }; }; then
36107   ac_cv_sizeof_int=`cat conftest.val`
36108 else
36109   echo "$as_me: program exited with status $ac_status" >&5
36110 echo "$as_me: failed program was:" >&5
36111 sed 's/^/| /' conftest.$ac_ext >&5
36112
36113 ( exit $ac_status )
36114 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
36115 See \`config.log' for more details." >&5
36116 echo "$as_me: error: cannot compute sizeof (int), 77
36117 See \`config.log' for more details." >&2;}
36118    { (exit 1); exit 1; }; }
36119 fi
36120 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36121 fi
36122 fi
36123 rm -f conftest.val
36124 else
36125   ac_cv_sizeof_int=0
36126 fi
36127 fi
36128 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
36129 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
36130 cat >>confdefs.h <<_ACEOF
36131 #define SIZEOF_INT $ac_cv_sizeof_int
36132 _ACEOF
36133
36134
36135 echo "$as_me:$LINENO: checking for long" >&5
36136 echo $ECHO_N "checking for long... $ECHO_C" >&6
36137 if test "${ac_cv_type_long+set}" = set; then
36138   echo $ECHO_N "(cached) $ECHO_C" >&6
36139 else
36140   cat >conftest.$ac_ext <<_ACEOF
36141 /* confdefs.h.  */
36142 _ACEOF
36143 cat confdefs.h >>conftest.$ac_ext
36144 cat >>conftest.$ac_ext <<_ACEOF
36145 /* end confdefs.h.  */
36146 $ac_includes_default
36147 int
36148 main ()
36149 {
36150 if ((long *) 0)
36151   return 0;
36152 if (sizeof (long))
36153   return 0;
36154   ;
36155   return 0;
36156 }
36157 _ACEOF
36158 rm -f conftest.$ac_objext
36159 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36160   (eval $ac_compile) 2>conftest.er1
36161   ac_status=$?
36162   grep -v '^ *+' conftest.er1 >conftest.err
36163   rm -f conftest.er1
36164   cat conftest.err >&5
36165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36166   (exit $ac_status); } &&
36167          { ac_try='test -z "$ac_c_werror_flag"
36168                          || test ! -s conftest.err'
36169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36170   (eval $ac_try) 2>&5
36171   ac_status=$?
36172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36173   (exit $ac_status); }; } &&
36174          { ac_try='test -s conftest.$ac_objext'
36175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36176   (eval $ac_try) 2>&5
36177   ac_status=$?
36178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36179   (exit $ac_status); }; }; then
36180   ac_cv_type_long=yes
36181 else
36182   echo "$as_me: failed program was:" >&5
36183 sed 's/^/| /' conftest.$ac_ext >&5
36184
36185 ac_cv_type_long=no
36186 fi
36187 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36188 fi
36189 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
36190 echo "${ECHO_T}$ac_cv_type_long" >&6
36191
36192 echo "$as_me:$LINENO: checking size of long" >&5
36193 echo $ECHO_N "checking size of long... $ECHO_C" >&6
36194 if test "${ac_cv_sizeof_long+set}" = set; then
36195   echo $ECHO_N "(cached) $ECHO_C" >&6
36196 else
36197   if test "$ac_cv_type_long" = yes; then
36198   # The cast to unsigned long works around a bug in the HP C Compiler
36199   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
36200   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
36201   # This bug is HP SR number 8606223364.
36202   if test "$cross_compiling" = yes; then
36203   # Depending upon the size, compute the lo and hi bounds.
36204 cat >conftest.$ac_ext <<_ACEOF
36205 /* confdefs.h.  */
36206 _ACEOF
36207 cat confdefs.h >>conftest.$ac_ext
36208 cat >>conftest.$ac_ext <<_ACEOF
36209 /* end confdefs.h.  */
36210 $ac_includes_default
36211 int
36212 main ()
36213 {
36214 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
36215 test_array [0] = 0
36216
36217   ;
36218   return 0;
36219 }
36220 _ACEOF
36221 rm -f conftest.$ac_objext
36222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36223   (eval $ac_compile) 2>conftest.er1
36224   ac_status=$?
36225   grep -v '^ *+' conftest.er1 >conftest.err
36226   rm -f conftest.er1
36227   cat conftest.err >&5
36228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36229   (exit $ac_status); } &&
36230          { ac_try='test -z "$ac_c_werror_flag"
36231                          || test ! -s conftest.err'
36232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36233   (eval $ac_try) 2>&5
36234   ac_status=$?
36235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36236   (exit $ac_status); }; } &&
36237          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
36243   ac_lo=0 ac_mid=0
36244   while :; do
36245     cat >conftest.$ac_ext <<_ACEOF
36246 /* confdefs.h.  */
36247 _ACEOF
36248 cat confdefs.h >>conftest.$ac_ext
36249 cat >>conftest.$ac_ext <<_ACEOF
36250 /* end confdefs.h.  */
36251 $ac_includes_default
36252 int
36253 main ()
36254 {
36255 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
36256 test_array [0] = 0
36257
36258   ;
36259   return 0;
36260 }
36261 _ACEOF
36262 rm -f conftest.$ac_objext
36263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36264   (eval $ac_compile) 2>conftest.er1
36265   ac_status=$?
36266   grep -v '^ *+' conftest.er1 >conftest.err
36267   rm -f conftest.er1
36268   cat conftest.err >&5
36269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36270   (exit $ac_status); } &&
36271          { ac_try='test -z "$ac_c_werror_flag"
36272                          || test ! -s conftest.err'
36273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36274   (eval $ac_try) 2>&5
36275   ac_status=$?
36276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36277   (exit $ac_status); }; } &&
36278          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
36284   ac_hi=$ac_mid; break
36285 else
36286   echo "$as_me: failed program was:" >&5
36287 sed 's/^/| /' conftest.$ac_ext >&5
36288
36289 ac_lo=`expr $ac_mid + 1`
36290                     if test $ac_lo -le $ac_mid; then
36291                       ac_lo= ac_hi=
36292                       break
36293                     fi
36294                     ac_mid=`expr 2 '*' $ac_mid + 1`
36295 fi
36296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36297   done
36298 else
36299   echo "$as_me: failed program was:" >&5
36300 sed 's/^/| /' conftest.$ac_ext >&5
36301
36302 cat >conftest.$ac_ext <<_ACEOF
36303 /* confdefs.h.  */
36304 _ACEOF
36305 cat confdefs.h >>conftest.$ac_ext
36306 cat >>conftest.$ac_ext <<_ACEOF
36307 /* end confdefs.h.  */
36308 $ac_includes_default
36309 int
36310 main ()
36311 {
36312 static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
36313 test_array [0] = 0
36314
36315   ;
36316   return 0;
36317 }
36318 _ACEOF
36319 rm -f conftest.$ac_objext
36320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36321   (eval $ac_compile) 2>conftest.er1
36322   ac_status=$?
36323   grep -v '^ *+' conftest.er1 >conftest.err
36324   rm -f conftest.er1
36325   cat conftest.err >&5
36326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36327   (exit $ac_status); } &&
36328          { ac_try='test -z "$ac_c_werror_flag"
36329                          || test ! -s conftest.err'
36330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36331   (eval $ac_try) 2>&5
36332   ac_status=$?
36333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36334   (exit $ac_status); }; } &&
36335          { ac_try='test -s conftest.$ac_objext'
36336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36337   (eval $ac_try) 2>&5
36338   ac_status=$?
36339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36340   (exit $ac_status); }; }; then
36341   ac_hi=-1 ac_mid=-1
36342   while :; do
36343     cat >conftest.$ac_ext <<_ACEOF
36344 /* confdefs.h.  */
36345 _ACEOF
36346 cat confdefs.h >>conftest.$ac_ext
36347 cat >>conftest.$ac_ext <<_ACEOF
36348 /* end confdefs.h.  */
36349 $ac_includes_default
36350 int
36351 main ()
36352 {
36353 static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
36354 test_array [0] = 0
36355
36356   ;
36357   return 0;
36358 }
36359 _ACEOF
36360 rm -f conftest.$ac_objext
36361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36362   (eval $ac_compile) 2>conftest.er1
36363   ac_status=$?
36364   grep -v '^ *+' conftest.er1 >conftest.err
36365   rm -f conftest.er1
36366   cat conftest.err >&5
36367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36368   (exit $ac_status); } &&
36369          { ac_try='test -z "$ac_c_werror_flag"
36370                          || test ! -s conftest.err'
36371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36372   (eval $ac_try) 2>&5
36373   ac_status=$?
36374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36375   (exit $ac_status); }; } &&
36376          { ac_try='test -s conftest.$ac_objext'
36377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36378   (eval $ac_try) 2>&5
36379   ac_status=$?
36380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36381   (exit $ac_status); }; }; then
36382   ac_lo=$ac_mid; break
36383 else
36384   echo "$as_me: failed program was:" >&5
36385 sed 's/^/| /' conftest.$ac_ext >&5
36386
36387 ac_hi=`expr '(' $ac_mid ')' - 1`
36388                        if test $ac_mid -le $ac_hi; then
36389                          ac_lo= ac_hi=
36390                          break
36391                        fi
36392                        ac_mid=`expr 2 '*' $ac_mid`
36393 fi
36394 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36395   done
36396 else
36397   echo "$as_me: failed program was:" >&5
36398 sed 's/^/| /' conftest.$ac_ext >&5
36399
36400 ac_lo= ac_hi=
36401 fi
36402 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36403 fi
36404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36405 # Binary search between lo and hi bounds.
36406 while test "x$ac_lo" != "x$ac_hi"; do
36407   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
36408   cat >conftest.$ac_ext <<_ACEOF
36409 /* confdefs.h.  */
36410 _ACEOF
36411 cat confdefs.h >>conftest.$ac_ext
36412 cat >>conftest.$ac_ext <<_ACEOF
36413 /* end confdefs.h.  */
36414 $ac_includes_default
36415 int
36416 main ()
36417 {
36418 static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
36419 test_array [0] = 0
36420
36421   ;
36422   return 0;
36423 }
36424 _ACEOF
36425 rm -f conftest.$ac_objext
36426 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36427   (eval $ac_compile) 2>conftest.er1
36428   ac_status=$?
36429   grep -v '^ *+' conftest.er1 >conftest.err
36430   rm -f conftest.er1
36431   cat conftest.err >&5
36432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36433   (exit $ac_status); } &&
36434          { ac_try='test -z "$ac_c_werror_flag"
36435                          || test ! -s conftest.err'
36436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36437   (eval $ac_try) 2>&5
36438   ac_status=$?
36439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36440   (exit $ac_status); }; } &&
36441          { ac_try='test -s conftest.$ac_objext'
36442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36443   (eval $ac_try) 2>&5
36444   ac_status=$?
36445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36446   (exit $ac_status); }; }; then
36447   ac_hi=$ac_mid
36448 else
36449   echo "$as_me: failed program was:" >&5
36450 sed 's/^/| /' conftest.$ac_ext >&5
36451
36452 ac_lo=`expr '(' $ac_mid ')' + 1`
36453 fi
36454 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36455 done
36456 case $ac_lo in
36457 ?*) ac_cv_sizeof_long=$ac_lo;;
36458 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
36459 See \`config.log' for more details." >&5
36460 echo "$as_me: error: cannot compute sizeof (long), 77
36461 See \`config.log' for more details." >&2;}
36462    { (exit 1); exit 1; }; } ;;
36463 esac
36464 else
36465   if test "$cross_compiling" = yes; then
36466   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
36467 See \`config.log' for more details." >&5
36468 echo "$as_me: error: cannot run test program while cross compiling
36469 See \`config.log' for more details." >&2;}
36470    { (exit 1); exit 1; }; }
36471 else
36472   cat >conftest.$ac_ext <<_ACEOF
36473 /* confdefs.h.  */
36474 _ACEOF
36475 cat confdefs.h >>conftest.$ac_ext
36476 cat >>conftest.$ac_ext <<_ACEOF
36477 /* end confdefs.h.  */
36478 $ac_includes_default
36479 long longval () { return (long) (sizeof (long)); }
36480 unsigned long ulongval () { return (long) (sizeof (long)); }
36481 #include <stdio.h>
36482 #include <stdlib.h>
36483 int
36484 main ()
36485 {
36486
36487   FILE *f = fopen ("conftest.val", "w");
36488   if (! f)
36489     exit (1);
36490   if (((long) (sizeof (long))) < 0)
36491     {
36492       long i = longval ();
36493       if (i != ((long) (sizeof (long))))
36494         exit (1);
36495       fprintf (f, "%ld\n", i);
36496     }
36497   else
36498     {
36499       unsigned long i = ulongval ();
36500       if (i != ((long) (sizeof (long))))
36501         exit (1);
36502       fprintf (f, "%lu\n", i);
36503     }
36504   exit (ferror (f) || fclose (f) != 0);
36505
36506   ;
36507   return 0;
36508 }
36509 _ACEOF
36510 rm -f conftest$ac_exeext
36511 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36512   (eval $ac_link) 2>&5
36513   ac_status=$?
36514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36515   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36517   (eval $ac_try) 2>&5
36518   ac_status=$?
36519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36520   (exit $ac_status); }; }; then
36521   ac_cv_sizeof_long=`cat conftest.val`
36522 else
36523   echo "$as_me: program exited with status $ac_status" >&5
36524 echo "$as_me: failed program was:" >&5
36525 sed 's/^/| /' conftest.$ac_ext >&5
36526
36527 ( exit $ac_status )
36528 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
36529 See \`config.log' for more details." >&5
36530 echo "$as_me: error: cannot compute sizeof (long), 77
36531 See \`config.log' for more details." >&2;}
36532    { (exit 1); exit 1; }; }
36533 fi
36534 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36535 fi
36536 fi
36537 rm -f conftest.val
36538 else
36539   ac_cv_sizeof_long=0
36540 fi
36541 fi
36542 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
36543 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
36544 cat >>confdefs.h <<_ACEOF
36545 #define SIZEOF_LONG $ac_cv_sizeof_long
36546 _ACEOF
36547
36548
36549 echo "$as_me:$LINENO: checking for long long" >&5
36550 echo $ECHO_N "checking for long long... $ECHO_C" >&6
36551 if test "${ac_cv_type_long_long+set}" = set; then
36552   echo $ECHO_N "(cached) $ECHO_C" >&6
36553 else
36554   cat >conftest.$ac_ext <<_ACEOF
36555 /* confdefs.h.  */
36556 _ACEOF
36557 cat confdefs.h >>conftest.$ac_ext
36558 cat >>conftest.$ac_ext <<_ACEOF
36559 /* end confdefs.h.  */
36560 $ac_includes_default
36561 int
36562 main ()
36563 {
36564 if ((long long *) 0)
36565   return 0;
36566 if (sizeof (long long))
36567   return 0;
36568   ;
36569   return 0;
36570 }
36571 _ACEOF
36572 rm -f conftest.$ac_objext
36573 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36574   (eval $ac_compile) 2>conftest.er1
36575   ac_status=$?
36576   grep -v '^ *+' conftest.er1 >conftest.err
36577   rm -f conftest.er1
36578   cat conftest.err >&5
36579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36580   (exit $ac_status); } &&
36581          { ac_try='test -z "$ac_c_werror_flag"
36582                          || test ! -s conftest.err'
36583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36584   (eval $ac_try) 2>&5
36585   ac_status=$?
36586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36587   (exit $ac_status); }; } &&
36588          { ac_try='test -s conftest.$ac_objext'
36589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36590   (eval $ac_try) 2>&5
36591   ac_status=$?
36592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36593   (exit $ac_status); }; }; then
36594   ac_cv_type_long_long=yes
36595 else
36596   echo "$as_me: failed program was:" >&5
36597 sed 's/^/| /' conftest.$ac_ext >&5
36598
36599 ac_cv_type_long_long=no
36600 fi
36601 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36602 fi
36603 echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
36604 echo "${ECHO_T}$ac_cv_type_long_long" >&6
36605
36606 echo "$as_me:$LINENO: checking size of long long" >&5
36607 echo $ECHO_N "checking size of long long... $ECHO_C" >&6
36608 if test "${ac_cv_sizeof_long_long+set}" = set; then
36609   echo $ECHO_N "(cached) $ECHO_C" >&6
36610 else
36611   if test "$ac_cv_type_long_long" = yes; then
36612   # The cast to unsigned long works around a bug in the HP C Compiler
36613   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
36614   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
36615   # This bug is HP SR number 8606223364.
36616   if test "$cross_compiling" = yes; then
36617   # Depending upon the size, compute the lo and hi bounds.
36618 cat >conftest.$ac_ext <<_ACEOF
36619 /* confdefs.h.  */
36620 _ACEOF
36621 cat confdefs.h >>conftest.$ac_ext
36622 cat >>conftest.$ac_ext <<_ACEOF
36623 /* end confdefs.h.  */
36624 $ac_includes_default
36625 int
36626 main ()
36627 {
36628 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
36629 test_array [0] = 0
36630
36631   ;
36632   return 0;
36633 }
36634 _ACEOF
36635 rm -f conftest.$ac_objext
36636 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36637   (eval $ac_compile) 2>conftest.er1
36638   ac_status=$?
36639   grep -v '^ *+' conftest.er1 >conftest.err
36640   rm -f conftest.er1
36641   cat conftest.err >&5
36642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36643   (exit $ac_status); } &&
36644          { ac_try='test -z "$ac_c_werror_flag"
36645                          || test ! -s conftest.err'
36646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36647   (eval $ac_try) 2>&5
36648   ac_status=$?
36649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36650   (exit $ac_status); }; } &&
36651          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
36657   ac_lo=0 ac_mid=0
36658   while :; do
36659     cat >conftest.$ac_ext <<_ACEOF
36660 /* confdefs.h.  */
36661 _ACEOF
36662 cat confdefs.h >>conftest.$ac_ext
36663 cat >>conftest.$ac_ext <<_ACEOF
36664 /* end confdefs.h.  */
36665 $ac_includes_default
36666 int
36667 main ()
36668 {
36669 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
36670 test_array [0] = 0
36671
36672   ;
36673   return 0;
36674 }
36675 _ACEOF
36676 rm -f conftest.$ac_objext
36677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36678   (eval $ac_compile) 2>conftest.er1
36679   ac_status=$?
36680   grep -v '^ *+' conftest.er1 >conftest.err
36681   rm -f conftest.er1
36682   cat conftest.err >&5
36683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36684   (exit $ac_status); } &&
36685          { ac_try='test -z "$ac_c_werror_flag"
36686                          || test ! -s conftest.err'
36687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36688   (eval $ac_try) 2>&5
36689   ac_status=$?
36690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36691   (exit $ac_status); }; } &&
36692          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
36698   ac_hi=$ac_mid; break
36699 else
36700   echo "$as_me: failed program was:" >&5
36701 sed 's/^/| /' conftest.$ac_ext >&5
36702
36703 ac_lo=`expr $ac_mid + 1`
36704                     if test $ac_lo -le $ac_mid; then
36705                       ac_lo= ac_hi=
36706                       break
36707                     fi
36708                     ac_mid=`expr 2 '*' $ac_mid + 1`
36709 fi
36710 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36711   done
36712 else
36713   echo "$as_me: failed program was:" >&5
36714 sed 's/^/| /' conftest.$ac_ext >&5
36715
36716 cat >conftest.$ac_ext <<_ACEOF
36717 /* confdefs.h.  */
36718 _ACEOF
36719 cat confdefs.h >>conftest.$ac_ext
36720 cat >>conftest.$ac_ext <<_ACEOF
36721 /* end confdefs.h.  */
36722 $ac_includes_default
36723 int
36724 main ()
36725 {
36726 static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
36727 test_array [0] = 0
36728
36729   ;
36730   return 0;
36731 }
36732 _ACEOF
36733 rm -f conftest.$ac_objext
36734 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36735   (eval $ac_compile) 2>conftest.er1
36736   ac_status=$?
36737   grep -v '^ *+' conftest.er1 >conftest.err
36738   rm -f conftest.er1
36739   cat conftest.err >&5
36740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36741   (exit $ac_status); } &&
36742          { ac_try='test -z "$ac_c_werror_flag"
36743                          || test ! -s conftest.err'
36744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36745   (eval $ac_try) 2>&5
36746   ac_status=$?
36747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36748   (exit $ac_status); }; } &&
36749          { ac_try='test -s conftest.$ac_objext'
36750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36751   (eval $ac_try) 2>&5
36752   ac_status=$?
36753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36754   (exit $ac_status); }; }; then
36755   ac_hi=-1 ac_mid=-1
36756   while :; do
36757     cat >conftest.$ac_ext <<_ACEOF
36758 /* confdefs.h.  */
36759 _ACEOF
36760 cat confdefs.h >>conftest.$ac_ext
36761 cat >>conftest.$ac_ext <<_ACEOF
36762 /* end confdefs.h.  */
36763 $ac_includes_default
36764 int
36765 main ()
36766 {
36767 static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
36768 test_array [0] = 0
36769
36770   ;
36771   return 0;
36772 }
36773 _ACEOF
36774 rm -f conftest.$ac_objext
36775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36776   (eval $ac_compile) 2>conftest.er1
36777   ac_status=$?
36778   grep -v '^ *+' conftest.er1 >conftest.err
36779   rm -f conftest.er1
36780   cat conftest.err >&5
36781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36782   (exit $ac_status); } &&
36783          { ac_try='test -z "$ac_c_werror_flag"
36784                          || test ! -s conftest.err'
36785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36786   (eval $ac_try) 2>&5
36787   ac_status=$?
36788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36789   (exit $ac_status); }; } &&
36790          { ac_try='test -s conftest.$ac_objext'
36791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36792   (eval $ac_try) 2>&5
36793   ac_status=$?
36794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36795   (exit $ac_status); }; }; then
36796   ac_lo=$ac_mid; break
36797 else
36798   echo "$as_me: failed program was:" >&5
36799 sed 's/^/| /' conftest.$ac_ext >&5
36800
36801 ac_hi=`expr '(' $ac_mid ')' - 1`
36802                        if test $ac_mid -le $ac_hi; then
36803                          ac_lo= ac_hi=
36804                          break
36805                        fi
36806                        ac_mid=`expr 2 '*' $ac_mid`
36807 fi
36808 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36809   done
36810 else
36811   echo "$as_me: failed program was:" >&5
36812 sed 's/^/| /' conftest.$ac_ext >&5
36813
36814 ac_lo= ac_hi=
36815 fi
36816 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36817 fi
36818 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36819 # Binary search between lo and hi bounds.
36820 while test "x$ac_lo" != "x$ac_hi"; do
36821   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
36822   cat >conftest.$ac_ext <<_ACEOF
36823 /* confdefs.h.  */
36824 _ACEOF
36825 cat confdefs.h >>conftest.$ac_ext
36826 cat >>conftest.$ac_ext <<_ACEOF
36827 /* end confdefs.h.  */
36828 $ac_includes_default
36829 int
36830 main ()
36831 {
36832 static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
36833 test_array [0] = 0
36834
36835   ;
36836   return 0;
36837 }
36838 _ACEOF
36839 rm -f conftest.$ac_objext
36840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36841   (eval $ac_compile) 2>conftest.er1
36842   ac_status=$?
36843   grep -v '^ *+' conftest.er1 >conftest.err
36844   rm -f conftest.er1
36845   cat conftest.err >&5
36846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36847   (exit $ac_status); } &&
36848          { ac_try='test -z "$ac_c_werror_flag"
36849                          || test ! -s conftest.err'
36850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36851   (eval $ac_try) 2>&5
36852   ac_status=$?
36853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36854   (exit $ac_status); }; } &&
36855          { ac_try='test -s conftest.$ac_objext'
36856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36857   (eval $ac_try) 2>&5
36858   ac_status=$?
36859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36860   (exit $ac_status); }; }; then
36861   ac_hi=$ac_mid
36862 else
36863   echo "$as_me: failed program was:" >&5
36864 sed 's/^/| /' conftest.$ac_ext >&5
36865
36866 ac_lo=`expr '(' $ac_mid ')' + 1`
36867 fi
36868 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
36869 done
36870 case $ac_lo in
36871 ?*) ac_cv_sizeof_long_long=$ac_lo;;
36872 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
36873 See \`config.log' for more details." >&5
36874 echo "$as_me: error: cannot compute sizeof (long long), 77
36875 See \`config.log' for more details." >&2;}
36876    { (exit 1); exit 1; }; } ;;
36877 esac
36878 else
36879   if test "$cross_compiling" = yes; then
36880   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
36881 See \`config.log' for more details." >&5
36882 echo "$as_me: error: cannot run test program while cross compiling
36883 See \`config.log' for more details." >&2;}
36884    { (exit 1); exit 1; }; }
36885 else
36886   cat >conftest.$ac_ext <<_ACEOF
36887 /* confdefs.h.  */
36888 _ACEOF
36889 cat confdefs.h >>conftest.$ac_ext
36890 cat >>conftest.$ac_ext <<_ACEOF
36891 /* end confdefs.h.  */
36892 $ac_includes_default
36893 long longval () { return (long) (sizeof (long long)); }
36894 unsigned long ulongval () { return (long) (sizeof (long long)); }
36895 #include <stdio.h>
36896 #include <stdlib.h>
36897 int
36898 main ()
36899 {
36900
36901   FILE *f = fopen ("conftest.val", "w");
36902   if (! f)
36903     exit (1);
36904   if (((long) (sizeof (long long))) < 0)
36905     {
36906       long i = longval ();
36907       if (i != ((long) (sizeof (long long))))
36908         exit (1);
36909       fprintf (f, "%ld\n", i);
36910     }
36911   else
36912     {
36913       unsigned long i = ulongval ();
36914       if (i != ((long) (sizeof (long long))))
36915         exit (1);
36916       fprintf (f, "%lu\n", i);
36917     }
36918   exit (ferror (f) || fclose (f) != 0);
36919
36920   ;
36921   return 0;
36922 }
36923 _ACEOF
36924 rm -f conftest$ac_exeext
36925 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
36926   (eval $ac_link) 2>&5
36927   ac_status=$?
36928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36929   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36931   (eval $ac_try) 2>&5
36932   ac_status=$?
36933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36934   (exit $ac_status); }; }; then
36935   ac_cv_sizeof_long_long=`cat conftest.val`
36936 else
36937   echo "$as_me: program exited with status $ac_status" >&5
36938 echo "$as_me: failed program was:" >&5
36939 sed 's/^/| /' conftest.$ac_ext >&5
36940
36941 ( exit $ac_status )
36942 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
36943 See \`config.log' for more details." >&5
36944 echo "$as_me: error: cannot compute sizeof (long long), 77
36945 See \`config.log' for more details." >&2;}
36946    { (exit 1); exit 1; }; }
36947 fi
36948 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36949 fi
36950 fi
36951 rm -f conftest.val
36952 else
36953   ac_cv_sizeof_long_long=0
36954 fi
36955 fi
36956 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
36957 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
36958 cat >>confdefs.h <<_ACEOF
36959 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
36960 _ACEOF
36961
36962
36963 echo "$as_me:$LINENO: checking for wchar_t" >&5
36964 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
36965 if test "${ac_cv_type_wchar_t+set}" = set; then
36966   echo $ECHO_N "(cached) $ECHO_C" >&6
36967 else
36968   cat >conftest.$ac_ext <<_ACEOF
36969 /* confdefs.h.  */
36970 _ACEOF
36971 cat confdefs.h >>conftest.$ac_ext
36972 cat >>conftest.$ac_ext <<_ACEOF
36973 /* end confdefs.h.  */
36974 $ac_includes_default
36975 int
36976 main ()
36977 {
36978 if ((wchar_t *) 0)
36979   return 0;
36980 if (sizeof (wchar_t))
36981   return 0;
36982   ;
36983   return 0;
36984 }
36985 _ACEOF
36986 rm -f conftest.$ac_objext
36987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
36988   (eval $ac_compile) 2>conftest.er1
36989   ac_status=$?
36990   grep -v '^ *+' conftest.er1 >conftest.err
36991   rm -f conftest.er1
36992   cat conftest.err >&5
36993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36994   (exit $ac_status); } &&
36995          { ac_try='test -z "$ac_c_werror_flag"
36996                          || test ! -s conftest.err'
36997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
36998   (eval $ac_try) 2>&5
36999   ac_status=$?
37000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37001   (exit $ac_status); }; } &&
37002          { ac_try='test -s conftest.$ac_objext'
37003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37004   (eval $ac_try) 2>&5
37005   ac_status=$?
37006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37007   (exit $ac_status); }; }; then
37008   ac_cv_type_wchar_t=yes
37009 else
37010   echo "$as_me: failed program was:" >&5
37011 sed 's/^/| /' conftest.$ac_ext >&5
37012
37013 ac_cv_type_wchar_t=no
37014 fi
37015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37016 fi
37017 echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
37018 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
37019
37020 echo "$as_me:$LINENO: checking size of wchar_t" >&5
37021 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
37022 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
37023   echo $ECHO_N "(cached) $ECHO_C" >&6
37024 else
37025   if test "$ac_cv_type_wchar_t" = yes; then
37026   # The cast to unsigned long works around a bug in the HP C Compiler
37027   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
37028   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
37029   # This bug is HP SR number 8606223364.
37030   if test "$cross_compiling" = yes; then
37031   # Depending upon the size, compute the lo and hi bounds.
37032 cat >conftest.$ac_ext <<_ACEOF
37033 /* confdefs.h.  */
37034 _ACEOF
37035 cat confdefs.h >>conftest.$ac_ext
37036 cat >>conftest.$ac_ext <<_ACEOF
37037 /* end confdefs.h.  */
37038 $ac_includes_default
37039 int
37040 main ()
37041 {
37042 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
37043 test_array [0] = 0
37044
37045   ;
37046   return 0;
37047 }
37048 _ACEOF
37049 rm -f conftest.$ac_objext
37050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37051   (eval $ac_compile) 2>conftest.er1
37052   ac_status=$?
37053   grep -v '^ *+' conftest.er1 >conftest.err
37054   rm -f conftest.er1
37055   cat conftest.err >&5
37056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37057   (exit $ac_status); } &&
37058          { ac_try='test -z "$ac_c_werror_flag"
37059                          || test ! -s conftest.err'
37060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37061   (eval $ac_try) 2>&5
37062   ac_status=$?
37063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37064   (exit $ac_status); }; } &&
37065          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
37071   ac_lo=0 ac_mid=0
37072   while :; do
37073     cat >conftest.$ac_ext <<_ACEOF
37074 /* confdefs.h.  */
37075 _ACEOF
37076 cat confdefs.h >>conftest.$ac_ext
37077 cat >>conftest.$ac_ext <<_ACEOF
37078 /* end confdefs.h.  */
37079 $ac_includes_default
37080 int
37081 main ()
37082 {
37083 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
37084 test_array [0] = 0
37085
37086   ;
37087   return 0;
37088 }
37089 _ACEOF
37090 rm -f conftest.$ac_objext
37091 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37092   (eval $ac_compile) 2>conftest.er1
37093   ac_status=$?
37094   grep -v '^ *+' conftest.er1 >conftest.err
37095   rm -f conftest.er1
37096   cat conftest.err >&5
37097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37098   (exit $ac_status); } &&
37099          { ac_try='test -z "$ac_c_werror_flag"
37100                          || test ! -s conftest.err'
37101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37102   (eval $ac_try) 2>&5
37103   ac_status=$?
37104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37105   (exit $ac_status); }; } &&
37106          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
37112   ac_hi=$ac_mid; break
37113 else
37114   echo "$as_me: failed program was:" >&5
37115 sed 's/^/| /' conftest.$ac_ext >&5
37116
37117 ac_lo=`expr $ac_mid + 1`
37118                     if test $ac_lo -le $ac_mid; then
37119                       ac_lo= ac_hi=
37120                       break
37121                     fi
37122                     ac_mid=`expr 2 '*' $ac_mid + 1`
37123 fi
37124 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37125   done
37126 else
37127   echo "$as_me: failed program was:" >&5
37128 sed 's/^/| /' conftest.$ac_ext >&5
37129
37130 cat >conftest.$ac_ext <<_ACEOF
37131 /* confdefs.h.  */
37132 _ACEOF
37133 cat confdefs.h >>conftest.$ac_ext
37134 cat >>conftest.$ac_ext <<_ACEOF
37135 /* end confdefs.h.  */
37136 $ac_includes_default
37137 int
37138 main ()
37139 {
37140 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
37141 test_array [0] = 0
37142
37143   ;
37144   return 0;
37145 }
37146 _ACEOF
37147 rm -f conftest.$ac_objext
37148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37149   (eval $ac_compile) 2>conftest.er1
37150   ac_status=$?
37151   grep -v '^ *+' conftest.er1 >conftest.err
37152   rm -f conftest.er1
37153   cat conftest.err >&5
37154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37155   (exit $ac_status); } &&
37156          { ac_try='test -z "$ac_c_werror_flag"
37157                          || test ! -s conftest.err'
37158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37159   (eval $ac_try) 2>&5
37160   ac_status=$?
37161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37162   (exit $ac_status); }; } &&
37163          { ac_try='test -s conftest.$ac_objext'
37164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37165   (eval $ac_try) 2>&5
37166   ac_status=$?
37167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37168   (exit $ac_status); }; }; then
37169   ac_hi=-1 ac_mid=-1
37170   while :; do
37171     cat >conftest.$ac_ext <<_ACEOF
37172 /* confdefs.h.  */
37173 _ACEOF
37174 cat confdefs.h >>conftest.$ac_ext
37175 cat >>conftest.$ac_ext <<_ACEOF
37176 /* end confdefs.h.  */
37177 $ac_includes_default
37178 int
37179 main ()
37180 {
37181 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
37182 test_array [0] = 0
37183
37184   ;
37185   return 0;
37186 }
37187 _ACEOF
37188 rm -f conftest.$ac_objext
37189 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37190   (eval $ac_compile) 2>conftest.er1
37191   ac_status=$?
37192   grep -v '^ *+' conftest.er1 >conftest.err
37193   rm -f conftest.er1
37194   cat conftest.err >&5
37195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37196   (exit $ac_status); } &&
37197          { ac_try='test -z "$ac_c_werror_flag"
37198                          || test ! -s conftest.err'
37199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37200   (eval $ac_try) 2>&5
37201   ac_status=$?
37202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37203   (exit $ac_status); }; } &&
37204          { ac_try='test -s conftest.$ac_objext'
37205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37206   (eval $ac_try) 2>&5
37207   ac_status=$?
37208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37209   (exit $ac_status); }; }; then
37210   ac_lo=$ac_mid; break
37211 else
37212   echo "$as_me: failed program was:" >&5
37213 sed 's/^/| /' conftest.$ac_ext >&5
37214
37215 ac_hi=`expr '(' $ac_mid ')' - 1`
37216                        if test $ac_mid -le $ac_hi; then
37217                          ac_lo= ac_hi=
37218                          break
37219                        fi
37220                        ac_mid=`expr 2 '*' $ac_mid`
37221 fi
37222 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37223   done
37224 else
37225   echo "$as_me: failed program was:" >&5
37226 sed 's/^/| /' conftest.$ac_ext >&5
37227
37228 ac_lo= ac_hi=
37229 fi
37230 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37231 fi
37232 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37233 # Binary search between lo and hi bounds.
37234 while test "x$ac_lo" != "x$ac_hi"; do
37235   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
37236   cat >conftest.$ac_ext <<_ACEOF
37237 /* confdefs.h.  */
37238 _ACEOF
37239 cat confdefs.h >>conftest.$ac_ext
37240 cat >>conftest.$ac_ext <<_ACEOF
37241 /* end confdefs.h.  */
37242 $ac_includes_default
37243 int
37244 main ()
37245 {
37246 static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
37247 test_array [0] = 0
37248
37249   ;
37250   return 0;
37251 }
37252 _ACEOF
37253 rm -f conftest.$ac_objext
37254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37255   (eval $ac_compile) 2>conftest.er1
37256   ac_status=$?
37257   grep -v '^ *+' conftest.er1 >conftest.err
37258   rm -f conftest.er1
37259   cat conftest.err >&5
37260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37261   (exit $ac_status); } &&
37262          { ac_try='test -z "$ac_c_werror_flag"
37263                          || test ! -s conftest.err'
37264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37265   (eval $ac_try) 2>&5
37266   ac_status=$?
37267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37268   (exit $ac_status); }; } &&
37269          { ac_try='test -s conftest.$ac_objext'
37270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37271   (eval $ac_try) 2>&5
37272   ac_status=$?
37273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37274   (exit $ac_status); }; }; then
37275   ac_hi=$ac_mid
37276 else
37277   echo "$as_me: failed program was:" >&5
37278 sed 's/^/| /' conftest.$ac_ext >&5
37279
37280 ac_lo=`expr '(' $ac_mid ')' + 1`
37281 fi
37282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37283 done
37284 case $ac_lo in
37285 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
37286 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
37287 See \`config.log' for more details." >&5
37288 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
37289 See \`config.log' for more details." >&2;}
37290    { (exit 1); exit 1; }; } ;;
37291 esac
37292 else
37293   if test "$cross_compiling" = yes; then
37294   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
37295 See \`config.log' for more details." >&5
37296 echo "$as_me: error: cannot run test program while cross compiling
37297 See \`config.log' for more details." >&2;}
37298    { (exit 1); exit 1; }; }
37299 else
37300   cat >conftest.$ac_ext <<_ACEOF
37301 /* confdefs.h.  */
37302 _ACEOF
37303 cat confdefs.h >>conftest.$ac_ext
37304 cat >>conftest.$ac_ext <<_ACEOF
37305 /* end confdefs.h.  */
37306 $ac_includes_default
37307 long longval () { return (long) (sizeof (wchar_t)); }
37308 unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
37309 #include <stdio.h>
37310 #include <stdlib.h>
37311 int
37312 main ()
37313 {
37314
37315   FILE *f = fopen ("conftest.val", "w");
37316   if (! f)
37317     exit (1);
37318   if (((long) (sizeof (wchar_t))) < 0)
37319     {
37320       long i = longval ();
37321       if (i != ((long) (sizeof (wchar_t))))
37322         exit (1);
37323       fprintf (f, "%ld\n", i);
37324     }
37325   else
37326     {
37327       unsigned long i = ulongval ();
37328       if (i != ((long) (sizeof (wchar_t))))
37329         exit (1);
37330       fprintf (f, "%lu\n", i);
37331     }
37332   exit (ferror (f) || fclose (f) != 0);
37333
37334   ;
37335   return 0;
37336 }
37337 _ACEOF
37338 rm -f conftest$ac_exeext
37339 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37340   (eval $ac_link) 2>&5
37341   ac_status=$?
37342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37343   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
37344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37345   (eval $ac_try) 2>&5
37346   ac_status=$?
37347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37348   (exit $ac_status); }; }; then
37349   ac_cv_sizeof_wchar_t=`cat conftest.val`
37350 else
37351   echo "$as_me: program exited with status $ac_status" >&5
37352 echo "$as_me: failed program was:" >&5
37353 sed 's/^/| /' conftest.$ac_ext >&5
37354
37355 ( exit $ac_status )
37356 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
37357 See \`config.log' for more details." >&5
37358 echo "$as_me: error: cannot compute sizeof (wchar_t), 77
37359 See \`config.log' for more details." >&2;}
37360    { (exit 1); exit 1; }; }
37361 fi
37362 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
37363 fi
37364 fi
37365 rm -f conftest.val
37366 else
37367   ac_cv_sizeof_wchar_t=0
37368 fi
37369 fi
37370 echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
37371 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
37372 cat >>confdefs.h <<_ACEOF
37373 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
37374 _ACEOF
37375
37376
37377
37378 if test "$ac_cv_sizeof_int" -lt 4 ; then
37379         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
37380 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
37381
37382
37383 cat >>confdefs.h <<\_ACEOF
37384 #define LBER_INT_T long
37385 _ACEOF
37386
37387 else
37388
37389 cat >>confdefs.h <<\_ACEOF
37390 #define LBER_INT_T int
37391 _ACEOF
37392
37393 fi
37394
37395
37396 cat >>confdefs.h <<\_ACEOF
37397 #define LBER_LEN_T long
37398 _ACEOF
37399
37400
37401 cat >>confdefs.h <<\_ACEOF
37402 #define LBER_SOCKET_T int
37403 _ACEOF
37404
37405
37406 cat >>confdefs.h <<\_ACEOF
37407 #define LBER_TAG_T long
37408 _ACEOF
37409
37410
37411 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
37412         if test $ac_cv_sizeof_long_long -gt 4 ; then
37413                 ol_with_mp=longlong
37414
37415 cat >>confdefs.h <<\_ACEOF
37416 #define USE_MP_LONG_LONG 1
37417 _ACEOF
37418
37419         elif test $ol_with_mp = longlong ; then
37420                 { { echo "$as_me:$LINENO: error: long long unusable for multiple precision" >&5
37421 echo "$as_me: error: long long unusable for multiple precision" >&2;}
37422    { (exit 1); exit 1; }; }
37423         fi
37424 fi
37425 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
37426         if test $ac_cv_sizeof_long -gt 4 ; then
37427                 ol_with_mp=long
37428
37429 cat >>confdefs.h <<\_ACEOF
37430 #define USE_MP_LONG 1
37431 _ACEOF
37432
37433         elif test $ol_with_mp = long ; then
37434                 { { echo "$as_me:$LINENO: error: long unusable for multiple precision" >&5
37435 echo "$as_me: error: long unusable for multiple precision" >&2;}
37436    { (exit 1); exit 1; }; }
37437         fi
37438 fi
37439 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
37440
37441 for ac_header in openssl/bn.h
37442 do
37443 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37444 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37445   echo "$as_me:$LINENO: checking for $ac_header" >&5
37446 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37447 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37448   echo $ECHO_N "(cached) $ECHO_C" >&6
37449 fi
37450 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37451 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37452 else
37453   # Is the header compilable?
37454 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37455 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37456 cat >conftest.$ac_ext <<_ACEOF
37457 /* confdefs.h.  */
37458 _ACEOF
37459 cat confdefs.h >>conftest.$ac_ext
37460 cat >>conftest.$ac_ext <<_ACEOF
37461 /* end confdefs.h.  */
37462 $ac_includes_default
37463 #include <$ac_header>
37464 _ACEOF
37465 rm -f conftest.$ac_objext
37466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37467   (eval $ac_compile) 2>conftest.er1
37468   ac_status=$?
37469   grep -v '^ *+' conftest.er1 >conftest.err
37470   rm -f conftest.er1
37471   cat conftest.err >&5
37472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37473   (exit $ac_status); } &&
37474          { ac_try='test -z "$ac_c_werror_flag"
37475                          || test ! -s conftest.err'
37476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37477   (eval $ac_try) 2>&5
37478   ac_status=$?
37479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37480   (exit $ac_status); }; } &&
37481          { ac_try='test -s conftest.$ac_objext'
37482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37483   (eval $ac_try) 2>&5
37484   ac_status=$?
37485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37486   (exit $ac_status); }; }; then
37487   ac_header_compiler=yes
37488 else
37489   echo "$as_me: failed program was:" >&5
37490 sed 's/^/| /' conftest.$ac_ext >&5
37491
37492 ac_header_compiler=no
37493 fi
37494 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37495 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37496 echo "${ECHO_T}$ac_header_compiler" >&6
37497
37498 # Is the header present?
37499 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37500 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37501 cat >conftest.$ac_ext <<_ACEOF
37502 /* confdefs.h.  */
37503 _ACEOF
37504 cat confdefs.h >>conftest.$ac_ext
37505 cat >>conftest.$ac_ext <<_ACEOF
37506 /* end confdefs.h.  */
37507 #include <$ac_header>
37508 _ACEOF
37509 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37510   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37511   ac_status=$?
37512   grep -v '^ *+' conftest.er1 >conftest.err
37513   rm -f conftest.er1
37514   cat conftest.err >&5
37515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37516   (exit $ac_status); } >/dev/null; then
37517   if test -s conftest.err; then
37518     ac_cpp_err=$ac_c_preproc_warn_flag
37519     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37520   else
37521     ac_cpp_err=
37522   fi
37523 else
37524   ac_cpp_err=yes
37525 fi
37526 if test -z "$ac_cpp_err"; then
37527   ac_header_preproc=yes
37528 else
37529   echo "$as_me: failed program was:" >&5
37530 sed 's/^/| /' conftest.$ac_ext >&5
37531
37532   ac_header_preproc=no
37533 fi
37534 rm -f conftest.err conftest.$ac_ext
37535 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37536 echo "${ECHO_T}$ac_header_preproc" >&6
37537
37538 # So?  What about this header?
37539 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37540   yes:no: )
37541     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37542 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37543     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37544 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37545     ac_header_preproc=yes
37546     ;;
37547   no:yes:* )
37548     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37549 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37550     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37551 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37552     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37553 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37554     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37555 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37556     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37557 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37558     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37559 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37560     (
37561       cat <<\_ASBOX
37562 ## --------------------------------------------- ##
37563 ## Report this to <http://www.openldap.org/its/> ##
37564 ## --------------------------------------------- ##
37565 _ASBOX
37566     ) |
37567       sed "s/^/$as_me: WARNING:     /" >&2
37568     ;;
37569 esac
37570 echo "$as_me:$LINENO: checking for $ac_header" >&5
37571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37573   echo $ECHO_N "(cached) $ECHO_C" >&6
37574 else
37575   eval "$as_ac_Header=\$ac_header_preproc"
37576 fi
37577 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37578 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37579
37580 fi
37581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37582   cat >>confdefs.h <<_ACEOF
37583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37584 _ACEOF
37585
37586 fi
37587
37588 done
37589
37590
37591 for ac_header in openssl/crypto.h
37592 do
37593 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37595   echo "$as_me:$LINENO: checking for $ac_header" >&5
37596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37598   echo $ECHO_N "(cached) $ECHO_C" >&6
37599 fi
37600 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37602 else
37603   # Is the header compilable?
37604 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37605 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37606 cat >conftest.$ac_ext <<_ACEOF
37607 /* confdefs.h.  */
37608 _ACEOF
37609 cat confdefs.h >>conftest.$ac_ext
37610 cat >>conftest.$ac_ext <<_ACEOF
37611 /* end confdefs.h.  */
37612 $ac_includes_default
37613 #include <$ac_header>
37614 _ACEOF
37615 rm -f conftest.$ac_objext
37616 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37617   (eval $ac_compile) 2>conftest.er1
37618   ac_status=$?
37619   grep -v '^ *+' conftest.er1 >conftest.err
37620   rm -f conftest.er1
37621   cat conftest.err >&5
37622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37623   (exit $ac_status); } &&
37624          { ac_try='test -z "$ac_c_werror_flag"
37625                          || test ! -s conftest.err'
37626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37627   (eval $ac_try) 2>&5
37628   ac_status=$?
37629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37630   (exit $ac_status); }; } &&
37631          { ac_try='test -s conftest.$ac_objext'
37632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37633   (eval $ac_try) 2>&5
37634   ac_status=$?
37635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37636   (exit $ac_status); }; }; then
37637   ac_header_compiler=yes
37638 else
37639   echo "$as_me: failed program was:" >&5
37640 sed 's/^/| /' conftest.$ac_ext >&5
37641
37642 ac_header_compiler=no
37643 fi
37644 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37645 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37646 echo "${ECHO_T}$ac_header_compiler" >&6
37647
37648 # Is the header present?
37649 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37650 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37651 cat >conftest.$ac_ext <<_ACEOF
37652 /* confdefs.h.  */
37653 _ACEOF
37654 cat confdefs.h >>conftest.$ac_ext
37655 cat >>conftest.$ac_ext <<_ACEOF
37656 /* end confdefs.h.  */
37657 #include <$ac_header>
37658 _ACEOF
37659 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37661   ac_status=$?
37662   grep -v '^ *+' conftest.er1 >conftest.err
37663   rm -f conftest.er1
37664   cat conftest.err >&5
37665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37666   (exit $ac_status); } >/dev/null; then
37667   if test -s conftest.err; then
37668     ac_cpp_err=$ac_c_preproc_warn_flag
37669     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37670   else
37671     ac_cpp_err=
37672   fi
37673 else
37674   ac_cpp_err=yes
37675 fi
37676 if test -z "$ac_cpp_err"; then
37677   ac_header_preproc=yes
37678 else
37679   echo "$as_me: failed program was:" >&5
37680 sed 's/^/| /' conftest.$ac_ext >&5
37681
37682   ac_header_preproc=no
37683 fi
37684 rm -f conftest.err conftest.$ac_ext
37685 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37686 echo "${ECHO_T}$ac_header_preproc" >&6
37687
37688 # So?  What about this header?
37689 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37690   yes:no: )
37691     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37692 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37693     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37694 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37695     ac_header_preproc=yes
37696     ;;
37697   no:yes:* )
37698     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37699 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37700     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37701 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37702     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37703 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37704     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37705 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37708     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37709 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37710     (
37711       cat <<\_ASBOX
37712 ## --------------------------------------------- ##
37713 ## Report this to <http://www.openldap.org/its/> ##
37714 ## --------------------------------------------- ##
37715 _ASBOX
37716     ) |
37717       sed "s/^/$as_me: WARNING:     /" >&2
37718     ;;
37719 esac
37720 echo "$as_me:$LINENO: checking for $ac_header" >&5
37721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37723   echo $ECHO_N "(cached) $ECHO_C" >&6
37724 else
37725   eval "$as_ac_Header=\$ac_header_preproc"
37726 fi
37727 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37728 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37729
37730 fi
37731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37732   cat >>confdefs.h <<_ACEOF
37733 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37734 _ACEOF
37735
37736 fi
37737
37738 done
37739
37740         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
37741                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
37742                 test "$ol_with_tls" = "found" ; then
37743                 ol_with_mp=bignum
37744
37745 cat >>confdefs.h <<\_ACEOF
37746 #define USE_MP_BIGNUM 1
37747 _ACEOF
37748
37749         elif test $ol_with_mp = bignum ; then
37750                 { { echo "$as_me:$LINENO: error: bignum not available" >&5
37751 echo "$as_me: error: bignum not available" >&2;}
37752    { (exit 1); exit 1; }; }
37753         fi
37754 fi
37755 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
37756
37757 for ac_header in gmp.h
37758 do
37759 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37761   echo "$as_me:$LINENO: checking for $ac_header" >&5
37762 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37764   echo $ECHO_N "(cached) $ECHO_C" >&6
37765 fi
37766 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37767 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37768 else
37769   # Is the header compilable?
37770 echo "$as_me:$LINENO: checking $ac_header usability" >&5
37771 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
37772 cat >conftest.$ac_ext <<_ACEOF
37773 /* confdefs.h.  */
37774 _ACEOF
37775 cat confdefs.h >>conftest.$ac_ext
37776 cat >>conftest.$ac_ext <<_ACEOF
37777 /* end confdefs.h.  */
37778 $ac_includes_default
37779 #include <$ac_header>
37780 _ACEOF
37781 rm -f conftest.$ac_objext
37782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
37783   (eval $ac_compile) 2>conftest.er1
37784   ac_status=$?
37785   grep -v '^ *+' conftest.er1 >conftest.err
37786   rm -f conftest.er1
37787   cat conftest.err >&5
37788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37789   (exit $ac_status); } &&
37790          { ac_try='test -z "$ac_c_werror_flag"
37791                          || test ! -s conftest.err'
37792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37793   (eval $ac_try) 2>&5
37794   ac_status=$?
37795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37796   (exit $ac_status); }; } &&
37797          { ac_try='test -s conftest.$ac_objext'
37798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37799   (eval $ac_try) 2>&5
37800   ac_status=$?
37801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37802   (exit $ac_status); }; }; then
37803   ac_header_compiler=yes
37804 else
37805   echo "$as_me: failed program was:" >&5
37806 sed 's/^/| /' conftest.$ac_ext >&5
37807
37808 ac_header_compiler=no
37809 fi
37810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
37811 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
37812 echo "${ECHO_T}$ac_header_compiler" >&6
37813
37814 # Is the header present?
37815 echo "$as_me:$LINENO: checking $ac_header presence" >&5
37816 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
37817 cat >conftest.$ac_ext <<_ACEOF
37818 /* confdefs.h.  */
37819 _ACEOF
37820 cat confdefs.h >>conftest.$ac_ext
37821 cat >>conftest.$ac_ext <<_ACEOF
37822 /* end confdefs.h.  */
37823 #include <$ac_header>
37824 _ACEOF
37825 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
37826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
37827   ac_status=$?
37828   grep -v '^ *+' conftest.er1 >conftest.err
37829   rm -f conftest.er1
37830   cat conftest.err >&5
37831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37832   (exit $ac_status); } >/dev/null; then
37833   if test -s conftest.err; then
37834     ac_cpp_err=$ac_c_preproc_warn_flag
37835     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
37836   else
37837     ac_cpp_err=
37838   fi
37839 else
37840   ac_cpp_err=yes
37841 fi
37842 if test -z "$ac_cpp_err"; then
37843   ac_header_preproc=yes
37844 else
37845   echo "$as_me: failed program was:" >&5
37846 sed 's/^/| /' conftest.$ac_ext >&5
37847
37848   ac_header_preproc=no
37849 fi
37850 rm -f conftest.err conftest.$ac_ext
37851 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
37852 echo "${ECHO_T}$ac_header_preproc" >&6
37853
37854 # So?  What about this header?
37855 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
37856   yes:no: )
37857     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
37858 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
37859     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
37860 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
37861     ac_header_preproc=yes
37862     ;;
37863   no:yes:* )
37864     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
37865 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
37866     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
37867 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
37868     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
37869 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
37870     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
37871 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
37872     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
37873 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
37874     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
37875 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
37876     (
37877       cat <<\_ASBOX
37878 ## --------------------------------------------- ##
37879 ## Report this to <http://www.openldap.org/its/> ##
37880 ## --------------------------------------------- ##
37881 _ASBOX
37882     ) |
37883       sed "s/^/$as_me: WARNING:     /" >&2
37884     ;;
37885 esac
37886 echo "$as_me:$LINENO: checking for $ac_header" >&5
37887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
37888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
37889   echo $ECHO_N "(cached) $ECHO_C" >&6
37890 else
37891   eval "$as_ac_Header=\$ac_header_preproc"
37892 fi
37893 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
37894 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
37895
37896 fi
37897 if test `eval echo '${'$as_ac_Header'}'` = yes; then
37898   cat >>confdefs.h <<_ACEOF
37899 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
37900 _ACEOF
37901
37902 fi
37903
37904 done
37905
37906
37907 echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
37908 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6
37909 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
37910   echo $ECHO_N "(cached) $ECHO_C" >&6
37911 else
37912   ac_check_lib_save_LIBS=$LIBS
37913 LIBS="-lgmp  $LIBS"
37914 cat >conftest.$ac_ext <<_ACEOF
37915 /* confdefs.h.  */
37916 _ACEOF
37917 cat confdefs.h >>conftest.$ac_ext
37918 cat >>conftest.$ac_ext <<_ACEOF
37919 /* end confdefs.h.  */
37920
37921 /* Override any gcc2 internal prototype to avoid an error.  */
37922 #ifdef __cplusplus
37923 extern "C"
37924 #endif
37925 /* We use char because int might match the return type of a gcc2
37926    builtin and then its argument prototype would still apply.  */
37927 char __gmpz_add_ui ();
37928 int
37929 main ()
37930 {
37931 __gmpz_add_ui ();
37932   ;
37933   return 0;
37934 }
37935 _ACEOF
37936 rm -f conftest.$ac_objext conftest$ac_exeext
37937 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
37938   (eval $ac_link) 2>conftest.er1
37939   ac_status=$?
37940   grep -v '^ *+' conftest.er1 >conftest.err
37941   rm -f conftest.er1
37942   cat conftest.err >&5
37943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37944   (exit $ac_status); } &&
37945          { ac_try='test -z "$ac_c_werror_flag"
37946                          || test ! -s conftest.err'
37947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37948   (eval $ac_try) 2>&5
37949   ac_status=$?
37950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37951   (exit $ac_status); }; } &&
37952          { ac_try='test -s conftest$ac_exeext'
37953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37954   (eval $ac_try) 2>&5
37955   ac_status=$?
37956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37957   (exit $ac_status); }; }; then
37958   ac_cv_lib_gmp___gmpz_add_ui=yes
37959 else
37960   echo "$as_me: failed program was:" >&5
37961 sed 's/^/| /' conftest.$ac_ext >&5
37962
37963 ac_cv_lib_gmp___gmpz_add_ui=no
37964 fi
37965 rm -f conftest.err conftest.$ac_objext \
37966       conftest$ac_exeext conftest.$ac_ext
37967 LIBS=$ac_check_lib_save_LIBS
37968 fi
37969 echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
37970 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6
37971 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
37972   cat >>confdefs.h <<_ACEOF
37973 #define HAVE_LIBGMP 1
37974 _ACEOF
37975
37976   LIBS="-lgmp $LIBS"
37977
37978 fi
37979
37980         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
37981
37982 cat >>confdefs.h <<\_ACEOF
37983 #define USE_MP_GMP 1
37984 _ACEOF
37985
37986                 ol_with_mp=gmp
37987         elif test $ol_with_mp = gmp ; then
37988                 { { echo "$as_me:$LINENO: error: gmp not available" >&5
37989 echo "$as_me: error: gmp not available" >&2;}
37990    { (exit 1); exit 1; }; }
37991         fi
37992 fi
37993 if test $ol_with_mp = auto ; then
37994         ol_with_mp=no
37995 fi
37996
37997 echo "$as_me:$LINENO: checking for working memcmp" >&5
37998 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
37999 if test "${ac_cv_func_memcmp_working+set}" = set; then
38000   echo $ECHO_N "(cached) $ECHO_C" >&6
38001 else
38002   if test "$cross_compiling" = yes; then
38003   ac_cv_func_memcmp_working=no
38004 else
38005   cat >conftest.$ac_ext <<_ACEOF
38006 /* confdefs.h.  */
38007 _ACEOF
38008 cat confdefs.h >>conftest.$ac_ext
38009 cat >>conftest.$ac_ext <<_ACEOF
38010 /* end confdefs.h.  */
38011 $ac_includes_default
38012 int
38013 main ()
38014 {
38015
38016   /* Some versions of memcmp are not 8-bit clean.  */
38017   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
38018   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
38019     exit (1);
38020
38021   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
38022      or more and with at least one buffer not starting on a 4-byte boundary.
38023      William Lewis provided this test program.   */
38024   {
38025     char foo[21];
38026     char bar[21];
38027     int i;
38028     for (i = 0; i < 4; i++)
38029       {
38030         char *a = foo + i;
38031         char *b = bar + i;
38032         strcpy (a, "--------01111111");
38033         strcpy (b, "--------10000000");
38034         if (memcmp (a, b, 16) >= 0)
38035           exit (1);
38036       }
38037     exit (0);
38038   }
38039
38040   ;
38041   return 0;
38042 }
38043 _ACEOF
38044 rm -f conftest$ac_exeext
38045 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38046   (eval $ac_link) 2>&5
38047   ac_status=$?
38048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38049   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
38050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38051   (eval $ac_try) 2>&5
38052   ac_status=$?
38053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38054   (exit $ac_status); }; }; then
38055   ac_cv_func_memcmp_working=yes
38056 else
38057   echo "$as_me: program exited with status $ac_status" >&5
38058 echo "$as_me: failed program was:" >&5
38059 sed 's/^/| /' conftest.$ac_ext >&5
38060
38061 ( exit $ac_status )
38062 ac_cv_func_memcmp_working=no
38063 fi
38064 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
38065 fi
38066 fi
38067 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
38068 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
38069 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
38070     "memcmp.$ac_objext"   | \
38071   *" memcmp.$ac_objext"   | \
38072     "memcmp.$ac_objext "* | \
38073   *" memcmp.$ac_objext "* ) ;;
38074   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
38075 esac
38076
38077
38078
38079 if test $ac_cv_func_memcmp_working = no ; then
38080
38081 cat >>confdefs.h <<\_ACEOF
38082 #define NEED_MEMCMP_REPLACEMENT 1
38083 _ACEOF
38084
38085 fi
38086
38087
38088 for ac_func in strftime
38089 do
38090 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
38091 echo "$as_me:$LINENO: checking for $ac_func" >&5
38092 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38093 if eval "test \"\${$as_ac_var+set}\" = set"; then
38094   echo $ECHO_N "(cached) $ECHO_C" >&6
38095 else
38096   cat >conftest.$ac_ext <<_ACEOF
38097 /* confdefs.h.  */
38098 _ACEOF
38099 cat confdefs.h >>conftest.$ac_ext
38100 cat >>conftest.$ac_ext <<_ACEOF
38101 /* end confdefs.h.  */
38102 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38103    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38104 #define $ac_func innocuous_$ac_func
38105
38106 /* System header to define __stub macros and hopefully few prototypes,
38107     which can conflict with char $ac_func (); below.
38108     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38109     <limits.h> exists even on freestanding compilers.  */
38110
38111 #ifdef __STDC__
38112 # include <limits.h>
38113 #else
38114 # include <assert.h>
38115 #endif
38116
38117 #undef $ac_func
38118
38119 /* Override any gcc2 internal prototype to avoid an error.  */
38120 #ifdef __cplusplus
38121 extern "C"
38122 {
38123 #endif
38124 /* We use char because int might match the return type of a gcc2
38125    builtin and then its argument prototype would still apply.  */
38126 char $ac_func ();
38127 /* The GNU C library defines this for functions which it implements
38128     to always fail with ENOSYS.  Some functions are actually named
38129     something starting with __ and the normal name is an alias.  */
38130 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
38131 choke me
38132 #else
38133 char (*f) () = $ac_func;
38134 #endif
38135 #ifdef __cplusplus
38136 }
38137 #endif
38138
38139 int
38140 main ()
38141 {
38142 return f != $ac_func;
38143   ;
38144   return 0;
38145 }
38146 _ACEOF
38147 rm -f conftest.$ac_objext conftest$ac_exeext
38148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38149   (eval $ac_link) 2>conftest.er1
38150   ac_status=$?
38151   grep -v '^ *+' conftest.er1 >conftest.err
38152   rm -f conftest.er1
38153   cat conftest.err >&5
38154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38155   (exit $ac_status); } &&
38156          { ac_try='test -z "$ac_c_werror_flag"
38157                          || test ! -s conftest.err'
38158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38159   (eval $ac_try) 2>&5
38160   ac_status=$?
38161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38162   (exit $ac_status); }; } &&
38163          { ac_try='test -s conftest$ac_exeext'
38164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38165   (eval $ac_try) 2>&5
38166   ac_status=$?
38167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38168   (exit $ac_status); }; }; then
38169   eval "$as_ac_var=yes"
38170 else
38171   echo "$as_me: failed program was:" >&5
38172 sed 's/^/| /' conftest.$ac_ext >&5
38173
38174 eval "$as_ac_var=no"
38175 fi
38176 rm -f conftest.err conftest.$ac_objext \
38177       conftest$ac_exeext conftest.$ac_ext
38178 fi
38179 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
38180 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
38181 if test `eval echo '${'$as_ac_var'}'` = yes; then
38182   cat >>confdefs.h <<_ACEOF
38183 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
38184 _ACEOF
38185
38186 else
38187   # strftime is in -lintl on SCO UNIX.
38188 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
38189 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
38190 if test "${ac_cv_lib_intl_strftime+set}" = set; then
38191   echo $ECHO_N "(cached) $ECHO_C" >&6
38192 else
38193   ac_check_lib_save_LIBS=$LIBS
38194 LIBS="-lintl  $LIBS"
38195 cat >conftest.$ac_ext <<_ACEOF
38196 /* confdefs.h.  */
38197 _ACEOF
38198 cat confdefs.h >>conftest.$ac_ext
38199 cat >>conftest.$ac_ext <<_ACEOF
38200 /* end confdefs.h.  */
38201
38202 /* Override any gcc2 internal prototype to avoid an error.  */
38203 #ifdef __cplusplus
38204 extern "C"
38205 #endif
38206 /* We use char because int might match the return type of a gcc2
38207    builtin and then its argument prototype would still apply.  */
38208 char strftime ();
38209 int
38210 main ()
38211 {
38212 strftime ();
38213   ;
38214   return 0;
38215 }
38216 _ACEOF
38217 rm -f conftest.$ac_objext conftest$ac_exeext
38218 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38219   (eval $ac_link) 2>conftest.er1
38220   ac_status=$?
38221   grep -v '^ *+' conftest.er1 >conftest.err
38222   rm -f conftest.er1
38223   cat conftest.err >&5
38224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38225   (exit $ac_status); } &&
38226          { ac_try='test -z "$ac_c_werror_flag"
38227                          || test ! -s conftest.err'
38228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38229   (eval $ac_try) 2>&5
38230   ac_status=$?
38231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38232   (exit $ac_status); }; } &&
38233          { ac_try='test -s conftest$ac_exeext'
38234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38235   (eval $ac_try) 2>&5
38236   ac_status=$?
38237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38238   (exit $ac_status); }; }; then
38239   ac_cv_lib_intl_strftime=yes
38240 else
38241   echo "$as_me: failed program was:" >&5
38242 sed 's/^/| /' conftest.$ac_ext >&5
38243
38244 ac_cv_lib_intl_strftime=no
38245 fi
38246 rm -f conftest.err conftest.$ac_objext \
38247       conftest$ac_exeext conftest.$ac_ext
38248 LIBS=$ac_check_lib_save_LIBS
38249 fi
38250 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
38251 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
38252 if test $ac_cv_lib_intl_strftime = yes; then
38253   cat >>confdefs.h <<\_ACEOF
38254 #define HAVE_STRFTIME 1
38255 _ACEOF
38256
38257 LIBS="-lintl $LIBS"
38258 fi
38259
38260 fi
38261 done
38262
38263
38264 echo "$as_me:$LINENO: checking for inet_aton()" >&5
38265 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
38266 if test "${ol_cv_func_inet_aton+set}" = set; then
38267   echo $ECHO_N "(cached) $ECHO_C" >&6
38268 else
38269   cat >conftest.$ac_ext <<_ACEOF
38270 /* confdefs.h.  */
38271 _ACEOF
38272 cat confdefs.h >>conftest.$ac_ext
38273 cat >>conftest.$ac_ext <<_ACEOF
38274 /* end confdefs.h.  */
38275
38276 #ifdef HAVE_SYS_TYPES_H
38277 #       include <sys/types.h>
38278 #endif
38279 #ifdef HAVE_SYS_SOCKET_H
38280 #       include <sys/socket.h>
38281 #       ifdef HAVE_SYS_SELECT_H
38282 #               include <sys/select.h>
38283 #       endif
38284 #       include <netinet/in.h>
38285 #       ifdef HAVE_ARPA_INET_H
38286 #               include <arpa/inet.h>
38287 #       endif
38288 #endif
38289
38290 int
38291 main ()
38292 {
38293 struct in_addr in;
38294 int rc = inet_aton( "255.255.255.255", &in );
38295   ;
38296   return 0;
38297 }
38298 _ACEOF
38299 rm -f conftest.$ac_objext conftest$ac_exeext
38300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38301   (eval $ac_link) 2>conftest.er1
38302   ac_status=$?
38303   grep -v '^ *+' conftest.er1 >conftest.err
38304   rm -f conftest.er1
38305   cat conftest.err >&5
38306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38307   (exit $ac_status); } &&
38308          { ac_try='test -z "$ac_c_werror_flag"
38309                          || test ! -s conftest.err'
38310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38311   (eval $ac_try) 2>&5
38312   ac_status=$?
38313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38314   (exit $ac_status); }; } &&
38315          { ac_try='test -s conftest$ac_exeext'
38316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38317   (eval $ac_try) 2>&5
38318   ac_status=$?
38319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38320   (exit $ac_status); }; }; then
38321   ol_cv_func_inet_aton=yes
38322 else
38323   echo "$as_me: failed program was:" >&5
38324 sed 's/^/| /' conftest.$ac_ext >&5
38325
38326 ol_cv_func_inet_aton=no
38327 fi
38328 rm -f conftest.err conftest.$ac_objext \
38329       conftest$ac_exeext conftest.$ac_ext
38330 fi
38331 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
38332 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
38333   if test $ol_cv_func_inet_aton != no; then
38334
38335 cat >>confdefs.h <<\_ACEOF
38336 #define HAVE_INET_ATON 1
38337 _ACEOF
38338
38339   fi
38340
38341
38342 echo "$as_me:$LINENO: checking for _spawnlp" >&5
38343 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
38344 if test "${ac_cv_func__spawnlp+set}" = set; then
38345   echo $ECHO_N "(cached) $ECHO_C" >&6
38346 else
38347   cat >conftest.$ac_ext <<_ACEOF
38348 /* confdefs.h.  */
38349 _ACEOF
38350 cat confdefs.h >>conftest.$ac_ext
38351 cat >>conftest.$ac_ext <<_ACEOF
38352 /* end confdefs.h.  */
38353 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
38354    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38355 #define _spawnlp innocuous__spawnlp
38356
38357 /* System header to define __stub macros and hopefully few prototypes,
38358     which can conflict with char _spawnlp (); below.
38359     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38360     <limits.h> exists even on freestanding compilers.  */
38361
38362 #ifdef __STDC__
38363 # include <limits.h>
38364 #else
38365 # include <assert.h>
38366 #endif
38367
38368 #undef _spawnlp
38369
38370 /* Override any gcc2 internal prototype to avoid an error.  */
38371 #ifdef __cplusplus
38372 extern "C"
38373 {
38374 #endif
38375 /* We use char because int might match the return type of a gcc2
38376    builtin and then its argument prototype would still apply.  */
38377 char _spawnlp ();
38378 /* The GNU C library defines this for functions which it implements
38379     to always fail with ENOSYS.  Some functions are actually named
38380     something starting with __ and the normal name is an alias.  */
38381 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
38382 choke me
38383 #else
38384 char (*f) () = _spawnlp;
38385 #endif
38386 #ifdef __cplusplus
38387 }
38388 #endif
38389
38390 int
38391 main ()
38392 {
38393 return f != _spawnlp;
38394   ;
38395   return 0;
38396 }
38397 _ACEOF
38398 rm -f conftest.$ac_objext conftest$ac_exeext
38399 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38400   (eval $ac_link) 2>conftest.er1
38401   ac_status=$?
38402   grep -v '^ *+' conftest.er1 >conftest.err
38403   rm -f conftest.er1
38404   cat conftest.err >&5
38405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38406   (exit $ac_status); } &&
38407          { ac_try='test -z "$ac_c_werror_flag"
38408                          || test ! -s conftest.err'
38409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38410   (eval $ac_try) 2>&5
38411   ac_status=$?
38412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38413   (exit $ac_status); }; } &&
38414          { ac_try='test -s conftest$ac_exeext'
38415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38416   (eval $ac_try) 2>&5
38417   ac_status=$?
38418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38419   (exit $ac_status); }; }; then
38420   ac_cv_func__spawnlp=yes
38421 else
38422   echo "$as_me: failed program was:" >&5
38423 sed 's/^/| /' conftest.$ac_ext >&5
38424
38425 ac_cv_func__spawnlp=no
38426 fi
38427 rm -f conftest.err conftest.$ac_objext \
38428       conftest$ac_exeext conftest.$ac_ext
38429 fi
38430 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
38431 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
38432 if test $ac_cv_func__spawnlp = yes; then
38433
38434 cat >>confdefs.h <<\_ACEOF
38435 #define HAVE_SPAWNLP 1
38436 _ACEOF
38437
38438 fi
38439
38440
38441 echo "$as_me:$LINENO: checking for _snprintf" >&5
38442 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
38443 if test "${ac_cv_func__snprintf+set}" = set; then
38444   echo $ECHO_N "(cached) $ECHO_C" >&6
38445 else
38446   cat >conftest.$ac_ext <<_ACEOF
38447 /* confdefs.h.  */
38448 _ACEOF
38449 cat confdefs.h >>conftest.$ac_ext
38450 cat >>conftest.$ac_ext <<_ACEOF
38451 /* end confdefs.h.  */
38452 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
38453    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38454 #define _snprintf innocuous__snprintf
38455
38456 /* System header to define __stub macros and hopefully few prototypes,
38457     which can conflict with char _snprintf (); below.
38458     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38459     <limits.h> exists even on freestanding compilers.  */
38460
38461 #ifdef __STDC__
38462 # include <limits.h>
38463 #else
38464 # include <assert.h>
38465 #endif
38466
38467 #undef _snprintf
38468
38469 /* Override any gcc2 internal prototype to avoid an error.  */
38470 #ifdef __cplusplus
38471 extern "C"
38472 {
38473 #endif
38474 /* We use char because int might match the return type of a gcc2
38475    builtin and then its argument prototype would still apply.  */
38476 char _snprintf ();
38477 /* The GNU C library defines this for functions which it implements
38478     to always fail with ENOSYS.  Some functions are actually named
38479     something starting with __ and the normal name is an alias.  */
38480 #if defined (__stub__snprintf) || defined (__stub____snprintf)
38481 choke me
38482 #else
38483 char (*f) () = _snprintf;
38484 #endif
38485 #ifdef __cplusplus
38486 }
38487 #endif
38488
38489 int
38490 main ()
38491 {
38492 return f != _snprintf;
38493   ;
38494   return 0;
38495 }
38496 _ACEOF
38497 rm -f conftest.$ac_objext conftest$ac_exeext
38498 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38499   (eval $ac_link) 2>conftest.er1
38500   ac_status=$?
38501   grep -v '^ *+' conftest.er1 >conftest.err
38502   rm -f conftest.er1
38503   cat conftest.err >&5
38504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38505   (exit $ac_status); } &&
38506          { ac_try='test -z "$ac_c_werror_flag"
38507                          || test ! -s conftest.err'
38508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38509   (eval $ac_try) 2>&5
38510   ac_status=$?
38511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38512   (exit $ac_status); }; } &&
38513          { ac_try='test -s conftest$ac_exeext'
38514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38515   (eval $ac_try) 2>&5
38516   ac_status=$?
38517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38518   (exit $ac_status); }; }; then
38519   ac_cv_func__snprintf=yes
38520 else
38521   echo "$as_me: failed program was:" >&5
38522 sed 's/^/| /' conftest.$ac_ext >&5
38523
38524 ac_cv_func__snprintf=no
38525 fi
38526 rm -f conftest.err conftest.$ac_objext \
38527       conftest$ac_exeext conftest.$ac_ext
38528 fi
38529 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
38530 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
38531 if test $ac_cv_func__snprintf = yes; then
38532   ac_cv_func_snprintf=yes
38533
38534 cat >>confdefs.h <<\_ACEOF
38535 #define snprintf _snprintf
38536 _ACEOF
38537
38538
38539 fi
38540
38541
38542 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
38543 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
38544 if test "${ac_cv_func__vsnprintf+set}" = set; then
38545   echo $ECHO_N "(cached) $ECHO_C" >&6
38546 else
38547   cat >conftest.$ac_ext <<_ACEOF
38548 /* confdefs.h.  */
38549 _ACEOF
38550 cat confdefs.h >>conftest.$ac_ext
38551 cat >>conftest.$ac_ext <<_ACEOF
38552 /* end confdefs.h.  */
38553 /* Define _vsnprintf to an innocuous variant, in case <limits.h> declares _vsnprintf.
38554    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38555 #define _vsnprintf innocuous__vsnprintf
38556
38557 /* System header to define __stub macros and hopefully few prototypes,
38558     which can conflict with char _vsnprintf (); below.
38559     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38560     <limits.h> exists even on freestanding compilers.  */
38561
38562 #ifdef __STDC__
38563 # include <limits.h>
38564 #else
38565 # include <assert.h>
38566 #endif
38567
38568 #undef _vsnprintf
38569
38570 /* Override any gcc2 internal prototype to avoid an error.  */
38571 #ifdef __cplusplus
38572 extern "C"
38573 {
38574 #endif
38575 /* We use char because int might match the return type of a gcc2
38576    builtin and then its argument prototype would still apply.  */
38577 char _vsnprintf ();
38578 /* The GNU C library defines this for functions which it implements
38579     to always fail with ENOSYS.  Some functions are actually named
38580     something starting with __ and the normal name is an alias.  */
38581 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
38582 choke me
38583 #else
38584 char (*f) () = _vsnprintf;
38585 #endif
38586 #ifdef __cplusplus
38587 }
38588 #endif
38589
38590 int
38591 main ()
38592 {
38593 return f != _vsnprintf;
38594   ;
38595   return 0;
38596 }
38597 _ACEOF
38598 rm -f conftest.$ac_objext conftest$ac_exeext
38599 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38600   (eval $ac_link) 2>conftest.er1
38601   ac_status=$?
38602   grep -v '^ *+' conftest.er1 >conftest.err
38603   rm -f conftest.er1
38604   cat conftest.err >&5
38605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38606   (exit $ac_status); } &&
38607          { ac_try='test -z "$ac_c_werror_flag"
38608                          || test ! -s conftest.err'
38609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38610   (eval $ac_try) 2>&5
38611   ac_status=$?
38612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38613   (exit $ac_status); }; } &&
38614          { ac_try='test -s conftest$ac_exeext'
38615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38616   (eval $ac_try) 2>&5
38617   ac_status=$?
38618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38619   (exit $ac_status); }; }; then
38620   ac_cv_func__vsnprintf=yes
38621 else
38622   echo "$as_me: failed program was:" >&5
38623 sed 's/^/| /' conftest.$ac_ext >&5
38624
38625 ac_cv_func__vsnprintf=no
38626 fi
38627 rm -f conftest.err conftest.$ac_objext \
38628       conftest$ac_exeext conftest.$ac_ext
38629 fi
38630 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
38631 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
38632 if test $ac_cv_func__vsnprintf = yes; then
38633   ac_cv_func_vsnprintf=yes
38634
38635 cat >>confdefs.h <<\_ACEOF
38636 #define vsnprintf _vsnprintf
38637 _ACEOF
38638
38639
38640 fi
38641
38642
38643
38644 for ac_func in vprintf
38645 do
38646 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
38647 echo "$as_me:$LINENO: checking for $ac_func" >&5
38648 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38649 if eval "test \"\${$as_ac_var+set}\" = set"; then
38650   echo $ECHO_N "(cached) $ECHO_C" >&6
38651 else
38652   cat >conftest.$ac_ext <<_ACEOF
38653 /* confdefs.h.  */
38654 _ACEOF
38655 cat confdefs.h >>conftest.$ac_ext
38656 cat >>conftest.$ac_ext <<_ACEOF
38657 /* end confdefs.h.  */
38658 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38659    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38660 #define $ac_func innocuous_$ac_func
38661
38662 /* System header to define __stub macros and hopefully few prototypes,
38663     which can conflict with char $ac_func (); below.
38664     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38665     <limits.h> exists even on freestanding compilers.  */
38666
38667 #ifdef __STDC__
38668 # include <limits.h>
38669 #else
38670 # include <assert.h>
38671 #endif
38672
38673 #undef $ac_func
38674
38675 /* Override any gcc2 internal prototype to avoid an error.  */
38676 #ifdef __cplusplus
38677 extern "C"
38678 {
38679 #endif
38680 /* We use char because int might match the return type of a gcc2
38681    builtin and then its argument prototype would still apply.  */
38682 char $ac_func ();
38683 /* The GNU C library defines this for functions which it implements
38684     to always fail with ENOSYS.  Some functions are actually named
38685     something starting with __ and the normal name is an alias.  */
38686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
38687 choke me
38688 #else
38689 char (*f) () = $ac_func;
38690 #endif
38691 #ifdef __cplusplus
38692 }
38693 #endif
38694
38695 int
38696 main ()
38697 {
38698 return f != $ac_func;
38699   ;
38700   return 0;
38701 }
38702 _ACEOF
38703 rm -f conftest.$ac_objext conftest$ac_exeext
38704 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38705   (eval $ac_link) 2>conftest.er1
38706   ac_status=$?
38707   grep -v '^ *+' conftest.er1 >conftest.err
38708   rm -f conftest.er1
38709   cat conftest.err >&5
38710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38711   (exit $ac_status); } &&
38712          { ac_try='test -z "$ac_c_werror_flag"
38713                          || test ! -s conftest.err'
38714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38715   (eval $ac_try) 2>&5
38716   ac_status=$?
38717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38718   (exit $ac_status); }; } &&
38719          { ac_try='test -s conftest$ac_exeext'
38720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38721   (eval $ac_try) 2>&5
38722   ac_status=$?
38723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38724   (exit $ac_status); }; }; then
38725   eval "$as_ac_var=yes"
38726 else
38727   echo "$as_me: failed program was:" >&5
38728 sed 's/^/| /' conftest.$ac_ext >&5
38729
38730 eval "$as_ac_var=no"
38731 fi
38732 rm -f conftest.err conftest.$ac_objext \
38733       conftest$ac_exeext conftest.$ac_ext
38734 fi
38735 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
38736 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
38737 if test `eval echo '${'$as_ac_var'}'` = yes; then
38738   cat >>confdefs.h <<_ACEOF
38739 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
38740 _ACEOF
38741
38742 echo "$as_me:$LINENO: checking for _doprnt" >&5
38743 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
38744 if test "${ac_cv_func__doprnt+set}" = set; then
38745   echo $ECHO_N "(cached) $ECHO_C" >&6
38746 else
38747   cat >conftest.$ac_ext <<_ACEOF
38748 /* confdefs.h.  */
38749 _ACEOF
38750 cat confdefs.h >>conftest.$ac_ext
38751 cat >>conftest.$ac_ext <<_ACEOF
38752 /* end confdefs.h.  */
38753 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
38754    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38755 #define _doprnt innocuous__doprnt
38756
38757 /* System header to define __stub macros and hopefully few prototypes,
38758     which can conflict with char _doprnt (); below.
38759     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38760     <limits.h> exists even on freestanding compilers.  */
38761
38762 #ifdef __STDC__
38763 # include <limits.h>
38764 #else
38765 # include <assert.h>
38766 #endif
38767
38768 #undef _doprnt
38769
38770 /* Override any gcc2 internal prototype to avoid an error.  */
38771 #ifdef __cplusplus
38772 extern "C"
38773 {
38774 #endif
38775 /* We use char because int might match the return type of a gcc2
38776    builtin and then its argument prototype would still apply.  */
38777 char _doprnt ();
38778 /* The GNU C library defines this for functions which it implements
38779     to always fail with ENOSYS.  Some functions are actually named
38780     something starting with __ and the normal name is an alias.  */
38781 #if defined (__stub__doprnt) || defined (__stub____doprnt)
38782 choke me
38783 #else
38784 char (*f) () = _doprnt;
38785 #endif
38786 #ifdef __cplusplus
38787 }
38788 #endif
38789
38790 int
38791 main ()
38792 {
38793 return f != _doprnt;
38794   ;
38795   return 0;
38796 }
38797 _ACEOF
38798 rm -f conftest.$ac_objext conftest$ac_exeext
38799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38800   (eval $ac_link) 2>conftest.er1
38801   ac_status=$?
38802   grep -v '^ *+' conftest.er1 >conftest.err
38803   rm -f conftest.er1
38804   cat conftest.err >&5
38805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38806   (exit $ac_status); } &&
38807          { ac_try='test -z "$ac_c_werror_flag"
38808                          || test ! -s conftest.err'
38809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38810   (eval $ac_try) 2>&5
38811   ac_status=$?
38812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38813   (exit $ac_status); }; } &&
38814          { ac_try='test -s conftest$ac_exeext'
38815   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38816   (eval $ac_try) 2>&5
38817   ac_status=$?
38818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38819   (exit $ac_status); }; }; then
38820   ac_cv_func__doprnt=yes
38821 else
38822   echo "$as_me: failed program was:" >&5
38823 sed 's/^/| /' conftest.$ac_ext >&5
38824
38825 ac_cv_func__doprnt=no
38826 fi
38827 rm -f conftest.err conftest.$ac_objext \
38828       conftest$ac_exeext conftest.$ac_ext
38829 fi
38830 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
38831 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
38832 if test $ac_cv_func__doprnt = yes; then
38833
38834 cat >>confdefs.h <<\_ACEOF
38835 #define HAVE_DOPRNT 1
38836 _ACEOF
38837
38838 fi
38839
38840 fi
38841 done
38842
38843
38844
38845 if test $ac_cv_func_vprintf = yes ; then
38846
38847
38848 for ac_func in snprintf vsnprintf
38849 do
38850 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
38851 echo "$as_me:$LINENO: checking for $ac_func" >&5
38852 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
38853 if eval "test \"\${$as_ac_var+set}\" = set"; then
38854   echo $ECHO_N "(cached) $ECHO_C" >&6
38855 else
38856   cat >conftest.$ac_ext <<_ACEOF
38857 /* confdefs.h.  */
38858 _ACEOF
38859 cat confdefs.h >>conftest.$ac_ext
38860 cat >>conftest.$ac_ext <<_ACEOF
38861 /* end confdefs.h.  */
38862 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
38863    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
38864 #define $ac_func innocuous_$ac_func
38865
38866 /* System header to define __stub macros and hopefully few prototypes,
38867     which can conflict with char $ac_func (); below.
38868     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
38869     <limits.h> exists even on freestanding compilers.  */
38870
38871 #ifdef __STDC__
38872 # include <limits.h>
38873 #else
38874 # include <assert.h>
38875 #endif
38876
38877 #undef $ac_func
38878
38879 /* Override any gcc2 internal prototype to avoid an error.  */
38880 #ifdef __cplusplus
38881 extern "C"
38882 {
38883 #endif
38884 /* We use char because int might match the return type of a gcc2
38885    builtin and then its argument prototype would still apply.  */
38886 char $ac_func ();
38887 /* The GNU C library defines this for functions which it implements
38888     to always fail with ENOSYS.  Some functions are actually named
38889     something starting with __ and the normal name is an alias.  */
38890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
38891 choke me
38892 #else
38893 char (*f) () = $ac_func;
38894 #endif
38895 #ifdef __cplusplus
38896 }
38897 #endif
38898
38899 int
38900 main ()
38901 {
38902 return f != $ac_func;
38903   ;
38904   return 0;
38905 }
38906 _ACEOF
38907 rm -f conftest.$ac_objext conftest$ac_exeext
38908 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
38909   (eval $ac_link) 2>conftest.er1
38910   ac_status=$?
38911   grep -v '^ *+' conftest.er1 >conftest.err
38912   rm -f conftest.er1
38913   cat conftest.err >&5
38914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38915   (exit $ac_status); } &&
38916          { ac_try='test -z "$ac_c_werror_flag"
38917                          || test ! -s conftest.err'
38918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38919   (eval $ac_try) 2>&5
38920   ac_status=$?
38921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38922   (exit $ac_status); }; } &&
38923          { ac_try='test -s conftest$ac_exeext'
38924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38925   (eval $ac_try) 2>&5
38926   ac_status=$?
38927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38928   (exit $ac_status); }; }; then
38929   eval "$as_ac_var=yes"
38930 else
38931   echo "$as_me: failed program was:" >&5
38932 sed 's/^/| /' conftest.$ac_ext >&5
38933
38934 eval "$as_ac_var=no"
38935 fi
38936 rm -f conftest.err conftest.$ac_objext \
38937       conftest$ac_exeext conftest.$ac_ext
38938 fi
38939 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
38940 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
38941 if test `eval echo '${'$as_ac_var'}'` = yes; then
38942   cat >>confdefs.h <<_ACEOF
38943 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
38944 _ACEOF
38945
38946 fi
38947 done
38948
38949 fi
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006 for ac_func in \
39007         bcopy                   \
39008         closesocket             \
39009         chroot                  \
39010         endgrent                \
39011         endpwent                \
39012         fcntl                   \
39013         flock                   \
39014         fstat                   \
39015         getdtablesize           \
39016         getgrgid                \
39017         gethostname             \
39018         getpass                 \
39019         getpassphrase           \
39020         getpwuid                \
39021         getpwnam                \
39022         getspnam                \
39023         gettimeofday            \
39024         initgroups              \
39025         inet_ntoa_b             \
39026         ioctl                   \
39027         lockf                   \
39028         memcpy                  \
39029         memmove                 \
39030         memrchr                 \
39031         mkstemp                 \
39032         mktemp                  \
39033         pipe                    \
39034         read                    \
39035         recv                    \
39036         recvfrom                \
39037         setpwfile               \
39038         setgid                  \
39039         setegid                 \
39040         setsid                  \
39041         setuid                  \
39042         seteuid                 \
39043         signal                  \
39044         strdup                  \
39045         strpbrk                 \
39046         strrchr                 \
39047         strsep                  \
39048         strstr                  \
39049         strtol                  \
39050         strtoul                 \
39051         strtoq                  \
39052         strtouq                 \
39053         strtoll                 \
39054         strspn                  \
39055         sysconf                 \
39056         waitpid                 \
39057         wait4                   \
39058         write                   \
39059         send                    \
39060         sendmsg                 \
39061         sendto                  \
39062
39063 do
39064 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
39065 echo "$as_me:$LINENO: checking for $ac_func" >&5
39066 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
39067 if eval "test \"\${$as_ac_var+set}\" = set"; then
39068   echo $ECHO_N "(cached) $ECHO_C" >&6
39069 else
39070   cat >conftest.$ac_ext <<_ACEOF
39071 /* confdefs.h.  */
39072 _ACEOF
39073 cat confdefs.h >>conftest.$ac_ext
39074 cat >>conftest.$ac_ext <<_ACEOF
39075 /* end confdefs.h.  */
39076 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
39077    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
39078 #define $ac_func innocuous_$ac_func
39079
39080 /* System header to define __stub macros and hopefully few prototypes,
39081     which can conflict with char $ac_func (); below.
39082     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
39083     <limits.h> exists even on freestanding compilers.  */
39084
39085 #ifdef __STDC__
39086 # include <limits.h>
39087 #else
39088 # include <assert.h>
39089 #endif
39090
39091 #undef $ac_func
39092
39093 /* Override any gcc2 internal prototype to avoid an error.  */
39094 #ifdef __cplusplus
39095 extern "C"
39096 {
39097 #endif
39098 /* We use char because int might match the return type of a gcc2
39099    builtin and then its argument prototype would still apply.  */
39100 char $ac_func ();
39101 /* The GNU C library defines this for functions which it implements
39102     to always fail with ENOSYS.  Some functions are actually named
39103     something starting with __ and the normal name is an alias.  */
39104 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
39105 choke me
39106 #else
39107 char (*f) () = $ac_func;
39108 #endif
39109 #ifdef __cplusplus
39110 }
39111 #endif
39112
39113 int
39114 main ()
39115 {
39116 return f != $ac_func;
39117   ;
39118   return 0;
39119 }
39120 _ACEOF
39121 rm -f conftest.$ac_objext conftest$ac_exeext
39122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39123   (eval $ac_link) 2>conftest.er1
39124   ac_status=$?
39125   grep -v '^ *+' conftest.er1 >conftest.err
39126   rm -f conftest.er1
39127   cat conftest.err >&5
39128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39129   (exit $ac_status); } &&
39130          { ac_try='test -z "$ac_c_werror_flag"
39131                          || test ! -s conftest.err'
39132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39133   (eval $ac_try) 2>&5
39134   ac_status=$?
39135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39136   (exit $ac_status); }; } &&
39137          { ac_try='test -s conftest$ac_exeext'
39138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39139   (eval $ac_try) 2>&5
39140   ac_status=$?
39141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39142   (exit $ac_status); }; }; then
39143   eval "$as_ac_var=yes"
39144 else
39145   echo "$as_me: failed program was:" >&5
39146 sed 's/^/| /' conftest.$ac_ext >&5
39147
39148 eval "$as_ac_var=no"
39149 fi
39150 rm -f conftest.err conftest.$ac_objext \
39151       conftest$ac_exeext conftest.$ac_ext
39152 fi
39153 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
39154 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
39155 if test `eval echo '${'$as_ac_var'}'` = yes; then
39156   cat >>confdefs.h <<_ACEOF
39157 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
39158 _ACEOF
39159
39160 fi
39161 done
39162
39163
39164
39165
39166 for ac_func in getopt getpeereid
39167 do
39168 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
39169 echo "$as_me:$LINENO: checking for $ac_func" >&5
39170 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
39171 if eval "test \"\${$as_ac_var+set}\" = set"; then
39172   echo $ECHO_N "(cached) $ECHO_C" >&6
39173 else
39174   cat >conftest.$ac_ext <<_ACEOF
39175 /* confdefs.h.  */
39176 _ACEOF
39177 cat confdefs.h >>conftest.$ac_ext
39178 cat >>conftest.$ac_ext <<_ACEOF
39179 /* end confdefs.h.  */
39180 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
39181    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
39182 #define $ac_func innocuous_$ac_func
39183
39184 /* System header to define __stub macros and hopefully few prototypes,
39185     which can conflict with char $ac_func (); below.
39186     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
39187     <limits.h> exists even on freestanding compilers.  */
39188
39189 #ifdef __STDC__
39190 # include <limits.h>
39191 #else
39192 # include <assert.h>
39193 #endif
39194
39195 #undef $ac_func
39196
39197 /* Override any gcc2 internal prototype to avoid an error.  */
39198 #ifdef __cplusplus
39199 extern "C"
39200 {
39201 #endif
39202 /* We use char because int might match the return type of a gcc2
39203    builtin and then its argument prototype would still apply.  */
39204 char $ac_func ();
39205 /* The GNU C library defines this for functions which it implements
39206     to always fail with ENOSYS.  Some functions are actually named
39207     something starting with __ and the normal name is an alias.  */
39208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
39209 choke me
39210 #else
39211 char (*f) () = $ac_func;
39212 #endif
39213 #ifdef __cplusplus
39214 }
39215 #endif
39216
39217 int
39218 main ()
39219 {
39220 return f != $ac_func;
39221   ;
39222   return 0;
39223 }
39224 _ACEOF
39225 rm -f conftest.$ac_objext conftest$ac_exeext
39226 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39227   (eval $ac_link) 2>conftest.er1
39228   ac_status=$?
39229   grep -v '^ *+' conftest.er1 >conftest.err
39230   rm -f conftest.er1
39231   cat conftest.err >&5
39232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39233   (exit $ac_status); } &&
39234          { ac_try='test -z "$ac_c_werror_flag"
39235                          || test ! -s conftest.err'
39236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39237   (eval $ac_try) 2>&5
39238   ac_status=$?
39239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39240   (exit $ac_status); }; } &&
39241          { ac_try='test -s conftest$ac_exeext'
39242   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39243   (eval $ac_try) 2>&5
39244   ac_status=$?
39245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39246   (exit $ac_status); }; }; then
39247   eval "$as_ac_var=yes"
39248 else
39249   echo "$as_me: failed program was:" >&5
39250 sed 's/^/| /' conftest.$ac_ext >&5
39251
39252 eval "$as_ac_var=no"
39253 fi
39254 rm -f conftest.err conftest.$ac_objext \
39255       conftest$ac_exeext conftest.$ac_ext
39256 fi
39257 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
39258 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
39259 if test `eval echo '${'$as_ac_var'}'` = yes; then
39260   cat >>confdefs.h <<_ACEOF
39261 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
39262 _ACEOF
39263
39264 else
39265   case $LIBOBJS in
39266     "$ac_func.$ac_objext"   | \
39267   *" $ac_func.$ac_objext"   | \
39268     "$ac_func.$ac_objext "* | \
39269   *" $ac_func.$ac_objext "* ) ;;
39270   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
39271 esac
39272
39273 fi
39274 done
39275
39276
39277
39278 if test "$ac_cv_func_getopt" != yes; then
39279         LIBSRCS="$LIBSRCS getopt.c"
39280 fi
39281
39282 if test "$ac_cv_func_getpeereid" != yes; then
39283
39284 for ac_func in getpeerucred
39285 do
39286 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
39287 echo "$as_me:$LINENO: checking for $ac_func" >&5
39288 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
39289 if eval "test \"\${$as_ac_var+set}\" = set"; then
39290   echo $ECHO_N "(cached) $ECHO_C" >&6
39291 else
39292   cat >conftest.$ac_ext <<_ACEOF
39293 /* confdefs.h.  */
39294 _ACEOF
39295 cat confdefs.h >>conftest.$ac_ext
39296 cat >>conftest.$ac_ext <<_ACEOF
39297 /* end confdefs.h.  */
39298 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
39299    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
39300 #define $ac_func innocuous_$ac_func
39301
39302 /* System header to define __stub macros and hopefully few prototypes,
39303     which can conflict with char $ac_func (); below.
39304     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
39305     <limits.h> exists even on freestanding compilers.  */
39306
39307 #ifdef __STDC__
39308 # include <limits.h>
39309 #else
39310 # include <assert.h>
39311 #endif
39312
39313 #undef $ac_func
39314
39315 /* Override any gcc2 internal prototype to avoid an error.  */
39316 #ifdef __cplusplus
39317 extern "C"
39318 {
39319 #endif
39320 /* We use char because int might match the return type of a gcc2
39321    builtin and then its argument prototype would still apply.  */
39322 char $ac_func ();
39323 /* The GNU C library defines this for functions which it implements
39324     to always fail with ENOSYS.  Some functions are actually named
39325     something starting with __ and the normal name is an alias.  */
39326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
39327 choke me
39328 #else
39329 char (*f) () = $ac_func;
39330 #endif
39331 #ifdef __cplusplus
39332 }
39333 #endif
39334
39335 int
39336 main ()
39337 {
39338 return f != $ac_func;
39339   ;
39340   return 0;
39341 }
39342 _ACEOF
39343 rm -f conftest.$ac_objext conftest$ac_exeext
39344 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
39345   (eval $ac_link) 2>conftest.er1
39346   ac_status=$?
39347   grep -v '^ *+' conftest.er1 >conftest.err
39348   rm -f conftest.er1
39349   cat conftest.err >&5
39350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39351   (exit $ac_status); } &&
39352          { ac_try='test -z "$ac_c_werror_flag"
39353                          || test ! -s conftest.err'
39354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39355   (eval $ac_try) 2>&5
39356   ac_status=$?
39357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39358   (exit $ac_status); }; } &&
39359          { ac_try='test -s conftest$ac_exeext'
39360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39361   (eval $ac_try) 2>&5
39362   ac_status=$?
39363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39364   (exit $ac_status); }; }; then
39365   eval "$as_ac_var=yes"
39366 else
39367   echo "$as_me: failed program was:" >&5
39368 sed 's/^/| /' conftest.$ac_ext >&5
39369
39370 eval "$as_ac_var=no"
39371 fi
39372 rm -f conftest.err conftest.$ac_objext \
39373       conftest$ac_exeext conftest.$ac_ext
39374 fi
39375 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
39376 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
39377 if test `eval echo '${'$as_ac_var'}'` = yes; then
39378   cat >>confdefs.h <<_ACEOF
39379 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
39380 _ACEOF
39381
39382 fi
39383 done
39384
39385         if test "$ac_cv_func_getpeerucred" != yes ; then
39386                 echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
39387 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6
39388 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
39389   echo $ECHO_N "(cached) $ECHO_C" >&6
39390 else
39391   cat >conftest.$ac_ext <<_ACEOF
39392 /* confdefs.h.  */
39393 _ACEOF
39394 cat confdefs.h >>conftest.$ac_ext
39395 cat >>conftest.$ac_ext <<_ACEOF
39396 /* end confdefs.h.  */
39397 $ac_includes_default
39398 #ifdef HAVE_SYS_SOCKET_H
39399 #include <sys/socket.h>
39400 #endif
39401
39402 int
39403 main ()
39404 {
39405 static struct msghdr ac_aggr;
39406 if (ac_aggr.msg_accrightslen)
39407 return 0;
39408   ;
39409   return 0;
39410 }
39411 _ACEOF
39412 rm -f conftest.$ac_objext
39413 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39414   (eval $ac_compile) 2>conftest.er1
39415   ac_status=$?
39416   grep -v '^ *+' conftest.er1 >conftest.err
39417   rm -f conftest.er1
39418   cat conftest.err >&5
39419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39420   (exit $ac_status); } &&
39421          { ac_try='test -z "$ac_c_werror_flag"
39422                          || test ! -s conftest.err'
39423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39424   (eval $ac_try) 2>&5
39425   ac_status=$?
39426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39427   (exit $ac_status); }; } &&
39428          { ac_try='test -s conftest.$ac_objext'
39429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39430   (eval $ac_try) 2>&5
39431   ac_status=$?
39432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39433   (exit $ac_status); }; }; then
39434   ac_cv_member_struct_msghdr_msg_accrightslen=yes
39435 else
39436   echo "$as_me: failed program was:" >&5
39437 sed 's/^/| /' conftest.$ac_ext >&5
39438
39439 cat >conftest.$ac_ext <<_ACEOF
39440 /* confdefs.h.  */
39441 _ACEOF
39442 cat confdefs.h >>conftest.$ac_ext
39443 cat >>conftest.$ac_ext <<_ACEOF
39444 /* end confdefs.h.  */
39445 $ac_includes_default
39446 #ifdef HAVE_SYS_SOCKET_H
39447 #include <sys/socket.h>
39448 #endif
39449
39450 int
39451 main ()
39452 {
39453 static struct msghdr ac_aggr;
39454 if (sizeof ac_aggr.msg_accrightslen)
39455 return 0;
39456   ;
39457   return 0;
39458 }
39459 _ACEOF
39460 rm -f conftest.$ac_objext
39461 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39462   (eval $ac_compile) 2>conftest.er1
39463   ac_status=$?
39464   grep -v '^ *+' conftest.er1 >conftest.err
39465   rm -f conftest.er1
39466   cat conftest.err >&5
39467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39468   (exit $ac_status); } &&
39469          { ac_try='test -z "$ac_c_werror_flag"
39470                          || test ! -s conftest.err'
39471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39472   (eval $ac_try) 2>&5
39473   ac_status=$?
39474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39475   (exit $ac_status); }; } &&
39476          { ac_try='test -s conftest.$ac_objext'
39477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39478   (eval $ac_try) 2>&5
39479   ac_status=$?
39480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39481   (exit $ac_status); }; }; then
39482   ac_cv_member_struct_msghdr_msg_accrightslen=yes
39483 else
39484   echo "$as_me: failed program was:" >&5
39485 sed 's/^/| /' conftest.$ac_ext >&5
39486
39487 ac_cv_member_struct_msghdr_msg_accrightslen=no
39488 fi
39489 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39490 fi
39491 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39492 fi
39493 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
39494 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6
39495 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
39496
39497 cat >>confdefs.h <<_ACEOF
39498 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
39499 _ACEOF
39500
39501
39502 fi
39503
39504                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
39505                         echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
39506 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
39507 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
39508   echo $ECHO_N "(cached) $ECHO_C" >&6
39509 else
39510   cat >conftest.$ac_ext <<_ACEOF
39511 /* confdefs.h.  */
39512 _ACEOF
39513 cat confdefs.h >>conftest.$ac_ext
39514 cat >>conftest.$ac_ext <<_ACEOF
39515 /* end confdefs.h.  */
39516 $ac_includes_default
39517 #ifdef HAVE_SYS_SOCKET_H
39518 #include <sys/socket.h>
39519 #endif
39520
39521 int
39522 main ()
39523 {
39524 static struct msghdr ac_aggr;
39525 if (ac_aggr.msg_control)
39526 return 0;
39527   ;
39528   return 0;
39529 }
39530 _ACEOF
39531 rm -f conftest.$ac_objext
39532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39533   (eval $ac_compile) 2>conftest.er1
39534   ac_status=$?
39535   grep -v '^ *+' conftest.er1 >conftest.err
39536   rm -f conftest.er1
39537   cat conftest.err >&5
39538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39539   (exit $ac_status); } &&
39540          { ac_try='test -z "$ac_c_werror_flag"
39541                          || test ! -s conftest.err'
39542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39543   (eval $ac_try) 2>&5
39544   ac_status=$?
39545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39546   (exit $ac_status); }; } &&
39547          { ac_try='test -s conftest.$ac_objext'
39548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39549   (eval $ac_try) 2>&5
39550   ac_status=$?
39551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39552   (exit $ac_status); }; }; then
39553   ac_cv_member_struct_msghdr_msg_control=yes
39554 else
39555   echo "$as_me: failed program was:" >&5
39556 sed 's/^/| /' conftest.$ac_ext >&5
39557
39558 cat >conftest.$ac_ext <<_ACEOF
39559 /* confdefs.h.  */
39560 _ACEOF
39561 cat confdefs.h >>conftest.$ac_ext
39562 cat >>conftest.$ac_ext <<_ACEOF
39563 /* end confdefs.h.  */
39564 $ac_includes_default
39565 #ifdef HAVE_SYS_SOCKET_H
39566 #include <sys/socket.h>
39567 #endif
39568
39569 int
39570 main ()
39571 {
39572 static struct msghdr ac_aggr;
39573 if (sizeof ac_aggr.msg_control)
39574 return 0;
39575   ;
39576   return 0;
39577 }
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_cv_member_struct_msghdr_msg_control=yes
39602 else
39603   echo "$as_me: failed program was:" >&5
39604 sed 's/^/| /' conftest.$ac_ext >&5
39605
39606 ac_cv_member_struct_msghdr_msg_control=no
39607 fi
39608 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39609 fi
39610 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39611 fi
39612 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
39613 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
39614 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
39615
39616 cat >>confdefs.h <<_ACEOF
39617 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
39618 _ACEOF
39619
39620
39621 fi
39622
39623                 fi
39624                 echo "$as_me:$LINENO: checking for struct stat.st_fstype" >&5
39625 echo $ECHO_N "checking for struct stat.st_fstype... $ECHO_C" >&6
39626 if test "${ac_cv_member_struct_stat_st_fstype+set}" = set; then
39627   echo $ECHO_N "(cached) $ECHO_C" >&6
39628 else
39629   cat >conftest.$ac_ext <<_ACEOF
39630 /* confdefs.h.  */
39631 _ACEOF
39632 cat confdefs.h >>conftest.$ac_ext
39633 cat >>conftest.$ac_ext <<_ACEOF
39634 /* end confdefs.h.  */
39635 $ac_includes_default
39636 int
39637 main ()
39638 {
39639 static struct stat ac_aggr;
39640 if (ac_aggr.st_fstype)
39641 return 0;
39642   ;
39643   return 0;
39644 }
39645 _ACEOF
39646 rm -f conftest.$ac_objext
39647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39648   (eval $ac_compile) 2>conftest.er1
39649   ac_status=$?
39650   grep -v '^ *+' conftest.er1 >conftest.err
39651   rm -f conftest.er1
39652   cat conftest.err >&5
39653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39654   (exit $ac_status); } &&
39655          { ac_try='test -z "$ac_c_werror_flag"
39656                          || test ! -s conftest.err'
39657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39658   (eval $ac_try) 2>&5
39659   ac_status=$?
39660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39661   (exit $ac_status); }; } &&
39662          { ac_try='test -s conftest.$ac_objext'
39663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39664   (eval $ac_try) 2>&5
39665   ac_status=$?
39666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39667   (exit $ac_status); }; }; then
39668   ac_cv_member_struct_stat_st_fstype=yes
39669 else
39670   echo "$as_me: failed program was:" >&5
39671 sed 's/^/| /' conftest.$ac_ext >&5
39672
39673 cat >conftest.$ac_ext <<_ACEOF
39674 /* confdefs.h.  */
39675 _ACEOF
39676 cat confdefs.h >>conftest.$ac_ext
39677 cat >>conftest.$ac_ext <<_ACEOF
39678 /* end confdefs.h.  */
39679 $ac_includes_default
39680 int
39681 main ()
39682 {
39683 static struct stat ac_aggr;
39684 if (sizeof ac_aggr.st_fstype)
39685 return 0;
39686   ;
39687   return 0;
39688 }
39689 _ACEOF
39690 rm -f conftest.$ac_objext
39691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39692   (eval $ac_compile) 2>conftest.er1
39693   ac_status=$?
39694   grep -v '^ *+' conftest.er1 >conftest.err
39695   rm -f conftest.er1
39696   cat conftest.err >&5
39697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39698   (exit $ac_status); } &&
39699          { ac_try='test -z "$ac_c_werror_flag"
39700                          || test ! -s conftest.err'
39701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39702   (eval $ac_try) 2>&5
39703   ac_status=$?
39704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39705   (exit $ac_status); }; } &&
39706          { ac_try='test -s conftest.$ac_objext'
39707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39708   (eval $ac_try) 2>&5
39709   ac_status=$?
39710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39711   (exit $ac_status); }; }; then
39712   ac_cv_member_struct_stat_st_fstype=yes
39713 else
39714   echo "$as_me: failed program was:" >&5
39715 sed 's/^/| /' conftest.$ac_ext >&5
39716
39717 ac_cv_member_struct_stat_st_fstype=no
39718 fi
39719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39720 fi
39721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39722 fi
39723 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_fstype" >&5
39724 echo "${ECHO_T}$ac_cv_member_struct_stat_st_fstype" >&6
39725 if test $ac_cv_member_struct_stat_st_fstype = yes; then
39726
39727 cat >>confdefs.h <<_ACEOF
39728 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
39729 _ACEOF
39730
39731
39732 fi
39733 echo "$as_me:$LINENO: checking for struct stat.st_vfstype" >&5
39734 echo $ECHO_N "checking for struct stat.st_vfstype... $ECHO_C" >&6
39735 if test "${ac_cv_member_struct_stat_st_vfstype+set}" = set; then
39736   echo $ECHO_N "(cached) $ECHO_C" >&6
39737 else
39738   cat >conftest.$ac_ext <<_ACEOF
39739 /* confdefs.h.  */
39740 _ACEOF
39741 cat confdefs.h >>conftest.$ac_ext
39742 cat >>conftest.$ac_ext <<_ACEOF
39743 /* end confdefs.h.  */
39744 $ac_includes_default
39745 int
39746 main ()
39747 {
39748 static struct stat ac_aggr;
39749 if (ac_aggr.st_vfstype)
39750 return 0;
39751   ;
39752   return 0;
39753 }
39754 _ACEOF
39755 rm -f conftest.$ac_objext
39756 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39757   (eval $ac_compile) 2>conftest.er1
39758   ac_status=$?
39759   grep -v '^ *+' conftest.er1 >conftest.err
39760   rm -f conftest.er1
39761   cat conftest.err >&5
39762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39763   (exit $ac_status); } &&
39764          { ac_try='test -z "$ac_c_werror_flag"
39765                          || test ! -s conftest.err'
39766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39767   (eval $ac_try) 2>&5
39768   ac_status=$?
39769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39770   (exit $ac_status); }; } &&
39771          { ac_try='test -s conftest.$ac_objext'
39772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39773   (eval $ac_try) 2>&5
39774   ac_status=$?
39775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39776   (exit $ac_status); }; }; then
39777   ac_cv_member_struct_stat_st_vfstype=yes
39778 else
39779   echo "$as_me: failed program was:" >&5
39780 sed 's/^/| /' conftest.$ac_ext >&5
39781
39782 cat >conftest.$ac_ext <<_ACEOF
39783 /* confdefs.h.  */
39784 _ACEOF
39785 cat confdefs.h >>conftest.$ac_ext
39786 cat >>conftest.$ac_ext <<_ACEOF
39787 /* end confdefs.h.  */
39788 $ac_includes_default
39789 int
39790 main ()
39791 {
39792 static struct stat ac_aggr;
39793 if (sizeof ac_aggr.st_vfstype)
39794 return 0;
39795   ;
39796   return 0;
39797 }
39798 _ACEOF
39799 rm -f conftest.$ac_objext
39800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39801   (eval $ac_compile) 2>conftest.er1
39802   ac_status=$?
39803   grep -v '^ *+' conftest.er1 >conftest.err
39804   rm -f conftest.er1
39805   cat conftest.err >&5
39806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39807   (exit $ac_status); } &&
39808          { ac_try='test -z "$ac_c_werror_flag"
39809                          || test ! -s conftest.err'
39810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39811   (eval $ac_try) 2>&5
39812   ac_status=$?
39813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39814   (exit $ac_status); }; } &&
39815          { ac_try='test -s conftest.$ac_objext'
39816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39817   (eval $ac_try) 2>&5
39818   ac_status=$?
39819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39820   (exit $ac_status); }; }; then
39821   ac_cv_member_struct_stat_st_vfstype=yes
39822 else
39823   echo "$as_me: failed program was:" >&5
39824 sed 's/^/| /' conftest.$ac_ext >&5
39825
39826 ac_cv_member_struct_stat_st_vfstype=no
39827 fi
39828 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39829 fi
39830 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39831 fi
39832 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_vfstype" >&5
39833 echo "${ECHO_T}$ac_cv_member_struct_stat_st_vfstype" >&6
39834 if test $ac_cv_member_struct_stat_st_vfstype = yes; then
39835
39836 cat >>confdefs.h <<_ACEOF
39837 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
39838 _ACEOF
39839
39840
39841 fi
39842
39843                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
39844                         cat >conftest.$ac_ext <<_ACEOF
39845 struct stat st; char *ptr=st.st_fstype;
39846 _ACEOF
39847 rm -f conftest.$ac_objext
39848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39849   (eval $ac_compile) 2>conftest.er1
39850   ac_status=$?
39851   grep -v '^ *+' conftest.er1 >conftest.err
39852   rm -f conftest.er1
39853   cat conftest.err >&5
39854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39855   (exit $ac_status); } &&
39856          { ac_try='test -z "$ac_c_werror_flag"
39857                          || test ! -s conftest.err'
39858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39859   (eval $ac_try) 2>&5
39860   ac_status=$?
39861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39862   (exit $ac_status); }; } &&
39863          { ac_try='test -s conftest.$ac_objext'
39864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39865   (eval $ac_try) 2>&5
39866   ac_status=$?
39867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39868   (exit $ac_status); }; }; then
39869
39870 cat >>confdefs.h <<\_ACEOF
39871 #define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1
39872 _ACEOF
39873
39874 else
39875   echo "$as_me: failed program was:" >&5
39876 sed 's/^/| /' conftest.$ac_ext >&5
39877
39878
39879 cat >>confdefs.h <<\_ACEOF
39880 #define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1
39881 _ACEOF
39882
39883 fi
39884 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39885                 fi
39886         fi
39887         LIBSRCS="$LIBSRCS getpeereid.c"
39888 fi
39889
39890 if test "$ac_cv_func_snprintf" != yes ||
39891    test "$ac_cv_func_vsnprintf" != yes; then
39892         if test "$ac_cv_func_snprintf" != yes; then
39893
39894 cat >>confdefs.h <<\_ACEOF
39895 #define snprintf ber_pvt_snprintf
39896 _ACEOF
39897
39898         fi
39899         if test "$ac_cv_func_vsnprintf" != yes; then
39900
39901 cat >>confdefs.h <<\_ACEOF
39902 #define vsnprintf ber_pvt_vsnprintf
39903 _ACEOF
39904
39905         fi
39906 fi
39907
39908
39909 if test "$ol_enable_slapi" != no ; then
39910
39911 for ac_header in ltdl.h
39912 do
39913 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
39914 if eval "test \"\${$as_ac_Header+set}\" = set"; then
39915   echo "$as_me:$LINENO: checking for $ac_header" >&5
39916 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
39917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
39918   echo $ECHO_N "(cached) $ECHO_C" >&6
39919 fi
39920 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
39921 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
39922 else
39923   # Is the header compilable?
39924 echo "$as_me:$LINENO: checking $ac_header usability" >&5
39925 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
39926 cat >conftest.$ac_ext <<_ACEOF
39927 /* confdefs.h.  */
39928 _ACEOF
39929 cat confdefs.h >>conftest.$ac_ext
39930 cat >>conftest.$ac_ext <<_ACEOF
39931 /* end confdefs.h.  */
39932 $ac_includes_default
39933 #include <$ac_header>
39934 _ACEOF
39935 rm -f conftest.$ac_objext
39936 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
39937   (eval $ac_compile) 2>conftest.er1
39938   ac_status=$?
39939   grep -v '^ *+' conftest.er1 >conftest.err
39940   rm -f conftest.er1
39941   cat conftest.err >&5
39942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39943   (exit $ac_status); } &&
39944          { ac_try='test -z "$ac_c_werror_flag"
39945                          || test ! -s conftest.err'
39946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39947   (eval $ac_try) 2>&5
39948   ac_status=$?
39949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39950   (exit $ac_status); }; } &&
39951          { ac_try='test -s conftest.$ac_objext'
39952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39953   (eval $ac_try) 2>&5
39954   ac_status=$?
39955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39956   (exit $ac_status); }; }; then
39957   ac_header_compiler=yes
39958 else
39959   echo "$as_me: failed program was:" >&5
39960 sed 's/^/| /' conftest.$ac_ext >&5
39961
39962 ac_header_compiler=no
39963 fi
39964 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
39965 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
39966 echo "${ECHO_T}$ac_header_compiler" >&6
39967
39968 # Is the header present?
39969 echo "$as_me:$LINENO: checking $ac_header presence" >&5
39970 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
39971 cat >conftest.$ac_ext <<_ACEOF
39972 /* confdefs.h.  */
39973 _ACEOF
39974 cat confdefs.h >>conftest.$ac_ext
39975 cat >>conftest.$ac_ext <<_ACEOF
39976 /* end confdefs.h.  */
39977 #include <$ac_header>
39978 _ACEOF
39979 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
39980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
39981   ac_status=$?
39982   grep -v '^ *+' conftest.er1 >conftest.err
39983   rm -f conftest.er1
39984   cat conftest.err >&5
39985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
39986   (exit $ac_status); } >/dev/null; then
39987   if test -s conftest.err; then
39988     ac_cpp_err=$ac_c_preproc_warn_flag
39989     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
39990   else
39991     ac_cpp_err=
39992   fi
39993 else
39994   ac_cpp_err=yes
39995 fi
39996 if test -z "$ac_cpp_err"; then
39997   ac_header_preproc=yes
39998 else
39999   echo "$as_me: failed program was:" >&5
40000 sed 's/^/| /' conftest.$ac_ext >&5
40001
40002   ac_header_preproc=no
40003 fi
40004 rm -f conftest.err conftest.$ac_ext
40005 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
40006 echo "${ECHO_T}$ac_header_preproc" >&6
40007
40008 # So?  What about this header?
40009 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
40010   yes:no: )
40011     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
40012 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
40013     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
40014 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
40015     ac_header_preproc=yes
40016     ;;
40017   no:yes:* )
40018     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
40019 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
40020     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
40021 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
40022     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
40023 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
40024     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
40025 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
40026     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
40027 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
40028     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
40029 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
40030     (
40031       cat <<\_ASBOX
40032 ## --------------------------------------------- ##
40033 ## Report this to <http://www.openldap.org/its/> ##
40034 ## --------------------------------------------- ##
40035 _ASBOX
40036     ) |
40037       sed "s/^/$as_me: WARNING:     /" >&2
40038     ;;
40039 esac
40040 echo "$as_me:$LINENO: checking for $ac_header" >&5
40041 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
40042 if eval "test \"\${$as_ac_Header+set}\" = set"; then
40043   echo $ECHO_N "(cached) $ECHO_C" >&6
40044 else
40045   eval "$as_ac_Header=\$ac_header_preproc"
40046 fi
40047 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
40048 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
40049
40050 fi
40051 if test `eval echo '${'$as_ac_Header'}'` = yes; then
40052   cat >>confdefs.h <<_ACEOF
40053 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
40054 _ACEOF
40055
40056 fi
40057
40058 done
40059
40060
40061         if test $ac_cv_header_ltdl_h != yes ; then
40062                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
40063 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
40064    { (exit 1); exit 1; }; }
40065         fi
40066         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
40067 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
40068 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
40069   echo $ECHO_N "(cached) $ECHO_C" >&6
40070 else
40071   ac_check_lib_save_LIBS=$LIBS
40072 LIBS="-lltdl  $LIBS"
40073 cat >conftest.$ac_ext <<_ACEOF
40074 /* confdefs.h.  */
40075 _ACEOF
40076 cat confdefs.h >>conftest.$ac_ext
40077 cat >>conftest.$ac_ext <<_ACEOF
40078 /* end confdefs.h.  */
40079
40080 /* Override any gcc2 internal prototype to avoid an error.  */
40081 #ifdef __cplusplus
40082 extern "C"
40083 #endif
40084 /* We use char because int might match the return type of a gcc2
40085    builtin and then its argument prototype would still apply.  */
40086 char lt_dlinit ();
40087 int
40088 main ()
40089 {
40090 lt_dlinit ();
40091   ;
40092   return 0;
40093 }
40094 _ACEOF
40095 rm -f conftest.$ac_objext conftest$ac_exeext
40096 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
40097   (eval $ac_link) 2>conftest.er1
40098   ac_status=$?
40099   grep -v '^ *+' conftest.er1 >conftest.err
40100   rm -f conftest.er1
40101   cat conftest.err >&5
40102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40103   (exit $ac_status); } &&
40104          { ac_try='test -z "$ac_c_werror_flag"
40105                          || test ! -s conftest.err'
40106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40107   (eval $ac_try) 2>&5
40108   ac_status=$?
40109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40110   (exit $ac_status); }; } &&
40111          { ac_try='test -s conftest$ac_exeext'
40112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
40113   (eval $ac_try) 2>&5
40114   ac_status=$?
40115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
40116   (exit $ac_status); }; }; then
40117   ac_cv_lib_ltdl_lt_dlinit=yes
40118 else
40119   echo "$as_me: failed program was:" >&5
40120 sed 's/^/| /' conftest.$ac_ext >&5
40121
40122 ac_cv_lib_ltdl_lt_dlinit=no
40123 fi
40124 rm -f conftest.err conftest.$ac_objext \
40125       conftest$ac_exeext conftest.$ac_ext
40126 LIBS=$ac_check_lib_save_LIBS
40127 fi
40128 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
40129 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
40130 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
40131
40132                 SLAPI_LIBS=-lltdl
40133                 LIBSLAPI=libslapi.a
40134                 LIBSLAPITOOLS=../libslapi.a
40135
40136 cat >>confdefs.h <<\_ACEOF
40137 #define HAVE_LIBLTDL 1
40138 _ACEOF
40139
40140
40141 else
40142   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
40143 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
40144    { (exit 1); exit 1; }; }
40145 fi
40146
40147
40148
40149 cat >>confdefs.h <<\_ACEOF
40150 #define LDAP_SLAPI 1
40151 _ACEOF
40152
40153 fi
40154
40155 if test "$ol_enable_debug" != no ; then
40156         if test "$ol_enable_debug" = traditional; then
40157
40158 cat >>confdefs.h <<\_ACEOF
40159 #define OLD_DEBUG 1
40160 _ACEOF
40161
40162         fi
40163
40164 cat >>confdefs.h <<\_ACEOF
40165 #define LDAP_DEBUG 1
40166 _ACEOF
40167
40168 fi
40169 if test "$ol_enable_syslog" = yes ; then
40170
40171 cat >>confdefs.h <<\_ACEOF
40172 #define LDAP_SYSLOG 1
40173 _ACEOF
40174
40175 fi
40176 if test "$ol_enable_proctitle" != no ; then
40177
40178 cat >>confdefs.h <<\_ACEOF
40179 #define LDAP_PROCTITLE 1
40180 _ACEOF
40181
40182 fi
40183 if test "$ol_enable_referrals" != no ; then
40184
40185 cat >>confdefs.h <<\_ACEOF
40186 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
40187 _ACEOF
40188
40189 fi
40190 if test "$ol_enable_local" != no; then
40191
40192 cat >>confdefs.h <<\_ACEOF
40193 #define LDAP_PF_LOCAL 1
40194 _ACEOF
40195
40196 fi
40197 if test "$ol_link_ipv6" != no; then
40198
40199 cat >>confdefs.h <<\_ACEOF
40200 #define LDAP_PF_INET6 1
40201 _ACEOF
40202
40203 fi
40204 if test "$ol_enable_cleartext" != no ; then
40205
40206 cat >>confdefs.h <<\_ACEOF
40207 #define SLAPD_CLEARTEXT 1
40208 _ACEOF
40209
40210 fi
40211 if test "$ol_enable_crypt" != no ; then
40212
40213 cat >>confdefs.h <<\_ACEOF
40214 #define SLAPD_CRYPT 1
40215 _ACEOF
40216
40217 fi
40218 if test "$ol_link_spasswd" != no ; then
40219
40220 cat >>confdefs.h <<\_ACEOF
40221 #define SLAPD_SPASSWD 1
40222 _ACEOF
40223
40224 fi
40225 if test "$ol_enable_rlookups" != no ; then
40226
40227 cat >>confdefs.h <<\_ACEOF
40228 #define SLAPD_RLOOKUPS 1
40229 _ACEOF
40230
40231 fi
40232 if test "$ol_enable_aci" != no ; then
40233         if test $ol_enable_dynacl = no ; then
40234                 ol_enable_dynacl=yes
40235                 { echo "$as_me:$LINENO: WARNING: ACIs need dynacl" >&5
40236 echo "$as_me: WARNING: ACIs need dynacl" >&2;}
40237         fi
40238         if test "$ol_enable_aci" = mod ; then
40239                 MFLAG=SLAPD_MOD_DYNAMIC
40240                                 { { echo "$as_me:$LINENO: error: ACI build as dynamic module not supported (yet)" >&5
40241 echo "$as_me: error: ACI build as dynamic module not supported (yet)" >&2;}
40242    { (exit 1); exit 1; }; }
40243         else
40244                 MFLAG=SLAPD_MOD_STATIC
40245         fi
40246         WITH_ACI_ENABLED=$ol_enable_aci
40247
40248 cat >>confdefs.h <<_ACEOF
40249 #define SLAPD_ACI_ENABLED $MFLAG
40250 _ACEOF
40251
40252 else
40253         WITH_ACI_ENABLED=no
40254 fi
40255 if test "$ol_enable_dynacl" != no ; then
40256
40257 cat >>confdefs.h <<\_ACEOF
40258 #define SLAP_DYNACL 1
40259 _ACEOF
40260
40261 fi
40262
40263 if test "$ol_link_modules" != no ; then
40264
40265 cat >>confdefs.h <<\_ACEOF
40266 #define SLAPD_MODULES 1
40267 _ACEOF
40268
40269         BUILD_SLAPD=yes
40270         SLAPD_MODULES_LDFLAGS="-dlopen self"
40271 fi
40272
40273
40274 cat >>confdefs.h <<\_ACEOF
40275 #define SLAPD_MOD_STATIC 1
40276 _ACEOF
40277
40278
40279 cat >>confdefs.h <<\_ACEOF
40280 #define SLAPD_MOD_DYNAMIC 2
40281 _ACEOF
40282
40283
40284 if test "$ol_enable_monitor" != no ; then
40285         BUILD_SLAPD=yes
40286         BUILD_MONITOR=$ol_enable_monitor
40287         if test "$ol_enable_monitor" = mod ; then
40288                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
40289                 MFLAG=SLAPD_MOD_DYNAMIC
40290         else
40291                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
40292                 MFLAG=SLAPD_MOD_STATIC
40293         fi
40294
40295 cat >>confdefs.h <<_ACEOF
40296 #define SLAPD_MONITOR $MFLAG
40297 _ACEOF
40298
40299 fi
40300
40301 if test "$ol_enable_bdb" != no ; then
40302         BUILD_SLAPD=yes
40303         BUILD_BDB=$ol_enable_bdb
40304         if test "$ol_enable_bdb" = mod ; then
40305                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
40306                 MFLAG=SLAPD_MOD_DYNAMIC
40307         else
40308                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
40309                 MFLAG=SLAPD_MOD_STATIC
40310         fi
40311
40312 cat >>confdefs.h <<_ACEOF
40313 #define SLAPD_BDB $MFLAG
40314 _ACEOF
40315
40316 fi
40317
40318 if test "$ol_enable_dnssrv" != no ; then
40319         BUILD_SLAPD=yes
40320         BUILD_DNSSRV=$ol_enable_dnssrv
40321         if test "$ol_enable_dnssrv" = mod ; then
40322                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
40323                 MFLAG=SLAPD_MOD_DYNAMIC
40324         else
40325                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
40326                 MFLAG=SLAPD_MOD_STATIC
40327         fi
40328
40329 cat >>confdefs.h <<_ACEOF
40330 #define SLAPD_DNSSRV $MFLAG
40331 _ACEOF
40332
40333 fi
40334
40335 if test "$ol_enable_hdb" != no ; then
40336         BUILD_SLAPD=yes
40337         BUILD_HDB=$ol_enable_hdb
40338         if test "$ol_enable_hdb" = mod ; then
40339                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
40340                 MFLAG=SLAPD_MOD_DYNAMIC
40341         else
40342                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
40343                 MFLAG=SLAPD_MOD_STATIC
40344         fi
40345
40346 cat >>confdefs.h <<_ACEOF
40347 #define SLAPD_HDB $MFLAG
40348 _ACEOF
40349
40350 fi
40351
40352 if test "$ol_enable_ldap" != no ; then
40353         BUILD_SLAPD=yes
40354         BUILD_LDAP=$ol_enable_ldap
40355         if test "$ol_enable_ldap" = mod ; then
40356                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
40357                 MFLAG=SLAPD_MOD_DYNAMIC
40358         else
40359                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
40360                 MFLAG=SLAPD_MOD_STATIC
40361         fi
40362
40363 cat >>confdefs.h <<_ACEOF
40364 #define SLAPD_LDAP $MFLAG
40365 _ACEOF
40366
40367 fi
40368
40369 if test "$ol_enable_meta" != no ; then
40370         BUILD_SLAPD=yes
40371         BUILD_META=$ol_enable_meta
40372         BUILD_REWRITE=yes
40373         if test "$ol_enable_meta" = mod ; then
40374                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
40375                 MFLAG=SLAPD_MOD_DYNAMIC
40376         else
40377                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
40378                 MFLAG=SLAPD_MOD_STATIC
40379         fi
40380
40381 cat >>confdefs.h <<_ACEOF
40382 #define SLAPD_META $MFLAG
40383 _ACEOF
40384
40385 fi
40386
40387 if test "$ol_enable_null" != no ; then
40388         BUILD_SLAPD=yes
40389         BUILD_NULL=$ol_enable_null
40390         if test "$ol_enable_null" = mod ; then
40391                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
40392                 MFLAG=SLAPD_MOD_DYNAMIC
40393         else
40394                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
40395                 MFLAG=SLAPD_MOD_STATIC
40396         fi
40397
40398 cat >>confdefs.h <<_ACEOF
40399 #define SLAPD_NULL $MFLAG
40400 _ACEOF
40401
40402 fi
40403
40404 if test "$ol_enable_passwd" != no ; then
40405         BUILD_SLAPD=yes
40406         BUILD_PASSWD=$ol_enable_passwd
40407         if test "$ol_enable_passwd" = mod ; then
40408                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
40409                 MFLAG=SLAPD_MOD_DYNAMIC
40410         else
40411                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
40412                 MFLAG=SLAPD_MOD_STATIC
40413         fi
40414
40415 cat >>confdefs.h <<_ACEOF
40416 #define SLAPD_PASSWD $MFLAG
40417 _ACEOF
40418
40419 fi
40420
40421 if test "$ol_link_perl" != no ; then
40422         BUILD_SLAPD=yes
40423         BUILD_PERL=$ol_enable_perl
40424         if test "$ol_enable_perl" = mod ; then
40425                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
40426                 MFLAG=SLAPD_MOD_DYNAMIC
40427         else
40428                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
40429                 MFLAG=SLAPD_MOD_STATIC
40430         fi
40431
40432 cat >>confdefs.h <<_ACEOF
40433 #define SLAPD_PERL $MFLAG
40434 _ACEOF
40435
40436 fi
40437
40438 if test "$ol_enable_relay" != no ; then
40439         BUILD_SLAPD=yes
40440         BUILD_RELAY=$ol_enable_relay
40441         if test "$ol_enable_relay" = mod ; then
40442                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
40443                 MFLAG=SLAPD_MOD_DYNAMIC
40444         else
40445                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
40446                 MFLAG=SLAPD_MOD_STATIC
40447         fi
40448
40449 cat >>confdefs.h <<_ACEOF
40450 #define SLAPD_RELAY $MFLAG
40451 _ACEOF
40452
40453 fi
40454
40455 if test "$ol_enable_shell" != no ; then
40456         if test "$ol_link_threads" != no ; then
40457                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
40458 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
40459         fi
40460         BUILD_SLAPD=yes
40461         BUILD_SHELL=$ol_enable_shell
40462         if test "$ol_enable_shell" = mod ; then
40463                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
40464                 MFLAG=SLAPD_MOD_DYNAMIC
40465         else
40466                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
40467                 MFLAG=SLAPD_MOD_STATIC
40468         fi
40469
40470 cat >>confdefs.h <<_ACEOF
40471 #define SLAPD_SHELL $MFLAG
40472 _ACEOF
40473
40474 fi
40475
40476 if test "$ol_link_sql" != no ; then
40477         BUILD_SLAPD=yes
40478         BUILD_SQL=$ol_enable_sql
40479         if test "$ol_enable_sql" = mod; then
40480                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
40481                 MFLAG=SLAPD_MOD_DYNAMIC
40482         else
40483                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
40484                 MFLAG=SLAPD_MOD_STATIC
40485         fi
40486
40487 cat >>confdefs.h <<_ACEOF
40488 #define SLAPD_SQL $MFLAG
40489 _ACEOF
40490
40491 fi
40492
40493 if test "$ol_enable_accesslog" != no ; then
40494         BUILD_ACCESSLOG=$ol_enable_accesslog
40495         if test "$ol_enable_accesslog" = mod ; then
40496                 MFLAG=SLAPD_MOD_DYNAMIC
40497                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
40498         else
40499                 MFLAG=SLAPD_MOD_STATIC
40500                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
40501         fi
40502
40503 cat >>confdefs.h <<_ACEOF
40504 #define SLAPD_OVER_ACCESSLOG $MFLAG
40505 _ACEOF
40506
40507 fi
40508
40509 if test "$ol_enable_auditlog" != no ; then
40510         BUILD_AUDITLOG=$ol_enable_auditlog
40511         if test "$ol_enable_auditlog" = mod ; then
40512                 MFLAG=SLAPD_MOD_DYNAMIC
40513                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
40514         else
40515                 MFLAG=SLAPD_MOD_STATIC
40516                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
40517         fi
40518
40519 cat >>confdefs.h <<_ACEOF
40520 #define SLAPD_OVER_AUDITLOG $MFLAG
40521 _ACEOF
40522
40523 fi
40524
40525 if test "$ol_enable_constraint" != no ; then
40526         BUILD_CONSTRAINT=$ol_enable_constraint
40527         if test "$ol_enable_constraint" = mod ; then
40528                 MFLAG=SLAPD_MOD_DYNAMIC
40529                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
40530         else
40531                 MFLAG=SLAPD_MOD_STATIC
40532                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
40533         fi
40534
40535 cat >>confdefs.h <<_ACEOF
40536 #define SLAPD_OVER_CONSTRAINT $MFLAG
40537 _ACEOF
40538
40539 fi
40540
40541 if test "$ol_enable_dds" != no ; then
40542         BUILD_DDS=$ol_enable_dds
40543         if test "$ol_enable_dds" = mod ; then
40544                 MFLAG=SLAPD_MOD_DYNAMIC
40545                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
40546         else
40547                 MFLAG=SLAPD_MOD_STATIC
40548                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
40549         fi
40550
40551 cat >>confdefs.h <<_ACEOF
40552 #define SLAPD_OVER_DDS $MFLAG
40553 _ACEOF
40554
40555 fi
40556
40557 if test "$ol_enable_dyngroup" != no ; then
40558         BUILD_DYNGROUP=$ol_enable_dyngroup
40559         if test "$ol_enable_dyngroup" = mod ; then
40560                 MFLAG=SLAPD_MOD_DYNAMIC
40561                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
40562         else
40563                 MFLAG=SLAPD_MOD_STATIC
40564                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
40565         fi
40566
40567 cat >>confdefs.h <<_ACEOF
40568 #define SLAPD_OVER_DYNGROUP $MFLAG
40569 _ACEOF
40570
40571 fi
40572
40573 if test "$ol_enable_dynlist" != no ; then
40574         BUILD_DYNLIST=$ol_enable_dynlist
40575         if test "$ol_enable_dynlist" = mod ; then
40576                 MFLAG=SLAPD_MOD_DYNAMIC
40577                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
40578         else
40579                 MFLAG=SLAPD_MOD_STATIC
40580                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
40581         fi
40582
40583 cat >>confdefs.h <<_ACEOF
40584 #define SLAPD_OVER_DYNLIST $MFLAG
40585 _ACEOF
40586
40587 fi
40588
40589 if test "$ol_enable_memberof" != no ; then
40590         BUILD_MEMBEROF=$ol_enable_memberof
40591         if test "$ol_enable_memberof" = mod ; then
40592                 MFLAG=SLAPD_MOD_DYNAMIC
40593                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
40594         else
40595                 MFLAG=SLAPD_MOD_STATIC
40596                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
40597         fi
40598
40599 cat >>confdefs.h <<_ACEOF
40600 #define SLAPD_OVER_MEMBEROF $MFLAG
40601 _ACEOF
40602
40603 fi
40604
40605 if test "$ol_enable_ppolicy" != no ; then
40606         BUILD_PPOLICY=$ol_enable_ppolicy
40607         if test "$ol_enable_ppolicy" = mod ; then
40608                 MFLAG=SLAPD_MOD_DYNAMIC
40609                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
40610         else
40611                 MFLAG=SLAPD_MOD_STATIC
40612                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
40613         fi
40614
40615 cat >>confdefs.h <<_ACEOF
40616 #define SLAPD_OVER_PPOLICY $MFLAG
40617 _ACEOF
40618
40619 fi
40620
40621 if test "$ol_enable_proxycache" != no ; then
40622         BUILD_PROXYCACHE=$ol_enable_proxycache
40623         if test "$ol_enable_proxycache" = mod ; then
40624                 MFLAG=SLAPD_MOD_DYNAMIC
40625                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
40626         else
40627                 MFLAG=SLAPD_MOD_STATIC
40628                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
40629         fi
40630
40631 cat >>confdefs.h <<_ACEOF
40632 #define SLAPD_OVER_PROXYCACHE $MFLAG
40633 _ACEOF
40634
40635 fi
40636
40637 if test "$ol_enable_refint" != no ; then
40638         BUILD_REFINT=$ol_enable_refint
40639         if test "$ol_enable_refint" = mod ; then
40640                 MFLAG=SLAPD_MOD_DYNAMIC
40641                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
40642         else
40643                 MFLAG=SLAPD_MOD_STATIC
40644                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
40645         fi
40646
40647 cat >>confdefs.h <<_ACEOF
40648 #define SLAPD_OVER_REFINT $MFLAG
40649 _ACEOF
40650
40651 fi
40652
40653 if test "$ol_enable_retcode" != no ; then
40654         BUILD_RETCODE=$ol_enable_retcode
40655         if test "$ol_enable_retcode" = mod ; then
40656                 MFLAG=SLAPD_MOD_DYNAMIC
40657                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
40658         else
40659                 MFLAG=SLAPD_MOD_STATIC
40660                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
40661         fi
40662
40663 cat >>confdefs.h <<_ACEOF
40664 #define SLAPD_OVER_RETCODE $MFLAG
40665 _ACEOF
40666
40667 fi
40668
40669 if test "$ol_enable_rwm" != no ; then
40670         BUILD_REWRITE=yes
40671         BUILD_RWM=$ol_enable_rwm
40672         if test "$ol_enable_rwm" = mod ; then
40673                 MFLAG=SLAPD_MOD_DYNAMIC
40674                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
40675         else
40676                 MFLAG=SLAPD_MOD_STATIC
40677                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
40678         fi
40679
40680 cat >>confdefs.h <<_ACEOF
40681 #define SLAPD_OVER_RWM $MFLAG
40682 _ACEOF
40683
40684 fi
40685
40686 if test "$ol_enable_seqmod" != no ; then
40687         BUILD_SEQMOD=$ol_enable_seqmod
40688         if test "$ol_enable_seqmod" = mod ; then
40689                 MFLAG=SLAPD_MOD_DYNAMIC
40690                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
40691         else
40692                 MFLAG=SLAPD_MOD_STATIC
40693                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
40694         fi
40695
40696 cat >>confdefs.h <<_ACEOF
40697 #define SLAPD_OVER_SEQMOD $MFLAG
40698 _ACEOF
40699
40700 fi
40701
40702 if test "$ol_enable_syncprov" != no ; then
40703         BUILD_SYNCPROV=$ol_enable_syncprov
40704         if test "$ol_enable_syncprov" = mod ; then
40705                 MFLAG=SLAPD_MOD_DYNAMIC
40706                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
40707         else
40708                 MFLAG=SLAPD_MOD_STATIC
40709                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
40710         fi
40711
40712 cat >>confdefs.h <<_ACEOF
40713 #define SLAPD_OVER_SYNCPROV $MFLAG
40714 _ACEOF
40715
40716 fi
40717
40718 if test "$ol_enable_translucent" != no ; then
40719         BUILD_TRANSLUCENT=$ol_enable_translucent
40720         if test "$ol_enable_translucent" = mod ; then
40721                 MFLAG=SLAPD_MOD_DYNAMIC
40722                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
40723         else
40724                 MFLAG=SLAPD_MOD_STATIC
40725                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
40726         fi
40727
40728 cat >>confdefs.h <<_ACEOF
40729 #define SLAPD_OVER_TRANSLUCENT $MFLAG
40730 _ACEOF
40731
40732 fi
40733
40734 if test "$ol_enable_unique" != no ; then
40735         BUILD_UNIQUE=$ol_enable_unique
40736         if test "$ol_enable_unique" = mod ; then
40737                 MFLAG=SLAPD_MOD_DYNAMIC
40738                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
40739         else
40740                 MFLAG=SLAPD_MOD_STATIC
40741                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
40742         fi
40743
40744 cat >>confdefs.h <<_ACEOF
40745 #define SLAPD_OVER_UNIQUE $MFLAG
40746 _ACEOF
40747
40748 fi
40749
40750 if test "$ol_enable_valsort" != no ; then
40751         BUILD_VALSORT=$ol_enable_valsort
40752         if test "$ol_enable_valsort" = mod ; then
40753                 MFLAG=SLAPD_MOD_DYNAMIC
40754                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
40755         else
40756                 MFLAG=SLAPD_MOD_STATIC
40757                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
40758         fi
40759
40760 cat >>confdefs.h <<_ACEOF
40761 #define SLAPD_OVER_VALSORT $MFLAG
40762 _ACEOF
40763
40764 fi
40765
40766 if test "$ol_enable_rewrite" != no ; then
40767
40768 cat >>confdefs.h <<\_ACEOF
40769 #define ENABLE_REWRITE 1
40770 _ACEOF
40771
40772         BUILD_REWRITE=yes
40773 fi
40774
40775 if test "$ol_enable_slapi" != no ; then
40776
40777 cat >>confdefs.h <<\_ACEOF
40778 #define ENABLE_SLAPI 1
40779 _ACEOF
40780
40781         BUILD_SLAPI=yes
40782         SLAPD_SLAPI_DEPEND=libslapi.a
40783 fi
40784
40785
40786
40787 if test "$ac_cv_mingw32" = yes ; then
40788         PLAT=NT
40789         SLAPD_MODULES_LDFLAGS=
40790 else
40791         PLAT=UNIX
40792 fi
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
40809
40810
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
40853
40854
40855
40856
40857
40858
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872
40873
40874
40875
40876 # Check whether --with-xxinstall or --without-xxinstall was given.
40877 if test "${with_xxinstall+set}" = set; then
40878   withval="$with_xxinstall"
40879
40880 fi;
40881
40882
40883                                                                                                                                                                                                                                                                                                                                                                                             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 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"
40884
40885
40886           ac_config_commands="$ac_config_commands default"
40887
40888
40889
40890 test "x$prefix" = xNONE && prefix=$ac_default_prefix
40891 # Let make expand exec_prefix.
40892 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
40893
40894 # VPATH may cause trouble with some makes, so we remove $(srcdir),
40895 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
40896 # trailing colons and then remove the whole line if VPATH becomes empty
40897 # (actually we leave an empty line to preserve line numbers).
40898 if test "x$srcdir" = x.; then
40899   ac_vpsub='/^[  ]*VPATH[        ]*=/{
40900 s/:*\$(srcdir):*/:/;
40901 s/:*\${srcdir}:*/:/;
40902 s/:*@srcdir@:*/:/;
40903 s/^\([^=]*=[     ]*\):*/\1/;
40904 s/:*$//;
40905 s/^[^=]*=[       ]*$//;
40906 }'
40907 fi
40908
40909 DEFS=-DHAVE_CONFIG_H
40910
40911 ac_libobjs=
40912 ac_ltlibobjs=
40913 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
40914   # 1. Remove the extension, and $U if already installed.
40915   ac_i=`echo "$ac_i" |
40916          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
40917   # 2. Add them.
40918   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
40919   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
40920 done
40921 LIBOBJS=$ac_libobjs
40922
40923 LTLIBOBJS=$ac_ltlibobjs
40924
40925
40926 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
40927   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
40928 Usually this means the macro was only invoked conditionally." >&5
40929 echo "$as_me: error: conditional \"AMDEP\" was never defined.
40930 Usually this means the macro was only invoked conditionally." >&2;}
40931    { (exit 1); exit 1; }; }
40932 fi
40933 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
40934   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
40935 Usually this means the macro was only invoked conditionally." >&5
40936 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
40937 Usually this means the macro was only invoked conditionally." >&2;}
40938    { (exit 1); exit 1; }; }
40939 fi
40940 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
40941   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
40942 Usually this means the macro was only invoked conditionally." >&5
40943 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
40944 Usually this means the macro was only invoked conditionally." >&2;}
40945    { (exit 1); exit 1; }; }
40946 fi
40947
40948 : ${CONFIG_STATUS=./config.status}
40949 ac_clean_files_save=$ac_clean_files
40950 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
40951 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
40952 echo "$as_me: creating $CONFIG_STATUS" >&6;}
40953 cat >$CONFIG_STATUS <<_ACEOF
40954 #! $SHELL
40955 # Generated by $as_me.
40956 # Run this file to recreate the current configuration.
40957 # Compiler output produced by configure, useful for debugging
40958 # configure, is in config.log if it exists.
40959
40960 debug=false
40961 ac_cs_recheck=false
40962 ac_cs_silent=false
40963 SHELL=\${CONFIG_SHELL-$SHELL}
40964 _ACEOF
40965
40966 cat >>$CONFIG_STATUS <<\_ACEOF
40967 ## --------------------- ##
40968 ## M4sh Initialization.  ##
40969 ## --------------------- ##
40970
40971 # Be Bourne compatible
40972 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
40973   emulate sh
40974   NULLCMD=:
40975   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
40976   # is contrary to our usage.  Disable this feature.
40977   alias -g '${1+"$@"}'='"$@"'
40978 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
40979   set -o posix
40980 fi
40981 DUALCASE=1; export DUALCASE # for MKS sh
40982
40983 # Support unset when possible.
40984 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
40985   as_unset=unset
40986 else
40987   as_unset=false
40988 fi
40989
40990
40991 # Work around bugs in pre-3.0 UWIN ksh.
40992 $as_unset ENV MAIL MAILPATH
40993 PS1='$ '
40994 PS2='> '
40995 PS4='+ '
40996
40997 # NLS nuisances.
40998 for as_var in \
40999   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41000   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
41001   LC_TELEPHONE LC_TIME
41002 do
41003   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
41004     eval $as_var=C; export $as_var
41005   else
41006     $as_unset $as_var
41007   fi
41008 done
41009
41010 # Required to use basename.
41011 if expr a : '\(a\)' >/dev/null 2>&1; then
41012   as_expr=expr
41013 else
41014   as_expr=false
41015 fi
41016
41017 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
41018   as_basename=basename
41019 else
41020   as_basename=false
41021 fi
41022
41023
41024 # Name of the executable.
41025 as_me=`$as_basename "$0" ||
41026 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
41027          X"$0" : 'X\(//\)$' \| \
41028          X"$0" : 'X\(/\)$' \| \
41029          .     : '\(.\)' 2>/dev/null ||
41030 echo X/"$0" |
41031     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
41032           /^X\/\(\/\/\)$/{ s//\1/; q; }
41033           /^X\/\(\/\).*/{ s//\1/; q; }
41034           s/.*/./; q'`
41035
41036
41037 # PATH needs CR, and LINENO needs CR and PATH.
41038 # Avoid depending upon Character Ranges.
41039 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
41040 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
41041 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41042 as_cr_digits='0123456789'
41043 as_cr_alnum=$as_cr_Letters$as_cr_digits
41044
41045 # The user is always right.
41046 if test "${PATH_SEPARATOR+set}" != set; then
41047   echo "#! /bin/sh" >conf$$.sh
41048   echo  "exit 0"   >>conf$$.sh
41049   chmod +x conf$$.sh
41050   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
41051     PATH_SEPARATOR=';'
41052   else
41053     PATH_SEPARATOR=:
41054   fi
41055   rm -f conf$$.sh
41056 fi
41057
41058
41059   as_lineno_1=$LINENO
41060   as_lineno_2=$LINENO
41061   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
41062   test "x$as_lineno_1" != "x$as_lineno_2" &&
41063   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
41064   # Find who we are.  Look in the path if we contain no path at all
41065   # relative or not.
41066   case $0 in
41067     *[\\/]* ) as_myself=$0 ;;
41068     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41069 for as_dir in $PATH
41070 do
41071   IFS=$as_save_IFS
41072   test -z "$as_dir" && as_dir=.
41073   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
41074 done
41075
41076        ;;
41077   esac
41078   # We did not find ourselves, most probably we were run as `sh COMMAND'
41079   # in which case we are not to be found in the path.
41080   if test "x$as_myself" = x; then
41081     as_myself=$0
41082   fi
41083   if test ! -f "$as_myself"; then
41084     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
41085 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
41086    { (exit 1); exit 1; }; }
41087   fi
41088   case $CONFIG_SHELL in
41089   '')
41090     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41091 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
41092 do
41093   IFS=$as_save_IFS
41094   test -z "$as_dir" && as_dir=.
41095   for as_base in sh bash ksh sh5; do
41096          case $as_dir in
41097          /*)
41098            if ("$as_dir/$as_base" -c '
41099   as_lineno_1=$LINENO
41100   as_lineno_2=$LINENO
41101   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
41102   test "x$as_lineno_1" != "x$as_lineno_2" &&
41103   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
41104              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
41105              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
41106              CONFIG_SHELL=$as_dir/$as_base
41107              export CONFIG_SHELL
41108              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
41109            fi;;
41110          esac
41111        done
41112 done
41113 ;;
41114   esac
41115
41116   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
41117   # uniformly replaced by the line number.  The first 'sed' inserts a
41118   # line-number line before each line; the second 'sed' does the real
41119   # work.  The second script uses 'N' to pair each line-number line
41120   # with the numbered line, and appends trailing '-' during
41121   # substitution so that $LINENO is not a special case at line end.
41122   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
41123   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
41124   sed '=' <$as_myself |
41125     sed '
41126       N
41127       s,$,-,
41128       : loop
41129       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
41130       t loop
41131       s,-$,,
41132       s,^['$as_cr_digits']*\n,,
41133     ' >$as_me.lineno &&
41134   chmod +x $as_me.lineno ||
41135     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
41136 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
41137    { (exit 1); exit 1; }; }
41138
41139   # Don't try to exec as it changes $[0], causing all sort of problems
41140   # (the dirname of $[0] is not the place where we might find the
41141   # original and so on.  Autoconf is especially sensible to this).
41142   . ./$as_me.lineno
41143   # Exit status is that of the last command.
41144   exit
41145 }
41146
41147
41148 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
41149   *c*,-n*) ECHO_N= ECHO_C='
41150 ' ECHO_T='      ' ;;
41151   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
41152   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
41153 esac
41154
41155 if expr a : '\(a\)' >/dev/null 2>&1; then
41156   as_expr=expr
41157 else
41158   as_expr=false
41159 fi
41160
41161 rm -f conf$$ conf$$.exe conf$$.file
41162 echo >conf$$.file
41163 if ln -s conf$$.file conf$$ 2>/dev/null; then
41164   # We could just check for DJGPP; but this test a) works b) is more generic
41165   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
41166   if test -f conf$$.exe; then
41167     # Don't use ln at all; we don't have any links
41168     as_ln_s='cp -p'
41169   else
41170     as_ln_s='ln -s'
41171   fi
41172 elif ln conf$$.file conf$$ 2>/dev/null; then
41173   as_ln_s=ln
41174 else
41175   as_ln_s='cp -p'
41176 fi
41177 rm -f conf$$ conf$$.exe conf$$.file
41178
41179 if mkdir -p . 2>/dev/null; then
41180   as_mkdir_p=:
41181 else
41182   test -d ./-p && rmdir ./-p
41183   as_mkdir_p=false
41184 fi
41185
41186 as_executable_p="test -f"
41187
41188 # Sed expression to map a string onto a valid CPP name.
41189 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
41190
41191 # Sed expression to map a string onto a valid variable name.
41192 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
41193
41194
41195 # IFS
41196 # We need space, tab and new line, in precisely that order.
41197 as_nl='
41198 '
41199 IFS="   $as_nl"
41200
41201 # CDPATH.
41202 $as_unset CDPATH
41203
41204 exec 6>&1
41205
41206 # Open the log real soon, to keep \$[0] and so on meaningful, and to
41207 # report actual input values of CONFIG_FILES etc. instead of their
41208 # values after options handling.  Logging --version etc. is OK.
41209 exec 5>>config.log
41210 {
41211   echo
41212   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
41213 ## Running $as_me. ##
41214 _ASBOX
41215 } >&5
41216 cat >&5 <<_CSEOF
41217
41218 This file was extended by $as_me, which was
41219 generated by GNU Autoconf 2.59.  Invocation command line was
41220
41221   CONFIG_FILES    = $CONFIG_FILES
41222   CONFIG_HEADERS  = $CONFIG_HEADERS
41223   CONFIG_LINKS    = $CONFIG_LINKS
41224   CONFIG_COMMANDS = $CONFIG_COMMANDS
41225   $ $0 $@
41226
41227 _CSEOF
41228 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
41229 echo >&5
41230 _ACEOF
41231
41232 # Files that config.status was made for.
41233 if test -n "$ac_config_files"; then
41234   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
41235 fi
41236
41237 if test -n "$ac_config_headers"; then
41238   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
41239 fi
41240
41241 if test -n "$ac_config_links"; then
41242   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
41243 fi
41244
41245 if test -n "$ac_config_commands"; then
41246   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
41247 fi
41248
41249 cat >>$CONFIG_STATUS <<\_ACEOF
41250
41251 ac_cs_usage="\
41252 \`$as_me' instantiates files from templates according to the
41253 current configuration.
41254
41255 Usage: $0 [OPTIONS] [FILE]...
41256
41257   -h, --help       print this help, then exit
41258   -V, --version    print version number, then exit
41259   -q, --quiet      do not print progress messages
41260   -d, --debug      don't remove temporary files
41261       --recheck    update $as_me by reconfiguring in the same conditions
41262   --file=FILE[:TEMPLATE]
41263                    instantiate the configuration file FILE
41264   --header=FILE[:TEMPLATE]
41265                    instantiate the configuration header FILE
41266
41267 Configuration files:
41268 $config_files
41269
41270 Configuration headers:
41271 $config_headers
41272
41273 Configuration commands:
41274 $config_commands
41275
41276 Report bugs to <bug-autoconf@gnu.org>."
41277 _ACEOF
41278
41279 cat >>$CONFIG_STATUS <<_ACEOF
41280 ac_cs_version="\\
41281 config.status
41282 configured by $0, generated by GNU Autoconf 2.59,
41283   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
41284
41285 Copyright (C) 2003 Free Software Foundation, Inc.
41286 This config.status script is free software; the Free Software Foundation
41287 gives unlimited permission to copy, distribute and modify it."
41288 srcdir=$srcdir
41289 INSTALL="$INSTALL"
41290 _ACEOF
41291
41292 cat >>$CONFIG_STATUS <<\_ACEOF
41293 # If no file are specified by the user, then we need to provide default
41294 # value.  By we need to know if files were specified by the user.
41295 ac_need_defaults=:
41296 while test $# != 0
41297 do
41298   case $1 in
41299   --*=*)
41300     ac_option=`expr "x$1" : 'x\([^=]*\)='`
41301     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
41302     ac_shift=:
41303     ;;
41304   -*)
41305     ac_option=$1
41306     ac_optarg=$2
41307     ac_shift=shift
41308     ;;
41309   *) # This is not an option, so the user has probably given explicit
41310      # arguments.
41311      ac_option=$1
41312      ac_need_defaults=false;;
41313   esac
41314
41315   case $ac_option in
41316   # Handling of the options.
41317 _ACEOF
41318 cat >>$CONFIG_STATUS <<\_ACEOF
41319   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
41320     ac_cs_recheck=: ;;
41321   --version | --vers* | -V )
41322     echo "$ac_cs_version"; exit 0 ;;
41323   --he | --h)
41324     # Conflict between --help and --header
41325     { { echo "$as_me:$LINENO: error: ambiguous option: $1
41326 Try \`$0 --help' for more information." >&5
41327 echo "$as_me: error: ambiguous option: $1
41328 Try \`$0 --help' for more information." >&2;}
41329    { (exit 1); exit 1; }; };;
41330   --help | --hel | -h )
41331     echo "$ac_cs_usage"; exit 0 ;;
41332   --debug | --d* | -d )
41333     debug=: ;;
41334   --file | --fil | --fi | --f )
41335     $ac_shift
41336     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
41337     ac_need_defaults=false;;
41338   --header | --heade | --head | --hea )
41339     $ac_shift
41340     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
41341     ac_need_defaults=false;;
41342   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
41343   | -silent | --silent | --silen | --sile | --sil | --si | --s)
41344     ac_cs_silent=: ;;
41345
41346   # This is an error.
41347   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
41348 Try \`$0 --help' for more information." >&5
41349 echo "$as_me: error: unrecognized option: $1
41350 Try \`$0 --help' for more information." >&2;}
41351    { (exit 1); exit 1; }; } ;;
41352
41353   *) ac_config_targets="$ac_config_targets $1" ;;
41354
41355   esac
41356   shift
41357 done
41358
41359 ac_configure_extra_args=
41360
41361 if $ac_cs_silent; then
41362   exec 6>/dev/null
41363   ac_configure_extra_args="$ac_configure_extra_args --silent"
41364 fi
41365
41366 _ACEOF
41367 cat >>$CONFIG_STATUS <<_ACEOF
41368 if \$ac_cs_recheck; then
41369   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
41370   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
41371 fi
41372
41373 _ACEOF
41374
41375 cat >>$CONFIG_STATUS <<_ACEOF
41376 #
41377 # INIT-COMMANDS section.
41378 #
41379
41380 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
41381
41382 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
41383 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
41384
41385
41386 _ACEOF
41387
41388
41389
41390 cat >>$CONFIG_STATUS <<\_ACEOF
41391 for ac_config_target in $ac_config_targets
41392 do
41393   case "$ac_config_target" in
41394   # Handling of arguments.
41395   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
41396   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
41397   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
41398   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
41399   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
41400   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
41401   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
41402   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
41403   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
41404   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
41405   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
41406   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
41407   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
41408   "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" ;;
41409   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
41410   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
41411   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
41412   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
41413   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
41414   "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" ;;
41415   "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" ;;
41416   "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" ;;
41417   "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" ;;
41418   "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" ;;
41419   "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" ;;
41420   "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" ;;
41421   "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" ;;
41422   "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" ;;
41423   "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" ;;
41424   "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" ;;
41425   "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" ;;
41426   "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" ;;
41427   "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" ;;
41428   "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" ;;
41429   "servers/slapd/overlays/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
41430   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
41431   "tests/run" ) CONFIG_FILES="$CONFIG_FILES tests/run" ;;
41432   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
41433   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
41434   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
41435   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
41436   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
41437   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
41438   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
41439 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
41440    { (exit 1); exit 1; }; };;
41441   esac
41442 done
41443
41444 # If the user did not use the arguments to specify the items to instantiate,
41445 # then the envvar interface is used.  Set only those that are not.
41446 # We use the long form for the default assignment because of an extremely
41447 # bizarre bug on SunOS 4.1.3.
41448 if $ac_need_defaults; then
41449   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
41450   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
41451   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
41452 fi
41453
41454 # Have a temporary directory for convenience.  Make it in the build tree
41455 # simply because there is no reason to put it here, and in addition,
41456 # creating and moving files from /tmp can sometimes cause problems.
41457 # Create a temporary directory, and hook for its removal unless debugging.
41458 $debug ||
41459 {
41460   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
41461   trap '{ (exit 1); exit 1; }' 1 2 13 15
41462 }
41463
41464 # Create a (secure) tmp directory for tmp files.
41465
41466 {
41467   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
41468   test -n "$tmp" && test -d "$tmp"
41469 }  ||
41470 {
41471   tmp=./confstat$$-$RANDOM
41472   (umask 077 && mkdir $tmp)
41473 } ||
41474 {
41475    echo "$me: cannot create a temporary directory in ." >&2
41476    { (exit 1); exit 1; }
41477 }
41478
41479 _ACEOF
41480
41481 cat >>$CONFIG_STATUS <<_ACEOF
41482
41483 #
41484 # CONFIG_FILES section.
41485 #
41486
41487 # No need to generate the scripts if there are no CONFIG_FILES.
41488 # This happens for instance when ./config.status config.h
41489 if test -n "\$CONFIG_FILES"; then
41490   # Protect against being on the right side of a sed subst in config.status.
41491   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
41492    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
41493 s,@SHELL@,$SHELL,;t t
41494 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
41495 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
41496 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
41497 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
41498 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
41499 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
41500 s,@exec_prefix@,$exec_prefix,;t t
41501 s,@prefix@,$prefix,;t t
41502 s,@program_transform_name@,$program_transform_name,;t t
41503 s,@bindir@,$bindir,;t t
41504 s,@sbindir@,$sbindir,;t t
41505 s,@libexecdir@,$libexecdir,;t t
41506 s,@datadir@,$datadir,;t t
41507 s,@sysconfdir@,$sysconfdir,;t t
41508 s,@sharedstatedir@,$sharedstatedir,;t t
41509 s,@localstatedir@,$localstatedir,;t t
41510 s,@libdir@,$libdir,;t t
41511 s,@includedir@,$includedir,;t t
41512 s,@oldincludedir@,$oldincludedir,;t t
41513 s,@infodir@,$infodir,;t t
41514 s,@mandir@,$mandir,;t t
41515 s,@build_alias@,$build_alias,;t t
41516 s,@host_alias@,$host_alias,;t t
41517 s,@target_alias@,$target_alias,;t t
41518 s,@DEFS@,$DEFS,;t t
41519 s,@ECHO_C@,$ECHO_C,;t t
41520 s,@ECHO_N@,$ECHO_N,;t t
41521 s,@ECHO_T@,$ECHO_T,;t t
41522 s,@LIBS@,$LIBS,;t t
41523 s,@build@,$build,;t t
41524 s,@build_cpu@,$build_cpu,;t t
41525 s,@build_vendor@,$build_vendor,;t t
41526 s,@build_os@,$build_os,;t t
41527 s,@host@,$host,;t t
41528 s,@host_cpu@,$host_cpu,;t t
41529 s,@host_vendor@,$host_vendor,;t t
41530 s,@host_os@,$host_os,;t t
41531 s,@target@,$target,;t t
41532 s,@target_cpu@,$target_cpu,;t t
41533 s,@target_vendor@,$target_vendor,;t t
41534 s,@target_os@,$target_os,;t t
41535 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
41536 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
41537 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
41538 s,@CYGPATH_W@,$CYGPATH_W,;t t
41539 s,@PACKAGE@,$PACKAGE,;t t
41540 s,@VERSION@,$VERSION,;t t
41541 s,@ACLOCAL@,$ACLOCAL,;t t
41542 s,@AUTOCONF@,$AUTOCONF,;t t
41543 s,@AUTOMAKE@,$AUTOMAKE,;t t
41544 s,@AUTOHEADER@,$AUTOHEADER,;t t
41545 s,@MAKEINFO@,$MAKEINFO,;t t
41546 s,@install_sh@,$install_sh,;t t
41547 s,@STRIP@,$STRIP,;t t
41548 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
41549 s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
41550 s,@mkdir_p@,$mkdir_p,;t t
41551 s,@AWK@,$AWK,;t t
41552 s,@SET_MAKE@,$SET_MAKE,;t t
41553 s,@am__leading_dot@,$am__leading_dot,;t t
41554 s,@AMTAR@,$AMTAR,;t t
41555 s,@am__tar@,$am__tar,;t t
41556 s,@am__untar@,$am__untar,;t t
41557 s,@OPENLDAP_LIBRELEASE@,$OPENLDAP_LIBRELEASE,;t t
41558 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
41559 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
41560 s,@top_builddir@,$top_builddir,;t t
41561 s,@ldap_subdir@,$ldap_subdir,;t t
41562 s,@CC@,$CC,;t t
41563 s,@AR@,$AR,;t t
41564 s,@CFLAGS@,$CFLAGS,;t t
41565 s,@LDFLAGS@,$LDFLAGS,;t t
41566 s,@CPPFLAGS@,$CPPFLAGS,;t t
41567 s,@ac_ct_CC@,$ac_ct_CC,;t t
41568 s,@EXEEXT@,$EXEEXT,;t t
41569 s,@OBJEXT@,$OBJEXT,;t t
41570 s,@DEPDIR@,$DEPDIR,;t t
41571 s,@am__include@,$am__include,;t t
41572 s,@am__quote@,$am__quote,;t t
41573 s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
41574 s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
41575 s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
41576 s,@CCDEPMODE@,$CCDEPMODE,;t t
41577 s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
41578 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
41579 s,@EGREP@,$EGREP,;t t
41580 s,@LN_S@,$LN_S,;t t
41581 s,@ECHO@,$ECHO,;t t
41582 s,@ac_ct_AR@,$ac_ct_AR,;t t
41583 s,@RANLIB@,$RANLIB,;t t
41584 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
41585 s,@DLLTOOL@,$DLLTOOL,;t t
41586 s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
41587 s,@AS@,$AS,;t t
41588 s,@ac_ct_AS@,$ac_ct_AS,;t t
41589 s,@OBJDUMP@,$OBJDUMP,;t t
41590 s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t
41591 s,@CPP@,$CPP,;t t
41592 s,@LIBTOOL@,$LIBTOOL,;t t
41593 s,@PERLBIN@,$PERLBIN,;t t
41594 s,@OL_MKDEP@,$OL_MKDEP,;t t
41595 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
41596 s,@LTSTATIC@,$LTSTATIC,;t t
41597 s,@LIBOBJS@,$LIBOBJS,;t t
41598 s,@LIBSRCS@,$LIBSRCS,;t t
41599 s,@PLAT@,$PLAT,;t t
41600 s,@WITH_SASL@,$WITH_SASL,;t t
41601 s,@WITH_TLS@,$WITH_TLS,;t t
41602 s,@WITH_MODULES_ENABLED@,$WITH_MODULES_ENABLED,;t t
41603 s,@WITH_ACI_ENABLED@,$WITH_ACI_ENABLED,;t t
41604 s,@BUILD_THREAD@,$BUILD_THREAD,;t t
41605 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
41606 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
41607 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
41608 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
41609 s,@BUILD_BDB@,$BUILD_BDB,;t t
41610 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
41611 s,@BUILD_HDB@,$BUILD_HDB,;t t
41612 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
41613 s,@BUILD_META@,$BUILD_META,;t t
41614 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
41615 s,@BUILD_NULL@,$BUILD_NULL,;t t
41616 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
41617 s,@BUILD_RELAY@,$BUILD_RELAY,;t t
41618 s,@BUILD_PERL@,$BUILD_PERL,;t t
41619 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
41620 s,@BUILD_SQL@,$BUILD_SQL,;t t
41621 s,@BUILD_ACCESSLOG@,$BUILD_ACCESSLOG,;t t
41622 s,@BUILD_AUDITLOG@,$BUILD_AUDITLOG,;t t
41623 s,@BUILD_CONSTRAINT@,$BUILD_CONSTRAINT,;t t
41624 s,@BUILD_DDS@,$BUILD_DDS,;t t
41625 s,@BUILD_DENYOP@,$BUILD_DENYOP,;t t
41626 s,@BUILD_DYNGROUP@,$BUILD_DYNGROUP,;t t
41627 s,@BUILD_DYNLIST@,$BUILD_DYNLIST,;t t
41628 s,@BUILD_LASTMOD@,$BUILD_LASTMOD,;t t
41629 s,@BUILD_PPOLICY@,$BUILD_PPOLICY,;t t
41630 s,@BUILD_PROXYCACHE@,$BUILD_PROXYCACHE,;t t
41631 s,@BUILD_REFINT@,$BUILD_REFINT,;t t
41632 s,@BUILD_RETCODE@,$BUILD_RETCODE,;t t
41633 s,@BUILD_RWM@,$BUILD_RWM,;t t
41634 s,@BUILD_SEQMOD@,$BUILD_SEQMOD,;t t
41635 s,@BUILD_SYNCPROV@,$BUILD_SYNCPROV,;t t
41636 s,@BUILD_TRANSLUCENT@,$BUILD_TRANSLUCENT,;t t
41637 s,@BUILD_UNIQUE@,$BUILD_UNIQUE,;t t
41638 s,@BUILD_VALSORT@,$BUILD_VALSORT,;t t
41639 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
41640 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
41641 s,@BDB_LIBS@,$BDB_LIBS,;t t
41642 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
41643 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
41644 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
41645 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
41646 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
41647 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
41648 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
41649 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
41650 s,@SLAPD_STATIC_OVERLAYS@,$SLAPD_STATIC_OVERLAYS,;t t
41651 s,@SLAPD_DYNAMIC_OVERLAYS@,$SLAPD_DYNAMIC_OVERLAYS,;t t
41652 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
41653 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
41654 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
41655 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
41656 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
41657 s,@SASL_LIBS@,$SASL_LIBS,;t t
41658 s,@TLS_LIBS@,$TLS_LIBS,;t t
41659 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
41660 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
41661 s,@LIBSLAPI@,$LIBSLAPI,;t t
41662 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
41663 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
41664 s,@ICU_LIBS@,$ICU_LIBS,;t t
41665 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
41666 s,@SLAPD_GMP_LIBS@,$SLAPD_GMP_LIBS,;t t
41667 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
41668 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
41669 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
41670 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
41671 CEOF
41672
41673 _ACEOF
41674
41675   cat >>$CONFIG_STATUS <<\_ACEOF
41676   # Split the substitutions into bite-sized pieces for seds with
41677   # small command number limits, like on Digital OSF/1 and HP-UX.
41678   ac_max_sed_lines=48
41679   ac_sed_frag=1 # Number of current file.
41680   ac_beg=1 # First line for current file.
41681   ac_end=$ac_max_sed_lines # Line after last line for current file.
41682   ac_more_lines=:
41683   ac_sed_cmds=
41684   while $ac_more_lines; do
41685     if test $ac_beg -gt 1; then
41686       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
41687     else
41688       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
41689     fi
41690     if test ! -s $tmp/subs.frag; then
41691       ac_more_lines=false
41692     else
41693       # The purpose of the label and of the branching condition is to
41694       # speed up the sed processing (if there are no `@' at all, there
41695       # is no need to browse any of the substitutions).
41696       # These are the two extra sed commands mentioned above.
41697       (echo ':t
41698   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
41699       if test -z "$ac_sed_cmds"; then
41700         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
41701       else
41702         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
41703       fi
41704       ac_sed_frag=`expr $ac_sed_frag + 1`
41705       ac_beg=$ac_end
41706       ac_end=`expr $ac_end + $ac_max_sed_lines`
41707     fi
41708   done
41709   if test -z "$ac_sed_cmds"; then
41710     ac_sed_cmds=cat
41711   fi
41712 fi # test -n "$CONFIG_FILES"
41713
41714 _ACEOF
41715 cat >>$CONFIG_STATUS <<\_ACEOF
41716 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
41717   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
41718   case $ac_file in
41719   - | *:- | *:-:* ) # input from stdin
41720         cat >$tmp/stdin
41721         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41722         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41723   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41724         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41725   * )   ac_file_in=$ac_file.in ;;
41726   esac
41727
41728   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
41729   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
41730 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41731          X"$ac_file" : 'X\(//\)[^/]' \| \
41732          X"$ac_file" : 'X\(//\)$' \| \
41733          X"$ac_file" : 'X\(/\)' \| \
41734          .     : '\(.\)' 2>/dev/null ||
41735 echo X"$ac_file" |
41736     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41737           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41738           /^X\(\/\/\)$/{ s//\1/; q; }
41739           /^X\(\/\).*/{ s//\1/; q; }
41740           s/.*/./; q'`
41741   { if $as_mkdir_p; then
41742     mkdir -p "$ac_dir"
41743   else
41744     as_dir="$ac_dir"
41745     as_dirs=
41746     while test ! -d "$as_dir"; do
41747       as_dirs="$as_dir $as_dirs"
41748       as_dir=`(dirname "$as_dir") 2>/dev/null ||
41749 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41750          X"$as_dir" : 'X\(//\)[^/]' \| \
41751          X"$as_dir" : 'X\(//\)$' \| \
41752          X"$as_dir" : 'X\(/\)' \| \
41753          .     : '\(.\)' 2>/dev/null ||
41754 echo X"$as_dir" |
41755     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
41756           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
41757           /^X\(\/\/\)$/{ s//\1/; q; }
41758           /^X\(\/\).*/{ s//\1/; q; }
41759           s/.*/./; q'`
41760     done
41761     test ! -n "$as_dirs" || mkdir $as_dirs
41762   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
41763 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
41764    { (exit 1); exit 1; }; }; }
41765
41766   ac_builddir=.
41767
41768 if test "$ac_dir" != .; then
41769   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
41770   # A "../" for each directory in $ac_dir_suffix.
41771   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
41772 else
41773   ac_dir_suffix= ac_top_builddir=
41774 fi
41775
41776 case $srcdir in
41777   .)  # No --srcdir option.  We are building in place.
41778     ac_srcdir=.
41779     if test -z "$ac_top_builddir"; then
41780        ac_top_srcdir=.
41781     else
41782        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
41783     fi ;;
41784   [\\/]* | ?:[\\/]* )  # Absolute path.
41785     ac_srcdir=$srcdir$ac_dir_suffix;
41786     ac_top_srcdir=$srcdir ;;
41787   *) # Relative path.
41788     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
41789     ac_top_srcdir=$ac_top_builddir$srcdir ;;
41790 esac
41791
41792 # Do not use `cd foo && pwd` to compute absolute paths, because
41793 # the directories may not exist.
41794 case `pwd` in
41795 .) ac_abs_builddir="$ac_dir";;
41796 *)
41797   case "$ac_dir" in
41798   .) ac_abs_builddir=`pwd`;;
41799   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
41800   *) ac_abs_builddir=`pwd`/"$ac_dir";;
41801   esac;;
41802 esac
41803 case $ac_abs_builddir in
41804 .) ac_abs_top_builddir=${ac_top_builddir}.;;
41805 *)
41806   case ${ac_top_builddir}. in
41807   .) ac_abs_top_builddir=$ac_abs_builddir;;
41808   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
41809   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
41810   esac;;
41811 esac
41812 case $ac_abs_builddir in
41813 .) ac_abs_srcdir=$ac_srcdir;;
41814 *)
41815   case $ac_srcdir in
41816   .) ac_abs_srcdir=$ac_abs_builddir;;
41817   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
41818   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
41819   esac;;
41820 esac
41821 case $ac_abs_builddir in
41822 .) ac_abs_top_srcdir=$ac_top_srcdir;;
41823 *)
41824   case $ac_top_srcdir in
41825   .) ac_abs_top_srcdir=$ac_abs_builddir;;
41826   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
41827   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
41828   esac;;
41829 esac
41830
41831
41832   case $INSTALL in
41833   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
41834   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
41835   esac
41836
41837   if test x"$ac_file" != x-; then
41838     { echo "$as_me:$LINENO: creating $ac_file" >&5
41839 echo "$as_me: creating $ac_file" >&6;}
41840     rm -f "$ac_file"
41841   fi
41842   # Let's still pretend it is `configure' which instantiates (i.e., don't
41843   # use $as_me), people would be surprised to read:
41844   #    /* config.h.  Generated by config.status.  */
41845   if test x"$ac_file" = x-; then
41846     configure_input=
41847   else
41848     configure_input="$ac_file.  "
41849   fi
41850   configure_input=$configure_input"Generated from `echo $ac_file_in |
41851                                      sed 's,.*/,,'` by configure."
41852
41853   # First look for the input files in the build tree, otherwise in the
41854   # src tree.
41855   ac_file_inputs=`IFS=:
41856     for f in $ac_file_in; do
41857       case $f in
41858       -) echo $tmp/stdin ;;
41859       [\\/$]*)
41860          # Absolute (can't be DOS-style, as IFS=:)
41861          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41862 echo "$as_me: error: cannot find input file: $f" >&2;}
41863    { (exit 1); exit 1; }; }
41864          echo "$f";;
41865       *) # Relative
41866          if test -f "$f"; then
41867            # Build tree
41868            echo "$f"
41869          elif test -f "$srcdir/$f"; then
41870            # Source tree
41871            echo "$srcdir/$f"
41872          else
41873            # /dev/null tree
41874            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41875 echo "$as_me: error: cannot find input file: $f" >&2;}
41876    { (exit 1); exit 1; }; }
41877          fi;;
41878       esac
41879     done` || { (exit 1); exit 1; }
41880 _ACEOF
41881 cat >>$CONFIG_STATUS <<_ACEOF
41882   sed "$ac_vpsub
41883 $extrasub
41884 _ACEOF
41885 cat >>$CONFIG_STATUS <<\_ACEOF
41886 :t
41887 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
41888 s,@configure_input@,$configure_input,;t t
41889 s,@srcdir@,$ac_srcdir,;t t
41890 s,@abs_srcdir@,$ac_abs_srcdir,;t t
41891 s,@top_srcdir@,$ac_top_srcdir,;t t
41892 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
41893 s,@builddir@,$ac_builddir,;t t
41894 s,@abs_builddir@,$ac_abs_builddir,;t t
41895 s,@top_builddir@,$ac_top_builddir,;t t
41896 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
41897 s,@INSTALL@,$ac_INSTALL,;t t
41898 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
41899   rm -f $tmp/stdin
41900   if test x"$ac_file" != x-; then
41901     mv $tmp/out $ac_file
41902   else
41903     cat $tmp/out
41904     rm -f $tmp/out
41905   fi
41906
41907 done
41908 _ACEOF
41909 cat >>$CONFIG_STATUS <<\_ACEOF
41910
41911 #
41912 # CONFIG_HEADER section.
41913 #
41914
41915 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
41916 # NAME is the cpp macro being defined and VALUE is the value it is being given.
41917 #
41918 # ac_d sets the value in "#define NAME VALUE" lines.
41919 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
41920 ac_dB='[         ].*$,\1#\2'
41921 ac_dC=' '
41922 ac_dD=',;t'
41923 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
41924 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
41925 ac_uB='$,\1#\2define\3'
41926 ac_uC=' '
41927 ac_uD=',;t'
41928
41929 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
41930   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
41931   case $ac_file in
41932   - | *:- | *:-:* ) # input from stdin
41933         cat >$tmp/stdin
41934         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41935         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41936   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
41937         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
41938   * )   ac_file_in=$ac_file.in ;;
41939   esac
41940
41941   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
41942 echo "$as_me: creating $ac_file" >&6;}
41943
41944   # First look for the input files in the build tree, otherwise in the
41945   # src tree.
41946   ac_file_inputs=`IFS=:
41947     for f in $ac_file_in; do
41948       case $f in
41949       -) echo $tmp/stdin ;;
41950       [\\/$]*)
41951          # Absolute (can't be DOS-style, as IFS=:)
41952          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41953 echo "$as_me: error: cannot find input file: $f" >&2;}
41954    { (exit 1); exit 1; }; }
41955          # Do quote $f, to prevent DOS paths from being IFS'd.
41956          echo "$f";;
41957       *) # Relative
41958          if test -f "$f"; then
41959            # Build tree
41960            echo "$f"
41961          elif test -f "$srcdir/$f"; then
41962            # Source tree
41963            echo "$srcdir/$f"
41964          else
41965            # /dev/null tree
41966            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
41967 echo "$as_me: error: cannot find input file: $f" >&2;}
41968    { (exit 1); exit 1; }; }
41969          fi;;
41970       esac
41971     done` || { (exit 1); exit 1; }
41972   # Remove the trailing spaces.
41973   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
41974
41975 _ACEOF
41976
41977 # Transform confdefs.h into two sed scripts, `conftest.defines' and
41978 # `conftest.undefs', that substitutes the proper values into
41979 # config.h.in to produce config.h.  The first handles `#define'
41980 # templates, and the second `#undef' templates.
41981 # And first: Protect against being on the right side of a sed subst in
41982 # config.status.  Protect against being in an unquoted here document
41983 # in config.status.
41984 rm -f conftest.defines conftest.undefs
41985 # Using a here document instead of a string reduces the quoting nightmare.
41986 # Putting comments in sed scripts is not portable.
41987 #
41988 # `end' is used to avoid that the second main sed command (meant for
41989 # 0-ary CPP macros) applies to n-ary macro definitions.
41990 # See the Autoconf documentation for `clear'.
41991 cat >confdef2sed.sed <<\_ACEOF
41992 s/[\\&,]/\\&/g
41993 s,[\\$`],\\&,g
41994 t clear
41995 : clear
41996 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
41997 t end
41998 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
41999 : end
42000 _ACEOF
42001 # If some macros were called several times there might be several times
42002 # the same #defines, which is useless.  Nevertheless, we may not want to
42003 # sort them, since we want the *last* AC-DEFINE to be honored.
42004 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
42005 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
42006 rm -f confdef2sed.sed
42007
42008 # This sed command replaces #undef with comments.  This is necessary, for
42009 # example, in the case of _POSIX_SOURCE, which is predefined and required
42010 # on some systems where configure will not decide to define it.
42011 cat >>conftest.undefs <<\_ACEOF
42012 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
42013 _ACEOF
42014
42015 # Break up conftest.defines because some shells have a limit on the size
42016 # of here documents, and old seds have small limits too (100 cmds).
42017 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
42018 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
42019 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
42020 echo '  :' >>$CONFIG_STATUS
42021 rm -f conftest.tail
42022 while grep . conftest.defines >/dev/null
42023 do
42024   # Write a limited-size here document to $tmp/defines.sed.
42025   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
42026   # Speed up: don't consider the non `#define' lines.
42027   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
42028   # Work around the forget-to-reset-the-flag bug.
42029   echo 't clr' >>$CONFIG_STATUS
42030   echo ': clr' >>$CONFIG_STATUS
42031   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
42032   echo 'CEOF
42033   sed -f $tmp/defines.sed $tmp/in >$tmp/out
42034   rm -f $tmp/in
42035   mv $tmp/out $tmp/in
42036 ' >>$CONFIG_STATUS
42037   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
42038   rm -f conftest.defines
42039   mv conftest.tail conftest.defines
42040 done
42041 rm -f conftest.defines
42042 echo '  fi # grep' >>$CONFIG_STATUS
42043 echo >>$CONFIG_STATUS
42044
42045 # Break up conftest.undefs because some shells have a limit on the size
42046 # of here documents, and old seds have small limits too (100 cmds).
42047 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
42048 rm -f conftest.tail
42049 while grep . conftest.undefs >/dev/null
42050 do
42051   # Write a limited-size here document to $tmp/undefs.sed.
42052   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
42053   # Speed up: don't consider the non `#undef'
42054   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
42055   # Work around the forget-to-reset-the-flag bug.
42056   echo 't clr' >>$CONFIG_STATUS
42057   echo ': clr' >>$CONFIG_STATUS
42058   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
42059   echo 'CEOF
42060   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
42061   rm -f $tmp/in
42062   mv $tmp/out $tmp/in
42063 ' >>$CONFIG_STATUS
42064   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
42065   rm -f conftest.undefs
42066   mv conftest.tail conftest.undefs
42067 done
42068 rm -f conftest.undefs
42069
42070 cat >>$CONFIG_STATUS <<\_ACEOF
42071   # Let's still pretend it is `configure' which instantiates (i.e., don't
42072   # use $as_me), people would be surprised to read:
42073   #    /* config.h.  Generated by config.status.  */
42074   if test x"$ac_file" = x-; then
42075     echo "/* Generated by configure.  */" >$tmp/config.h
42076   else
42077     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
42078   fi
42079   cat $tmp/in >>$tmp/config.h
42080   rm -f $tmp/in
42081   if test x"$ac_file" != x-; then
42082     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
42083       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
42084 echo "$as_me: $ac_file is unchanged" >&6;}
42085     else
42086       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
42087 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42088          X"$ac_file" : 'X\(//\)[^/]' \| \
42089          X"$ac_file" : 'X\(//\)$' \| \
42090          X"$ac_file" : 'X\(/\)' \| \
42091          .     : '\(.\)' 2>/dev/null ||
42092 echo X"$ac_file" |
42093     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42094           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42095           /^X\(\/\/\)$/{ s//\1/; q; }
42096           /^X\(\/\).*/{ s//\1/; q; }
42097           s/.*/./; q'`
42098       { if $as_mkdir_p; then
42099     mkdir -p "$ac_dir"
42100   else
42101     as_dir="$ac_dir"
42102     as_dirs=
42103     while test ! -d "$as_dir"; do
42104       as_dirs="$as_dir $as_dirs"
42105       as_dir=`(dirname "$as_dir") 2>/dev/null ||
42106 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42107          X"$as_dir" : 'X\(//\)[^/]' \| \
42108          X"$as_dir" : 'X\(//\)$' \| \
42109          X"$as_dir" : 'X\(/\)' \| \
42110          .     : '\(.\)' 2>/dev/null ||
42111 echo X"$as_dir" |
42112     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42113           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42114           /^X\(\/\/\)$/{ s//\1/; q; }
42115           /^X\(\/\).*/{ s//\1/; q; }
42116           s/.*/./; q'`
42117     done
42118     test ! -n "$as_dirs" || mkdir $as_dirs
42119   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
42120 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
42121    { (exit 1); exit 1; }; }; }
42122
42123       rm -f $ac_file
42124       mv $tmp/config.h $ac_file
42125     fi
42126   else
42127     cat $tmp/config.h
42128     rm -f $tmp/config.h
42129   fi
42130 # Compute $ac_file's index in $config_headers.
42131 _am_stamp_count=1
42132 for _am_header in $config_headers :; do
42133   case $_am_header in
42134     $ac_file | $ac_file:* )
42135       break ;;
42136     * )
42137       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
42138   esac
42139 done
42140 echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
42141 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42142          X$ac_file : 'X\(//\)[^/]' \| \
42143          X$ac_file : 'X\(//\)$' \| \
42144          X$ac_file : 'X\(/\)' \| \
42145          .     : '\(.\)' 2>/dev/null ||
42146 echo X$ac_file |
42147     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42148           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42149           /^X\(\/\/\)$/{ s//\1/; q; }
42150           /^X\(\/\).*/{ s//\1/; q; }
42151           s/.*/./; q'`/stamp-h$_am_stamp_count
42152 done
42153 _ACEOF
42154 cat >>$CONFIG_STATUS <<\_ACEOF
42155
42156 #
42157 # CONFIG_COMMANDS section.
42158 #
42159 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
42160   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
42161   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
42162   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
42163 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42164          X"$ac_dest" : 'X\(//\)[^/]' \| \
42165          X"$ac_dest" : 'X\(//\)$' \| \
42166          X"$ac_dest" : 'X\(/\)' \| \
42167          .     : '\(.\)' 2>/dev/null ||
42168 echo X"$ac_dest" |
42169     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42170           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42171           /^X\(\/\/\)$/{ s//\1/; q; }
42172           /^X\(\/\).*/{ s//\1/; q; }
42173           s/.*/./; q'`
42174   { if $as_mkdir_p; then
42175     mkdir -p "$ac_dir"
42176   else
42177     as_dir="$ac_dir"
42178     as_dirs=
42179     while test ! -d "$as_dir"; do
42180       as_dirs="$as_dir $as_dirs"
42181       as_dir=`(dirname "$as_dir") 2>/dev/null ||
42182 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42183          X"$as_dir" : 'X\(//\)[^/]' \| \
42184          X"$as_dir" : 'X\(//\)$' \| \
42185          X"$as_dir" : 'X\(/\)' \| \
42186          .     : '\(.\)' 2>/dev/null ||
42187 echo X"$as_dir" |
42188     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42189           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42190           /^X\(\/\/\)$/{ s//\1/; q; }
42191           /^X\(\/\).*/{ s//\1/; q; }
42192           s/.*/./; q'`
42193     done
42194     test ! -n "$as_dirs" || mkdir $as_dirs
42195   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
42196 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
42197    { (exit 1); exit 1; }; }; }
42198
42199   ac_builddir=.
42200
42201 if test "$ac_dir" != .; then
42202   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
42203   # A "../" for each directory in $ac_dir_suffix.
42204   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
42205 else
42206   ac_dir_suffix= ac_top_builddir=
42207 fi
42208
42209 case $srcdir in
42210   .)  # No --srcdir option.  We are building in place.
42211     ac_srcdir=.
42212     if test -z "$ac_top_builddir"; then
42213        ac_top_srcdir=.
42214     else
42215        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
42216     fi ;;
42217   [\\/]* | ?:[\\/]* )  # Absolute path.
42218     ac_srcdir=$srcdir$ac_dir_suffix;
42219     ac_top_srcdir=$srcdir ;;
42220   *) # Relative path.
42221     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
42222     ac_top_srcdir=$ac_top_builddir$srcdir ;;
42223 esac
42224
42225 # Do not use `cd foo && pwd` to compute absolute paths, because
42226 # the directories may not exist.
42227 case `pwd` in
42228 .) ac_abs_builddir="$ac_dir";;
42229 *)
42230   case "$ac_dir" in
42231   .) ac_abs_builddir=`pwd`;;
42232   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
42233   *) ac_abs_builddir=`pwd`/"$ac_dir";;
42234   esac;;
42235 esac
42236 case $ac_abs_builddir in
42237 .) ac_abs_top_builddir=${ac_top_builddir}.;;
42238 *)
42239   case ${ac_top_builddir}. in
42240   .) ac_abs_top_builddir=$ac_abs_builddir;;
42241   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
42242   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
42243   esac;;
42244 esac
42245 case $ac_abs_builddir in
42246 .) ac_abs_srcdir=$ac_srcdir;;
42247 *)
42248   case $ac_srcdir in
42249   .) ac_abs_srcdir=$ac_abs_builddir;;
42250   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
42251   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
42252   esac;;
42253 esac
42254 case $ac_abs_builddir in
42255 .) ac_abs_top_srcdir=$ac_top_srcdir;;
42256 *)
42257   case $ac_top_srcdir in
42258   .) ac_abs_top_srcdir=$ac_abs_builddir;;
42259   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
42260   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
42261   esac;;
42262 esac
42263
42264
42265   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
42266 echo "$as_me: executing $ac_dest commands" >&6;}
42267   case $ac_dest in
42268     depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
42269   # Strip MF so we end up with the name of the file.
42270   mf=`echo "$mf" | sed -e 's/:.*$//'`
42271   # Check whether this is an Automake generated Makefile or not.
42272   # We used to match only the files named `Makefile.in', but
42273   # some people rename them; so instead we look at the file content.
42274   # Grep'ing the first line is not enough: some people post-process
42275   # each Makefile.in and add a new line on top of each file to say so.
42276   # So let's grep whole file.
42277   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
42278     dirpart=`(dirname "$mf") 2>/dev/null ||
42279 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42280          X"$mf" : 'X\(//\)[^/]' \| \
42281          X"$mf" : 'X\(//\)$' \| \
42282          X"$mf" : 'X\(/\)' \| \
42283          .     : '\(.\)' 2>/dev/null ||
42284 echo X"$mf" |
42285     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42286           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42287           /^X\(\/\/\)$/{ s//\1/; q; }
42288           /^X\(\/\).*/{ s//\1/; q; }
42289           s/.*/./; q'`
42290   else
42291     continue
42292   fi
42293   # Extract the definition of DEPDIR, am__include, and am__quote
42294   # from the Makefile without running `make'.
42295   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
42296   test -z "$DEPDIR" && continue
42297   am__include=`sed -n 's/^am__include = //p' < "$mf"`
42298   test -z "am__include" && continue
42299   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
42300   # When using ansi2knr, U may be empty or an underscore; expand it
42301   U=`sed -n 's/^U = //p' < "$mf"`
42302   # Find all dependency output files, they are included files with
42303   # $(DEPDIR) in their names.  We invoke sed twice because it is the
42304   # simplest approach to changing $(DEPDIR) to its actual value in the
42305   # expansion.
42306   for file in `sed -n "
42307     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
42308        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
42309     # Make sure the directory exists.
42310     test -f "$dirpart/$file" && continue
42311     fdir=`(dirname "$file") 2>/dev/null ||
42312 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42313          X"$file" : 'X\(//\)[^/]' \| \
42314          X"$file" : 'X\(//\)$' \| \
42315          X"$file" : 'X\(/\)' \| \
42316          .     : '\(.\)' 2>/dev/null ||
42317 echo X"$file" |
42318     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42319           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42320           /^X\(\/\/\)$/{ s//\1/; q; }
42321           /^X\(\/\).*/{ s//\1/; q; }
42322           s/.*/./; q'`
42323     { if $as_mkdir_p; then
42324     mkdir -p $dirpart/$fdir
42325   else
42326     as_dir=$dirpart/$fdir
42327     as_dirs=
42328     while test ! -d "$as_dir"; do
42329       as_dirs="$as_dir $as_dirs"
42330       as_dir=`(dirname "$as_dir") 2>/dev/null ||
42331 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42332          X"$as_dir" : 'X\(//\)[^/]' \| \
42333          X"$as_dir" : 'X\(//\)$' \| \
42334          X"$as_dir" : 'X\(/\)' \| \
42335          .     : '\(.\)' 2>/dev/null ||
42336 echo X"$as_dir" |
42337     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
42338           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
42339           /^X\(\/\/\)$/{ s//\1/; q; }
42340           /^X\(\/\).*/{ s//\1/; q; }
42341           s/.*/./; q'`
42342     done
42343     test ! -n "$as_dirs" || mkdir $as_dirs
42344   fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
42345 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
42346    { (exit 1); exit 1; }; }; }
42347
42348     # echo "creating $dirpart/$file"
42349     echo '# dummy' > "$dirpart/$file"
42350   done
42351 done
42352  ;;
42353     default )
42354 chmod +x tests/run
42355 date > stamp-h
42356 BACKENDSC="servers/slapd/backends.c"
42357 echo "Making $BACKENDSC"
42358 rm -f $BACKENDSC
42359 cat > $BACKENDSC << ENDX
42360 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
42361  *
42362  * Copyright 1998-2007 The OpenLDAP Foundation.
42363  * All rights reserved.
42364  *
42365  * Redistribution and use in source and binary forms, with or without
42366  * modification, are permitted only as authorized by the OpenLDAP
42367  * Public License.
42368  *
42369  * A copy of this license is available in the file LICENSE in the
42370  * top-level directory of the distribution or, alternatively, at
42371  * <http://www.OpenLDAP.org/license.html>.
42372  */
42373 /* This file is automatically generated by configure; please do not edit. */
42374
42375 #include "portable.h"
42376 #include "slap.h"
42377
42378 ENDX
42379 if test "${STATIC_BACKENDS}"; then
42380         for b in config ${STATIC_BACKENDS}; do
42381                 bb=`echo "${b}" | sed -e 's/back-//'`
42382                 cat >> $BACKENDSC << ENDX
42383 extern BI_init ${bb}_back_initialize;
42384 ENDX
42385         done
42386
42387         cat >> $BACKENDSC << ENDX
42388
42389 BackendInfo slap_binfo[] = {
42390 ENDX
42391
42392         for b in config ${STATIC_BACKENDS}; do
42393                 bb=`echo "${b}" | sed -e 's/back-//'`
42394                 echo "    Add ${bb} ..."
42395                 cat >> $BACKENDSC << ENDX
42396         { "${bb}", ${bb}_back_initialize },
42397 ENDX
42398         done
42399
42400         cat >> $BACKENDSC << ENDX
42401         { NULL, NULL },
42402 };
42403
42404 /* end of generated file */
42405 ENDX
42406 fi
42407 OVERLAYSC="servers/slapd/overlays/statover.c"
42408 echo "Making $OVERLAYSC"
42409 rm -f $OVERLAYSC
42410 cat > $OVERLAYSC << ENDX
42411 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
42412  *
42413  * Copyright 1998-2007 The OpenLDAP Foundation.
42414  * All rights reserved.
42415  *
42416  * Redistribution and use in source and binary forms, with or without
42417  * modification, are permitted only as authorized by the OpenLDAP
42418  * Public License.
42419  *
42420  * A copy of this license is available in the file LICENSE in the
42421  * top-level directory of the distribution or, alternatively, at
42422  * <http://www.OpenLDAP.org/license.html>.
42423  */
42424 /* This file is automatically generated by configure; please do not edit. */
42425
42426 #include "portable.h"
42427 #include "slap.h"
42428
42429 ENDX
42430 if test "${STATIC_OVERLAYS}"; then
42431         for o in ${STATIC_OVERLAYS}; do
42432                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
42433                 cat >> $OVERLAYSC << ENDX
42434 extern OV_init ${oo}_initialize;
42435 ENDX
42436         done
42437 fi
42438
42439 cat >> $OVERLAYSC << ENDX
42440
42441 OverlayInit slap_oinfo[] = {
42442 ENDX
42443
42444 if test "${STATIC_OVERLAYS}"; then
42445         for o in ${STATIC_OVERLAYS}; do
42446                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
42447                 echo "    Add ${oo} ..."
42448                 cat >> $OVERLAYSC << ENDX
42449         { "${oo}", ${oo}_initialize },
42450 ENDX
42451         done
42452 fi
42453
42454         cat >> $OVERLAYSC << ENDX
42455         { NULL, NULL },
42456 };
42457
42458 /* end of generated file */
42459 ENDX
42460
42461 if test "${ol_cv_mkdep}" = no; then
42462         echo '(Do not "make depend"; we do not know how to build dependencies)'
42463 else
42464         echo 'Please run "make depend" to build dependencies'
42465 fi
42466  ;;
42467   esac
42468 done
42469 _ACEOF
42470
42471 cat >>$CONFIG_STATUS <<\_ACEOF
42472
42473 { (exit 0); exit 0; }
42474 _ACEOF
42475 chmod +x $CONFIG_STATUS
42476 ac_clean_files=$ac_clean_files_save
42477
42478
42479 # configure is writing to config.log, and then calls config.status.
42480 # config.status does its own redirection, appending to config.log.
42481 # Unfortunately, on DOS this fails, as config.log is still kept open
42482 # by configure, so config.status won't be able to write to it; its
42483 # output is simply discarded.  So we exec the FD to /dev/null,
42484 # effectively closing config.log, so it can be properly (re)opened and
42485 # appended to by config.status.  When coming back to configure, we
42486 # need to make the FD available again.
42487 if test "$no_create" != yes; then
42488   ac_cs_success=:
42489   ac_config_status_args=
42490   test "$silent" = yes &&
42491     ac_config_status_args="$ac_config_status_args --quiet"
42492   exec 5>/dev/null
42493   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
42494   exec 5>>config.log
42495   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
42496   # would make configure fail if this is the last instruction.
42497   $ac_cs_success || { (exit 1); exit 1; }
42498 fi
42499