]> git.sur5r.net Git - openldap/blob - configure
More configure tweaks (autoconf 2.57)... much more needed
[openldap] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.57.
4 #
5 # Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved.
6 #
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12 #
13 #
14 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
15 # Free Software Foundation, Inc.
16 # This configure script is free software; the Free Software Foundation
17 # gives unlimited permission to copy, distribute and modify it.
18 ## --------------------- ##
19 ## M4sh Initialization.  ##
20 ## --------------------- ##
21
22 # Be Bourne compatible
23 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24   emulate sh
25   NULLCMD=:
26   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
27   # is contrary to our usage.  Disable this feature.
28   alias -g '${1+"$@"}'='"$@"'
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Support unset when possible.
34 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
35   as_unset=unset
36 else
37   as_unset=false
38 fi
39
40
41 # Work around bugs in pre-3.0 UWIN ksh.
42 $as_unset ENV MAIL MAILPATH
43 PS1='$ '
44 PS2='> '
45 PS4='+ '
46
47 # NLS nuisances.
48 for as_var in \
49   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
50   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
51   LC_TELEPHONE LC_TIME
52 do
53   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
54     eval $as_var=C; export $as_var
55   else
56     $as_unset $as_var
57   fi
58 done
59
60 # Required to use basename.
61 if expr a : '\(a\)' >/dev/null 2>&1; then
62   as_expr=expr
63 else
64   as_expr=false
65 fi
66
67 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
68   as_basename=basename
69 else
70   as_basename=false
71 fi
72
73
74 # Name of the executable.
75 as_me=`$as_basename "$0" ||
76 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
77          X"$0" : 'X\(//\)$' \| \
78          X"$0" : 'X\(/\)$' \| \
79          .     : '\(.\)' 2>/dev/null ||
80 echo X/"$0" |
81     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
82           /^X\/\(\/\/\)$/{ s//\1/; q; }
83           /^X\/\(\/\).*/{ s//\1/; q; }
84           s/.*/./; q'`
85
86
87 # PATH needs CR, and LINENO needs CR and PATH.
88 # Avoid depending upon Character Ranges.
89 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
90 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
91 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
92 as_cr_digits='0123456789'
93 as_cr_alnum=$as_cr_Letters$as_cr_digits
94
95 # The user is always right.
96 if test "${PATH_SEPARATOR+set}" != set; then
97   echo "#! /bin/sh" >conf$$.sh
98   echo  "exit 0"   >>conf$$.sh
99   chmod +x conf$$.sh
100   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
101     PATH_SEPARATOR=';'
102   else
103     PATH_SEPARATOR=:
104   fi
105   rm -f conf$$.sh
106 fi
107
108
109   as_lineno_1=$LINENO
110   as_lineno_2=$LINENO
111   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
112   test "x$as_lineno_1" != "x$as_lineno_2" &&
113   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
114   # Find who we are.  Look in the path if we contain no path at all
115   # relative or not.
116   case $0 in
117     *[\\/]* ) as_myself=$0 ;;
118     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
119 for as_dir in $PATH
120 do
121   IFS=$as_save_IFS
122   test -z "$as_dir" && as_dir=.
123   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
124 done
125
126        ;;
127   esac
128   # We did not find ourselves, most probably we were run as `sh COMMAND'
129   # in which case we are not to be found in the path.
130   if test "x$as_myself" = x; then
131     as_myself=$0
132   fi
133   if test ! -f "$as_myself"; then
134     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
135    { (exit 1); exit 1; }; }
136   fi
137   case $CONFIG_SHELL in
138   '')
139     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
140 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
141 do
142   IFS=$as_save_IFS
143   test -z "$as_dir" && as_dir=.
144   for as_base in sh bash ksh sh5; do
145          case $as_dir in
146          /*)
147            if ("$as_dir/$as_base" -c '
148   as_lineno_1=$LINENO
149   as_lineno_2=$LINENO
150   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
151   test "x$as_lineno_1" != "x$as_lineno_2" &&
152   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
153              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
154              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
155              CONFIG_SHELL=$as_dir/$as_base
156              export CONFIG_SHELL
157              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
158            fi;;
159          esac
160        done
161 done
162 ;;
163   esac
164
165   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
166   # uniformly replaced by the line number.  The first 'sed' inserts a
167   # line-number line before each line; the second 'sed' does the real
168   # work.  The second script uses 'N' to pair each line-number line
169   # with the numbered line, and appends trailing '-' during
170   # substitution so that $LINENO is not a special case at line end.
171   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
172   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
173   sed '=' <$as_myself |
174     sed '
175       N
176       s,$,-,
177       : loop
178       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
179       t loop
180       s,-$,,
181       s,^['$as_cr_digits']*\n,,
182     ' >$as_me.lineno &&
183   chmod +x $as_me.lineno ||
184     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
185    { (exit 1); exit 1; }; }
186
187   # Don't try to exec as it changes $[0], causing all sort of problems
188   # (the dirname of $[0] is not the place where we might find the
189   # original and so on.  Autoconf is especially sensible to this).
190   . ./$as_me.lineno
191   # Exit status is that of the last command.
192   exit
193 }
194
195
196 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
197   *c*,-n*) ECHO_N= ECHO_C='
198 ' ECHO_T='      ' ;;
199   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
200   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
201 esac
202
203 if expr a : '\(a\)' >/dev/null 2>&1; then
204   as_expr=expr
205 else
206   as_expr=false
207 fi
208
209 rm -f conf$$ conf$$.exe conf$$.file
210 echo >conf$$.file
211 if ln -s conf$$.file conf$$ 2>/dev/null; then
212   # We could just check for DJGPP; but this test a) works b) is more generic
213   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
214   if test -f conf$$.exe; then
215     # Don't use ln at all; we don't have any links
216     as_ln_s='cp -p'
217   else
218     as_ln_s='ln -s'
219   fi
220 elif ln conf$$.file conf$$ 2>/dev/null; then
221   as_ln_s=ln
222 else
223   as_ln_s='cp -p'
224 fi
225 rm -f conf$$ conf$$.exe conf$$.file
226
227 if mkdir -p . 2>/dev/null; then
228   as_mkdir_p=:
229 else
230   as_mkdir_p=false
231 fi
232
233 as_executable_p="test -f"
234
235 # Sed expression to map a string onto a valid CPP name.
236 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
237
238 # Sed expression to map a string onto a valid variable name.
239 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
240
241
242 # IFS
243 # We need space, tab and new line, in precisely that order.
244 as_nl='
245 '
246 IFS="   $as_nl"
247
248 # CDPATH.
249 $as_unset CDPATH
250
251
252 # Find the correct PATH separator.  Usually this is `:', but
253 # DJGPP uses `;' like DOS.
254 if test "X${PATH_SEPARATOR+set}" != Xset; then
255   UNAME=${UNAME-`uname 2>/dev/null`}
256   case X$UNAME in
257     *-DOS) lt_cv_sys_path_separator=';' ;;
258     *)     lt_cv_sys_path_separator=':' ;;
259   esac
260   PATH_SEPARATOR=$lt_cv_sys_path_separator
261 fi
262
263
264 # Check that we are running under the correct shell.
265 SHELL=${CONFIG_SHELL-/bin/sh}
266
267 case X$ECHO in
268 X*--fallback-echo)
269   # Remove one level of quotation (which was required for Make).
270   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
271   ;;
272 esac
273
274 echo=${ECHO-echo}
275 if test "X$1" = X--no-reexec; then
276   # Discard the --no-reexec flag, and continue.
277   shift
278 elif test "X$1" = X--fallback-echo; then
279   # Avoid inline document here, it may be left over
280   :
281 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
282   # Yippee, $echo works!
283   :
284 else
285   # Restart under the correct shell.
286   exec $SHELL "$0" --no-reexec ${1+"$@"}
287 fi
288
289 if test "X$1" = X--fallback-echo; then
290   # used as fallback echo
291   shift
292   cat <<EOF
293
294 EOF
295   exit 0
296 fi
297
298 # The HP-UX ksh and POSIX shell print the target directory to stdout
299 # if CDPATH is set.
300 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
301
302 if test -z "$ECHO"; then
303 if test "X${echo_test_string+set}" != Xset; then
304 # find a string as large as possible, as long as the shell can cope with it
305   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
306     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
307     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
308        echo_test_string="`eval $cmd`" &&
309        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
310     then
311       break
312     fi
313   done
314 fi
315
316 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
317    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
318    test "X$echo_testing_string" = "X$echo_test_string"; then
319   :
320 else
321   # The Solaris, AIX, and Digital Unix default echo programs unquote
322   # backslashes.  This makes it impossible to quote backslashes using
323   #   echo "$something" | sed 's/\\/\\\\/g'
324   #
325   # So, first we look for a working echo in the user's PATH.
326
327   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
328   for dir in $PATH /usr/ucb; do
329     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
330        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
331        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
332        test "X$echo_testing_string" = "X$echo_test_string"; then
333       echo="$dir/echo"
334       break
335     fi
336   done
337   IFS="$save_ifs"
338
339   if test "X$echo" = Xecho; then
340     # We didn't find a better echo, so look for alternatives.
341     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
342        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
343        test "X$echo_testing_string" = "X$echo_test_string"; then
344       # This shell has a builtin print -r that does the trick.
345       echo='print -r'
346     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
347          test "X$CONFIG_SHELL" != X/bin/ksh; then
348       # If we have ksh, try running configure again with it.
349       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
350       export ORIGINAL_CONFIG_SHELL
351       CONFIG_SHELL=/bin/ksh
352       export CONFIG_SHELL
353       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
354     else
355       # Try using printf.
356       echo='printf %s\n'
357       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
358          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
359          test "X$echo_testing_string" = "X$echo_test_string"; then
360         # Cool, printf works
361         :
362       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
363            test "X$echo_testing_string" = 'X\t' &&
364            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
365            test "X$echo_testing_string" = "X$echo_test_string"; then
366         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
367         export CONFIG_SHELL
368         SHELL="$CONFIG_SHELL"
369         export SHELL
370         echo="$CONFIG_SHELL $0 --fallback-echo"
371       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
372            test "X$echo_testing_string" = 'X\t' &&
373            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
374            test "X$echo_testing_string" = "X$echo_test_string"; then
375         echo="$CONFIG_SHELL $0 --fallback-echo"
376       else
377         # maybe with a smaller string...
378         prev=:
379
380         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
381           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
382           then
383             break
384           fi
385           prev="$cmd"
386         done
387
388         if test "$prev" != 'sed 50q "$0"'; then
389           echo_test_string=`eval $prev`
390           export echo_test_string
391           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
392         else
393           # Oops.  We lost completely, so just stick with echo.
394           echo=echo
395         fi
396       fi
397     fi
398   fi
399 fi
400 fi
401
402 # Copy echo and quote the copy suitably for passing to libtool from
403 # the Makefile, instead of quoting the original, which is used later.
404 ECHO=$echo
405 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
406    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
407 fi
408
409
410
411 # Name of the host.
412 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
413 # so uname gets run too.
414 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
415
416 exec 6>&1
417
418 #
419 # Initializations.
420 #
421 ac_default_prefix=/usr/local
422 ac_config_libobj_dir=.
423 cross_compiling=no
424 subdirs=
425 MFLAGS=
426 MAKEFLAGS=
427 SHELL=${CONFIG_SHELL-/bin/sh}
428
429 # Maximum number of lines to put in a shell here document.
430 # This variable seems obsolete.  It should probably be removed, and
431 # only ac_max_sed_lines should be used.
432 : ${ac_max_here_lines=38}
433
434 # Identity of this package.
435 PACKAGE_NAME=
436 PACKAGE_TARNAME=
437 PACKAGE_VERSION=
438 PACKAGE_STRING=
439 PACKAGE_BUGREPORT=
440
441 ac_unique_file="OpenLDAP"
442 ac_unique_file="include/ldap.h"
443 ac_default_prefix=/usr/local
444 # Factoring default headers for most tests.
445 ac_includes_default="\
446 #include <stdio.h>
447 #if HAVE_SYS_TYPES_H
448 # include <sys/types.h>
449 #endif
450 #if HAVE_SYS_STAT_H
451 # include <sys/stat.h>
452 #endif
453 #if STDC_HEADERS
454 # include <stdlib.h>
455 # include <stddef.h>
456 #else
457 # if HAVE_STDLIB_H
458 #  include <stdlib.h>
459 # endif
460 #endif
461 #if HAVE_STRING_H
462 # if !STDC_HEADERS && HAVE_MEMORY_H
463 #  include <memory.h>
464 # endif
465 # include <string.h>
466 #endif
467 #if HAVE_STRINGS_H
468 # include <strings.h>
469 #endif
470 #if HAVE_INTTYPES_H
471 # include <inttypes.h>
472 #else
473 # if HAVE_STDINT_H
474 #  include <stdint.h>
475 # endif
476 #endif
477 #if HAVE_UNISTD_H
478 # include <unistd.h>
479 #endif"
480
481 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 SHTOOL build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OPENLDAP_PACKAGE OPENLDAP_VERSION OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL LN_H PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_TCL BUILD_BDB_DYNAMIC BUILD_DNSSRV_DYNAMIC BUILD_LDAP_DYNAMIC BUILD_LDBM_DYNAMIC BUILD_META_DYNAMIC BUILD_MONITOR_DYNAMIC BUILD_NULL_DYNAMIC BUILD_PASSWD_DYNAMIC BUILD_PERL_DYNAMIC BUILD_SHELL_DYNAMIC BUILD_SQL_DYNAMIC BUILD_TCL_DYNAMIC BUILD_SLURPD LDAP_LIBS LDIF_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS MOD_TCL_LIB SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS READLINE_LIBS SASL_LIBS TERMCAP_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS SLAPD_SLP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
482 ac_subst_files=''
483
484 # Initialize some variables set by options.
485 ac_init_help=
486 ac_init_version=false
487 # The variables have the same names as the options, with
488 # dashes changed to underlines.
489 cache_file=/dev/null
490 exec_prefix=NONE
491 no_create=
492 no_recursion=
493 prefix=NONE
494 program_prefix=NONE
495 program_suffix=NONE
496 program_transform_name=s,x,x,
497 silent=
498 site=
499 srcdir=
500 verbose=
501 x_includes=NONE
502 x_libraries=NONE
503
504 # Installation directory options.
505 # These are left unexpanded so users can "make install exec_prefix=/foo"
506 # and all the variables that are supposed to be based on exec_prefix
507 # by default will actually change.
508 # Use braces instead of parens because sh, perl, etc. also accept them.
509 bindir='${exec_prefix}/bin'
510 sbindir='${exec_prefix}/sbin'
511 libexecdir='${exec_prefix}/libexec'
512 datadir='${prefix}/share'
513 sysconfdir='${prefix}/etc'
514 sharedstatedir='${prefix}/com'
515 localstatedir='${prefix}/var'
516 libdir='${exec_prefix}/lib'
517 includedir='${prefix}/include'
518 oldincludedir='/usr/include'
519 infodir='${prefix}/info'
520 mandir='${prefix}/man'
521
522 ac_prev=
523 for ac_option
524 do
525   # If the previous option needs an argument, assign it.
526   if test -n "$ac_prev"; then
527     eval "$ac_prev=\$ac_option"
528     ac_prev=
529     continue
530   fi
531
532   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
533
534   # Accept the important Cygnus configure options, so we can diagnose typos.
535
536   case $ac_option in
537
538   -bindir | --bindir | --bindi | --bind | --bin | --bi)
539     ac_prev=bindir ;;
540   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
541     bindir=$ac_optarg ;;
542
543   -build | --build | --buil | --bui | --bu)
544     ac_prev=build_alias ;;
545   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
546     build_alias=$ac_optarg ;;
547
548   -cache-file | --cache-file | --cache-fil | --cache-fi \
549   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
550     ac_prev=cache_file ;;
551   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
552   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
553     cache_file=$ac_optarg ;;
554
555   --config-cache | -C)
556     cache_file=config.cache ;;
557
558   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
559     ac_prev=datadir ;;
560   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
561   | --da=*)
562     datadir=$ac_optarg ;;
563
564   -disable-* | --disable-*)
565     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
566     # Reject names that are not valid shell variable names.
567     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
568       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
569    { (exit 1); exit 1; }; }
570     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
571     eval "enable_$ac_feature=no" ;;
572
573   -enable-* | --enable-*)
574     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
575     # Reject names that are not valid shell variable names.
576     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
577       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
578    { (exit 1); exit 1; }; }
579     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
580     case $ac_option in
581       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
582       *) ac_optarg=yes ;;
583     esac
584     eval "enable_$ac_feature='$ac_optarg'" ;;
585
586   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
587   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
588   | --exec | --exe | --ex)
589     ac_prev=exec_prefix ;;
590   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
591   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
592   | --exec=* | --exe=* | --ex=*)
593     exec_prefix=$ac_optarg ;;
594
595   -gas | --gas | --ga | --g)
596     # Obsolete; use --with-gas.
597     with_gas=yes ;;
598
599   -help | --help | --hel | --he | -h)
600     ac_init_help=long ;;
601   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
602     ac_init_help=recursive ;;
603   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
604     ac_init_help=short ;;
605
606   -host | --host | --hos | --ho)
607     ac_prev=host_alias ;;
608   -host=* | --host=* | --hos=* | --ho=*)
609     host_alias=$ac_optarg ;;
610
611   -includedir | --includedir | --includedi | --included | --include \
612   | --includ | --inclu | --incl | --inc)
613     ac_prev=includedir ;;
614   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
615   | --includ=* | --inclu=* | --incl=* | --inc=*)
616     includedir=$ac_optarg ;;
617
618   -infodir | --infodir | --infodi | --infod | --info | --inf)
619     ac_prev=infodir ;;
620   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
621     infodir=$ac_optarg ;;
622
623   -libdir | --libdir | --libdi | --libd)
624     ac_prev=libdir ;;
625   -libdir=* | --libdir=* | --libdi=* | --libd=*)
626     libdir=$ac_optarg ;;
627
628   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
629   | --libexe | --libex | --libe)
630     ac_prev=libexecdir ;;
631   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
632   | --libexe=* | --libex=* | --libe=*)
633     libexecdir=$ac_optarg ;;
634
635   -localstatedir | --localstatedir | --localstatedi | --localstated \
636   | --localstate | --localstat | --localsta | --localst \
637   | --locals | --local | --loca | --loc | --lo)
638     ac_prev=localstatedir ;;
639   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
640   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
641   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
642     localstatedir=$ac_optarg ;;
643
644   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
645     ac_prev=mandir ;;
646   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
647     mandir=$ac_optarg ;;
648
649   -nfp | --nfp | --nf)
650     # Obsolete; use --without-fp.
651     with_fp=no ;;
652
653   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
654   | --no-cr | --no-c | -n)
655     no_create=yes ;;
656
657   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
658   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
659     no_recursion=yes ;;
660
661   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
662   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
663   | --oldin | --oldi | --old | --ol | --o)
664     ac_prev=oldincludedir ;;
665   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
666   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
667   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
668     oldincludedir=$ac_optarg ;;
669
670   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
671     ac_prev=prefix ;;
672   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
673     prefix=$ac_optarg ;;
674
675   -program-prefix | --program-prefix | --program-prefi | --program-pref \
676   | --program-pre | --program-pr | --program-p)
677     ac_prev=program_prefix ;;
678   -program-prefix=* | --program-prefix=* | --program-prefi=* \
679   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
680     program_prefix=$ac_optarg ;;
681
682   -program-suffix | --program-suffix | --program-suffi | --program-suff \
683   | --program-suf | --program-su | --program-s)
684     ac_prev=program_suffix ;;
685   -program-suffix=* | --program-suffix=* | --program-suffi=* \
686   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
687     program_suffix=$ac_optarg ;;
688
689   -program-transform-name | --program-transform-name \
690   | --program-transform-nam | --program-transform-na \
691   | --program-transform-n | --program-transform- \
692   | --program-transform | --program-transfor \
693   | --program-transfo | --program-transf \
694   | --program-trans | --program-tran \
695   | --progr-tra | --program-tr | --program-t)
696     ac_prev=program_transform_name ;;
697   -program-transform-name=* | --program-transform-name=* \
698   | --program-transform-nam=* | --program-transform-na=* \
699   | --program-transform-n=* | --program-transform-=* \
700   | --program-transform=* | --program-transfor=* \
701   | --program-transfo=* | --program-transf=* \
702   | --program-trans=* | --program-tran=* \
703   | --progr-tra=* | --program-tr=* | --program-t=*)
704     program_transform_name=$ac_optarg ;;
705
706   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
707   | -silent | --silent | --silen | --sile | --sil)
708     silent=yes ;;
709
710   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
711     ac_prev=sbindir ;;
712   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
713   | --sbi=* | --sb=*)
714     sbindir=$ac_optarg ;;
715
716   -sharedstatedir | --sharedstatedir | --sharedstatedi \
717   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
718   | --sharedst | --shareds | --shared | --share | --shar \
719   | --sha | --sh)
720     ac_prev=sharedstatedir ;;
721   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
722   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
723   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
724   | --sha=* | --sh=*)
725     sharedstatedir=$ac_optarg ;;
726
727   -site | --site | --sit)
728     ac_prev=site ;;
729   -site=* | --site=* | --sit=*)
730     site=$ac_optarg ;;
731
732   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
733     ac_prev=srcdir ;;
734   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
735     srcdir=$ac_optarg ;;
736
737   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
738   | --syscon | --sysco | --sysc | --sys | --sy)
739     ac_prev=sysconfdir ;;
740   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
741   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
742     sysconfdir=$ac_optarg ;;
743
744   -target | --target | --targe | --targ | --tar | --ta | --t)
745     ac_prev=target_alias ;;
746   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
747     target_alias=$ac_optarg ;;
748
749   -v | -verbose | --verbose | --verbos | --verbo | --verb)
750     verbose=yes ;;
751
752   -version | --version | --versio | --versi | --vers | -V)
753     ac_init_version=: ;;
754
755   -with-* | --with-*)
756     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
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     case $ac_option in
763       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
764       *) ac_optarg=yes ;;
765     esac
766     eval "with_$ac_package='$ac_optarg'" ;;
767
768   -without-* | --without-*)
769     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
770     # Reject names that are not valid shell variable names.
771     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
772       { echo "$as_me: error: invalid package name: $ac_package" >&2
773    { (exit 1); exit 1; }; }
774     ac_package=`echo $ac_package | sed 's/-/_/g'`
775     eval "with_$ac_package=no" ;;
776
777   --x)
778     # Obsolete; use --with-x.
779     with_x=yes ;;
780
781   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
782   | --x-incl | --x-inc | --x-in | --x-i)
783     ac_prev=x_includes ;;
784   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
785   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
786     x_includes=$ac_optarg ;;
787
788   -x-libraries | --x-libraries | --x-librarie | --x-librari \
789   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
790     ac_prev=x_libraries ;;
791   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
792   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
793     x_libraries=$ac_optarg ;;
794
795   -*) { echo "$as_me: error: unrecognized option: $ac_option
796 Try \`$0 --help' for more information." >&2
797    { (exit 1); exit 1; }; }
798     ;;
799
800   *=*)
801     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
802     # Reject names that are not valid shell variable names.
803     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
804       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
805    { (exit 1); exit 1; }; }
806     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
807     eval "$ac_envvar='$ac_optarg'"
808     export $ac_envvar ;;
809
810   *)
811     # FIXME: should be removed in autoconf 3.0.
812     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
813     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
814       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
815     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
816     ;;
817
818   esac
819 done
820
821 if test -n "$ac_prev"; then
822   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
823   { echo "$as_me: error: missing argument to $ac_option" >&2
824    { (exit 1); exit 1; }; }
825 fi
826
827 # Be sure to have absolute paths.
828 for ac_var in exec_prefix prefix
829 do
830   eval ac_val=$`echo $ac_var`
831   case $ac_val in
832     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
833     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
834    { (exit 1); exit 1; }; };;
835   esac
836 done
837
838 # Be sure to have absolute paths.
839 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
840               localstatedir libdir includedir oldincludedir infodir mandir
841 do
842   eval ac_val=$`echo $ac_var`
843   case $ac_val in
844     [\\/$]* | ?:[\\/]* ) ;;
845     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
846    { (exit 1); exit 1; }; };;
847   esac
848 done
849
850 # There might be people who depend on the old broken behavior: `$host'
851 # used to hold the argument of --host etc.
852 # FIXME: To remove some day.
853 build=$build_alias
854 host=$host_alias
855 target=$target_alias
856
857 # FIXME: To remove some day.
858 if test "x$host_alias" != x; then
859   if test "x$build_alias" = x; then
860     cross_compiling=maybe
861     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
862     If a cross compiler is detected then cross compile mode will be used." >&2
863   elif test "x$build_alias" != "x$host_alias"; then
864     cross_compiling=yes
865   fi
866 fi
867
868 ac_tool_prefix=
869 test -n "$host_alias" && ac_tool_prefix=$host_alias-
870
871 test "$silent" = yes && exec 6>/dev/null
872
873
874 # Find the source files, if location was not specified.
875 if test -z "$srcdir"; then
876   ac_srcdir_defaulted=yes
877   # Try the directory containing this script, then its parent.
878   ac_confdir=`(dirname "$0") 2>/dev/null ||
879 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
880          X"$0" : 'X\(//\)[^/]' \| \
881          X"$0" : 'X\(//\)$' \| \
882          X"$0" : 'X\(/\)' \| \
883          .     : '\(.\)' 2>/dev/null ||
884 echo X"$0" |
885     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
886           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
887           /^X\(\/\/\)$/{ s//\1/; q; }
888           /^X\(\/\).*/{ s//\1/; q; }
889           s/.*/./; q'`
890   srcdir=$ac_confdir
891   if test ! -r $srcdir/$ac_unique_file; then
892     srcdir=..
893   fi
894 else
895   ac_srcdir_defaulted=no
896 fi
897 if test ! -r $srcdir/$ac_unique_file; then
898   if test "$ac_srcdir_defaulted" = yes; then
899     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
900    { (exit 1); exit 1; }; }
901   else
902     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
903    { (exit 1); exit 1; }; }
904   fi
905 fi
906 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
907   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
908    { (exit 1); exit 1; }; }
909 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
910 ac_env_build_alias_set=${build_alias+set}
911 ac_env_build_alias_value=$build_alias
912 ac_cv_env_build_alias_set=${build_alias+set}
913 ac_cv_env_build_alias_value=$build_alias
914 ac_env_host_alias_set=${host_alias+set}
915 ac_env_host_alias_value=$host_alias
916 ac_cv_env_host_alias_set=${host_alias+set}
917 ac_cv_env_host_alias_value=$host_alias
918 ac_env_target_alias_set=${target_alias+set}
919 ac_env_target_alias_value=$target_alias
920 ac_cv_env_target_alias_set=${target_alias+set}
921 ac_cv_env_target_alias_value=$target_alias
922 ac_env_CC_set=${CC+set}
923 ac_env_CC_value=$CC
924 ac_cv_env_CC_set=${CC+set}
925 ac_cv_env_CC_value=$CC
926 ac_env_CFLAGS_set=${CFLAGS+set}
927 ac_env_CFLAGS_value=$CFLAGS
928 ac_cv_env_CFLAGS_set=${CFLAGS+set}
929 ac_cv_env_CFLAGS_value=$CFLAGS
930 ac_env_LDFLAGS_set=${LDFLAGS+set}
931 ac_env_LDFLAGS_value=$LDFLAGS
932 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
933 ac_cv_env_LDFLAGS_value=$LDFLAGS
934 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
935 ac_env_CPPFLAGS_value=$CPPFLAGS
936 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
937 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
938 ac_env_CPP_set=${CPP+set}
939 ac_env_CPP_value=$CPP
940 ac_cv_env_CPP_set=${CPP+set}
941 ac_cv_env_CPP_value=$CPP
942
943 #
944 # Report the --help message.
945 #
946 if test "$ac_init_help" = "long"; then
947   # Omit some internal or obsolete options to make the list less imposing.
948   # This message is too long to be a string in the A/UX 3.1 sh.
949   cat <<_ACEOF
950 \`configure' configures this package to adapt to many kinds of systems.
951
952 Usage: $0 [OPTION]... [VAR=VALUE]...
953
954 To assign environment variables (e.g., CC, CFLAGS...), specify them as
955 VAR=VALUE.  See below for descriptions of some of the useful variables.
956
957 Defaults for the options are specified in brackets.
958
959 Configuration:
960   -h, --help              display this help and exit
961       --help=short        display options specific to this package
962       --help=recursive    display the short help of all the included packages
963   -V, --version           display version information and exit
964   -q, --quiet, --silent   do not print \`checking...' messages
965       --cache-file=FILE   cache test results in FILE [disabled]
966   -C, --config-cache      alias for \`--cache-file=config.cache'
967   -n, --no-create         do not create output files
968       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
969
970 _ACEOF
971
972   cat <<_ACEOF
973 Installation directories:
974   --prefix=PREFIX         install architecture-independent files in PREFIX
975                           [$ac_default_prefix]
976   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
977                           [PREFIX]
978
979 By default, \`make install' will install all the files in
980 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
981 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
982 for instance \`--prefix=\$HOME'.
983
984 For better control, use the options below.
985
986 Fine tuning of the installation directories:
987   --bindir=DIR           user executables [EPREFIX/bin]
988   --sbindir=DIR          system admin executables [EPREFIX/sbin]
989   --libexecdir=DIR       program executables [EPREFIX/libexec]
990   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
991   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
992   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
993   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
994   --libdir=DIR           object code libraries [EPREFIX/lib]
995   --includedir=DIR       C header files [PREFIX/include]
996   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
997   --infodir=DIR          info documentation [PREFIX/info]
998   --mandir=DIR           man documentation [PREFIX/man]
999 _ACEOF
1000
1001   cat <<\_ACEOF
1002
1003 System types:
1004   --build=BUILD     configure for building on BUILD [guessed]
1005   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1006   --target=TARGET   configure for building compilers for TARGET [HOST]
1007 _ACEOF
1008 fi
1009
1010 if test -n "$ac_init_help"; then
1011
1012   cat <<\_ACEOF
1013
1014 Optional Features:
1015   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1016   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1017   --enable-debug          enable debugging yes
1018   --enable-dynamic        enable linking built binaries with dynamic libs no
1019   --enable-syslog         enable syslog support auto
1020   --enable-proctitle      enable proctitle support yes
1021   --enable-ipv6           enable IPv6 support auto
1022   --enable-local          enable AF_LOCAL (AF_UNIX) socket support auto
1023   --enable-x-compile      enable cross compiling no
1024   --enable-slapd          enable building slapd yes
1025     --enable-aci          enable per-object ACIs (experimental) no
1026     --enable-cleartext    enable cleartext passwords yes
1027     --enable-crypt        enable crypt(3) passwords no
1028     --enable-kpasswd      enable Kerberos password verification no
1029     --enable-lmpasswd     enable LAN Manager passwords no
1030     --enable-spasswd      enable (Cyrus) SASL password verification no
1031     --enable-modules      enable dynamic module support no
1032     --enable-phonetic     enable phonetic/soundex no
1033     --enable-rewrite      enable DN rewriting in back-ldap and back-meta no
1034     --enable-rlookups     enable reverse lookups of client hostnames no
1035     --enable-slapi        enable installation of slapi library no
1036     --enable-slp          enable SLPv2 support no
1037     --enable-wrappers     enable tcp wrapper support no
1038     --enable-bdb          enable Berkeley DB backend yes
1039     --enable-dnssrv       enable dnssrv backend no
1040     --enable-ldap         enable ldap backend no
1041     --enable-ldbm         enable ldbm backend no
1042     --enable-meta         enable metadirectory backend no
1043     --enable-monitor      enable monitor backend no
1044     --enable-null         enable null backend no
1045     --enable-passwd       enable passwd backend no
1046     --enable-perl         enable perl backend no
1047     --enable-shell        enable shell backend no
1048     --enable-sql          enable sql backend no
1049     --enable-tcl          enable tcl backend no
1050   --enable-slurpd         enable building slurpd auto
1051   --enable-static=PKGS  build static libraries default=yes
1052   --enable-shared=PKGS  build shared libraries default=yes
1053   --enable-fast-install=PKGS  optimize for fast installation default=yes
1054   --disable-libtool-lock  avoid locking (might break parallel builds)
1055
1056 Optional Packages:
1057   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1058   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1059   --with-subdir=DIR       change default subdirectory used for installs
1060   --with-cyrus-sasl       with Cyrus SASL support auto
1061   --with-fetch            with fetch(3) URL support auto
1062   --with-kerberos         with Kerberos support auto
1063   --with-readline         with readline support auto
1064   --with-threads          with threads auto
1065   --with-tls              with TLS/SSL support auto
1066   --with-yielding-select  with implicitly yielding select auto
1067
1068 SLAPD (Standalone LDAP Daemon) Options:
1069     --with-bdb-module     module type static|dynamic static
1070     --with-dnssrv-module  module type static|dynamic static
1071     --with-ldap-module    module type static|dynamic static
1072     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm auto
1073     --with-ldbm-module    module type static|dynamic static
1074     --with-ldbm-type      use LDBM type auto|btree|hash auto
1075     --with-meta-module    module type static|dynamic static
1076     --with-monitor-module module type static|dynamic static
1077     --with-null-module    module type static|dynamic static
1078     --with-passwd-module  module type static|dynamic static
1079     --with-perl-module    module type static|dynamic static
1080     --with-shell-module   module type static|dynamic static
1081     --with-sql-module     module type static|dynamic static
1082     --with-tcl-module     module type static|dynamic static
1083
1084 SLURPD (Replication Daemon) Options:
1085
1086 Library Generation & Linking Options
1087   --with-gnu-ld           assume the C compiler uses GNU ld default=no
1088   --with-pic              try to use only PIC/non-PIC objects default=use both
1089
1090 See INSTALL file for further details.
1091
1092 Some influential environment variables:
1093   CC          C compiler command
1094   CFLAGS      C compiler flags
1095   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1096               nonstandard directory <lib dir>
1097   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
1098               headers in a nonstandard directory <include dir>
1099   CPP         C preprocessor
1100
1101 Use these variables to override the choices made by `configure' or to help
1102 it to find libraries and programs with nonstandard names/locations.
1103
1104 _ACEOF
1105 fi
1106
1107 if test "$ac_init_help" = "recursive"; then
1108   # If there are subdirs, report their specific --help.
1109   ac_popdir=`pwd`
1110   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1111     test -d $ac_dir || continue
1112     ac_builddir=.
1113
1114 if test "$ac_dir" != .; then
1115   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1116   # A "../" for each directory in $ac_dir_suffix.
1117   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1118 else
1119   ac_dir_suffix= ac_top_builddir=
1120 fi
1121
1122 case $srcdir in
1123   .)  # No --srcdir option.  We are building in place.
1124     ac_srcdir=.
1125     if test -z "$ac_top_builddir"; then
1126        ac_top_srcdir=.
1127     else
1128        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
1129     fi ;;
1130   [\\/]* | ?:[\\/]* )  # Absolute path.
1131     ac_srcdir=$srcdir$ac_dir_suffix;
1132     ac_top_srcdir=$srcdir ;;
1133   *) # Relative path.
1134     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1135     ac_top_srcdir=$ac_top_builddir$srcdir ;;
1136 esac
1137 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
1138 # absolute.
1139 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
1140 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
1141 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
1142 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
1143
1144     cd $ac_dir
1145     # Check for guested configure; otherwise get Cygnus style configure.
1146     if test -f $ac_srcdir/configure.gnu; then
1147       echo
1148       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1149     elif test -f $ac_srcdir/configure; then
1150       echo
1151       $SHELL $ac_srcdir/configure  --help=recursive
1152     elif test -f $ac_srcdir/configure.ac ||
1153            test -f $ac_srcdir/configure.in; then
1154       echo
1155       $ac_configure --help
1156     else
1157       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1158     fi
1159     cd $ac_popdir
1160   done
1161 fi
1162
1163 test -n "$ac_init_help" && exit 0
1164 if $ac_init_version; then
1165   cat <<\_ACEOF
1166
1167 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
1168 Free Software Foundation, Inc.
1169 This configure script is free software; the Free Software Foundation
1170 gives unlimited permission to copy, distribute and modify it.
1171
1172 Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved.
1173
1174 Redistribution and use in source and binary forms, with or without
1175 modification, are permitted only as authorized by the OpenLDAP
1176 Public License.  A copy of this license is available at
1177 http://www.OpenLDAP.org/license.html or in file LICENSE in the
1178 top-level directory of the distribution.
1179
1180 _ACEOF
1181   exit 0
1182 fi
1183 exec 5>config.log
1184 cat >&5 <<_ACEOF
1185 This file contains any messages produced by compilers while
1186 running configure, to aid debugging if configure makes a mistake.
1187
1188 It was created by $as_me, which was
1189 generated by GNU Autoconf 2.57.  Invocation command line was
1190
1191   $ $0 $@
1192
1193 _ACEOF
1194 {
1195 cat <<_ASUNAME
1196 ## --------- ##
1197 ## Platform. ##
1198 ## --------- ##
1199
1200 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1201 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1202 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1203 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1204 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1205
1206 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1207 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1208
1209 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1210 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1211 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1212 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1213 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1214 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1215 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1216
1217 _ASUNAME
1218
1219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1220 for as_dir in $PATH
1221 do
1222   IFS=$as_save_IFS
1223   test -z "$as_dir" && as_dir=.
1224   echo "PATH: $as_dir"
1225 done
1226
1227 } >&5
1228
1229 cat >&5 <<_ACEOF
1230
1231
1232 ## ----------- ##
1233 ## Core tests. ##
1234 ## ----------- ##
1235
1236 _ACEOF
1237
1238
1239 # Keep a trace of the command line.
1240 # Strip out --no-create and --no-recursion so they do not pile up.
1241 # Strip out --silent because we don't want to record it for future runs.
1242 # Also quote any args containing shell meta-characters.
1243 # Make two passes to allow for proper duplicate-argument suppression.
1244 ac_configure_args=
1245 ac_configure_args0=
1246 ac_configure_args1=
1247 ac_sep=
1248 ac_must_keep_next=false
1249 for ac_pass in 1 2
1250 do
1251   for ac_arg
1252   do
1253     case $ac_arg in
1254     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1255     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1256     | -silent | --silent | --silen | --sile | --sil)
1257       continue ;;
1258     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1259       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1260     esac
1261     case $ac_pass in
1262     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1263     2)
1264       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1265       if test $ac_must_keep_next = true; then
1266         ac_must_keep_next=false # Got value, back to normal.
1267       else
1268         case $ac_arg in
1269           *=* | --config-cache | -C | -disable-* | --disable-* \
1270           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1271           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1272           | -with-* | --with-* | -without-* | --without-* | --x)
1273             case "$ac_configure_args0 " in
1274               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1275             esac
1276             ;;
1277           -* ) ac_must_keep_next=true ;;
1278         esac
1279       fi
1280       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1281       # Get rid of the leading space.
1282       ac_sep=" "
1283       ;;
1284     esac
1285   done
1286 done
1287 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1288 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1289
1290 # When interrupted or exit'd, cleanup temporary files, and complete
1291 # config.log.  We remove comments because anyway the quotes in there
1292 # would cause problems or look ugly.
1293 # WARNING: Be sure not to use single quotes in there, as some shells,
1294 # such as our DU 5.0 friend, will then `close' the trap.
1295 trap 'exit_status=$?
1296   # Save into config.log some information that might help in debugging.
1297   {
1298     echo
1299
1300     cat <<\_ASBOX
1301 ## ---------------- ##
1302 ## Cache variables. ##
1303 ## ---------------- ##
1304 _ASBOX
1305     echo
1306     # The following way of writing the cache mishandles newlines in values,
1307 {
1308   (set) 2>&1 |
1309     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1310     *ac_space=\ *)
1311       sed -n \
1312         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1313           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1314       ;;
1315     *)
1316       sed -n \
1317         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1318       ;;
1319     esac;
1320 }
1321     echo
1322
1323     cat <<\_ASBOX
1324 ## ----------------- ##
1325 ## Output variables. ##
1326 ## ----------------- ##
1327 _ASBOX
1328     echo
1329     for ac_var in $ac_subst_vars
1330     do
1331       eval ac_val=$`echo $ac_var`
1332       echo "$ac_var='"'"'$ac_val'"'"'"
1333     done | sort
1334     echo
1335
1336     if test -n "$ac_subst_files"; then
1337       cat <<\_ASBOX
1338 ## ------------- ##
1339 ## Output files. ##
1340 ## ------------- ##
1341 _ASBOX
1342       echo
1343       for ac_var in $ac_subst_files
1344       do
1345         eval ac_val=$`echo $ac_var`
1346         echo "$ac_var='"'"'$ac_val'"'"'"
1347       done | sort
1348       echo
1349     fi
1350
1351     if test -s confdefs.h; then
1352       cat <<\_ASBOX
1353 ## ----------- ##
1354 ## confdefs.h. ##
1355 ## ----------- ##
1356 _ASBOX
1357       echo
1358       sed "/^$/d" confdefs.h | sort
1359       echo
1360     fi
1361     test "$ac_signal" != 0 &&
1362       echo "$as_me: caught signal $ac_signal"
1363     echo "$as_me: exit $exit_status"
1364   } >&5
1365   rm -f core core.* *.core &&
1366   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1367     exit $exit_status
1368      ' 0
1369 for ac_signal in 1 2 13 15; do
1370   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1371 done
1372 ac_signal=0
1373
1374 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1375 rm -rf conftest* confdefs.h
1376 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1377 echo >confdefs.h
1378
1379 # Predefined preprocessor variables.
1380
1381 cat >>confdefs.h <<_ACEOF
1382 #define PACKAGE_NAME "$PACKAGE_NAME"
1383 _ACEOF
1384
1385
1386 cat >>confdefs.h <<_ACEOF
1387 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1388 _ACEOF
1389
1390
1391 cat >>confdefs.h <<_ACEOF
1392 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1393 _ACEOF
1394
1395
1396 cat >>confdefs.h <<_ACEOF
1397 #define PACKAGE_STRING "$PACKAGE_STRING"
1398 _ACEOF
1399
1400
1401 cat >>confdefs.h <<_ACEOF
1402 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1403 _ACEOF
1404
1405
1406 # Let the site file select an alternate cache file if it wants to.
1407 # Prefer explicitly selected file to automatically selected ones.
1408 if test -z "$CONFIG_SITE"; then
1409   if test "x$prefix" != xNONE; then
1410     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1411   else
1412     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1413   fi
1414 fi
1415 for ac_site_file in $CONFIG_SITE; do
1416   if test -r "$ac_site_file"; then
1417     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1418 echo "$as_me: loading site script $ac_site_file" >&6;}
1419     sed 's/^/| /' "$ac_site_file" >&5
1420     . "$ac_site_file"
1421   fi
1422 done
1423
1424 if test -r "$cache_file"; then
1425   # Some versions of bash will fail to source /dev/null (special
1426   # files actually), so we avoid doing that.
1427   if test -f "$cache_file"; then
1428     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1429 echo "$as_me: loading cache $cache_file" >&6;}
1430     case $cache_file in
1431       [\\/]* | ?:[\\/]* ) . $cache_file;;
1432       *)                      . ./$cache_file;;
1433     esac
1434   fi
1435 else
1436   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1437 echo "$as_me: creating cache $cache_file" >&6;}
1438   >$cache_file
1439 fi
1440
1441 # Check that the precious variables saved in the cache have kept the same
1442 # value.
1443 ac_cache_corrupted=false
1444 for ac_var in `(set) 2>&1 |
1445                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1446   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1447   eval ac_new_set=\$ac_env_${ac_var}_set
1448   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1449   eval ac_new_val="\$ac_env_${ac_var}_value"
1450   case $ac_old_set,$ac_new_set in
1451     set,)
1452       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1453 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1454       ac_cache_corrupted=: ;;
1455     ,set)
1456       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1457 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1458       ac_cache_corrupted=: ;;
1459     ,);;
1460     *)
1461       if test "x$ac_old_val" != "x$ac_new_val"; then
1462         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1463 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1464         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1465 echo "$as_me:   former value:  $ac_old_val" >&2;}
1466         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1467 echo "$as_me:   current value: $ac_new_val" >&2;}
1468         ac_cache_corrupted=:
1469       fi;;
1470   esac
1471   # Pass precious variables to config.status.
1472   if test "$ac_new_set" = set; then
1473     case $ac_new_val in
1474     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1475       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1476     *) ac_arg=$ac_var=$ac_new_val ;;
1477     esac
1478     case " $ac_configure_args " in
1479       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1480       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1481     esac
1482   fi
1483 done
1484 if $ac_cache_corrupted; then
1485   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1486 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1487   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1488 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1489    { (exit 1); exit 1; }; }
1490 fi
1491
1492 ac_ext=c
1493 ac_cpp='$CPP $CPPFLAGS'
1494 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1495 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1496 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516 ac_aux_dir=
1517 for ac_dir in build $srcdir/build; do
1518   if test -f $ac_dir/install-sh; then
1519     ac_aux_dir=$ac_dir
1520     ac_install_sh="$ac_aux_dir/install-sh -c"
1521     break
1522   elif test -f $ac_dir/install.sh; then
1523     ac_aux_dir=$ac_dir
1524     ac_install_sh="$ac_aux_dir/install.sh -c"
1525     break
1526   elif test -f $ac_dir/shtool; then
1527     ac_aux_dir=$ac_dir
1528     ac_install_sh="$ac_aux_dir/shtool install -c"
1529     break
1530   fi
1531 done
1532 if test -z "$ac_aux_dir"; then
1533   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
1534 echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
1535    { (exit 1); exit 1; }; }
1536 fi
1537 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1538 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1539 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1540
1541 eval `$ac_aux_dir/version.sh`
1542 if test -z "$OL_STRING"; then
1543         { { echo "$as_me:$LINENO: error: could not determine version" >&5
1544 echo "$as_me: error: could not determine version" >&2;}
1545    { (exit 1); exit 1; }; }
1546 fi
1547
1548 echo "$as_me:$LINENO: checking for GNU shtool" >&5
1549 echo $ECHO_N "checking for GNU shtool... $ECHO_C" >&6
1550 if test "${ac_cv_shtool+set}" = set; then
1551   echo $ECHO_N "(cached) $ECHO_C" >&6
1552 else
1553   #   canonicalize and split path string
1554 ac_paths="`echo .:$ac_aux_dir:$PATH |\
1555            sed -e 's%/*:%:%g' -e 's%/*$%%' \
1556                -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
1557                -e 's/:/ /g'`"
1558 #   iterate over $PATH but prefer CWD
1559 ac_cv_shtool=""
1560 for ac_path in $ac_paths; do
1561     if test -f "$ac_path/shtool" && test ! -d "$ac_path/shtool"; then
1562         ac_cv_shtool="$ac_path/shtool"
1563         break
1564     fi
1565 done
1566 #   check for existance
1567 if test ".$ac_cv_shtool" = .; then
1568     { { echo "$as_me:$LINENO: error: no shtool found in .:$PATH" >&5
1569 echo "$as_me: error: no shtool found in .:$PATH" >&2;}
1570    { (exit 1); exit 1; }; }
1571 fi
1572 #   check deeper
1573 ac_rc=`($ac_cv_shtool --version) </dev/null 2>/dev/null | grep 'GNU shtool'`
1574 if test ".$ac_rc" = .; then
1575     ac_cv_shtool="${CONFIG_SHELL-/bin/sh} $ac_cv_shtool"
1576     ac_rc=`($ac_cv_shtool --version) </dev/null 2>/dev/null | grep 'GNU shtool'`
1577     if test ".$ac_rc" = .; then
1578         { { echo "$as_me:$LINENO: error: $ac_cv_shtool seems not to be GNU shtool" >&5
1579 echo "$as_me: error: $ac_cv_shtool seems not to be GNU shtool" >&2;}
1580    { (exit 1); exit 1; }; }
1581     fi
1582 fi
1583
1584 fi
1585 echo "$as_me:$LINENO: result: $ac_cv_shtool" >&5
1586 echo "${ECHO_T}$ac_cv_shtool" >&6
1587 SHTOOL="$ac_cv_shtool"
1588
1589
1590
1591 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
1592 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
1593
1594 OPENLDAP_CVS=""
1595 if test -d $ac_aux_dir/CVS; then
1596         OPENLDAP_CVS="(from CVS sources) "
1597 fi
1598
1599 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
1600
1601 # Make sure we can run config.sub.
1602 $ac_config_sub sun4 >/dev/null 2>&1 ||
1603   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1604 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1605    { (exit 1); exit 1; }; }
1606
1607 echo "$as_me:$LINENO: checking build system type" >&5
1608 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1609 if test "${ac_cv_build+set}" = set; then
1610   echo $ECHO_N "(cached) $ECHO_C" >&6
1611 else
1612   ac_cv_build_alias=$build_alias
1613 test -z "$ac_cv_build_alias" &&
1614   ac_cv_build_alias=`$ac_config_guess`
1615 test -z "$ac_cv_build_alias" &&
1616   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1617 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1618    { (exit 1); exit 1; }; }
1619 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1620   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1621 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1622    { (exit 1); exit 1; }; }
1623
1624 fi
1625 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1626 echo "${ECHO_T}$ac_cv_build" >&6
1627 build=$ac_cv_build
1628 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1629 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1630 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1631
1632
1633 echo "$as_me:$LINENO: checking host system type" >&5
1634 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1635 if test "${ac_cv_host+set}" = set; then
1636   echo $ECHO_N "(cached) $ECHO_C" >&6
1637 else
1638   ac_cv_host_alias=$host_alias
1639 test -z "$ac_cv_host_alias" &&
1640   ac_cv_host_alias=$ac_cv_build_alias
1641 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1642   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1643 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1644    { (exit 1); exit 1; }; }
1645
1646 fi
1647 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1648 echo "${ECHO_T}$ac_cv_host" >&6
1649 host=$ac_cv_host
1650 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1651 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1652 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1653
1654
1655 echo "$as_me:$LINENO: checking target system type" >&5
1656 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1657 if test "${ac_cv_target+set}" = set; then
1658   echo $ECHO_N "(cached) $ECHO_C" >&6
1659 else
1660   ac_cv_target_alias=$target_alias
1661 test "x$ac_cv_target_alias" = "x" &&
1662   ac_cv_target_alias=$ac_cv_host_alias
1663 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1664   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1665 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1666    { (exit 1); exit 1; }; }
1667
1668 fi
1669 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
1670 echo "${ECHO_T}$ac_cv_target" >&6
1671 target=$ac_cv_target
1672 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1673 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1674 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1675
1676
1677 # The aliases save the names the user supplied, while $host etc.
1678 # will get canonicalized.
1679 test -n "$target_alias" &&
1680   test "$program_prefix$program_suffix$program_transform_name" = \
1681     NONENONEs,x,x, &&
1682   program_prefix=${target_alias}-
1683
1684 OPENLDAP_PACKAGE=$OL_PACKAGE
1685 OPENLDAP_VERSION=$OL_VERSION
1686
1687
1688
1689
1690
1691 cat >>confdefs.h <<_ACEOF
1692 #define OPENLDAP_PACKAGE "$OL_PACKAGE"
1693 _ACEOF
1694
1695
1696 cat >>confdefs.h <<_ACEOF
1697 #define OPENLDAP_VERSION "$OL_VERSION"
1698 _ACEOF
1699
1700
1701
1702 cat >>confdefs.h <<_ACEOF
1703 #define LDAP_VENDOR_VERSION $OL_API_INC
1704 _ACEOF
1705
1706
1707 cat >>confdefs.h <<_ACEOF
1708 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1709 _ACEOF
1710
1711
1712 cat >>confdefs.h <<_ACEOF
1713 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1714 _ACEOF
1715
1716
1717 cat >>confdefs.h <<_ACEOF
1718 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1719 _ACEOF
1720
1721
1722 OPENLDAP_LIBVERSION=$OL_API_LIB
1723
1724 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1725
1726
1727                               ac_config_headers="$ac_config_headers include/portable.h include/ldap_features.h include/lber_types.h"
1728
1729 echo "$as_me:$LINENO: checking configure arguments" >&5
1730 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
1731
1732
1733 top_builddir=`pwd`
1734
1735 ldap_subdir="/openldap"
1736
1737
1738 # Check whether --with-subdir or --without-subdir was given.
1739 if test "${with_subdir+set}" = set; then
1740   withval="$with_subdir"
1741   case "$withval" in
1742         no) ldap_subdir=""
1743                 ;;
1744         yes)
1745                 ;;
1746         /*|\\*)
1747                 ldap_subdir="$withval"
1748                 ;;
1749         *)
1750                 ldap_subdir="/$withval"
1751                 ;;
1752 esac
1753
1754 fi;
1755
1756 # OpenLDAP --enable-debug
1757         # Check whether --enable-debug or --disable-debug was given.
1758 if test "${enable_debug+set}" = set; then
1759   enableval="$enable_debug"
1760
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
1769 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
1770    { (exit 1); exit 1; }; }
1771         fi
1772         ol_enable_debug="$ol_arg"
1773
1774 else
1775         ol_enable_debug="yes"
1776 fi; # end --enable-debug
1777 # OpenLDAP --enable-dynamic
1778         # Check whether --enable-dynamic or --disable-dynamic was given.
1779 if test "${enable_dynamic+set}" = set; then
1780   enableval="$enable_dynamic"
1781
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
1790 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
1791    { (exit 1); exit 1; }; }
1792         fi
1793         ol_enable_dynamic="$ol_arg"
1794
1795 else
1796         ol_enable_dynamic="no"
1797 fi; # end --enable-dynamic
1798 # OpenLDAP --enable-syslog
1799         # Check whether --enable-syslog or --disable-syslog was given.
1800 if test "${enable_syslog+set}" = set; then
1801   enableval="$enable_syslog"
1802
1803         ol_arg=invalid
1804         for ol_val in auto yes no ; do
1805                 if test "$enableval" = "$ol_val" ; then
1806                         ol_arg="$ol_val"
1807                 fi
1808         done
1809         if test "$ol_arg" = "invalid" ; then
1810                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
1811 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
1812    { (exit 1); exit 1; }; }
1813         fi
1814         ol_enable_syslog="$ol_arg"
1815
1816 else
1817         ol_enable_syslog="auto"
1818 fi; # end --enable-syslog
1819 # OpenLDAP --enable-proctitle
1820         # Check whether --enable-proctitle or --disable-proctitle was given.
1821 if test "${enable_proctitle+set}" = set; then
1822   enableval="$enable_proctitle"
1823
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
1832 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
1833    { (exit 1); exit 1; }; }
1834         fi
1835         ol_enable_proctitle="$ol_arg"
1836
1837 else
1838         ol_enable_proctitle="yes"
1839 fi; # end --enable-proctitle
1840 ol_enable_referrals=${ol_enable_referrals-no}
1841 ol_enable_kbind=${ol_enable_kbind-no}
1842 # OpenLDAP --enable-ipv6
1843         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1844 if test "${enable_ipv6+set}" = set; then
1845   enableval="$enable_ipv6"
1846
1847         ol_arg=invalid
1848         for ol_val in auto yes no ; do
1849                 if test "$enableval" = "$ol_val" ; then
1850                         ol_arg="$ol_val"
1851                 fi
1852         done
1853         if test "$ol_arg" = "invalid" ; then
1854                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
1855 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
1856    { (exit 1); exit 1; }; }
1857         fi
1858         ol_enable_ipv6="$ol_arg"
1859
1860 else
1861         ol_enable_ipv6="auto"
1862 fi; # end --enable-ipv6
1863 # OpenLDAP --enable-local
1864         # Check whether --enable-local or --disable-local was given.
1865 if test "${enable_local+set}" = set; then
1866   enableval="$enable_local"
1867
1868         ol_arg=invalid
1869         for ol_val in auto yes no ; do
1870                 if test "$enableval" = "$ol_val" ; then
1871                         ol_arg="$ol_val"
1872                 fi
1873         done
1874         if test "$ol_arg" = "invalid" ; then
1875                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
1876 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
1877    { (exit 1); exit 1; }; }
1878         fi
1879         ol_enable_local="$ol_arg"
1880
1881 else
1882         ol_enable_local="auto"
1883 fi; # end --enable-local
1884 # OpenLDAP --enable-x_compile
1885         # Check whether --enable-x_compile or --disable-x_compile was given.
1886 if test "${enable_x_compile+set}" = set; then
1887   enableval="$enable_x_compile"
1888
1889         ol_arg=invalid
1890         for ol_val in yes no ; do
1891                 if test "$enableval" = "$ol_val" ; then
1892                         ol_arg="$ol_val"
1893                 fi
1894         done
1895         if test "$ol_arg" = "invalid" ; then
1896                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-x_compile" >&5
1897 echo "$as_me: error: bad value $enableval for --enable-x_compile" >&2;}
1898    { (exit 1); exit 1; }; }
1899         fi
1900         ol_enable_x_compile="$ol_arg"
1901
1902 else
1903         ol_enable_x_compile="no"
1904 fi; # end --enable-x_compile
1905
1906
1907 # OpenLDAP --with-cyrus_sasl
1908
1909 # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1910 if test "${with_cyrus_sasl+set}" = set; then
1911   withval="$with_cyrus_sasl"
1912
1913         ol_arg=invalid
1914         for ol_val in auto yes no  ; do
1915                 if test "$withval" = "$ol_val" ; then
1916                         ol_arg="$ol_val"
1917                 fi
1918         done
1919         if test "$ol_arg" = "invalid" ; then
1920                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
1921 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
1922    { (exit 1); exit 1; }; }
1923         fi
1924         ol_with_cyrus_sasl="$ol_arg"
1925
1926 else
1927         ol_with_cyrus_sasl="auto"
1928 fi; # end --with-cyrus_sasl
1929
1930 # OpenLDAP --with-fetch
1931
1932 # Check whether --with-fetch or --without-fetch was given.
1933 if test "${with_fetch+set}" = set; then
1934   withval="$with_fetch"
1935
1936         ol_arg=invalid
1937         for ol_val in auto yes no  ; do
1938                 if test "$withval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
1944 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
1945    { (exit 1); exit 1; }; }
1946         fi
1947         ol_with_fetch="$ol_arg"
1948
1949 else
1950         ol_with_fetch="auto"
1951 fi; # end --with-fetch
1952
1953 # OpenLDAP --with-kerberos
1954
1955 # Check whether --with-kerberos or --without-kerberos was given.
1956 if test "${with_kerberos+set}" = set; then
1957   withval="$with_kerberos"
1958
1959         ol_arg=invalid
1960         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1961                 if test "$withval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-kerberos" >&5
1967 echo "$as_me: error: bad value $withval for --with-kerberos" >&2;}
1968    { (exit 1); exit 1; }; }
1969         fi
1970         ol_with_kerberos="$ol_arg"
1971
1972 else
1973         ol_with_kerberos="auto"
1974 fi; # end --with-kerberos
1975
1976 # OpenLDAP --with-readline
1977
1978 # Check whether --with-readline or --without-readline was given.
1979 if test "${with_readline+set}" = set; then
1980   withval="$with_readline"
1981
1982         ol_arg=invalid
1983         for ol_val in auto yes no  ; do
1984                 if test "$withval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-readline" >&5
1990 echo "$as_me: error: bad value $withval for --with-readline" >&2;}
1991    { (exit 1); exit 1; }; }
1992         fi
1993         ol_with_readline="$ol_arg"
1994
1995 else
1996         ol_with_readline="auto"
1997 fi; # end --with-readline
1998
1999 # OpenLDAP --with-threads
2000
2001 # Check whether --with-threads or --without-threads was given.
2002 if test "${with_threads+set}" = set; then
2003   withval="$with_threads"
2004
2005         ol_arg=invalid
2006         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2007                 if test "$withval" = "$ol_val" ; then
2008                         ol_arg="$ol_val"
2009                 fi
2010         done
2011         if test "$ol_arg" = "invalid" ; then
2012                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2013 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2014    { (exit 1); exit 1; }; }
2015         fi
2016         ol_with_threads="$ol_arg"
2017
2018 else
2019         ol_with_threads="auto"
2020 fi; # end --with-threads
2021
2022 # OpenLDAP --with-tls
2023
2024 # Check whether --with-tls or --without-tls was given.
2025 if test "${with_tls+set}" = set; then
2026   withval="$with_tls"
2027
2028         ol_arg=invalid
2029         for ol_val in auto ssleay openssl yes no  ; do
2030                 if test "$withval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
2036 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
2037    { (exit 1); exit 1; }; }
2038         fi
2039         ol_with_tls="$ol_arg"
2040
2041 else
2042         ol_with_tls="auto"
2043 fi; # end --with-tls
2044
2045 # OpenLDAP --with-yielding_select
2046
2047 # Check whether --with-yielding_select or --without-yielding_select was given.
2048 if test "${with_yielding_select+set}" = set; then
2049   withval="$with_yielding_select"
2050
2051         ol_arg=invalid
2052         for ol_val in auto yes no manual  ; do
2053                 if test "$withval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
2059 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
2060    { (exit 1); exit 1; }; }
2061         fi
2062         ol_with_yielding_select="$ol_arg"
2063
2064 else
2065         ol_with_yielding_select="auto"
2066 fi; # end --with-yielding_select
2067
2068
2069
2070
2071 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
2072 if test "${with_xxslapdoptions+set}" = set; then
2073   withval="$with_xxslapdoptions"
2074
2075 fi;
2076 # OpenLDAP --enable-slapd
2077         # Check whether --enable-slapd or --disable-slapd was given.
2078 if test "${enable_slapd+set}" = set; then
2079   enableval="$enable_slapd"
2080
2081         ol_arg=invalid
2082         for ol_val in auto yes no ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
2089 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
2090    { (exit 1); exit 1; }; }
2091         fi
2092         ol_enable_slapd="$ol_arg"
2093
2094 else
2095         ol_enable_slapd="yes"
2096 fi; # end --enable-slapd
2097 # OpenLDAP --enable-aci
2098         # Check whether --enable-aci or --disable-aci was given.
2099 if test "${enable_aci+set}" = set; then
2100   enableval="$enable_aci"
2101
2102         ol_arg=invalid
2103         for ol_val in auto yes no ; do
2104                 if test "$enableval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
2110 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
2111    { (exit 1); exit 1; }; }
2112         fi
2113         ol_enable_aci="$ol_arg"
2114
2115 else
2116         ol_enable_aci="no"
2117 fi; # end --enable-aci
2118 # OpenLDAP --enable-cleartext
2119         # Check whether --enable-cleartext or --disable-cleartext was given.
2120 if test "${enable_cleartext+set}" = set; then
2121   enableval="$enable_cleartext"
2122
2123         ol_arg=invalid
2124         for ol_val in auto yes no ; do
2125                 if test "$enableval" = "$ol_val" ; then
2126                         ol_arg="$ol_val"
2127                 fi
2128         done
2129         if test "$ol_arg" = "invalid" ; then
2130                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
2131 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
2132    { (exit 1); exit 1; }; }
2133         fi
2134         ol_enable_cleartext="$ol_arg"
2135
2136 else
2137         ol_enable_cleartext="yes"
2138 fi; # end --enable-cleartext
2139 # OpenLDAP --enable-crypt
2140         # Check whether --enable-crypt or --disable-crypt was given.
2141 if test "${enable_crypt+set}" = set; then
2142   enableval="$enable_crypt"
2143
2144         ol_arg=invalid
2145         for ol_val in auto yes no ; do
2146                 if test "$enableval" = "$ol_val" ; then
2147                         ol_arg="$ol_val"
2148                 fi
2149         done
2150         if test "$ol_arg" = "invalid" ; then
2151                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
2152 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
2153    { (exit 1); exit 1; }; }
2154         fi
2155         ol_enable_crypt="$ol_arg"
2156
2157 else
2158         ol_enable_crypt="no"
2159 fi; # end --enable-crypt
2160 # OpenLDAP --enable-kpasswd
2161         # Check whether --enable-kpasswd or --disable-kpasswd was given.
2162 if test "${enable_kpasswd+set}" = set; then
2163   enableval="$enable_kpasswd"
2164
2165         ol_arg=invalid
2166         for ol_val in auto yes no ; do
2167                 if test "$enableval" = "$ol_val" ; then
2168                         ol_arg="$ol_val"
2169                 fi
2170         done
2171         if test "$ol_arg" = "invalid" ; then
2172                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-kpasswd" >&5
2173 echo "$as_me: error: bad value $enableval for --enable-kpasswd" >&2;}
2174    { (exit 1); exit 1; }; }
2175         fi
2176         ol_enable_kpasswd="$ol_arg"
2177
2178 else
2179         ol_enable_kpasswd="no"
2180 fi; # end --enable-kpasswd
2181 # OpenLDAP --enable-lmpasswd
2182         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
2183 if test "${enable_lmpasswd+set}" = set; then
2184   enableval="$enable_lmpasswd"
2185
2186         ol_arg=invalid
2187         for ol_val in auto yes no ; do
2188                 if test "$enableval" = "$ol_val" ; then
2189                         ol_arg="$ol_val"
2190                 fi
2191         done
2192         if test "$ol_arg" = "invalid" ; then
2193                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
2194 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
2195    { (exit 1); exit 1; }; }
2196         fi
2197         ol_enable_lmpasswd="$ol_arg"
2198
2199 else
2200         ol_enable_lmpasswd="no"
2201 fi; # end --enable-lmpasswd
2202 # OpenLDAP --enable-spasswd
2203         # Check whether --enable-spasswd or --disable-spasswd was given.
2204 if test "${enable_spasswd+set}" = set; then
2205   enableval="$enable_spasswd"
2206
2207         ol_arg=invalid
2208         for ol_val in auto yes no ; do
2209                 if test "$enableval" = "$ol_val" ; then
2210                         ol_arg="$ol_val"
2211                 fi
2212         done
2213         if test "$ol_arg" = "invalid" ; then
2214                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
2215 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
2216    { (exit 1); exit 1; }; }
2217         fi
2218         ol_enable_spasswd="$ol_arg"
2219
2220 else
2221         ol_enable_spasswd="no"
2222 fi; # end --enable-spasswd
2223 # OpenLDAP --enable-modules
2224         # Check whether --enable-modules or --disable-modules was given.
2225 if test "${enable_modules+set}" = set; then
2226   enableval="$enable_modules"
2227
2228         ol_arg=invalid
2229         for ol_val in auto yes no ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
2236 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
2237    { (exit 1); exit 1; }; }
2238         fi
2239         ol_enable_modules="$ol_arg"
2240
2241 else
2242         ol_enable_modules="no"
2243 fi; # end --enable-modules
2244 ol_enable_multimaster=${ol_enable_multimaster-no}
2245 # OpenLDAP --enable-phonetic
2246         # Check whether --enable-phonetic or --disable-phonetic was given.
2247 if test "${enable_phonetic+set}" = set; then
2248   enableval="$enable_phonetic"
2249
2250         ol_arg=invalid
2251         for ol_val in auto yes no ; do
2252                 if test "$enableval" = "$ol_val" ; then
2253                         ol_arg="$ol_val"
2254                 fi
2255         done
2256         if test "$ol_arg" = "invalid" ; then
2257                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-phonetic" >&5
2258 echo "$as_me: error: bad value $enableval for --enable-phonetic" >&2;}
2259    { (exit 1); exit 1; }; }
2260         fi
2261         ol_enable_phonetic="$ol_arg"
2262
2263 else
2264         ol_enable_phonetic="no"
2265 fi; # end --enable-phonetic
2266 # OpenLDAP --enable-rewrite
2267         # Check whether --enable-rewrite or --disable-rewrite was given.
2268 if test "${enable_rewrite+set}" = set; then
2269   enableval="$enable_rewrite"
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-rewrite" >&5
2279 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
2280    { (exit 1); exit 1; }; }
2281         fi
2282         ol_enable_rewrite="$ol_arg"
2283
2284 else
2285         ol_enable_rewrite="no"
2286 fi; # end --enable-rewrite
2287 # OpenLDAP --enable-rlookups
2288         # Check whether --enable-rlookups or --disable-rlookups was given.
2289 if test "${enable_rlookups+set}" = set; then
2290   enableval="$enable_rlookups"
2291
2292         ol_arg=invalid
2293         for ol_val in auto yes no ; do
2294                 if test "$enableval" = "$ol_val" ; then
2295                         ol_arg="$ol_val"
2296                 fi
2297         done
2298         if test "$ol_arg" = "invalid" ; then
2299                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
2300 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
2301    { (exit 1); exit 1; }; }
2302         fi
2303         ol_enable_rlookups="$ol_arg"
2304
2305 else
2306         ol_enable_rlookups="no"
2307 fi; # end --enable-rlookups
2308 # OpenLDAP --enable-slapi
2309         # Check whether --enable-slapi or --disable-slapi was given.
2310 if test "${enable_slapi+set}" = set; then
2311   enableval="$enable_slapi"
2312
2313         ol_arg=invalid
2314         for ol_val in auto yes no ; do
2315                 if test "$enableval" = "$ol_val" ; then
2316                         ol_arg="$ol_val"
2317                 fi
2318         done
2319         if test "$ol_arg" = "invalid" ; then
2320                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
2321 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
2322    { (exit 1); exit 1; }; }
2323         fi
2324         ol_enable_slapi="$ol_arg"
2325
2326 else
2327         ol_enable_slapi="no"
2328 fi; # end --enable-slapi
2329 # OpenLDAP --enable-slp
2330         # Check whether --enable-slp or --disable-slp was given.
2331 if test "${enable_slp+set}" = set; then
2332   enableval="$enable_slp"
2333
2334         ol_arg=invalid
2335         for ol_val in auto yes no ; do
2336                 if test "$enableval" = "$ol_val" ; then
2337                         ol_arg="$ol_val"
2338                 fi
2339         done
2340         if test "$ol_arg" = "invalid" ; then
2341                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
2342 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
2343    { (exit 1); exit 1; }; }
2344         fi
2345         ol_enable_slp="$ol_arg"
2346
2347 else
2348         ol_enable_slp="no"
2349 fi; # end --enable-slp
2350 # OpenLDAP --enable-wrappers
2351         # Check whether --enable-wrappers or --disable-wrappers was given.
2352 if test "${enable_wrappers+set}" = set; then
2353   enableval="$enable_wrappers"
2354
2355         ol_arg=invalid
2356         for ol_val in auto yes no ; do
2357                 if test "$enableval" = "$ol_val" ; then
2358                         ol_arg="$ol_val"
2359                 fi
2360         done
2361         if test "$ol_arg" = "invalid" ; then
2362                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
2363 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
2364    { (exit 1); exit 1; }; }
2365         fi
2366         ol_enable_wrappers="$ol_arg"
2367
2368 else
2369         ol_enable_wrappers="no"
2370 fi; # end --enable-wrappers
2371
2372
2373 # OpenLDAP --enable-bdb
2374         # Check whether --enable-bdb or --disable-bdb was given.
2375 if test "${enable_bdb+set}" = set; then
2376   enableval="$enable_bdb"
2377
2378         ol_arg=invalid
2379         for ol_val in auto yes no ; do
2380                 if test "$enableval" = "$ol_val" ; then
2381                         ol_arg="$ol_val"
2382                 fi
2383         done
2384         if test "$ol_arg" = "invalid" ; then
2385                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
2386 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
2387    { (exit 1); exit 1; }; }
2388         fi
2389         ol_enable_bdb="$ol_arg"
2390
2391 else
2392         ol_enable_bdb="yes"
2393 fi; # end --enable-bdb
2394 # OpenLDAP --with-bdb_module
2395
2396 # Check whether --with-bdb_module or --without-bdb_module was given.
2397 if test "${with_bdb_module+set}" = set; then
2398   withval="$with_bdb_module"
2399
2400         ol_arg=invalid
2401         for ol_val in static dynamic ; do
2402                 if test "$withval" = "$ol_val" ; then
2403                         ol_arg="$ol_val"
2404                 fi
2405         done
2406         if test "$ol_arg" = "invalid" ; then
2407                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-bdb_module" >&5
2408 echo "$as_me: error: bad value $withval for --with-bdb_module" >&2;}
2409    { (exit 1); exit 1; }; }
2410         fi
2411         ol_with_bdb_module="$ol_arg"
2412
2413 else
2414         ol_with_bdb_module="static"
2415 fi; # end --with-bdb_module
2416
2417 # OpenLDAP --enable-dnssrv
2418         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2419 if test "${enable_dnssrv+set}" = set; then
2420   enableval="$enable_dnssrv"
2421
2422         ol_arg=invalid
2423         for ol_val in auto yes no ; do
2424                 if test "$enableval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
2430 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
2431    { (exit 1); exit 1; }; }
2432         fi
2433         ol_enable_dnssrv="$ol_arg"
2434
2435 else
2436         ol_enable_dnssrv="no"
2437 fi; # end --enable-dnssrv
2438 # OpenLDAP --with-dnssrv_module
2439
2440 # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2441 if test "${with_dnssrv_module+set}" = set; then
2442   withval="$with_dnssrv_module"
2443
2444         ol_arg=invalid
2445         for ol_val in static dynamic ; do
2446                 if test "$withval" = "$ol_val" ; then
2447                         ol_arg="$ol_val"
2448                 fi
2449         done
2450         if test "$ol_arg" = "invalid" ; then
2451                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-dnssrv_module" >&5
2452 echo "$as_me: error: bad value $withval for --with-dnssrv_module" >&2;}
2453    { (exit 1); exit 1; }; }
2454         fi
2455         ol_with_dnssrv_module="$ol_arg"
2456
2457 else
2458         ol_with_dnssrv_module="static"
2459 fi; # end --with-dnssrv_module
2460
2461 # OpenLDAP --enable-ldap
2462         # Check whether --enable-ldap or --disable-ldap was given.
2463 if test "${enable_ldap+set}" = set; then
2464   enableval="$enable_ldap"
2465
2466         ol_arg=invalid
2467         for ol_val in auto yes no ; do
2468                 if test "$enableval" = "$ol_val" ; then
2469                         ol_arg="$ol_val"
2470                 fi
2471         done
2472         if test "$ol_arg" = "invalid" ; then
2473                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
2474 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
2475    { (exit 1); exit 1; }; }
2476         fi
2477         ol_enable_ldap="$ol_arg"
2478
2479 else
2480         ol_enable_ldap="no"
2481 fi; # end --enable-ldap
2482 # OpenLDAP --with-ldap_module
2483
2484 # Check whether --with-ldap_module or --without-ldap_module was given.
2485 if test "${with_ldap_module+set}" = set; then
2486   withval="$with_ldap_module"
2487
2488         ol_arg=invalid
2489         for ol_val in static dynamic ; do
2490                 if test "$withval" = "$ol_val" ; then
2491                         ol_arg="$ol_val"
2492                 fi
2493         done
2494         if test "$ol_arg" = "invalid" ; then
2495                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-ldap_module" >&5
2496 echo "$as_me: error: bad value $withval for --with-ldap_module" >&2;}
2497    { (exit 1); exit 1; }; }
2498         fi
2499         ol_with_ldap_module="$ol_arg"
2500
2501 else
2502         ol_with_ldap_module="static"
2503 fi; # end --with-ldap_module
2504
2505 # OpenLDAP --enable-ldbm
2506         # Check whether --enable-ldbm or --disable-ldbm was given.
2507 if test "${enable_ldbm+set}" = set; then
2508   enableval="$enable_ldbm"
2509
2510         ol_arg=invalid
2511         for ol_val in auto yes no ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
2518 echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
2519    { (exit 1); exit 1; }; }
2520         fi
2521         ol_enable_ldbm="$ol_arg"
2522
2523 else
2524         ol_enable_ldbm="no"
2525 fi; # end --enable-ldbm
2526 # OpenLDAP --with-ldbm_api
2527
2528 # Check whether --with-ldbm_api or --without-ldbm_api was given.
2529 if test "${with_ldbm_api+set}" = set; then
2530   withval="$with_ldbm_api"
2531
2532         ol_arg=invalid
2533         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2534                 if test "$withval" = "$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 $withval for --with-ldbm_api" >&5
2540 echo "$as_me: error: bad value $withval for --with-ldbm_api" >&2;}
2541    { (exit 1); exit 1; }; }
2542         fi
2543         ol_with_ldbm_api="$ol_arg"
2544
2545 else
2546         ol_with_ldbm_api="auto"
2547 fi; # end --with-ldbm_api
2548
2549 # OpenLDAP --with-ldbm_module
2550
2551 # Check whether --with-ldbm_module or --without-ldbm_module was given.
2552 if test "${with_ldbm_module+set}" = set; then
2553   withval="$with_ldbm_module"
2554
2555         ol_arg=invalid
2556         for ol_val in static dynamic ; do
2557                 if test "$withval" = "$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 $withval for --with-ldbm_module" >&5
2563 echo "$as_me: error: bad value $withval for --with-ldbm_module" >&2;}
2564    { (exit 1); exit 1; }; }
2565         fi
2566         ol_with_ldbm_module="$ol_arg"
2567
2568 else
2569         ol_with_ldbm_module="static"
2570 fi; # end --with-ldbm_module
2571
2572 # OpenLDAP --with-ldbm_type
2573
2574 # Check whether --with-ldbm_type or --without-ldbm_type was given.
2575 if test "${with_ldbm_type+set}" = set; then
2576   withval="$with_ldbm_type"
2577
2578         ol_arg=invalid
2579         for ol_val in auto btree hash ; do
2580                 if test "$withval" = "$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 $withval for --with-ldbm_type" >&5
2586 echo "$as_me: error: bad value $withval for --with-ldbm_type" >&2;}
2587    { (exit 1); exit 1; }; }
2588         fi
2589         ol_with_ldbm_type="$ol_arg"
2590
2591 else
2592         ol_with_ldbm_type="auto"
2593 fi; # end --with-ldbm_type
2594
2595 # OpenLDAP --enable-meta
2596         # Check whether --enable-meta or --disable-meta was given.
2597 if test "${enable_meta+set}" = set; then
2598   enableval="$enable_meta"
2599
2600         ol_arg=invalid
2601         for ol_val in auto yes no ; do
2602                 if test "$enableval" = "$ol_val" ; then
2603                         ol_arg="$ol_val"
2604                 fi
2605         done
2606         if test "$ol_arg" = "invalid" ; then
2607                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
2608 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
2609    { (exit 1); exit 1; }; }
2610         fi
2611         ol_enable_meta="$ol_arg"
2612
2613 else
2614         ol_enable_meta="no"
2615 fi; # end --enable-meta
2616 # OpenLDAP --with-meta_module
2617
2618 # Check whether --with-meta_module or --without-meta_module was given.
2619 if test "${with_meta_module+set}" = set; then
2620   withval="$with_meta_module"
2621
2622         ol_arg=invalid
2623         for ol_val in static dynamic ; do
2624                 if test "$withval" = "$ol_val" ; then
2625                         ol_arg="$ol_val"
2626                 fi
2627         done
2628         if test "$ol_arg" = "invalid" ; then
2629                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-meta_module" >&5
2630 echo "$as_me: error: bad value $withval for --with-meta_module" >&2;}
2631    { (exit 1); exit 1; }; }
2632         fi
2633         ol_with_meta_module="$ol_arg"
2634
2635 else
2636         ol_with_meta_module="static"
2637 fi; # end --with-meta_module
2638
2639 # OpenLDAP --enable-monitor
2640         # Check whether --enable-monitor or --disable-monitor was given.
2641 if test "${enable_monitor+set}" = set; then
2642   enableval="$enable_monitor"
2643
2644         ol_arg=invalid
2645         for ol_val in auto yes no ; do
2646                 if test "$enableval" = "$ol_val" ; then
2647                         ol_arg="$ol_val"
2648                 fi
2649         done
2650         if test "$ol_arg" = "invalid" ; then
2651                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
2652 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
2653    { (exit 1); exit 1; }; }
2654         fi
2655         ol_enable_monitor="$ol_arg"
2656
2657 else
2658         ol_enable_monitor="no"
2659 fi; # end --enable-monitor
2660 # OpenLDAP --with-monitor_module
2661
2662 # Check whether --with-monitor_module or --without-monitor_module was given.
2663 if test "${with_monitor_module+set}" = set; then
2664   withval="$with_monitor_module"
2665
2666         ol_arg=invalid
2667         for ol_val in static dynamic ; do
2668                 if test "$withval" = "$ol_val" ; then
2669                         ol_arg="$ol_val"
2670                 fi
2671         done
2672         if test "$ol_arg" = "invalid" ; then
2673                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-monitor_module" >&5
2674 echo "$as_me: error: bad value $withval for --with-monitor_module" >&2;}
2675    { (exit 1); exit 1; }; }
2676         fi
2677         ol_with_monitor_module="$ol_arg"
2678
2679 else
2680         ol_with_monitor_module="static"
2681 fi; # end --with-monitor_module
2682
2683 # OpenLDAP --enable-null
2684         # Check whether --enable-null or --disable-null was given.
2685 if test "${enable_null+set}" = set; then
2686   enableval="$enable_null"
2687
2688         ol_arg=invalid
2689         for ol_val in auto yes no ; do
2690                 if test "$enableval" = "$ol_val" ; then
2691                         ol_arg="$ol_val"
2692                 fi
2693         done
2694         if test "$ol_arg" = "invalid" ; then
2695                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
2696 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
2697    { (exit 1); exit 1; }; }
2698         fi
2699         ol_enable_null="$ol_arg"
2700
2701 else
2702         ol_enable_null="no"
2703 fi; # end --enable-null
2704 # OpenLDAP --with-null_module
2705
2706 # Check whether --with-null_module or --without-null_module was given.
2707 if test "${with_null_module+set}" = set; then
2708   withval="$with_null_module"
2709
2710         ol_arg=invalid
2711         for ol_val in static dynamic ; do
2712                 if test "$withval" = "$ol_val" ; then
2713                         ol_arg="$ol_val"
2714                 fi
2715         done
2716         if test "$ol_arg" = "invalid" ; then
2717                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-null_module" >&5
2718 echo "$as_me: error: bad value $withval for --with-null_module" >&2;}
2719    { (exit 1); exit 1; }; }
2720         fi
2721         ol_with_null_module="$ol_arg"
2722
2723 else
2724         ol_with_null_module="static"
2725 fi; # end --with-null_module
2726
2727 # OpenLDAP --enable-passwd
2728         # Check whether --enable-passwd or --disable-passwd was given.
2729 if test "${enable_passwd+set}" = set; then
2730   enableval="$enable_passwd"
2731
2732         ol_arg=invalid
2733         for ol_val in auto yes no ; do
2734                 if test "$enableval" = "$ol_val" ; then
2735                         ol_arg="$ol_val"
2736                 fi
2737         done
2738         if test "$ol_arg" = "invalid" ; then
2739                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
2740 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
2741    { (exit 1); exit 1; }; }
2742         fi
2743         ol_enable_passwd="$ol_arg"
2744
2745 else
2746         ol_enable_passwd="no"
2747 fi; # end --enable-passwd
2748 # OpenLDAP --with-passwd_module
2749
2750 # Check whether --with-passwd_module or --without-passwd_module was given.
2751 if test "${with_passwd_module+set}" = set; then
2752   withval="$with_passwd_module"
2753
2754         ol_arg=invalid
2755         for ol_val in static dynamic ; do
2756                 if test "$withval" = "$ol_val" ; then
2757                         ol_arg="$ol_val"
2758                 fi
2759         done
2760         if test "$ol_arg" = "invalid" ; then
2761                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-passwd_module" >&5
2762 echo "$as_me: error: bad value $withval for --with-passwd_module" >&2;}
2763    { (exit 1); exit 1; }; }
2764         fi
2765         ol_with_passwd_module="$ol_arg"
2766
2767 else
2768         ol_with_passwd_module="static"
2769 fi; # end --with-passwd_module
2770
2771 # OpenLDAP --enable-perl
2772         # Check whether --enable-perl or --disable-perl was given.
2773 if test "${enable_perl+set}" = set; then
2774   enableval="$enable_perl"
2775
2776         ol_arg=invalid
2777         for ol_val in auto yes no ; do
2778                 if test "$enableval" = "$ol_val" ; then
2779                         ol_arg="$ol_val"
2780                 fi
2781         done
2782         if test "$ol_arg" = "invalid" ; then
2783                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
2784 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
2785    { (exit 1); exit 1; }; }
2786         fi
2787         ol_enable_perl="$ol_arg"
2788
2789 else
2790         ol_enable_perl="no"
2791 fi; # end --enable-perl
2792 # OpenLDAP --with-perl_module
2793
2794 # Check whether --with-perl_module or --without-perl_module was given.
2795 if test "${with_perl_module+set}" = set; then
2796   withval="$with_perl_module"
2797
2798         ol_arg=invalid
2799         for ol_val in static dynamic ; do
2800                 if test "$withval" = "$ol_val" ; then
2801                         ol_arg="$ol_val"
2802                 fi
2803         done
2804         if test "$ol_arg" = "invalid" ; then
2805                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-perl_module" >&5
2806 echo "$as_me: error: bad value $withval for --with-perl_module" >&2;}
2807    { (exit 1); exit 1; }; }
2808         fi
2809         ol_with_perl_module="$ol_arg"
2810
2811 else
2812         ol_with_perl_module="static"
2813 fi; # end --with-perl_module
2814
2815 # OpenLDAP --enable-shell
2816         # Check whether --enable-shell or --disable-shell was given.
2817 if test "${enable_shell+set}" = set; then
2818   enableval="$enable_shell"
2819
2820         ol_arg=invalid
2821         for ol_val in auto yes no ; do
2822                 if test "$enableval" = "$ol_val" ; then
2823                         ol_arg="$ol_val"
2824                 fi
2825         done
2826         if test "$ol_arg" = "invalid" ; then
2827                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
2828 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
2829    { (exit 1); exit 1; }; }
2830         fi
2831         ol_enable_shell="$ol_arg"
2832
2833 else
2834         ol_enable_shell="no"
2835 fi; # end --enable-shell
2836 # OpenLDAP --with-shell_module
2837
2838 # Check whether --with-shell_module or --without-shell_module was given.
2839 if test "${with_shell_module+set}" = set; then
2840   withval="$with_shell_module"
2841
2842         ol_arg=invalid
2843         for ol_val in static dynamic ; do
2844                 if test "$withval" = "$ol_val" ; then
2845                         ol_arg="$ol_val"
2846                 fi
2847         done
2848         if test "$ol_arg" = "invalid" ; then
2849                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-shell_module" >&5
2850 echo "$as_me: error: bad value $withval for --with-shell_module" >&2;}
2851    { (exit 1); exit 1; }; }
2852         fi
2853         ol_with_shell_module="$ol_arg"
2854
2855 else
2856         ol_with_shell_module="static"
2857 fi; # end --with-shell_module
2858
2859 # OpenLDAP --enable-sql
2860         # Check whether --enable-sql or --disable-sql was given.
2861 if test "${enable_sql+set}" = set; then
2862   enableval="$enable_sql"
2863
2864         ol_arg=invalid
2865         for ol_val in auto yes no ; do
2866                 if test "$enableval" = "$ol_val" ; then
2867                         ol_arg="$ol_val"
2868                 fi
2869         done
2870         if test "$ol_arg" = "invalid" ; then
2871                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
2872 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
2873    { (exit 1); exit 1; }; }
2874         fi
2875         ol_enable_sql="$ol_arg"
2876
2877 else
2878         ol_enable_sql="no"
2879 fi; # end --enable-sql
2880 # OpenLDAP --with-sql_module
2881
2882 # Check whether --with-sql_module or --without-sql_module was given.
2883 if test "${with_sql_module+set}" = set; then
2884   withval="$with_sql_module"
2885
2886         ol_arg=invalid
2887         for ol_val in static dynamic ; do
2888                 if test "$withval" = "$ol_val" ; then
2889                         ol_arg="$ol_val"
2890                 fi
2891         done
2892         if test "$ol_arg" = "invalid" ; then
2893                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-sql_module" >&5
2894 echo "$as_me: error: bad value $withval for --with-sql_module" >&2;}
2895    { (exit 1); exit 1; }; }
2896         fi
2897         ol_with_sql_module="$ol_arg"
2898
2899 else
2900         ol_with_sql_module="static"
2901 fi; # end --with-sql_module
2902
2903 # OpenLDAP --enable-tcl
2904         # Check whether --enable-tcl or --disable-tcl was given.
2905 if test "${enable_tcl+set}" = set; then
2906   enableval="$enable_tcl"
2907
2908         ol_arg=invalid
2909         for ol_val in auto yes no ; do
2910                 if test "$enableval" = "$ol_val" ; then
2911                         ol_arg="$ol_val"
2912                 fi
2913         done
2914         if test "$ol_arg" = "invalid" ; then
2915                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tcl" >&5
2916 echo "$as_me: error: bad value $enableval for --enable-tcl" >&2;}
2917    { (exit 1); exit 1; }; }
2918         fi
2919         ol_enable_tcl="$ol_arg"
2920
2921 else
2922         ol_enable_tcl="no"
2923 fi; # end --enable-tcl
2924 # OpenLDAP --with-tcl_module
2925
2926 # Check whether --with-tcl_module or --without-tcl_module was given.
2927 if test "${with_tcl_module+set}" = set; then
2928   withval="$with_tcl_module"
2929
2930         ol_arg=invalid
2931         for ol_val in static dynamic ; do
2932                 if test "$withval" = "$ol_val" ; then
2933                         ol_arg="$ol_val"
2934                 fi
2935         done
2936         if test "$ol_arg" = "invalid" ; then
2937                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tcl_module" >&5
2938 echo "$as_me: error: bad value $withval for --with-tcl_module" >&2;}
2939    { (exit 1); exit 1; }; }
2940         fi
2941         ol_with_tcl_module="$ol_arg"
2942
2943 else
2944         ol_with_tcl_module="static"
2945 fi; # end --with-tcl_module
2946
2947
2948
2949 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2950 if test "${with_xxslurpdoptions+set}" = set; then
2951   withval="$with_xxslurpdoptions"
2952
2953 fi;
2954 # OpenLDAP --enable-slurpd
2955         # Check whether --enable-slurpd or --disable-slurpd was given.
2956 if test "${enable_slurpd+set}" = set; then
2957   enableval="$enable_slurpd"
2958
2959         ol_arg=invalid
2960         for ol_val in auto yes no ; do
2961                 if test "$enableval" = "$ol_val" ; then
2962                         ol_arg="$ol_val"
2963                 fi
2964         done
2965         if test "$ol_arg" = "invalid" ; then
2966                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
2967 echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
2968    { (exit 1); exit 1; }; }
2969         fi
2970         ol_enable_slurpd="$ol_arg"
2971
2972 else
2973         ol_enable_slurpd="auto"
2974 fi; # end --enable-slurpd
2975
2976
2977 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2978 if test "${with_xxliboptions+set}" = set; then
2979   withval="$with_xxliboptions"
2980
2981 fi;
2982 # Check whether --enable-static or --disable-static was given.
2983 if test "${enable_static+set}" = set; then
2984   enableval="$enable_static"
2985   p=${PACKAGE-default}
2986 case $enableval in
2987 yes) enable_static=yes ;;
2988 no) enable_static=no ;;
2989 *)
2990   enable_static=no
2991   # Look at the argument we got.  We use all the common list separators.
2992   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2993   for pkg in $enableval; do
2994     if test "X$pkg" = "X$p"; then
2995       enable_static=yes
2996     fi
2997   done
2998   IFS="$ac_save_ifs"
2999   ;;
3000 esac
3001 else
3002   enable_static=yes
3003 fi;
3004 # Check whether --enable-shared or --disable-shared was given.
3005 if test "${enable_shared+set}" = set; then
3006   enableval="$enable_shared"
3007   p=${PACKAGE-default}
3008 case $enableval in
3009 yes) enable_shared=yes ;;
3010 no) enable_shared=no ;;
3011 *)
3012   enable_shared=no
3013   # Look at the argument we got.  We use all the common list separators.
3014   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3015   for pkg in $enableval; do
3016     if test "X$pkg" = "X$p"; then
3017       enable_shared=yes
3018     fi
3019   done
3020   IFS="$ac_save_ifs"
3021   ;;
3022 esac
3023 else
3024   enable_shared=yes
3025 fi;
3026
3027
3028 # validate options
3029 if test $ol_enable_slapd = no ; then
3030                 if test $ol_enable_slapi = yes ; then
3031                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
3032 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
3033         fi
3034         if test $ol_enable_bdb = yes ; then
3035                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-bdb argument" >&5
3036 echo "$as_me: WARNING: slapd disabled, ignoring --enable-bdb argument" >&2;}
3037         fi
3038         if test $ol_enable_dnssrv = yes ; then
3039                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dnssrv argument" >&5
3040 echo "$as_me: WARNING: slapd disabled, ignoring --enable-dnssrv argument" >&2;}
3041         fi
3042         if test $ol_enable_ldap = yes ; then
3043                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldap argument" >&5
3044 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldap argument" >&2;}
3045         fi
3046         if test $ol_enable_ldbm = yes ; then
3047                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm argument" >&5
3048 echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm argument" >&2;}
3049         fi
3050         if test $ol_enable_meta = yes ; then
3051                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-meta argument" >&5
3052 echo "$as_me: WARNING: slapd disabled, ignoring --enable-meta argument" >&2;}
3053         fi
3054         if test $ol_enable_monitor = yes ; then
3055                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-monitor argument" >&5
3056 echo "$as_me: WARNING: slapd disabled, ignoring --enable-monitor argument" >&2;}
3057         fi
3058         if test $ol_enable_null = yes ; then
3059                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-null argument" >&5
3060 echo "$as_me: WARNING: slapd disabled, ignoring --enable-null argument" >&2;}
3061         fi
3062         if test $ol_enable_passwd = yes ; then
3063                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-passwd argument" >&5
3064 echo "$as_me: WARNING: slapd disabled, ignoring --enable-passwd argument" >&2;}
3065         fi
3066         if test $ol_enable_perl = yes ; then
3067                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-perl argument" >&5
3068 echo "$as_me: WARNING: slapd disabled, ignoring --enable-perl argument" >&2;}
3069         fi
3070         if test $ol_enable_shell = yes ; then
3071                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-shell argument" >&5
3072 echo "$as_me: WARNING: slapd disabled, ignoring --enable-shell argument" >&2;}
3073         fi
3074         if test $ol_enable_tcl = yes ; then
3075                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-tcl argument" >&5
3076 echo "$as_me: WARNING: slapd disabled, ignoring --enable-tcl argument" >&2;}
3077         fi
3078         if test $ol_enable_sql = yes ; then
3079                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-sql argument" >&5
3080 echo "$as_me: WARNING: slapd disabled, ignoring --enable-sql argument" >&2;}
3081         fi
3082         if test $ol_enable_modules = yes ; then
3083                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
3084 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
3085         fi
3086         if test $ol_enable_multimaster = yes ; then
3087                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&5
3088 echo "$as_me: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&2;}
3089         fi
3090         if test $ol_enable_wrappers = yes ; then
3091                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
3092 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
3093         fi
3094         if test $ol_enable_phonetic = yes ; then
3095                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-phonetic argument" >&5
3096 echo "$as_me: WARNING: slapd disabled, ignoring --enable-phonetic argument" >&2;}
3097         fi
3098         if test $ol_enable_rlookups = yes ; then
3099                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
3100 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
3101         fi
3102         if test $ol_enable_aci = yes ; then
3103                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
3104 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
3105         fi
3106         if test $ol_with_ldbm_api != auto ; then
3107                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldbm-api argument" >&5
3108 echo "$as_me: WARNING: slapd disabled, ignoring --with-ldbm-api argument" >&2;}
3109         fi
3110         if test $ol_with_ldbm_type != auto ; then
3111                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldbm-type argument" >&5
3112 echo "$as_me: WARNING: slapd disabled, ignoring --with-ldbm-type argument" >&2;}
3113         fi
3114         if test $ol_with_bdb_module != static ; then
3115                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-bdb-module argument" >&5
3116 echo "$as_me: WARNING: slapd disabled, ignoring --with-bdb-module argument" >&2;}
3117         fi
3118         if test $ol_with_dnssrv_module != static ; then
3119                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-dnssrv-module argument" >&5
3120 echo "$as_me: WARNING: slapd disabled, ignoring --with-dnssrv-module argument" >&2;}
3121         fi
3122         if test $ol_with_ldap_module != static ; then
3123                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldap-module argument" >&5
3124 echo "$as_me: WARNING: slapd disabled, ignoring --with-ldap-module argument" >&2;}
3125         fi
3126         if test $ol_with_ldbm_module != static ; then
3127                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldbm-module argument" >&5
3128 echo "$as_me: WARNING: slapd disabled, ignoring --with-ldbm-module argument" >&2;}
3129         fi
3130         if test $ol_with_meta_module != static ; then
3131                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-meta-module argument" >&5
3132 echo "$as_me: WARNING: slapd disabled, ignoring --with-meta-module argument" >&2;}
3133         fi
3134         if test $ol_with_monitor_module != static ; then
3135                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-monitor-module argument" >&5
3136 echo "$as_me: WARNING: slapd disabled, ignoring --with-monitor-module argument" >&2;}
3137         fi
3138         if test $ol_with_null_module != static ; then
3139                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-null-module argument" >&5
3140 echo "$as_me: WARNING: slapd disabled, ignoring --with-null-module argument" >&2;}
3141         fi
3142         if test $ol_with_passwd_module != static ; then
3143                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-passwd-module argument" >&5
3144 echo "$as_me: WARNING: slapd disabled, ignoring --with-passwd-module argument" >&2;}
3145         fi
3146         if test $ol_with_perl_module != static ; then
3147                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-perl-module argument" >&5
3148 echo "$as_me: WARNING: slapd disabled, ignoring --with-perl-module argument" >&2;}
3149         fi
3150         if test $ol_with_shell_module != static ; then
3151                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-shell-module argument" >&5
3152 echo "$as_me: WARNING: slapd disabled, ignoring --with-shell-module argument" >&2;}
3153         fi
3154         if test $ol_with_tcl_module != static ; then
3155                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-tcl-module argument" >&5
3156 echo "$as_me: WARNING: slapd disabled, ignoring --with-tcl-module argument" >&2;}
3157         fi
3158         if test $ol_with_sql_module != static ; then
3159                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-sql-module argument" >&5
3160 echo "$as_me: WARNING: slapd disabled, ignoring --with-sql-module argument" >&2;}
3161         fi
3162         if test $ol_enable_slurpd = yes ; then
3163                 { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
3164 echo "$as_me: error: slurpd requires slapd" >&2;}
3165    { (exit 1); exit 1; }; }
3166         fi
3167         if test $ol_enable_rewrite = yes ; then
3168                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
3169 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
3170         fi
3171
3172         # force settings to no
3173         ol_enable_slapi=no
3174         ol_enable_bdb=no
3175         ol_enable_dnssrv=no
3176         ol_enable_ldap=no
3177         ol_enable_ldbm=no
3178         ol_enable_meta=no
3179         ol_enable_monitor=no
3180         ol_enable_null=no
3181         ol_enable_passwd=no
3182         ol_enable_perl=no
3183         ol_enable_shell=no
3184         ol_enable_tcl=no
3185         ol_enable_sql=no
3186
3187         ol_enable_modules=no
3188         ol_enable_multimaster=no
3189         ol_enable_phonetic=no
3190         ol_enable_rlookups=no
3191         ol_enable_aci=no
3192         ol_enable_wrappers=no
3193         ol_enable_dynamic=no
3194
3195         ol_with_ldbm_api=no
3196         ol_with_ldbm_type=no
3197
3198         ol_with_bdb_module=static
3199         ol_with_dnssrv_module=static
3200         ol_with_ldap_module=static
3201         ol_with_ldbm_module=static
3202         ol_with_meta_module=static
3203         ol_with_monitor_module=static
3204         ol_with_null_module=static
3205         ol_with_passwd_module=static
3206         ol_with_perl_module=static
3207         ol_with_shell_module=static
3208         ol_with_tcl_module=static
3209         ol_with_sql_module=static
3210
3211         ol_enable_slurpd=no
3212
3213         ol_enable_rewrite=no
3214
3215 elif test $ol_enable_ldbm = no ; then
3216
3217         if test $ol_with_ldbm_api != auto ; then
3218                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --with-ldbm-api argument" >&5
3219 echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-api argument" >&2;}
3220         fi
3221
3222         if test $ol_with_ldbm_type != auto ; then
3223                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --with-ldbm-type argument" >&5
3224 echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-type argument" >&2;}
3225         fi
3226
3227         if test $ol_with_ldbm_module != static ; then
3228                 { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --with-ldbm-module argument" >&5
3229 echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-module argument" >&2;}
3230         fi
3231
3232         if test $ol_enable_modules != yes -a \
3233                 $ol_enable_bdb = no -a \
3234                 $ol_enable_dnssrv = no -a \
3235                 $ol_enable_ldap = no -a \
3236                 $ol_enable_meta = no -a \
3237                 $ol_enable_monitor = no -a \
3238                 $ol_enable_null = no -a \
3239                 $ol_enable_passwd = no -a \
3240                 $ol_enable_perl = no -a \
3241                 $ol_enable_shell = no -a \
3242                 $ol_enable_sql = no -a \
3243                 $ol_enable_tcl = no ; then
3244
3245                 if test $ol_enable_slapd = yes ; then
3246                         { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
3247 echo "$as_me: error: slapd requires a backend" >&2;}
3248    { (exit 1); exit 1; }; }
3249                 else
3250                         { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
3251 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
3252                         ol_enable_slapd=no
3253                 fi
3254         fi
3255
3256         ol_with_ldbm_api=no
3257         ol_with_ldbm_type=no
3258         ol_with_ldbm_module=static
3259
3260         if test $ol_enable_bdb != no ; then
3261                 ol_with_ldbm_api=berkeley
3262         fi
3263
3264 else
3265                 if test $ol_with_ldbm_api = gdbm -a \
3266                 $ol_with_ldbm_type = btree ; then
3267                 { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
3268 echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
3269    { (exit 1); exit 1; }; }
3270         fi
3271         if test $ol_with_ldbm_api = mdbm -a \
3272                 $ol_with_ldbm_type = btree ; then
3273                 { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
3274 echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
3275    { (exit 1); exit 1; }; }
3276         fi
3277         if test $ol_with_ldbm_api = ndbm -a \
3278                 $ol_with_ldbm_type = btree ; then
3279                 { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
3280 echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
3281    { (exit 1); exit 1; }; }
3282         fi
3283
3284         if test $ol_enable_bdb = yes ; then
3285                 if test $ol_with_ldbm_api = auto ; then
3286                         ol_with_ldbm_api=berkeley
3287                 elif test $ol_with_ldbm_api != berkeley ; then
3288                         { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB" >&5
3289 echo "$as_me: error: LDBM API not compatible with BDB" >&2;}
3290    { (exit 1); exit 1; }; }
3291                 fi
3292
3293         elif test $ol_enable_bdb = auto ; then
3294                 if test $ol_with_ldbm_api != berkeley \
3295                         -o $ol_with_ldbm_api != auto ; then
3296                         { echo "$as_me:$LINENO: WARNING: LDBM API not compatible with BDB, disabling BDB" >&5
3297 echo "$as_me: WARNING: LDBM API not compatible with BDB, disabling BDB" >&2;}
3298                         ol_enable_bdb=no
3299                 fi
3300         fi
3301 fi
3302
3303 if test $ol_enable_slurpd = yes ; then
3304                 if test $ol_with_threads = no ; then
3305                 { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
3306 echo "$as_me: error: slurpd requires threads" >&2;}
3307    { (exit 1); exit 1; }; }
3308         fi
3309 fi
3310
3311 if test $ol_enable_lmpasswd = yes ; then
3312         if test $ol_with_tls = no ; then
3313                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
3314 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
3315    { (exit 1); exit 1; }; }
3316         fi
3317 fi
3318
3319 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
3320         if test $ol_with_kerberos = no ; then
3321                 { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
3322 echo "$as_me: error: options require --with-kerberos" >&2;}
3323    { (exit 1); exit 1; }; }
3324         elif test $ol_with_kerberos = auto ; then
3325                 ol_with_kerberos=yes
3326         fi
3327
3328 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
3329         if test $ol_with_kerberos = auto ; then
3330                 ol_with_kerberos=no
3331         elif test $ol_with_kerberos != no ; then
3332                 { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
3333 echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
3334                 ol_with_kerberos=no
3335         fi
3336 fi
3337
3338 if test $ol_enable_spasswd = yes ; then
3339         if test $ol_with_cyrus_sasl = no ; then
3340                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
3341 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
3342    { (exit 1); exit 1; }; }
3343         fi
3344         ol_with_cyrus_sasl=yes
3345 fi
3346
3347 echo "$as_me:$LINENO: result: done" >&5
3348 echo "${ECHO_T}done" >&6
3349
3350 LDAP_LIBS=
3351 LDIF_LIBS=
3352 LDBM_LIBS=
3353 LTHREAD_LIBS=
3354 LUTIL_LIBS=
3355
3356 SLAPD_LIBS=
3357 SLURPD_LIBS=
3358
3359 BUILD_SLAPD=no
3360 BUILD_SLURPD=no
3361
3362 BUILD_THREAD=no
3363
3364 BUILD_SLAPI=no
3365 SLAPD_SLAPI_DEPEND=
3366
3367 BUILD_BDB=no
3368 BUILD_DNSSRV=no
3369 BUILD_LDAP=no
3370 BUILD_LDBM=no
3371 BUILD_META=no
3372 BUILD_MONITOR=no
3373 BUILD_NULL=no
3374 BUILD_PASSWD=no
3375 BUILD_PERL=no
3376 BUILD_SHELL=no
3377 BUILD_SQL=no
3378 BUILD_TCL=no
3379
3380 BUILD_BDB_DYNAMIC=static
3381 BUILD_DNSSRV_DYNAMIC=static
3382 BUILD_LDAP_DYNAMIC=static
3383 BUILD_LDBM_DYNAMIC=static
3384 BUILD_META_DYNAMIC=static
3385 BUILD_MONITOR_DYNAMIC=static
3386 BUILD_NULL_DYNAMIC=static
3387 BUILD_PASSWD_DYNAMIC=static
3388 BUILD_PERL_DYNAMIC=static
3389 BUILD_SHELL_DYNAMIC=static
3390 BUILD_TCL_DYNAMIC=static
3391 BUILD_SQL_DYNAMIC=static
3392
3393 SLAPD_MODULES_LDFLAGS=
3394 SLAPD_MODULES_CPPFLAGS=
3395
3396 SLAPD_STATIC_BACKENDS=
3397 SLAPD_DYNAMIC_BACKENDS=
3398
3399 SLAPD_PERL_LDFLAGS=
3400 MOD_PERL_LDFLAGS=
3401 PERL_CPPFLAGS=
3402
3403 SLAPD_SQL_LDFLAGS=
3404 SLAPD_SQL_LIBS=
3405 SLAPD_SQL_INCLUDES=
3406
3407 MOD_TCL_LIB=
3408 KRB4_LIBS=
3409 KRB5_LIBS=
3410 READLINE_LIBS=
3411 SASL_LIBS=
3412 TERMCAP_LIBS=
3413 TLS_LIBS=
3414 MODULES_LIBS=
3415 SLAPI_LIBS=
3416 LIBSLAPI=
3417 LIBSLAPITOOLS=
3418 AUTH_LIBS=
3419
3420 SLAPD_SLP_LIBS=
3421
3422
3423 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3424 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3425 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3426 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3427   echo $ECHO_N "(cached) $ECHO_C" >&6
3428 else
3429   cat >conftest.make <<\_ACEOF
3430 all:
3431         @echo 'ac_maketemp="$(MAKE)"'
3432 _ACEOF
3433 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3434 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3435 if test -n "$ac_maketemp"; then
3436   eval ac_cv_prog_make_${ac_make}_set=yes
3437 else
3438   eval ac_cv_prog_make_${ac_make}_set=no
3439 fi
3440 rm -f conftest.make
3441 fi
3442 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3443   echo "$as_me:$LINENO: result: yes" >&5
3444 echo "${ECHO_T}yes" >&6
3445   SET_MAKE=
3446 else
3447   echo "$as_me:$LINENO: result: no" >&5
3448 echo "${ECHO_T}no" >&6
3449   SET_MAKE="MAKE=${MAKE-make}"
3450 fi
3451
3452 # Find a good install program.  We prefer a C program (faster),
3453 # so one script is as good as another.  But avoid the broken or
3454 # incompatible versions:
3455 # SysV /etc/install, /usr/sbin/install
3456 # SunOS /usr/etc/install
3457 # IRIX /sbin/install
3458 # AIX /bin/install
3459 # AmigaOS /C/install, which installs bootblocks on floppy discs
3460 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3461 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3462 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3463 # ./install, which can be erroneously created by make from ./install.sh.
3464 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3465 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
3466 if test -z "$INSTALL"; then
3467 if test "${ac_cv_path_install+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3471 for as_dir in $PATH
3472 do
3473   IFS=$as_save_IFS
3474   test -z "$as_dir" && as_dir=.
3475   # Account for people who put trailing slashes in PATH elements.
3476 case $as_dir/ in
3477   ./ | .// | /cC/* | \
3478   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3479   /usr/ucb/* ) ;;
3480   *)
3481     # OSF1 and SCO ODT 3.0 have their own names for install.
3482     # Don't use installbsd from OSF since it installs stuff as root
3483     # by default.
3484     for ac_prog in ginstall scoinst install; do
3485       for ac_exec_ext in '' $ac_executable_extensions; do
3486         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3487           if test $ac_prog = install &&
3488             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3489             # AIX install.  It has an incompatible calling convention.
3490             :
3491           elif test $ac_prog = install &&
3492             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3493             # program-specific install script used by HP pwplus--don't use.
3494             :
3495           else
3496             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3497             break 3
3498           fi
3499         fi
3500       done
3501     done
3502     ;;
3503 esac
3504 done
3505
3506
3507 fi
3508   if test "${ac_cv_path_install+set}" = set; then
3509     INSTALL=$ac_cv_path_install
3510   else
3511     # As a last resort, use the slow shell script.  We don't cache a
3512     # path for INSTALL within a source directory, because that will
3513     # break other packages using the cache if that directory is
3514     # removed, or if the path is relative.
3515     INSTALL=$ac_install_sh
3516   fi
3517 fi
3518 echo "$as_me:$LINENO: result: $INSTALL" >&5
3519 echo "${ECHO_T}$INSTALL" >&6
3520
3521 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3522 # It thinks the first close brace ends the variable substitution.
3523 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3524
3525 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3526
3527 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3528
3529
3530
3531 cat >>confdefs.h <<\_ACEOF
3532 #define HAVE_MKVERSION 1
3533 _ACEOF
3534
3535
3536
3537
3538 ol_aix_threads=no
3539 case "$target" in
3540 *-*-aix*)       if test -z "$CC" ; then
3541                 case "$ol_with_threads" in
3542                 auto | yes |  posix) ol_aix_threads=yes ;;
3543                 esac
3544         fi
3545 ;;
3546 esac
3547
3548 if test $ol_aix_threads = yes ; then
3549         if test -z "${CC}" ; then
3550                 for ac_prog in cc_r xlc_r cc
3551 do
3552   # Extract the first word of "$ac_prog", so it can be a program name with args.
3553 set dummy $ac_prog; ac_word=$2
3554 echo "$as_me:$LINENO: checking for $ac_word" >&5
3555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3556 if test "${ac_cv_prog_CC+set}" = set; then
3557   echo $ECHO_N "(cached) $ECHO_C" >&6
3558 else
3559   if test -n "$CC"; then
3560   ac_cv_prog_CC="$CC" # Let the user override the test.
3561 else
3562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563 for as_dir in $PATH
3564 do
3565   IFS=$as_save_IFS
3566   test -z "$as_dir" && as_dir=.
3567   for ac_exec_ext in '' $ac_executable_extensions; do
3568   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3569     ac_cv_prog_CC="$ac_prog"
3570     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3571     break 2
3572   fi
3573 done
3574 done
3575
3576 fi
3577 fi
3578 CC=$ac_cv_prog_CC
3579 if test -n "$CC"; then
3580   echo "$as_me:$LINENO: result: $CC" >&5
3581 echo "${ECHO_T}$CC" >&6
3582 else
3583   echo "$as_me:$LINENO: result: no" >&5
3584 echo "${ECHO_T}no" >&6
3585 fi
3586
3587   test -n "$CC" && break
3588 done
3589
3590
3591                 if test "$CC" = cc ; then
3592                                                 if test $ol_with_threads != auto ; then
3593                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
3594 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
3595    { (exit 1); exit 1; }; }
3596                         else
3597                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
3598 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
3599                         fi
3600                         ol_with_threads=no
3601                 fi
3602         fi
3603
3604         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3605                 ol_with_threads=posix
3606                 ol_cv_pthread_create=yes
3607         fi
3608 fi
3609
3610 if test -z "${CC}"; then
3611         for ac_prog in cc gcc
3612 do
3613   # Extract the first word of "$ac_prog", so it can be a program name with args.
3614 set dummy $ac_prog; ac_word=$2
3615 echo "$as_me:$LINENO: checking for $ac_word" >&5
3616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3617 if test "${ac_cv_prog_CC+set}" = set; then
3618   echo $ECHO_N "(cached) $ECHO_C" >&6
3619 else
3620   if test -n "$CC"; then
3621   ac_cv_prog_CC="$CC" # Let the user override the test.
3622 else
3623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624 for as_dir in $PATH
3625 do
3626   IFS=$as_save_IFS
3627   test -z "$as_dir" && as_dir=.
3628   for ac_exec_ext in '' $ac_executable_extensions; do
3629   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3630     ac_cv_prog_CC="$ac_prog"
3631     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3632     break 2
3633   fi
3634 done
3635 done
3636
3637 fi
3638 fi
3639 CC=$ac_cv_prog_CC
3640 if test -n "$CC"; then
3641   echo "$as_me:$LINENO: result: $CC" >&5
3642 echo "${ECHO_T}$CC" >&6
3643 else
3644   echo "$as_me:$LINENO: result: no" >&5
3645 echo "${ECHO_T}no" >&6
3646 fi
3647
3648   test -n "$CC" && break
3649 done
3650 test -n "$CC" || CC="missing"
3651
3652
3653         if test "${CC}" = "missing" ; then
3654                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
3655 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
3656    { (exit 1); exit 1; }; }
3657         fi
3658 fi
3659
3660 if test -z "${AR}"; then
3661         for ac_prog in ar gar
3662 do
3663   # Extract the first word of "$ac_prog", so it can be a program name with args.
3664 set dummy $ac_prog; ac_word=$2
3665 echo "$as_me:$LINENO: checking for $ac_word" >&5
3666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3667 if test "${ac_cv_prog_AR+set}" = set; then
3668   echo $ECHO_N "(cached) $ECHO_C" >&6
3669 else
3670   if test -n "$AR"; then
3671   ac_cv_prog_AR="$AR" # Let the user override the test.
3672 else
3673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674 for as_dir in $PATH
3675 do
3676   IFS=$as_save_IFS
3677   test -z "$as_dir" && as_dir=.
3678   for ac_exec_ext in '' $ac_executable_extensions; do
3679   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3680     ac_cv_prog_AR="$ac_prog"
3681     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3682     break 2
3683   fi
3684 done
3685 done
3686
3687 fi
3688 fi
3689 AR=$ac_cv_prog_AR
3690 if test -n "$AR"; then
3691   echo "$as_me:$LINENO: result: $AR" >&5
3692 echo "${ECHO_T}$AR" >&6
3693 else
3694   echo "$as_me:$LINENO: result: no" >&5
3695 echo "${ECHO_T}no" >&6
3696 fi
3697
3698   test -n "$AR" && break
3699 done
3700 test -n "$AR" || AR="missing"
3701
3702
3703         if test "${AR}" = "missing" ; then
3704                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
3705 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
3706    { (exit 1); exit 1; }; }
3707         fi
3708 fi
3709
3710
3711
3712 # Check whether --enable-fast-install or --disable-fast-install was given.
3713 if test "${enable_fast_install+set}" = set; then
3714   enableval="$enable_fast_install"
3715   p=${PACKAGE-default}
3716 case $enableval in
3717 yes) enable_fast_install=yes ;;
3718 no) enable_fast_install=no ;;
3719 *)
3720   enable_fast_install=no
3721   # Look at the argument we got.  We use all the common list separators.
3722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3723   for pkg in $enableval; do
3724     if test "X$pkg" = "X$p"; then
3725       enable_fast_install=yes
3726     fi
3727   done
3728   IFS="$ac_save_ifs"
3729   ;;
3730 esac
3731 else
3732   enable_fast_install=yes
3733 fi;
3734 ac_ext=c
3735 ac_cpp='$CPP $CPPFLAGS'
3736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3739 if test -n "$ac_tool_prefix"; then
3740   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3741 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3742 echo "$as_me:$LINENO: checking for $ac_word" >&5
3743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3744 if test "${ac_cv_prog_CC+set}" = set; then
3745   echo $ECHO_N "(cached) $ECHO_C" >&6
3746 else
3747   if test -n "$CC"; then
3748   ac_cv_prog_CC="$CC" # Let the user override the test.
3749 else
3750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751 for as_dir in $PATH
3752 do
3753   IFS=$as_save_IFS
3754   test -z "$as_dir" && as_dir=.
3755   for ac_exec_ext in '' $ac_executable_extensions; do
3756   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3757     ac_cv_prog_CC="${ac_tool_prefix}gcc"
3758     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3759     break 2
3760   fi
3761 done
3762 done
3763
3764 fi
3765 fi
3766 CC=$ac_cv_prog_CC
3767 if test -n "$CC"; then
3768   echo "$as_me:$LINENO: result: $CC" >&5
3769 echo "${ECHO_T}$CC" >&6
3770 else
3771   echo "$as_me:$LINENO: result: no" >&5
3772 echo "${ECHO_T}no" >&6
3773 fi
3774
3775 fi
3776 if test -z "$ac_cv_prog_CC"; then
3777   ac_ct_CC=$CC
3778   # Extract the first word of "gcc", so it can be a program name with args.
3779 set dummy gcc; ac_word=$2
3780 echo "$as_me:$LINENO: checking for $ac_word" >&5
3781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3782 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3783   echo $ECHO_N "(cached) $ECHO_C" >&6
3784 else
3785   if test -n "$ac_ct_CC"; then
3786   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3787 else
3788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789 for as_dir in $PATH
3790 do
3791   IFS=$as_save_IFS
3792   test -z "$as_dir" && as_dir=.
3793   for ac_exec_ext in '' $ac_executable_extensions; do
3794   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3795     ac_cv_prog_ac_ct_CC="gcc"
3796     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3797     break 2
3798   fi
3799 done
3800 done
3801
3802 fi
3803 fi
3804 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3805 if test -n "$ac_ct_CC"; then
3806   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3807 echo "${ECHO_T}$ac_ct_CC" >&6
3808 else
3809   echo "$as_me:$LINENO: result: no" >&5
3810 echo "${ECHO_T}no" >&6
3811 fi
3812
3813   CC=$ac_ct_CC
3814 else
3815   CC="$ac_cv_prog_CC"
3816 fi
3817
3818 if test -z "$CC"; then
3819   if test -n "$ac_tool_prefix"; then
3820   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3821 set dummy ${ac_tool_prefix}cc; ac_word=$2
3822 echo "$as_me:$LINENO: checking for $ac_word" >&5
3823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3824 if test "${ac_cv_prog_CC+set}" = set; then
3825   echo $ECHO_N "(cached) $ECHO_C" >&6
3826 else
3827   if test -n "$CC"; then
3828   ac_cv_prog_CC="$CC" # Let the user override the test.
3829 else
3830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3831 for as_dir in $PATH
3832 do
3833   IFS=$as_save_IFS
3834   test -z "$as_dir" && as_dir=.
3835   for ac_exec_ext in '' $ac_executable_extensions; do
3836   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3837     ac_cv_prog_CC="${ac_tool_prefix}cc"
3838     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3839     break 2
3840   fi
3841 done
3842 done
3843
3844 fi
3845 fi
3846 CC=$ac_cv_prog_CC
3847 if test -n "$CC"; then
3848   echo "$as_me:$LINENO: result: $CC" >&5
3849 echo "${ECHO_T}$CC" >&6
3850 else
3851   echo "$as_me:$LINENO: result: no" >&5
3852 echo "${ECHO_T}no" >&6
3853 fi
3854
3855 fi
3856 if test -z "$ac_cv_prog_CC"; then
3857   ac_ct_CC=$CC
3858   # Extract the first word of "cc", so it can be a program name with args.
3859 set dummy cc; ac_word=$2
3860 echo "$as_me:$LINENO: checking for $ac_word" >&5
3861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3862 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3863   echo $ECHO_N "(cached) $ECHO_C" >&6
3864 else
3865   if test -n "$ac_ct_CC"; then
3866   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3867 else
3868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3869 for as_dir in $PATH
3870 do
3871   IFS=$as_save_IFS
3872   test -z "$as_dir" && as_dir=.
3873   for ac_exec_ext in '' $ac_executable_extensions; do
3874   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3875     ac_cv_prog_ac_ct_CC="cc"
3876     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3877     break 2
3878   fi
3879 done
3880 done
3881
3882 fi
3883 fi
3884 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3885 if test -n "$ac_ct_CC"; then
3886   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3887 echo "${ECHO_T}$ac_ct_CC" >&6
3888 else
3889   echo "$as_me:$LINENO: result: no" >&5
3890 echo "${ECHO_T}no" >&6
3891 fi
3892
3893   CC=$ac_ct_CC
3894 else
3895   CC="$ac_cv_prog_CC"
3896 fi
3897
3898 fi
3899 if test -z "$CC"; then
3900   # Extract the first word of "cc", so it can be a program name with args.
3901 set dummy cc; ac_word=$2
3902 echo "$as_me:$LINENO: checking for $ac_word" >&5
3903 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3904 if test "${ac_cv_prog_CC+set}" = set; then
3905   echo $ECHO_N "(cached) $ECHO_C" >&6
3906 else
3907   if test -n "$CC"; then
3908   ac_cv_prog_CC="$CC" # Let the user override the test.
3909 else
3910   ac_prog_rejected=no
3911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3912 for as_dir in $PATH
3913 do
3914   IFS=$as_save_IFS
3915   test -z "$as_dir" && as_dir=.
3916   for ac_exec_ext in '' $ac_executable_extensions; do
3917   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3918     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3919        ac_prog_rejected=yes
3920        continue
3921      fi
3922     ac_cv_prog_CC="cc"
3923     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3924     break 2
3925   fi
3926 done
3927 done
3928
3929 if test $ac_prog_rejected = yes; then
3930   # We found a bogon in the path, so make sure we never use it.
3931   set dummy $ac_cv_prog_CC
3932   shift
3933   if test $# != 0; then
3934     # We chose a different compiler from the bogus one.
3935     # However, it has the same basename, so the bogon will be chosen
3936     # first if we set CC to just the basename; use the full file name.
3937     shift
3938     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3939   fi
3940 fi
3941 fi
3942 fi
3943 CC=$ac_cv_prog_CC
3944 if test -n "$CC"; then
3945   echo "$as_me:$LINENO: result: $CC" >&5
3946 echo "${ECHO_T}$CC" >&6
3947 else
3948   echo "$as_me:$LINENO: result: no" >&5
3949 echo "${ECHO_T}no" >&6
3950 fi
3951
3952 fi
3953 if test -z "$CC"; then
3954   if test -n "$ac_tool_prefix"; then
3955   for ac_prog in cl
3956   do
3957     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3958 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3959 echo "$as_me:$LINENO: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_CC+set}" = set; then
3962   echo $ECHO_N "(cached) $ECHO_C" >&6
3963 else
3964   if test -n "$CC"; then
3965   ac_cv_prog_CC="$CC" # Let the user override the test.
3966 else
3967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3968 for as_dir in $PATH
3969 do
3970   IFS=$as_save_IFS
3971   test -z "$as_dir" && as_dir=.
3972   for ac_exec_ext in '' $ac_executable_extensions; do
3973   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3974     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3975     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3976     break 2
3977   fi
3978 done
3979 done
3980
3981 fi
3982 fi
3983 CC=$ac_cv_prog_CC
3984 if test -n "$CC"; then
3985   echo "$as_me:$LINENO: result: $CC" >&5
3986 echo "${ECHO_T}$CC" >&6
3987 else
3988   echo "$as_me:$LINENO: result: no" >&5
3989 echo "${ECHO_T}no" >&6
3990 fi
3991
3992     test -n "$CC" && break
3993   done
3994 fi
3995 if test -z "$CC"; then
3996   ac_ct_CC=$CC
3997   for ac_prog in cl
3998 do
3999   # Extract the first word of "$ac_prog", so it can be a program name with args.
4000 set dummy $ac_prog; ac_word=$2
4001 echo "$as_me:$LINENO: checking for $ac_word" >&5
4002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4003 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4004   echo $ECHO_N "(cached) $ECHO_C" >&6
4005 else
4006   if test -n "$ac_ct_CC"; then
4007   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4008 else
4009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010 for as_dir in $PATH
4011 do
4012   IFS=$as_save_IFS
4013   test -z "$as_dir" && as_dir=.
4014   for ac_exec_ext in '' $ac_executable_extensions; do
4015   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4016     ac_cv_prog_ac_ct_CC="$ac_prog"
4017     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4018     break 2
4019   fi
4020 done
4021 done
4022
4023 fi
4024 fi
4025 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4026 if test -n "$ac_ct_CC"; then
4027   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4028 echo "${ECHO_T}$ac_ct_CC" >&6
4029 else
4030   echo "$as_me:$LINENO: result: no" >&5
4031 echo "${ECHO_T}no" >&6
4032 fi
4033
4034   test -n "$ac_ct_CC" && break
4035 done
4036
4037   CC=$ac_ct_CC
4038 fi
4039
4040 fi
4041
4042
4043 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
4044 See \`config.log' for more details." >&5
4045 echo "$as_me: error: no acceptable C compiler found in \$PATH
4046 See \`config.log' for more details." >&2;}
4047    { (exit 1); exit 1; }; }
4048
4049 # Provide some information about the compiler.
4050 echo "$as_me:$LINENO:" \
4051      "checking for C compiler version" >&5
4052 ac_compiler=`set X $ac_compile; echo $2`
4053 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
4054   (eval $ac_compiler --version </dev/null >&5) 2>&5
4055   ac_status=$?
4056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057   (exit $ac_status); }
4058 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
4059   (eval $ac_compiler -v </dev/null >&5) 2>&5
4060   ac_status=$?
4061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4062   (exit $ac_status); }
4063 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
4064   (eval $ac_compiler -V </dev/null >&5) 2>&5
4065   ac_status=$?
4066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067   (exit $ac_status); }
4068
4069 cat >conftest.$ac_ext <<_ACEOF
4070 #line $LINENO "configure"
4071 /* confdefs.h.  */
4072 _ACEOF
4073 cat confdefs.h >>conftest.$ac_ext
4074 cat >>conftest.$ac_ext <<_ACEOF
4075 /* end confdefs.h.  */
4076
4077 int
4078 main ()
4079 {
4080
4081   ;
4082   return 0;
4083 }
4084 _ACEOF
4085 ac_clean_files_save=$ac_clean_files
4086 ac_clean_files="$ac_clean_files a.out a.exe b.out"
4087 # Try to create an executable without -o first, disregard a.out.
4088 # It will help us diagnose broken compilers, and finding out an intuition
4089 # of exeext.
4090 echo "$as_me:$LINENO: checking for C compiler default output" >&5
4091 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
4092 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4093 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
4094   (eval $ac_link_default) 2>&5
4095   ac_status=$?
4096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097   (exit $ac_status); }; then
4098   # Find the output, starting from the most likely.  This scheme is
4099 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
4100 # resort.
4101
4102 # Be careful to initialize this variable, since it used to be cached.
4103 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
4104 ac_cv_exeext=
4105 # b.out is created by i960 compilers.
4106 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
4107 do
4108   test -f "$ac_file" || continue
4109   case $ac_file in
4110     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
4111         ;;
4112     conftest.$ac_ext )
4113         # This is the source file.
4114         ;;
4115     [ab].out )
4116         # We found the default executable, but exeext='' is most
4117         # certainly right.
4118         break;;
4119     *.* )
4120         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4121         # FIXME: I believe we export ac_cv_exeext for Libtool,
4122         # but it would be cool to find out if it's true.  Does anybody
4123         # maintain Libtool? --akim.
4124         export ac_cv_exeext
4125         break;;
4126     * )
4127         break;;
4128   esac
4129 done
4130 else
4131   echo "$as_me: failed program was:" >&5
4132 sed 's/^/| /' conftest.$ac_ext >&5
4133
4134 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
4135 See \`config.log' for more details." >&5
4136 echo "$as_me: error: C compiler cannot create executables
4137 See \`config.log' for more details." >&2;}
4138    { (exit 77); exit 77; }; }
4139 fi
4140
4141 ac_exeext=$ac_cv_exeext
4142 echo "$as_me:$LINENO: result: $ac_file" >&5
4143 echo "${ECHO_T}$ac_file" >&6
4144
4145 # Check the compiler produces executables we can run.  If not, either
4146 # the compiler is broken, or we cross compile.
4147 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
4148 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
4149 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
4150 # If not cross compiling, check that we can run a simple program.
4151 if test "$cross_compiling" != yes; then
4152   if { ac_try='./$ac_file'
4153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4154   (eval $ac_try) 2>&5
4155   ac_status=$?
4156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4157   (exit $ac_status); }; }; then
4158     cross_compiling=no
4159   else
4160     if test "$cross_compiling" = maybe; then
4161         cross_compiling=yes
4162     else
4163         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
4164 If you meant to cross compile, use \`--host'.
4165 See \`config.log' for more details." >&5
4166 echo "$as_me: error: cannot run C compiled programs.
4167 If you meant to cross compile, use \`--host'.
4168 See \`config.log' for more details." >&2;}
4169    { (exit 1); exit 1; }; }
4170     fi
4171   fi
4172 fi
4173 echo "$as_me:$LINENO: result: yes" >&5
4174 echo "${ECHO_T}yes" >&6
4175
4176 rm -f a.out a.exe conftest$ac_cv_exeext b.out
4177 ac_clean_files=$ac_clean_files_save
4178 # Check the compiler produces executables we can run.  If not, either
4179 # the compiler is broken, or we cross compile.
4180 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
4181 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
4182 echo "$as_me:$LINENO: result: $cross_compiling" >&5
4183 echo "${ECHO_T}$cross_compiling" >&6
4184
4185 echo "$as_me:$LINENO: checking for suffix of executables" >&5
4186 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
4187 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4188   (eval $ac_link) 2>&5
4189   ac_status=$?
4190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4191   (exit $ac_status); }; then
4192   # If both `conftest.exe' and `conftest' are `present' (well, observable)
4193 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4194 # work properly (i.e., refer to `conftest.exe'), while it won't with
4195 # `rm'.
4196 for ac_file in conftest.exe conftest conftest.*; do
4197   test -f "$ac_file" || continue
4198   case $ac_file in
4199     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
4200     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4201           export ac_cv_exeext
4202           break;;
4203     * ) break;;
4204   esac
4205 done
4206 else
4207   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
4208 See \`config.log' for more details." >&5
4209 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
4210 See \`config.log' for more details." >&2;}
4211    { (exit 1); exit 1; }; }
4212 fi
4213
4214 rm -f conftest$ac_cv_exeext
4215 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
4216 echo "${ECHO_T}$ac_cv_exeext" >&6
4217
4218 rm -f conftest.$ac_ext
4219 EXEEXT=$ac_cv_exeext
4220 ac_exeext=$EXEEXT
4221 echo "$as_me:$LINENO: checking for suffix of object files" >&5
4222 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
4223 if test "${ac_cv_objext+set}" = set; then
4224   echo $ECHO_N "(cached) $ECHO_C" >&6
4225 else
4226   cat >conftest.$ac_ext <<_ACEOF
4227 #line $LINENO "configure"
4228 /* confdefs.h.  */
4229 _ACEOF
4230 cat confdefs.h >>conftest.$ac_ext
4231 cat >>conftest.$ac_ext <<_ACEOF
4232 /* end confdefs.h.  */
4233
4234 int
4235 main ()
4236 {
4237
4238   ;
4239   return 0;
4240 }
4241 _ACEOF
4242 rm -f conftest.o conftest.obj
4243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4244   (eval $ac_compile) 2>&5
4245   ac_status=$?
4246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4247   (exit $ac_status); }; then
4248   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
4249   case $ac_file in
4250     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
4251     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4252        break;;
4253   esac
4254 done
4255 else
4256   echo "$as_me: failed program was:" >&5
4257 sed 's/^/| /' conftest.$ac_ext >&5
4258
4259 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
4260 See \`config.log' for more details." >&5
4261 echo "$as_me: error: cannot compute suffix of object files: cannot compile
4262 See \`config.log' for more details." >&2;}
4263    { (exit 1); exit 1; }; }
4264 fi
4265
4266 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4267 fi
4268 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
4269 echo "${ECHO_T}$ac_cv_objext" >&6
4270 OBJEXT=$ac_cv_objext
4271 ac_objext=$OBJEXT
4272 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
4273 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4274 if test "${ac_cv_c_compiler_gnu+set}" = set; then
4275   echo $ECHO_N "(cached) $ECHO_C" >&6
4276 else
4277   cat >conftest.$ac_ext <<_ACEOF
4278 #line $LINENO "configure"
4279 /* confdefs.h.  */
4280 _ACEOF
4281 cat confdefs.h >>conftest.$ac_ext
4282 cat >>conftest.$ac_ext <<_ACEOF
4283 /* end confdefs.h.  */
4284
4285 int
4286 main ()
4287 {
4288 #ifndef __GNUC__
4289        choke me
4290 #endif
4291
4292   ;
4293   return 0;
4294 }
4295 _ACEOF
4296 rm -f conftest.$ac_objext
4297 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4298   (eval $ac_compile) 2>&5
4299   ac_status=$?
4300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4301   (exit $ac_status); } &&
4302          { ac_try='test -s conftest.$ac_objext'
4303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4304   (eval $ac_try) 2>&5
4305   ac_status=$?
4306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4307   (exit $ac_status); }; }; then
4308   ac_compiler_gnu=yes
4309 else
4310   echo "$as_me: failed program was:" >&5
4311 sed 's/^/| /' conftest.$ac_ext >&5
4312
4313 ac_compiler_gnu=no
4314 fi
4315 rm -f conftest.$ac_objext conftest.$ac_ext
4316 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4317
4318 fi
4319 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
4320 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4321 GCC=`test $ac_compiler_gnu = yes && echo yes`
4322 ac_test_CFLAGS=${CFLAGS+set}
4323 ac_save_CFLAGS=$CFLAGS
4324 CFLAGS="-g"
4325 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
4326 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4327 if test "${ac_cv_prog_cc_g+set}" = set; then
4328   echo $ECHO_N "(cached) $ECHO_C" >&6
4329 else
4330   cat >conftest.$ac_ext <<_ACEOF
4331 #line $LINENO "configure"
4332 /* confdefs.h.  */
4333 _ACEOF
4334 cat confdefs.h >>conftest.$ac_ext
4335 cat >>conftest.$ac_ext <<_ACEOF
4336 /* end confdefs.h.  */
4337
4338 int
4339 main ()
4340 {
4341
4342   ;
4343   return 0;
4344 }
4345 _ACEOF
4346 rm -f conftest.$ac_objext
4347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4348   (eval $ac_compile) 2>&5
4349   ac_status=$?
4350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351   (exit $ac_status); } &&
4352          { ac_try='test -s conftest.$ac_objext'
4353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354   (eval $ac_try) 2>&5
4355   ac_status=$?
4356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357   (exit $ac_status); }; }; then
4358   ac_cv_prog_cc_g=yes
4359 else
4360   echo "$as_me: failed program was:" >&5
4361 sed 's/^/| /' conftest.$ac_ext >&5
4362
4363 ac_cv_prog_cc_g=no
4364 fi
4365 rm -f conftest.$ac_objext conftest.$ac_ext
4366 fi
4367 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4368 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
4369 if test "$ac_test_CFLAGS" = set; then
4370   CFLAGS=$ac_save_CFLAGS
4371 elif test $ac_cv_prog_cc_g = yes; then
4372   if test "$GCC" = yes; then
4373     CFLAGS="-g -O2"
4374   else
4375     CFLAGS="-g"
4376   fi
4377 else
4378   if test "$GCC" = yes; then
4379     CFLAGS="-O2"
4380   else
4381     CFLAGS=
4382   fi
4383 fi
4384 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
4385 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4386 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4387   echo $ECHO_N "(cached) $ECHO_C" >&6
4388 else
4389   ac_cv_prog_cc_stdc=no
4390 ac_save_CC=$CC
4391 cat >conftest.$ac_ext <<_ACEOF
4392 #line $LINENO "configure"
4393 /* confdefs.h.  */
4394 _ACEOF
4395 cat confdefs.h >>conftest.$ac_ext
4396 cat >>conftest.$ac_ext <<_ACEOF
4397 /* end confdefs.h.  */
4398 #include <stdarg.h>
4399 #include <stdio.h>
4400 #include <sys/types.h>
4401 #include <sys/stat.h>
4402 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4403 struct buf { int x; };
4404 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4405 static char *e (p, i)
4406      char **p;
4407      int i;
4408 {
4409   return p[i];
4410 }
4411 static char *f (char * (*g) (char **, int), char **p, ...)
4412 {
4413   char *s;
4414   va_list v;
4415   va_start (v,p);
4416   s = g (p, va_arg (v,int));
4417   va_end (v);
4418   return s;
4419 }
4420 int test (int i, double x);
4421 struct s1 {int (*f) (int a);};
4422 struct s2 {int (*f) (double a);};
4423 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4424 int argc;
4425 char **argv;
4426 int
4427 main ()
4428 {
4429 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4430   ;
4431   return 0;
4432 }
4433 _ACEOF
4434 # Don't try gcc -ansi; that turns off useful extensions and
4435 # breaks some systems' header files.
4436 # AIX                   -qlanglvl=ansi
4437 # Ultrix and OSF/1      -std1
4438 # HP-UX 10.20 and later -Ae
4439 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4440 # SVR4                  -Xc -D__EXTENSIONS__
4441 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4442 do
4443   CC="$ac_save_CC $ac_arg"
4444   rm -f conftest.$ac_objext
4445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4446   (eval $ac_compile) 2>&5
4447   ac_status=$?
4448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4449   (exit $ac_status); } &&
4450          { ac_try='test -s conftest.$ac_objext'
4451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4452   (eval $ac_try) 2>&5
4453   ac_status=$?
4454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4455   (exit $ac_status); }; }; then
4456   ac_cv_prog_cc_stdc=$ac_arg
4457 break
4458 else
4459   echo "$as_me: failed program was:" >&5
4460 sed 's/^/| /' conftest.$ac_ext >&5
4461
4462 fi
4463 rm -f conftest.$ac_objext
4464 done
4465 rm -f conftest.$ac_ext conftest.$ac_objext
4466 CC=$ac_save_CC
4467
4468 fi
4469
4470 case "x$ac_cv_prog_cc_stdc" in
4471   x|xno)
4472     echo "$as_me:$LINENO: result: none needed" >&5
4473 echo "${ECHO_T}none needed" >&6 ;;
4474   *)
4475     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
4476 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4477     CC="$CC $ac_cv_prog_cc_stdc" ;;
4478 esac
4479
4480 # Some people use a C++ compiler to compile C.  Since we use `exit',
4481 # in C++ we need to declare it.  In case someone uses the same compiler
4482 # for both compiling C and C++ we need to have the C++ compiler decide
4483 # the declaration of exit, since it's the most demanding environment.
4484 cat >conftest.$ac_ext <<_ACEOF
4485 #ifndef __cplusplus
4486   choke me
4487 #endif
4488 _ACEOF
4489 rm -f conftest.$ac_objext
4490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4491   (eval $ac_compile) 2>&5
4492   ac_status=$?
4493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4494   (exit $ac_status); } &&
4495          { ac_try='test -s conftest.$ac_objext'
4496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4497   (eval $ac_try) 2>&5
4498   ac_status=$?
4499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4500   (exit $ac_status); }; }; then
4501   for ac_declaration in \
4502    ''\
4503    '#include <stdlib.h>' \
4504    'extern "C" void std::exit (int) throw (); using std::exit;' \
4505    'extern "C" void std::exit (int); using std::exit;' \
4506    'extern "C" void exit (int) throw ();' \
4507    'extern "C" void exit (int);' \
4508    'void exit (int);'
4509 do
4510   cat >conftest.$ac_ext <<_ACEOF
4511 #line $LINENO "configure"
4512 /* confdefs.h.  */
4513 _ACEOF
4514 cat confdefs.h >>conftest.$ac_ext
4515 cat >>conftest.$ac_ext <<_ACEOF
4516 /* end confdefs.h.  */
4517 #include <stdlib.h>
4518 $ac_declaration
4519 int
4520 main ()
4521 {
4522 exit (42);
4523   ;
4524   return 0;
4525 }
4526 _ACEOF
4527 rm -f conftest.$ac_objext
4528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4529   (eval $ac_compile) 2>&5
4530   ac_status=$?
4531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532   (exit $ac_status); } &&
4533          { ac_try='test -s conftest.$ac_objext'
4534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4535   (eval $ac_try) 2>&5
4536   ac_status=$?
4537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538   (exit $ac_status); }; }; then
4539   :
4540 else
4541   echo "$as_me: failed program was:" >&5
4542 sed 's/^/| /' conftest.$ac_ext >&5
4543
4544 continue
4545 fi
4546 rm -f conftest.$ac_objext conftest.$ac_ext
4547   cat >conftest.$ac_ext <<_ACEOF
4548 #line $LINENO "configure"
4549 /* confdefs.h.  */
4550 _ACEOF
4551 cat confdefs.h >>conftest.$ac_ext
4552 cat >>conftest.$ac_ext <<_ACEOF
4553 /* end confdefs.h.  */
4554 $ac_declaration
4555 int
4556 main ()
4557 {
4558 exit (42);
4559   ;
4560   return 0;
4561 }
4562 _ACEOF
4563 rm -f conftest.$ac_objext
4564 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4565   (eval $ac_compile) 2>&5
4566   ac_status=$?
4567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568   (exit $ac_status); } &&
4569          { ac_try='test -s conftest.$ac_objext'
4570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4571   (eval $ac_try) 2>&5
4572   ac_status=$?
4573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574   (exit $ac_status); }; }; then
4575   break
4576 else
4577   echo "$as_me: failed program was:" >&5
4578 sed 's/^/| /' conftest.$ac_ext >&5
4579
4580 fi
4581 rm -f conftest.$ac_objext conftest.$ac_ext
4582 done
4583 rm -f conftest*
4584 if test -n "$ac_declaration"; then
4585   echo '#ifdef __cplusplus' >>confdefs.h
4586   echo $ac_declaration      >>confdefs.h
4587   echo '#endif'             >>confdefs.h
4588 fi
4589
4590 else
4591   echo "$as_me: failed program was:" >&5
4592 sed 's/^/| /' conftest.$ac_ext >&5
4593
4594 fi
4595 rm -f conftest.$ac_objext conftest.$ac_ext
4596 ac_ext=c
4597 ac_cpp='$CPP $CPPFLAGS'
4598 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4599 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4600 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4601
4602 # Find the correct PATH separator.  Usually this is `:', but
4603 # DJGPP uses `;' like DOS.
4604 if test "X${PATH_SEPARATOR+set}" != Xset; then
4605   UNAME=${UNAME-`uname 2>/dev/null`}
4606   case X$UNAME in
4607     *-DOS) lt_cv_sys_path_separator=';' ;;
4608     *)     lt_cv_sys_path_separator=':' ;;
4609   esac
4610   PATH_SEPARATOR=$lt_cv_sys_path_separator
4611 fi
4612
4613
4614 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4615 if test "${with_gnu_ld+set}" = set; then
4616   withval="$with_gnu_ld"
4617   test "$withval" = no || with_gnu_ld=yes
4618 else
4619   with_gnu_ld=no
4620 fi;
4621 ac_prog=ld
4622 if test "$GCC" = yes; then
4623   # Check if gcc -print-prog-name=ld gives a path.
4624   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4625 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4626   case $host in
4627   *-*-mingw*)
4628     # gcc leaves a trailing carriage return which upsets mingw
4629     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4630   *)
4631     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4632   esac
4633   case $ac_prog in
4634     # Accept absolute paths.
4635     [\\/]* | [A-Za-z]:[\\/]*)
4636       re_direlt='/[^/][^/]*/\.\./'
4637       # Canonicalize the path of ld
4638       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4639       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4640         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4641       done
4642       test -z "$LD" && LD="$ac_prog"
4643       ;;
4644   "")
4645     # If it fails, then pretend we aren't using GCC.
4646     ac_prog=ld
4647     ;;
4648   *)
4649     # If it is relative, then search for the first ld in PATH.
4650     with_gnu_ld=unknown
4651     ;;
4652   esac
4653 elif test "$with_gnu_ld" = yes; then
4654   echo "$as_me:$LINENO: checking for GNU ld" >&5
4655 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4656 else
4657   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4658 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4659 fi
4660 if test "${lt_cv_path_LD+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   if test -z "$LD"; then
4664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4665   for ac_dir in $PATH; do
4666     test -z "$ac_dir" && ac_dir=.
4667     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4668       lt_cv_path_LD="$ac_dir/$ac_prog"
4669       # Check to see if the program is GNU ld.  I'd rather use --version,
4670       # but apparently some GNU ld's only accept -v.
4671       # Break only if it was the GNU/non-GNU ld that we prefer.
4672       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4673         test "$with_gnu_ld" != no && break
4674       else
4675         test "$with_gnu_ld" != yes && break
4676       fi
4677     fi
4678   done
4679   IFS="$ac_save_ifs"
4680 else
4681   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4682 fi
4683 fi
4684
4685 LD="$lt_cv_path_LD"
4686 if test -n "$LD"; then
4687   echo "$as_me:$LINENO: result: $LD" >&5
4688 echo "${ECHO_T}$LD" >&6
4689 else
4690   echo "$as_me:$LINENO: result: no" >&5
4691 echo "${ECHO_T}no" >&6
4692 fi
4693 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4694 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4695    { (exit 1); exit 1; }; }
4696 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4697 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4698 if test "${lt_cv_prog_gnu_ld+set}" = set; then
4699   echo $ECHO_N "(cached) $ECHO_C" >&6
4700 else
4701   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4702 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4703   lt_cv_prog_gnu_ld=yes
4704 else
4705   lt_cv_prog_gnu_ld=no
4706 fi
4707 fi
4708 echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
4709 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
4710 with_gnu_ld=$lt_cv_prog_gnu_ld
4711
4712
4713 echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
4714 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
4715 if test "${lt_cv_ld_reload_flag+set}" = set; then
4716   echo $ECHO_N "(cached) $ECHO_C" >&6
4717 else
4718   lt_cv_ld_reload_flag='-r'
4719 fi
4720 echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
4721 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
4722 reload_flag=$lt_cv_ld_reload_flag
4723 test -n "$reload_flag" && reload_flag=" $reload_flag"
4724
4725 echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
4726 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
4727 if test "${lt_cv_path_NM+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   if test -n "$NM"; then
4731   # Let the user override the test.
4732   lt_cv_path_NM="$NM"
4733 else
4734   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4735   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4736     test -z "$ac_dir" && ac_dir=.
4737     tmp_nm=$ac_dir/${ac_tool_prefix}nm
4738     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4739       # Check to see if the nm accepts a BSD-compat flag.
4740       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4741       #   nm: unknown option "B" ignored
4742       # Tru64's nm complains that /dev/null is an invalid object file
4743       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4744         lt_cv_path_NM="$tmp_nm -B"
4745         break
4746       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4747         lt_cv_path_NM="$tmp_nm -p"
4748         break
4749       else
4750         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4751         continue # so that we can try to find one that supports BSD flags
4752       fi
4753     fi
4754   done
4755   IFS="$ac_save_ifs"
4756   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4757 fi
4758 fi
4759
4760 NM="$lt_cv_path_NM"
4761 echo "$as_me:$LINENO: result: $NM" >&5
4762 echo "${ECHO_T}$NM" >&6
4763
4764 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
4765 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
4766 if test "${lt_cv_path_SED+set}" = set; then
4767   echo $ECHO_N "(cached) $ECHO_C" >&6
4768 else
4769   # Loop through the user's path and test for sed and gsed.
4770 # Then use that list of sed's as ones to test for truncation.
4771 as_executable_p="test -f"
4772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773 for as_dir in $PATH
4774 do
4775   IFS=$as_save_IFS
4776   test -z "$as_dir" && as_dir=.
4777   for ac_prog in sed gsed; do
4778     for ac_exec_ext in '' $ac_executable_extensions; do
4779       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4780         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4781       fi
4782     done
4783   done
4784 done
4785
4786   # Create a temporary directory, and hook for its removal unless debugging.
4787 $debug ||
4788 {
4789   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4790   trap '{ (exit 1); exit 1; }' 1 2 13 15
4791 }
4792
4793 # Create a (secure) tmp directory for tmp files.
4794 : ${TMPDIR=/tmp}
4795 {
4796   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4797   test -n "$tmp" && test -d "$tmp"
4798 }  ||
4799 {
4800   tmp=$TMPDIR/sed$$-$RANDOM
4801   (umask 077 && mkdir $tmp)
4802 } ||
4803 {
4804    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4805    { (exit 1); exit 1; }
4806 }
4807   _max=0
4808   _count=0
4809   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4810   # along with /bin/sed that truncates output.
4811   for _sed in $_sed_list /usr/xpg4/bin/sed; do
4812     test ! -f ${_sed} && break
4813     cat /dev/null > "$tmp/sed.in"
4814     _count=0
4815     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4816     # Check for GNU sed and select it if it is found.
4817     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4818       lt_cv_path_SED=${_sed}
4819       break
4820     fi
4821     while true; do
4822       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4823       mv "$tmp/sed.tmp" "$tmp/sed.in"
4824       cp "$tmp/sed.in" "$tmp/sed.nl"
4825       echo >>"$tmp/sed.nl"
4826       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4827       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4828       # 40000 chars as input seems more than enough
4829       test $_count -gt 10 && break
4830       _count=`expr $_count + 1`
4831       if test $_count -gt $_max; then
4832         _max=$_count
4833         lt_cv_path_SED=$_sed
4834       fi
4835     done
4836   done
4837   rm -rf "$tmp"
4838
4839 fi
4840
4841 if test "X$SED" != "X"; then
4842   lt_cv_path_SED=$SED
4843 else
4844   SED=$lt_cv_path_SED
4845 fi
4846 echo "$as_me:$LINENO: result: $SED" >&5
4847 echo "${ECHO_T}$SED" >&6
4848
4849 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4850 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4851 LN_S=$as_ln_s
4852 if test "$LN_S" = "ln -s"; then
4853   echo "$as_me:$LINENO: result: yes" >&5
4854 echo "${ECHO_T}yes" >&6
4855 else
4856   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4857 echo "${ECHO_T}no, using $LN_S" >&6
4858 fi
4859
4860 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
4861 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
4862 if test "${lt_cv_deplibs_check_method+set}" = set; then
4863   echo $ECHO_N "(cached) $ECHO_C" >&6
4864 else
4865   lt_cv_file_magic_cmd='$MAGIC_CMD'
4866 lt_cv_file_magic_test_file=
4867 lt_cv_deplibs_check_method='unknown'
4868 # Need to set the preceding variable on all platforms that support
4869 # interlibrary dependencies.
4870 # 'none' -- dependencies not supported.
4871 # `unknown' -- same as none, but documents that we really don't know.
4872 # 'pass_all' -- all dependencies passed with no checks.
4873 # 'test_compile' -- check by making test program.
4874 # 'file_magic [[regex]]' -- check by looking for files in library path
4875 # which responds to the $file_magic_cmd with a given egrep regex.
4876 # If you have `file' or equivalent on your system and you're not sure
4877 # whether `pass_all' will *always* work, you probably want this one.
4878
4879 case $host_os in
4880 aix4* | aix5*)
4881   lt_cv_deplibs_check_method=pass_all
4882   ;;
4883
4884 beos*)
4885   lt_cv_deplibs_check_method=pass_all
4886   ;;
4887
4888 bsdi4*)
4889   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4890   lt_cv_file_magic_cmd='/usr/bin/file -L'
4891   lt_cv_file_magic_test_file=/shlib/libc.so
4892   ;;
4893
4894 cygwin* | mingw* | pw32*)
4895   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4896   lt_cv_file_magic_cmd='$OBJDUMP -f'
4897   ;;
4898
4899 darwin* | rhapsody*)
4900   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4901   lt_cv_file_magic_cmd='/usr/bin/file -L'
4902   case "$host_os" in
4903   rhapsody* | darwin1.[012])
4904     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4905     ;;
4906   *) # Darwin 1.3 on
4907     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4908     ;;
4909   esac
4910   ;;
4911
4912 freebsd*)
4913   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4914     case $host_cpu in
4915     i*86 )
4916       # Not sure whether the presence of OpenBSD here was a mistake.
4917       # Let's accept both of them until this is cleared up.
4918       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
4919       lt_cv_file_magic_cmd=/usr/bin/file
4920       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4921       ;;
4922     esac
4923   else
4924     lt_cv_deplibs_check_method=pass_all
4925   fi
4926   ;;
4927
4928 gnu*)
4929   lt_cv_deplibs_check_method=pass_all
4930   ;;
4931
4932 hpux10.20*|hpux11*)
4933   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4934   lt_cv_file_magic_cmd=/usr/bin/file
4935   lt_cv_file_magic_test_file=/usr/lib/libc.sl
4936   ;;
4937
4938 irix5* | irix6* | nonstopux*)
4939   case $host_os in
4940   irix5* | nonstopux*)
4941     # this will be overridden with pass_all, but let us keep it just in case
4942     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4943     ;;
4944   *)
4945     case $LD in
4946     *-32|*"-32 ") libmagic=32-bit;;
4947     *-n32|*"-n32 ") libmagic=N32;;
4948     *-64|*"-64 ") libmagic=64-bit;;
4949     *) libmagic=never-match;;
4950     esac
4951     # this will be overridden with pass_all, but let us keep it just in case
4952     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
4953     ;;
4954   esac
4955   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4956   lt_cv_deplibs_check_method=pass_all
4957   ;;
4958
4959 # This must be Linux ELF.
4960 linux-gnu*)
4961   case $host_cpu in
4962   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4963     lt_cv_deplibs_check_method=pass_all ;;
4964   *)
4965     # glibc up to 2.1.1 does not perform some relocations on ARM
4966     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
4967   esac
4968   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4969   ;;
4970
4971 netbsd*)
4972   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4973     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
4974   else
4975     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
4976   fi
4977   ;;
4978
4979 newos6*)
4980   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4981   lt_cv_file_magic_cmd=/usr/bin/file
4982   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4983   ;;
4984
4985 openbsd*)
4986   lt_cv_file_magic_cmd=/usr/bin/file
4987   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4988   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4989     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4990   else
4991     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4992   fi
4993   ;;
4994
4995 osf3* | osf4* | osf5*)
4996   # this will be overridden with pass_all, but let us keep it just in case
4997   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4998   lt_cv_file_magic_test_file=/shlib/libc.so
4999   lt_cv_deplibs_check_method=pass_all
5000   ;;
5001
5002 sco3.2v5*)
5003   lt_cv_deplibs_check_method=pass_all
5004   ;;
5005
5006 solaris*)
5007   lt_cv_deplibs_check_method=pass_all
5008   lt_cv_file_magic_test_file=/lib/libc.so
5009   ;;
5010
5011 sysv5uw[78]* | sysv4*uw2*)
5012   lt_cv_deplibs_check_method=pass_all
5013   ;;
5014
5015 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5016   case $host_vendor in
5017   motorola)
5018     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]'
5019     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5020     ;;
5021   ncr)
5022     lt_cv_deplibs_check_method=pass_all
5023     ;;
5024   sequent)
5025     lt_cv_file_magic_cmd='/bin/file'
5026     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5027     ;;
5028   sni)
5029     lt_cv_file_magic_cmd='/bin/file'
5030     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5031     lt_cv_file_magic_test_file=/lib/libc.so
5032     ;;
5033   siemens)
5034     lt_cv_deplibs_check_method=pass_all
5035     ;;
5036   esac
5037   ;;
5038 esac
5039
5040 fi
5041 echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
5042 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
5043 file_magic_cmd=$lt_cv_file_magic_cmd
5044 deplibs_check_method=$lt_cv_deplibs_check_method
5045
5046
5047
5048
5049
5050
5051
5052
5053 # Check for command to grab the raw symbol name followed by C symbol from nm.
5054 echo "$as_me:$LINENO: checking command to parse $NM output" >&5
5055 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
5056 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
5057   echo $ECHO_N "(cached) $ECHO_C" >&6
5058 else
5059
5060 # These are sane defaults that work on at least a few old systems.
5061 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5062
5063 # Character class describing NM global symbol codes.
5064 symcode='[BCDEGRST]'
5065
5066 # Regexp to match symbols that can be accessed directly from C.
5067 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5068
5069 # Transform the above into a raw symbol and a C symbol.
5070 symxfrm='\1 \2\3 \3'
5071
5072 # Transform an extracted symbol line into a proper C declaration
5073 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
5074
5075 # Transform an extracted symbol line into symbol name and symbol address
5076 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5077
5078 # Define system-specific variables.
5079 case $host_os in
5080 aix*)
5081   symcode='[BCDT]'
5082   ;;
5083 cygwin* | mingw* | pw32*)
5084   symcode='[ABCDGISTW]'
5085   ;;
5086 hpux*) # Its linker distinguishes data from code symbols
5087   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5088   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5089   ;;
5090 irix* | nonstopux*)
5091   symcode='[BCDEGRST]'
5092   ;;
5093 osf*)
5094   symcode='[BCDEGQRST]'
5095   ;;
5096 solaris* | sysv5*)
5097   symcode='[BDT]'
5098   ;;
5099 sysv4)
5100   symcode='[DFNSTU]'
5101   ;;
5102 esac
5103
5104 # Handle CRLF in mingw tool chain
5105 opt_cr=
5106 case $host_os in
5107 mingw*)
5108   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5109   ;;
5110 esac
5111
5112 # If we're using GNU nm, then use its standard symbol codes.
5113 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
5114   symcode='[ABCDGISTW]'
5115 fi
5116
5117 # Try without a prefix undercore, then with it.
5118 for ac_symprfx in "" "_"; do
5119
5120   # Write the raw and C identifiers.
5121 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5122
5123   # Check to see that the pipe works correctly.
5124   pipe_works=no
5125   rm -f conftest*
5126   cat > conftest.$ac_ext <<EOF
5127 #ifdef __cplusplus
5128 extern "C" {
5129 #endif
5130 char nm_test_var;
5131 void nm_test_func(){}
5132 #ifdef __cplusplus
5133 }
5134 #endif
5135 int main(){nm_test_var='a';nm_test_func();return(0);}
5136 EOF
5137
5138   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5139   (eval $ac_compile) 2>&5
5140   ac_status=$?
5141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142   (exit $ac_status); }; then
5143     # Now try to grab the symbols.
5144     nlist=conftest.nm
5145     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
5146   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
5147   ac_status=$?
5148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5149   (exit $ac_status); } && test -s "$nlist"; then
5150       # Try sorting and uniquifying the output.
5151       if sort "$nlist" | uniq > "$nlist"T; then
5152         mv -f "$nlist"T "$nlist"
5153       else
5154         rm -f "$nlist"T
5155       fi
5156
5157       # Make sure that we snagged all the symbols we need.
5158       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
5159         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
5160           cat <<EOF > conftest.$ac_ext
5161 #ifdef __cplusplus
5162 extern "C" {
5163 #endif
5164
5165 EOF
5166           # Now generate the symbol file.
5167           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
5168
5169           cat <<EOF >> conftest.$ac_ext
5170 #if defined (__STDC__) && __STDC__
5171 # define lt_ptr void *
5172 #else
5173 # define lt_ptr char *
5174 # define const
5175 #endif
5176
5177 /* The mapping between symbol names and symbols. */
5178 const struct {
5179   const char *name;
5180   lt_ptr address;
5181 }
5182 lt_preloaded_symbols[] =
5183 {
5184 EOF
5185           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
5186           cat <<\EOF >> conftest.$ac_ext
5187   {0, (lt_ptr) 0}
5188 };
5189
5190 #ifdef __cplusplus
5191 }
5192 #endif
5193 EOF
5194           # Now try linking the two files.
5195           mv conftest.$ac_objext conftstm.$ac_objext
5196           save_LIBS="$LIBS"
5197           save_CFLAGS="$CFLAGS"
5198           LIBS="conftstm.$ac_objext"
5199           CFLAGS="$CFLAGS$no_builtin_flag"
5200           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5201   (eval $ac_link) 2>&5
5202   ac_status=$?
5203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204   (exit $ac_status); } && test -s conftest$ac_exeext; then
5205             pipe_works=yes
5206           fi
5207           LIBS="$save_LIBS"
5208           CFLAGS="$save_CFLAGS"
5209         else
5210           echo "cannot find nm_test_func in $nlist" >&5
5211         fi
5212       else
5213         echo "cannot find nm_test_var in $nlist" >&5
5214       fi
5215     else
5216       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
5217     fi
5218   else
5219     echo "$progname: failed program was:" >&5
5220     cat conftest.$ac_ext >&5
5221   fi
5222   rm -f conftest* conftst*
5223
5224   # Do not use the global_symbol_pipe unless it works.
5225   if test "$pipe_works" = yes; then
5226     break
5227   else
5228     lt_cv_sys_global_symbol_pipe=
5229   fi
5230 done
5231
5232 fi
5233
5234 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
5235 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5236   global_symbol_to_cdecl=
5237   global_symbol_to_c_name_address=
5238 else
5239   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
5240   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
5241 fi
5242 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
5243 then
5244   echo "$as_me:$LINENO: result: failed" >&5
5245 echo "${ECHO_T}failed" >&6
5246 else
5247   echo "$as_me:$LINENO: result: ok" >&5
5248 echo "${ECHO_T}ok" >&6
5249 fi
5250
5251 ac_ext=c
5252 ac_cpp='$CPP $CPPFLAGS'
5253 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5254 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5255 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5256 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
5257 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
5258 # On Suns, sometimes $CPP names a directory.
5259 if test -n "$CPP" && test -d "$CPP"; then
5260   CPP=
5261 fi
5262 if test -z "$CPP"; then
5263   if test "${ac_cv_prog_CPP+set}" = set; then
5264   echo $ECHO_N "(cached) $ECHO_C" >&6
5265 else
5266       # Double quotes because CPP needs to be expanded
5267     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5268     do
5269       ac_preproc_ok=false
5270 for ac_c_preproc_warn_flag in '' yes
5271 do
5272   # Use a header file that comes with gcc, so configuring glibc
5273   # with a fresh cross-compiler works.
5274   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5275   # <limits.h> exists even on freestanding compilers.
5276   # On the NeXT, cc -E runs the code through the compiler's parser,
5277   # not just through cpp. "Syntax error" is here to catch this case.
5278   cat >conftest.$ac_ext <<_ACEOF
5279 #line $LINENO "configure"
5280 /* confdefs.h.  */
5281 _ACEOF
5282 cat confdefs.h >>conftest.$ac_ext
5283 cat >>conftest.$ac_ext <<_ACEOF
5284 /* end confdefs.h.  */
5285 #ifdef __STDC__
5286 # include <limits.h>
5287 #else
5288 # include <assert.h>
5289 #endif
5290                      Syntax error
5291 _ACEOF
5292 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5294   ac_status=$?
5295   grep -v '^ *+' conftest.er1 >conftest.err
5296   rm -f conftest.er1
5297   cat conftest.err >&5
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); } >/dev/null; then
5300   if test -s conftest.err; then
5301     ac_cpp_err=$ac_c_preproc_warn_flag
5302   else
5303     ac_cpp_err=
5304   fi
5305 else
5306   ac_cpp_err=yes
5307 fi
5308 if test -z "$ac_cpp_err"; then
5309   :
5310 else
5311   echo "$as_me: failed program was:" >&5
5312 sed 's/^/| /' conftest.$ac_ext >&5
5313
5314   # Broken: fails on valid input.
5315 continue
5316 fi
5317 rm -f conftest.err conftest.$ac_ext
5318
5319   # OK, works on sane cases.  Now check whether non-existent headers
5320   # can be detected and how.
5321   cat >conftest.$ac_ext <<_ACEOF
5322 #line $LINENO "configure"
5323 /* confdefs.h.  */
5324 _ACEOF
5325 cat confdefs.h >>conftest.$ac_ext
5326 cat >>conftest.$ac_ext <<_ACEOF
5327 /* end confdefs.h.  */
5328 #include <ac_nonexistent.h>
5329 _ACEOF
5330 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5331   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5332   ac_status=$?
5333   grep -v '^ *+' conftest.er1 >conftest.err
5334   rm -f conftest.er1
5335   cat conftest.err >&5
5336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5337   (exit $ac_status); } >/dev/null; then
5338   if test -s conftest.err; then
5339     ac_cpp_err=$ac_c_preproc_warn_flag
5340   else
5341     ac_cpp_err=
5342   fi
5343 else
5344   ac_cpp_err=yes
5345 fi
5346 if test -z "$ac_cpp_err"; then
5347   # Broken: success on invalid input.
5348 continue
5349 else
5350   echo "$as_me: failed program was:" >&5
5351 sed 's/^/| /' conftest.$ac_ext >&5
5352
5353   # Passes both tests.
5354 ac_preproc_ok=:
5355 break
5356 fi
5357 rm -f conftest.err conftest.$ac_ext
5358
5359 done
5360 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5361 rm -f conftest.err conftest.$ac_ext
5362 if $ac_preproc_ok; then
5363   break
5364 fi
5365
5366     done
5367     ac_cv_prog_CPP=$CPP
5368
5369 fi
5370   CPP=$ac_cv_prog_CPP
5371 else
5372   ac_cv_prog_CPP=$CPP
5373 fi
5374 echo "$as_me:$LINENO: result: $CPP" >&5
5375 echo "${ECHO_T}$CPP" >&6
5376 ac_preproc_ok=false
5377 for ac_c_preproc_warn_flag in '' yes
5378 do
5379   # Use a header file that comes with gcc, so configuring glibc
5380   # with a fresh cross-compiler works.
5381   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5382   # <limits.h> exists even on freestanding compilers.
5383   # On the NeXT, cc -E runs the code through the compiler's parser,
5384   # not just through cpp. "Syntax error" is here to catch this case.
5385   cat >conftest.$ac_ext <<_ACEOF
5386 #line $LINENO "configure"
5387 /* confdefs.h.  */
5388 _ACEOF
5389 cat confdefs.h >>conftest.$ac_ext
5390 cat >>conftest.$ac_ext <<_ACEOF
5391 /* end confdefs.h.  */
5392 #ifdef __STDC__
5393 # include <limits.h>
5394 #else
5395 # include <assert.h>
5396 #endif
5397                      Syntax error
5398 _ACEOF
5399 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5400   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5401   ac_status=$?
5402   grep -v '^ *+' conftest.er1 >conftest.err
5403   rm -f conftest.er1
5404   cat conftest.err >&5
5405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406   (exit $ac_status); } >/dev/null; then
5407   if test -s conftest.err; then
5408     ac_cpp_err=$ac_c_preproc_warn_flag
5409   else
5410     ac_cpp_err=
5411   fi
5412 else
5413   ac_cpp_err=yes
5414 fi
5415 if test -z "$ac_cpp_err"; then
5416   :
5417 else
5418   echo "$as_me: failed program was:" >&5
5419 sed 's/^/| /' conftest.$ac_ext >&5
5420
5421   # Broken: fails on valid input.
5422 continue
5423 fi
5424 rm -f conftest.err conftest.$ac_ext
5425
5426   # OK, works on sane cases.  Now check whether non-existent headers
5427   # can be detected and how.
5428   cat >conftest.$ac_ext <<_ACEOF
5429 #line $LINENO "configure"
5430 /* confdefs.h.  */
5431 _ACEOF
5432 cat confdefs.h >>conftest.$ac_ext
5433 cat >>conftest.$ac_ext <<_ACEOF
5434 /* end confdefs.h.  */
5435 #include <ac_nonexistent.h>
5436 _ACEOF
5437 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5439   ac_status=$?
5440   grep -v '^ *+' conftest.er1 >conftest.err
5441   rm -f conftest.er1
5442   cat conftest.err >&5
5443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5444   (exit $ac_status); } >/dev/null; then
5445   if test -s conftest.err; then
5446     ac_cpp_err=$ac_c_preproc_warn_flag
5447   else
5448     ac_cpp_err=
5449   fi
5450 else
5451   ac_cpp_err=yes
5452 fi
5453 if test -z "$ac_cpp_err"; then
5454   # Broken: success on invalid input.
5455 continue
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 sed 's/^/| /' conftest.$ac_ext >&5
5459
5460   # Passes both tests.
5461 ac_preproc_ok=:
5462 break
5463 fi
5464 rm -f conftest.err conftest.$ac_ext
5465
5466 done
5467 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5468 rm -f conftest.err conftest.$ac_ext
5469 if $ac_preproc_ok; then
5470   :
5471 else
5472   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
5473 See \`config.log' for more details." >&5
5474 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
5475 See \`config.log' for more details." >&2;}
5476    { (exit 1); exit 1; }; }
5477 fi
5478
5479 ac_ext=c
5480 ac_cpp='$CPP $CPPFLAGS'
5481 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5482 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5483 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5484
5485
5486 echo "$as_me:$LINENO: checking for egrep" >&5
5487 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
5488 if test "${ac_cv_prog_egrep+set}" = set; then
5489   echo $ECHO_N "(cached) $ECHO_C" >&6
5490 else
5491   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
5492     then ac_cv_prog_egrep='grep -E'
5493     else ac_cv_prog_egrep='egrep'
5494     fi
5495 fi
5496 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
5497 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
5498  EGREP=$ac_cv_prog_egrep
5499
5500
5501 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5502 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5503 if test "${ac_cv_header_stdc+set}" = set; then
5504   echo $ECHO_N "(cached) $ECHO_C" >&6
5505 else
5506   cat >conftest.$ac_ext <<_ACEOF
5507 #line $LINENO "configure"
5508 /* confdefs.h.  */
5509 _ACEOF
5510 cat confdefs.h >>conftest.$ac_ext
5511 cat >>conftest.$ac_ext <<_ACEOF
5512 /* end confdefs.h.  */
5513 #include <stdlib.h>
5514 #include <stdarg.h>
5515 #include <string.h>
5516 #include <float.h>
5517
5518 int
5519 main ()
5520 {
5521
5522   ;
5523   return 0;
5524 }
5525 _ACEOF
5526 rm -f conftest.$ac_objext
5527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5528   (eval $ac_compile) 2>&5
5529   ac_status=$?
5530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5531   (exit $ac_status); } &&
5532          { ac_try='test -s conftest.$ac_objext'
5533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5534   (eval $ac_try) 2>&5
5535   ac_status=$?
5536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5537   (exit $ac_status); }; }; then
5538   ac_cv_header_stdc=yes
5539 else
5540   echo "$as_me: failed program was:" >&5
5541 sed 's/^/| /' conftest.$ac_ext >&5
5542
5543 ac_cv_header_stdc=no
5544 fi
5545 rm -f conftest.$ac_objext conftest.$ac_ext
5546
5547 if test $ac_cv_header_stdc = yes; then
5548   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5549   cat >conftest.$ac_ext <<_ACEOF
5550 #line $LINENO "configure"
5551 /* confdefs.h.  */
5552 _ACEOF
5553 cat confdefs.h >>conftest.$ac_ext
5554 cat >>conftest.$ac_ext <<_ACEOF
5555 /* end confdefs.h.  */
5556 #include <string.h>
5557
5558 _ACEOF
5559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5560   $EGREP "memchr" >/dev/null 2>&1; then
5561   :
5562 else
5563   ac_cv_header_stdc=no
5564 fi
5565 rm -f conftest*
5566
5567 fi
5568
5569 if test $ac_cv_header_stdc = yes; then
5570   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5571   cat >conftest.$ac_ext <<_ACEOF
5572 #line $LINENO "configure"
5573 /* confdefs.h.  */
5574 _ACEOF
5575 cat confdefs.h >>conftest.$ac_ext
5576 cat >>conftest.$ac_ext <<_ACEOF
5577 /* end confdefs.h.  */
5578 #include <stdlib.h>
5579
5580 _ACEOF
5581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5582   $EGREP "free" >/dev/null 2>&1; then
5583   :
5584 else
5585   ac_cv_header_stdc=no
5586 fi
5587 rm -f conftest*
5588
5589 fi
5590
5591 if test $ac_cv_header_stdc = yes; then
5592   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5593   if test "$cross_compiling" = yes; then
5594   :
5595 else
5596   cat >conftest.$ac_ext <<_ACEOF
5597 #line $LINENO "configure"
5598 /* confdefs.h.  */
5599 _ACEOF
5600 cat confdefs.h >>conftest.$ac_ext
5601 cat >>conftest.$ac_ext <<_ACEOF
5602 /* end confdefs.h.  */
5603 #include <ctype.h>
5604 #if ((' ' & 0x0FF) == 0x020)
5605 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5606 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5607 #else
5608 # define ISLOWER(c) \
5609                    (('a' <= (c) && (c) <= 'i') \
5610                      || ('j' <= (c) && (c) <= 'r') \
5611                      || ('s' <= (c) && (c) <= 'z'))
5612 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5613 #endif
5614
5615 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5616 int
5617 main ()
5618 {
5619   int i;
5620   for (i = 0; i < 256; i++)
5621     if (XOR (islower (i), ISLOWER (i))
5622         || toupper (i) != TOUPPER (i))
5623       exit(2);
5624   exit (0);
5625 }
5626 _ACEOF
5627 rm -f conftest$ac_exeext
5628 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5629   (eval $ac_link) 2>&5
5630   ac_status=$?
5631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5632   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5634   (eval $ac_try) 2>&5
5635   ac_status=$?
5636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637   (exit $ac_status); }; }; then
5638   :
5639 else
5640   echo "$as_me: program exited with status $ac_status" >&5
5641 echo "$as_me: failed program was:" >&5
5642 sed 's/^/| /' conftest.$ac_ext >&5
5643
5644 ( exit $ac_status )
5645 ac_cv_header_stdc=no
5646 fi
5647 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5648 fi
5649 fi
5650 fi
5651 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5652 echo "${ECHO_T}$ac_cv_header_stdc" >&6
5653 if test $ac_cv_header_stdc = yes; then
5654
5655 cat >>confdefs.h <<\_ACEOF
5656 #define STDC_HEADERS 1
5657 _ACEOF
5658
5659 fi
5660
5661 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5672                   inttypes.h stdint.h unistd.h
5673 do
5674 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5675 echo "$as_me:$LINENO: checking for $ac_header" >&5
5676 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5677 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5678   echo $ECHO_N "(cached) $ECHO_C" >&6
5679 else
5680   cat >conftest.$ac_ext <<_ACEOF
5681 #line $LINENO "configure"
5682 /* confdefs.h.  */
5683 _ACEOF
5684 cat confdefs.h >>conftest.$ac_ext
5685 cat >>conftest.$ac_ext <<_ACEOF
5686 /* end confdefs.h.  */
5687 $ac_includes_default
5688
5689 #include <$ac_header>
5690 _ACEOF
5691 rm -f conftest.$ac_objext
5692 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5693   (eval $ac_compile) 2>&5
5694   ac_status=$?
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); } &&
5697          { ac_try='test -s conftest.$ac_objext'
5698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5699   (eval $ac_try) 2>&5
5700   ac_status=$?
5701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702   (exit $ac_status); }; }; then
5703   eval "$as_ac_Header=yes"
5704 else
5705   echo "$as_me: failed program was:" >&5
5706 sed 's/^/| /' conftest.$ac_ext >&5
5707
5708 eval "$as_ac_Header=no"
5709 fi
5710 rm -f conftest.$ac_objext conftest.$ac_ext
5711 fi
5712 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5713 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5714 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5715   cat >>confdefs.h <<_ACEOF
5716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5717 _ACEOF
5718
5719 fi
5720
5721 done
5722
5723
5724
5725 for ac_header in dlfcn.h
5726 do
5727 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5728 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5729   echo "$as_me:$LINENO: checking for $ac_header" >&5
5730 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5731 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5732   echo $ECHO_N "(cached) $ECHO_C" >&6
5733 fi
5734 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5735 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5736 else
5737   # Is the header compilable?
5738 echo "$as_me:$LINENO: checking $ac_header usability" >&5
5739 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5740 cat >conftest.$ac_ext <<_ACEOF
5741 #line $LINENO "configure"
5742 /* confdefs.h.  */
5743 _ACEOF
5744 cat confdefs.h >>conftest.$ac_ext
5745 cat >>conftest.$ac_ext <<_ACEOF
5746 /* end confdefs.h.  */
5747 $ac_includes_default
5748 #include <$ac_header>
5749 _ACEOF
5750 rm -f conftest.$ac_objext
5751 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5752   (eval $ac_compile) 2>&5
5753   ac_status=$?
5754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5755   (exit $ac_status); } &&
5756          { ac_try='test -s conftest.$ac_objext'
5757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5758   (eval $ac_try) 2>&5
5759   ac_status=$?
5760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5761   (exit $ac_status); }; }; then
5762   ac_header_compiler=yes
5763 else
5764   echo "$as_me: failed program was:" >&5
5765 sed 's/^/| /' conftest.$ac_ext >&5
5766
5767 ac_header_compiler=no
5768 fi
5769 rm -f conftest.$ac_objext conftest.$ac_ext
5770 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5771 echo "${ECHO_T}$ac_header_compiler" >&6
5772
5773 # Is the header present?
5774 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5775 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5776 cat >conftest.$ac_ext <<_ACEOF
5777 #line $LINENO "configure"
5778 /* confdefs.h.  */
5779 _ACEOF
5780 cat confdefs.h >>conftest.$ac_ext
5781 cat >>conftest.$ac_ext <<_ACEOF
5782 /* end confdefs.h.  */
5783 #include <$ac_header>
5784 _ACEOF
5785 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5787   ac_status=$?
5788   grep -v '^ *+' conftest.er1 >conftest.err
5789   rm -f conftest.er1
5790   cat conftest.err >&5
5791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792   (exit $ac_status); } >/dev/null; then
5793   if test -s conftest.err; then
5794     ac_cpp_err=$ac_c_preproc_warn_flag
5795   else
5796     ac_cpp_err=
5797   fi
5798 else
5799   ac_cpp_err=yes
5800 fi
5801 if test -z "$ac_cpp_err"; then
5802   ac_header_preproc=yes
5803 else
5804   echo "$as_me: failed program was:" >&5
5805 sed 's/^/| /' conftest.$ac_ext >&5
5806
5807   ac_header_preproc=no
5808 fi
5809 rm -f conftest.err conftest.$ac_ext
5810 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5811 echo "${ECHO_T}$ac_header_preproc" >&6
5812
5813 # So?  What about this header?
5814 case $ac_header_compiler:$ac_header_preproc in
5815   yes:no )
5816     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5817 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5818     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5819 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5820     (
5821       cat <<\_ASBOX
5822 ## ------------------------------------ ##
5823 ## Report this to bug-autoconf@gnu.org. ##
5824 ## ------------------------------------ ##
5825 _ASBOX
5826     ) |
5827       sed "s/^/$as_me: WARNING:     /" >&2
5828     ;;
5829   no:yes )
5830     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5831 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5832     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5833 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5834     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5835 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5836     (
5837       cat <<\_ASBOX
5838 ## ------------------------------------ ##
5839 ## Report this to bug-autoconf@gnu.org. ##
5840 ## ------------------------------------ ##
5841 _ASBOX
5842     ) |
5843       sed "s/^/$as_me: WARNING:     /" >&2
5844     ;;
5845 esac
5846 echo "$as_me:$LINENO: checking for $ac_header" >&5
5847 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5848 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5849   echo $ECHO_N "(cached) $ECHO_C" >&6
5850 else
5851   eval "$as_ac_Header=$ac_header_preproc"
5852 fi
5853 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5854 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5855
5856 fi
5857 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5858   cat >>confdefs.h <<_ACEOF
5859 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5860 _ACEOF
5861
5862 fi
5863
5864 done
5865
5866
5867
5868
5869
5870
5871 # Only perform the check for file, if the check method requires it
5872 case $deplibs_check_method in
5873 file_magic*)
5874   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
5875     echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
5876 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
5877 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
5878   echo $ECHO_N "(cached) $ECHO_C" >&6
5879 else
5880   case $MAGIC_CMD in
5881   /*)
5882   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5883   ;;
5884   ?:/*)
5885   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
5886   ;;
5887   *)
5888   ac_save_MAGIC_CMD="$MAGIC_CMD"
5889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5890   ac_dummy="/usr/bin:$PATH"
5891   for ac_dir in $ac_dummy; do
5892     test -z "$ac_dir" && ac_dir=.
5893     if test -f $ac_dir/${ac_tool_prefix}file; then
5894       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
5895       if test -n "$file_magic_test_file"; then
5896         case $deplibs_check_method in
5897         "file_magic "*)
5898           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
5899           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5900           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5901             egrep "$file_magic_regex" > /dev/null; then
5902             :
5903           else
5904             cat <<EOF 1>&2
5905
5906 *** Warning: the command libtool uses to detect shared libraries,
5907 *** $file_magic_cmd, produces output that libtool cannot recognize.
5908 *** The result is that libtool may fail to recognize shared libraries
5909 *** as such.  This will affect the creation of libtool libraries that
5910 *** depend on shared libraries, but programs linked with such libtool
5911 *** libraries will work regardless of this problem.  Nevertheless, you
5912 *** may want to report the problem to your system manager and/or to
5913 *** bug-libtool@gnu.org
5914
5915 EOF
5916           fi ;;
5917         esac
5918       fi
5919       break
5920     fi
5921   done
5922   IFS="$ac_save_ifs"
5923   MAGIC_CMD="$ac_save_MAGIC_CMD"
5924   ;;
5925 esac
5926 fi
5927
5928 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5929 if test -n "$MAGIC_CMD"; then
5930   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
5931 echo "${ECHO_T}$MAGIC_CMD" >&6
5932 else
5933   echo "$as_me:$LINENO: result: no" >&5
5934 echo "${ECHO_T}no" >&6
5935 fi
5936
5937 if test -z "$lt_cv_path_MAGIC_CMD"; then
5938   if test -n "$ac_tool_prefix"; then
5939     echo "$as_me:$LINENO: checking for file" >&5
5940 echo $ECHO_N "checking for file... $ECHO_C" >&6
5941 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
5942   echo $ECHO_N "(cached) $ECHO_C" >&6
5943 else
5944   case $MAGIC_CMD in
5945   /*)
5946   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5947   ;;
5948   ?:/*)
5949   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
5950   ;;
5951   *)
5952   ac_save_MAGIC_CMD="$MAGIC_CMD"
5953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5954   ac_dummy="/usr/bin:$PATH"
5955   for ac_dir in $ac_dummy; do
5956     test -z "$ac_dir" && ac_dir=.
5957     if test -f $ac_dir/file; then
5958       lt_cv_path_MAGIC_CMD="$ac_dir/file"
5959       if test -n "$file_magic_test_file"; then
5960         case $deplibs_check_method in
5961         "file_magic "*)
5962           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
5963           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5964           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5965             egrep "$file_magic_regex" > /dev/null; then
5966             :
5967           else
5968             cat <<EOF 1>&2
5969
5970 *** Warning: the command libtool uses to detect shared libraries,
5971 *** $file_magic_cmd, produces output that libtool cannot recognize.
5972 *** The result is that libtool may fail to recognize shared libraries
5973 *** as such.  This will affect the creation of libtool libraries that
5974 *** depend on shared libraries, but programs linked with such libtool
5975 *** libraries will work regardless of this problem.  Nevertheless, you
5976 *** may want to report the problem to your system manager and/or to
5977 *** bug-libtool@gnu.org
5978
5979 EOF
5980           fi ;;
5981         esac
5982       fi
5983       break
5984     fi
5985   done
5986   IFS="$ac_save_ifs"
5987   MAGIC_CMD="$ac_save_MAGIC_CMD"
5988   ;;
5989 esac
5990 fi
5991
5992 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5993 if test -n "$MAGIC_CMD"; then
5994   echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
5995 echo "${ECHO_T}$MAGIC_CMD" >&6
5996 else
5997   echo "$as_me:$LINENO: result: no" >&5
5998 echo "${ECHO_T}no" >&6
5999 fi
6000
6001   else
6002     MAGIC_CMD=:
6003   fi
6004 fi
6005
6006   fi
6007   ;;
6008 esac
6009
6010 if test -n "$ac_tool_prefix"; then
6011   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6012 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6013 echo "$as_me:$LINENO: checking for $ac_word" >&5
6014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6015 if test "${ac_cv_prog_RANLIB+set}" = set; then
6016   echo $ECHO_N "(cached) $ECHO_C" >&6
6017 else
6018   if test -n "$RANLIB"; then
6019   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6020 else
6021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022 for as_dir in $PATH
6023 do
6024   IFS=$as_save_IFS
6025   test -z "$as_dir" && as_dir=.
6026   for ac_exec_ext in '' $ac_executable_extensions; do
6027   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6028     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6029     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6030     break 2
6031   fi
6032 done
6033 done
6034
6035 fi
6036 fi
6037 RANLIB=$ac_cv_prog_RANLIB
6038 if test -n "$RANLIB"; then
6039   echo "$as_me:$LINENO: result: $RANLIB" >&5
6040 echo "${ECHO_T}$RANLIB" >&6
6041 else
6042   echo "$as_me:$LINENO: result: no" >&5
6043 echo "${ECHO_T}no" >&6
6044 fi
6045
6046 fi
6047 if test -z "$ac_cv_prog_RANLIB"; then
6048   ac_ct_RANLIB=$RANLIB
6049   # Extract the first word of "ranlib", so it can be a program name with args.
6050 set dummy ranlib; ac_word=$2
6051 echo "$as_me:$LINENO: checking for $ac_word" >&5
6052 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6053 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6054   echo $ECHO_N "(cached) $ECHO_C" >&6
6055 else
6056   if test -n "$ac_ct_RANLIB"; then
6057   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6058 else
6059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060 for as_dir in $PATH
6061 do
6062   IFS=$as_save_IFS
6063   test -z "$as_dir" && as_dir=.
6064   for ac_exec_ext in '' $ac_executable_extensions; do
6065   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6066     ac_cv_prog_ac_ct_RANLIB="ranlib"
6067     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6068     break 2
6069   fi
6070 done
6071 done
6072
6073   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6074 fi
6075 fi
6076 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6077 if test -n "$ac_ct_RANLIB"; then
6078   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6079 echo "${ECHO_T}$ac_ct_RANLIB" >&6
6080 else
6081   echo "$as_me:$LINENO: result: no" >&5
6082 echo "${ECHO_T}no" >&6
6083 fi
6084
6085   RANLIB=$ac_ct_RANLIB
6086 else
6087   RANLIB="$ac_cv_prog_RANLIB"
6088 fi
6089
6090 if test -n "$ac_tool_prefix"; then
6091   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6092 set dummy ${ac_tool_prefix}strip; ac_word=$2
6093 echo "$as_me:$LINENO: checking for $ac_word" >&5
6094 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6095 if test "${ac_cv_prog_STRIP+set}" = set; then
6096   echo $ECHO_N "(cached) $ECHO_C" >&6
6097 else
6098   if test -n "$STRIP"; then
6099   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6100 else
6101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102 for as_dir in $PATH
6103 do
6104   IFS=$as_save_IFS
6105   test -z "$as_dir" && as_dir=.
6106   for ac_exec_ext in '' $ac_executable_extensions; do
6107   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6108     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6109     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6110     break 2
6111   fi
6112 done
6113 done
6114
6115 fi
6116 fi
6117 STRIP=$ac_cv_prog_STRIP
6118 if test -n "$STRIP"; then
6119   echo "$as_me:$LINENO: result: $STRIP" >&5
6120 echo "${ECHO_T}$STRIP" >&6
6121 else
6122   echo "$as_me:$LINENO: result: no" >&5
6123 echo "${ECHO_T}no" >&6
6124 fi
6125
6126 fi
6127 if test -z "$ac_cv_prog_STRIP"; then
6128   ac_ct_STRIP=$STRIP
6129   # Extract the first word of "strip", so it can be a program name with args.
6130 set dummy strip; ac_word=$2
6131 echo "$as_me:$LINENO: checking for $ac_word" >&5
6132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6133 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6134   echo $ECHO_N "(cached) $ECHO_C" >&6
6135 else
6136   if test -n "$ac_ct_STRIP"; then
6137   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6138 else
6139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140 for as_dir in $PATH
6141 do
6142   IFS=$as_save_IFS
6143   test -z "$as_dir" && as_dir=.
6144   for ac_exec_ext in '' $ac_executable_extensions; do
6145   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6146     ac_cv_prog_ac_ct_STRIP="strip"
6147     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6148     break 2
6149   fi
6150 done
6151 done
6152
6153   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
6154 fi
6155 fi
6156 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6157 if test -n "$ac_ct_STRIP"; then
6158   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6159 echo "${ECHO_T}$ac_ct_STRIP" >&6
6160 else
6161   echo "$as_me:$LINENO: result: no" >&5
6162 echo "${ECHO_T}no" >&6
6163 fi
6164
6165   STRIP=$ac_ct_STRIP
6166 else
6167   STRIP="$ac_cv_prog_STRIP"
6168 fi
6169
6170
6171 enable_dlopen=no
6172 enable_win32_dll=no
6173
6174 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
6175 if test "${enable_libtool_lock+set}" = set; then
6176   enableval="$enable_libtool_lock"
6177
6178 fi;
6179 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6180
6181 # Some flags need to be propagated to the compiler or linker for good
6182 # libtool support.
6183 case $host in
6184 *-*-irix6*)
6185   # Find out which ABI we are using.
6186   echo '#line 6186 "configure"' > conftest.$ac_ext
6187   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6188   (eval $ac_compile) 2>&5
6189   ac_status=$?
6190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191   (exit $ac_status); }; then
6192     case `/usr/bin/file conftest.$ac_objext` in
6193     *32-bit*)
6194       LD="${LD-ld} -32"
6195       ;;
6196     *N32*)
6197       LD="${LD-ld} -n32"
6198       ;;
6199     *64-bit*)
6200       LD="${LD-ld} -64"
6201       ;;
6202     esac
6203   fi
6204   rm -rf conftest*
6205   ;;
6206
6207 *-*-sco3.2v5*)
6208   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6209   SAVE_CFLAGS="$CFLAGS"
6210   CFLAGS="$CFLAGS -belf"
6211   echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
6212 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
6213 if test "${lt_cv_cc_needs_belf+set}" = set; then
6214   echo $ECHO_N "(cached) $ECHO_C" >&6
6215 else
6216
6217
6218      ac_ext=c
6219 ac_cpp='$CPP $CPPFLAGS'
6220 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6221 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6222 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6223
6224      cat >conftest.$ac_ext <<_ACEOF
6225 #line $LINENO "configure"
6226 /* confdefs.h.  */
6227 _ACEOF
6228 cat confdefs.h >>conftest.$ac_ext
6229 cat >>conftest.$ac_ext <<_ACEOF
6230 /* end confdefs.h.  */
6231
6232 int
6233 main ()
6234 {
6235
6236   ;
6237   return 0;
6238 }
6239 _ACEOF
6240 rm -f conftest.$ac_objext conftest$ac_exeext
6241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6242   (eval $ac_link) 2>&5
6243   ac_status=$?
6244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245   (exit $ac_status); } &&
6246          { ac_try='test -s conftest$ac_exeext'
6247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6248   (eval $ac_try) 2>&5
6249   ac_status=$?
6250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251   (exit $ac_status); }; }; then
6252   lt_cv_cc_needs_belf=yes
6253 else
6254   echo "$as_me: failed program was:" >&5
6255 sed 's/^/| /' conftest.$ac_ext >&5
6256
6257 lt_cv_cc_needs_belf=no
6258 fi
6259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6260      ac_ext=c
6261 ac_cpp='$CPP $CPPFLAGS'
6262 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6263 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6264 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6265
6266 fi
6267 echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
6268 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
6269   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6270     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6271     CFLAGS="$SAVE_CFLAGS"
6272   fi
6273   ;;
6274
6275
6276 esac
6277
6278 # Sed substitution that helps us do robust quoting.  It backslashifies
6279 # metacharacters that are still active within double-quoted strings.
6280 Xsed='sed -e s/^X//'
6281 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6282
6283 # Same as above, but do not quote variable references.
6284 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6285
6286 # Sed substitution to delay expansion of an escaped shell variable in a
6287 # double_quote_subst'ed string.
6288 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6289
6290 # Constants:
6291 rm="rm -f"
6292
6293 # Global variables:
6294 default_ofile=libtool
6295 can_build_shared=yes
6296
6297 # All known linkers require a `.a' archive for static linking (except M$VC,
6298 # which needs '.lib').
6299 libext=a
6300 ltmain="$ac_aux_dir/ltmain.sh"
6301 ofile="$default_ofile"
6302 with_gnu_ld="$lt_cv_prog_gnu_ld"
6303 need_locks="$enable_libtool_lock"
6304
6305 old_CC="$CC"
6306 old_CFLAGS="$CFLAGS"
6307
6308 # Set sane defaults for various variables
6309 test -z "$AR" && AR=ar
6310 test -z "$AR_FLAGS" && AR_FLAGS=cru
6311 test -z "$AS" && AS=as
6312 test -z "$CC" && CC=cc
6313 test -z "$DLLTOOL" && DLLTOOL=dlltool
6314 test -z "$LD" && LD=ld
6315 test -z "$LN_S" && LN_S="ln -s"
6316 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6317 test -z "$NM" && NM=nm
6318 test -z "$OBJDUMP" && OBJDUMP=objdump
6319 test -z "$RANLIB" && RANLIB=:
6320 test -z "$STRIP" && STRIP=:
6321 test -z "$ac_objext" && ac_objext=o
6322
6323 if test x"$host" != x"$build"; then
6324   ac_tool_prefix=${host_alias}-
6325 else
6326   ac_tool_prefix=
6327 fi
6328
6329 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
6330 case $host_os in
6331 linux-gnu*) ;;
6332 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
6333 esac
6334
6335 case $host_os in
6336 aix3*)
6337   # AIX sometimes has problems with the GCC collect2 program.  For some
6338   # reason, if we set the COLLECT_NAMES environment variable, the problems
6339   # vanish in a puff of smoke.
6340   if test "X${COLLECT_NAMES+set}" != Xset; then
6341     COLLECT_NAMES=
6342     export COLLECT_NAMES
6343   fi
6344   ;;
6345 esac
6346
6347 # Determine commands to create old-style static archives.
6348 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6349 old_postinstall_cmds='chmod 644 $oldlib'
6350 old_postuninstall_cmds=
6351
6352 if test -n "$RANLIB"; then
6353   case $host_os in
6354   openbsd*)
6355     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
6356     ;;
6357   *)
6358     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
6359     ;;
6360   esac
6361   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6362 fi
6363
6364 # Allow CC to be a program name with arguments.
6365 set dummy $CC
6366 compiler="$2"
6367
6368 echo "$as_me:$LINENO: checking for objdir" >&5
6369 echo $ECHO_N "checking for objdir... $ECHO_C" >&6
6370 rm -f .libs 2>/dev/null
6371 mkdir .libs 2>/dev/null
6372 if test -d .libs; then
6373   objdir=.libs
6374 else
6375   # MS-DOS does not allow filenames that begin with a dot.
6376   objdir=_libs
6377 fi
6378 rmdir .libs 2>/dev/null
6379 echo "$as_me:$LINENO: result: $objdir" >&5
6380 echo "${ECHO_T}$objdir" >&6
6381
6382
6383
6384 # Check whether --with-pic or --without-pic was given.
6385 if test "${with_pic+set}" = set; then
6386   withval="$with_pic"
6387   pic_mode="$withval"
6388 else
6389   pic_mode=default
6390 fi;
6391 test -z "$pic_mode" && pic_mode=default
6392
6393 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
6394 # in isolation, and that seeing it set (from the cache) indicates that
6395 # the associated values are set (in the cache) correctly too.
6396 echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
6397 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
6398 if test "${lt_cv_prog_cc_pic+set}" = set; then
6399   echo $ECHO_N "(cached) $ECHO_C" >&6
6400 else
6401    lt_cv_prog_cc_pic=
6402   lt_cv_prog_cc_shlib=
6403   lt_cv_prog_cc_wl=
6404   lt_cv_prog_cc_static=
6405   lt_cv_prog_cc_no_builtin=
6406   lt_cv_prog_cc_can_build_shared=$can_build_shared
6407
6408   if test "$GCC" = yes; then
6409     lt_cv_prog_cc_wl='-Wl,'
6410     lt_cv_prog_cc_static='-static'
6411
6412     case $host_os in
6413     aix*)
6414       # Below there is a dirty hack to force normal static linking with -ldl
6415       # The problem is because libdl dynamically linked with both libc and
6416       # libC (AIX C++ library), which obviously doesn't included in libraries
6417       # list by gcc. This cause undefined symbols with -static flags.
6418       # This hack allows C programs to be linked with "-static -ldl", but
6419       # not sure about C++ programs.
6420       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
6421       ;;
6422     amigaos*)
6423       # FIXME: we need at least 68020 code to build shared libraries, but
6424       # adding the `-m68020' flag to GCC prevents building anything better,
6425       # like `-m68040'.
6426       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
6427       ;;
6428     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6429       # PIC is the default for these OSes.
6430       ;;
6431     darwin* | rhapsody*)
6432       # PIC is the default on this platform
6433       # Common symbols not allowed in MH_DYLIB files
6434       lt_cv_prog_cc_pic='-fno-common'
6435       ;;
6436     cygwin* | mingw* | pw32* | os2*)
6437       # This hack is so that the source file can tell whether it is being
6438       # built for inclusion in a dll (and should export symbols for example).
6439       lt_cv_prog_cc_pic='-DDLL_EXPORT'
6440       ;;
6441     sysv4*MP*)
6442       if test -d /usr/nec; then
6443          lt_cv_prog_cc_pic=-Kconform_pic
6444       fi
6445       ;;
6446     *)
6447       lt_cv_prog_cc_pic='-fPIC'
6448       ;;
6449     esac
6450   else
6451     # PORTME Check for PIC flags for the system compiler.
6452     case $host_os in
6453     aix3* | aix4* | aix5*)
6454       lt_cv_prog_cc_wl='-Wl,'
6455       # All AIX code is PIC.
6456       if test "$host_cpu" = ia64; then
6457         # AIX 5 now supports IA64 processor
6458         lt_cv_prog_cc_static='-Bstatic'
6459       else
6460         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
6461       fi
6462       ;;
6463
6464     hpux9* | hpux10* | hpux11*)
6465       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
6466       lt_cv_prog_cc_wl='-Wl,'
6467       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
6468       lt_cv_prog_cc_pic='+Z'
6469       ;;
6470
6471     irix5* | irix6* | nonstopux*)
6472       lt_cv_prog_cc_wl='-Wl,'
6473       lt_cv_prog_cc_static='-non_shared'
6474       # PIC (with -KPIC) is the default.
6475       ;;
6476
6477     cygwin* | mingw* | pw32* | os2*)
6478       # This hack is so that the source file can tell whether it is being
6479       # built for inclusion in a dll (and should export symbols for example).
6480       lt_cv_prog_cc_pic='-DDLL_EXPORT'
6481       ;;
6482
6483     newsos6)
6484       lt_cv_prog_cc_pic='-KPIC'
6485       lt_cv_prog_cc_static='-Bstatic'
6486       ;;
6487
6488     osf3* | osf4* | osf5*)
6489       # All OSF/1 code is PIC.
6490       lt_cv_prog_cc_wl='-Wl,'
6491       lt_cv_prog_cc_static='-non_shared'
6492       ;;
6493
6494     sco3.2v5*)
6495       lt_cv_prog_cc_pic='-Kpic'
6496       lt_cv_prog_cc_static='-dn'
6497       lt_cv_prog_cc_shlib='-belf'
6498       ;;
6499
6500     solaris*)
6501       lt_cv_prog_cc_pic='-KPIC'
6502       lt_cv_prog_cc_static='-Bstatic'
6503       lt_cv_prog_cc_wl='-Wl,'
6504       ;;
6505
6506     sunos4*)
6507       lt_cv_prog_cc_pic='-PIC'
6508       lt_cv_prog_cc_static='-Bstatic'
6509       lt_cv_prog_cc_wl='-Qoption ld '
6510       ;;
6511
6512     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6513       lt_cv_prog_cc_pic='-KPIC'
6514       lt_cv_prog_cc_static='-Bstatic'
6515       lt_cv_prog_cc_wl='-Wl,'
6516       ;;
6517
6518     uts4*)
6519       lt_cv_prog_cc_pic='-pic'
6520       lt_cv_prog_cc_static='-Bstatic'
6521       ;;
6522
6523     sysv4*MP*)
6524       if test -d /usr/nec ;then
6525         lt_cv_prog_cc_pic='-Kconform_pic'
6526         lt_cv_prog_cc_static='-Bstatic'
6527       fi
6528       ;;
6529
6530     *)
6531       lt_cv_prog_cc_can_build_shared=no
6532       ;;
6533     esac
6534   fi
6535
6536 fi
6537
6538 if test -z "$lt_cv_prog_cc_pic"; then
6539   echo "$as_me:$LINENO: result: none" >&5
6540 echo "${ECHO_T}none" >&6
6541 else
6542   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
6543 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
6544
6545   # Check to make sure the pic_flag actually works.
6546   echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
6547 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
6548   if test "${lt_cv_prog_cc_pic_works+set}" = set; then
6549   echo $ECHO_N "(cached) $ECHO_C" >&6
6550 else
6551       save_CFLAGS="$CFLAGS"
6552     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
6553     cat >conftest.$ac_ext <<_ACEOF
6554 #line $LINENO "configure"
6555 /* confdefs.h.  */
6556 _ACEOF
6557 cat confdefs.h >>conftest.$ac_ext
6558 cat >>conftest.$ac_ext <<_ACEOF
6559 /* end confdefs.h.  */
6560
6561 int
6562 main ()
6563 {
6564
6565   ;
6566   return 0;
6567 }
6568 _ACEOF
6569 rm -f conftest.$ac_objext
6570 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6571   (eval $ac_compile) 2>&5
6572   ac_status=$?
6573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574   (exit $ac_status); } &&
6575          { ac_try='test -s conftest.$ac_objext'
6576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6577   (eval $ac_try) 2>&5
6578   ac_status=$?
6579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580   (exit $ac_status); }; }; then
6581         case $host_os in
6582       hpux9* | hpux10* | hpux11*)
6583         # On HP-UX, both CC and GCC only warn that PIC is supported... then
6584         # they create non-PIC objects.  So, if there were any warnings, we
6585         # assume that PIC is not supported.
6586         if test -s conftest.err; then
6587           lt_cv_prog_cc_pic_works=no
6588         else
6589           lt_cv_prog_cc_pic_works=yes
6590         fi
6591         ;;
6592       *)
6593         lt_cv_prog_cc_pic_works=yes
6594         ;;
6595       esac
6596
6597 else
6598   echo "$as_me: failed program was:" >&5
6599 sed 's/^/| /' conftest.$ac_ext >&5
6600
6601       lt_cv_prog_cc_pic_works=no
6602
6603 fi
6604 rm -f conftest.$ac_objext conftest.$ac_ext
6605     CFLAGS="$save_CFLAGS"
6606
6607 fi
6608
6609
6610   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
6611     lt_cv_prog_cc_pic=
6612     lt_cv_prog_cc_can_build_shared=no
6613   else
6614     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
6615   fi
6616
6617   echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
6618 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
6619 fi
6620
6621 # Check for any special shared library compilation flags.
6622 if test -n "$lt_cv_prog_cc_shlib"; then
6623   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
6624 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
6625   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
6626   else
6627    { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
6628 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
6629     lt_cv_prog_cc_can_build_shared=no
6630   fi
6631 fi
6632
6633 echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
6634 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
6635 if test "${lt_cv_prog_cc_static_works+set}" = set; then
6636   echo $ECHO_N "(cached) $ECHO_C" >&6
6637 else
6638     lt_cv_prog_cc_static_works=no
6639   save_LDFLAGS="$LDFLAGS"
6640   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
6641   cat >conftest.$ac_ext <<_ACEOF
6642 #line $LINENO "configure"
6643 /* confdefs.h.  */
6644 _ACEOF
6645 cat confdefs.h >>conftest.$ac_ext
6646 cat >>conftest.$ac_ext <<_ACEOF
6647 /* end confdefs.h.  */
6648
6649 int
6650 main ()
6651 {
6652
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 rm -f conftest.$ac_objext conftest$ac_exeext
6658 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6659   (eval $ac_link) 2>&5
6660   ac_status=$?
6661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662   (exit $ac_status); } &&
6663          { ac_try='test -s conftest$ac_exeext'
6664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6665   (eval $ac_try) 2>&5
6666   ac_status=$?
6667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668   (exit $ac_status); }; }; then
6669   lt_cv_prog_cc_static_works=yes
6670 else
6671   echo "$as_me: failed program was:" >&5
6672 sed 's/^/| /' conftest.$ac_ext >&5
6673
6674 fi
6675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6676   LDFLAGS="$save_LDFLAGS"
6677
6678 fi
6679
6680
6681 # Belt *and* braces to stop my trousers falling down:
6682 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
6683 echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
6684 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
6685
6686 pic_flag="$lt_cv_prog_cc_pic"
6687 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
6688 wl="$lt_cv_prog_cc_wl"
6689 link_static_flag="$lt_cv_prog_cc_static"
6690 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
6691 can_build_shared="$lt_cv_prog_cc_can_build_shared"
6692
6693
6694 # Check to see if options -o and -c are simultaneously supported by compiler
6695 echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
6696 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
6697 if test "${lt_cv_compiler_c_o+set}" = set; then
6698   echo $ECHO_N "(cached) $ECHO_C" >&6
6699 else
6700
6701 $rm -r conftest 2>/dev/null
6702 mkdir conftest
6703 cd conftest
6704 echo "int some_variable = 0;" > conftest.$ac_ext
6705 mkdir out
6706 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6707 # that will create temporary files in the current directory regardless of
6708 # the output directory.  Thus, making CWD read-only will cause this test
6709 # to fail, enabling locking or at least warning the user not to do parallel
6710 # builds.
6711 chmod -w .
6712 save_CFLAGS="$CFLAGS"
6713 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
6714 compiler_c_o=no
6715 if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
6716   # The compiler can only warn and ignore the option if not recognized
6717   # So say no if there are warnings
6718   if test -s out/conftest.err; then
6719     lt_cv_compiler_c_o=no
6720   else
6721     lt_cv_compiler_c_o=yes
6722   fi
6723 else
6724   # Append any errors to the config.log.
6725   cat out/conftest.err 1>&5
6726   lt_cv_compiler_c_o=no
6727 fi
6728 CFLAGS="$save_CFLAGS"
6729 chmod u+w .
6730 $rm conftest* out/*
6731 rmdir out
6732 cd ..
6733 rmdir conftest
6734 $rm -r conftest 2>/dev/null
6735
6736 fi
6737
6738 compiler_c_o=$lt_cv_compiler_c_o
6739 echo "$as_me:$LINENO: result: $compiler_c_o" >&5
6740 echo "${ECHO_T}$compiler_c_o" >&6
6741
6742 if test x"$compiler_c_o" = x"yes"; then
6743   # Check to see if we can write to a .lo
6744   echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
6745 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
6746   if test "${lt_cv_compiler_o_lo+set}" = set; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749
6750   lt_cv_compiler_o_lo=no
6751   save_CFLAGS="$CFLAGS"
6752   CFLAGS="$CFLAGS -c -o conftest.lo"
6753   save_objext="$ac_objext"
6754   ac_objext=lo
6755   cat >conftest.$ac_ext <<_ACEOF
6756 #line $LINENO "configure"
6757 /* confdefs.h.  */
6758 _ACEOF
6759 cat confdefs.h >>conftest.$ac_ext
6760 cat >>conftest.$ac_ext <<_ACEOF
6761 /* end confdefs.h.  */
6762
6763 int
6764 main ()
6765 {
6766 int some_variable = 0;
6767   ;
6768   return 0;
6769 }
6770 _ACEOF
6771 rm -f conftest.$ac_objext
6772 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6773   (eval $ac_compile) 2>&5
6774   ac_status=$?
6775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6776   (exit $ac_status); } &&
6777          { ac_try='test -s conftest.$ac_objext'
6778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6779   (eval $ac_try) 2>&5
6780   ac_status=$?
6781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782   (exit $ac_status); }; }; then
6783       # The compiler can only warn and ignore the option if not recognized
6784     # So say no if there are warnings
6785     if test -s conftest.err; then
6786       lt_cv_compiler_o_lo=no
6787     else
6788       lt_cv_compiler_o_lo=yes
6789     fi
6790
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 sed 's/^/| /' conftest.$ac_ext >&5
6794
6795 fi
6796 rm -f conftest.$ac_objext conftest.$ac_ext
6797   ac_objext="$save_objext"
6798   CFLAGS="$save_CFLAGS"
6799
6800 fi
6801
6802   compiler_o_lo=$lt_cv_compiler_o_lo
6803   echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
6804 echo "${ECHO_T}$compiler_o_lo" >&6
6805 else
6806   compiler_o_lo=no
6807 fi
6808
6809 # Check to see if we can do hard links to lock some files if needed
6810 hard_links="nottested"
6811 if test "$compiler_c_o" = no && test "$need_locks" != no; then
6812   # do not overwrite the value of need_locks provided by the user
6813   echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
6814 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
6815   hard_links=yes
6816   $rm conftest*
6817   ln conftest.a conftest.b 2>/dev/null && hard_links=no
6818   touch conftest.a
6819   ln conftest.a conftest.b 2>&5 || hard_links=no
6820   ln conftest.a conftest.b 2>/dev/null && hard_links=no
6821   echo "$as_me:$LINENO: result: $hard_links" >&5
6822 echo "${ECHO_T}$hard_links" >&6
6823   if test "$hard_links" = no; then
6824     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
6825 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
6826     need_locks=warn
6827   fi
6828 else
6829   need_locks=no
6830 fi
6831
6832 if test "$GCC" = yes; then
6833   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
6834   echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
6835 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
6836   echo "int some_variable = 0;" > conftest.$ac_ext
6837   save_CFLAGS="$CFLAGS"
6838   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
6839   compiler_rtti_exceptions=no
6840   cat >conftest.$ac_ext <<_ACEOF
6841 #line $LINENO "configure"
6842 /* confdefs.h.  */
6843 _ACEOF
6844 cat confdefs.h >>conftest.$ac_ext
6845 cat >>conftest.$ac_ext <<_ACEOF
6846 /* end confdefs.h.  */
6847
6848 int
6849 main ()
6850 {
6851 int some_variable = 0;
6852   ;
6853   return 0;
6854 }
6855 _ACEOF
6856 rm -f conftest.$ac_objext
6857 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6858   (eval $ac_compile) 2>&5
6859   ac_status=$?
6860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861   (exit $ac_status); } &&
6862          { ac_try='test -s conftest.$ac_objext'
6863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6864   (eval $ac_try) 2>&5
6865   ac_status=$?
6866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6867   (exit $ac_status); }; }; then
6868       # The compiler can only warn and ignore the option if not recognized
6869     # So say no if there are warnings
6870     if test -s conftest.err; then
6871       compiler_rtti_exceptions=no
6872     else
6873       compiler_rtti_exceptions=yes
6874     fi
6875
6876 else
6877   echo "$as_me: failed program was:" >&5
6878 sed 's/^/| /' conftest.$ac_ext >&5
6879
6880 fi
6881 rm -f conftest.$ac_objext conftest.$ac_ext
6882   CFLAGS="$save_CFLAGS"
6883   echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
6884 echo "${ECHO_T}$compiler_rtti_exceptions" >&6
6885
6886   if test "$compiler_rtti_exceptions" = "yes"; then
6887     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
6888   else
6889     no_builtin_flag=' -fno-builtin'
6890   fi
6891 fi
6892
6893 # See if the linker supports building shared libraries.
6894 echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
6895 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
6896
6897 allow_undefined_flag=
6898 no_undefined_flag=
6899 need_lib_prefix=unknown
6900 need_version=unknown
6901 # when you set need_version to no, make sure it does not cause -set_version
6902 # flags to be left without arguments
6903 archive_cmds=
6904 archive_expsym_cmds=
6905 old_archive_from_new_cmds=
6906 old_archive_from_expsyms_cmds=
6907 export_dynamic_flag_spec=
6908 whole_archive_flag_spec=
6909 thread_safe_flag_spec=
6910 hardcode_into_libs=no
6911 hardcode_libdir_flag_spec=
6912 hardcode_libdir_separator=
6913 hardcode_direct=no
6914 hardcode_minus_L=no
6915 hardcode_shlibpath_var=unsupported
6916 runpath_var=
6917 link_all_deplibs=unknown
6918 always_export_symbols=no
6919 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
6920 # include_expsyms should be a list of space-separated symbols to be *always*
6921 # included in the symbol list
6922 include_expsyms=
6923 # exclude_expsyms can be an egrep regular expression of symbols to exclude
6924 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6925 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6926 # as well as any symbol that contains `d'.
6927 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
6928 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6929 # platforms (ab)use it in PIC code, but their linkers get confused if
6930 # the symbol is explicitly referenced.  Since portable code cannot
6931 # rely on this symbol name, it's probably fine to never include it in
6932 # preloaded symbol tables.
6933 extract_expsyms_cmds=
6934
6935 case $host_os in
6936 cygwin* | mingw* | pw32*)
6937   # FIXME: the MSVC++ port hasn't been tested in a loooong time
6938   # When not using gcc, we currently assume that we are using
6939   # Microsoft Visual C++.
6940   if test "$GCC" != yes; then
6941     with_gnu_ld=no
6942   fi
6943   ;;
6944 openbsd*)
6945   with_gnu_ld=no
6946   ;;
6947 esac
6948
6949 ld_shlibs=yes
6950 if test "$with_gnu_ld" = yes; then
6951   # If archive_cmds runs LD, not CC, wlarc should be empty
6952   wlarc='${wl}'
6953
6954   # See if GNU ld supports shared libraries.
6955   case $host_os in
6956   aix3* | aix4* | aix5*)
6957     # On AIX, the GNU linker is very broken
6958     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
6959     ld_shlibs=no
6960     cat <<EOF 1>&2
6961
6962 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6963 *** to be unable to reliably create shared libraries on AIX.
6964 *** Therefore, libtool is disabling shared libraries support.  If you
6965 *** really care for shared libraries, you may want to modify your PATH
6966 *** so that a non-GNU linker is found, and then restart.
6967
6968 EOF
6969     ;;
6970
6971   amigaos*)
6972     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)'
6973     hardcode_libdir_flag_spec='-L$libdir'
6974     hardcode_minus_L=yes
6975
6976     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6977     # that the semantics of dynamic libraries on AmigaOS, at least up
6978     # to version 4, is to share data among multiple programs linked
6979     # with the same dynamic library.  Since this doesn't match the
6980     # behavior of shared libraries on other platforms, we can use
6981     # them.
6982     ld_shlibs=no
6983     ;;
6984
6985   beos*)
6986     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6987       allow_undefined_flag=unsupported
6988       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6989       # support --undefined.  This deserves some investigation.  FIXME
6990       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6991     else
6992       ld_shlibs=no
6993     fi
6994     ;;
6995
6996   cygwin* | mingw* | pw32*)
6997     # hardcode_libdir_flag_spec is actually meaningless, as there is
6998     # no search path for DLLs.
6999     hardcode_libdir_flag_spec='-L$libdir'
7000     allow_undefined_flag=unsupported
7001     always_export_symbols=yes
7002
7003     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
7004       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
7005       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
7006       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
7007       else $CC -o impgen impgen.c ; fi)~
7008       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
7009
7010     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
7011
7012     # cygwin and mingw dlls have different entry points and sets of symbols
7013     # to exclude.
7014     # FIXME: what about values for MSVC?
7015     dll_entry=__cygwin_dll_entry@12
7016     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
7017     case $host_os in
7018     mingw*)
7019       # mingw values
7020       dll_entry=_DllMainCRTStartup@12
7021       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
7022       ;;
7023     esac
7024
7025     # mingw and cygwin differ, and it's simplest to just exclude the union
7026     # of the two symbol sets.
7027     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
7028
7029     # recent cygwin and mingw systems supply a stub DllMain which the user
7030     # can override, but on older systems we have to supply one (in ltdll.c)
7031     if test "x$lt_cv_need_dllmain" = "xyes"; then
7032       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
7033       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
7034         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
7035     else
7036       ltdll_obj=
7037       ltdll_cmds=
7038     fi
7039
7040     # Extract the symbol export list from an `--export-all' def file,
7041     # then regenerate the def file from the symbol export list, so that
7042     # the compiled dll only exports the symbol export list.
7043     # Be careful not to strip the DATA tag left be newer dlltools.
7044     export_symbols_cmds="$ltdll_cmds"'
7045       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
7046       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
7047
7048     # If the export-symbols file already is a .def file (1st line
7049     # is EXPORTS), use it as is.
7050     # If DATA tags from a recent dlltool are present, honour them!
7051     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
7052         cp $export_symbols $output_objdir/$soname-def;
7053       else
7054         echo EXPORTS > $output_objdir/$soname-def;
7055         _lt_hint=1;
7056         cat $export_symbols | while read symbol; do
7057          set dummy \$symbol;
7058          case \$# in
7059            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
7060            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
7061            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
7062          esac;
7063          _lt_hint=`expr 1 + \$_lt_hint`;
7064         done;
7065       fi~
7066       '"$ltdll_cmds"'
7067       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
7068       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
7069       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
7070       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
7071       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
7072     ;;
7073
7074   netbsd*)
7075     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7076       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7077       wlarc=
7078     else
7079       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7080       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7081     fi
7082     ;;
7083
7084   solaris* | sysv5*)
7085     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
7086       ld_shlibs=no
7087       cat <<EOF 1>&2
7088
7089 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
7090 *** create shared libraries on Solaris systems.  Therefore, libtool
7091 *** is disabling shared libraries support.  We urge you to upgrade GNU
7092 *** binutils to release 2.9.1 or newer.  Another option is to modify
7093 *** your PATH or compiler configuration so that the native linker is
7094 *** used, and then restart.
7095
7096 EOF
7097     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
7098       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7099       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7100     else
7101       ld_shlibs=no
7102     fi
7103     ;;
7104
7105   sunos4*)
7106     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7107     wlarc=
7108     hardcode_direct=yes
7109     hardcode_shlibpath_var=no
7110     ;;
7111
7112   *)
7113     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
7114       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7115       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7116     else
7117       ld_shlibs=no
7118     fi
7119     ;;
7120   esac
7121
7122   if test "$ld_shlibs" = yes; then
7123     runpath_var=LD_RUN_PATH
7124     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
7125     export_dynamic_flag_spec='${wl}--export-dynamic'
7126     case $host_os in
7127     cygwin* | mingw* | pw32*)
7128       # dlltool doesn't understand --whole-archive et. al.
7129       whole_archive_flag_spec=
7130       ;;
7131     *)
7132       # ancient GNU ld didn't support --whole-archive et. al.
7133       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
7134         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7135       else
7136         whole_archive_flag_spec=
7137       fi
7138       ;;
7139     esac
7140   fi
7141 else
7142   # PORTME fill in a description of your system's linker (not GNU ld)
7143   case $host_os in
7144   aix3*)
7145     allow_undefined_flag=unsupported
7146     always_export_symbols=yes
7147     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'
7148     # Note: this linker hardcodes the directories in LIBPATH if there
7149     # are no directories specified by -L.
7150     hardcode_minus_L=yes
7151     if test "$GCC" = yes && test -z "$link_static_flag"; then
7152       # Neither direct hardcoding nor static linking is supported with a
7153       # broken collect2.
7154       hardcode_direct=unsupported
7155     fi
7156     ;;
7157
7158   aix4* | aix5*)
7159     if test "$host_cpu" = ia64; then
7160       # On IA64, the linker does run time linking by default, so we don't
7161       # have to do anything special.
7162       aix_use_runtimelinking=no
7163       exp_sym_flag='-Bexport'
7164       no_entry_flag=""
7165     else
7166       aix_use_runtimelinking=no
7167
7168       # Test if we are trying to use run time linking or normal
7169       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7170       # need to do runtime linking.
7171       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
7172         for ld_flag in $LDFLAGS; do
7173           case $ld_flag in
7174           *-brtl*)
7175             aix_use_runtimelinking=yes
7176             break
7177           ;;
7178           esac
7179         done
7180       esac
7181
7182       exp_sym_flag='-bexport'
7183       no_entry_flag='-bnoentry'
7184     fi
7185
7186     # When large executables or shared objects are built, AIX ld can
7187     # have problems creating the table of contents.  If linking a library
7188     # or program results in "error TOC overflow" add -mminimal-toc to
7189     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7190     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7191
7192     hardcode_direct=yes
7193     archive_cmds=''
7194     hardcode_libdir_separator=':'
7195     if test "$GCC" = yes; then
7196       case $host_os in aix4.[012]|aix4.[012].*)
7197         collect2name=`${CC} -print-prog-name=collect2`
7198         if test -f "$collect2name" && \
7199           strings "$collect2name" | grep resolve_lib_name >/dev/null
7200         then
7201           # We have reworked collect2
7202           hardcode_direct=yes
7203         else
7204           # We have old collect2
7205           hardcode_direct=unsupported
7206           # It fails to find uninstalled libraries when the uninstalled
7207           # path is not listed in the libpath.  Setting hardcode_minus_L
7208           # to unsupported forces relinking
7209           hardcode_minus_L=yes
7210           hardcode_libdir_flag_spec='-L$libdir'
7211           hardcode_libdir_separator=
7212         fi
7213       esac
7214
7215       shared_flag='-shared'
7216     else
7217       # not using gcc
7218       if test "$host_cpu" = ia64; then
7219         shared_flag='${wl}-G'
7220       else
7221         if test "$aix_use_runtimelinking" = yes; then
7222           shared_flag='${wl}-G'
7223         else
7224           shared_flag='${wl}-bM:SRE'
7225         fi
7226       fi
7227     fi
7228
7229     # It seems that -bexpall can do strange things, so it is better to
7230     # generate a list of symbols to export.
7231     always_export_symbols=yes
7232     if test "$aix_use_runtimelinking" = yes; then
7233       # Warning - without using the other runtime loading flags (-brtl),
7234       # -berok will link without error, but may produce a broken library.
7235       allow_undefined_flag='-berok'
7236       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
7237       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"
7238     else
7239       if test "$host_cpu" = ia64; then
7240         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
7241         allow_undefined_flag="-z nodefs"
7242         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
7243       else
7244         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
7245         # Warning - without using the other run time loading flags,
7246         # -berok will link without error, but may produce a broken library.
7247         allow_undefined_flag='${wl}-berok'
7248         # This is a bit strange, but is similar to how AIX traditionally builds
7249         # it's shared libraries.
7250         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
7251       fi
7252     fi
7253     ;;
7254
7255   amigaos*)
7256     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)'
7257     hardcode_libdir_flag_spec='-L$libdir'
7258     hardcode_minus_L=yes
7259     # see comment about different semantics on the GNU ld section
7260     ld_shlibs=no
7261     ;;
7262
7263   cygwin* | mingw* | pw32*)
7264     # When not using gcc, we currently assume that we are using
7265     # Microsoft Visual C++.
7266     # hardcode_libdir_flag_spec is actually meaningless, as there is
7267     # no search path for DLLs.
7268     hardcode_libdir_flag_spec=' '
7269     allow_undefined_flag=unsupported
7270     # Tell ltmain to make .lib files, not .a files.
7271     libext=lib
7272     # FIXME: Setting linknames here is a bad hack.
7273     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
7274     # The linker will automatically build a .lib file if we build a DLL.
7275     old_archive_from_new_cmds='true'
7276     # FIXME: Should let the user specify the lib program.
7277     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
7278     fix_srcfile_path='`cygpath -w "$srcfile"`'
7279     ;;
7280
7281   darwin* | rhapsody*)
7282     case "$host_os" in
7283     rhapsody* | darwin1.[012])
7284       allow_undefined_flag='-undefined suppress'
7285       ;;
7286     *) # Darwin 1.3 on
7287       allow_undefined_flag='-flat_namespace -undefined suppress'
7288       ;;
7289     esac
7290     # FIXME: Relying on posixy $() will cause problems for
7291     #        cross-compilation, but unfortunately the echo tests do not
7292     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
7293     #        `"' quotes if we put them in here... so don't!
7294     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
7295     # We need to add '_' to the symbols in $export_symbols first
7296     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
7297     hardcode_direct=yes
7298     hardcode_shlibpath_var=no
7299     whole_archive_flag_spec='-all_load $convenience'
7300     ;;
7301
7302   freebsd1*)
7303     ld_shlibs=no
7304     ;;
7305
7306   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7307   # support.  Future versions do this automatically, but an explicit c++rt0.o
7308   # does not break anything, and helps significantly (at the cost of a little
7309   # extra space).
7310   freebsd2.2*)
7311     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7312     hardcode_libdir_flag_spec='-R$libdir'
7313     hardcode_direct=yes
7314     hardcode_shlibpath_var=no
7315     ;;
7316
7317   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7318   freebsd2*)
7319     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7320     hardcode_direct=yes
7321     hardcode_minus_L=yes
7322     hardcode_shlibpath_var=no
7323     ;;
7324
7325   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7326   freebsd*)
7327     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7328     hardcode_libdir_flag_spec='-R$libdir'
7329     hardcode_direct=yes
7330     hardcode_shlibpath_var=no
7331     ;;
7332
7333   hpux9* | hpux10* | hpux11*)
7334     case $host_os in
7335     hpux9*) 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' ;;
7336     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
7337     esac
7338     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
7339     hardcode_libdir_separator=:
7340     hardcode_direct=yes
7341     hardcode_minus_L=yes # Not in the search PATH, but as the default
7342                          # location of the library.
7343     export_dynamic_flag_spec='${wl}-E'
7344     ;;
7345
7346   irix5* | irix6* | nonstopux*)
7347     if test "$GCC" = yes; then
7348       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'
7349       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7350     else
7351       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'
7352       hardcode_libdir_flag_spec='-rpath $libdir'
7353     fi
7354     hardcode_libdir_separator=:
7355     link_all_deplibs=yes
7356     ;;
7357
7358   netbsd*)
7359     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7360       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7361     else
7362       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7363     fi
7364     hardcode_libdir_flag_spec='-R$libdir'
7365     hardcode_direct=yes
7366     hardcode_shlibpath_var=no
7367     ;;
7368
7369   newsos6)
7370     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7371     hardcode_direct=yes
7372     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7373     hardcode_libdir_separator=:
7374     hardcode_shlibpath_var=no
7375     ;;
7376
7377   openbsd*)
7378     hardcode_direct=yes
7379     hardcode_shlibpath_var=no
7380     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7381       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7382       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
7383       export_dynamic_flag_spec='${wl}-E'
7384     else
7385       case "$host_os" in
7386       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
7387         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7388         hardcode_libdir_flag_spec='-R$libdir'
7389         ;;
7390       *)
7391         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7392         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
7393         ;;
7394       esac
7395     fi
7396     ;;
7397
7398   os2*)
7399     hardcode_libdir_flag_spec='-L$libdir'
7400     hardcode_minus_L=yes
7401     allow_undefined_flag=unsupported
7402     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'
7403     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7404     ;;
7405
7406   osf3*)
7407     if test "$GCC" = yes; then
7408       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
7409       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'
7410     else
7411       allow_undefined_flag=' -expect_unresolved \*'
7412       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'
7413     fi
7414     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7415     hardcode_libdir_separator=:
7416     ;;
7417
7418   osf4* | osf5*)        # as osf3* with the addition of -msym flag
7419     if test "$GCC" = yes; then
7420       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
7421       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'
7422       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
7423     else
7424       allow_undefined_flag=' -expect_unresolved \*'
7425       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'
7426       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7427       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
7428
7429       #Both c and cxx compiler support -rpath directly
7430       hardcode_libdir_flag_spec='-rpath $libdir'
7431     fi
7432     hardcode_libdir_separator=:
7433     ;;
7434
7435   sco3.2v5*)
7436     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7437     hardcode_shlibpath_var=no
7438     runpath_var=LD_RUN_PATH
7439     hardcode_runpath_var=yes
7440     export_dynamic_flag_spec='${wl}-Bexport'
7441     ;;
7442
7443   solaris*)
7444     # gcc --version < 3.0 without binutils cannot create self contained
7445     # shared libraries reliably, requiring libgcc.a to resolve some of
7446     # the object symbols generated in some cases.  Libraries that use
7447     # assert need libgcc.a to resolve __eprintf, for example.  Linking
7448     # a copy of libgcc.a into every shared library to guarantee resolving
7449     # such symbols causes other problems:  According to Tim Van Holder
7450     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
7451     # (to the application) exception stack for one thing.
7452     no_undefined_flag=' -z defs'
7453     if test "$GCC" = yes; then
7454       case `$CC --version 2>/dev/null` in
7455       [12].*)
7456         cat <<EOF 1>&2
7457
7458 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
7459 *** create self contained shared libraries on Solaris systems, without
7460 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
7461 *** -no-undefined support, which will at least allow you to build shared
7462 *** libraries.  However, you may find that when you link such libraries
7463 *** into an application without using GCC, you have to manually add
7464 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
7465 *** upgrade to a newer version of GCC.  Another option is to rebuild your
7466 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
7467
7468 EOF
7469         no_undefined_flag=
7470         ;;
7471       esac
7472     fi
7473     # $CC -shared without GNU ld will not create a library from C++
7474     # object files and a static libstdc++, better avoid it by now
7475     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7476     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7477                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7478     hardcode_libdir_flag_spec='-R$libdir'
7479     hardcode_shlibpath_var=no
7480     case $host_os in
7481     solaris2.[0-5] | solaris2.[0-5].*) ;;
7482     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
7483       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
7484     esac
7485     link_all_deplibs=yes
7486     ;;
7487
7488   sunos4*)
7489     if test "x$host_vendor" = xsequent; then
7490       # Use $CC to link under sequent, because it throws in some extra .o
7491       # files that make .init and .fini sections work.
7492       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7493     else
7494       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7495     fi
7496     hardcode_libdir_flag_spec='-L$libdir'
7497     hardcode_direct=yes
7498     hardcode_minus_L=yes
7499     hardcode_shlibpath_var=no
7500     ;;
7501
7502   sysv4)
7503     case $host_vendor in
7504       sni)
7505         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7506         hardcode_direct=yes # is this really true???
7507         ;;
7508       siemens)
7509         ## LD is ld it makes a PLAMLIB
7510         ## CC just makes a GrossModule.
7511         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7512         reload_cmds='$CC -r -o $output$reload_objs'
7513         hardcode_direct=no
7514         ;;
7515       motorola)
7516         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7517         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
7518         ;;
7519     esac
7520     runpath_var='LD_RUN_PATH'
7521     hardcode_shlibpath_var=no
7522     ;;
7523
7524   sysv4.3*)
7525     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7526     hardcode_shlibpath_var=no
7527     export_dynamic_flag_spec='-Bexport'
7528     ;;
7529
7530   sysv5*)
7531     no_undefined_flag=' -z text'
7532     # $CC -shared without GNU ld will not create a library from C++
7533     # object files and a static libstdc++, better avoid it by now
7534     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7535     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7536                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7537     hardcode_libdir_flag_spec=
7538     hardcode_shlibpath_var=no
7539     runpath_var='LD_RUN_PATH'
7540     ;;
7541
7542   uts4*)
7543     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7544     hardcode_libdir_flag_spec='-L$libdir'
7545     hardcode_shlibpath_var=no
7546     ;;
7547
7548   dgux*)
7549     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7550     hardcode_libdir_flag_spec='-L$libdir'
7551     hardcode_shlibpath_var=no
7552     ;;
7553
7554   sysv4*MP*)
7555     if test -d /usr/nec; then
7556       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7557       hardcode_shlibpath_var=no
7558       runpath_var=LD_RUN_PATH
7559       hardcode_runpath_var=yes
7560       ld_shlibs=yes
7561     fi
7562     ;;
7563
7564   sysv4.2uw2*)
7565     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7566     hardcode_direct=yes
7567     hardcode_minus_L=no
7568     hardcode_shlibpath_var=no
7569     hardcode_runpath_var=yes
7570     runpath_var=LD_RUN_PATH
7571     ;;
7572
7573   sysv5uw7* | unixware7*)
7574     no_undefined_flag='${wl}-z ${wl}text'
7575     if test "$GCC" = yes; then
7576       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7577     else
7578       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7579     fi
7580     runpath_var='LD_RUN_PATH'
7581     hardcode_shlibpath_var=no
7582     ;;
7583
7584   *)
7585     ld_shlibs=no
7586     ;;
7587   esac
7588 fi
7589 echo "$as_me:$LINENO: result: $ld_shlibs" >&5
7590 echo "${ECHO_T}$ld_shlibs" >&6
7591 test "$ld_shlibs" = no && can_build_shared=no
7592
7593 # Check hardcoding attributes.
7594 echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
7595 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
7596 hardcode_action=
7597 if test -n "$hardcode_libdir_flag_spec" || \
7598    test -n "$runpath_var"; then
7599
7600   # We can hardcode non-existant directories.
7601   if test "$hardcode_direct" != no &&
7602      # If the only mechanism to avoid hardcoding is shlibpath_var, we
7603      # have to relink, otherwise we might link with an installed library
7604      # when we should be linking with a yet-to-be-installed one
7605      ## test "$hardcode_shlibpath_var" != no &&
7606      test "$hardcode_minus_L" != no; then
7607     # Linking always hardcodes the temporary library directory.
7608     hardcode_action=relink
7609   else
7610     # We can link without hardcoding, and we can hardcode nonexisting dirs.
7611     hardcode_action=immediate
7612   fi
7613 else
7614   # We cannot hardcode anything, or else we can only hardcode existing
7615   # directories.
7616   hardcode_action=unsupported
7617 fi
7618 echo "$as_me:$LINENO: result: $hardcode_action" >&5
7619 echo "${ECHO_T}$hardcode_action" >&6
7620
7621 striplib=
7622 old_striplib=
7623 echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
7624 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
7625 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
7626   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
7627   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
7628   echo "$as_me:$LINENO: result: yes" >&5
7629 echo "${ECHO_T}yes" >&6
7630 else
7631   echo "$as_me:$LINENO: result: no" >&5
7632 echo "${ECHO_T}no" >&6
7633 fi
7634
7635 reload_cmds='$LD$reload_flag -o $output$reload_objs'
7636 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7637
7638 # PORTME Fill in your ld.so characteristics
7639 echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
7640 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
7641 library_names_spec=
7642 libname_spec='lib$name'
7643 soname_spec=
7644 postinstall_cmds=
7645 postuninstall_cmds=
7646 finish_cmds=
7647 finish_eval=
7648 shlibpath_var=
7649 shlibpath_overrides_runpath=unknown
7650 version_type=none
7651 dynamic_linker="$host_os ld.so"
7652 sys_lib_dlsearch_path_spec="/lib /usr/lib"
7653 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
7654
7655 case $host_os in
7656 aix3*)
7657   version_type=linux
7658   library_names_spec='${libname}${release}.so$versuffix $libname.a'
7659   shlibpath_var=LIBPATH
7660
7661   # AIX has no versioning support, so we append a major version to the name.
7662   soname_spec='${libname}${release}.so$major'
7663   ;;
7664
7665 aix4* | aix5*)
7666   version_type=linux
7667   need_lib_prefix=no
7668   need_version=no
7669   hardcode_into_libs=yes
7670   if test "$host_cpu" = ia64; then
7671     # AIX 5 supports IA64
7672     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
7673     shlibpath_var=LD_LIBRARY_PATH
7674   else
7675     # With GCC up to 2.95.x, collect2 would create an import file
7676     # for dependence libraries.  The import file would start with
7677     # the line `#! .'.  This would cause the generated library to
7678     # depend on `.', always an invalid library.  This was fixed in
7679     # development snapshots of GCC prior to 3.0.
7680     case $host_os in
7681       aix4 | aix4.[01] | aix4.[01].*)
7682         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
7683              echo ' yes '
7684              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
7685           :
7686         else
7687           can_build_shared=no
7688         fi
7689         ;;
7690     esac
7691     # AIX (on Power*) has no versioning support, so currently we can
7692     # not hardcode correct soname into executable. Probably we can
7693     # add versioning support to collect2, so additional links can
7694     # be useful in future.
7695     if test "$aix_use_runtimelinking" = yes; then
7696       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
7697       # instead of lib<name>.a to let people know that these are not
7698       # typical AIX shared libraries.
7699       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7700     else
7701       # We preserve .a as extension for shared libraries through AIX4.2
7702       # and later when we are not doing run time linking.
7703       library_names_spec='${libname}${release}.a $libname.a'
7704       soname_spec='${libname}${release}.so$major'
7705     fi
7706     shlibpath_var=LIBPATH
7707   fi
7708   hardcode_into_libs=yes
7709   ;;
7710
7711 amigaos*)
7712   library_names_spec='$libname.ixlibrary $libname.a'
7713   # Create ${libname}_ixlibrary.a entries in /sys/libs.
7714   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'
7715   ;;
7716
7717 beos*)
7718   library_names_spec='${libname}.so'
7719   dynamic_linker="$host_os ld.so"
7720   shlibpath_var=LIBRARY_PATH
7721   ;;
7722
7723 bsdi4*)
7724   version_type=linux
7725   need_version=no
7726   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7727   soname_spec='${libname}${release}.so$major'
7728   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
7729   shlibpath_var=LD_LIBRARY_PATH
7730   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
7731   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
7732   export_dynamic_flag_spec=-rdynamic
7733   # the default ld.so.conf also contains /usr/contrib/lib and
7734   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
7735   # libtool to hard-code these into programs
7736   ;;
7737
7738 cygwin* | mingw* | pw32*)
7739   version_type=windows
7740   need_version=no
7741   need_lib_prefix=no
7742   case $GCC,$host_os in
7743   yes,cygwin*)
7744     library_names_spec='$libname.dll.a'
7745     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
7746     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
7747       dldir=$destdir/`dirname \$dlpath`~
7748       test -d \$dldir || mkdir -p \$dldir~
7749       $install_prog .libs/$dlname \$dldir/$dlname'
7750     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
7751       dlpath=$dir/\$dldll~
7752        $rm \$dlpath'
7753     ;;
7754   yes,mingw*)
7755     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
7756     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
7757     ;;
7758   yes,pw32*)
7759     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
7760     ;;
7761   *)
7762     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
7763     ;;
7764   esac
7765   dynamic_linker='Win32 ld.exe'
7766   # FIXME: first we should search . and the directory the executable is in
7767   shlibpath_var=PATH
7768   ;;
7769
7770 darwin* | rhapsody*)
7771   dynamic_linker="$host_os dyld"
7772   version_type=darwin
7773   need_lib_prefix=no
7774   need_version=no
7775   # FIXME: Relying on posixy $() will cause problems for
7776   #        cross-compilation, but unfortunately the echo tests do not
7777   #        yet detect zsh echo's removal of \ escapes.
7778   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
7779   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
7780   shlibpath_overrides_runpath=yes
7781   shlibpath_var=DYLD_LIBRARY_PATH
7782   ;;
7783
7784 freebsd1*)
7785   dynamic_linker=no
7786   ;;
7787
7788 freebsd*)
7789   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
7790   version_type=freebsd-$objformat
7791   case $version_type in
7792     freebsd-elf*)
7793       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
7794       need_version=no
7795       need_lib_prefix=no
7796       ;;
7797     freebsd-*)
7798       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
7799       need_version=yes
7800       ;;
7801   esac
7802   shlibpath_var=LD_LIBRARY_PATH
7803   case $host_os in
7804   freebsd2*)
7805     shlibpath_overrides_runpath=yes
7806     ;;
7807   *)
7808     shlibpath_overrides_runpath=no
7809     hardcode_into_libs=yes
7810     ;;
7811   esac
7812   ;;
7813
7814 gnu*)
7815   version_type=linux
7816   need_lib_prefix=no
7817   need_version=no
7818   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
7819   soname_spec='${libname}${release}.so$major'
7820   shlibpath_var=LD_LIBRARY_PATH
7821   hardcode_into_libs=yes
7822   ;;
7823
7824 hpux9* | hpux10* | hpux11*)
7825   # Give a soname corresponding to the major version so that dld.sl refuses to
7826   # link against other versions.
7827   dynamic_linker="$host_os dld.sl"
7828   version_type=sunos
7829   need_lib_prefix=no
7830   need_version=no
7831   shlibpath_var=SHLIB_PATH
7832   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
7833   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
7834   soname_spec='${libname}${release}.sl$major'
7835   # HP-UX runs *really* slowly unless shared libraries are mode 555.
7836   postinstall_cmds='chmod 555 $lib'
7837   ;;
7838
7839 irix5* | irix6* | nonstopux*)
7840   case $host_os in
7841     nonstopux*) version_type=nonstopux ;;
7842     *)          version_type=irix ;;
7843   esac
7844   need_lib_prefix=no
7845   need_version=no
7846   soname_spec='${libname}${release}.so$major'
7847   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
7848   case $host_os in
7849   irix5* | nonstopux*)
7850     libsuff= shlibsuff=
7851     ;;
7852   *)
7853     case $LD in # libtool.m4 will add one of these switches to LD
7854     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
7855     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
7856     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
7857     *) libsuff= shlibsuff= libmagic=never-match;;
7858     esac
7859     ;;
7860   esac
7861   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
7862   shlibpath_overrides_runpath=no
7863   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
7864   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
7865   ;;
7866
7867 # No shared lib support for Linux oldld, aout, or coff.
7868 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
7869   dynamic_linker=no
7870   ;;
7871
7872 # This must be Linux ELF.
7873 linux-gnu*)
7874   version_type=linux
7875   need_lib_prefix=no
7876   need_version=no
7877   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7878   soname_spec='${libname}${release}.so$major'
7879   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
7880   shlibpath_var=LD_LIBRARY_PATH
7881   shlibpath_overrides_runpath=no
7882   # This implies no fast_install, which is unacceptable.
7883   # Some rework will be needed to allow for fast_install
7884   # before this can be enabled.
7885   hardcode_into_libs=yes
7886
7887   # We used to test for /lib/ld.so.1 and disable shared libraries on
7888   # powerpc, because MkLinux only supported shared libraries with the
7889   # GNU dynamic linker.  Since this was broken with cross compilers,
7890   # most powerpc-linux boxes support dynamic linking these days and
7891   # people can always --disable-shared, the test was removed, and we
7892   # assume the GNU/Linux dynamic linker is in use.
7893   dynamic_linker='GNU/Linux ld.so'
7894   ;;
7895
7896 netbsd*)
7897   version_type=sunos
7898   need_lib_prefix=no
7899   need_version=no
7900   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7901     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
7902     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7903     dynamic_linker='NetBSD (a.out) ld.so'
7904   else
7905     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
7906     soname_spec='${libname}${release}.so$major'
7907     dynamic_linker='NetBSD ld.elf_so'
7908   fi
7909   shlibpath_var=LD_LIBRARY_PATH
7910   shlibpath_overrides_runpath=yes
7911   hardcode_into_libs=yes
7912   ;;
7913
7914 newsos6)
7915   version_type=linux
7916   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7917   shlibpath_var=LD_LIBRARY_PATH
7918   shlibpath_overrides_runpath=yes
7919   ;;
7920
7921 openbsd*)
7922   version_type=sunos
7923   need_lib_prefix=no
7924   need_version=no
7925   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7926     case "$host_os" in
7927     openbsd2.[89] | openbsd2.[89].*)
7928       shlibpath_overrides_runpath=no
7929       ;;
7930     *)
7931       shlibpath_overrides_runpath=yes
7932       ;;
7933     esac
7934   else
7935     shlibpath_overrides_runpath=yes
7936   fi
7937   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
7938   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
7939   shlibpath_var=LD_LIBRARY_PATH
7940   ;;
7941
7942 os2*)
7943   libname_spec='$name'
7944   need_lib_prefix=no
7945   library_names_spec='$libname.dll $libname.a'
7946   dynamic_linker='OS/2 ld.exe'
7947   shlibpath_var=LIBPATH
7948   ;;
7949
7950 osf3* | osf4* | osf5*)
7951   version_type=osf
7952   need_version=no
7953   soname_spec='${libname}${release}.so$major'
7954   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7955   shlibpath_var=LD_LIBRARY_PATH
7956   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
7957   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
7958   hardcode_into_libs=yes
7959   ;;
7960
7961 sco3.2v5*)
7962   version_type=osf
7963   soname_spec='${libname}${release}.so$major'
7964   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7965   shlibpath_var=LD_LIBRARY_PATH
7966   ;;
7967
7968 solaris*)
7969   version_type=linux
7970   need_lib_prefix=no
7971   need_version=no
7972   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7973   soname_spec='${libname}${release}.so$major'
7974   shlibpath_var=LD_LIBRARY_PATH
7975   shlibpath_overrides_runpath=yes
7976   hardcode_into_libs=yes
7977   # ldd complains unless libraries are executable
7978   postinstall_cmds='chmod +x $lib'
7979   ;;
7980
7981 sunos4*)
7982   version_type=sunos
7983   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
7984   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
7985   shlibpath_var=LD_LIBRARY_PATH
7986   shlibpath_overrides_runpath=yes
7987   if test "$with_gnu_ld" = yes; then
7988     need_lib_prefix=no
7989   fi
7990   need_version=yes
7991   ;;
7992
7993 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7994   version_type=linux
7995   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
7996   soname_spec='${libname}${release}.so$major'
7997   shlibpath_var=LD_LIBRARY_PATH
7998   case $host_vendor in
7999     sni)
8000       shlibpath_overrides_runpath=no
8001       need_lib_prefix=no
8002       export_dynamic_flag_spec='${wl}-Blargedynsym'
8003       runpath_var=LD_RUN_PATH
8004       ;;
8005     siemens)
8006       need_lib_prefix=no
8007       ;;
8008     motorola)
8009       need_lib_prefix=no
8010       need_version=no
8011       shlibpath_overrides_runpath=no
8012       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
8013       ;;
8014   esac
8015   ;;
8016
8017 uts4*)
8018   version_type=linux
8019   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
8020   soname_spec='${libname}${release}.so$major'
8021   shlibpath_var=LD_LIBRARY_PATH
8022   ;;
8023
8024 dgux*)
8025   version_type=linux
8026   need_lib_prefix=no
8027   need_version=no
8028   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
8029   soname_spec='${libname}${release}.so$major'
8030   shlibpath_var=LD_LIBRARY_PATH
8031   ;;
8032
8033 sysv4*MP*)
8034   if test -d /usr/nec ;then
8035     version_type=linux
8036     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
8037     soname_spec='$libname.so.$major'
8038     shlibpath_var=LD_LIBRARY_PATH
8039   fi
8040   ;;
8041
8042 *)
8043   dynamic_linker=no
8044   ;;
8045 esac
8046 echo "$as_me:$LINENO: result: $dynamic_linker" >&5
8047 echo "${ECHO_T}$dynamic_linker" >&6
8048 test "$dynamic_linker" = no && can_build_shared=no
8049
8050 # Report the final consequences.
8051 echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
8052 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
8053 echo "$as_me:$LINENO: result: $can_build_shared" >&5
8054 echo "${ECHO_T}$can_build_shared" >&6
8055
8056 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
8057 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
8058 test "$can_build_shared" = "no" && enable_shared=no
8059
8060 # On AIX, shared libraries and static libraries use the same namespace, and
8061 # are all built from PIC.
8062 case "$host_os" in
8063 aix3*)
8064   test "$enable_shared" = yes && enable_static=no
8065   if test -n "$RANLIB"; then
8066     archive_cmds="$archive_cmds~\$RANLIB \$lib"
8067     postinstall_cmds='$RANLIB $lib'
8068   fi
8069   ;;
8070
8071 aix4*)
8072   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8073     test "$enable_shared" = yes && enable_static=no
8074   fi
8075   ;;
8076 esac
8077 echo "$as_me:$LINENO: result: $enable_shared" >&5
8078 echo "${ECHO_T}$enable_shared" >&6
8079
8080 echo "$as_me:$LINENO: checking whether to build static libraries" >&5
8081 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
8082 # Make sure either enable_shared or enable_static is yes.
8083 test "$enable_shared" = yes || enable_static=yes
8084 echo "$as_me:$LINENO: result: $enable_static" >&5
8085 echo "${ECHO_T}$enable_static" >&6
8086
8087 if test "$hardcode_action" = relink; then
8088   # Fast installation is not supported
8089   enable_fast_install=no
8090 elif test "$shlibpath_overrides_runpath" = yes ||
8091      test "$enable_shared" = no; then
8092   # Fast installation is not necessary
8093   enable_fast_install=needless
8094 fi
8095
8096 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8097 if test "$GCC" = yes; then
8098   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8099 fi
8100
8101 if test "x$enable_dlopen" != xyes; then
8102   enable_dlopen=unknown
8103   enable_dlopen_self=unknown
8104   enable_dlopen_self_static=unknown
8105 else
8106   lt_cv_dlopen=no
8107   lt_cv_dlopen_libs=
8108
8109   case $host_os in
8110   beos*)
8111     lt_cv_dlopen="load_add_on"
8112     lt_cv_dlopen_libs=
8113     lt_cv_dlopen_self=yes
8114     ;;
8115
8116   cygwin* | mingw* | pw32*)
8117     lt_cv_dlopen="LoadLibrary"
8118     lt_cv_dlopen_libs=
8119    ;;
8120
8121   *)
8122     echo "$as_me:$LINENO: checking for shl_load" >&5
8123 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
8124 if test "${ac_cv_func_shl_load+set}" = set; then
8125   echo $ECHO_N "(cached) $ECHO_C" >&6
8126 else
8127   cat >conftest.$ac_ext <<_ACEOF
8128 #line $LINENO "configure"
8129 /* confdefs.h.  */
8130 _ACEOF
8131 cat confdefs.h >>conftest.$ac_ext
8132 cat >>conftest.$ac_ext <<_ACEOF
8133 /* end confdefs.h.  */
8134 /* System header to define __stub macros and hopefully few prototypes,
8135     which can conflict with char shl_load (); below.
8136     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8137     <limits.h> exists even on freestanding compilers.  */
8138 #ifdef __STDC__
8139 # include <limits.h>
8140 #else
8141 # include <assert.h>
8142 #endif
8143 /* Override any gcc2 internal prototype to avoid an error.  */
8144 #ifdef __cplusplus
8145 extern "C"
8146 {
8147 #endif
8148 /* We use char because int might match the return type of a gcc2
8149    builtin and then its argument prototype would still apply.  */
8150 char shl_load ();
8151 /* The GNU C library defines this for functions which it implements
8152     to always fail with ENOSYS.  Some functions are actually named
8153     something starting with __ and the normal name is an alias.  */
8154 #if defined (__stub_shl_load) || defined (__stub___shl_load)
8155 choke me
8156 #else
8157 char (*f) () = shl_load;
8158 #endif
8159 #ifdef __cplusplus
8160 }
8161 #endif
8162
8163 int
8164 main ()
8165 {
8166 return f != shl_load;
8167   ;
8168   return 0;
8169 }
8170 _ACEOF
8171 rm -f conftest.$ac_objext conftest$ac_exeext
8172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8173   (eval $ac_link) 2>&5
8174   ac_status=$?
8175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176   (exit $ac_status); } &&
8177          { ac_try='test -s conftest$ac_exeext'
8178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179   (eval $ac_try) 2>&5
8180   ac_status=$?
8181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182   (exit $ac_status); }; }; then
8183   ac_cv_func_shl_load=yes
8184 else
8185   echo "$as_me: failed program was:" >&5
8186 sed 's/^/| /' conftest.$ac_ext >&5
8187
8188 ac_cv_func_shl_load=no
8189 fi
8190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8191 fi
8192 echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
8193 echo "${ECHO_T}$ac_cv_func_shl_load" >&6
8194 if test $ac_cv_func_shl_load = yes; then
8195   lt_cv_dlopen="shl_load"
8196 else
8197   echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8198 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8199 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8200   echo $ECHO_N "(cached) $ECHO_C" >&6
8201 else
8202   ac_check_lib_save_LIBS=$LIBS
8203 LIBS="-ldld  $LIBS"
8204 cat >conftest.$ac_ext <<_ACEOF
8205 #line $LINENO "configure"
8206 /* confdefs.h.  */
8207 _ACEOF
8208 cat confdefs.h >>conftest.$ac_ext
8209 cat >>conftest.$ac_ext <<_ACEOF
8210 /* end confdefs.h.  */
8211
8212 /* Override any gcc2 internal prototype to avoid an error.  */
8213 #ifdef __cplusplus
8214 extern "C"
8215 #endif
8216 /* We use char because int might match the return type of a gcc2
8217    builtin and then its argument prototype would still apply.  */
8218 char shl_load ();
8219 int
8220 main ()
8221 {
8222 shl_load ();
8223   ;
8224   return 0;
8225 }
8226 _ACEOF
8227 rm -f conftest.$ac_objext conftest$ac_exeext
8228 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8229   (eval $ac_link) 2>&5
8230   ac_status=$?
8231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8232   (exit $ac_status); } &&
8233          { ac_try='test -s conftest$ac_exeext'
8234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8235   (eval $ac_try) 2>&5
8236   ac_status=$?
8237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238   (exit $ac_status); }; }; then
8239   ac_cv_lib_dld_shl_load=yes
8240 else
8241   echo "$as_me: failed program was:" >&5
8242 sed 's/^/| /' conftest.$ac_ext >&5
8243
8244 ac_cv_lib_dld_shl_load=no
8245 fi
8246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8247 LIBS=$ac_check_lib_save_LIBS
8248 fi
8249 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8250 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
8251 if test $ac_cv_lib_dld_shl_load = yes; then
8252   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
8253 else
8254   echo "$as_me:$LINENO: checking for dlopen" >&5
8255 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
8256 if test "${ac_cv_func_dlopen+set}" = set; then
8257   echo $ECHO_N "(cached) $ECHO_C" >&6
8258 else
8259   cat >conftest.$ac_ext <<_ACEOF
8260 #line $LINENO "configure"
8261 /* confdefs.h.  */
8262 _ACEOF
8263 cat confdefs.h >>conftest.$ac_ext
8264 cat >>conftest.$ac_ext <<_ACEOF
8265 /* end confdefs.h.  */
8266 /* System header to define __stub macros and hopefully few prototypes,
8267     which can conflict with char dlopen (); below.
8268     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8269     <limits.h> exists even on freestanding compilers.  */
8270 #ifdef __STDC__
8271 # include <limits.h>
8272 #else
8273 # include <assert.h>
8274 #endif
8275 /* Override any gcc2 internal prototype to avoid an error.  */
8276 #ifdef __cplusplus
8277 extern "C"
8278 {
8279 #endif
8280 /* We use char because int might match the return type of a gcc2
8281    builtin and then its argument prototype would still apply.  */
8282 char dlopen ();
8283 /* The GNU C library defines this for functions which it implements
8284     to always fail with ENOSYS.  Some functions are actually named
8285     something starting with __ and the normal name is an alias.  */
8286 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8287 choke me
8288 #else
8289 char (*f) () = dlopen;
8290 #endif
8291 #ifdef __cplusplus
8292 }
8293 #endif
8294
8295 int
8296 main ()
8297 {
8298 return f != dlopen;
8299   ;
8300   return 0;
8301 }
8302 _ACEOF
8303 rm -f conftest.$ac_objext conftest$ac_exeext
8304 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8305   (eval $ac_link) 2>&5
8306   ac_status=$?
8307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8308   (exit $ac_status); } &&
8309          { ac_try='test -s conftest$ac_exeext'
8310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8311   (eval $ac_try) 2>&5
8312   ac_status=$?
8313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8314   (exit $ac_status); }; }; then
8315   ac_cv_func_dlopen=yes
8316 else
8317   echo "$as_me: failed program was:" >&5
8318 sed 's/^/| /' conftest.$ac_ext >&5
8319
8320 ac_cv_func_dlopen=no
8321 fi
8322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8323 fi
8324 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
8325 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
8326 if test $ac_cv_func_dlopen = yes; then
8327   lt_cv_dlopen="dlopen"
8328 else
8329   echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8330 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8331 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8332   echo $ECHO_N "(cached) $ECHO_C" >&6
8333 else
8334   ac_check_lib_save_LIBS=$LIBS
8335 LIBS="-ldl  $LIBS"
8336 cat >conftest.$ac_ext <<_ACEOF
8337 #line $LINENO "configure"
8338 /* confdefs.h.  */
8339 _ACEOF
8340 cat confdefs.h >>conftest.$ac_ext
8341 cat >>conftest.$ac_ext <<_ACEOF
8342 /* end confdefs.h.  */
8343
8344 /* Override any gcc2 internal prototype to avoid an error.  */
8345 #ifdef __cplusplus
8346 extern "C"
8347 #endif
8348 /* We use char because int might match the return type of a gcc2
8349    builtin and then its argument prototype would still apply.  */
8350 char dlopen ();
8351 int
8352 main ()
8353 {
8354 dlopen ();
8355   ;
8356   return 0;
8357 }
8358 _ACEOF
8359 rm -f conftest.$ac_objext conftest$ac_exeext
8360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8361   (eval $ac_link) 2>&5
8362   ac_status=$?
8363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8364   (exit $ac_status); } &&
8365          { ac_try='test -s conftest$ac_exeext'
8366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8367   (eval $ac_try) 2>&5
8368   ac_status=$?
8369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8370   (exit $ac_status); }; }; then
8371   ac_cv_lib_dl_dlopen=yes
8372 else
8373   echo "$as_me: failed program was:" >&5
8374 sed 's/^/| /' conftest.$ac_ext >&5
8375
8376 ac_cv_lib_dl_dlopen=no
8377 fi
8378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8379 LIBS=$ac_check_lib_save_LIBS
8380 fi
8381 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8382 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8383 if test $ac_cv_lib_dl_dlopen = yes; then
8384   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
8385 else
8386   echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
8387 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
8388 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
8389   echo $ECHO_N "(cached) $ECHO_C" >&6
8390 else
8391   ac_check_lib_save_LIBS=$LIBS
8392 LIBS="-lsvld  $LIBS"
8393 cat >conftest.$ac_ext <<_ACEOF
8394 #line $LINENO "configure"
8395 /* confdefs.h.  */
8396 _ACEOF
8397 cat confdefs.h >>conftest.$ac_ext
8398 cat >>conftest.$ac_ext <<_ACEOF
8399 /* end confdefs.h.  */
8400
8401 /* Override any gcc2 internal prototype to avoid an error.  */
8402 #ifdef __cplusplus
8403 extern "C"
8404 #endif
8405 /* We use char because int might match the return type of a gcc2
8406    builtin and then its argument prototype would still apply.  */
8407 char dlopen ();
8408 int
8409 main ()
8410 {
8411 dlopen ();
8412   ;
8413   return 0;
8414 }
8415 _ACEOF
8416 rm -f conftest.$ac_objext conftest$ac_exeext
8417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8418   (eval $ac_link) 2>&5
8419   ac_status=$?
8420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8421   (exit $ac_status); } &&
8422          { ac_try='test -s conftest$ac_exeext'
8423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8424   (eval $ac_try) 2>&5
8425   ac_status=$?
8426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8427   (exit $ac_status); }; }; then
8428   ac_cv_lib_svld_dlopen=yes
8429 else
8430   echo "$as_me: failed program was:" >&5
8431 sed 's/^/| /' conftest.$ac_ext >&5
8432
8433 ac_cv_lib_svld_dlopen=no
8434 fi
8435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8436 LIBS=$ac_check_lib_save_LIBS
8437 fi
8438 echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
8439 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
8440 if test $ac_cv_lib_svld_dlopen = yes; then
8441   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
8442 else
8443   echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
8444 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
8445 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
8446   echo $ECHO_N "(cached) $ECHO_C" >&6
8447 else
8448   ac_check_lib_save_LIBS=$LIBS
8449 LIBS="-ldld  $LIBS"
8450 cat >conftest.$ac_ext <<_ACEOF
8451 #line $LINENO "configure"
8452 /* confdefs.h.  */
8453 _ACEOF
8454 cat confdefs.h >>conftest.$ac_ext
8455 cat >>conftest.$ac_ext <<_ACEOF
8456 /* end confdefs.h.  */
8457
8458 /* Override any gcc2 internal prototype to avoid an error.  */
8459 #ifdef __cplusplus
8460 extern "C"
8461 #endif
8462 /* We use char because int might match the return type of a gcc2
8463    builtin and then its argument prototype would still apply.  */
8464 char dld_link ();
8465 int
8466 main ()
8467 {
8468 dld_link ();
8469   ;
8470   return 0;
8471 }
8472 _ACEOF
8473 rm -f conftest.$ac_objext conftest$ac_exeext
8474 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8475   (eval $ac_link) 2>&5
8476   ac_status=$?
8477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8478   (exit $ac_status); } &&
8479          { ac_try='test -s conftest$ac_exeext'
8480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8481   (eval $ac_try) 2>&5
8482   ac_status=$?
8483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484   (exit $ac_status); }; }; then
8485   ac_cv_lib_dld_dld_link=yes
8486 else
8487   echo "$as_me: failed program was:" >&5
8488 sed 's/^/| /' conftest.$ac_ext >&5
8489
8490 ac_cv_lib_dld_dld_link=no
8491 fi
8492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8493 LIBS=$ac_check_lib_save_LIBS
8494 fi
8495 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
8496 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
8497 if test $ac_cv_lib_dld_dld_link = yes; then
8498   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
8499 fi
8500
8501
8502 fi
8503
8504
8505 fi
8506
8507
8508 fi
8509
8510
8511 fi
8512
8513
8514 fi
8515
8516     ;;
8517   esac
8518
8519   if test "x$lt_cv_dlopen" != xno; then
8520     enable_dlopen=yes
8521   else
8522     enable_dlopen=no
8523   fi
8524
8525   case $lt_cv_dlopen in
8526   dlopen)
8527     save_CPPFLAGS="$CPPFLAGS"
8528         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
8529
8530     save_LDFLAGS="$LDFLAGS"
8531     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
8532
8533     save_LIBS="$LIBS"
8534     LIBS="$lt_cv_dlopen_libs $LIBS"
8535
8536     echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
8537 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
8538 if test "${lt_cv_dlopen_self+set}" = set; then
8539   echo $ECHO_N "(cached) $ECHO_C" >&6
8540 else
8541           if test "$cross_compiling" = yes; then :
8542   lt_cv_dlopen_self=cross
8543 else
8544     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8545   lt_status=$lt_dlunknown
8546   cat > conftest.$ac_ext <<EOF
8547 #line 8547 "configure"
8548 #include "confdefs.h"
8549
8550 #if HAVE_DLFCN_H
8551 #include <dlfcn.h>
8552 #endif
8553
8554 #include <stdio.h>
8555
8556 #ifdef RTLD_GLOBAL
8557 #  define LT_DLGLOBAL           RTLD_GLOBAL
8558 #else
8559 #  ifdef DL_GLOBAL
8560 #    define LT_DLGLOBAL         DL_GLOBAL
8561 #  else
8562 #    define LT_DLGLOBAL         0
8563 #  endif
8564 #endif
8565
8566 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
8567    find out it does not work in some platform. */
8568 #ifndef LT_DLLAZY_OR_NOW
8569 #  ifdef RTLD_LAZY
8570 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
8571 #  else
8572 #    ifdef DL_LAZY
8573 #      define LT_DLLAZY_OR_NOW          DL_LAZY
8574 #    else
8575 #      ifdef RTLD_NOW
8576 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
8577 #      else
8578 #        ifdef DL_NOW
8579 #          define LT_DLLAZY_OR_NOW      DL_NOW
8580 #        else
8581 #          define LT_DLLAZY_OR_NOW      0
8582 #        endif
8583 #      endif
8584 #    endif
8585 #  endif
8586 #endif
8587
8588 #ifdef __cplusplus
8589 extern "C" void exit (int);
8590 #endif
8591
8592 void fnord() { int i=42;}
8593 int main ()
8594 {
8595   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
8596   int status = $lt_dlunknown;
8597
8598   if (self)
8599     {
8600       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
8601       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
8602       /* dlclose (self); */
8603     }
8604
8605     exit (status);
8606 }
8607 EOF
8608   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8609   (eval $ac_link) 2>&5
8610   ac_status=$?
8611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
8613     (./conftest; exit; ) 2>/dev/null
8614     lt_status=$?
8615     case x$lt_status in
8616       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
8617       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
8618       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
8619     esac
8620   else :
8621     # compilation failed
8622     lt_cv_dlopen_self=no
8623   fi
8624 fi
8625 rm -fr conftest*
8626
8627
8628 fi
8629 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
8630 echo "${ECHO_T}$lt_cv_dlopen_self" >&6
8631
8632     if test "x$lt_cv_dlopen_self" = xyes; then
8633       LDFLAGS="$LDFLAGS $link_static_flag"
8634       echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
8635 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
8636 if test "${lt_cv_dlopen_self_static+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639           if test "$cross_compiling" = yes; then :
8640   lt_cv_dlopen_self_static=cross
8641 else
8642     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
8643   lt_status=$lt_dlunknown
8644   cat > conftest.$ac_ext <<EOF
8645 #line 8645 "configure"
8646 #include "confdefs.h"
8647
8648 #if HAVE_DLFCN_H
8649 #include <dlfcn.h>
8650 #endif
8651
8652 #include <stdio.h>
8653
8654 #ifdef RTLD_GLOBAL
8655 #  define LT_DLGLOBAL           RTLD_GLOBAL
8656 #else
8657 #  ifdef DL_GLOBAL
8658 #    define LT_DLGLOBAL         DL_GLOBAL
8659 #  else
8660 #    define LT_DLGLOBAL         0
8661 #  endif
8662 #endif
8663
8664 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
8665    find out it does not work in some platform. */
8666 #ifndef LT_DLLAZY_OR_NOW
8667 #  ifdef RTLD_LAZY
8668 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
8669 #  else
8670 #    ifdef DL_LAZY
8671 #      define LT_DLLAZY_OR_NOW          DL_LAZY
8672 #    else
8673 #      ifdef RTLD_NOW
8674 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
8675 #      else
8676 #        ifdef DL_NOW
8677 #          define LT_DLLAZY_OR_NOW      DL_NOW
8678 #        else
8679 #          define LT_DLLAZY_OR_NOW      0
8680 #        endif
8681 #      endif
8682 #    endif
8683 #  endif
8684 #endif
8685
8686 #ifdef __cplusplus
8687 extern "C" void exit (int);
8688 #endif
8689
8690 void fnord() { int i=42;}
8691 int main ()
8692 {
8693   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
8694   int status = $lt_dlunknown;
8695
8696   if (self)
8697     {
8698       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
8699       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
8700       /* dlclose (self); */
8701     }
8702
8703     exit (status);
8704 }
8705 EOF
8706   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8707   (eval $ac_link) 2>&5
8708   ac_status=$?
8709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8710   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
8711     (./conftest; exit; ) 2>/dev/null
8712     lt_status=$?
8713     case x$lt_status in
8714       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
8715       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
8716       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
8717     esac
8718   else :
8719     # compilation failed
8720     lt_cv_dlopen_self_static=no
8721   fi
8722 fi
8723 rm -fr conftest*
8724
8725
8726 fi
8727 echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
8728 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
8729     fi
8730
8731     CPPFLAGS="$save_CPPFLAGS"
8732     LDFLAGS="$save_LDFLAGS"
8733     LIBS="$save_LIBS"
8734     ;;
8735   esac
8736
8737   case $lt_cv_dlopen_self in
8738   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
8739   *) enable_dlopen_self=unknown ;;
8740   esac
8741
8742   case $lt_cv_dlopen_self_static in
8743   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
8744   *) enable_dlopen_self_static=unknown ;;
8745   esac
8746 fi
8747
8748
8749 if test "$enable_shared" = yes && test "$GCC" = yes; then
8750   case $archive_cmds in
8751   *'~'*)
8752     # FIXME: we may have to deal with multi-command sequences.
8753     ;;
8754   '$CC '*)
8755     # Test whether the compiler implicitly links with -lc since on some
8756     # systems, -lgcc has to come before -lc. If gcc already passes -lc
8757     # to ld, don't add -lc before -lgcc.
8758     echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8759 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
8760     if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
8761   echo $ECHO_N "(cached) $ECHO_C" >&6
8762 else
8763   $rm conftest*
8764     echo 'static int dummy;' > conftest.$ac_ext
8765
8766     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8767   (eval $ac_compile) 2>&5
8768   ac_status=$?
8769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8770   (exit $ac_status); }; then
8771       soname=conftest
8772       lib=conftest
8773       libobjs=conftest.$ac_objext
8774       deplibs=
8775       wl=$lt_cv_prog_cc_wl
8776       compiler_flags=-v
8777       linker_flags=-v
8778       verstring=
8779       output_objdir=.
8780       libname=conftest
8781       save_allow_undefined_flag=$allow_undefined_flag
8782       allow_undefined_flag=
8783       if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8784   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8785   ac_status=$?
8786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8787   (exit $ac_status); }
8788       then
8789         lt_cv_archive_cmds_need_lc=no
8790       else
8791         lt_cv_archive_cmds_need_lc=yes
8792       fi
8793       allow_undefined_flag=$save_allow_undefined_flag
8794     else
8795       cat conftest.err 1>&5
8796     fi
8797 fi
8798
8799     echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
8800 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
8801     ;;
8802   esac
8803 fi
8804 need_lc=${lt_cv_archive_cmds_need_lc-yes}
8805
8806 # The second clause should only fire when bootstrapping the
8807 # libtool distribution, otherwise you forgot to ship ltmain.sh
8808 # with your package, and you will get complaints that there are
8809 # no rules to generate ltmain.sh.
8810 if test -f "$ltmain"; then
8811   :
8812 else
8813   # If there is no Makefile yet, we rely on a make rule to execute
8814   # `config.status --recheck' to rerun these tests and create the
8815   # libtool script then.
8816   test -f Makefile && make "$ltmain"
8817 fi
8818
8819 if test -f "$ltmain"; then
8820   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
8821   $rm -f "${ofile}T"
8822
8823   echo creating $ofile
8824
8825   # Now quote all the things that may contain metacharacters while being
8826   # careful not to overquote the AC_SUBSTed values.  We take copies of the
8827   # variables and quote the copies for generation of the libtool script.
8828   for var in echo old_CC old_CFLAGS SED \
8829     AR AR_FLAGS CC LD LN_S NM SHELL \
8830     reload_flag reload_cmds wl \
8831     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
8832     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
8833     library_names_spec soname_spec \
8834     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
8835     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
8836     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
8837     old_striplib striplib file_magic_cmd export_symbols_cmds \
8838     deplibs_check_method allow_undefined_flag no_undefined_flag \
8839     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
8840     global_symbol_to_c_name_address \
8841     hardcode_libdir_flag_spec hardcode_libdir_separator  \
8842     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
8843     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
8844
8845     case $var in
8846     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
8847     old_postinstall_cmds | old_postuninstall_cmds | \
8848     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
8849     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
8850     postinstall_cmds | postuninstall_cmds | \
8851     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
8852       # Double-quote double-evaled strings.
8853       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
8854       ;;
8855     *)
8856       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
8857       ;;
8858     esac
8859   done
8860
8861   cat <<__EOF__ > "${ofile}T"
8862 #! $SHELL
8863
8864 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
8865 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
8866 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
8867 #
8868 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
8869 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8870 #
8871 # This program is free software; you can redistribute it and/or modify
8872 # it under the terms of the GNU General Public License as published by
8873 # the Free Software Foundation; either version 2 of the License, or
8874 # (at your option) any later version.
8875 #
8876 # This program is distributed in the hope that it will be useful, but
8877 # WITHOUT ANY WARRANTY; without even the implied warranty of
8878 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8879 # General Public License for more details.
8880 #
8881 # You should have received a copy of the GNU General Public License
8882 # along with this program; if not, write to the Free Software
8883 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8884 #
8885 # As a special exception to the GNU General Public License, if you
8886 # distribute this file as part of a program that contains a
8887 # configuration script generated by Autoconf, you may include it under
8888 # the same distribution terms that you use for the rest of that program.
8889
8890 # A sed that does not truncate output.
8891 SED=$lt_SED
8892
8893 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
8894 Xsed="${SED} -e s/^X//"
8895
8896 # The HP-UX ksh and POSIX shell print the target directory to stdout
8897 # if CDPATH is set.
8898 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
8899
8900 # ### BEGIN LIBTOOL CONFIG
8901
8902 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8903
8904 # Shell to use when invoking shell scripts.
8905 SHELL=$lt_SHELL
8906
8907 # Whether or not to build shared libraries.
8908 build_libtool_libs=$enable_shared
8909
8910 # Whether or not to build static libraries.
8911 build_old_libs=$enable_static
8912
8913 # Whether or not to add -lc for building shared libraries.
8914 build_libtool_need_lc=$need_lc
8915
8916 # Whether or not to optimize for fast installation.
8917 fast_install=$enable_fast_install
8918
8919 # The host system.
8920 host_alias=$host_alias
8921 host=$host
8922
8923 # An echo program that does not interpret backslashes.
8924 echo=$lt_echo
8925
8926 # The archiver.
8927 AR=$lt_AR
8928 AR_FLAGS=$lt_AR_FLAGS
8929
8930 # The default C compiler.
8931 CC=$lt_CC
8932
8933 # Is the compiler the GNU C compiler?
8934 with_gcc=$GCC
8935
8936 # The linker used to build libraries.
8937 LD=$lt_LD
8938
8939 # Whether we need hard or soft links.
8940 LN_S=$lt_LN_S
8941
8942 # A BSD-compatible nm program.
8943 NM=$lt_NM
8944
8945 # A symbol stripping program
8946 STRIP=$STRIP
8947
8948 # Used to examine libraries when file_magic_cmd begins "file"
8949 MAGIC_CMD=$MAGIC_CMD
8950
8951 # Used on cygwin: DLL creation program.
8952 DLLTOOL="$DLLTOOL"
8953
8954 # Used on cygwin: object dumper.
8955 OBJDUMP="$OBJDUMP"
8956
8957 # Used on cygwin: assembler.
8958 AS="$AS"
8959
8960 # The name of the directory that contains temporary libtool files.
8961 objdir=$objdir
8962
8963 # How to create reloadable object files.
8964 reload_flag=$lt_reload_flag
8965 reload_cmds=$lt_reload_cmds
8966
8967 # How to pass a linker flag through the compiler.
8968 wl=$lt_wl
8969
8970 # Object file suffix (normally "o").
8971 objext="$ac_objext"
8972
8973 # Old archive suffix (normally "a").
8974 libext="$libext"
8975
8976 # Executable file suffix (normally "").
8977 exeext="$exeext"
8978
8979 # Additional compiler flags for building library objects.
8980 pic_flag=$lt_pic_flag
8981 pic_mode=$pic_mode
8982
8983 # Does compiler simultaneously support -c and -o options?
8984 compiler_c_o=$lt_compiler_c_o
8985
8986 # Can we write directly to a .lo ?
8987 compiler_o_lo=$lt_compiler_o_lo
8988
8989 # Must we lock files when doing compilation ?
8990 need_locks=$lt_need_locks
8991
8992 # Do we need the lib prefix for modules?
8993 need_lib_prefix=$need_lib_prefix
8994
8995 # Do we need a version for libraries?
8996 need_version=$need_version
8997
8998 # Whether dlopen is supported.
8999 dlopen_support=$enable_dlopen
9000
9001 # Whether dlopen of programs is supported.
9002 dlopen_self=$enable_dlopen_self
9003
9004 # Whether dlopen of statically linked programs is supported.
9005 dlopen_self_static=$enable_dlopen_self_static
9006
9007 # Compiler flag to prevent dynamic linking.
9008 link_static_flag=$lt_link_static_flag
9009
9010 # Compiler flag to turn off builtin functions.
9011 no_builtin_flag=$lt_no_builtin_flag
9012
9013 # Compiler flag to allow reflexive dlopens.
9014 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
9015
9016 # Compiler flag to generate shared objects directly from archives.
9017 whole_archive_flag_spec=$lt_whole_archive_flag_spec
9018
9019 # Compiler flag to generate thread-safe objects.
9020 thread_safe_flag_spec=$lt_thread_safe_flag_spec
9021
9022 # Library versioning type.
9023 version_type=$version_type
9024
9025 # Format of library name prefix.
9026 libname_spec=$lt_libname_spec
9027
9028 # List of archive names.  First name is the real one, the rest are links.
9029 # The last name is the one that the linker finds with -lNAME.
9030 library_names_spec=$lt_library_names_spec
9031
9032 # The coded name of the library, if different from the real name.
9033 soname_spec=$lt_soname_spec
9034
9035 # Commands used to build and install an old-style archive.
9036 RANLIB=$lt_RANLIB
9037 old_archive_cmds=$lt_old_archive_cmds
9038 old_postinstall_cmds=$lt_old_postinstall_cmds
9039 old_postuninstall_cmds=$lt_old_postuninstall_cmds
9040
9041 # Create an old-style archive from a shared archive.
9042 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
9043
9044 # Create a temporary old-style archive to link instead of a shared archive.
9045 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
9046
9047 # Commands used to build and install a shared archive.
9048 archive_cmds=$lt_archive_cmds
9049 archive_expsym_cmds=$lt_archive_expsym_cmds
9050 postinstall_cmds=$lt_postinstall_cmds
9051 postuninstall_cmds=$lt_postuninstall_cmds
9052
9053 # Commands to strip libraries.
9054 old_striplib=$lt_old_striplib
9055 striplib=$lt_striplib
9056
9057 # Method to check whether dependent libraries are shared objects.
9058 deplibs_check_method=$lt_deplibs_check_method
9059
9060 # Command to use when deplibs_check_method == file_magic.
9061 file_magic_cmd=$lt_file_magic_cmd
9062
9063 # Flag that allows shared libraries with undefined symbols to be built.
9064 allow_undefined_flag=$lt_allow_undefined_flag
9065
9066 # Flag that forces no undefined symbols.
9067 no_undefined_flag=$lt_no_undefined_flag
9068
9069 # Commands used to finish a libtool library installation in a directory.
9070 finish_cmds=$lt_finish_cmds
9071
9072 # Same as above, but a single script fragment to be evaled but not shown.
9073 finish_eval=$lt_finish_eval
9074
9075 # Take the output of nm and produce a listing of raw symbols and C names.
9076 global_symbol_pipe=$lt_global_symbol_pipe
9077
9078 # Transform the output of nm in a proper C declaration
9079 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
9080
9081 # Transform the output of nm in a C name address pair
9082 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
9083
9084 # This is the shared library runtime path variable.
9085 runpath_var=$runpath_var
9086
9087 # This is the shared library path variable.
9088 shlibpath_var=$shlibpath_var
9089
9090 # Is shlibpath searched before the hard-coded library search path?
9091 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9092
9093 # How to hardcode a shared library path into an executable.
9094 hardcode_action=$hardcode_action
9095
9096 # Whether we should hardcode library paths into libraries.
9097 hardcode_into_libs=$hardcode_into_libs
9098
9099 # Flag to hardcode \$libdir into a binary during linking.
9100 # This must work even if \$libdir does not exist.
9101 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
9102
9103 # Whether we need a single -rpath flag with a separated argument.
9104 hardcode_libdir_separator=$lt_hardcode_libdir_separator
9105
9106 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
9107 # resulting binary.
9108 hardcode_direct=$hardcode_direct
9109
9110 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9111 # resulting binary.
9112 hardcode_minus_L=$hardcode_minus_L
9113
9114 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9115 # the resulting binary.
9116 hardcode_shlibpath_var=$hardcode_shlibpath_var
9117
9118 # Variables whose values should be saved in libtool wrapper scripts and
9119 # restored at relink time.
9120 variables_saved_for_relink="$variables_saved_for_relink"
9121
9122 # Whether libtool must link a program against all its dependency libraries.
9123 link_all_deplibs=$link_all_deplibs
9124
9125 # Compile-time system search path for libraries
9126 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
9127
9128 # Run-time system search path for libraries
9129 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
9130
9131 # Fix the shell variable \$srcfile for the compiler.
9132 fix_srcfile_path="$fix_srcfile_path"
9133
9134 # Set to yes if exported symbols are required.
9135 always_export_symbols=$always_export_symbols
9136
9137 # The commands to list exported symbols.
9138 export_symbols_cmds=$lt_export_symbols_cmds
9139
9140 # The commands to extract the exported symbol list from a shared archive.
9141 extract_expsyms_cmds=$lt_extract_expsyms_cmds
9142
9143 # Symbols that should not be listed in the preloaded symbols.
9144 exclude_expsyms=$lt_exclude_expsyms
9145
9146 # Symbols that must always be exported.
9147 include_expsyms=$lt_include_expsyms
9148
9149 # ### END LIBTOOL CONFIG
9150
9151 __EOF__
9152
9153   case $host_os in
9154   aix3*)
9155     cat <<\EOF >> "${ofile}T"
9156
9157 # AIX sometimes has problems with the GCC collect2 program.  For some
9158 # reason, if we set the COLLECT_NAMES environment variable, the problems
9159 # vanish in a puff of smoke.
9160 if test "X${COLLECT_NAMES+set}" != Xset; then
9161   COLLECT_NAMES=
9162   export COLLECT_NAMES
9163 fi
9164 EOF
9165     ;;
9166   esac
9167
9168   case $host_os in
9169   cygwin* | mingw* | pw32* | os2*)
9170     cat <<'EOF' >> "${ofile}T"
9171       # This is a source program that is used to create dlls on Windows
9172       # Don't remove nor modify the starting and closing comments
9173 # /* ltdll.c starts here */
9174 # #define WIN32_LEAN_AND_MEAN
9175 # #include <windows.h>
9176 # #undef WIN32_LEAN_AND_MEAN
9177 # #include <stdio.h>
9178 #
9179 # #ifndef __CYGWIN__
9180 # #  ifdef __CYGWIN32__
9181 # #    define __CYGWIN__ __CYGWIN32__
9182 # #  endif
9183 # #endif
9184 #
9185 # #ifdef __cplusplus
9186 # extern "C" {
9187 # #endif
9188 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
9189 # #ifdef __cplusplus
9190 # }
9191 # #endif
9192 #
9193 # #ifdef __CYGWIN__
9194 # #include <cygwin/cygwin_dll.h>
9195 # DECLARE_CYGWIN_DLL( DllMain );
9196 # #endif
9197 # HINSTANCE __hDllInstance_base;
9198 #
9199 # BOOL APIENTRY
9200 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
9201 # {
9202 #   __hDllInstance_base = hInst;
9203 #   return TRUE;
9204 # }
9205 # /* ltdll.c ends here */
9206         # This is a source program that is used to create import libraries
9207         # on Windows for dlls which lack them. Don't remove nor modify the
9208         # starting and closing comments
9209 # /* impgen.c starts here */
9210 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
9211 #
9212 #  This file is part of GNU libtool.
9213 #
9214 #  This program is free software; you can redistribute it and/or modify
9215 #  it under the terms of the GNU General Public License as published by
9216 #  the Free Software Foundation; either version 2 of the License, or
9217 #  (at your option) any later version.
9218 #
9219 #  This program is distributed in the hope that it will be useful,
9220 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
9221 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9222 #  GNU General Public License for more details.
9223 #
9224 #  You should have received a copy of the GNU General Public License
9225 #  along with this program; if not, write to the Free Software
9226 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9227 #  */
9228 #
9229 # #include <stdio.h>            /* for printf() */
9230 # #include <unistd.h>           /* for open(), lseek(), read() */
9231 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
9232 # #include <string.h>           /* for strdup() */
9233 #
9234 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
9235 # #ifndef O_BINARY
9236 # #define O_BINARY 0
9237 # #endif
9238 #
9239 # static unsigned int
9240 # pe_get16 (fd, offset)
9241 #      int fd;
9242 #      int offset;
9243 # {
9244 #   unsigned char b[2];
9245 #   lseek (fd, offset, SEEK_SET);
9246 #   read (fd, b, 2);
9247 #   return b[0] + (b[1]<<8);
9248 # }
9249 #
9250 # static unsigned int
9251 # pe_get32 (fd, offset)
9252 #     int fd;
9253 #     int offset;
9254 # {
9255 #   unsigned char b[4];
9256 #   lseek (fd, offset, SEEK_SET);
9257 #   read (fd, b, 4);
9258 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
9259 # }
9260 #
9261 # static unsigned int
9262 # pe_as32 (ptr)
9263 #      void *ptr;
9264 # {
9265 #   unsigned char *b = ptr;
9266 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
9267 # }
9268 #
9269 # int
9270 # main (argc, argv)
9271 #     int argc;
9272 #     char *argv[];
9273 # {
9274 #     int dll;
9275 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
9276 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
9277 #     unsigned long name_rvas, nexp;
9278 #     unsigned char *expdata, *erva;
9279 #     char *filename, *dll_name;
9280 #
9281 #     filename = argv[1];
9282 #
9283 #     dll = open(filename, O_RDONLY|O_BINARY);
9284 #     if (dll < 1)
9285 #       return 1;
9286 #
9287 #     dll_name = filename;
9288 #
9289 #     for (i=0; filename[i]; i++)
9290 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
9291 #           dll_name = filename + i +1;
9292 #
9293 #     pe_header_offset = pe_get32 (dll, 0x3c);
9294 #     opthdr_ofs = pe_header_offset + 4 + 20;
9295 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
9296 #
9297 #     if (num_entries < 1) /* no exports */
9298 #       return 1;
9299 #
9300 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
9301 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
9302 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
9303 #     secptr = (pe_header_offset + 4 + 20 +
9304 #             pe_get16 (dll, pe_header_offset + 4 + 16));
9305 #
9306 #     expptr = 0;
9307 #     for (i = 0; i < nsections; i++)
9308 #     {
9309 #       char sname[8];
9310 #       unsigned long secptr1 = secptr + 40 * i;
9311 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
9312 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
9313 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
9314 #       lseek(dll, secptr1, SEEK_SET);
9315 #       read(dll, sname, 8);
9316 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
9317 #       {
9318 #           expptr = fptr + (export_rva - vaddr);
9319 #           if (export_rva + export_size > vaddr + vsize)
9320 #               export_size = vsize - (export_rva - vaddr);
9321 #           break;
9322 #       }
9323 #     }
9324 #
9325 #     expdata = (unsigned char*)malloc(export_size);
9326 #     lseek (dll, expptr, SEEK_SET);
9327 #     read (dll, expdata, export_size);
9328 #     erva = expdata - export_rva;
9329 #
9330 #     nexp = pe_as32 (expdata+24);
9331 #     name_rvas = pe_as32 (expdata+32);
9332 #
9333 #     printf ("EXPORTS\n");
9334 #     for (i = 0; i<nexp; i++)
9335 #     {
9336 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
9337 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
9338 #     }
9339 #
9340 #     return 0;
9341 # }
9342 # /* impgen.c ends here */
9343
9344 EOF
9345     ;;
9346   esac
9347
9348   # We use sed instead of cat because bash on DJGPP gets confused if
9349   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
9350   # text mode, it properly converts lines to CR/LF.  This bash problem
9351   # is reportedly fixed, but why not run on old versions too?
9352   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
9353
9354   mv -f "${ofile}T" "$ofile" || \
9355     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
9356   chmod +x "$ofile"
9357 fi
9358
9359
9360
9361
9362
9363 # This can be used to rebuild libtool when needed
9364 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
9365
9366 # Always use our own libtool.
9367 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9368
9369 # Prevent multiple expansion
9370
9371
9372
9373 # test for ln hardlink support
9374 echo "$as_me:$LINENO: checking whether ln works" >&5
9375 echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
9376 if test "${ol_cv_prog_LN_H+set}" = set; then
9377   echo $ECHO_N "(cached) $ECHO_C" >&6
9378 else
9379   rm -f conftest.src conftest.dst
9380 echo "conftest" > conftest.src
9381 if ln conftest.src conftest.dst 2>/dev/null
9382 then
9383   ol_cv_prog_LN_H="ln"
9384 else
9385   ol_cv_prog_LN_H="cp"
9386 fi
9387 rm -f conftest.src conftest.dst
9388
9389 fi
9390 LN_H="$ol_cv_prog_LN_H"
9391 if test "$ol_cv_prog_LN_H" = "ln"; then
9392         echo "$as_me:$LINENO: result: yes" >&5
9393 echo "${ECHO_T}yes" >&6
9394 else
9395         echo "$as_me:$LINENO: result: no" >&5
9396 echo "${ECHO_T}no" >&6
9397 fi
9398
9399 echo "$as_me:$LINENO: checking whether ln -s works" >&5
9400 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
9401 LN_S=$as_ln_s
9402 if test "$LN_S" = "ln -s"; then
9403   echo "$as_me:$LINENO: result: yes" >&5
9404 echo "${ECHO_T}yes" >&6
9405 else
9406   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
9407 echo "${ECHO_T}no, using $LN_S" >&6
9408 fi
9409
9410
9411 ol_link_perl=no
9412 if test $ol_enable_perl != no ; then
9413         # Extract the first word of "perl", so it can be a program name with args.
9414 set dummy perl; ac_word=$2
9415 echo "$as_me:$LINENO: checking for $ac_word" >&5
9416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9417 if test "${ac_cv_path_PERLBIN+set}" = set; then
9418   echo $ECHO_N "(cached) $ECHO_C" >&6
9419 else
9420   case $PERLBIN in
9421   [\\/]* | ?:[\\/]*)
9422   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
9423   ;;
9424   *)
9425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9426 for as_dir in $PATH
9427 do
9428   IFS=$as_save_IFS
9429   test -z "$as_dir" && as_dir=.
9430   for ac_exec_ext in '' $ac_executable_extensions; do
9431   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9432     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
9433     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9434     break 2
9435   fi
9436 done
9437 done
9438
9439   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
9440   ;;
9441 esac
9442 fi
9443 PERLBIN=$ac_cv_path_PERLBIN
9444
9445 if test -n "$PERLBIN"; then
9446   echo "$as_me:$LINENO: result: $PERLBIN" >&5
9447 echo "${ECHO_T}$PERLBIN" >&6
9448 else
9449   echo "$as_me:$LINENO: result: no" >&5
9450 echo "${ECHO_T}no" >&6
9451 fi
9452
9453
9454         if test "no$PERLBIN" = "no" ; then
9455                 if test $ol_enable_perl = yes ; then
9456                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
9457 echo "$as_me: error: could not locate perl" >&2;}
9458    { (exit 1); exit 1; }; }
9459                 fi
9460
9461         else
9462                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
9463                 if test x"$ol_with_perl_module" = "xstatic" ; then
9464                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
9465                 else
9466                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
9467                 fi
9468                                 ol_link_perl=yes
9469         fi
9470 fi
9471
9472 ac_ext=c
9473 ac_cpp='$CPP $CPPFLAGS'
9474 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9475 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9476 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9477 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
9478 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
9479 # On Suns, sometimes $CPP names a directory.
9480 if test -n "$CPP" && test -d "$CPP"; then
9481   CPP=
9482 fi
9483 if test -z "$CPP"; then
9484   if test "${ac_cv_prog_CPP+set}" = set; then
9485   echo $ECHO_N "(cached) $ECHO_C" >&6
9486 else
9487       # Double quotes because CPP needs to be expanded
9488     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
9489     do
9490       ac_preproc_ok=false
9491 for ac_c_preproc_warn_flag in '' yes
9492 do
9493   # Use a header file that comes with gcc, so configuring glibc
9494   # with a fresh cross-compiler works.
9495   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9496   # <limits.h> exists even on freestanding compilers.
9497   # On the NeXT, cc -E runs the code through the compiler's parser,
9498   # not just through cpp. "Syntax error" is here to catch this case.
9499   cat >conftest.$ac_ext <<_ACEOF
9500 #line $LINENO "configure"
9501 /* confdefs.h.  */
9502 _ACEOF
9503 cat confdefs.h >>conftest.$ac_ext
9504 cat >>conftest.$ac_ext <<_ACEOF
9505 /* end confdefs.h.  */
9506 #ifdef __STDC__
9507 # include <limits.h>
9508 #else
9509 # include <assert.h>
9510 #endif
9511                      Syntax error
9512 _ACEOF
9513 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9514   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9515   ac_status=$?
9516   grep -v '^ *+' conftest.er1 >conftest.err
9517   rm -f conftest.er1
9518   cat conftest.err >&5
9519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9520   (exit $ac_status); } >/dev/null; then
9521   if test -s conftest.err; then
9522     ac_cpp_err=$ac_c_preproc_warn_flag
9523   else
9524     ac_cpp_err=
9525   fi
9526 else
9527   ac_cpp_err=yes
9528 fi
9529 if test -z "$ac_cpp_err"; then
9530   :
9531 else
9532   echo "$as_me: failed program was:" >&5
9533 sed 's/^/| /' conftest.$ac_ext >&5
9534
9535   # Broken: fails on valid input.
9536 continue
9537 fi
9538 rm -f conftest.err conftest.$ac_ext
9539
9540   # OK, works on sane cases.  Now check whether non-existent headers
9541   # can be detected and how.
9542   cat >conftest.$ac_ext <<_ACEOF
9543 #line $LINENO "configure"
9544 /* confdefs.h.  */
9545 _ACEOF
9546 cat confdefs.h >>conftest.$ac_ext
9547 cat >>conftest.$ac_ext <<_ACEOF
9548 /* end confdefs.h.  */
9549 #include <ac_nonexistent.h>
9550 _ACEOF
9551 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9552   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9553   ac_status=$?
9554   grep -v '^ *+' conftest.er1 >conftest.err
9555   rm -f conftest.er1
9556   cat conftest.err >&5
9557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9558   (exit $ac_status); } >/dev/null; then
9559   if test -s conftest.err; then
9560     ac_cpp_err=$ac_c_preproc_warn_flag
9561   else
9562     ac_cpp_err=
9563   fi
9564 else
9565   ac_cpp_err=yes
9566 fi
9567 if test -z "$ac_cpp_err"; then
9568   # Broken: success on invalid input.
9569 continue
9570 else
9571   echo "$as_me: failed program was:" >&5
9572 sed 's/^/| /' conftest.$ac_ext >&5
9573
9574   # Passes both tests.
9575 ac_preproc_ok=:
9576 break
9577 fi
9578 rm -f conftest.err conftest.$ac_ext
9579
9580 done
9581 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9582 rm -f conftest.err conftest.$ac_ext
9583 if $ac_preproc_ok; then
9584   break
9585 fi
9586
9587     done
9588     ac_cv_prog_CPP=$CPP
9589
9590 fi
9591   CPP=$ac_cv_prog_CPP
9592 else
9593   ac_cv_prog_CPP=$CPP
9594 fi
9595 echo "$as_me:$LINENO: result: $CPP" >&5
9596 echo "${ECHO_T}$CPP" >&6
9597 ac_preproc_ok=false
9598 for ac_c_preproc_warn_flag in '' yes
9599 do
9600   # Use a header file that comes with gcc, so configuring glibc
9601   # with a fresh cross-compiler works.
9602   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9603   # <limits.h> exists even on freestanding compilers.
9604   # On the NeXT, cc -E runs the code through the compiler's parser,
9605   # not just through cpp. "Syntax error" is here to catch this case.
9606   cat >conftest.$ac_ext <<_ACEOF
9607 #line $LINENO "configure"
9608 /* confdefs.h.  */
9609 _ACEOF
9610 cat confdefs.h >>conftest.$ac_ext
9611 cat >>conftest.$ac_ext <<_ACEOF
9612 /* end confdefs.h.  */
9613 #ifdef __STDC__
9614 # include <limits.h>
9615 #else
9616 # include <assert.h>
9617 #endif
9618                      Syntax error
9619 _ACEOF
9620 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9621   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9622   ac_status=$?
9623   grep -v '^ *+' conftest.er1 >conftest.err
9624   rm -f conftest.er1
9625   cat conftest.err >&5
9626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9627   (exit $ac_status); } >/dev/null; then
9628   if test -s conftest.err; then
9629     ac_cpp_err=$ac_c_preproc_warn_flag
9630   else
9631     ac_cpp_err=
9632   fi
9633 else
9634   ac_cpp_err=yes
9635 fi
9636 if test -z "$ac_cpp_err"; then
9637   :
9638 else
9639   echo "$as_me: failed program was:" >&5
9640 sed 's/^/| /' conftest.$ac_ext >&5
9641
9642   # Broken: fails on valid input.
9643 continue
9644 fi
9645 rm -f conftest.err conftest.$ac_ext
9646
9647   # OK, works on sane cases.  Now check whether non-existent headers
9648   # can be detected and how.
9649   cat >conftest.$ac_ext <<_ACEOF
9650 #line $LINENO "configure"
9651 /* confdefs.h.  */
9652 _ACEOF
9653 cat confdefs.h >>conftest.$ac_ext
9654 cat >>conftest.$ac_ext <<_ACEOF
9655 /* end confdefs.h.  */
9656 #include <ac_nonexistent.h>
9657 _ACEOF
9658 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9659   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9660   ac_status=$?
9661   grep -v '^ *+' conftest.er1 >conftest.err
9662   rm -f conftest.er1
9663   cat conftest.err >&5
9664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9665   (exit $ac_status); } >/dev/null; then
9666   if test -s conftest.err; then
9667     ac_cpp_err=$ac_c_preproc_warn_flag
9668   else
9669     ac_cpp_err=
9670   fi
9671 else
9672   ac_cpp_err=yes
9673 fi
9674 if test -z "$ac_cpp_err"; then
9675   # Broken: success on invalid input.
9676 continue
9677 else
9678   echo "$as_me: failed program was:" >&5
9679 sed 's/^/| /' conftest.$ac_ext >&5
9680
9681   # Passes both tests.
9682 ac_preproc_ok=:
9683 break
9684 fi
9685 rm -f conftest.err conftest.$ac_ext
9686
9687 done
9688 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9689 rm -f conftest.err conftest.$ac_ext
9690 if $ac_preproc_ok; then
9691   :
9692 else
9693   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
9694 See \`config.log' for more details." >&5
9695 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
9696 See \`config.log' for more details." >&2;}
9697    { (exit 1); exit 1; }; }
9698 fi
9699
9700 ac_ext=c
9701 ac_cpp='$CPP $CPPFLAGS'
9702 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9703 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9704 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9705
9706
9707 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
9708         { echo "$as_me:$LINENO: WARNING: cross compiling....  some functionality will be removed." >&5
9709 echo "$as_me: WARNING: cross compiling....  some functionality will be removed." >&2;}
9710
9711 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
9712         { echo "$as_me:$LINENO: WARNING: programs compiled here do run here..." >&5
9713 echo "$as_me: WARNING: programs compiled here do run here..." >&2;}
9714         { { echo "$as_me:$LINENO: error:   if not cross compiling, use --disable-x-compile." >&5
9715 echo "$as_me: error:   if not cross compiling, use --disable-x-compile." >&2;}
9716    { (exit 1); exit 1; }; }
9717
9718 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
9719         { echo "$as_me:$LINENO: WARNING: programs compiled here do not run here..." >&5
9720 echo "$as_me: WARNING: programs compiled here do not run here..." >&2;}
9721         { { echo "$as_me:$LINENO: error:   if cross compiling,  add --enable-x-compile." >&5
9722 echo "$as_me: error:   if cross compiling,  add --enable-x-compile." >&2;}
9723    { (exit 1); exit 1; }; }
9724 fi
9725
9726
9727
9728
9729 cat >>confdefs.h <<_ACEOF
9730 #define EXEEXT "${EXEEXT}"
9731 _ACEOF
9732
9733
9734 echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
9735 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
9736 if test "${ac_cv_lib_be_be_app+set}" = set; then
9737   echo $ECHO_N "(cached) $ECHO_C" >&6
9738 else
9739   ac_check_lib_save_LIBS=$LIBS
9740 LIBS="-lbe -lroot -lnet $LIBS"
9741 cat >conftest.$ac_ext <<_ACEOF
9742 #line $LINENO "configure"
9743 /* confdefs.h.  */
9744 _ACEOF
9745 cat confdefs.h >>conftest.$ac_ext
9746 cat >>conftest.$ac_ext <<_ACEOF
9747 /* end confdefs.h.  */
9748
9749 /* Override any gcc2 internal prototype to avoid an error.  */
9750 #ifdef __cplusplus
9751 extern "C"
9752 #endif
9753 /* We use char because int might match the return type of a gcc2
9754    builtin and then its argument prototype would still apply.  */
9755 char be_app ();
9756 int
9757 main ()
9758 {
9759 be_app ();
9760   ;
9761   return 0;
9762 }
9763 _ACEOF
9764 rm -f conftest.$ac_objext conftest$ac_exeext
9765 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9766   (eval $ac_link) 2>&5
9767   ac_status=$?
9768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9769   (exit $ac_status); } &&
9770          { ac_try='test -s conftest$ac_exeext'
9771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9772   (eval $ac_try) 2>&5
9773   ac_status=$?
9774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9775   (exit $ac_status); }; }; then
9776   ac_cv_lib_be_be_app=yes
9777 else
9778   echo "$as_me: failed program was:" >&5
9779 sed 's/^/| /' conftest.$ac_ext >&5
9780
9781 ac_cv_lib_be_be_app=no
9782 fi
9783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9784 LIBS=$ac_check_lib_save_LIBS
9785 fi
9786 echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
9787 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
9788 if test $ac_cv_lib_be_be_app = yes; then
9789   LIBS="$LIBS -lbe -lroot -lnet"
9790 else
9791   :
9792 fi
9793
9794
9795
9796
9797
9798 echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
9799 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
9800 if test "${am_cv_prog_cc_stdc+set}" = set; then
9801   echo $ECHO_N "(cached) $ECHO_C" >&6
9802 else
9803   am_cv_prog_cc_stdc=no
9804 ac_save_CC="$CC"
9805 # Don't try gcc -ansi; that turns off useful extensions and
9806 # breaks some systems' header files.
9807 # AIX                   -qlanglvl=ansi
9808 # Ultrix and OSF/1      -std1
9809 # HP-UX 10.20 and later -Ae
9810 # HP-UX older versions  -Aa -D_HPUX_SOURCE
9811 # SVR4                  -Xc -D__EXTENSIONS__
9812 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
9813 do
9814   CC="$ac_save_CC $ac_arg"
9815   cat >conftest.$ac_ext <<_ACEOF
9816 #line $LINENO "configure"
9817 /* confdefs.h.  */
9818 _ACEOF
9819 cat confdefs.h >>conftest.$ac_ext
9820 cat >>conftest.$ac_ext <<_ACEOF
9821 /* end confdefs.h.  */
9822 #include <stdarg.h>
9823 #include <stdio.h>
9824 #include <sys/types.h>
9825 #include <sys/stat.h>
9826 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
9827 struct buf { int x; };
9828 FILE * (*rcsopen) (struct buf *, struct stat *, int);
9829 static char *e (p, i)
9830      char **p;
9831      int i;
9832 {
9833   return p[i];
9834 }
9835 static char *f (char * (*g) (char **, int), char **p, ...)
9836 {
9837   char *s;
9838   va_list v;
9839   va_start (v,p);
9840   s = g (p, va_arg (v,int));
9841   va_end (v);
9842   return s;
9843 }
9844 int test (int i, double x);
9845 struct s1 {int (*f) (int a);};
9846 struct s2 {int (*f) (double a);};
9847 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9848 int argc;
9849 char **argv;
9850
9851 int
9852 main ()
9853 {
9854
9855 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
9856
9857   ;
9858   return 0;
9859 }
9860 _ACEOF
9861 rm -f conftest.$ac_objext
9862 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9863   (eval $ac_compile) 2>&5
9864   ac_status=$?
9865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866   (exit $ac_status); } &&
9867          { ac_try='test -s conftest.$ac_objext'
9868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9869   (eval $ac_try) 2>&5
9870   ac_status=$?
9871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872   (exit $ac_status); }; }; then
9873   am_cv_prog_cc_stdc="$ac_arg"; break
9874 else
9875   echo "$as_me: failed program was:" >&5
9876 sed 's/^/| /' conftest.$ac_ext >&5
9877
9878 fi
9879 rm -f conftest.$ac_objext conftest.$ac_ext
9880 done
9881 CC="$ac_save_CC"
9882
9883 fi
9884
9885 if test -z "$am_cv_prog_cc_stdc"; then
9886   echo "$as_me:$LINENO: result: none needed" >&5
9887 echo "${ECHO_T}none needed" >&6
9888 else
9889   echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
9890 echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
9891 fi
9892 case "x$am_cv_prog_cc_stdc" in
9893   x|xno) ;;
9894   *) CC="$CC $am_cv_prog_cc_stdc" ;;
9895 esac
9896
9897 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
9898         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
9899 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
9900    { (exit 1); exit 1; }; }
9901 fi
9902
9903 # test for make depend flag
9904 OL_MKDEP=
9905 OL_MKDEP_FLAGS=
9906 if test -z "${MKDEP}"; then
9907         OL_MKDEP="${CC-cc}"
9908         if test -z "${MKDEP_FLAGS}"; then
9909                 echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
9910 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
9911 if test "${ol_cv_mkdep+set}" = set; then
9912   echo $ECHO_N "(cached) $ECHO_C" >&6
9913 else
9914
9915                         ol_cv_mkdep=no
9916                         for flag in "-M" "-xM"; do
9917                                 cat > conftest.c <<EOF
9918  noCode;
9919 EOF
9920                                 if { ac_try='$OL_MKDEP $flag conftest.c'
9921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9922   (eval $ac_try) 2>&5
9923   ac_status=$?
9924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925   (exit $ac_status); }; } \
9926                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
9927                                 then
9928                                         if test ! -f conftest."${ac_object}" ; then
9929                                                 ol_cv_mkdep=$flag
9930                                                 OL_MKDEP_FLAGS="$flag"
9931                                                 break
9932                                         fi
9933                                 fi
9934                         done
9935                         rm -f conftest*
9936
9937 fi
9938 echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
9939 echo "${ECHO_T}$ol_cv_mkdep" >&6
9940         else
9941                 cc_cv_mkdep=yes
9942                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
9943         fi
9944 else
9945         cc_cv_mkdep=yes
9946         OL_MKDEP="${MKDEP}"
9947         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
9948 fi
9949
9950
9951
9952 if test "${ol_cv_mkdep}" = no ; then
9953         # this will soon become an error
9954         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
9955 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
9956 fi
9957
9958 echo "$as_me:$LINENO: checking for afopen in -ls" >&5
9959 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
9960 if test "${ac_cv_lib_s_afopen+set}" = set; then
9961   echo $ECHO_N "(cached) $ECHO_C" >&6
9962 else
9963   ac_check_lib_save_LIBS=$LIBS
9964 LIBS="-ls  $LIBS"
9965 cat >conftest.$ac_ext <<_ACEOF
9966 #line $LINENO "configure"
9967 /* confdefs.h.  */
9968 _ACEOF
9969 cat confdefs.h >>conftest.$ac_ext
9970 cat >>conftest.$ac_ext <<_ACEOF
9971 /* end confdefs.h.  */
9972
9973 /* Override any gcc2 internal prototype to avoid an error.  */
9974 #ifdef __cplusplus
9975 extern "C"
9976 #endif
9977 /* We use char because int might match the return type of a gcc2
9978    builtin and then its argument prototype would still apply.  */
9979 char afopen ();
9980 int
9981 main ()
9982 {
9983 afopen ();
9984   ;
9985   return 0;
9986 }
9987 _ACEOF
9988 rm -f conftest.$ac_objext conftest$ac_exeext
9989 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9990   (eval $ac_link) 2>&5
9991   ac_status=$?
9992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993   (exit $ac_status); } &&
9994          { ac_try='test -s conftest$ac_exeext'
9995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9996   (eval $ac_try) 2>&5
9997   ac_status=$?
9998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9999   (exit $ac_status); }; }; then
10000   ac_cv_lib_s_afopen=yes
10001 else
10002   echo "$as_me: failed program was:" >&5
10003 sed 's/^/| /' conftest.$ac_ext >&5
10004
10005 ac_cv_lib_s_afopen=no
10006 fi
10007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10008 LIBS=$ac_check_lib_save_LIBS
10009 fi
10010 echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
10011 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
10012 if test $ac_cv_lib_s_afopen = yes; then
10013
10014         AUTH_LIBS=-ls
10015
10016 cat >>confdefs.h <<\_ACEOF
10017 #define HAVE_AIX_SECURITY 1
10018 _ACEOF
10019
10020
10021 fi
10022
10023
10024 case "$target" in
10025 *-ibm-openedition)
10026         ac_cv_func_getopt=no
10027
10028 cat >>confdefs.h <<\_ACEOF
10029 #define BOTH_STRINGS_H 1
10030 _ACEOF
10031
10032         ;;
10033 esac
10034
10035 ol_link_modules=no
10036 if test $ol_enable_modules != no ; then
10037
10038 for ac_header in ltdl.h
10039 do
10040 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10041 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10042   echo "$as_me:$LINENO: checking for $ac_header" >&5
10043 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10044 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10045   echo $ECHO_N "(cached) $ECHO_C" >&6
10046 fi
10047 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10048 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10049 else
10050   # Is the header compilable?
10051 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10052 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10053 cat >conftest.$ac_ext <<_ACEOF
10054 #line $LINENO "configure"
10055 /* confdefs.h.  */
10056 _ACEOF
10057 cat confdefs.h >>conftest.$ac_ext
10058 cat >>conftest.$ac_ext <<_ACEOF
10059 /* end confdefs.h.  */
10060 $ac_includes_default
10061 #include <$ac_header>
10062 _ACEOF
10063 rm -f conftest.$ac_objext
10064 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10065   (eval $ac_compile) 2>&5
10066   ac_status=$?
10067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068   (exit $ac_status); } &&
10069          { ac_try='test -s conftest.$ac_objext'
10070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10071   (eval $ac_try) 2>&5
10072   ac_status=$?
10073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10074   (exit $ac_status); }; }; then
10075   ac_header_compiler=yes
10076 else
10077   echo "$as_me: failed program was:" >&5
10078 sed 's/^/| /' conftest.$ac_ext >&5
10079
10080 ac_header_compiler=no
10081 fi
10082 rm -f conftest.$ac_objext conftest.$ac_ext
10083 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10084 echo "${ECHO_T}$ac_header_compiler" >&6
10085
10086 # Is the header present?
10087 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10088 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10089 cat >conftest.$ac_ext <<_ACEOF
10090 #line $LINENO "configure"
10091 /* confdefs.h.  */
10092 _ACEOF
10093 cat confdefs.h >>conftest.$ac_ext
10094 cat >>conftest.$ac_ext <<_ACEOF
10095 /* end confdefs.h.  */
10096 #include <$ac_header>
10097 _ACEOF
10098 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10099   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10100   ac_status=$?
10101   grep -v '^ *+' conftest.er1 >conftest.err
10102   rm -f conftest.er1
10103   cat conftest.err >&5
10104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10105   (exit $ac_status); } >/dev/null; then
10106   if test -s conftest.err; then
10107     ac_cpp_err=$ac_c_preproc_warn_flag
10108   else
10109     ac_cpp_err=
10110   fi
10111 else
10112   ac_cpp_err=yes
10113 fi
10114 if test -z "$ac_cpp_err"; then
10115   ac_header_preproc=yes
10116 else
10117   echo "$as_me: failed program was:" >&5
10118 sed 's/^/| /' conftest.$ac_ext >&5
10119
10120   ac_header_preproc=no
10121 fi
10122 rm -f conftest.err conftest.$ac_ext
10123 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10124 echo "${ECHO_T}$ac_header_preproc" >&6
10125
10126 # So?  What about this header?
10127 case $ac_header_compiler:$ac_header_preproc in
10128   yes:no )
10129     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10130 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10131     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10132 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10133     (
10134       cat <<\_ASBOX
10135 ## ------------------------------------ ##
10136 ## Report this to bug-autoconf@gnu.org. ##
10137 ## ------------------------------------ ##
10138 _ASBOX
10139     ) |
10140       sed "s/^/$as_me: WARNING:     /" >&2
10141     ;;
10142   no:yes )
10143     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10144 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10145     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10146 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10147     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10148 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10149     (
10150       cat <<\_ASBOX
10151 ## ------------------------------------ ##
10152 ## Report this to bug-autoconf@gnu.org. ##
10153 ## ------------------------------------ ##
10154 _ASBOX
10155     ) |
10156       sed "s/^/$as_me: WARNING:     /" >&2
10157     ;;
10158 esac
10159 echo "$as_me:$LINENO: checking for $ac_header" >&5
10160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10162   echo $ECHO_N "(cached) $ECHO_C" >&6
10163 else
10164   eval "$as_ac_Header=$ac_header_preproc"
10165 fi
10166 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10167 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10168
10169 fi
10170 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10171   cat >>confdefs.h <<_ACEOF
10172 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10173 _ACEOF
10174
10175 fi
10176
10177 done
10178
10179
10180         if test $ac_cv_header_ltdl_h = no ; then
10181                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
10182 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
10183    { (exit 1); exit 1; }; }
10184         fi
10185
10186         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
10187 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
10188 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
10189   echo $ECHO_N "(cached) $ECHO_C" >&6
10190 else
10191   ac_check_lib_save_LIBS=$LIBS
10192 LIBS="-lltdl  $LIBS"
10193 cat >conftest.$ac_ext <<_ACEOF
10194 #line $LINENO "configure"
10195 /* confdefs.h.  */
10196 _ACEOF
10197 cat confdefs.h >>conftest.$ac_ext
10198 cat >>conftest.$ac_ext <<_ACEOF
10199 /* end confdefs.h.  */
10200
10201 /* Override any gcc2 internal prototype to avoid an error.  */
10202 #ifdef __cplusplus
10203 extern "C"
10204 #endif
10205 /* We use char because int might match the return type of a gcc2
10206    builtin and then its argument prototype would still apply.  */
10207 char lt_dlinit ();
10208 int
10209 main ()
10210 {
10211 lt_dlinit ();
10212   ;
10213   return 0;
10214 }
10215 _ACEOF
10216 rm -f conftest.$ac_objext conftest$ac_exeext
10217 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10218   (eval $ac_link) 2>&5
10219   ac_status=$?
10220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221   (exit $ac_status); } &&
10222          { ac_try='test -s conftest$ac_exeext'
10223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10224   (eval $ac_try) 2>&5
10225   ac_status=$?
10226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10227   (exit $ac_status); }; }; then
10228   ac_cv_lib_ltdl_lt_dlinit=yes
10229 else
10230   echo "$as_me: failed program was:" >&5
10231 sed 's/^/| /' conftest.$ac_ext >&5
10232
10233 ac_cv_lib_ltdl_lt_dlinit=no
10234 fi
10235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10236 LIBS=$ac_check_lib_save_LIBS
10237 fi
10238 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
10239 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
10240 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
10241
10242                 MODULES_LIBS=-lltdl
10243
10244 cat >>confdefs.h <<\_ACEOF
10245 #define HAVE_LIBLTDL 1
10246 _ACEOF
10247
10248
10249 fi
10250
10251
10252         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
10253                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
10254 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
10255    { (exit 1); exit 1; }; }
10256         fi
10257         ol_link_modules=yes
10258 else
10259         ol_with_bdb_module=static
10260         ol_with_dnssrv_module=static
10261         ol_with_ldap_module=static
10262         ol_with_ldbm_module=static
10263         ol_with_meta_module=static
10264         ol_with_monitor_module=static
10265         ol_with_null_module=static
10266         ol_with_passwd_module=static
10267         ol_with_perl_module=static
10268         ol_with_shell_module=static
10269         ol_with_tcl_module=static
10270         ol_with_sql_module=static
10271 fi
10272
10273 # test for EBCDIC
10274 echo "$as_me:$LINENO: checking for EBCDIC" >&5
10275 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
10276 if test "${ol_cv_cpp_ebcdic+set}" = set; then
10277   echo $ECHO_N "(cached) $ECHO_C" >&6
10278 else
10279
10280         cat >conftest.$ac_ext <<_ACEOF
10281 #line $LINENO "configure"
10282 /* confdefs.h.  */
10283 _ACEOF
10284 cat confdefs.h >>conftest.$ac_ext
10285 cat >>conftest.$ac_ext <<_ACEOF
10286 /* end confdefs.h.  */
10287
10288 #if !('M' == 0xd4)
10289 #include <__ASCII__/generate_error.h>
10290 #endif
10291
10292 _ACEOF
10293 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10295   ac_status=$?
10296   grep -v '^ *+' conftest.er1 >conftest.err
10297   rm -f conftest.er1
10298   cat conftest.err >&5
10299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10300   (exit $ac_status); } >/dev/null; then
10301   if test -s conftest.err; then
10302     ac_cpp_err=$ac_c_preproc_warn_flag
10303   else
10304     ac_cpp_err=
10305   fi
10306 else
10307   ac_cpp_err=yes
10308 fi
10309 if test -z "$ac_cpp_err"; then
10310   ol_cv_cpp_ebcdic=yes
10311 else
10312   echo "$as_me: failed program was:" >&5
10313 sed 's/^/| /' conftest.$ac_ext >&5
10314
10315   ol_cv_cpp_ebcdic=no
10316 fi
10317 rm -f conftest.err conftest.$ac_ext
10318 fi
10319 echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
10320 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
10321 if test $ol_cv_cpp_ebcdic = yes ; then
10322
10323 cat >>confdefs.h <<\_ACEOF
10324 #define HAVE_EBCDIC 1
10325 _ACEOF
10326
10327 fi
10328
10329 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
10330 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10331 if test "${ol_cv_header_stdc+set}" = set; then
10332   echo $ECHO_N "(cached) $ECHO_C" >&6
10333 else
10334   cat >conftest.$ac_ext <<_ACEOF
10335 #line $LINENO "configure"
10336 /* confdefs.h.  */
10337 _ACEOF
10338 cat confdefs.h >>conftest.$ac_ext
10339 cat >>conftest.$ac_ext <<_ACEOF
10340 /* end confdefs.h.  */
10341 #include <stdlib.h>
10342 #include <stdarg.h>
10343 #include <string.h>
10344 #include <float.h>
10345 _ACEOF
10346 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10347   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10348   ac_status=$?
10349   grep -v '^ *+' conftest.er1 >conftest.err
10350   rm -f conftest.er1
10351   cat conftest.err >&5
10352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353   (exit $ac_status); } >/dev/null; then
10354   if test -s conftest.err; then
10355     ac_cpp_err=$ac_c_preproc_warn_flag
10356   else
10357     ac_cpp_err=
10358   fi
10359 else
10360   ac_cpp_err=yes
10361 fi
10362 if test -z "$ac_cpp_err"; then
10363   ol_cv_header_stdc=yes
10364 else
10365   echo "$as_me: failed program was:" >&5
10366 sed 's/^/| /' conftest.$ac_ext >&5
10367
10368   ol_cv_header_stdc=no
10369 fi
10370 rm -f conftest.err conftest.$ac_ext
10371
10372 if test $ol_cv_header_stdc = yes; then
10373   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10374 cat >conftest.$ac_ext <<_ACEOF
10375 #line $LINENO "configure"
10376 /* confdefs.h.  */
10377 _ACEOF
10378 cat confdefs.h >>conftest.$ac_ext
10379 cat >>conftest.$ac_ext <<_ACEOF
10380 /* end confdefs.h.  */
10381 #include <string.h>
10382
10383 _ACEOF
10384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10385   $EGREP "memchr" >/dev/null 2>&1; then
10386   :
10387 else
10388   ol_cv_header_stdc=no
10389 fi
10390 rm -f conftest*
10391
10392 fi
10393
10394 if test $ol_cv_header_stdc = yes; then
10395   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10396 cat >conftest.$ac_ext <<_ACEOF
10397 #line $LINENO "configure"
10398 /* confdefs.h.  */
10399 _ACEOF
10400 cat confdefs.h >>conftest.$ac_ext
10401 cat >>conftest.$ac_ext <<_ACEOF
10402 /* end confdefs.h.  */
10403 #include <stdlib.h>
10404
10405 _ACEOF
10406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10407   $EGREP "free" >/dev/null 2>&1; then
10408   :
10409 else
10410   ol_cv_header_stdc=no
10411 fi
10412 rm -f conftest*
10413
10414 fi
10415
10416 if test $ol_cv_header_stdc = yes; then
10417   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10418 if test "$cross_compiling" = yes; then
10419   :
10420 else
10421   cat >conftest.$ac_ext <<_ACEOF
10422 #line $LINENO "configure"
10423 /* confdefs.h.  */
10424 _ACEOF
10425 cat confdefs.h >>conftest.$ac_ext
10426 cat >>conftest.$ac_ext <<_ACEOF
10427 /* end confdefs.h.  */
10428 #include <ctype.h>
10429 #ifndef HAVE_EBCDIC
10430 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10431 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10432 #else
10433 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10434                 || ('j' <= (c) && (c) <= 'r') \
10435                 || ('s' <= (c) && (c) <= 'z'))
10436 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
10437 #endif
10438 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10439 int main () { int i; for (i = 0; i < 256; i++)
10440 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
10441 exit (0); }
10442
10443 _ACEOF
10444 rm -f conftest$ac_exeext
10445 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10446   (eval $ac_link) 2>&5
10447   ac_status=$?
10448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10451   (eval $ac_try) 2>&5
10452   ac_status=$?
10453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10454   (exit $ac_status); }; }; then
10455   :
10456 else
10457   echo "$as_me: program exited with status $ac_status" >&5
10458 echo "$as_me: failed program was:" >&5
10459 sed 's/^/| /' conftest.$ac_ext >&5
10460
10461 ( exit $ac_status )
10462 ol_cv_header_stdc=no
10463 fi
10464 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10465 fi
10466 fi
10467 fi
10468 echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
10469 echo "${ECHO_T}$ol_cv_header_stdc" >&6
10470 if test $ol_cv_header_stdc = yes; then
10471   cat >>confdefs.h <<\_ACEOF
10472 #define STDC_HEADERS 1
10473 _ACEOF
10474
10475 fi
10476 ac_cv_header_stdc=disable
10477
10478
10479 if test $ol_cv_header_stdc != yes; then
10480         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
10481 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
10482 fi
10483
10484
10485
10486
10487
10488
10489 ac_header_dirent=no
10490 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10491   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10492 echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
10493 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10494 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10495   echo $ECHO_N "(cached) $ECHO_C" >&6
10496 else
10497   cat >conftest.$ac_ext <<_ACEOF
10498 #line $LINENO "configure"
10499 /* confdefs.h.  */
10500 _ACEOF
10501 cat confdefs.h >>conftest.$ac_ext
10502 cat >>conftest.$ac_ext <<_ACEOF
10503 /* end confdefs.h.  */
10504 #include <sys/types.h>
10505 #include <$ac_hdr>
10506
10507 int
10508 main ()
10509 {
10510 if ((DIR *) 0)
10511 return 0;
10512   ;
10513   return 0;
10514 }
10515 _ACEOF
10516 rm -f conftest.$ac_objext
10517 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10518   (eval $ac_compile) 2>&5
10519   ac_status=$?
10520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10521   (exit $ac_status); } &&
10522          { ac_try='test -s conftest.$ac_objext'
10523   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10524   (eval $ac_try) 2>&5
10525   ac_status=$?
10526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527   (exit $ac_status); }; }; then
10528   eval "$as_ac_Header=yes"
10529 else
10530   echo "$as_me: failed program was:" >&5
10531 sed 's/^/| /' conftest.$ac_ext >&5
10532
10533 eval "$as_ac_Header=no"
10534 fi
10535 rm -f conftest.$ac_objext conftest.$ac_ext
10536 fi
10537 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10538 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10539 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10540   cat >>confdefs.h <<_ACEOF
10541 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10542 _ACEOF
10543
10544 ac_header_dirent=$ac_hdr; break
10545 fi
10546
10547 done
10548 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10549 if test $ac_header_dirent = dirent.h; then
10550   echo "$as_me:$LINENO: checking for library containing opendir" >&5
10551 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10552 if test "${ac_cv_search_opendir+set}" = set; then
10553   echo $ECHO_N "(cached) $ECHO_C" >&6
10554 else
10555   ac_func_search_save_LIBS=$LIBS
10556 ac_cv_search_opendir=no
10557 cat >conftest.$ac_ext <<_ACEOF
10558 #line $LINENO "configure"
10559 /* confdefs.h.  */
10560 _ACEOF
10561 cat confdefs.h >>conftest.$ac_ext
10562 cat >>conftest.$ac_ext <<_ACEOF
10563 /* end confdefs.h.  */
10564
10565 /* Override any gcc2 internal prototype to avoid an error.  */
10566 #ifdef __cplusplus
10567 extern "C"
10568 #endif
10569 /* We use char because int might match the return type of a gcc2
10570    builtin and then its argument prototype would still apply.  */
10571 char opendir ();
10572 int
10573 main ()
10574 {
10575 opendir ();
10576   ;
10577   return 0;
10578 }
10579 _ACEOF
10580 rm -f conftest.$ac_objext conftest$ac_exeext
10581 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10582   (eval $ac_link) 2>&5
10583   ac_status=$?
10584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10585   (exit $ac_status); } &&
10586          { ac_try='test -s conftest$ac_exeext'
10587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10588   (eval $ac_try) 2>&5
10589   ac_status=$?
10590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591   (exit $ac_status); }; }; then
10592   ac_cv_search_opendir="none required"
10593 else
10594   echo "$as_me: failed program was:" >&5
10595 sed 's/^/| /' conftest.$ac_ext >&5
10596
10597 fi
10598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10599 if test "$ac_cv_search_opendir" = no; then
10600   for ac_lib in dir; do
10601     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10602     cat >conftest.$ac_ext <<_ACEOF
10603 #line $LINENO "configure"
10604 /* confdefs.h.  */
10605 _ACEOF
10606 cat confdefs.h >>conftest.$ac_ext
10607 cat >>conftest.$ac_ext <<_ACEOF
10608 /* end confdefs.h.  */
10609
10610 /* Override any gcc2 internal prototype to avoid an error.  */
10611 #ifdef __cplusplus
10612 extern "C"
10613 #endif
10614 /* We use char because int might match the return type of a gcc2
10615    builtin and then its argument prototype would still apply.  */
10616 char opendir ();
10617 int
10618 main ()
10619 {
10620 opendir ();
10621   ;
10622   return 0;
10623 }
10624 _ACEOF
10625 rm -f conftest.$ac_objext conftest$ac_exeext
10626 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10627   (eval $ac_link) 2>&5
10628   ac_status=$?
10629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10630   (exit $ac_status); } &&
10631          { ac_try='test -s conftest$ac_exeext'
10632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10633   (eval $ac_try) 2>&5
10634   ac_status=$?
10635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636   (exit $ac_status); }; }; then
10637   ac_cv_search_opendir="-l$ac_lib"
10638 break
10639 else
10640   echo "$as_me: failed program was:" >&5
10641 sed 's/^/| /' conftest.$ac_ext >&5
10642
10643 fi
10644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10645   done
10646 fi
10647 LIBS=$ac_func_search_save_LIBS
10648 fi
10649 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10650 echo "${ECHO_T}$ac_cv_search_opendir" >&6
10651 if test "$ac_cv_search_opendir" != no; then
10652   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10653
10654 fi
10655
10656 else
10657   echo "$as_me:$LINENO: checking for library containing opendir" >&5
10658 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
10659 if test "${ac_cv_search_opendir+set}" = set; then
10660   echo $ECHO_N "(cached) $ECHO_C" >&6
10661 else
10662   ac_func_search_save_LIBS=$LIBS
10663 ac_cv_search_opendir=no
10664 cat >conftest.$ac_ext <<_ACEOF
10665 #line $LINENO "configure"
10666 /* confdefs.h.  */
10667 _ACEOF
10668 cat confdefs.h >>conftest.$ac_ext
10669 cat >>conftest.$ac_ext <<_ACEOF
10670 /* end confdefs.h.  */
10671
10672 /* Override any gcc2 internal prototype to avoid an error.  */
10673 #ifdef __cplusplus
10674 extern "C"
10675 #endif
10676 /* We use char because int might match the return type of a gcc2
10677    builtin and then its argument prototype would still apply.  */
10678 char opendir ();
10679 int
10680 main ()
10681 {
10682 opendir ();
10683   ;
10684   return 0;
10685 }
10686 _ACEOF
10687 rm -f conftest.$ac_objext conftest$ac_exeext
10688 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10689   (eval $ac_link) 2>&5
10690   ac_status=$?
10691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10692   (exit $ac_status); } &&
10693          { ac_try='test -s conftest$ac_exeext'
10694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10695   (eval $ac_try) 2>&5
10696   ac_status=$?
10697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698   (exit $ac_status); }; }; then
10699   ac_cv_search_opendir="none required"
10700 else
10701   echo "$as_me: failed program was:" >&5
10702 sed 's/^/| /' conftest.$ac_ext >&5
10703
10704 fi
10705 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10706 if test "$ac_cv_search_opendir" = no; then
10707   for ac_lib in x; do
10708     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10709     cat >conftest.$ac_ext <<_ACEOF
10710 #line $LINENO "configure"
10711 /* confdefs.h.  */
10712 _ACEOF
10713 cat confdefs.h >>conftest.$ac_ext
10714 cat >>conftest.$ac_ext <<_ACEOF
10715 /* end confdefs.h.  */
10716
10717 /* Override any gcc2 internal prototype to avoid an error.  */
10718 #ifdef __cplusplus
10719 extern "C"
10720 #endif
10721 /* We use char because int might match the return type of a gcc2
10722    builtin and then its argument prototype would still apply.  */
10723 char opendir ();
10724 int
10725 main ()
10726 {
10727 opendir ();
10728   ;
10729   return 0;
10730 }
10731 _ACEOF
10732 rm -f conftest.$ac_objext conftest$ac_exeext
10733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10734   (eval $ac_link) 2>&5
10735   ac_status=$?
10736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737   (exit $ac_status); } &&
10738          { ac_try='test -s conftest$ac_exeext'
10739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10740   (eval $ac_try) 2>&5
10741   ac_status=$?
10742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10743   (exit $ac_status); }; }; then
10744   ac_cv_search_opendir="-l$ac_lib"
10745 break
10746 else
10747   echo "$as_me: failed program was:" >&5
10748 sed 's/^/| /' conftest.$ac_ext >&5
10749
10750 fi
10751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10752   done
10753 fi
10754 LIBS=$ac_func_search_save_LIBS
10755 fi
10756 echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
10757 echo "${ECHO_T}$ac_cv_search_opendir" >&6
10758 if test "$ac_cv_search_opendir" != no; then
10759   test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
10760
10761 fi
10762
10763 fi
10764
10765 echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
10766 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
10767 if test "${ac_cv_header_sys_wait_h+set}" = set; then
10768   echo $ECHO_N "(cached) $ECHO_C" >&6
10769 else
10770   cat >conftest.$ac_ext <<_ACEOF
10771 #line $LINENO "configure"
10772 /* confdefs.h.  */
10773 _ACEOF
10774 cat confdefs.h >>conftest.$ac_ext
10775 cat >>conftest.$ac_ext <<_ACEOF
10776 /* end confdefs.h.  */
10777 #include <sys/types.h>
10778 #include <sys/wait.h>
10779 #ifndef WEXITSTATUS
10780 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10781 #endif
10782 #ifndef WIFEXITED
10783 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10784 #endif
10785
10786 int
10787 main ()
10788 {
10789   int s;
10790   wait (&s);
10791   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10792   ;
10793   return 0;
10794 }
10795 _ACEOF
10796 rm -f conftest.$ac_objext
10797 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10798   (eval $ac_compile) 2>&5
10799   ac_status=$?
10800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801   (exit $ac_status); } &&
10802          { ac_try='test -s conftest.$ac_objext'
10803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10804   (eval $ac_try) 2>&5
10805   ac_status=$?
10806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10807   (exit $ac_status); }; }; then
10808   ac_cv_header_sys_wait_h=yes
10809 else
10810   echo "$as_me: failed program was:" >&5
10811 sed 's/^/| /' conftest.$ac_ext >&5
10812
10813 ac_cv_header_sys_wait_h=no
10814 fi
10815 rm -f conftest.$ac_objext conftest.$ac_ext
10816 fi
10817 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
10818 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
10819 if test $ac_cv_header_sys_wait_h = yes; then
10820
10821 cat >>confdefs.h <<\_ACEOF
10822 #define HAVE_SYS_WAIT_H 1
10823 _ACEOF
10824
10825 fi
10826
10827 echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
10828 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
10829 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
10830   echo $ECHO_N "(cached) $ECHO_C" >&6
10831 else
10832   cat >conftest.$ac_ext <<_ACEOF
10833 #line $LINENO "configure"
10834 /* confdefs.h.  */
10835 _ACEOF
10836 cat confdefs.h >>conftest.$ac_ext
10837 cat >>conftest.$ac_ext <<_ACEOF
10838 /* end confdefs.h.  */
10839 #include <sys/types.h>
10840 #include <termios.h>
10841 #ifdef TIOCGWINSZ
10842   yes
10843 #endif
10844
10845 _ACEOF
10846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10847   $EGREP "yes" >/dev/null 2>&1; then
10848   ac_cv_sys_tiocgwinsz_in_termios_h=yes
10849 else
10850   ac_cv_sys_tiocgwinsz_in_termios_h=no
10851 fi
10852 rm -f conftest*
10853
10854 fi
10855 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
10856 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
10857
10858 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
10859   echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
10860 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
10861 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
10862   echo $ECHO_N "(cached) $ECHO_C" >&6
10863 else
10864   cat >conftest.$ac_ext <<_ACEOF
10865 #line $LINENO "configure"
10866 /* confdefs.h.  */
10867 _ACEOF
10868 cat confdefs.h >>conftest.$ac_ext
10869 cat >>conftest.$ac_ext <<_ACEOF
10870 /* end confdefs.h.  */
10871 #include <sys/types.h>
10872 #include <sys/ioctl.h>
10873 #ifdef TIOCGWINSZ
10874   yes
10875 #endif
10876
10877 _ACEOF
10878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10879   $EGREP "yes" >/dev/null 2>&1; then
10880   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
10881 else
10882   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
10883 fi
10884 rm -f conftest*
10885
10886 fi
10887 echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
10888 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
10889
10890   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
10891
10892 cat >>confdefs.h <<\_ACEOF
10893 #define GWINSZ_IN_SYS_IOCTL 1
10894 _ACEOF
10895
10896   fi
10897 fi
10898
10899 if test $am_cv_sys_posix_termios = yes ; then
10900
10901 cat >>confdefs.h <<\_ACEOF
10902 #define HAVE_POSIX_TERMIOS 1
10903 _ACEOF
10904
10905 fi
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952 for ac_header in \
10953         arpa/inet.h             \
10954         arpa/nameser.h  \
10955         assert.h                \
10956         conio.h                 \
10957         crypt.h                 \
10958         direct.h                \
10959         errno.h                 \
10960         fcntl.h                 \
10961         filio.h                 \
10962         getopt.h                \
10963         grp.h                   \
10964         io.h                    \
10965         libutil.h               \
10966         limits.h                \
10967         locale.h                \
10968         netinet/tcp.h   \
10969         malloc.h                \
10970         memory.h                \
10971         psap.h                  \
10972         pwd.h                   \
10973         process.h               \
10974         sgtty.h                 \
10975         shadow.h                \
10976         stddef.h                \
10977         string.h                \
10978         strings.h               \
10979         sysexits.h              \
10980         sys/file.h              \
10981         sys/filio.h             \
10982         sys/errno.h             \
10983         sys/ioctl.h             \
10984         sys/param.h             \
10985         sys/resource.h  \
10986         sys/select.h    \
10987         sys/socket.h    \
10988         sys/stat.h              \
10989         sys/syslog.h    \
10990         sys/time.h              \
10991         sys/types.h             \
10992         sys/uio.h               \
10993         syslog.h                \
10994         termios.h               \
10995         unistd.h                \
10996         winsock.h               \
10997         winsock2.h              \
10998
10999 do
11000 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11001 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11002   echo "$as_me:$LINENO: checking for $ac_header" >&5
11003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11005   echo $ECHO_N "(cached) $ECHO_C" >&6
11006 fi
11007 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11008 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11009 else
11010   # Is the header compilable?
11011 echo "$as_me:$LINENO: checking $ac_header usability" >&5
11012 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11013 cat >conftest.$ac_ext <<_ACEOF
11014 #line $LINENO "configure"
11015 /* confdefs.h.  */
11016 _ACEOF
11017 cat confdefs.h >>conftest.$ac_ext
11018 cat >>conftest.$ac_ext <<_ACEOF
11019 /* end confdefs.h.  */
11020 $ac_includes_default
11021 #include <$ac_header>
11022 _ACEOF
11023 rm -f conftest.$ac_objext
11024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11025   (eval $ac_compile) 2>&5
11026   ac_status=$?
11027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11028   (exit $ac_status); } &&
11029          { ac_try='test -s conftest.$ac_objext'
11030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11031   (eval $ac_try) 2>&5
11032   ac_status=$?
11033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11034   (exit $ac_status); }; }; then
11035   ac_header_compiler=yes
11036 else
11037   echo "$as_me: failed program was:" >&5
11038 sed 's/^/| /' conftest.$ac_ext >&5
11039
11040 ac_header_compiler=no
11041 fi
11042 rm -f conftest.$ac_objext conftest.$ac_ext
11043 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11044 echo "${ECHO_T}$ac_header_compiler" >&6
11045
11046 # Is the header present?
11047 echo "$as_me:$LINENO: checking $ac_header presence" >&5
11048 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11049 cat >conftest.$ac_ext <<_ACEOF
11050 #line $LINENO "configure"
11051 /* confdefs.h.  */
11052 _ACEOF
11053 cat confdefs.h >>conftest.$ac_ext
11054 cat >>conftest.$ac_ext <<_ACEOF
11055 /* end confdefs.h.  */
11056 #include <$ac_header>
11057 _ACEOF
11058 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11060   ac_status=$?
11061   grep -v '^ *+' conftest.er1 >conftest.err
11062   rm -f conftest.er1
11063   cat conftest.err >&5
11064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065   (exit $ac_status); } >/dev/null; then
11066   if test -s conftest.err; then
11067     ac_cpp_err=$ac_c_preproc_warn_flag
11068   else
11069     ac_cpp_err=
11070   fi
11071 else
11072   ac_cpp_err=yes
11073 fi
11074 if test -z "$ac_cpp_err"; then
11075   ac_header_preproc=yes
11076 else
11077   echo "$as_me: failed program was:" >&5
11078 sed 's/^/| /' conftest.$ac_ext >&5
11079
11080   ac_header_preproc=no
11081 fi
11082 rm -f conftest.err conftest.$ac_ext
11083 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11084 echo "${ECHO_T}$ac_header_preproc" >&6
11085
11086 # So?  What about this header?
11087 case $ac_header_compiler:$ac_header_preproc in
11088   yes:no )
11089     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11090 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11091     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11092 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11093     (
11094       cat <<\_ASBOX
11095 ## ------------------------------------ ##
11096 ## Report this to bug-autoconf@gnu.org. ##
11097 ## ------------------------------------ ##
11098 _ASBOX
11099     ) |
11100       sed "s/^/$as_me: WARNING:     /" >&2
11101     ;;
11102   no:yes )
11103     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11104 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11105     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11106 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11107     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11108 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11109     (
11110       cat <<\_ASBOX
11111 ## ------------------------------------ ##
11112 ## Report this to bug-autoconf@gnu.org. ##
11113 ## ------------------------------------ ##
11114 _ASBOX
11115     ) |
11116       sed "s/^/$as_me: WARNING:     /" >&2
11117     ;;
11118 esac
11119 echo "$as_me:$LINENO: checking for $ac_header" >&5
11120 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11122   echo $ECHO_N "(cached) $ECHO_C" >&6
11123 else
11124   eval "$as_ac_Header=$ac_header_preproc"
11125 fi
11126 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11127 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11128
11129 fi
11130 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11131   cat >>confdefs.h <<_ACEOF
11132 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11133 _ACEOF
11134
11135 fi
11136
11137 done
11138
11139
11140
11141 for ac_header in sys/ucred.h
11142 do
11143 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11144 echo "$as_me:$LINENO: checking for $ac_header" >&5
11145 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11146 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11147   echo $ECHO_N "(cached) $ECHO_C" >&6
11148 else
11149   cat >conftest.$ac_ext <<_ACEOF
11150 #line $LINENO "configure"
11151 /* confdefs.h.  */
11152 _ACEOF
11153 cat confdefs.h >>conftest.$ac_ext
11154 cat >>conftest.$ac_ext <<_ACEOF
11155 /* end confdefs.h.  */
11156 #include <sys/types.h>
11157
11158 #include <$ac_header>
11159 _ACEOF
11160 rm -f conftest.$ac_objext
11161 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11162   (eval $ac_compile) 2>&5
11163   ac_status=$?
11164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11165   (exit $ac_status); } &&
11166          { ac_try='test -s conftest.$ac_objext'
11167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172   eval "$as_ac_Header=yes"
11173 else
11174   echo "$as_me: failed program was:" >&5
11175 sed 's/^/| /' conftest.$ac_ext >&5
11176
11177 eval "$as_ac_Header=no"
11178 fi
11179 rm -f conftest.$ac_objext conftest.$ac_ext
11180 fi
11181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11183 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11184   cat >>confdefs.h <<_ACEOF
11185 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11186 _ACEOF
11187
11188 fi
11189
11190 done
11191
11192
11193 for ac_header in resolv.h
11194 do
11195 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11196 echo "$as_me:$LINENO: checking for $ac_header" >&5
11197 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11198 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11199   echo $ECHO_N "(cached) $ECHO_C" >&6
11200 else
11201   cat >conftest.$ac_ext <<_ACEOF
11202 #line $LINENO "configure"
11203 /* confdefs.h.  */
11204 _ACEOF
11205 cat confdefs.h >>conftest.$ac_ext
11206 cat >>conftest.$ac_ext <<_ACEOF
11207 /* end confdefs.h.  */
11208
11209 #include <sys/types.h>
11210 #include <netinet/in.h>
11211 #include <arpa/nameser.h>
11212
11213
11214 #include <$ac_header>
11215 _ACEOF
11216 rm -f conftest.$ac_objext
11217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11218   (eval $ac_compile) 2>&5
11219   ac_status=$?
11220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221   (exit $ac_status); } &&
11222          { ac_try='test -s conftest.$ac_objext'
11223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11224   (eval $ac_try) 2>&5
11225   ac_status=$?
11226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11227   (exit $ac_status); }; }; then
11228   eval "$as_ac_Header=yes"
11229 else
11230   echo "$as_me: failed program was:" >&5
11231 sed 's/^/| /' conftest.$ac_ext >&5
11232
11233 eval "$as_ac_Header=no"
11234 fi
11235 rm -f conftest.$ac_objext conftest.$ac_ext
11236 fi
11237 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11238 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11239 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11240   cat >>confdefs.h <<_ACEOF
11241 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11242 _ACEOF
11243
11244 fi
11245
11246 done
11247
11248
11249
11250 echo "$as_me:$LINENO: checking for dlopen" >&5
11251 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
11252 if test "${ac_cv_func_dlopen+set}" = set; then
11253   echo $ECHO_N "(cached) $ECHO_C" >&6
11254 else
11255   cat >conftest.$ac_ext <<_ACEOF
11256 #line $LINENO "configure"
11257 /* confdefs.h.  */
11258 _ACEOF
11259 cat confdefs.h >>conftest.$ac_ext
11260 cat >>conftest.$ac_ext <<_ACEOF
11261 /* end confdefs.h.  */
11262 /* System header to define __stub macros and hopefully few prototypes,
11263     which can conflict with char dlopen (); below.
11264     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11265     <limits.h> exists even on freestanding compilers.  */
11266 #ifdef __STDC__
11267 # include <limits.h>
11268 #else
11269 # include <assert.h>
11270 #endif
11271 /* Override any gcc2 internal prototype to avoid an error.  */
11272 #ifdef __cplusplus
11273 extern "C"
11274 {
11275 #endif
11276 /* We use char because int might match the return type of a gcc2
11277    builtin and then its argument prototype would still apply.  */
11278 char dlopen ();
11279 /* The GNU C library defines this for functions which it implements
11280     to always fail with ENOSYS.  Some functions are actually named
11281     something starting with __ and the normal name is an alias.  */
11282 #if defined (__stub_dlopen) || defined (__stub___dlopen)
11283 choke me
11284 #else
11285 char (*f) () = dlopen;
11286 #endif
11287 #ifdef __cplusplus
11288 }
11289 #endif
11290
11291 int
11292 main ()
11293 {
11294 return f != dlopen;
11295   ;
11296   return 0;
11297 }
11298 _ACEOF
11299 rm -f conftest.$ac_objext conftest$ac_exeext
11300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11301   (eval $ac_link) 2>&5
11302   ac_status=$?
11303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11304   (exit $ac_status); } &&
11305          { ac_try='test -s conftest$ac_exeext'
11306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11307   (eval $ac_try) 2>&5
11308   ac_status=$?
11309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11310   (exit $ac_status); }; }; then
11311   ac_cv_func_dlopen=yes
11312 else
11313   echo "$as_me: failed program was:" >&5
11314 sed 's/^/| /' conftest.$ac_ext >&5
11315
11316 ac_cv_func_dlopen=no
11317 fi
11318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11319 fi
11320 echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
11321 echo "${ECHO_T}$ac_cv_func_dlopen" >&6
11322 if test $ac_cv_func_dlopen = yes; then
11323   :
11324 else
11325
11326 echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11327 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11328 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11329   echo $ECHO_N "(cached) $ECHO_C" >&6
11330 else
11331   ac_check_lib_save_LIBS=$LIBS
11332 LIBS="-ldl  $LIBS"
11333 cat >conftest.$ac_ext <<_ACEOF
11334 #line $LINENO "configure"
11335 /* confdefs.h.  */
11336 _ACEOF
11337 cat confdefs.h >>conftest.$ac_ext
11338 cat >>conftest.$ac_ext <<_ACEOF
11339 /* end confdefs.h.  */
11340
11341 /* Override any gcc2 internal prototype to avoid an error.  */
11342 #ifdef __cplusplus
11343 extern "C"
11344 #endif
11345 /* We use char because int might match the return type of a gcc2
11346    builtin and then its argument prototype would still apply.  */
11347 char dlopen ();
11348 int
11349 main ()
11350 {
11351 dlopen ();
11352   ;
11353   return 0;
11354 }
11355 _ACEOF
11356 rm -f conftest.$ac_objext conftest$ac_exeext
11357 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11358   (eval $ac_link) 2>&5
11359   ac_status=$?
11360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361   (exit $ac_status); } &&
11362          { ac_try='test -s conftest$ac_exeext'
11363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11364   (eval $ac_try) 2>&5
11365   ac_status=$?
11366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367   (exit $ac_status); }; }; then
11368   ac_cv_lib_dl_dlopen=yes
11369 else
11370   echo "$as_me: failed program was:" >&5
11371 sed 's/^/| /' conftest.$ac_ext >&5
11372
11373 ac_cv_lib_dl_dlopen=no
11374 fi
11375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11376 LIBS=$ac_check_lib_save_LIBS
11377 fi
11378 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11379 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11380 if test $ac_cv_lib_dl_dlopen = yes; then
11381   cat >>confdefs.h <<_ACEOF
11382 #define HAVE_LIBDL 1
11383 _ACEOF
11384
11385   LIBS="-ldl $LIBS"
11386
11387 fi
11388
11389 fi
11390
11391
11392
11393 echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
11394 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
11395 if test "${ac_cv_lib_V3_sigset+set}" = set; then
11396   echo $ECHO_N "(cached) $ECHO_C" >&6
11397 else
11398   ac_check_lib_save_LIBS=$LIBS
11399 LIBS="-lV3  $LIBS"
11400 cat >conftest.$ac_ext <<_ACEOF
11401 #line $LINENO "configure"
11402 /* confdefs.h.  */
11403 _ACEOF
11404 cat confdefs.h >>conftest.$ac_ext
11405 cat >>conftest.$ac_ext <<_ACEOF
11406 /* end confdefs.h.  */
11407
11408 /* Override any gcc2 internal prototype to avoid an error.  */
11409 #ifdef __cplusplus
11410 extern "C"
11411 #endif
11412 /* We use char because int might match the return type of a gcc2
11413    builtin and then its argument prototype would still apply.  */
11414 char sigset ();
11415 int
11416 main ()
11417 {
11418 sigset ();
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 rm -f conftest.$ac_objext conftest$ac_exeext
11424 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11425   (eval $ac_link) 2>&5
11426   ac_status=$?
11427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11428   (exit $ac_status); } &&
11429          { ac_try='test -s conftest$ac_exeext'
11430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11431   (eval $ac_try) 2>&5
11432   ac_status=$?
11433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434   (exit $ac_status); }; }; then
11435   ac_cv_lib_V3_sigset=yes
11436 else
11437   echo "$as_me: failed program was:" >&5
11438 sed 's/^/| /' conftest.$ac_ext >&5
11439
11440 ac_cv_lib_V3_sigset=no
11441 fi
11442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11443 LIBS=$ac_check_lib_save_LIBS
11444 fi
11445 echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
11446 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
11447 if test $ac_cv_lib_V3_sigset = yes; then
11448   cat >>confdefs.h <<_ACEOF
11449 #define HAVE_LIBV3 1
11450 _ACEOF
11451
11452   LIBS="-lV3 $LIBS"
11453
11454 fi
11455
11456
11457 echo "$as_me:$LINENO: checking for winsock" >&5
11458 echo $ECHO_N "checking for winsock... $ECHO_C" >&6
11459 save_LIBS="$LIBS"
11460 for curlib in ws2_32 wsock32; do
11461         LIBS="$LIBS -l$curlib"
11462         cat >conftest.$ac_ext <<_ACEOF
11463 #line $LINENO "configure"
11464 /* confdefs.h.  */
11465 _ACEOF
11466 cat confdefs.h >>conftest.$ac_ext
11467 cat >>conftest.$ac_ext <<_ACEOF
11468 /* end confdefs.h.  */
11469
11470                         char socket@12();
11471                         char select@20();
11472                         char closesocket@4();
11473                         char gethostname@8();
11474
11475 int
11476 main ()
11477 {
11478
11479                         socket@12();
11480                         select@20();
11481                         closesocket@4();
11482                         gethostname@8();
11483
11484   ;
11485   return 0;
11486 }
11487 _ACEOF
11488 rm -f conftest.$ac_objext conftest$ac_exeext
11489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11490   (eval $ac_link) 2>&5
11491   ac_status=$?
11492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11493   (exit $ac_status); } &&
11494          { ac_try='test -s conftest$ac_exeext'
11495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11496   (eval $ac_try) 2>&5
11497   ac_status=$?
11498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11499   (exit $ac_status); }; }; then
11500   have_winsock=yes
11501 else
11502   echo "$as_me: failed program was:" >&5
11503 sed 's/^/| /' conftest.$ac_ext >&5
11504
11505 have_winsock=no
11506 fi
11507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11508
11509         if test $have_winsock = yes; then
11510
11511 cat >>confdefs.h <<\_ACEOF
11512 #define HAVE_WINSOCK 1
11513 _ACEOF
11514
11515                 ac_cv_func_socket=yes
11516                 ac_cv_func_select=yes
11517                 ac_cv_func_closesocket=yes
11518                 ac_cv_func_gethostname=yes
11519                 if test $curlib = ws2_32; then
11520                         have_winsock=winsock2
11521
11522 cat >>confdefs.h <<\_ACEOF
11523 #define HAVE_WINSOCK2 1
11524 _ACEOF
11525
11526                 fi
11527                 break
11528         fi
11529         LIBS="$save_LIBS"
11530 done
11531 echo "$as_me:$LINENO: result: $have_winsock" >&5
11532 echo "${ECHO_T}$have_winsock" >&6
11533
11534
11535 echo "$as_me:$LINENO: checking for socket" >&5
11536 echo $ECHO_N "checking for socket... $ECHO_C" >&6
11537 if test "${ac_cv_func_socket+set}" = set; then
11538   echo $ECHO_N "(cached) $ECHO_C" >&6
11539 else
11540   cat >conftest.$ac_ext <<_ACEOF
11541 #line $LINENO "configure"
11542 /* confdefs.h.  */
11543 _ACEOF
11544 cat confdefs.h >>conftest.$ac_ext
11545 cat >>conftest.$ac_ext <<_ACEOF
11546 /* end confdefs.h.  */
11547 /* System header to define __stub macros and hopefully few prototypes,
11548     which can conflict with char socket (); below.
11549     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11550     <limits.h> exists even on freestanding compilers.  */
11551 #ifdef __STDC__
11552 # include <limits.h>
11553 #else
11554 # include <assert.h>
11555 #endif
11556 /* Override any gcc2 internal prototype to avoid an error.  */
11557 #ifdef __cplusplus
11558 extern "C"
11559 {
11560 #endif
11561 /* We use char because int might match the return type of a gcc2
11562    builtin and then its argument prototype would still apply.  */
11563 char socket ();
11564 /* The GNU C library defines this for functions which it implements
11565     to always fail with ENOSYS.  Some functions are actually named
11566     something starting with __ and the normal name is an alias.  */
11567 #if defined (__stub_socket) || defined (__stub___socket)
11568 choke me
11569 #else
11570 char (*f) () = socket;
11571 #endif
11572 #ifdef __cplusplus
11573 }
11574 #endif
11575
11576 int
11577 main ()
11578 {
11579 return f != socket;
11580   ;
11581   return 0;
11582 }
11583 _ACEOF
11584 rm -f conftest.$ac_objext conftest$ac_exeext
11585 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11586   (eval $ac_link) 2>&5
11587   ac_status=$?
11588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589   (exit $ac_status); } &&
11590          { ac_try='test -s conftest$ac_exeext'
11591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11592   (eval $ac_try) 2>&5
11593   ac_status=$?
11594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595   (exit $ac_status); }; }; then
11596   ac_cv_func_socket=yes
11597 else
11598   echo "$as_me: failed program was:" >&5
11599 sed 's/^/| /' conftest.$ac_ext >&5
11600
11601 ac_cv_func_socket=no
11602 fi
11603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11604 fi
11605 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
11606 echo "${ECHO_T}$ac_cv_func_socket" >&6
11607 if test $ac_cv_func_socket = yes; then
11608   :
11609 else
11610
11611
11612 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
11613 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
11614 if test "${ac_cv_lib_socket_main+set}" = set; then
11615   echo $ECHO_N "(cached) $ECHO_C" >&6
11616 else
11617   ac_check_lib_save_LIBS=$LIBS
11618 LIBS="-lsocket  $LIBS"
11619 cat >conftest.$ac_ext <<_ACEOF
11620 #line $LINENO "configure"
11621 /* confdefs.h.  */
11622 _ACEOF
11623 cat confdefs.h >>conftest.$ac_ext
11624 cat >>conftest.$ac_ext <<_ACEOF
11625 /* end confdefs.h.  */
11626
11627
11628 int
11629 main ()
11630 {
11631 main ();
11632   ;
11633   return 0;
11634 }
11635 _ACEOF
11636 rm -f conftest.$ac_objext conftest$ac_exeext
11637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11638   (eval $ac_link) 2>&5
11639   ac_status=$?
11640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11641   (exit $ac_status); } &&
11642          { ac_try='test -s conftest$ac_exeext'
11643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11644   (eval $ac_try) 2>&5
11645   ac_status=$?
11646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647   (exit $ac_status); }; }; then
11648   ac_cv_lib_socket_main=yes
11649 else
11650   echo "$as_me: failed program was:" >&5
11651 sed 's/^/| /' conftest.$ac_ext >&5
11652
11653 ac_cv_lib_socket_main=no
11654 fi
11655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11656 LIBS=$ac_check_lib_save_LIBS
11657 fi
11658 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
11659 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
11660 if test $ac_cv_lib_socket_main = yes; then
11661   cat >>confdefs.h <<_ACEOF
11662 #define HAVE_LIBSOCKET 1
11663 _ACEOF
11664
11665   LIBS="-lsocket $LIBS"
11666
11667 fi
11668
11669
11670 echo "$as_me:$LINENO: checking for main in -lnet" >&5
11671 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
11672 if test "${ac_cv_lib_net_main+set}" = set; then
11673   echo $ECHO_N "(cached) $ECHO_C" >&6
11674 else
11675   ac_check_lib_save_LIBS=$LIBS
11676 LIBS="-lnet  $LIBS"
11677 cat >conftest.$ac_ext <<_ACEOF
11678 #line $LINENO "configure"
11679 /* confdefs.h.  */
11680 _ACEOF
11681 cat confdefs.h >>conftest.$ac_ext
11682 cat >>conftest.$ac_ext <<_ACEOF
11683 /* end confdefs.h.  */
11684
11685
11686 int
11687 main ()
11688 {
11689 main ();
11690   ;
11691   return 0;
11692 }
11693 _ACEOF
11694 rm -f conftest.$ac_objext conftest$ac_exeext
11695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11696   (eval $ac_link) 2>&5
11697   ac_status=$?
11698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699   (exit $ac_status); } &&
11700          { ac_try='test -s conftest$ac_exeext'
11701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702   (eval $ac_try) 2>&5
11703   ac_status=$?
11704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705   (exit $ac_status); }; }; then
11706   ac_cv_lib_net_main=yes
11707 else
11708   echo "$as_me: failed program was:" >&5
11709 sed 's/^/| /' conftest.$ac_ext >&5
11710
11711 ac_cv_lib_net_main=no
11712 fi
11713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11714 LIBS=$ac_check_lib_save_LIBS
11715 fi
11716 echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
11717 echo "${ECHO_T}$ac_cv_lib_net_main" >&6
11718 if test $ac_cv_lib_net_main = yes; then
11719   cat >>confdefs.h <<_ACEOF
11720 #define HAVE_LIBNET 1
11721 _ACEOF
11722
11723   LIBS="-lnet $LIBS"
11724
11725 fi
11726
11727
11728 echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
11729 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
11730 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
11731   echo $ECHO_N "(cached) $ECHO_C" >&6
11732 else
11733   ac_check_lib_save_LIBS=$LIBS
11734 LIBS="-lnsl_s  $LIBS"
11735 cat >conftest.$ac_ext <<_ACEOF
11736 #line $LINENO "configure"
11737 /* confdefs.h.  */
11738 _ACEOF
11739 cat confdefs.h >>conftest.$ac_ext
11740 cat >>conftest.$ac_ext <<_ACEOF
11741 /* end confdefs.h.  */
11742
11743
11744 int
11745 main ()
11746 {
11747 main ();
11748   ;
11749   return 0;
11750 }
11751 _ACEOF
11752 rm -f conftest.$ac_objext conftest$ac_exeext
11753 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11754   (eval $ac_link) 2>&5
11755   ac_status=$?
11756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11757   (exit $ac_status); } &&
11758          { ac_try='test -s conftest$ac_exeext'
11759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11760   (eval $ac_try) 2>&5
11761   ac_status=$?
11762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11763   (exit $ac_status); }; }; then
11764   ac_cv_lib_nsl_s_main=yes
11765 else
11766   echo "$as_me: failed program was:" >&5
11767 sed 's/^/| /' conftest.$ac_ext >&5
11768
11769 ac_cv_lib_nsl_s_main=no
11770 fi
11771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11772 LIBS=$ac_check_lib_save_LIBS
11773 fi
11774 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
11775 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
11776 if test $ac_cv_lib_nsl_s_main = yes; then
11777   cat >>confdefs.h <<_ACEOF
11778 #define HAVE_LIBNSL_S 1
11779 _ACEOF
11780
11781   LIBS="-lnsl_s $LIBS"
11782
11783 fi
11784
11785
11786 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
11787 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
11788 if test "${ac_cv_lib_nsl_main+set}" = set; then
11789   echo $ECHO_N "(cached) $ECHO_C" >&6
11790 else
11791   ac_check_lib_save_LIBS=$LIBS
11792 LIBS="-lnsl  $LIBS"
11793 cat >conftest.$ac_ext <<_ACEOF
11794 #line $LINENO "configure"
11795 /* confdefs.h.  */
11796 _ACEOF
11797 cat confdefs.h >>conftest.$ac_ext
11798 cat >>conftest.$ac_ext <<_ACEOF
11799 /* end confdefs.h.  */
11800
11801
11802 int
11803 main ()
11804 {
11805 main ();
11806   ;
11807   return 0;
11808 }
11809 _ACEOF
11810 rm -f conftest.$ac_objext conftest$ac_exeext
11811 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11812   (eval $ac_link) 2>&5
11813   ac_status=$?
11814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815   (exit $ac_status); } &&
11816          { ac_try='test -s conftest$ac_exeext'
11817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11818   (eval $ac_try) 2>&5
11819   ac_status=$?
11820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821   (exit $ac_status); }; }; then
11822   ac_cv_lib_nsl_main=yes
11823 else
11824   echo "$as_me: failed program was:" >&5
11825 sed 's/^/| /' conftest.$ac_ext >&5
11826
11827 ac_cv_lib_nsl_main=no
11828 fi
11829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11830 LIBS=$ac_check_lib_save_LIBS
11831 fi
11832 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
11833 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
11834 if test $ac_cv_lib_nsl_main = yes; then
11835   cat >>confdefs.h <<_ACEOF
11836 #define HAVE_LIBNSL 1
11837 _ACEOF
11838
11839   LIBS="-lnsl $LIBS"
11840
11841 fi
11842
11843
11844 echo "$as_me:$LINENO: checking for socket in -linet" >&5
11845 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
11846 if test "${ac_cv_lib_inet_socket+set}" = set; then
11847   echo $ECHO_N "(cached) $ECHO_C" >&6
11848 else
11849   ac_check_lib_save_LIBS=$LIBS
11850 LIBS="-linet  $LIBS"
11851 cat >conftest.$ac_ext <<_ACEOF
11852 #line $LINENO "configure"
11853 /* confdefs.h.  */
11854 _ACEOF
11855 cat confdefs.h >>conftest.$ac_ext
11856 cat >>conftest.$ac_ext <<_ACEOF
11857 /* end confdefs.h.  */
11858
11859 /* Override any gcc2 internal prototype to avoid an error.  */
11860 #ifdef __cplusplus
11861 extern "C"
11862 #endif
11863 /* We use char because int might match the return type of a gcc2
11864    builtin and then its argument prototype would still apply.  */
11865 char socket ();
11866 int
11867 main ()
11868 {
11869 socket ();
11870   ;
11871   return 0;
11872 }
11873 _ACEOF
11874 rm -f conftest.$ac_objext conftest$ac_exeext
11875 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11876   (eval $ac_link) 2>&5
11877   ac_status=$?
11878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879   (exit $ac_status); } &&
11880          { ac_try='test -s conftest$ac_exeext'
11881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886   ac_cv_lib_inet_socket=yes
11887 else
11888   echo "$as_me: failed program was:" >&5
11889 sed 's/^/| /' conftest.$ac_ext >&5
11890
11891 ac_cv_lib_inet_socket=no
11892 fi
11893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11894 LIBS=$ac_check_lib_save_LIBS
11895 fi
11896 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
11897 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
11898 if test $ac_cv_lib_inet_socket = yes; then
11899   cat >>confdefs.h <<_ACEOF
11900 #define HAVE_LIBINET 1
11901 _ACEOF
11902
11903   LIBS="-linet $LIBS"
11904
11905 fi
11906
11907
11908 echo "$as_me:$LINENO: checking for main in -lgen" >&5
11909 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
11910 if test "${ac_cv_lib_gen_main+set}" = set; then
11911   echo $ECHO_N "(cached) $ECHO_C" >&6
11912 else
11913   ac_check_lib_save_LIBS=$LIBS
11914 LIBS="-lgen  $LIBS"
11915 cat >conftest.$ac_ext <<_ACEOF
11916 #line $LINENO "configure"
11917 /* confdefs.h.  */
11918 _ACEOF
11919 cat confdefs.h >>conftest.$ac_ext
11920 cat >>conftest.$ac_ext <<_ACEOF
11921 /* end confdefs.h.  */
11922
11923
11924 int
11925 main ()
11926 {
11927 main ();
11928   ;
11929   return 0;
11930 }
11931 _ACEOF
11932 rm -f conftest.$ac_objext conftest$ac_exeext
11933 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11934   (eval $ac_link) 2>&5
11935   ac_status=$?
11936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937   (exit $ac_status); } &&
11938          { ac_try='test -s conftest$ac_exeext'
11939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11940   (eval $ac_try) 2>&5
11941   ac_status=$?
11942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11943   (exit $ac_status); }; }; then
11944   ac_cv_lib_gen_main=yes
11945 else
11946   echo "$as_me: failed program was:" >&5
11947 sed 's/^/| /' conftest.$ac_ext >&5
11948
11949 ac_cv_lib_gen_main=no
11950 fi
11951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11952 LIBS=$ac_check_lib_save_LIBS
11953 fi
11954 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
11955 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
11956 if test $ac_cv_lib_gen_main = yes; then
11957   cat >>confdefs.h <<_ACEOF
11958 #define HAVE_LIBGEN 1
11959 _ACEOF
11960
11961   LIBS="-lgen $LIBS"
11962
11963 fi
11964
11965
11966 fi
11967
11968
11969 echo "$as_me:$LINENO: checking for select" >&5
11970 echo $ECHO_N "checking for select... $ECHO_C" >&6
11971 if test "${ac_cv_func_select+set}" = set; then
11972   echo $ECHO_N "(cached) $ECHO_C" >&6
11973 else
11974   cat >conftest.$ac_ext <<_ACEOF
11975 #line $LINENO "configure"
11976 /* confdefs.h.  */
11977 _ACEOF
11978 cat confdefs.h >>conftest.$ac_ext
11979 cat >>conftest.$ac_ext <<_ACEOF
11980 /* end confdefs.h.  */
11981 /* System header to define __stub macros and hopefully few prototypes,
11982     which can conflict with char select (); below.
11983     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11984     <limits.h> exists even on freestanding compilers.  */
11985 #ifdef __STDC__
11986 # include <limits.h>
11987 #else
11988 # include <assert.h>
11989 #endif
11990 /* Override any gcc2 internal prototype to avoid an error.  */
11991 #ifdef __cplusplus
11992 extern "C"
11993 {
11994 #endif
11995 /* We use char because int might match the return type of a gcc2
11996    builtin and then its argument prototype would still apply.  */
11997 char select ();
11998 /* The GNU C library defines this for functions which it implements
11999     to always fail with ENOSYS.  Some functions are actually named
12000     something starting with __ and the normal name is an alias.  */
12001 #if defined (__stub_select) || defined (__stub___select)
12002 choke me
12003 #else
12004 char (*f) () = select;
12005 #endif
12006 #ifdef __cplusplus
12007 }
12008 #endif
12009
12010 int
12011 main ()
12012 {
12013 return f != select;
12014   ;
12015   return 0;
12016 }
12017 _ACEOF
12018 rm -f conftest.$ac_objext conftest$ac_exeext
12019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12020   (eval $ac_link) 2>&5
12021   ac_status=$?
12022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023   (exit $ac_status); } &&
12024          { ac_try='test -s conftest$ac_exeext'
12025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12026   (eval $ac_try) 2>&5
12027   ac_status=$?
12028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12029   (exit $ac_status); }; }; then
12030   ac_cv_func_select=yes
12031 else
12032   echo "$as_me: failed program was:" >&5
12033 sed 's/^/| /' conftest.$ac_ext >&5
12034
12035 ac_cv_func_select=no
12036 fi
12037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12038 fi
12039 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
12040 echo "${ECHO_T}$ac_cv_func_select" >&6
12041 if test $ac_cv_func_select = yes; then
12042   :
12043 else
12044   { { echo "$as_me:$LINENO: error: select() required." >&5
12045 echo "$as_me: error: select() required." >&2;}
12046    { (exit 1); exit 1; }; }
12047 fi
12048
12049
12050 if test "${ac_cv_header_winsock_h}" != yes; then
12051
12052
12053 for ac_header in sys/select.h sys/socket.h
12054 do
12055 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12057   echo "$as_me:$LINENO: checking for $ac_header" >&5
12058 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12059 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12060   echo $ECHO_N "(cached) $ECHO_C" >&6
12061 fi
12062 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12063 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12064 else
12065   # Is the header compilable?
12066 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12067 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12068 cat >conftest.$ac_ext <<_ACEOF
12069 #line $LINENO "configure"
12070 /* confdefs.h.  */
12071 _ACEOF
12072 cat confdefs.h >>conftest.$ac_ext
12073 cat >>conftest.$ac_ext <<_ACEOF
12074 /* end confdefs.h.  */
12075 $ac_includes_default
12076 #include <$ac_header>
12077 _ACEOF
12078 rm -f conftest.$ac_objext
12079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12080   (eval $ac_compile) 2>&5
12081   ac_status=$?
12082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12083   (exit $ac_status); } &&
12084          { ac_try='test -s conftest.$ac_objext'
12085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12086   (eval $ac_try) 2>&5
12087   ac_status=$?
12088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12089   (exit $ac_status); }; }; then
12090   ac_header_compiler=yes
12091 else
12092   echo "$as_me: failed program was:" >&5
12093 sed 's/^/| /' conftest.$ac_ext >&5
12094
12095 ac_header_compiler=no
12096 fi
12097 rm -f conftest.$ac_objext conftest.$ac_ext
12098 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12099 echo "${ECHO_T}$ac_header_compiler" >&6
12100
12101 # Is the header present?
12102 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12103 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12104 cat >conftest.$ac_ext <<_ACEOF
12105 #line $LINENO "configure"
12106 /* confdefs.h.  */
12107 _ACEOF
12108 cat confdefs.h >>conftest.$ac_ext
12109 cat >>conftest.$ac_ext <<_ACEOF
12110 /* end confdefs.h.  */
12111 #include <$ac_header>
12112 _ACEOF
12113 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12114   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12115   ac_status=$?
12116   grep -v '^ *+' conftest.er1 >conftest.err
12117   rm -f conftest.er1
12118   cat conftest.err >&5
12119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120   (exit $ac_status); } >/dev/null; then
12121   if test -s conftest.err; then
12122     ac_cpp_err=$ac_c_preproc_warn_flag
12123   else
12124     ac_cpp_err=
12125   fi
12126 else
12127   ac_cpp_err=yes
12128 fi
12129 if test -z "$ac_cpp_err"; then
12130   ac_header_preproc=yes
12131 else
12132   echo "$as_me: failed program was:" >&5
12133 sed 's/^/| /' conftest.$ac_ext >&5
12134
12135   ac_header_preproc=no
12136 fi
12137 rm -f conftest.err conftest.$ac_ext
12138 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12139 echo "${ECHO_T}$ac_header_preproc" >&6
12140
12141 # So?  What about this header?
12142 case $ac_header_compiler:$ac_header_preproc in
12143   yes:no )
12144     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12145 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12146     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12147 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12148     (
12149       cat <<\_ASBOX
12150 ## ------------------------------------ ##
12151 ## Report this to bug-autoconf@gnu.org. ##
12152 ## ------------------------------------ ##
12153 _ASBOX
12154     ) |
12155       sed "s/^/$as_me: WARNING:     /" >&2
12156     ;;
12157   no:yes )
12158     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12159 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12160     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12161 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12162     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12163 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12164     (
12165       cat <<\_ASBOX
12166 ## ------------------------------------ ##
12167 ## Report this to bug-autoconf@gnu.org. ##
12168 ## ------------------------------------ ##
12169 _ASBOX
12170     ) |
12171       sed "s/^/$as_me: WARNING:     /" >&2
12172     ;;
12173 esac
12174 echo "$as_me:$LINENO: checking for $ac_header" >&5
12175 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12176 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12177   echo $ECHO_N "(cached) $ECHO_C" >&6
12178 else
12179   eval "$as_ac_Header=$ac_header_preproc"
12180 fi
12181 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12183
12184 fi
12185 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12186   cat >>confdefs.h <<_ACEOF
12187 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12188 _ACEOF
12189
12190 fi
12191
12192 done
12193
12194 echo "$as_me:$LINENO: checking types of arguments for select" >&5
12195 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
12196 if test "${ac_cv_func_select_args+set}" = set; then
12197   echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
12200  for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
12201   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
12202    cat >conftest.$ac_ext <<_ACEOF
12203 #line $LINENO "configure"
12204 /* confdefs.h.  */
12205 _ACEOF
12206 cat confdefs.h >>conftest.$ac_ext
12207 cat >>conftest.$ac_ext <<_ACEOF
12208 /* end confdefs.h.  */
12209 $ac_includes_default
12210 #if HAVE_SYS_SELECT_H
12211 # include <sys/select.h>
12212 #endif
12213 #if HAVE_SYS_SOCKET_H
12214 # include <sys/socket.h>
12215 #endif
12216
12217 int
12218 main ()
12219 {
12220 extern int select ($ac_arg1,
12221                                             $ac_arg234, $ac_arg234, $ac_arg234,
12222                                             $ac_arg5);
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 rm -f conftest.$ac_objext
12228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12229   (eval $ac_compile) 2>&5
12230   ac_status=$?
12231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12232   (exit $ac_status); } &&
12233          { ac_try='test -s conftest.$ac_objext'
12234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12235   (eval $ac_try) 2>&5
12236   ac_status=$?
12237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238   (exit $ac_status); }; }; then
12239   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
12240 else
12241   echo "$as_me: failed program was:" >&5
12242 sed 's/^/| /' conftest.$ac_ext >&5
12243
12244 fi
12245 rm -f conftest.$ac_objext conftest.$ac_ext
12246   done
12247  done
12248 done
12249 # Provide a safe default value.
12250 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
12251
12252 fi
12253 echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
12254 echo "${ECHO_T}$ac_cv_func_select_args" >&6
12255 ac_save_IFS=$IFS; IFS=','
12256 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
12257 IFS=$ac_save_IFS
12258 shift
12259
12260 cat >>confdefs.h <<_ACEOF
12261 #define SELECT_TYPE_ARG1 $1
12262 _ACEOF
12263
12264
12265 cat >>confdefs.h <<_ACEOF
12266 #define SELECT_TYPE_ARG234 ($2)
12267 _ACEOF
12268
12269
12270 cat >>confdefs.h <<_ACEOF
12271 #define SELECT_TYPE_ARG5 ($3)
12272 _ACEOF
12273
12274 rm -f conftest*
12275
12276 fi
12277
12278
12279
12280 for ac_header in regex.h
12281 do
12282 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12283 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12284   echo "$as_me:$LINENO: checking for $ac_header" >&5
12285 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12286 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12287   echo $ECHO_N "(cached) $ECHO_C" >&6
12288 fi
12289 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12290 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12291 else
12292   # Is the header compilable?
12293 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12294 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12295 cat >conftest.$ac_ext <<_ACEOF
12296 #line $LINENO "configure"
12297 /* confdefs.h.  */
12298 _ACEOF
12299 cat confdefs.h >>conftest.$ac_ext
12300 cat >>conftest.$ac_ext <<_ACEOF
12301 /* end confdefs.h.  */
12302 $ac_includes_default
12303 #include <$ac_header>
12304 _ACEOF
12305 rm -f conftest.$ac_objext
12306 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12307   (eval $ac_compile) 2>&5
12308   ac_status=$?
12309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12310   (exit $ac_status); } &&
12311          { ac_try='test -s conftest.$ac_objext'
12312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316   (exit $ac_status); }; }; then
12317   ac_header_compiler=yes
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 sed 's/^/| /' conftest.$ac_ext >&5
12321
12322 ac_header_compiler=no
12323 fi
12324 rm -f conftest.$ac_objext conftest.$ac_ext
12325 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12326 echo "${ECHO_T}$ac_header_compiler" >&6
12327
12328 # Is the header present?
12329 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12330 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12331 cat >conftest.$ac_ext <<_ACEOF
12332 #line $LINENO "configure"
12333 /* confdefs.h.  */
12334 _ACEOF
12335 cat confdefs.h >>conftest.$ac_ext
12336 cat >>conftest.$ac_ext <<_ACEOF
12337 /* end confdefs.h.  */
12338 #include <$ac_header>
12339 _ACEOF
12340 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12342   ac_status=$?
12343   grep -v '^ *+' conftest.er1 >conftest.err
12344   rm -f conftest.er1
12345   cat conftest.err >&5
12346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347   (exit $ac_status); } >/dev/null; then
12348   if test -s conftest.err; then
12349     ac_cpp_err=$ac_c_preproc_warn_flag
12350   else
12351     ac_cpp_err=
12352   fi
12353 else
12354   ac_cpp_err=yes
12355 fi
12356 if test -z "$ac_cpp_err"; then
12357   ac_header_preproc=yes
12358 else
12359   echo "$as_me: failed program was:" >&5
12360 sed 's/^/| /' conftest.$ac_ext >&5
12361
12362   ac_header_preproc=no
12363 fi
12364 rm -f conftest.err conftest.$ac_ext
12365 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12366 echo "${ECHO_T}$ac_header_preproc" >&6
12367
12368 # So?  What about this header?
12369 case $ac_header_compiler:$ac_header_preproc in
12370   yes:no )
12371     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12372 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12373     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12374 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12375     (
12376       cat <<\_ASBOX
12377 ## ------------------------------------ ##
12378 ## Report this to bug-autoconf@gnu.org. ##
12379 ## ------------------------------------ ##
12380 _ASBOX
12381     ) |
12382       sed "s/^/$as_me: WARNING:     /" >&2
12383     ;;
12384   no:yes )
12385     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12386 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12387     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12388 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12389     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12390 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12391     (
12392       cat <<\_ASBOX
12393 ## ------------------------------------ ##
12394 ## Report this to bug-autoconf@gnu.org. ##
12395 ## ------------------------------------ ##
12396 _ASBOX
12397     ) |
12398       sed "s/^/$as_me: WARNING:     /" >&2
12399     ;;
12400 esac
12401 echo "$as_me:$LINENO: checking for $ac_header" >&5
12402 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12403 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12404   echo $ECHO_N "(cached) $ECHO_C" >&6
12405 else
12406   eval "$as_ac_Header=$ac_header_preproc"
12407 fi
12408 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12409 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12410
12411 fi
12412 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12413   cat >>confdefs.h <<_ACEOF
12414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12415 _ACEOF
12416
12417 fi
12418
12419 done
12420
12421 if test "$ac_cv_header_regex_h" != yes ; then
12422         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
12423 echo "$as_me: error: POSIX regex.h required." >&2;}
12424    { (exit 1); exit 1; }; }
12425 fi
12426 echo "$as_me:$LINENO: checking for library containing regfree" >&5
12427 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
12428 if test "${ac_cv_search_regfree+set}" = set; then
12429   echo $ECHO_N "(cached) $ECHO_C" >&6
12430 else
12431   ac_func_search_save_LIBS=$LIBS
12432 ac_cv_search_regfree=no
12433 cat >conftest.$ac_ext <<_ACEOF
12434 #line $LINENO "configure"
12435 /* confdefs.h.  */
12436 _ACEOF
12437 cat confdefs.h >>conftest.$ac_ext
12438 cat >>conftest.$ac_ext <<_ACEOF
12439 /* end confdefs.h.  */
12440
12441 /* Override any gcc2 internal prototype to avoid an error.  */
12442 #ifdef __cplusplus
12443 extern "C"
12444 #endif
12445 /* We use char because int might match the return type of a gcc2
12446    builtin and then its argument prototype would still apply.  */
12447 char regfree ();
12448 int
12449 main ()
12450 {
12451 regfree ();
12452   ;
12453   return 0;
12454 }
12455 _ACEOF
12456 rm -f conftest.$ac_objext conftest$ac_exeext
12457 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12458   (eval $ac_link) 2>&5
12459   ac_status=$?
12460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461   (exit $ac_status); } &&
12462          { ac_try='test -s conftest$ac_exeext'
12463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12464   (eval $ac_try) 2>&5
12465   ac_status=$?
12466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467   (exit $ac_status); }; }; then
12468   ac_cv_search_regfree="none required"
12469 else
12470   echo "$as_me: failed program was:" >&5
12471 sed 's/^/| /' conftest.$ac_ext >&5
12472
12473 fi
12474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12475 if test "$ac_cv_search_regfree" = no; then
12476   for ac_lib in regex gnuregex; do
12477     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12478     cat >conftest.$ac_ext <<_ACEOF
12479 #line $LINENO "configure"
12480 /* confdefs.h.  */
12481 _ACEOF
12482 cat confdefs.h >>conftest.$ac_ext
12483 cat >>conftest.$ac_ext <<_ACEOF
12484 /* end confdefs.h.  */
12485
12486 /* Override any gcc2 internal prototype to avoid an error.  */
12487 #ifdef __cplusplus
12488 extern "C"
12489 #endif
12490 /* We use char because int might match the return type of a gcc2
12491    builtin and then its argument prototype would still apply.  */
12492 char regfree ();
12493 int
12494 main ()
12495 {
12496 regfree ();
12497   ;
12498   return 0;
12499 }
12500 _ACEOF
12501 rm -f conftest.$ac_objext conftest$ac_exeext
12502 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12503   (eval $ac_link) 2>&5
12504   ac_status=$?
12505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12506   (exit $ac_status); } &&
12507          { ac_try='test -s conftest$ac_exeext'
12508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12509   (eval $ac_try) 2>&5
12510   ac_status=$?
12511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12512   (exit $ac_status); }; }; then
12513   ac_cv_search_regfree="-l$ac_lib"
12514 break
12515 else
12516   echo "$as_me: failed program was:" >&5
12517 sed 's/^/| /' conftest.$ac_ext >&5
12518
12519 fi
12520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12521   done
12522 fi
12523 LIBS=$ac_func_search_save_LIBS
12524 fi
12525 echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
12526 echo "${ECHO_T}$ac_cv_search_regfree" >&6
12527 if test "$ac_cv_search_regfree" != no; then
12528   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
12529   :
12530 else
12531   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
12532 echo "$as_me: error: POSIX regex required." >&2;}
12533    { (exit 1); exit 1; }; }
12534 fi
12535
12536
12537
12538 echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
12539 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
12540 if test "${ol_cv_c_posix_regex+set}" = set; then
12541   echo $ECHO_N "(cached) $ECHO_C" >&6
12542 else
12543
12544         if test "$cross_compiling" = yes; then
12545   ol_cv_c_posix_regex=cross
12546 else
12547   cat >conftest.$ac_ext <<_ACEOF
12548 #line $LINENO "configure"
12549 /* confdefs.h.  */
12550 _ACEOF
12551 cat confdefs.h >>conftest.$ac_ext
12552 cat >>conftest.$ac_ext <<_ACEOF
12553 /* end confdefs.h.  */
12554
12555 #include <sys/types.h>
12556 #include <regex.h>
12557 static char *pattern, *string;
12558 main()
12559 {
12560         int rc;
12561         regex_t re;
12562
12563         pattern = "^A";
12564
12565         if(regcomp(&re, pattern, 0)) {
12566                 return -1;
12567         }
12568
12569         string = "ALL MATCH";
12570
12571         rc = regexec(&re, string, 0, (void*)0, 0);
12572
12573         regfree(&re);
12574
12575         return rc;
12576 }
12577 _ACEOF
12578 rm -f conftest$ac_exeext
12579 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12580   (eval $ac_link) 2>&5
12581   ac_status=$?
12582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12588   (exit $ac_status); }; }; then
12589   ol_cv_c_posix_regex=yes
12590 else
12591   echo "$as_me: program exited with status $ac_status" >&5
12592 echo "$as_me: failed program was:" >&5
12593 sed 's/^/| /' conftest.$ac_ext >&5
12594
12595 ( exit $ac_status )
12596 ol_cv_c_posix_regex=no
12597 fi
12598 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12599 fi
12600 fi
12601 echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
12602 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
12603
12604 if test "$ol_cv_c_posix_regex" = no ; then
12605         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
12606 echo "$as_me: error: broken POSIX regex!" >&2;}
12607    { (exit 1); exit 1; }; }
12608 fi
12609
12610
12611 have_uuid=no
12612
12613 for ac_header in sys/uuid.h
12614 do
12615 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12616 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12617   echo "$as_me:$LINENO: checking for $ac_header" >&5
12618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12620   echo $ECHO_N "(cached) $ECHO_C" >&6
12621 fi
12622 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12623 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12624 else
12625   # Is the header compilable?
12626 echo "$as_me:$LINENO: checking $ac_header usability" >&5
12627 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12628 cat >conftest.$ac_ext <<_ACEOF
12629 #line $LINENO "configure"
12630 /* confdefs.h.  */
12631 _ACEOF
12632 cat confdefs.h >>conftest.$ac_ext
12633 cat >>conftest.$ac_ext <<_ACEOF
12634 /* end confdefs.h.  */
12635 $ac_includes_default
12636 #include <$ac_header>
12637 _ACEOF
12638 rm -f conftest.$ac_objext
12639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12640   (eval $ac_compile) 2>&5
12641   ac_status=$?
12642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643   (exit $ac_status); } &&
12644          { ac_try='test -s conftest.$ac_objext'
12645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12646   (eval $ac_try) 2>&5
12647   ac_status=$?
12648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649   (exit $ac_status); }; }; then
12650   ac_header_compiler=yes
12651 else
12652   echo "$as_me: failed program was:" >&5
12653 sed 's/^/| /' conftest.$ac_ext >&5
12654
12655 ac_header_compiler=no
12656 fi
12657 rm -f conftest.$ac_objext conftest.$ac_ext
12658 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12659 echo "${ECHO_T}$ac_header_compiler" >&6
12660
12661 # Is the header present?
12662 echo "$as_me:$LINENO: checking $ac_header presence" >&5
12663 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12664 cat >conftest.$ac_ext <<_ACEOF
12665 #line $LINENO "configure"
12666 /* confdefs.h.  */
12667 _ACEOF
12668 cat confdefs.h >>conftest.$ac_ext
12669 cat >>conftest.$ac_ext <<_ACEOF
12670 /* end confdefs.h.  */
12671 #include <$ac_header>
12672 _ACEOF
12673 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12674   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12675   ac_status=$?
12676   grep -v '^ *+' conftest.er1 >conftest.err
12677   rm -f conftest.er1
12678   cat conftest.err >&5
12679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680   (exit $ac_status); } >/dev/null; then
12681   if test -s conftest.err; then
12682     ac_cpp_err=$ac_c_preproc_warn_flag
12683   else
12684     ac_cpp_err=
12685   fi
12686 else
12687   ac_cpp_err=yes
12688 fi
12689 if test -z "$ac_cpp_err"; then
12690   ac_header_preproc=yes
12691 else
12692   echo "$as_me: failed program was:" >&5
12693 sed 's/^/| /' conftest.$ac_ext >&5
12694
12695   ac_header_preproc=no
12696 fi
12697 rm -f conftest.err conftest.$ac_ext
12698 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12699 echo "${ECHO_T}$ac_header_preproc" >&6
12700
12701 # So?  What about this header?
12702 case $ac_header_compiler:$ac_header_preproc in
12703   yes:no )
12704     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12705 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12708     (
12709       cat <<\_ASBOX
12710 ## ------------------------------------ ##
12711 ## Report this to bug-autoconf@gnu.org. ##
12712 ## ------------------------------------ ##
12713 _ASBOX
12714     ) |
12715       sed "s/^/$as_me: WARNING:     /" >&2
12716     ;;
12717   no:yes )
12718     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12719 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12720     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12721 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12722     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12723 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12724     (
12725       cat <<\_ASBOX
12726 ## ------------------------------------ ##
12727 ## Report this to bug-autoconf@gnu.org. ##
12728 ## ------------------------------------ ##
12729 _ASBOX
12730     ) |
12731       sed "s/^/$as_me: WARNING:     /" >&2
12732     ;;
12733 esac
12734 echo "$as_me:$LINENO: checking for $ac_header" >&5
12735 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12737   echo $ECHO_N "(cached) $ECHO_C" >&6
12738 else
12739   eval "$as_ac_Header=$ac_header_preproc"
12740 fi
12741 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12742 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12743
12744 fi
12745 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12746   cat >>confdefs.h <<_ACEOF
12747 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12748 _ACEOF
12749
12750 fi
12751
12752 done
12753
12754 if test $ac_cv_header_sys_uuid_h = yes ; then
12755         save_LIBS="$LIBS"
12756         echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
12757 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
12758 if test "${ac_cv_search_uuid_to_str+set}" = set; then
12759   echo $ECHO_N "(cached) $ECHO_C" >&6
12760 else
12761   ac_func_search_save_LIBS=$LIBS
12762 ac_cv_search_uuid_to_str=no
12763 cat >conftest.$ac_ext <<_ACEOF
12764 #line $LINENO "configure"
12765 /* confdefs.h.  */
12766 _ACEOF
12767 cat confdefs.h >>conftest.$ac_ext
12768 cat >>conftest.$ac_ext <<_ACEOF
12769 /* end confdefs.h.  */
12770
12771 /* Override any gcc2 internal prototype to avoid an error.  */
12772 #ifdef __cplusplus
12773 extern "C"
12774 #endif
12775 /* We use char because int might match the return type of a gcc2
12776    builtin and then its argument prototype would still apply.  */
12777 char uuid_to_str ();
12778 int
12779 main ()
12780 {
12781 uuid_to_str ();
12782   ;
12783   return 0;
12784 }
12785 _ACEOF
12786 rm -f conftest.$ac_objext conftest$ac_exeext
12787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12788   (eval $ac_link) 2>&5
12789   ac_status=$?
12790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12791   (exit $ac_status); } &&
12792          { ac_try='test -s conftest$ac_exeext'
12793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12794   (eval $ac_try) 2>&5
12795   ac_status=$?
12796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12797   (exit $ac_status); }; }; then
12798   ac_cv_search_uuid_to_str="none required"
12799 else
12800   echo "$as_me: failed program was:" >&5
12801 sed 's/^/| /' conftest.$ac_ext >&5
12802
12803 fi
12804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12805 if test "$ac_cv_search_uuid_to_str" = no; then
12806   for ac_lib in uuid; do
12807     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12808     cat >conftest.$ac_ext <<_ACEOF
12809 #line $LINENO "configure"
12810 /* confdefs.h.  */
12811 _ACEOF
12812 cat confdefs.h >>conftest.$ac_ext
12813 cat >>conftest.$ac_ext <<_ACEOF
12814 /* end confdefs.h.  */
12815
12816 /* Override any gcc2 internal prototype to avoid an error.  */
12817 #ifdef __cplusplus
12818 extern "C"
12819 #endif
12820 /* We use char because int might match the return type of a gcc2
12821    builtin and then its argument prototype would still apply.  */
12822 char uuid_to_str ();
12823 int
12824 main ()
12825 {
12826 uuid_to_str ();
12827   ;
12828   return 0;
12829 }
12830 _ACEOF
12831 rm -f conftest.$ac_objext conftest$ac_exeext
12832 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12833   (eval $ac_link) 2>&5
12834   ac_status=$?
12835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12836   (exit $ac_status); } &&
12837          { ac_try='test -s conftest$ac_exeext'
12838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12839   (eval $ac_try) 2>&5
12840   ac_status=$?
12841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12842   (exit $ac_status); }; }; then
12843   ac_cv_search_uuid_to_str="-l$ac_lib"
12844 break
12845 else
12846   echo "$as_me: failed program was:" >&5
12847 sed 's/^/| /' conftest.$ac_ext >&5
12848
12849 fi
12850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12851   done
12852 fi
12853 LIBS=$ac_func_search_save_LIBS
12854 fi
12855 echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
12856 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
12857 if test "$ac_cv_search_uuid_to_str" != no; then
12858   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
12859   have_uuid=yes
12860 else
12861   :
12862 fi
12863
12864         LIBS="$save_LIBS"
12865
12866         if test have_uuid = yes ; then
12867
12868 cat >>confdefs.h <<\_ACEOF
12869 #define HAVE_UUID_TO_STR 1
12870 _ACEOF
12871
12872
12873                 test "$ac_cv_search_uuid_to_str" = "none required" || \
12874                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
12875         fi
12876 fi
12877
12878 if test $have_uuid = no ; then
12879         echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
12880 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
12881         save_LIBS="$LIBS"
12882         LIBS="$LIBS -lrpcrt4"
12883         cat >conftest.$ac_ext <<_ACEOF
12884 #line $LINENO "configure"
12885 /* confdefs.h.  */
12886 _ACEOF
12887 cat confdefs.h >>conftest.$ac_ext
12888 cat >>conftest.$ac_ext <<_ACEOF
12889 /* end confdefs.h.  */
12890
12891                 char UuidCreate@4();
12892                 char UuidToStringA@8();
12893
12894 int
12895 main ()
12896 {
12897
12898                 UuidCreate@4();
12899                 UuidToStringA@8();
12900
12901   ;
12902   return 0;
12903 }
12904 _ACEOF
12905 rm -f conftest.$ac_objext conftest$ac_exeext
12906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12907   (eval $ac_link) 2>&5
12908   ac_status=$?
12909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12910   (exit $ac_status); } &&
12911          { ac_try='test -s conftest$ac_exeext'
12912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12913   (eval $ac_try) 2>&5
12914   ac_status=$?
12915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12916   (exit $ac_status); }; }; then
12917   need_rpcrt=yes
12918 else
12919   echo "$as_me: failed program was:" >&5
12920 sed 's/^/| /' conftest.$ac_ext >&5
12921
12922 need_rpcrt=no
12923 fi
12924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12925         if test $need_rpcrt = yes; then
12926                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
12927         fi
12928         LIBS="$save_LIBS"
12929         echo "$as_me:$LINENO: result: $need_rpcrt" >&5
12930 echo "${ECHO_T}$need_rpcrt" >&6
12931 fi
12932
12933 ol_link_dnssrv=no
12934 echo "$as_me:$LINENO: checking for res_query" >&5
12935 echo $ECHO_N "checking for res_query... $ECHO_C" >&6
12936 if test "${ac_cv_func_res_query+set}" = set; then
12937   echo $ECHO_N "(cached) $ECHO_C" >&6
12938 else
12939   cat >conftest.$ac_ext <<_ACEOF
12940 #line $LINENO "configure"
12941 /* confdefs.h.  */
12942 _ACEOF
12943 cat confdefs.h >>conftest.$ac_ext
12944 cat >>conftest.$ac_ext <<_ACEOF
12945 /* end confdefs.h.  */
12946 /* System header to define __stub macros and hopefully few prototypes,
12947     which can conflict with char res_query (); below.
12948     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12949     <limits.h> exists even on freestanding compilers.  */
12950 #ifdef __STDC__
12951 # include <limits.h>
12952 #else
12953 # include <assert.h>
12954 #endif
12955 /* Override any gcc2 internal prototype to avoid an error.  */
12956 #ifdef __cplusplus
12957 extern "C"
12958 {
12959 #endif
12960 /* We use char because int might match the return type of a gcc2
12961    builtin and then its argument prototype would still apply.  */
12962 char res_query ();
12963 /* The GNU C library defines this for functions which it implements
12964     to always fail with ENOSYS.  Some functions are actually named
12965     something starting with __ and the normal name is an alias.  */
12966 #if defined (__stub_res_query) || defined (__stub___res_query)
12967 choke me
12968 #else
12969 char (*f) () = res_query;
12970 #endif
12971 #ifdef __cplusplus
12972 }
12973 #endif
12974
12975 int
12976 main ()
12977 {
12978 return f != res_query;
12979   ;
12980   return 0;
12981 }
12982 _ACEOF
12983 rm -f conftest.$ac_objext conftest$ac_exeext
12984 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12985   (eval $ac_link) 2>&5
12986   ac_status=$?
12987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12988   (exit $ac_status); } &&
12989          { ac_try='test -s conftest$ac_exeext'
12990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12991   (eval $ac_try) 2>&5
12992   ac_status=$?
12993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994   (exit $ac_status); }; }; then
12995   ac_cv_func_res_query=yes
12996 else
12997   echo "$as_me: failed program was:" >&5
12998 sed 's/^/| /' conftest.$ac_ext >&5
12999
13000 ac_cv_func_res_query=no
13001 fi
13002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13003 fi
13004 echo "$as_me:$LINENO: result: $ac_cv_func_res_query" >&5
13005 echo "${ECHO_T}$ac_cv_func_res_query" >&6
13006 if test $ac_cv_func_res_query = yes; then
13007   :
13008 fi
13009
13010 if test $ac_cv_func_res_query = no ; then
13011         echo "$as_me:$LINENO: checking for __res_query" >&5
13012 echo $ECHO_N "checking for __res_query... $ECHO_C" >&6
13013 if test "${ac_cv_func___res_query+set}" = set; then
13014   echo $ECHO_N "(cached) $ECHO_C" >&6
13015 else
13016   cat >conftest.$ac_ext <<_ACEOF
13017 #line $LINENO "configure"
13018 /* confdefs.h.  */
13019 _ACEOF
13020 cat confdefs.h >>conftest.$ac_ext
13021 cat >>conftest.$ac_ext <<_ACEOF
13022 /* end confdefs.h.  */
13023 /* System header to define __stub macros and hopefully few prototypes,
13024     which can conflict with char __res_query (); below.
13025     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13026     <limits.h> exists even on freestanding compilers.  */
13027 #ifdef __STDC__
13028 # include <limits.h>
13029 #else
13030 # include <assert.h>
13031 #endif
13032 /* Override any gcc2 internal prototype to avoid an error.  */
13033 #ifdef __cplusplus
13034 extern "C"
13035 {
13036 #endif
13037 /* We use char because int might match the return type of a gcc2
13038    builtin and then its argument prototype would still apply.  */
13039 char __res_query ();
13040 /* The GNU C library defines this for functions which it implements
13041     to always fail with ENOSYS.  Some functions are actually named
13042     something starting with __ and the normal name is an alias.  */
13043 #if defined (__stub___res_query) || defined (__stub_____res_query)
13044 choke me
13045 #else
13046 char (*f) () = __res_query;
13047 #endif
13048 #ifdef __cplusplus
13049 }
13050 #endif
13051
13052 int
13053 main ()
13054 {
13055 return f != __res_query;
13056   ;
13057   return 0;
13058 }
13059 _ACEOF
13060 rm -f conftest.$ac_objext conftest$ac_exeext
13061 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13062   (eval $ac_link) 2>&5
13063   ac_status=$?
13064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13065   (exit $ac_status); } &&
13066          { ac_try='test -s conftest$ac_exeext'
13067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13068   (eval $ac_try) 2>&5
13069   ac_status=$?
13070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13071   (exit $ac_status); }; }; then
13072   ac_cv_func___res_query=yes
13073 else
13074   echo "$as_me: failed program was:" >&5
13075 sed 's/^/| /' conftest.$ac_ext >&5
13076
13077 ac_cv_func___res_query=no
13078 fi
13079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13080 fi
13081 echo "$as_me:$LINENO: result: $ac_cv_func___res_query" >&5
13082 echo "${ECHO_T}$ac_cv_func___res_query" >&6
13083 if test $ac_cv_func___res_query = yes; then
13084   :
13085 fi
13086
13087         ac_cv_func_res_query=$ac_cv_func___res_query
13088 fi
13089
13090 if test $ac_cv_func_res_query = no ; then
13091
13092 echo "$as_me:$LINENO: checking for res_query in -lbind" >&5
13093 echo $ECHO_N "checking for res_query in -lbind... $ECHO_C" >&6
13094 if test "${ac_cv_lib_bind_res_query+set}" = set; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   ac_check_lib_save_LIBS=$LIBS
13098 LIBS="-lbind  $LIBS"
13099 cat >conftest.$ac_ext <<_ACEOF
13100 #line $LINENO "configure"
13101 /* confdefs.h.  */
13102 _ACEOF
13103 cat confdefs.h >>conftest.$ac_ext
13104 cat >>conftest.$ac_ext <<_ACEOF
13105 /* end confdefs.h.  */
13106
13107 /* Override any gcc2 internal prototype to avoid an error.  */
13108 #ifdef __cplusplus
13109 extern "C"
13110 #endif
13111 /* We use char because int might match the return type of a gcc2
13112    builtin and then its argument prototype would still apply.  */
13113 char res_query ();
13114 int
13115 main ()
13116 {
13117 res_query ();
13118   ;
13119   return 0;
13120 }
13121 _ACEOF
13122 rm -f conftest.$ac_objext conftest$ac_exeext
13123 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13124   (eval $ac_link) 2>&5
13125   ac_status=$?
13126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127   (exit $ac_status); } &&
13128          { ac_try='test -s conftest$ac_exeext'
13129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13130   (eval $ac_try) 2>&5
13131   ac_status=$?
13132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133   (exit $ac_status); }; }; then
13134   ac_cv_lib_bind_res_query=yes
13135 else
13136   echo "$as_me: failed program was:" >&5
13137 sed 's/^/| /' conftest.$ac_ext >&5
13138
13139 ac_cv_lib_bind_res_query=no
13140 fi
13141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13142 LIBS=$ac_check_lib_save_LIBS
13143 fi
13144 echo "$as_me:$LINENO: result: $ac_cv_lib_bind_res_query" >&5
13145 echo "${ECHO_T}$ac_cv_lib_bind_res_query" >&6
13146 if test $ac_cv_lib_bind_res_query = yes; then
13147   cat >>confdefs.h <<_ACEOF
13148 #define HAVE_LIBBIND 1
13149 _ACEOF
13150
13151   LIBS="-lbind $LIBS"
13152
13153 fi
13154
13155         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
13156 fi
13157
13158 if test $ac_cv_func_res_query = no ; then
13159
13160 echo "$as_me:$LINENO: checking for __res_query in -lbind" >&5
13161 echo $ECHO_N "checking for __res_query in -lbind... $ECHO_C" >&6
13162 if test "${ac_cv_lib_bind___res_query+set}" = set; then
13163   echo $ECHO_N "(cached) $ECHO_C" >&6
13164 else
13165   ac_check_lib_save_LIBS=$LIBS
13166 LIBS="-lbind  $LIBS"
13167 cat >conftest.$ac_ext <<_ACEOF
13168 #line $LINENO "configure"
13169 /* confdefs.h.  */
13170 _ACEOF
13171 cat confdefs.h >>conftest.$ac_ext
13172 cat >>conftest.$ac_ext <<_ACEOF
13173 /* end confdefs.h.  */
13174
13175 /* Override any gcc2 internal prototype to avoid an error.  */
13176 #ifdef __cplusplus
13177 extern "C"
13178 #endif
13179 /* We use char because int might match the return type of a gcc2
13180    builtin and then its argument prototype would still apply.  */
13181 char __res_query ();
13182 int
13183 main ()
13184 {
13185 __res_query ();
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 rm -f conftest.$ac_objext conftest$ac_exeext
13191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13192   (eval $ac_link) 2>&5
13193   ac_status=$?
13194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13195   (exit $ac_status); } &&
13196          { ac_try='test -s conftest$ac_exeext'
13197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13198   (eval $ac_try) 2>&5
13199   ac_status=$?
13200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13201   (exit $ac_status); }; }; then
13202   ac_cv_lib_bind___res_query=yes
13203 else
13204   echo "$as_me: failed program was:" >&5
13205 sed 's/^/| /' conftest.$ac_ext >&5
13206
13207 ac_cv_lib_bind___res_query=no
13208 fi
13209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13210 LIBS=$ac_check_lib_save_LIBS
13211 fi
13212 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___res_query" >&5
13213 echo "${ECHO_T}$ac_cv_lib_bind___res_query" >&6
13214 if test $ac_cv_lib_bind___res_query = yes; then
13215   cat >>confdefs.h <<_ACEOF
13216 #define HAVE_LIBBIND 1
13217 _ACEOF
13218
13219   LIBS="-lbind $LIBS"
13220
13221 fi
13222
13223         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
13224 fi
13225
13226 if test $ac_cv_func_res_query = no ; then
13227
13228 echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
13229 echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6
13230 if test "${ac_cv_lib_resolv_res_query+set}" = set; then
13231   echo $ECHO_N "(cached) $ECHO_C" >&6
13232 else
13233   ac_check_lib_save_LIBS=$LIBS
13234 LIBS="-lresolv  $LIBS"
13235 cat >conftest.$ac_ext <<_ACEOF
13236 #line $LINENO "configure"
13237 /* confdefs.h.  */
13238 _ACEOF
13239 cat confdefs.h >>conftest.$ac_ext
13240 cat >>conftest.$ac_ext <<_ACEOF
13241 /* end confdefs.h.  */
13242
13243 /* Override any gcc2 internal prototype to avoid an error.  */
13244 #ifdef __cplusplus
13245 extern "C"
13246 #endif
13247 /* We use char because int might match the return type of a gcc2
13248    builtin and then its argument prototype would still apply.  */
13249 char res_query ();
13250 int
13251 main ()
13252 {
13253 res_query ();
13254   ;
13255   return 0;
13256 }
13257 _ACEOF
13258 rm -f conftest.$ac_objext conftest$ac_exeext
13259 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13260   (eval $ac_link) 2>&5
13261   ac_status=$?
13262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263   (exit $ac_status); } &&
13264          { ac_try='test -s conftest$ac_exeext'
13265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266   (eval $ac_try) 2>&5
13267   ac_status=$?
13268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269   (exit $ac_status); }; }; then
13270   ac_cv_lib_resolv_res_query=yes
13271 else
13272   echo "$as_me: failed program was:" >&5
13273 sed 's/^/| /' conftest.$ac_ext >&5
13274
13275 ac_cv_lib_resolv_res_query=no
13276 fi
13277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13278 LIBS=$ac_check_lib_save_LIBS
13279 fi
13280 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5
13281 echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6
13282 if test $ac_cv_lib_resolv_res_query = yes; then
13283   cat >>confdefs.h <<_ACEOF
13284 #define HAVE_LIBRESOLV 1
13285 _ACEOF
13286
13287   LIBS="-lresolv $LIBS"
13288
13289 fi
13290
13291         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
13292 fi
13293
13294 if test $ac_cv_func_res_query = no ; then
13295
13296 echo "$as_me:$LINENO: checking for __res_query in -lresolv" >&5
13297 echo $ECHO_N "checking for __res_query in -lresolv... $ECHO_C" >&6
13298 if test "${ac_cv_lib_resolv___res_query+set}" = set; then
13299   echo $ECHO_N "(cached) $ECHO_C" >&6
13300 else
13301   ac_check_lib_save_LIBS=$LIBS
13302 LIBS="-lresolv  $LIBS"
13303 cat >conftest.$ac_ext <<_ACEOF
13304 #line $LINENO "configure"
13305 /* confdefs.h.  */
13306 _ACEOF
13307 cat confdefs.h >>conftest.$ac_ext
13308 cat >>conftest.$ac_ext <<_ACEOF
13309 /* end confdefs.h.  */
13310
13311 /* Override any gcc2 internal prototype to avoid an error.  */
13312 #ifdef __cplusplus
13313 extern "C"
13314 #endif
13315 /* We use char because int might match the return type of a gcc2
13316    builtin and then its argument prototype would still apply.  */
13317 char __res_query ();
13318 int
13319 main ()
13320 {
13321 __res_query ();
13322   ;
13323   return 0;
13324 }
13325 _ACEOF
13326 rm -f conftest.$ac_objext conftest$ac_exeext
13327 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13328   (eval $ac_link) 2>&5
13329   ac_status=$?
13330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331   (exit $ac_status); } &&
13332          { ac_try='test -s conftest$ac_exeext'
13333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13334   (eval $ac_try) 2>&5
13335   ac_status=$?
13336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13337   (exit $ac_status); }; }; then
13338   ac_cv_lib_resolv___res_query=yes
13339 else
13340   echo "$as_me: failed program was:" >&5
13341 sed 's/^/| /' conftest.$ac_ext >&5
13342
13343 ac_cv_lib_resolv___res_query=no
13344 fi
13345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13346 LIBS=$ac_check_lib_save_LIBS
13347 fi
13348 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_query" >&5
13349 echo "${ECHO_T}$ac_cv_lib_resolv___res_query" >&6
13350 if test $ac_cv_lib_resolv___res_query = yes; then
13351   cat >>confdefs.h <<_ACEOF
13352 #define HAVE_LIBRESOLV 1
13353 _ACEOF
13354
13355   LIBS="-lresolv $LIBS"
13356
13357 fi
13358
13359         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
13360 fi
13361
13362 if test "$ac_cv_func_res_query" = yes ; then
13363
13364 cat >>confdefs.h <<\_ACEOF
13365 #define HAVE_RES_QUERY 1
13366 _ACEOF
13367
13368
13369         if test $ol_enable_dnssrv != no ; then
13370                 ol_link_dnssrv=yes
13371         fi
13372 fi
13373
13374 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
13375         { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
13376 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
13377    { (exit 1); exit 1; }; }
13378 fi
13379
13380
13381
13382
13383
13384 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
13385 do
13386 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13387 echo "$as_me:$LINENO: checking for $ac_func" >&5
13388 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13389 if eval "test \"\${$as_ac_var+set}\" = set"; then
13390   echo $ECHO_N "(cached) $ECHO_C" >&6
13391 else
13392   cat >conftest.$ac_ext <<_ACEOF
13393 #line $LINENO "configure"
13394 /* confdefs.h.  */
13395 _ACEOF
13396 cat confdefs.h >>conftest.$ac_ext
13397 cat >>conftest.$ac_ext <<_ACEOF
13398 /* end confdefs.h.  */
13399 /* System header to define __stub macros and hopefully few prototypes,
13400     which can conflict with char $ac_func (); below.
13401     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13402     <limits.h> exists even on freestanding compilers.  */
13403 #ifdef __STDC__
13404 # include <limits.h>
13405 #else
13406 # include <assert.h>
13407 #endif
13408 /* Override any gcc2 internal prototype to avoid an error.  */
13409 #ifdef __cplusplus
13410 extern "C"
13411 {
13412 #endif
13413 /* We use char because int might match the return type of a gcc2
13414    builtin and then its argument prototype would still apply.  */
13415 char $ac_func ();
13416 /* The GNU C library defines this for functions which it implements
13417     to always fail with ENOSYS.  Some functions are actually named
13418     something starting with __ and the normal name is an alias.  */
13419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13420 choke me
13421 #else
13422 char (*f) () = $ac_func;
13423 #endif
13424 #ifdef __cplusplus
13425 }
13426 #endif
13427
13428 int
13429 main ()
13430 {
13431 return f != $ac_func;
13432   ;
13433   return 0;
13434 }
13435 _ACEOF
13436 rm -f conftest.$ac_objext conftest$ac_exeext
13437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13438   (eval $ac_link) 2>&5
13439   ac_status=$?
13440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441   (exit $ac_status); } &&
13442          { ac_try='test -s conftest$ac_exeext'
13443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13444   (eval $ac_try) 2>&5
13445   ac_status=$?
13446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13447   (exit $ac_status); }; }; then
13448   eval "$as_ac_var=yes"
13449 else
13450   echo "$as_me: failed program was:" >&5
13451 sed 's/^/| /' conftest.$ac_ext >&5
13452
13453 eval "$as_ac_var=no"
13454 fi
13455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13456 fi
13457 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13458 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13459 if test `eval echo '${'$as_ac_var'}'` = yes; then
13460   cat >>confdefs.h <<_ACEOF
13461 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13462 _ACEOF
13463
13464 fi
13465 done
13466
13467
13468 ol_link_ipv6=no
13469 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
13470         if test $ol_enable_ipv6 = yes ; then
13471                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
13472 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
13473    { (exit 1); exit 1; }; }
13474         fi
13475 elif test $ol_enable_ipv6 != no ; then
13476         echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
13477 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
13478 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
13479   echo $ECHO_N "(cached) $ECHO_C" >&6
13480 else
13481
13482                 cat >conftest.$ac_ext <<_ACEOF
13483 #line $LINENO "configure"
13484 /* confdefs.h.  */
13485 _ACEOF
13486 cat confdefs.h >>conftest.$ac_ext
13487 cat >>conftest.$ac_ext <<_ACEOF
13488 /* end confdefs.h.  */
13489
13490 #                       include <netinet/in.h>
13491 #                       ifdef INET6_ADDRSTRLEN
13492                                 __has_inet6_addrstrlen__;
13493 #                       endif
13494
13495 _ACEOF
13496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13497   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
13498   ol_cv_inet6_addrstrlen=yes
13499 else
13500   ol_cv_inet6_addrstrlen=no
13501 fi
13502 rm -f conftest*
13503
13504 fi
13505 echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
13506 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
13507
13508
13509         echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
13510 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
13511 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
13512   echo $ECHO_N "(cached) $ECHO_C" >&6
13513 else
13514
13515                 cat >conftest.$ac_ext <<_ACEOF
13516 #line $LINENO "configure"
13517 /* confdefs.h.  */
13518 _ACEOF
13519 cat confdefs.h >>conftest.$ac_ext
13520 cat >>conftest.$ac_ext <<_ACEOF
13521 /* end confdefs.h.  */
13522
13523 #include <sys/types.h>
13524 #include <sys/socket.h>
13525
13526 int
13527 main ()
13528 {
13529
13530                         struct sockaddr_storage ss;
13531
13532   ;
13533   return 0;
13534 }
13535 _ACEOF
13536 rm -f conftest.$ac_objext
13537 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13538   (eval $ac_compile) 2>&5
13539   ac_status=$?
13540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13541   (exit $ac_status); } &&
13542          { ac_try='test -s conftest.$ac_objext'
13543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13544   (eval $ac_try) 2>&5
13545   ac_status=$?
13546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13547   (exit $ac_status); }; }; then
13548   ol_cv_struct_sockaddr_storage=yes
13549 else
13550   echo "$as_me: failed program was:" >&5
13551 sed 's/^/| /' conftest.$ac_ext >&5
13552
13553 ol_cv_struct_sockaddr_storage=no
13554 fi
13555 rm -f conftest.$ac_objext conftest.$ac_ext
13556 fi
13557 echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
13558 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
13559
13560         if test $ol_cv_inet6_addrstrlen = yes \
13561                 -a $ol_cv_struct_sockaddr_storage = yes ; then
13562                 ol_link_ipv6=yes
13563         elif test $ol_enable_ipv6 = yes \
13564                         -a $ol_cv_inet6_addrstrlen = no ; then
13565                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
13566 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
13567    { (exit 1); exit 1; }; }
13568         elif test $ol_enable_ipv6 = yes \
13569                         -a $ol_cv_struct_sockaddr_storage = no ; then
13570                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
13571 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
13572    { (exit 1); exit 1; }; }
13573         fi
13574 fi
13575
13576 if test $ol_enable_local != no ; then
13577
13578 for ac_header in sys/un.h
13579 do
13580 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13581 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13582   echo "$as_me:$LINENO: checking for $ac_header" >&5
13583 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13584 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 fi
13587 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13588 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13589 else
13590   # Is the header compilable?
13591 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13592 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13593 cat >conftest.$ac_ext <<_ACEOF
13594 #line $LINENO "configure"
13595 /* confdefs.h.  */
13596 _ACEOF
13597 cat confdefs.h >>conftest.$ac_ext
13598 cat >>conftest.$ac_ext <<_ACEOF
13599 /* end confdefs.h.  */
13600 $ac_includes_default
13601 #include <$ac_header>
13602 _ACEOF
13603 rm -f conftest.$ac_objext
13604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13605   (eval $ac_compile) 2>&5
13606   ac_status=$?
13607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608   (exit $ac_status); } &&
13609          { ac_try='test -s conftest.$ac_objext'
13610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13611   (eval $ac_try) 2>&5
13612   ac_status=$?
13613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13614   (exit $ac_status); }; }; then
13615   ac_header_compiler=yes
13616 else
13617   echo "$as_me: failed program was:" >&5
13618 sed 's/^/| /' conftest.$ac_ext >&5
13619
13620 ac_header_compiler=no
13621 fi
13622 rm -f conftest.$ac_objext conftest.$ac_ext
13623 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13624 echo "${ECHO_T}$ac_header_compiler" >&6
13625
13626 # Is the header present?
13627 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13628 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13629 cat >conftest.$ac_ext <<_ACEOF
13630 #line $LINENO "configure"
13631 /* confdefs.h.  */
13632 _ACEOF
13633 cat confdefs.h >>conftest.$ac_ext
13634 cat >>conftest.$ac_ext <<_ACEOF
13635 /* end confdefs.h.  */
13636 #include <$ac_header>
13637 _ACEOF
13638 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13639   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13640   ac_status=$?
13641   grep -v '^ *+' conftest.er1 >conftest.err
13642   rm -f conftest.er1
13643   cat conftest.err >&5
13644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645   (exit $ac_status); } >/dev/null; then
13646   if test -s conftest.err; then
13647     ac_cpp_err=$ac_c_preproc_warn_flag
13648   else
13649     ac_cpp_err=
13650   fi
13651 else
13652   ac_cpp_err=yes
13653 fi
13654 if test -z "$ac_cpp_err"; then
13655   ac_header_preproc=yes
13656 else
13657   echo "$as_me: failed program was:" >&5
13658 sed 's/^/| /' conftest.$ac_ext >&5
13659
13660   ac_header_preproc=no
13661 fi
13662 rm -f conftest.err conftest.$ac_ext
13663 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13664 echo "${ECHO_T}$ac_header_preproc" >&6
13665
13666 # So?  What about this header?
13667 case $ac_header_compiler:$ac_header_preproc in
13668   yes:no )
13669     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13670 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13671     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13672 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13673     (
13674       cat <<\_ASBOX
13675 ## ------------------------------------ ##
13676 ## Report this to bug-autoconf@gnu.org. ##
13677 ## ------------------------------------ ##
13678 _ASBOX
13679     ) |
13680       sed "s/^/$as_me: WARNING:     /" >&2
13681     ;;
13682   no:yes )
13683     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13684 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13685     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13686 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13687     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13688 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13689     (
13690       cat <<\_ASBOX
13691 ## ------------------------------------ ##
13692 ## Report this to bug-autoconf@gnu.org. ##
13693 ## ------------------------------------ ##
13694 _ASBOX
13695     ) |
13696       sed "s/^/$as_me: WARNING:     /" >&2
13697     ;;
13698 esac
13699 echo "$as_me:$LINENO: checking for $ac_header" >&5
13700 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13701 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13702   echo $ECHO_N "(cached) $ECHO_C" >&6
13703 else
13704   eval "$as_ac_Header=$ac_header_preproc"
13705 fi
13706 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13708
13709 fi
13710 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13711   cat >>confdefs.h <<_ACEOF
13712 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13713 _ACEOF
13714
13715 fi
13716
13717 done
13718
13719
13720         if test $ol_enable_local = auto ; then
13721                 ol_enable_local=$ac_cv_header_sys_un_h
13722         elif test $ac_cv_header_sys_un_h = no ; then
13723                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
13724 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
13725    { (exit 1); exit 1; }; }
13726         fi
13727 fi
13728
13729 ol_link_kbind=no
13730 ol_link_kpasswd=no
13731 ol_link_krb5=no
13732 ol_link_krb4=no
13733
13734 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
13735         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
13736         -o $ol_with_kerberos = k425 ; then
13737
13738
13739 for ac_header in krb5.h
13740 do
13741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13743   echo "$as_me:$LINENO: checking for $ac_header" >&5
13744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13746   echo $ECHO_N "(cached) $ECHO_C" >&6
13747 fi
13748 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13749 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13750 else
13751   # Is the header compilable?
13752 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13753 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13754 cat >conftest.$ac_ext <<_ACEOF
13755 #line $LINENO "configure"
13756 /* confdefs.h.  */
13757 _ACEOF
13758 cat confdefs.h >>conftest.$ac_ext
13759 cat >>conftest.$ac_ext <<_ACEOF
13760 /* end confdefs.h.  */
13761 $ac_includes_default
13762 #include <$ac_header>
13763 _ACEOF
13764 rm -f conftest.$ac_objext
13765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13766   (eval $ac_compile) 2>&5
13767   ac_status=$?
13768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769   (exit $ac_status); } &&
13770          { ac_try='test -s conftest.$ac_objext'
13771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13772   (eval $ac_try) 2>&5
13773   ac_status=$?
13774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775   (exit $ac_status); }; }; then
13776   ac_header_compiler=yes
13777 else
13778   echo "$as_me: failed program was:" >&5
13779 sed 's/^/| /' conftest.$ac_ext >&5
13780
13781 ac_header_compiler=no
13782 fi
13783 rm -f conftest.$ac_objext conftest.$ac_ext
13784 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13785 echo "${ECHO_T}$ac_header_compiler" >&6
13786
13787 # Is the header present?
13788 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13789 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13790 cat >conftest.$ac_ext <<_ACEOF
13791 #line $LINENO "configure"
13792 /* confdefs.h.  */
13793 _ACEOF
13794 cat confdefs.h >>conftest.$ac_ext
13795 cat >>conftest.$ac_ext <<_ACEOF
13796 /* end confdefs.h.  */
13797 #include <$ac_header>
13798 _ACEOF
13799 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13801   ac_status=$?
13802   grep -v '^ *+' conftest.er1 >conftest.err
13803   rm -f conftest.er1
13804   cat conftest.err >&5
13805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806   (exit $ac_status); } >/dev/null; then
13807   if test -s conftest.err; then
13808     ac_cpp_err=$ac_c_preproc_warn_flag
13809   else
13810     ac_cpp_err=
13811   fi
13812 else
13813   ac_cpp_err=yes
13814 fi
13815 if test -z "$ac_cpp_err"; then
13816   ac_header_preproc=yes
13817 else
13818   echo "$as_me: failed program was:" >&5
13819 sed 's/^/| /' conftest.$ac_ext >&5
13820
13821   ac_header_preproc=no
13822 fi
13823 rm -f conftest.err conftest.$ac_ext
13824 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13825 echo "${ECHO_T}$ac_header_preproc" >&6
13826
13827 # So?  What about this header?
13828 case $ac_header_compiler:$ac_header_preproc in
13829   yes:no )
13830     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13831 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13832     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13833 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13834     (
13835       cat <<\_ASBOX
13836 ## ------------------------------------ ##
13837 ## Report this to bug-autoconf@gnu.org. ##
13838 ## ------------------------------------ ##
13839 _ASBOX
13840     ) |
13841       sed "s/^/$as_me: WARNING:     /" >&2
13842     ;;
13843   no:yes )
13844     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13845 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13846     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13847 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13848     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13849 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13850     (
13851       cat <<\_ASBOX
13852 ## ------------------------------------ ##
13853 ## Report this to bug-autoconf@gnu.org. ##
13854 ## ------------------------------------ ##
13855 _ASBOX
13856     ) |
13857       sed "s/^/$as_me: WARNING:     /" >&2
13858     ;;
13859 esac
13860 echo "$as_me:$LINENO: checking for $ac_header" >&5
13861 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13863   echo $ECHO_N "(cached) $ECHO_C" >&6
13864 else
13865   eval "$as_ac_Header=$ac_header_preproc"
13866 fi
13867 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13868 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13869
13870 fi
13871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13872   cat >>confdefs.h <<_ACEOF
13873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13874 _ACEOF
13875
13876 fi
13877
13878 done
13879
13880
13881         if test $ac_cv_header_krb5_h = yes ; then
13882
13883 for ac_header in heim_err.h
13884 do
13885 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13886 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13887   echo "$as_me:$LINENO: checking for $ac_header" >&5
13888 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13889 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13890   echo $ECHO_N "(cached) $ECHO_C" >&6
13891 fi
13892 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13893 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13894 else
13895   # Is the header compilable?
13896 echo "$as_me:$LINENO: checking $ac_header usability" >&5
13897 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
13898 cat >conftest.$ac_ext <<_ACEOF
13899 #line $LINENO "configure"
13900 /* confdefs.h.  */
13901 _ACEOF
13902 cat confdefs.h >>conftest.$ac_ext
13903 cat >>conftest.$ac_ext <<_ACEOF
13904 /* end confdefs.h.  */
13905 $ac_includes_default
13906 #include <$ac_header>
13907 _ACEOF
13908 rm -f conftest.$ac_objext
13909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13910   (eval $ac_compile) 2>&5
13911   ac_status=$?
13912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13913   (exit $ac_status); } &&
13914          { ac_try='test -s conftest.$ac_objext'
13915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13916   (eval $ac_try) 2>&5
13917   ac_status=$?
13918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13919   (exit $ac_status); }; }; then
13920   ac_header_compiler=yes
13921 else
13922   echo "$as_me: failed program was:" >&5
13923 sed 's/^/| /' conftest.$ac_ext >&5
13924
13925 ac_header_compiler=no
13926 fi
13927 rm -f conftest.$ac_objext conftest.$ac_ext
13928 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13929 echo "${ECHO_T}$ac_header_compiler" >&6
13930
13931 # Is the header present?
13932 echo "$as_me:$LINENO: checking $ac_header presence" >&5
13933 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
13934 cat >conftest.$ac_ext <<_ACEOF
13935 #line $LINENO "configure"
13936 /* confdefs.h.  */
13937 _ACEOF
13938 cat confdefs.h >>conftest.$ac_ext
13939 cat >>conftest.$ac_ext <<_ACEOF
13940 /* end confdefs.h.  */
13941 #include <$ac_header>
13942 _ACEOF
13943 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13945   ac_status=$?
13946   grep -v '^ *+' conftest.er1 >conftest.err
13947   rm -f conftest.er1
13948   cat conftest.err >&5
13949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950   (exit $ac_status); } >/dev/null; then
13951   if test -s conftest.err; then
13952     ac_cpp_err=$ac_c_preproc_warn_flag
13953   else
13954     ac_cpp_err=
13955   fi
13956 else
13957   ac_cpp_err=yes
13958 fi
13959 if test -z "$ac_cpp_err"; then
13960   ac_header_preproc=yes
13961 else
13962   echo "$as_me: failed program was:" >&5
13963 sed 's/^/| /' conftest.$ac_ext >&5
13964
13965   ac_header_preproc=no
13966 fi
13967 rm -f conftest.err conftest.$ac_ext
13968 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13969 echo "${ECHO_T}$ac_header_preproc" >&6
13970
13971 # So?  What about this header?
13972 case $ac_header_compiler:$ac_header_preproc in
13973   yes:no )
13974     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13975 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13976     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13977 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13978     (
13979       cat <<\_ASBOX
13980 ## ------------------------------------ ##
13981 ## Report this to bug-autoconf@gnu.org. ##
13982 ## ------------------------------------ ##
13983 _ASBOX
13984     ) |
13985       sed "s/^/$as_me: WARNING:     /" >&2
13986     ;;
13987   no:yes )
13988     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13989 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13990     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13991 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13992     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13993 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13994     (
13995       cat <<\_ASBOX
13996 ## ------------------------------------ ##
13997 ## Report this to bug-autoconf@gnu.org. ##
13998 ## ------------------------------------ ##
13999 _ASBOX
14000     ) |
14001       sed "s/^/$as_me: WARNING:     /" >&2
14002     ;;
14003 esac
14004 echo "$as_me:$LINENO: checking for $ac_header" >&5
14005 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14006 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009   eval "$as_ac_Header=$ac_header_preproc"
14010 fi
14011 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14012 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14013
14014 fi
14015 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14016   cat >>confdefs.h <<_ACEOF
14017 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14018 _ACEOF
14019
14020 fi
14021
14022 done
14023
14024                 if test $ac_cv_header_heim_err_h = yes ; then
14025                         krb5_impl=heimdal
14026                 else
14027                         krb5_impl=mit
14028                 fi
14029
14030                 if test $krb5_impl = mit; then
14031                         echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
14032 echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
14033 if test "${ac_cv_lib_k5crypto_main+set}" = set; then
14034   echo $ECHO_N "(cached) $ECHO_C" >&6
14035 else
14036   ac_check_lib_save_LIBS=$LIBS
14037 LIBS="-lk5crypto  $LIBS"
14038 cat >conftest.$ac_ext <<_ACEOF
14039 #line $LINENO "configure"
14040 /* confdefs.h.  */
14041 _ACEOF
14042 cat confdefs.h >>conftest.$ac_ext
14043 cat >>conftest.$ac_ext <<_ACEOF
14044 /* end confdefs.h.  */
14045
14046
14047 int
14048 main ()
14049 {
14050 main ();
14051   ;
14052   return 0;
14053 }
14054 _ACEOF
14055 rm -f conftest.$ac_objext conftest$ac_exeext
14056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14057   (eval $ac_link) 2>&5
14058   ac_status=$?
14059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14060   (exit $ac_status); } &&
14061          { ac_try='test -s conftest$ac_exeext'
14062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14063   (eval $ac_try) 2>&5
14064   ac_status=$?
14065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14066   (exit $ac_status); }; }; then
14067   ac_cv_lib_k5crypto_main=yes
14068 else
14069   echo "$as_me: failed program was:" >&5
14070 sed 's/^/| /' conftest.$ac_ext >&5
14071
14072 ac_cv_lib_k5crypto_main=no
14073 fi
14074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14075 LIBS=$ac_check_lib_save_LIBS
14076 fi
14077 echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_main" >&5
14078 echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
14079 if test $ac_cv_lib_k5crypto_main = yes; then
14080   krb5crypto=k5crypto
14081 else
14082   krb5crypto=crypto
14083 fi
14084
14085
14086                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
14087 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
14088 if test "${ac_cv_lib_krb5_main+set}" = set; then
14089   echo $ECHO_N "(cached) $ECHO_C" >&6
14090 else
14091   ac_check_lib_save_LIBS=$LIBS
14092 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
14093 cat >conftest.$ac_ext <<_ACEOF
14094 #line $LINENO "configure"
14095 /* confdefs.h.  */
14096 _ACEOF
14097 cat confdefs.h >>conftest.$ac_ext
14098 cat >>conftest.$ac_ext <<_ACEOF
14099 /* end confdefs.h.  */
14100
14101
14102 int
14103 main ()
14104 {
14105 main ();
14106   ;
14107   return 0;
14108 }
14109 _ACEOF
14110 rm -f conftest.$ac_objext conftest$ac_exeext
14111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14112   (eval $ac_link) 2>&5
14113   ac_status=$?
14114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115   (exit $ac_status); } &&
14116          { ac_try='test -s conftest$ac_exeext'
14117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14118   (eval $ac_try) 2>&5
14119   ac_status=$?
14120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121   (exit $ac_status); }; }; then
14122   ac_cv_lib_krb5_main=yes
14123 else
14124   echo "$as_me: failed program was:" >&5
14125 sed 's/^/| /' conftest.$ac_ext >&5
14126
14127 ac_cv_lib_krb5_main=no
14128 fi
14129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14130 LIBS=$ac_check_lib_save_LIBS
14131 fi
14132 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
14133 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
14134 if test $ac_cv_lib_krb5_main = yes; then
14135   have_krb5=yes
14136                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
14137 else
14138   have_krb5=no
14139 fi
14140
14141
14142                 elif test $krb5_impl = heimdal; then
14143                         echo "$as_me:$LINENO: checking for main in -ldes" >&5
14144 echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
14145 if test "${ac_cv_lib_des_main+set}" = set; then
14146   echo $ECHO_N "(cached) $ECHO_C" >&6
14147 else
14148   ac_check_lib_save_LIBS=$LIBS
14149 LIBS="-ldes  $LIBS"
14150 cat >conftest.$ac_ext <<_ACEOF
14151 #line $LINENO "configure"
14152 /* confdefs.h.  */
14153 _ACEOF
14154 cat confdefs.h >>conftest.$ac_ext
14155 cat >>conftest.$ac_ext <<_ACEOF
14156 /* end confdefs.h.  */
14157
14158
14159 int
14160 main ()
14161 {
14162 main ();
14163   ;
14164   return 0;
14165 }
14166 _ACEOF
14167 rm -f conftest.$ac_objext conftest$ac_exeext
14168 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14169   (eval $ac_link) 2>&5
14170   ac_status=$?
14171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172   (exit $ac_status); } &&
14173          { ac_try='test -s conftest$ac_exeext'
14174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14175   (eval $ac_try) 2>&5
14176   ac_status=$?
14177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14178   (exit $ac_status); }; }; then
14179   ac_cv_lib_des_main=yes
14180 else
14181   echo "$as_me: failed program was:" >&5
14182 sed 's/^/| /' conftest.$ac_ext >&5
14183
14184 ac_cv_lib_des_main=no
14185 fi
14186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14187 LIBS=$ac_check_lib_save_LIBS
14188 fi
14189 echo "$as_me:$LINENO: result: $ac_cv_lib_des_main" >&5
14190 echo "${ECHO_T}$ac_cv_lib_des_main" >&6
14191 if test $ac_cv_lib_des_main = yes; then
14192   krb5crypto=des
14193 else
14194   krb5crypto=crypto
14195 fi
14196
14197
14198                         echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
14199 echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
14200 if test "${ac_cv_lib_krb5_main+set}" = set; then
14201   echo $ECHO_N "(cached) $ECHO_C" >&6
14202 else
14203   ac_check_lib_save_LIBS=$LIBS
14204 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
14205 cat >conftest.$ac_ext <<_ACEOF
14206 #line $LINENO "configure"
14207 /* confdefs.h.  */
14208 _ACEOF
14209 cat confdefs.h >>conftest.$ac_ext
14210 cat >>conftest.$ac_ext <<_ACEOF
14211 /* end confdefs.h.  */
14212
14213
14214 int
14215 main ()
14216 {
14217 main ();
14218   ;
14219   return 0;
14220 }
14221 _ACEOF
14222 rm -f conftest.$ac_objext conftest$ac_exeext
14223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14224   (eval $ac_link) 2>&5
14225   ac_status=$?
14226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227   (exit $ac_status); } &&
14228          { ac_try='test -s conftest$ac_exeext'
14229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230   (eval $ac_try) 2>&5
14231   ac_status=$?
14232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233   (exit $ac_status); }; }; then
14234   ac_cv_lib_krb5_main=yes
14235 else
14236   echo "$as_me: failed program was:" >&5
14237 sed 's/^/| /' conftest.$ac_ext >&5
14238
14239 ac_cv_lib_krb5_main=no
14240 fi
14241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14242 LIBS=$ac_check_lib_save_LIBS
14243 fi
14244 echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_main" >&5
14245 echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
14246 if test $ac_cv_lib_krb5_main = yes; then
14247   have_krb5=yes
14248                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
14249 else
14250   have_krb5=no
14251 fi
14252
14253
14254
14255 cat >>confdefs.h <<\_ACEOF
14256 #define HAVE_HEIMDAL_KERBEROS 1
14257 _ACEOF
14258
14259
14260                 else
14261                         have_krb5=no
14262                         { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
14263 echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
14264                 fi
14265
14266                 if test $have_krb5 = yes ; then
14267                         ol_link_krb5=yes
14268
14269
14270 cat >>confdefs.h <<\_ACEOF
14271 #define HAVE_KRB5 1
14272 _ACEOF
14273
14274
14275                         if test $ol_enable_kpasswd != no ; then
14276                                 ol_link_kpasswd=yes;
14277                         fi
14278
14279                         if test $ol_with_kerberos = k5only ; then
14280                                 ol_with_kerberos=found
14281                         fi
14282
14283                 elif test $ol_with_kerberos != auto ; then
14284                         { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
14285 echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
14286    { (exit 1); exit 1; }; }
14287                 fi
14288
14289         fi
14290 fi
14291
14292 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
14293         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
14294
14295
14296
14297 for ac_header in kerberosIV/krb.h kerberosIV/des.h
14298 do
14299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14301   echo "$as_me:$LINENO: checking for $ac_header" >&5
14302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14304   echo $ECHO_N "(cached) $ECHO_C" >&6
14305 fi
14306 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14307 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14308 else
14309   # Is the header compilable?
14310 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14311 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14312 cat >conftest.$ac_ext <<_ACEOF
14313 #line $LINENO "configure"
14314 /* confdefs.h.  */
14315 _ACEOF
14316 cat confdefs.h >>conftest.$ac_ext
14317 cat >>conftest.$ac_ext <<_ACEOF
14318 /* end confdefs.h.  */
14319 $ac_includes_default
14320 #include <$ac_header>
14321 _ACEOF
14322 rm -f conftest.$ac_objext
14323 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14324   (eval $ac_compile) 2>&5
14325   ac_status=$?
14326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14327   (exit $ac_status); } &&
14328          { ac_try='test -s conftest.$ac_objext'
14329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14330   (eval $ac_try) 2>&5
14331   ac_status=$?
14332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333   (exit $ac_status); }; }; then
14334   ac_header_compiler=yes
14335 else
14336   echo "$as_me: failed program was:" >&5
14337 sed 's/^/| /' conftest.$ac_ext >&5
14338
14339 ac_header_compiler=no
14340 fi
14341 rm -f conftest.$ac_objext conftest.$ac_ext
14342 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14343 echo "${ECHO_T}$ac_header_compiler" >&6
14344
14345 # Is the header present?
14346 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14347 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14348 cat >conftest.$ac_ext <<_ACEOF
14349 #line $LINENO "configure"
14350 /* confdefs.h.  */
14351 _ACEOF
14352 cat confdefs.h >>conftest.$ac_ext
14353 cat >>conftest.$ac_ext <<_ACEOF
14354 /* end confdefs.h.  */
14355 #include <$ac_header>
14356 _ACEOF
14357 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14358   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14359   ac_status=$?
14360   grep -v '^ *+' conftest.er1 >conftest.err
14361   rm -f conftest.er1
14362   cat conftest.err >&5
14363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14364   (exit $ac_status); } >/dev/null; then
14365   if test -s conftest.err; then
14366     ac_cpp_err=$ac_c_preproc_warn_flag
14367   else
14368     ac_cpp_err=
14369   fi
14370 else
14371   ac_cpp_err=yes
14372 fi
14373 if test -z "$ac_cpp_err"; then
14374   ac_header_preproc=yes
14375 else
14376   echo "$as_me: failed program was:" >&5
14377 sed 's/^/| /' conftest.$ac_ext >&5
14378
14379   ac_header_preproc=no
14380 fi
14381 rm -f conftest.err conftest.$ac_ext
14382 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14383 echo "${ECHO_T}$ac_header_preproc" >&6
14384
14385 # So?  What about this header?
14386 case $ac_header_compiler:$ac_header_preproc in
14387   yes:no )
14388     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14389 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14390     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14391 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14392     (
14393       cat <<\_ASBOX
14394 ## ------------------------------------ ##
14395 ## Report this to bug-autoconf@gnu.org. ##
14396 ## ------------------------------------ ##
14397 _ASBOX
14398     ) |
14399       sed "s/^/$as_me: WARNING:     /" >&2
14400     ;;
14401   no:yes )
14402     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14403 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14404     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14405 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14406     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14407 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14408     (
14409       cat <<\_ASBOX
14410 ## ------------------------------------ ##
14411 ## Report this to bug-autoconf@gnu.org. ##
14412 ## ------------------------------------ ##
14413 _ASBOX
14414     ) |
14415       sed "s/^/$as_me: WARNING:     /" >&2
14416     ;;
14417 esac
14418 echo "$as_me:$LINENO: checking for $ac_header" >&5
14419 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14420 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14421   echo $ECHO_N "(cached) $ECHO_C" >&6
14422 else
14423   eval "$as_ac_Header=$ac_header_preproc"
14424 fi
14425 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14426 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14427
14428 fi
14429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14430   cat >>confdefs.h <<_ACEOF
14431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14432 _ACEOF
14433
14434 fi
14435
14436 done
14437
14438
14439         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
14440                 if test $krb5_impl = mit; then
14441                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
14442 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
14443 if test "${ac_cv_lib_krb4_main+set}" = set; then
14444   echo $ECHO_N "(cached) $ECHO_C" >&6
14445 else
14446   ac_check_lib_save_LIBS=$LIBS
14447 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
14448 cat >conftest.$ac_ext <<_ACEOF
14449 #line $LINENO "configure"
14450 /* confdefs.h.  */
14451 _ACEOF
14452 cat confdefs.h >>conftest.$ac_ext
14453 cat >>conftest.$ac_ext <<_ACEOF
14454 /* end confdefs.h.  */
14455
14456
14457 int
14458 main ()
14459 {
14460 main ();
14461   ;
14462   return 0;
14463 }
14464 _ACEOF
14465 rm -f conftest.$ac_objext conftest$ac_exeext
14466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14467   (eval $ac_link) 2>&5
14468   ac_status=$?
14469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14470   (exit $ac_status); } &&
14471          { ac_try='test -s conftest$ac_exeext'
14472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14473   (eval $ac_try) 2>&5
14474   ac_status=$?
14475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14476   (exit $ac_status); }; }; then
14477   ac_cv_lib_krb4_main=yes
14478 else
14479   echo "$as_me: failed program was:" >&5
14480 sed 's/^/| /' conftest.$ac_ext >&5
14481
14482 ac_cv_lib_krb4_main=no
14483 fi
14484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14485 LIBS=$ac_check_lib_save_LIBS
14486 fi
14487 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
14488 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
14489 if test $ac_cv_lib_krb4_main = yes; then
14490   have_k425=yes
14491                                 KRB4_LIBS="-lkrb4 -ldes425"
14492 else
14493   have_k425=no
14494 fi
14495
14496
14497                 elif test $krb5_impl = heimdal; then
14498                         echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
14499 echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
14500 if test "${ac_cv_lib_krb4_main+set}" = set; then
14501   echo $ECHO_N "(cached) $ECHO_C" >&6
14502 else
14503   ac_check_lib_save_LIBS=$LIBS
14504 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
14505 cat >conftest.$ac_ext <<_ACEOF
14506 #line $LINENO "configure"
14507 /* confdefs.h.  */
14508 _ACEOF
14509 cat confdefs.h >>conftest.$ac_ext
14510 cat >>conftest.$ac_ext <<_ACEOF
14511 /* end confdefs.h.  */
14512
14513
14514 int
14515 main ()
14516 {
14517 main ();
14518   ;
14519   return 0;
14520 }
14521 _ACEOF
14522 rm -f conftest.$ac_objext conftest$ac_exeext
14523 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14524   (eval $ac_link) 2>&5
14525   ac_status=$?
14526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14527   (exit $ac_status); } &&
14528          { ac_try='test -s conftest$ac_exeext'
14529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14530   (eval $ac_try) 2>&5
14531   ac_status=$?
14532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14533   (exit $ac_status); }; }; then
14534   ac_cv_lib_krb4_main=yes
14535 else
14536   echo "$as_me: failed program was:" >&5
14537 sed 's/^/| /' conftest.$ac_ext >&5
14538
14539 ac_cv_lib_krb4_main=no
14540 fi
14541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14542 LIBS=$ac_check_lib_save_LIBS
14543 fi
14544 echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_main" >&5
14545 echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
14546 if test $ac_cv_lib_krb4_main = yes; then
14547   have_k425=yes
14548                                 KRB4_LIBS="-lkrb4"
14549 else
14550   have_k425=no
14551 fi
14552
14553
14554                 else
14555                         have_425=no
14556                         { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
14557 echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
14558                 fi
14559
14560                 if test $have_k425 = yes ; then
14561                         ol_with_kerberos=found
14562                         ol_link_krb4=yes
14563
14564
14565 cat >>confdefs.h <<\_ACEOF
14566 #define HAVE_KRB425 1
14567 _ACEOF
14568
14569
14570 cat >>confdefs.h <<\_ACEOF
14571 #define HAVE_KRB4 1
14572 _ACEOF
14573
14574
14575                         echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
14576 echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
14577 if test "${ol_cv_var_des_debug+set}" = set; then
14578   echo $ECHO_N "(cached) $ECHO_C" >&6
14579 else
14580
14581                                                                 save_LIBS="$LIBS"
14582                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
14583                                 cat >conftest.$ac_ext <<_ACEOF
14584 #line $LINENO "configure"
14585 /* confdefs.h.  */
14586 _ACEOF
14587 cat confdefs.h >>conftest.$ac_ext
14588 cat >>conftest.$ac_ext <<_ACEOF
14589 /* end confdefs.h.  */
14590
14591 #include <kerberosIV/krb.h>
14592 #include <kerberosIV/des.h>
14593 extern int des_debug;
14594
14595 int
14596 main ()
14597 {
14598
14599 des_debug = 1;
14600
14601   ;
14602   return 0;
14603 }
14604 _ACEOF
14605 rm -f conftest.$ac_objext conftest$ac_exeext
14606 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14607   (eval $ac_link) 2>&5
14608   ac_status=$?
14609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14610   (exit $ac_status); } &&
14611          { ac_try='test -s conftest$ac_exeext'
14612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14613   (eval $ac_try) 2>&5
14614   ac_status=$?
14615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14616   (exit $ac_status); }; }; then
14617   ol_cv_var_des_debug=yes
14618 else
14619   echo "$as_me: failed program was:" >&5
14620 sed 's/^/| /' conftest.$ac_ext >&5
14621
14622 ol_cv_var_des_debug=no
14623 fi
14624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14625                                                                 LIBS="$save_LIBS"
14626
14627 fi
14628 echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
14629 echo "${ECHO_T}$ol_cv_var_des_debug" >&6
14630
14631                         if test $ol_cv_var_des_debug = yes ; then
14632
14633 cat >>confdefs.h <<\_ACEOF
14634 #define HAVE_DES_DEBUG 1
14635 _ACEOF
14636
14637                         fi
14638
14639                         LIBS="$save_LIBS"
14640                 fi
14641         fi
14642 fi
14643
14644 if test $ol_link_krb5 = yes ; then
14645         ol_with_kerberos=found
14646 fi
14647
14648 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
14649         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
14650
14651
14652
14653
14654 for ac_header in krb.h des.h krb-archaeology.h
14655 do
14656 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14657 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14658   echo "$as_me:$LINENO: checking for $ac_header" >&5
14659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14661   echo $ECHO_N "(cached) $ECHO_C" >&6
14662 fi
14663 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14664 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14665 else
14666   # Is the header compilable?
14667 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14668 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14669 cat >conftest.$ac_ext <<_ACEOF
14670 #line $LINENO "configure"
14671 /* confdefs.h.  */
14672 _ACEOF
14673 cat confdefs.h >>conftest.$ac_ext
14674 cat >>conftest.$ac_ext <<_ACEOF
14675 /* end confdefs.h.  */
14676 $ac_includes_default
14677 #include <$ac_header>
14678 _ACEOF
14679 rm -f conftest.$ac_objext
14680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14681   (eval $ac_compile) 2>&5
14682   ac_status=$?
14683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684   (exit $ac_status); } &&
14685          { ac_try='test -s conftest.$ac_objext'
14686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14687   (eval $ac_try) 2>&5
14688   ac_status=$?
14689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14690   (exit $ac_status); }; }; then
14691   ac_header_compiler=yes
14692 else
14693   echo "$as_me: failed program was:" >&5
14694 sed 's/^/| /' conftest.$ac_ext >&5
14695
14696 ac_header_compiler=no
14697 fi
14698 rm -f conftest.$ac_objext conftest.$ac_ext
14699 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14700 echo "${ECHO_T}$ac_header_compiler" >&6
14701
14702 # Is the header present?
14703 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14704 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14705 cat >conftest.$ac_ext <<_ACEOF
14706 #line $LINENO "configure"
14707 /* confdefs.h.  */
14708 _ACEOF
14709 cat confdefs.h >>conftest.$ac_ext
14710 cat >>conftest.$ac_ext <<_ACEOF
14711 /* end confdefs.h.  */
14712 #include <$ac_header>
14713 _ACEOF
14714 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14715   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14716   ac_status=$?
14717   grep -v '^ *+' conftest.er1 >conftest.err
14718   rm -f conftest.er1
14719   cat conftest.err >&5
14720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721   (exit $ac_status); } >/dev/null; then
14722   if test -s conftest.err; then
14723     ac_cpp_err=$ac_c_preproc_warn_flag
14724   else
14725     ac_cpp_err=
14726   fi
14727 else
14728   ac_cpp_err=yes
14729 fi
14730 if test -z "$ac_cpp_err"; then
14731   ac_header_preproc=yes
14732 else
14733   echo "$as_me: failed program was:" >&5
14734 sed 's/^/| /' conftest.$ac_ext >&5
14735
14736   ac_header_preproc=no
14737 fi
14738 rm -f conftest.err conftest.$ac_ext
14739 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14740 echo "${ECHO_T}$ac_header_preproc" >&6
14741
14742 # So?  What about this header?
14743 case $ac_header_compiler:$ac_header_preproc in
14744   yes:no )
14745     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14746 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14747     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14748 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14749     (
14750       cat <<\_ASBOX
14751 ## ------------------------------------ ##
14752 ## Report this to bug-autoconf@gnu.org. ##
14753 ## ------------------------------------ ##
14754 _ASBOX
14755     ) |
14756       sed "s/^/$as_me: WARNING:     /" >&2
14757     ;;
14758   no:yes )
14759     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14760 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14761     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14762 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14763     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14764 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14765     (
14766       cat <<\_ASBOX
14767 ## ------------------------------------ ##
14768 ## Report this to bug-autoconf@gnu.org. ##
14769 ## ------------------------------------ ##
14770 _ASBOX
14771     ) |
14772       sed "s/^/$as_me: WARNING:     /" >&2
14773     ;;
14774 esac
14775 echo "$as_me:$LINENO: checking for $ac_header" >&5
14776 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14778   echo $ECHO_N "(cached) $ECHO_C" >&6
14779 else
14780   eval "$as_ac_Header=$ac_header_preproc"
14781 fi
14782 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14783 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14784
14785 fi
14786 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14787   cat >>confdefs.h <<_ACEOF
14788 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14789 _ACEOF
14790
14791 fi
14792
14793 done
14794
14795
14796         if test $ac_cv_header_krb_h = yes ; then
14797                 echo "$as_me:$LINENO: checking for main in -lkrb" >&5
14798 echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
14799 if test "${ac_cv_lib_krb_main+set}" = set; then
14800   echo $ECHO_N "(cached) $ECHO_C" >&6
14801 else
14802   ac_check_lib_save_LIBS=$LIBS
14803 LIBS="-lkrb -ldes $LIBS"
14804 cat >conftest.$ac_ext <<_ACEOF
14805 #line $LINENO "configure"
14806 /* confdefs.h.  */
14807 _ACEOF
14808 cat confdefs.h >>conftest.$ac_ext
14809 cat >>conftest.$ac_ext <<_ACEOF
14810 /* end confdefs.h.  */
14811
14812
14813 int
14814 main ()
14815 {
14816 main ();
14817   ;
14818   return 0;
14819 }
14820 _ACEOF
14821 rm -f conftest.$ac_objext conftest$ac_exeext
14822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14823   (eval $ac_link) 2>&5
14824   ac_status=$?
14825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826   (exit $ac_status); } &&
14827          { ac_try='test -s conftest$ac_exeext'
14828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14829   (eval $ac_try) 2>&5
14830   ac_status=$?
14831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14832   (exit $ac_status); }; }; then
14833   ac_cv_lib_krb_main=yes
14834 else
14835   echo "$as_me: failed program was:" >&5
14836 sed 's/^/| /' conftest.$ac_ext >&5
14837
14838 ac_cv_lib_krb_main=no
14839 fi
14840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14841 LIBS=$ac_check_lib_save_LIBS
14842 fi
14843 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_main" >&5
14844 echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
14845 if test $ac_cv_lib_krb_main = yes; then
14846   have_k4=yes
14847 else
14848   have_k4=no
14849 fi
14850
14851
14852                 if test $have_k4 = yes ; then
14853                         ol_with_kerberos=found
14854                         ol_link_krb4=yes
14855
14856
14857 cat >>confdefs.h <<\_ACEOF
14858 #define HAVE_KRB4 1
14859 _ACEOF
14860
14861
14862                         KRB4_LIBS="-lkrb -ldes"
14863
14864                         if test $ac_cv_header_krb_archaeology_h = yes ; then
14865
14866 cat >>confdefs.h <<\_ACEOF
14867 #define HAVE_KTH_KERBEROS 1
14868 _ACEOF
14869
14870                         fi
14871                 fi
14872         fi
14873 fi
14874
14875 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
14876         ol_link_kpasswd=yes
14877 fi
14878
14879 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
14880         ol_link_kbind=yes
14881
14882 elif test $ol_enable_kbind = yes ; then
14883         { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
14884 echo "$as_me: error: Kerberos IV detection failed" >&2;}
14885    { (exit 1); exit 1; }; }
14886 fi
14887
14888 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
14889
14890 cat >>confdefs.h <<\_ACEOF
14891 #define HAVE_KERBEROS 1
14892 _ACEOF
14893
14894
14895 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
14896         { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
14897 echo "$as_me: error: Kerberos detection failed" >&2;}
14898    { (exit 1); exit 1; }; }
14899 fi
14900
14901 ol_link_tls=no
14902 if test $ol_with_tls != no ; then
14903
14904
14905 for ac_header in openssl/ssl.h ssl.h
14906 do
14907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14908 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14909   echo "$as_me:$LINENO: checking for $ac_header" >&5
14910 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14911 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14912   echo $ECHO_N "(cached) $ECHO_C" >&6
14913 fi
14914 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
14915 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14916 else
14917   # Is the header compilable?
14918 echo "$as_me:$LINENO: checking $ac_header usability" >&5
14919 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
14920 cat >conftest.$ac_ext <<_ACEOF
14921 #line $LINENO "configure"
14922 /* confdefs.h.  */
14923 _ACEOF
14924 cat confdefs.h >>conftest.$ac_ext
14925 cat >>conftest.$ac_ext <<_ACEOF
14926 /* end confdefs.h.  */
14927 $ac_includes_default
14928 #include <$ac_header>
14929 _ACEOF
14930 rm -f conftest.$ac_objext
14931 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14932   (eval $ac_compile) 2>&5
14933   ac_status=$?
14934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -s conftest.$ac_objext'
14937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14938   (eval $ac_try) 2>&5
14939   ac_status=$?
14940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14941   (exit $ac_status); }; }; then
14942   ac_header_compiler=yes
14943 else
14944   echo "$as_me: failed program was:" >&5
14945 sed 's/^/| /' conftest.$ac_ext >&5
14946
14947 ac_header_compiler=no
14948 fi
14949 rm -f conftest.$ac_objext conftest.$ac_ext
14950 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14951 echo "${ECHO_T}$ac_header_compiler" >&6
14952
14953 # Is the header present?
14954 echo "$as_me:$LINENO: checking $ac_header presence" >&5
14955 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
14956 cat >conftest.$ac_ext <<_ACEOF
14957 #line $LINENO "configure"
14958 /* confdefs.h.  */
14959 _ACEOF
14960 cat confdefs.h >>conftest.$ac_ext
14961 cat >>conftest.$ac_ext <<_ACEOF
14962 /* end confdefs.h.  */
14963 #include <$ac_header>
14964 _ACEOF
14965 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14966   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14967   ac_status=$?
14968   grep -v '^ *+' conftest.er1 >conftest.err
14969   rm -f conftest.er1
14970   cat conftest.err >&5
14971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14972   (exit $ac_status); } >/dev/null; then
14973   if test -s conftest.err; then
14974     ac_cpp_err=$ac_c_preproc_warn_flag
14975   else
14976     ac_cpp_err=
14977   fi
14978 else
14979   ac_cpp_err=yes
14980 fi
14981 if test -z "$ac_cpp_err"; then
14982   ac_header_preproc=yes
14983 else
14984   echo "$as_me: failed program was:" >&5
14985 sed 's/^/| /' conftest.$ac_ext >&5
14986
14987   ac_header_preproc=no
14988 fi
14989 rm -f conftest.err conftest.$ac_ext
14990 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14991 echo "${ECHO_T}$ac_header_preproc" >&6
14992
14993 # So?  What about this header?
14994 case $ac_header_compiler:$ac_header_preproc in
14995   yes:no )
14996     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14997 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14998     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14999 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15000     (
15001       cat <<\_ASBOX
15002 ## ------------------------------------ ##
15003 ## Report this to bug-autoconf@gnu.org. ##
15004 ## ------------------------------------ ##
15005 _ASBOX
15006     ) |
15007       sed "s/^/$as_me: WARNING:     /" >&2
15008     ;;
15009   no:yes )
15010     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15011 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15012     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15013 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15014     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15015 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15016     (
15017       cat <<\_ASBOX
15018 ## ------------------------------------ ##
15019 ## Report this to bug-autoconf@gnu.org. ##
15020 ## ------------------------------------ ##
15021 _ASBOX
15022     ) |
15023       sed "s/^/$as_me: WARNING:     /" >&2
15024     ;;
15025 esac
15026 echo "$as_me:$LINENO: checking for $ac_header" >&5
15027 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15028 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15029   echo $ECHO_N "(cached) $ECHO_C" >&6
15030 else
15031   eval "$as_ac_Header=$ac_header_preproc"
15032 fi
15033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15035
15036 fi
15037 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15038   cat >>confdefs.h <<_ACEOF
15039 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15040 _ACEOF
15041
15042 fi
15043
15044 done
15045
15046
15047         if test $ac_cv_header_openssl_ssl_h = yes \
15048                 -o $ac_cv_header_ssl_h = yes ; then
15049                 echo "$as_me:$LINENO: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
15050 echo $ECHO_N "checking for SSLeay_add_ssl_algorithms in -lssl... $ECHO_C" >&6
15051 if test "${ac_cv_lib_ssl_SSLeay_add_ssl_algorithms+set}" = set; then
15052   echo $ECHO_N "(cached) $ECHO_C" >&6
15053 else
15054   ac_check_lib_save_LIBS=$LIBS
15055 LIBS="-lssl -lcrypto $LIBS"
15056 cat >conftest.$ac_ext <<_ACEOF
15057 #line $LINENO "configure"
15058 /* confdefs.h.  */
15059 _ACEOF
15060 cat confdefs.h >>conftest.$ac_ext
15061 cat >>conftest.$ac_ext <<_ACEOF
15062 /* end confdefs.h.  */
15063
15064 /* Override any gcc2 internal prototype to avoid an error.  */
15065 #ifdef __cplusplus
15066 extern "C"
15067 #endif
15068 /* We use char because int might match the return type of a gcc2
15069    builtin and then its argument prototype would still apply.  */
15070 char SSLeay_add_ssl_algorithms ();
15071 int
15072 main ()
15073 {
15074 SSLeay_add_ssl_algorithms ();
15075   ;
15076   return 0;
15077 }
15078 _ACEOF
15079 rm -f conftest.$ac_objext conftest$ac_exeext
15080 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15081   (eval $ac_link) 2>&5
15082   ac_status=$?
15083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084   (exit $ac_status); } &&
15085          { ac_try='test -s conftest$ac_exeext'
15086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087   (eval $ac_try) 2>&5
15088   ac_status=$?
15089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090   (exit $ac_status); }; }; then
15091   ac_cv_lib_ssl_SSLeay_add_ssl_algorithms=yes
15092 else
15093   echo "$as_me: failed program was:" >&5
15094 sed 's/^/| /' conftest.$ac_ext >&5
15095
15096 ac_cv_lib_ssl_SSLeay_add_ssl_algorithms=no
15097 fi
15098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15099 LIBS=$ac_check_lib_save_LIBS
15100 fi
15101 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSLeay_add_ssl_algorithms" >&5
15102 echo "${ECHO_T}$ac_cv_lib_ssl_SSLeay_add_ssl_algorithms" >&6
15103 if test $ac_cv_lib_ssl_SSLeay_add_ssl_algorithms = yes; then
15104   have_ssleay=yes
15105                         need_rsaref=no
15106 else
15107   have_ssleay=no
15108 fi
15109
15110
15111                 if test $have_ssleay = no ; then
15112                         echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
15113 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
15114 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
15115   echo $ECHO_N "(cached) $ECHO_C" >&6
15116 else
15117   ac_check_lib_save_LIBS=$LIBS
15118 LIBS="-lssl -lcrypto $LIBS"
15119 cat >conftest.$ac_ext <<_ACEOF
15120 #line $LINENO "configure"
15121 /* confdefs.h.  */
15122 _ACEOF
15123 cat confdefs.h >>conftest.$ac_ext
15124 cat >>conftest.$ac_ext <<_ACEOF
15125 /* end confdefs.h.  */
15126
15127 /* Override any gcc2 internal prototype to avoid an error.  */
15128 #ifdef __cplusplus
15129 extern "C"
15130 #endif
15131 /* We use char because int might match the return type of a gcc2
15132    builtin and then its argument prototype would still apply.  */
15133 char SSL_library_init ();
15134 int
15135 main ()
15136 {
15137 SSL_library_init ();
15138   ;
15139   return 0;
15140 }
15141 _ACEOF
15142 rm -f conftest.$ac_objext conftest$ac_exeext
15143 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15144   (eval $ac_link) 2>&5
15145   ac_status=$?
15146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15147   (exit $ac_status); } &&
15148          { ac_try='test -s conftest$ac_exeext'
15149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15150   (eval $ac_try) 2>&5
15151   ac_status=$?
15152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15153   (exit $ac_status); }; }; then
15154   ac_cv_lib_ssl_SSL_library_init=yes
15155 else
15156   echo "$as_me: failed program was:" >&5
15157 sed 's/^/| /' conftest.$ac_ext >&5
15158
15159 ac_cv_lib_ssl_SSL_library_init=no
15160 fi
15161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15162 LIBS=$ac_check_lib_save_LIBS
15163 fi
15164 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
15165 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
15166 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
15167   have_ssleay=yes
15168                                 need_rsaref=no
15169 else
15170   have_ssleay=no
15171 fi
15172
15173                 fi
15174
15175                 if test $have_ssleay = no ; then
15176                         echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
15177 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
15178 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
15179   echo $ECHO_N "(cached) $ECHO_C" >&6
15180 else
15181   ac_check_lib_save_LIBS=$LIBS
15182 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15183 cat >conftest.$ac_ext <<_ACEOF
15184 #line $LINENO "configure"
15185 /* confdefs.h.  */
15186 _ACEOF
15187 cat confdefs.h >>conftest.$ac_ext
15188 cat >>conftest.$ac_ext <<_ACEOF
15189 /* end confdefs.h.  */
15190
15191 /* Override any gcc2 internal prototype to avoid an error.  */
15192 #ifdef __cplusplus
15193 extern "C"
15194 #endif
15195 /* We use char because int might match the return type of a gcc2
15196    builtin and then its argument prototype would still apply.  */
15197 char ssl3_accept ();
15198 int
15199 main ()
15200 {
15201 ssl3_accept ();
15202   ;
15203   return 0;
15204 }
15205 _ACEOF
15206 rm -f conftest.$ac_objext conftest$ac_exeext
15207 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15208   (eval $ac_link) 2>&5
15209   ac_status=$?
15210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15211   (exit $ac_status); } &&
15212          { ac_try='test -s conftest$ac_exeext'
15213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15214   (eval $ac_try) 2>&5
15215   ac_status=$?
15216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15217   (exit $ac_status); }; }; then
15218   ac_cv_lib_ssl_ssl3_accept=yes
15219 else
15220   echo "$as_me: failed program was:" >&5
15221 sed 's/^/| /' conftest.$ac_ext >&5
15222
15223 ac_cv_lib_ssl_ssl3_accept=no
15224 fi
15225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15226 LIBS=$ac_check_lib_save_LIBS
15227 fi
15228 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15229 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
15230 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
15231   have_ssleay=yes
15232                                 need_rsaref=yes
15233 else
15234   have_ssleay=no
15235 fi
15236
15237                 fi
15238
15239                 if test $have_ssleay = yes ; then
15240                         ol_with_tls=found
15241                         ol_link_tls=yes
15242
15243
15244 cat >>confdefs.h <<\_ACEOF
15245 #define HAVE_SSLEAY 1
15246 _ACEOF
15247
15248
15249                         if test $need_rsaref = yes; then
15250
15251 cat >>confdefs.h <<\_ACEOF
15252 #define HAVE_RSAREF 1
15253 _ACEOF
15254
15255
15256                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15257                         else
15258                                 TLS_LIBS="-lssl -lcrypto"
15259                         fi
15260                 fi
15261         fi
15262
15263 else
15264         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
15265 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15266 fi
15267
15268 if test $ol_link_tls = yes ; then
15269
15270 cat >>confdefs.h <<\_ACEOF
15271 #define HAVE_TLS 1
15272 _ACEOF
15273
15274
15275 elif test $ol_with_tls = auto ; then
15276         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
15277 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15278         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
15279 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15280
15281 elif test $ol_with_tls != no ; then
15282         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
15283 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
15284    { (exit 1); exit 1; }; }
15285 fi
15286
15287 if test $ol_enable_lmpasswd != no; then
15288         if test $ol_link_tls != yes ; then
15289                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
15290 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
15291    { (exit 1); exit 1; }; }
15292         fi
15293
15294
15295 cat >>confdefs.h <<\_ACEOF
15296 #define SLAPD_LMHASH 1
15297 _ACEOF
15298
15299 fi
15300
15301 ol_link_threads=no
15302
15303 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15304         -o $ol_with_threads = nt ; then
15305
15306
15307         echo "$as_me:$LINENO: checking for _beginthread" >&5
15308 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
15309 if test "${ac_cv_func__beginthread+set}" = set; then
15310   echo $ECHO_N "(cached) $ECHO_C" >&6
15311 else
15312   cat >conftest.$ac_ext <<_ACEOF
15313 #line $LINENO "configure"
15314 /* confdefs.h.  */
15315 _ACEOF
15316 cat confdefs.h >>conftest.$ac_ext
15317 cat >>conftest.$ac_ext <<_ACEOF
15318 /* end confdefs.h.  */
15319 /* System header to define __stub macros and hopefully few prototypes,
15320     which can conflict with char _beginthread (); below.
15321     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15322     <limits.h> exists even on freestanding compilers.  */
15323 #ifdef __STDC__
15324 # include <limits.h>
15325 #else
15326 # include <assert.h>
15327 #endif
15328 /* Override any gcc2 internal prototype to avoid an error.  */
15329 #ifdef __cplusplus
15330 extern "C"
15331 {
15332 #endif
15333 /* We use char because int might match the return type of a gcc2
15334    builtin and then its argument prototype would still apply.  */
15335 char _beginthread ();
15336 /* The GNU C library defines this for functions which it implements
15337     to always fail with ENOSYS.  Some functions are actually named
15338     something starting with __ and the normal name is an alias.  */
15339 #if defined (__stub__beginthread) || defined (__stub____beginthread)
15340 choke me
15341 #else
15342 char (*f) () = _beginthread;
15343 #endif
15344 #ifdef __cplusplus
15345 }
15346 #endif
15347
15348 int
15349 main ()
15350 {
15351 return f != _beginthread;
15352   ;
15353   return 0;
15354 }
15355 _ACEOF
15356 rm -f conftest.$ac_objext conftest$ac_exeext
15357 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15358   (eval $ac_link) 2>&5
15359   ac_status=$?
15360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15361   (exit $ac_status); } &&
15362          { ac_try='test -s conftest$ac_exeext'
15363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15364   (eval $ac_try) 2>&5
15365   ac_status=$?
15366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15367   (exit $ac_status); }; }; then
15368   ac_cv_func__beginthread=yes
15369 else
15370   echo "$as_me: failed program was:" >&5
15371 sed 's/^/| /' conftest.$ac_ext >&5
15372
15373 ac_cv_func__beginthread=no
15374 fi
15375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15376 fi
15377 echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
15378 echo "${ECHO_T}$ac_cv_func__beginthread" >&6
15379
15380
15381         if test $ac_cv_func__beginthread = yes ; then
15382
15383 cat >>confdefs.h <<\_ACEOF
15384 #define HAVE_NT_THREADS 1
15385 _ACEOF
15386
15387                 ol_cv_nt_threads=yes
15388         fi
15389
15390
15391         if test "$ol_cv_nt_threads" = yes ; then
15392                 ol_link_threads=nt
15393                 ol_with_threads=found
15394                 ol_with_yielding_select=yes
15395
15396
15397 cat >>confdefs.h <<\_ACEOF
15398 #define HAVE_NT_SERVICE_MANAGER 1
15399 _ACEOF
15400
15401
15402 cat >>confdefs.h <<\_ACEOF
15403 #define HAVE_NT_EVENT_LOG 1
15404 _ACEOF
15405
15406         fi
15407
15408         if test $ol_with_threads = nt ; then
15409                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
15410 echo "$as_me: error: could not locate NT Threads" >&2;}
15411    { (exit 1); exit 1; }; }
15412         fi
15413 fi
15414
15415 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15416         -o $ol_with_threads = posix ; then
15417
15418
15419 for ac_header in pthread.h
15420 do
15421 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15423   echo "$as_me:$LINENO: checking for $ac_header" >&5
15424 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15425 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15426   echo $ECHO_N "(cached) $ECHO_C" >&6
15427 fi
15428 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15429 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15430 else
15431   # Is the header compilable?
15432 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15433 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15434 cat >conftest.$ac_ext <<_ACEOF
15435 #line $LINENO "configure"
15436 /* confdefs.h.  */
15437 _ACEOF
15438 cat confdefs.h >>conftest.$ac_ext
15439 cat >>conftest.$ac_ext <<_ACEOF
15440 /* end confdefs.h.  */
15441 $ac_includes_default
15442 #include <$ac_header>
15443 _ACEOF
15444 rm -f conftest.$ac_objext
15445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15446   (eval $ac_compile) 2>&5
15447   ac_status=$?
15448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449   (exit $ac_status); } &&
15450          { ac_try='test -s conftest.$ac_objext'
15451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15452   (eval $ac_try) 2>&5
15453   ac_status=$?
15454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15455   (exit $ac_status); }; }; then
15456   ac_header_compiler=yes
15457 else
15458   echo "$as_me: failed program was:" >&5
15459 sed 's/^/| /' conftest.$ac_ext >&5
15460
15461 ac_header_compiler=no
15462 fi
15463 rm -f conftest.$ac_objext conftest.$ac_ext
15464 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15465 echo "${ECHO_T}$ac_header_compiler" >&6
15466
15467 # Is the header present?
15468 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15469 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15470 cat >conftest.$ac_ext <<_ACEOF
15471 #line $LINENO "configure"
15472 /* confdefs.h.  */
15473 _ACEOF
15474 cat confdefs.h >>conftest.$ac_ext
15475 cat >>conftest.$ac_ext <<_ACEOF
15476 /* end confdefs.h.  */
15477 #include <$ac_header>
15478 _ACEOF
15479 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15480   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15481   ac_status=$?
15482   grep -v '^ *+' conftest.er1 >conftest.err
15483   rm -f conftest.er1
15484   cat conftest.err >&5
15485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15486   (exit $ac_status); } >/dev/null; then
15487   if test -s conftest.err; then
15488     ac_cpp_err=$ac_c_preproc_warn_flag
15489   else
15490     ac_cpp_err=
15491   fi
15492 else
15493   ac_cpp_err=yes
15494 fi
15495 if test -z "$ac_cpp_err"; then
15496   ac_header_preproc=yes
15497 else
15498   echo "$as_me: failed program was:" >&5
15499 sed 's/^/| /' conftest.$ac_ext >&5
15500
15501   ac_header_preproc=no
15502 fi
15503 rm -f conftest.err conftest.$ac_ext
15504 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15505 echo "${ECHO_T}$ac_header_preproc" >&6
15506
15507 # So?  What about this header?
15508 case $ac_header_compiler:$ac_header_preproc in
15509   yes:no )
15510     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15511 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15512     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15513 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15514     (
15515       cat <<\_ASBOX
15516 ## ------------------------------------ ##
15517 ## Report this to bug-autoconf@gnu.org. ##
15518 ## ------------------------------------ ##
15519 _ASBOX
15520     ) |
15521       sed "s/^/$as_me: WARNING:     /" >&2
15522     ;;
15523   no:yes )
15524     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15525 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15526     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15527 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15528     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15529 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15530     (
15531       cat <<\_ASBOX
15532 ## ------------------------------------ ##
15533 ## Report this to bug-autoconf@gnu.org. ##
15534 ## ------------------------------------ ##
15535 _ASBOX
15536     ) |
15537       sed "s/^/$as_me: WARNING:     /" >&2
15538     ;;
15539 esac
15540 echo "$as_me:$LINENO: checking for $ac_header" >&5
15541 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15542 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15543   echo $ECHO_N "(cached) $ECHO_C" >&6
15544 else
15545   eval "$as_ac_Header=$ac_header_preproc"
15546 fi
15547 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15548 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15549
15550 fi
15551 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15552   cat >>confdefs.h <<_ACEOF
15553 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15554 _ACEOF
15555
15556 fi
15557
15558 done
15559
15560
15561         if test $ac_cv_header_pthread_h = yes ; then
15562                 echo "$as_me:$LINENO: checking POSIX thread version" >&5
15563 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
15564 if test "${ol_cv_pthread_version+set}" = set; then
15565   echo $ECHO_N "(cached) $ECHO_C" >&6
15566 else
15567
15568         cat >conftest.$ac_ext <<_ACEOF
15569 #line $LINENO "configure"
15570 /* confdefs.h.  */
15571 _ACEOF
15572 cat confdefs.h >>conftest.$ac_ext
15573 cat >>conftest.$ac_ext <<_ACEOF
15574 /* end confdefs.h.  */
15575
15576 #               include <pthread.h>
15577
15578 int
15579 main ()
15580 {
15581
15582                 int i = PTHREAD_CREATE_JOINABLE;
15583
15584   ;
15585   return 0;
15586 }
15587 _ACEOF
15588 rm -f conftest.$ac_objext
15589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15590   (eval $ac_compile) 2>&5
15591   ac_status=$?
15592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15593   (exit $ac_status); } &&
15594          { ac_try='test -s conftest.$ac_objext'
15595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15596   (eval $ac_try) 2>&5
15597   ac_status=$?
15598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599   (exit $ac_status); }; }; then
15600
15601         cat >conftest.$ac_ext <<_ACEOF
15602 #line $LINENO "configure"
15603 /* confdefs.h.  */
15604 _ACEOF
15605 cat confdefs.h >>conftest.$ac_ext
15606 cat >>conftest.$ac_ext <<_ACEOF
15607 /* end confdefs.h.  */
15608 #include <pthread.h>
15609
15610 _ACEOF
15611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15612   $EGREP "pthread_detach" >/dev/null 2>&1; then
15613   ol_cv_pthread_version=10
15614 else
15615   ol_cv_pthread_version=8
15616 fi
15617 rm -f conftest*
15618
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 sed 's/^/| /' conftest.$ac_ext >&5
15622
15623
15624         cat >conftest.$ac_ext <<_ACEOF
15625 #line $LINENO "configure"
15626 /* confdefs.h.  */
15627 _ACEOF
15628 cat confdefs.h >>conftest.$ac_ext
15629 cat >>conftest.$ac_ext <<_ACEOF
15630 /* end confdefs.h.  */
15631
15632 #               include <pthread.h>
15633 #               ifdef PTHREAD_CREATE_UNDETACHED
15634                 draft7
15635 #               endif
15636
15637 _ACEOF
15638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15639   $EGREP "draft7" >/dev/null 2>&1; then
15640   ol_cv_pthread_version=7
15641 else
15642
15643         cat >conftest.$ac_ext <<_ACEOF
15644 #line $LINENO "configure"
15645 /* confdefs.h.  */
15646 _ACEOF
15647 cat confdefs.h >>conftest.$ac_ext
15648 cat >>conftest.$ac_ext <<_ACEOF
15649 /* end confdefs.h.  */
15650 #include <pthread.h>
15651
15652 _ACEOF
15653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15654   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
15655   ol_cv_pthread_version=6
15656 else
15657
15658         cat >conftest.$ac_ext <<_ACEOF
15659 #line $LINENO "configure"
15660 /* confdefs.h.  */
15661 _ACEOF
15662 cat confdefs.h >>conftest.$ac_ext
15663 cat >>conftest.$ac_ext <<_ACEOF
15664 /* end confdefs.h.  */
15665
15666 #               include <pthread.h>
15667 #ifdef          PTHREAD_MUTEX_INITIALIZER
15668                 draft5
15669 #endif
15670
15671 _ACEOF
15672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15673   $EGREP "draft5" >/dev/null 2>&1; then
15674   ol_cv_pthread_version=5
15675 else
15676   ol_cv_pthread_version=4
15677 fi
15678 rm -f conftest*
15679
15680 fi
15681 rm -f conftest*
15682
15683 fi
15684 rm -f conftest*
15685
15686 fi
15687 rm -f conftest.$ac_objext conftest.$ac_ext
15688
15689 fi
15690 echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
15691 echo "${ECHO_T}$ol_cv_pthread_version" >&6
15692
15693
15694                 if test $ol_cv_pthread_version != 0 ; then
15695
15696 cat >>confdefs.h <<_ACEOF
15697 #define HAVE_PTHREADS $ol_cv_pthread_version
15698 _ACEOF
15699
15700                 else
15701                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
15702 echo "$as_me: error: unknown pthread version" >&2;}
15703    { (exit 1); exit 1; }; }
15704                 fi
15705
15706                 # consider threads found
15707                 ol_with_threads=found
15708
15709
15710         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
15711 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
15712 if test "${ol_cv_header_linux_threads+set}" = set; then
15713   echo $ECHO_N "(cached) $ECHO_C" >&6
15714 else
15715   cat >conftest.$ac_ext <<_ACEOF
15716 #line $LINENO "configure"
15717 /* confdefs.h.  */
15718 _ACEOF
15719 cat confdefs.h >>conftest.$ac_ext
15720 cat >>conftest.$ac_ext <<_ACEOF
15721 /* end confdefs.h.  */
15722 #include <pthread.h>
15723 _ACEOF
15724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15725   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15726   ol_cv_header_linux_threads=yes
15727 else
15728   ol_cv_header_linux_threads=no
15729 fi
15730 rm -f conftest*
15731
15732
15733 fi
15734 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
15735 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
15736         if test $ol_cv_header_linux_threads = yes; then
15737
15738 cat >>confdefs.h <<\_ACEOF
15739 #define HAVE_LINUX_THREADS 1
15740 _ACEOF
15741
15742         fi
15743
15744
15745         echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
15746 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
15747 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
15748   echo $ECHO_N "(cached) $ECHO_C" >&6
15749 else
15750   cat >conftest.$ac_ext <<_ACEOF
15751 #line $LINENO "configure"
15752 /* confdefs.h.  */
15753 _ACEOF
15754 cat confdefs.h >>conftest.$ac_ext
15755 cat >>conftest.$ac_ext <<_ACEOF
15756 /* end confdefs.h.  */
15757 #include <pthread.h>
15758 #ifdef _POSIX_THREAD_IS_GNU_PTH
15759         __gnu_pth__;
15760 #endif
15761
15762 _ACEOF
15763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15764   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
15765   ol_cv_header_gnu_pth_pthread_h=yes
15766 else
15767   ol_cv_header_gnu_pth_pthread_h=no
15768 fi
15769 rm -f conftest*
15770
15771
15772 fi
15773 echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
15774 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
15775
15776
15777                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
15778
15779 for ac_header in sched.h
15780 do
15781 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15782 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15783   echo "$as_me:$LINENO: checking for $ac_header" >&5
15784 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15785 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15786   echo $ECHO_N "(cached) $ECHO_C" >&6
15787 fi
15788 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15789 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15790 else
15791   # Is the header compilable?
15792 echo "$as_me:$LINENO: checking $ac_header usability" >&5
15793 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
15794 cat >conftest.$ac_ext <<_ACEOF
15795 #line $LINENO "configure"
15796 /* confdefs.h.  */
15797 _ACEOF
15798 cat confdefs.h >>conftest.$ac_ext
15799 cat >>conftest.$ac_ext <<_ACEOF
15800 /* end confdefs.h.  */
15801 $ac_includes_default
15802 #include <$ac_header>
15803 _ACEOF
15804 rm -f conftest.$ac_objext
15805 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15806   (eval $ac_compile) 2>&5
15807   ac_status=$?
15808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809   (exit $ac_status); } &&
15810          { ac_try='test -s conftest.$ac_objext'
15811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15812   (eval $ac_try) 2>&5
15813   ac_status=$?
15814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15815   (exit $ac_status); }; }; then
15816   ac_header_compiler=yes
15817 else
15818   echo "$as_me: failed program was:" >&5
15819 sed 's/^/| /' conftest.$ac_ext >&5
15820
15821 ac_header_compiler=no
15822 fi
15823 rm -f conftest.$ac_objext conftest.$ac_ext
15824 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15825 echo "${ECHO_T}$ac_header_compiler" >&6
15826
15827 # Is the header present?
15828 echo "$as_me:$LINENO: checking $ac_header presence" >&5
15829 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
15830 cat >conftest.$ac_ext <<_ACEOF
15831 #line $LINENO "configure"
15832 /* confdefs.h.  */
15833 _ACEOF
15834 cat confdefs.h >>conftest.$ac_ext
15835 cat >>conftest.$ac_ext <<_ACEOF
15836 /* end confdefs.h.  */
15837 #include <$ac_header>
15838 _ACEOF
15839 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15840   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15841   ac_status=$?
15842   grep -v '^ *+' conftest.er1 >conftest.err
15843   rm -f conftest.er1
15844   cat conftest.err >&5
15845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15846   (exit $ac_status); } >/dev/null; then
15847   if test -s conftest.err; then
15848     ac_cpp_err=$ac_c_preproc_warn_flag
15849   else
15850     ac_cpp_err=
15851   fi
15852 else
15853   ac_cpp_err=yes
15854 fi
15855 if test -z "$ac_cpp_err"; then
15856   ac_header_preproc=yes
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 sed 's/^/| /' conftest.$ac_ext >&5
15860
15861   ac_header_preproc=no
15862 fi
15863 rm -f conftest.err conftest.$ac_ext
15864 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15865 echo "${ECHO_T}$ac_header_preproc" >&6
15866
15867 # So?  What about this header?
15868 case $ac_header_compiler:$ac_header_preproc in
15869   yes:no )
15870     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15871 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15872     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15873 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15874     (
15875       cat <<\_ASBOX
15876 ## ------------------------------------ ##
15877 ## Report this to bug-autoconf@gnu.org. ##
15878 ## ------------------------------------ ##
15879 _ASBOX
15880     ) |
15881       sed "s/^/$as_me: WARNING:     /" >&2
15882     ;;
15883   no:yes )
15884     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15885 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15886     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15887 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15888     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15889 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15890     (
15891       cat <<\_ASBOX
15892 ## ------------------------------------ ##
15893 ## Report this to bug-autoconf@gnu.org. ##
15894 ## ------------------------------------ ##
15895 _ASBOX
15896     ) |
15897       sed "s/^/$as_me: WARNING:     /" >&2
15898     ;;
15899 esac
15900 echo "$as_me:$LINENO: checking for $ac_header" >&5
15901 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   eval "$as_ac_Header=$ac_header_preproc"
15906 fi
15907 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
15908 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15909
15910 fi
15911 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15912   cat >>confdefs.h <<_ACEOF
15913 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15914 _ACEOF
15915
15916 fi
15917
15918 done
15919
15920                 fi
15921
15922
15923                                 echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
15924 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
15925 if test "${ol_cv_pthread_create+set}" = set; then
15926   echo $ECHO_N "(cached) $ECHO_C" >&6
15927 else
15928
15929                 if test "$cross_compiling" = yes; then
15930   cat >conftest.$ac_ext <<_ACEOF
15931 #line $LINENO "configure"
15932 /* confdefs.h.  */
15933 _ACEOF
15934 cat confdefs.h >>conftest.$ac_ext
15935 cat >>conftest.$ac_ext <<_ACEOF
15936 /* end confdefs.h.  */
15937 /* pthread test headers */
15938 #include <pthread.h>
15939 #if HAVE_PTHREADS < 7
15940 #include <errno.h>
15941 #endif
15942 #ifndef NULL
15943 #define NULL (void*)0
15944 #endif
15945
15946 static void *task(p)
15947         void *p;
15948 {
15949         return (void *) (p == NULL);
15950 }
15951
15952 int
15953 main ()
15954 {
15955
15956         /* pthread test function */
15957 #ifndef PTHREAD_CREATE_DETACHED
15958 #define PTHREAD_CREATE_DETACHED 1
15959 #endif
15960         pthread_t t;
15961         int status;
15962         int detach = PTHREAD_CREATE_DETACHED;
15963
15964 #if HAVE_PTHREADS > 4
15965         /* Final pthreads */
15966         pthread_attr_t attr;
15967
15968         status = pthread_attr_init(&attr);
15969         if( status ) return status;
15970
15971 #if HAVE_PTHREADS < 7
15972         status = pthread_attr_setdetachstate(&attr, &detach);
15973         if( status < 0 ) status = errno;
15974 #else
15975         status = pthread_attr_setdetachstate(&attr, detach);
15976 #endif
15977         if( status ) return status;
15978         status = pthread_create( &t, &attr, task, NULL );
15979 #if HAVE_PTHREADS < 7
15980         if( status < 0 ) status = errno;
15981 #endif
15982         if( status ) return status;
15983 #else
15984         /* Draft 4 pthreads */
15985         status = pthread_create( &t, pthread_attr_default, task, NULL );
15986         if( status ) return errno;
15987
15988         /* give thread a chance to complete */
15989         /* it should remain joinable and hence detachable */
15990         sleep( 1 );
15991
15992         status = pthread_detach( &t );
15993         if( status ) return errno;
15994 #endif
15995
15996 #ifdef HAVE_LINUX_THREADS
15997         pthread_kill_other_threads_np();
15998 #endif
15999
16000         return 0;
16001
16002   ;
16003   return 0;
16004 }
16005 _ACEOF
16006 rm -f conftest.$ac_objext conftest$ac_exeext
16007 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16008   (eval $ac_link) 2>&5
16009   ac_status=$?
16010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16011   (exit $ac_status); } &&
16012          { ac_try='test -s conftest$ac_exeext'
16013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16014   (eval $ac_try) 2>&5
16015   ac_status=$?
16016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16017   (exit $ac_status); }; }; then
16018   ol_cv_pthread_create=yes
16019 else
16020   echo "$as_me: failed program was:" >&5
16021 sed 's/^/| /' conftest.$ac_ext >&5
16022
16023 ol_cv_pthread_create=no
16024 fi
16025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16026 else
16027   cat >conftest.$ac_ext <<_ACEOF
16028 #line $LINENO "configure"
16029 /* confdefs.h.  */
16030 _ACEOF
16031 cat confdefs.h >>conftest.$ac_ext
16032 cat >>conftest.$ac_ext <<_ACEOF
16033 /* end confdefs.h.  */
16034 /* pthread test headers */
16035 #include <pthread.h>
16036 #if HAVE_PTHREADS < 7
16037 #include <errno.h>
16038 #endif
16039 #ifndef NULL
16040 #define NULL (void*)0
16041 #endif
16042
16043 static void *task(p)
16044         void *p;
16045 {
16046         return (void *) (p == NULL);
16047 }
16048
16049
16050 int main(argc, argv)
16051         int argc;
16052         char **argv;
16053 {
16054
16055         /* pthread test function */
16056 #ifndef PTHREAD_CREATE_DETACHED
16057 #define PTHREAD_CREATE_DETACHED 1
16058 #endif
16059         pthread_t t;
16060         int status;
16061         int detach = PTHREAD_CREATE_DETACHED;
16062
16063 #if HAVE_PTHREADS > 4
16064         /* Final pthreads */
16065         pthread_attr_t attr;
16066
16067         status = pthread_attr_init(&attr);
16068         if( status ) return status;
16069
16070 #if HAVE_PTHREADS < 7
16071         status = pthread_attr_setdetachstate(&attr, &detach);
16072         if( status < 0 ) status = errno;
16073 #else
16074         status = pthread_attr_setdetachstate(&attr, detach);
16075 #endif
16076         if( status ) return status;
16077         status = pthread_create( &t, &attr, task, NULL );
16078 #if HAVE_PTHREADS < 7
16079         if( status < 0 ) status = errno;
16080 #endif
16081         if( status ) return status;
16082 #else
16083         /* Draft 4 pthreads */
16084         status = pthread_create( &t, pthread_attr_default, task, NULL );
16085         if( status ) return errno;
16086
16087         /* give thread a chance to complete */
16088         /* it should remain joinable and hence detachable */
16089         sleep( 1 );
16090
16091         status = pthread_detach( &t );
16092         if( status ) return errno;
16093 #endif
16094
16095 #ifdef HAVE_LINUX_THREADS
16096         pthread_kill_other_threads_np();
16097 #endif
16098
16099         return 0;
16100
16101 }
16102
16103 _ACEOF
16104 rm -f conftest$ac_exeext
16105 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16106   (eval $ac_link) 2>&5
16107   ac_status=$?
16108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16109   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16111   (eval $ac_try) 2>&5
16112   ac_status=$?
16113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114   (exit $ac_status); }; }; then
16115   ol_cv_pthread_create=yes
16116 else
16117   echo "$as_me: program exited with status $ac_status" >&5
16118 echo "$as_me: failed program was:" >&5
16119 sed 's/^/| /' conftest.$ac_ext >&5
16120
16121 ( exit $ac_status )
16122 ol_cv_pthread_create=no
16123 fi
16124 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16125 fi
16126 fi
16127 echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
16128 echo "${ECHO_T}$ol_cv_pthread_create" >&6
16129
16130                 if test $ol_cv_pthread_create != no ; then
16131                         ol_link_threads=posix
16132                         ol_link_pthreads=""
16133                 fi
16134
16135                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16136 if test "$ol_link_threads" = no ; then
16137         # try -kthread
16138         echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
16139 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
16140 if test "${ol_cv_pthread_kthread+set}" = set; then
16141   echo $ECHO_N "(cached) $ECHO_C" >&6
16142 else
16143
16144                 # save the flags
16145                 ol_LIBS="$LIBS"
16146                 LIBS="-kthread $LIBS"
16147
16148                 if test "$cross_compiling" = yes; then
16149   cat >conftest.$ac_ext <<_ACEOF
16150 #line $LINENO "configure"
16151 /* confdefs.h.  */
16152 _ACEOF
16153 cat confdefs.h >>conftest.$ac_ext
16154 cat >>conftest.$ac_ext <<_ACEOF
16155 /* end confdefs.h.  */
16156 /* pthread test headers */
16157 #include <pthread.h>
16158 #if HAVE_PTHREADS < 7
16159 #include <errno.h>
16160 #endif
16161 #ifndef NULL
16162 #define NULL (void*)0
16163 #endif
16164
16165 static void *task(p)
16166         void *p;
16167 {
16168         return (void *) (p == NULL);
16169 }
16170
16171 int
16172 main ()
16173 {
16174
16175         /* pthread test function */
16176 #ifndef PTHREAD_CREATE_DETACHED
16177 #define PTHREAD_CREATE_DETACHED 1
16178 #endif
16179         pthread_t t;
16180         int status;
16181         int detach = PTHREAD_CREATE_DETACHED;
16182
16183 #if HAVE_PTHREADS > 4
16184         /* Final pthreads */
16185         pthread_attr_t attr;
16186
16187         status = pthread_attr_init(&attr);
16188         if( status ) return status;
16189
16190 #if HAVE_PTHREADS < 7
16191         status = pthread_attr_setdetachstate(&attr, &detach);
16192         if( status < 0 ) status = errno;
16193 #else
16194         status = pthread_attr_setdetachstate(&attr, detach);
16195 #endif
16196         if( status ) return status;
16197         status = pthread_create( &t, &attr, task, NULL );
16198 #if HAVE_PTHREADS < 7
16199         if( status < 0 ) status = errno;
16200 #endif
16201         if( status ) return status;
16202 #else
16203         /* Draft 4 pthreads */
16204         status = pthread_create( &t, pthread_attr_default, task, NULL );
16205         if( status ) return errno;
16206
16207         /* give thread a chance to complete */
16208         /* it should remain joinable and hence detachable */
16209         sleep( 1 );
16210
16211         status = pthread_detach( &t );
16212         if( status ) return errno;
16213 #endif
16214
16215 #ifdef HAVE_LINUX_THREADS
16216         pthread_kill_other_threads_np();
16217 #endif
16218
16219         return 0;
16220
16221   ;
16222   return 0;
16223 }
16224 _ACEOF
16225 rm -f conftest.$ac_objext conftest$ac_exeext
16226 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16227   (eval $ac_link) 2>&5
16228   ac_status=$?
16229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16230   (exit $ac_status); } &&
16231          { ac_try='test -s conftest$ac_exeext'
16232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16233   (eval $ac_try) 2>&5
16234   ac_status=$?
16235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16236   (exit $ac_status); }; }; then
16237   ol_cv_pthread_kthread=yes
16238 else
16239   echo "$as_me: failed program was:" >&5
16240 sed 's/^/| /' conftest.$ac_ext >&5
16241
16242 ol_cv_pthread_kthread=no
16243 fi
16244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16245 else
16246   cat >conftest.$ac_ext <<_ACEOF
16247 #line $LINENO "configure"
16248 /* confdefs.h.  */
16249 _ACEOF
16250 cat confdefs.h >>conftest.$ac_ext
16251 cat >>conftest.$ac_ext <<_ACEOF
16252 /* end confdefs.h.  */
16253 /* pthread test headers */
16254 #include <pthread.h>
16255 #if HAVE_PTHREADS < 7
16256 #include <errno.h>
16257 #endif
16258 #ifndef NULL
16259 #define NULL (void*)0
16260 #endif
16261
16262 static void *task(p)
16263         void *p;
16264 {
16265         return (void *) (p == NULL);
16266 }
16267
16268
16269 int main(argc, argv)
16270         int argc;
16271         char **argv;
16272 {
16273
16274         /* pthread test function */
16275 #ifndef PTHREAD_CREATE_DETACHED
16276 #define PTHREAD_CREATE_DETACHED 1
16277 #endif
16278         pthread_t t;
16279         int status;
16280         int detach = PTHREAD_CREATE_DETACHED;
16281
16282 #if HAVE_PTHREADS > 4
16283         /* Final pthreads */
16284         pthread_attr_t attr;
16285
16286         status = pthread_attr_init(&attr);
16287         if( status ) return status;
16288
16289 #if HAVE_PTHREADS < 7
16290         status = pthread_attr_setdetachstate(&attr, &detach);
16291         if( status < 0 ) status = errno;
16292 #else
16293         status = pthread_attr_setdetachstate(&attr, detach);
16294 #endif
16295         if( status ) return status;
16296         status = pthread_create( &t, &attr, task, NULL );
16297 #if HAVE_PTHREADS < 7
16298         if( status < 0 ) status = errno;
16299 #endif
16300         if( status ) return status;
16301 #else
16302         /* Draft 4 pthreads */
16303         status = pthread_create( &t, pthread_attr_default, task, NULL );
16304         if( status ) return errno;
16305
16306         /* give thread a chance to complete */
16307         /* it should remain joinable and hence detachable */
16308         sleep( 1 );
16309
16310         status = pthread_detach( &t );
16311         if( status ) return errno;
16312 #endif
16313
16314 #ifdef HAVE_LINUX_THREADS
16315         pthread_kill_other_threads_np();
16316 #endif
16317
16318         return 0;
16319
16320 }
16321
16322 _ACEOF
16323 rm -f conftest$ac_exeext
16324 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16325   (eval $ac_link) 2>&5
16326   ac_status=$?
16327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16328   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16330   (eval $ac_try) 2>&5
16331   ac_status=$?
16332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333   (exit $ac_status); }; }; then
16334   ol_cv_pthread_kthread=yes
16335 else
16336   echo "$as_me: program exited with status $ac_status" >&5
16337 echo "$as_me: failed program was:" >&5
16338 sed 's/^/| /' conftest.$ac_ext >&5
16339
16340 ( exit $ac_status )
16341 ol_cv_pthread_kthread=no
16342 fi
16343 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16344 fi
16345
16346                 # restore the LIBS
16347                 LIBS="$ol_LIBS"
16348
16349 fi
16350 echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
16351 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
16352
16353         if test $ol_cv_pthread_kthread = yes ; then
16354                 ol_link_pthreads="-kthread"
16355                 ol_link_threads=posix
16356         fi
16357 fi
16358
16359                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16360 if test "$ol_link_threads" = no ; then
16361         # try -pthread
16362         echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
16363 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
16364 if test "${ol_cv_pthread_pthread+set}" = set; then
16365   echo $ECHO_N "(cached) $ECHO_C" >&6
16366 else
16367
16368                 # save the flags
16369                 ol_LIBS="$LIBS"
16370                 LIBS="-pthread $LIBS"
16371
16372                 if test "$cross_compiling" = yes; then
16373   cat >conftest.$ac_ext <<_ACEOF
16374 #line $LINENO "configure"
16375 /* confdefs.h.  */
16376 _ACEOF
16377 cat confdefs.h >>conftest.$ac_ext
16378 cat >>conftest.$ac_ext <<_ACEOF
16379 /* end confdefs.h.  */
16380 /* pthread test headers */
16381 #include <pthread.h>
16382 #if HAVE_PTHREADS < 7
16383 #include <errno.h>
16384 #endif
16385 #ifndef NULL
16386 #define NULL (void*)0
16387 #endif
16388
16389 static void *task(p)
16390         void *p;
16391 {
16392         return (void *) (p == NULL);
16393 }
16394
16395 int
16396 main ()
16397 {
16398
16399         /* pthread test function */
16400 #ifndef PTHREAD_CREATE_DETACHED
16401 #define PTHREAD_CREATE_DETACHED 1
16402 #endif
16403         pthread_t t;
16404         int status;
16405         int detach = PTHREAD_CREATE_DETACHED;
16406
16407 #if HAVE_PTHREADS > 4
16408         /* Final pthreads */
16409         pthread_attr_t attr;
16410
16411         status = pthread_attr_init(&attr);
16412         if( status ) return status;
16413
16414 #if HAVE_PTHREADS < 7
16415         status = pthread_attr_setdetachstate(&attr, &detach);
16416         if( status < 0 ) status = errno;
16417 #else
16418         status = pthread_attr_setdetachstate(&attr, detach);
16419 #endif
16420         if( status ) return status;
16421         status = pthread_create( &t, &attr, task, NULL );
16422 #if HAVE_PTHREADS < 7
16423         if( status < 0 ) status = errno;
16424 #endif
16425         if( status ) return status;
16426 #else
16427         /* Draft 4 pthreads */
16428         status = pthread_create( &t, pthread_attr_default, task, NULL );
16429         if( status ) return errno;
16430
16431         /* give thread a chance to complete */
16432         /* it should remain joinable and hence detachable */
16433         sleep( 1 );
16434
16435         status = pthread_detach( &t );
16436         if( status ) return errno;
16437 #endif
16438
16439 #ifdef HAVE_LINUX_THREADS
16440         pthread_kill_other_threads_np();
16441 #endif
16442
16443         return 0;
16444
16445   ;
16446   return 0;
16447 }
16448 _ACEOF
16449 rm -f conftest.$ac_objext conftest$ac_exeext
16450 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16451   (eval $ac_link) 2>&5
16452   ac_status=$?
16453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454   (exit $ac_status); } &&
16455          { ac_try='test -s conftest$ac_exeext'
16456   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16457   (eval $ac_try) 2>&5
16458   ac_status=$?
16459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16460   (exit $ac_status); }; }; then
16461   ol_cv_pthread_pthread=yes
16462 else
16463   echo "$as_me: failed program was:" >&5
16464 sed 's/^/| /' conftest.$ac_ext >&5
16465
16466 ol_cv_pthread_pthread=no
16467 fi
16468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16469 else
16470   cat >conftest.$ac_ext <<_ACEOF
16471 #line $LINENO "configure"
16472 /* confdefs.h.  */
16473 _ACEOF
16474 cat confdefs.h >>conftest.$ac_ext
16475 cat >>conftest.$ac_ext <<_ACEOF
16476 /* end confdefs.h.  */
16477 /* pthread test headers */
16478 #include <pthread.h>
16479 #if HAVE_PTHREADS < 7
16480 #include <errno.h>
16481 #endif
16482 #ifndef NULL
16483 #define NULL (void*)0
16484 #endif
16485
16486 static void *task(p)
16487         void *p;
16488 {
16489         return (void *) (p == NULL);
16490 }
16491
16492
16493 int main(argc, argv)
16494         int argc;
16495         char **argv;
16496 {
16497
16498         /* pthread test function */
16499 #ifndef PTHREAD_CREATE_DETACHED
16500 #define PTHREAD_CREATE_DETACHED 1
16501 #endif
16502         pthread_t t;
16503         int status;
16504         int detach = PTHREAD_CREATE_DETACHED;
16505
16506 #if HAVE_PTHREADS > 4
16507         /* Final pthreads */
16508         pthread_attr_t attr;
16509
16510         status = pthread_attr_init(&attr);
16511         if( status ) return status;
16512
16513 #if HAVE_PTHREADS < 7
16514         status = pthread_attr_setdetachstate(&attr, &detach);
16515         if( status < 0 ) status = errno;
16516 #else
16517         status = pthread_attr_setdetachstate(&attr, detach);
16518 #endif
16519         if( status ) return status;
16520         status = pthread_create( &t, &attr, task, NULL );
16521 #if HAVE_PTHREADS < 7
16522         if( status < 0 ) status = errno;
16523 #endif
16524         if( status ) return status;
16525 #else
16526         /* Draft 4 pthreads */
16527         status = pthread_create( &t, pthread_attr_default, task, NULL );
16528         if( status ) return errno;
16529
16530         /* give thread a chance to complete */
16531         /* it should remain joinable and hence detachable */
16532         sleep( 1 );
16533
16534         status = pthread_detach( &t );
16535         if( status ) return errno;
16536 #endif
16537
16538 #ifdef HAVE_LINUX_THREADS
16539         pthread_kill_other_threads_np();
16540 #endif
16541
16542         return 0;
16543
16544 }
16545
16546 _ACEOF
16547 rm -f conftest$ac_exeext
16548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16549   (eval $ac_link) 2>&5
16550   ac_status=$?
16551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16552   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554   (eval $ac_try) 2>&5
16555   ac_status=$?
16556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557   (exit $ac_status); }; }; then
16558   ol_cv_pthread_pthread=yes
16559 else
16560   echo "$as_me: program exited with status $ac_status" >&5
16561 echo "$as_me: failed program was:" >&5
16562 sed 's/^/| /' conftest.$ac_ext >&5
16563
16564 ( exit $ac_status )
16565 ol_cv_pthread_pthread=no
16566 fi
16567 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16568 fi
16569
16570                 # restore the LIBS
16571                 LIBS="$ol_LIBS"
16572
16573 fi
16574 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
16575 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
16576
16577         if test $ol_cv_pthread_pthread = yes ; then
16578                 ol_link_pthreads="-pthread"
16579                 ol_link_threads=posix
16580         fi
16581 fi
16582
16583                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16584 if test "$ol_link_threads" = no ; then
16585         # try -pthreads
16586         echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
16587 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
16588 if test "${ol_cv_pthread_pthreads+set}" = set; then
16589   echo $ECHO_N "(cached) $ECHO_C" >&6
16590 else
16591
16592                 # save the flags
16593                 ol_LIBS="$LIBS"
16594                 LIBS="-pthreads $LIBS"
16595
16596                 if test "$cross_compiling" = yes; then
16597   cat >conftest.$ac_ext <<_ACEOF
16598 #line $LINENO "configure"
16599 /* confdefs.h.  */
16600 _ACEOF
16601 cat confdefs.h >>conftest.$ac_ext
16602 cat >>conftest.$ac_ext <<_ACEOF
16603 /* end confdefs.h.  */
16604 /* pthread test headers */
16605 #include <pthread.h>
16606 #if HAVE_PTHREADS < 7
16607 #include <errno.h>
16608 #endif
16609 #ifndef NULL
16610 #define NULL (void*)0
16611 #endif
16612
16613 static void *task(p)
16614         void *p;
16615 {
16616         return (void *) (p == NULL);
16617 }
16618
16619 int
16620 main ()
16621 {
16622
16623         /* pthread test function */
16624 #ifndef PTHREAD_CREATE_DETACHED
16625 #define PTHREAD_CREATE_DETACHED 1
16626 #endif
16627         pthread_t t;
16628         int status;
16629         int detach = PTHREAD_CREATE_DETACHED;
16630
16631 #if HAVE_PTHREADS > 4
16632         /* Final pthreads */
16633         pthread_attr_t attr;
16634
16635         status = pthread_attr_init(&attr);
16636         if( status ) return status;
16637
16638 #if HAVE_PTHREADS < 7
16639         status = pthread_attr_setdetachstate(&attr, &detach);
16640         if( status < 0 ) status = errno;
16641 #else
16642         status = pthread_attr_setdetachstate(&attr, detach);
16643 #endif
16644         if( status ) return status;
16645         status = pthread_create( &t, &attr, task, NULL );
16646 #if HAVE_PTHREADS < 7
16647         if( status < 0 ) status = errno;
16648 #endif
16649         if( status ) return status;
16650 #else
16651         /* Draft 4 pthreads */
16652         status = pthread_create( &t, pthread_attr_default, task, NULL );
16653         if( status ) return errno;
16654
16655         /* give thread a chance to complete */
16656         /* it should remain joinable and hence detachable */
16657         sleep( 1 );
16658
16659         status = pthread_detach( &t );
16660         if( status ) return errno;
16661 #endif
16662
16663 #ifdef HAVE_LINUX_THREADS
16664         pthread_kill_other_threads_np();
16665 #endif
16666
16667         return 0;
16668
16669   ;
16670   return 0;
16671 }
16672 _ACEOF
16673 rm -f conftest.$ac_objext conftest$ac_exeext
16674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16675   (eval $ac_link) 2>&5
16676   ac_status=$?
16677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16678   (exit $ac_status); } &&
16679          { ac_try='test -s conftest$ac_exeext'
16680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16681   (eval $ac_try) 2>&5
16682   ac_status=$?
16683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16684   (exit $ac_status); }; }; then
16685   ol_cv_pthread_pthreads=yes
16686 else
16687   echo "$as_me: failed program was:" >&5
16688 sed 's/^/| /' conftest.$ac_ext >&5
16689
16690 ol_cv_pthread_pthreads=no
16691 fi
16692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16693 else
16694   cat >conftest.$ac_ext <<_ACEOF
16695 #line $LINENO "configure"
16696 /* confdefs.h.  */
16697 _ACEOF
16698 cat confdefs.h >>conftest.$ac_ext
16699 cat >>conftest.$ac_ext <<_ACEOF
16700 /* end confdefs.h.  */
16701 /* pthread test headers */
16702 #include <pthread.h>
16703 #if HAVE_PTHREADS < 7
16704 #include <errno.h>
16705 #endif
16706 #ifndef NULL
16707 #define NULL (void*)0
16708 #endif
16709
16710 static void *task(p)
16711         void *p;
16712 {
16713         return (void *) (p == NULL);
16714 }
16715
16716
16717 int main(argc, argv)
16718         int argc;
16719         char **argv;
16720 {
16721
16722         /* pthread test function */
16723 #ifndef PTHREAD_CREATE_DETACHED
16724 #define PTHREAD_CREATE_DETACHED 1
16725 #endif
16726         pthread_t t;
16727         int status;
16728         int detach = PTHREAD_CREATE_DETACHED;
16729
16730 #if HAVE_PTHREADS > 4
16731         /* Final pthreads */
16732         pthread_attr_t attr;
16733
16734         status = pthread_attr_init(&attr);
16735         if( status ) return status;
16736
16737 #if HAVE_PTHREADS < 7
16738         status = pthread_attr_setdetachstate(&attr, &detach);
16739         if( status < 0 ) status = errno;
16740 #else
16741         status = pthread_attr_setdetachstate(&attr, detach);
16742 #endif
16743         if( status ) return status;
16744         status = pthread_create( &t, &attr, task, NULL );
16745 #if HAVE_PTHREADS < 7
16746         if( status < 0 ) status = errno;
16747 #endif
16748         if( status ) return status;
16749 #else
16750         /* Draft 4 pthreads */
16751         status = pthread_create( &t, pthread_attr_default, task, NULL );
16752         if( status ) return errno;
16753
16754         /* give thread a chance to complete */
16755         /* it should remain joinable and hence detachable */
16756         sleep( 1 );
16757
16758         status = pthread_detach( &t );
16759         if( status ) return errno;
16760 #endif
16761
16762 #ifdef HAVE_LINUX_THREADS
16763         pthread_kill_other_threads_np();
16764 #endif
16765
16766         return 0;
16767
16768 }
16769
16770 _ACEOF
16771 rm -f conftest$ac_exeext
16772 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16773   (eval $ac_link) 2>&5
16774   ac_status=$?
16775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16776   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778   (eval $ac_try) 2>&5
16779   ac_status=$?
16780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781   (exit $ac_status); }; }; then
16782   ol_cv_pthread_pthreads=yes
16783 else
16784   echo "$as_me: program exited with status $ac_status" >&5
16785 echo "$as_me: failed program was:" >&5
16786 sed 's/^/| /' conftest.$ac_ext >&5
16787
16788 ( exit $ac_status )
16789 ol_cv_pthread_pthreads=no
16790 fi
16791 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16792 fi
16793
16794                 # restore the LIBS
16795                 LIBS="$ol_LIBS"
16796
16797 fi
16798 echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
16799 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
16800
16801         if test $ol_cv_pthread_pthreads = yes ; then
16802                 ol_link_pthreads="-pthreads"
16803                 ol_link_threads=posix
16804         fi
16805 fi
16806
16807                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16808 if test "$ol_link_threads" = no ; then
16809         # try -mthreads
16810         echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
16811 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
16812 if test "${ol_cv_pthread_mthreads+set}" = set; then
16813   echo $ECHO_N "(cached) $ECHO_C" >&6
16814 else
16815
16816                 # save the flags
16817                 ol_LIBS="$LIBS"
16818                 LIBS="-mthreads $LIBS"
16819
16820                 if test "$cross_compiling" = yes; then
16821   cat >conftest.$ac_ext <<_ACEOF
16822 #line $LINENO "configure"
16823 /* confdefs.h.  */
16824 _ACEOF
16825 cat confdefs.h >>conftest.$ac_ext
16826 cat >>conftest.$ac_ext <<_ACEOF
16827 /* end confdefs.h.  */
16828 /* pthread test headers */
16829 #include <pthread.h>
16830 #if HAVE_PTHREADS < 7
16831 #include <errno.h>
16832 #endif
16833 #ifndef NULL
16834 #define NULL (void*)0
16835 #endif
16836
16837 static void *task(p)
16838         void *p;
16839 {
16840         return (void *) (p == NULL);
16841 }
16842
16843 int
16844 main ()
16845 {
16846
16847         /* pthread test function */
16848 #ifndef PTHREAD_CREATE_DETACHED
16849 #define PTHREAD_CREATE_DETACHED 1
16850 #endif
16851         pthread_t t;
16852         int status;
16853         int detach = PTHREAD_CREATE_DETACHED;
16854
16855 #if HAVE_PTHREADS > 4
16856         /* Final pthreads */
16857         pthread_attr_t attr;
16858
16859         status = pthread_attr_init(&attr);
16860         if( status ) return status;
16861
16862 #if HAVE_PTHREADS < 7
16863         status = pthread_attr_setdetachstate(&attr, &detach);
16864         if( status < 0 ) status = errno;
16865 #else
16866         status = pthread_attr_setdetachstate(&attr, detach);
16867 #endif
16868         if( status ) return status;
16869         status = pthread_create( &t, &attr, task, NULL );
16870 #if HAVE_PTHREADS < 7
16871         if( status < 0 ) status = errno;
16872 #endif
16873         if( status ) return status;
16874 #else
16875         /* Draft 4 pthreads */
16876         status = pthread_create( &t, pthread_attr_default, task, NULL );
16877         if( status ) return errno;
16878
16879         /* give thread a chance to complete */
16880         /* it should remain joinable and hence detachable */
16881         sleep( 1 );
16882
16883         status = pthread_detach( &t );
16884         if( status ) return errno;
16885 #endif
16886
16887 #ifdef HAVE_LINUX_THREADS
16888         pthread_kill_other_threads_np();
16889 #endif
16890
16891         return 0;
16892
16893   ;
16894   return 0;
16895 }
16896 _ACEOF
16897 rm -f conftest.$ac_objext conftest$ac_exeext
16898 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16899   (eval $ac_link) 2>&5
16900   ac_status=$?
16901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16902   (exit $ac_status); } &&
16903          { ac_try='test -s conftest$ac_exeext'
16904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16905   (eval $ac_try) 2>&5
16906   ac_status=$?
16907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16908   (exit $ac_status); }; }; then
16909   ol_cv_pthread_mthreads=yes
16910 else
16911   echo "$as_me: failed program was:" >&5
16912 sed 's/^/| /' conftest.$ac_ext >&5
16913
16914 ol_cv_pthread_mthreads=no
16915 fi
16916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16917 else
16918   cat >conftest.$ac_ext <<_ACEOF
16919 #line $LINENO "configure"
16920 /* confdefs.h.  */
16921 _ACEOF
16922 cat confdefs.h >>conftest.$ac_ext
16923 cat >>conftest.$ac_ext <<_ACEOF
16924 /* end confdefs.h.  */
16925 /* pthread test headers */
16926 #include <pthread.h>
16927 #if HAVE_PTHREADS < 7
16928 #include <errno.h>
16929 #endif
16930 #ifndef NULL
16931 #define NULL (void*)0
16932 #endif
16933
16934 static void *task(p)
16935         void *p;
16936 {
16937         return (void *) (p == NULL);
16938 }
16939
16940
16941 int main(argc, argv)
16942         int argc;
16943         char **argv;
16944 {
16945
16946         /* pthread test function */
16947 #ifndef PTHREAD_CREATE_DETACHED
16948 #define PTHREAD_CREATE_DETACHED 1
16949 #endif
16950         pthread_t t;
16951         int status;
16952         int detach = PTHREAD_CREATE_DETACHED;
16953
16954 #if HAVE_PTHREADS > 4
16955         /* Final pthreads */
16956         pthread_attr_t attr;
16957
16958         status = pthread_attr_init(&attr);
16959         if( status ) return status;
16960
16961 #if HAVE_PTHREADS < 7
16962         status = pthread_attr_setdetachstate(&attr, &detach);
16963         if( status < 0 ) status = errno;
16964 #else
16965         status = pthread_attr_setdetachstate(&attr, detach);
16966 #endif
16967         if( status ) return status;
16968         status = pthread_create( &t, &attr, task, NULL );
16969 #if HAVE_PTHREADS < 7
16970         if( status < 0 ) status = errno;
16971 #endif
16972         if( status ) return status;
16973 #else
16974         /* Draft 4 pthreads */
16975         status = pthread_create( &t, pthread_attr_default, task, NULL );
16976         if( status ) return errno;
16977
16978         /* give thread a chance to complete */
16979         /* it should remain joinable and hence detachable */
16980         sleep( 1 );
16981
16982         status = pthread_detach( &t );
16983         if( status ) return errno;
16984 #endif
16985
16986 #ifdef HAVE_LINUX_THREADS
16987         pthread_kill_other_threads_np();
16988 #endif
16989
16990         return 0;
16991
16992 }
16993
16994 _ACEOF
16995 rm -f conftest$ac_exeext
16996 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16997   (eval $ac_link) 2>&5
16998   ac_status=$?
16999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17000   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17002   (eval $ac_try) 2>&5
17003   ac_status=$?
17004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17005   (exit $ac_status); }; }; then
17006   ol_cv_pthread_mthreads=yes
17007 else
17008   echo "$as_me: program exited with status $ac_status" >&5
17009 echo "$as_me: failed program was:" >&5
17010 sed 's/^/| /' conftest.$ac_ext >&5
17011
17012 ( exit $ac_status )
17013 ol_cv_pthread_mthreads=no
17014 fi
17015 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17016 fi
17017
17018                 # restore the LIBS
17019                 LIBS="$ol_LIBS"
17020
17021 fi
17022 echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
17023 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
17024
17025         if test $ol_cv_pthread_mthreads = yes ; then
17026                 ol_link_pthreads="-mthreads"
17027                 ol_link_threads=posix
17028         fi
17029 fi
17030
17031                 # Pthread try link: -thread (ol_cv_pthread_thread)
17032 if test "$ol_link_threads" = no ; then
17033         # try -thread
17034         echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
17035 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
17036 if test "${ol_cv_pthread_thread+set}" = set; then
17037   echo $ECHO_N "(cached) $ECHO_C" >&6
17038 else
17039
17040                 # save the flags
17041                 ol_LIBS="$LIBS"
17042                 LIBS="-thread $LIBS"
17043
17044                 if test "$cross_compiling" = yes; then
17045   cat >conftest.$ac_ext <<_ACEOF
17046 #line $LINENO "configure"
17047 /* confdefs.h.  */
17048 _ACEOF
17049 cat confdefs.h >>conftest.$ac_ext
17050 cat >>conftest.$ac_ext <<_ACEOF
17051 /* end confdefs.h.  */
17052 /* pthread test headers */
17053 #include <pthread.h>
17054 #if HAVE_PTHREADS < 7
17055 #include <errno.h>
17056 #endif
17057 #ifndef NULL
17058 #define NULL (void*)0
17059 #endif
17060
17061 static void *task(p)
17062         void *p;
17063 {
17064         return (void *) (p == NULL);
17065 }
17066
17067 int
17068 main ()
17069 {
17070
17071         /* pthread test function */
17072 #ifndef PTHREAD_CREATE_DETACHED
17073 #define PTHREAD_CREATE_DETACHED 1
17074 #endif
17075         pthread_t t;
17076         int status;
17077         int detach = PTHREAD_CREATE_DETACHED;
17078
17079 #if HAVE_PTHREADS > 4
17080         /* Final pthreads */
17081         pthread_attr_t attr;
17082
17083         status = pthread_attr_init(&attr);
17084         if( status ) return status;
17085
17086 #if HAVE_PTHREADS < 7
17087         status = pthread_attr_setdetachstate(&attr, &detach);
17088         if( status < 0 ) status = errno;
17089 #else
17090         status = pthread_attr_setdetachstate(&attr, detach);
17091 #endif
17092         if( status ) return status;
17093         status = pthread_create( &t, &attr, task, NULL );
17094 #if HAVE_PTHREADS < 7
17095         if( status < 0 ) status = errno;
17096 #endif
17097         if( status ) return status;
17098 #else
17099         /* Draft 4 pthreads */
17100         status = pthread_create( &t, pthread_attr_default, task, NULL );
17101         if( status ) return errno;
17102
17103         /* give thread a chance to complete */
17104         /* it should remain joinable and hence detachable */
17105         sleep( 1 );
17106
17107         status = pthread_detach( &t );
17108         if( status ) return errno;
17109 #endif
17110
17111 #ifdef HAVE_LINUX_THREADS
17112         pthread_kill_other_threads_np();
17113 #endif
17114
17115         return 0;
17116
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>&5
17124   ac_status=$?
17125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17126   (exit $ac_status); } &&
17127          { ac_try='test -s conftest$ac_exeext'
17128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17129   (eval $ac_try) 2>&5
17130   ac_status=$?
17131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17132   (exit $ac_status); }; }; then
17133   ol_cv_pthread_thread=yes
17134 else
17135   echo "$as_me: failed program was:" >&5
17136 sed 's/^/| /' conftest.$ac_ext >&5
17137
17138 ol_cv_pthread_thread=no
17139 fi
17140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17141 else
17142   cat >conftest.$ac_ext <<_ACEOF
17143 #line $LINENO "configure"
17144 /* confdefs.h.  */
17145 _ACEOF
17146 cat confdefs.h >>conftest.$ac_ext
17147 cat >>conftest.$ac_ext <<_ACEOF
17148 /* end confdefs.h.  */
17149 /* pthread test headers */
17150 #include <pthread.h>
17151 #if HAVE_PTHREADS < 7
17152 #include <errno.h>
17153 #endif
17154 #ifndef NULL
17155 #define NULL (void*)0
17156 #endif
17157
17158 static void *task(p)
17159         void *p;
17160 {
17161         return (void *) (p == NULL);
17162 }
17163
17164
17165 int main(argc, argv)
17166         int argc;
17167         char **argv;
17168 {
17169
17170         /* pthread test function */
17171 #ifndef PTHREAD_CREATE_DETACHED
17172 #define PTHREAD_CREATE_DETACHED 1
17173 #endif
17174         pthread_t t;
17175         int status;
17176         int detach = PTHREAD_CREATE_DETACHED;
17177
17178 #if HAVE_PTHREADS > 4
17179         /* Final pthreads */
17180         pthread_attr_t attr;
17181
17182         status = pthread_attr_init(&attr);
17183         if( status ) return status;
17184
17185 #if HAVE_PTHREADS < 7
17186         status = pthread_attr_setdetachstate(&attr, &detach);
17187         if( status < 0 ) status = errno;
17188 #else
17189         status = pthread_attr_setdetachstate(&attr, detach);
17190 #endif
17191         if( status ) return status;
17192         status = pthread_create( &t, &attr, task, NULL );
17193 #if HAVE_PTHREADS < 7
17194         if( status < 0 ) status = errno;
17195 #endif
17196         if( status ) return status;
17197 #else
17198         /* Draft 4 pthreads */
17199         status = pthread_create( &t, pthread_attr_default, task, NULL );
17200         if( status ) return errno;
17201
17202         /* give thread a chance to complete */
17203         /* it should remain joinable and hence detachable */
17204         sleep( 1 );
17205
17206         status = pthread_detach( &t );
17207         if( status ) return errno;
17208 #endif
17209
17210 #ifdef HAVE_LINUX_THREADS
17211         pthread_kill_other_threads_np();
17212 #endif
17213
17214         return 0;
17215
17216 }
17217
17218 _ACEOF
17219 rm -f conftest$ac_exeext
17220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17221   (eval $ac_link) 2>&5
17222   ac_status=$?
17223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17224   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17226   (eval $ac_try) 2>&5
17227   ac_status=$?
17228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229   (exit $ac_status); }; }; then
17230   ol_cv_pthread_thread=yes
17231 else
17232   echo "$as_me: program exited with status $ac_status" >&5
17233 echo "$as_me: failed program was:" >&5
17234 sed 's/^/| /' conftest.$ac_ext >&5
17235
17236 ( exit $ac_status )
17237 ol_cv_pthread_thread=no
17238 fi
17239 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17240 fi
17241
17242                 # restore the LIBS
17243                 LIBS="$ol_LIBS"
17244
17245 fi
17246 echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
17247 echo "${ECHO_T}$ol_cv_pthread_thread" >&6
17248
17249         if test $ol_cv_pthread_thread = yes ; then
17250                 ol_link_pthreads="-thread"
17251                 ol_link_threads=posix
17252         fi
17253 fi
17254
17255
17256                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17257 if test "$ol_link_threads" = no ; then
17258         # try -lpthread -lmach -lexc -lc_r
17259         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17260 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
17261 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
17262   echo $ECHO_N "(cached) $ECHO_C" >&6
17263 else
17264
17265                 # save the flags
17266                 ol_LIBS="$LIBS"
17267                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17268
17269                 if test "$cross_compiling" = yes; then
17270   cat >conftest.$ac_ext <<_ACEOF
17271 #line $LINENO "configure"
17272 /* confdefs.h.  */
17273 _ACEOF
17274 cat confdefs.h >>conftest.$ac_ext
17275 cat >>conftest.$ac_ext <<_ACEOF
17276 /* end confdefs.h.  */
17277 /* pthread test headers */
17278 #include <pthread.h>
17279 #if HAVE_PTHREADS < 7
17280 #include <errno.h>
17281 #endif
17282 #ifndef NULL
17283 #define NULL (void*)0
17284 #endif
17285
17286 static void *task(p)
17287         void *p;
17288 {
17289         return (void *) (p == NULL);
17290 }
17291
17292 int
17293 main ()
17294 {
17295
17296         /* pthread test function */
17297 #ifndef PTHREAD_CREATE_DETACHED
17298 #define PTHREAD_CREATE_DETACHED 1
17299 #endif
17300         pthread_t t;
17301         int status;
17302         int detach = PTHREAD_CREATE_DETACHED;
17303
17304 #if HAVE_PTHREADS > 4
17305         /* Final pthreads */
17306         pthread_attr_t attr;
17307
17308         status = pthread_attr_init(&attr);
17309         if( status ) return status;
17310
17311 #if HAVE_PTHREADS < 7
17312         status = pthread_attr_setdetachstate(&attr, &detach);
17313         if( status < 0 ) status = errno;
17314 #else
17315         status = pthread_attr_setdetachstate(&attr, detach);
17316 #endif
17317         if( status ) return status;
17318         status = pthread_create( &t, &attr, task, NULL );
17319 #if HAVE_PTHREADS < 7
17320         if( status < 0 ) status = errno;
17321 #endif
17322         if( status ) return status;
17323 #else
17324         /* Draft 4 pthreads */
17325         status = pthread_create( &t, pthread_attr_default, task, NULL );
17326         if( status ) return errno;
17327
17328         /* give thread a chance to complete */
17329         /* it should remain joinable and hence detachable */
17330         sleep( 1 );
17331
17332         status = pthread_detach( &t );
17333         if( status ) return errno;
17334 #endif
17335
17336 #ifdef HAVE_LINUX_THREADS
17337         pthread_kill_other_threads_np();
17338 #endif
17339
17340         return 0;
17341
17342   ;
17343   return 0;
17344 }
17345 _ACEOF
17346 rm -f conftest.$ac_objext conftest$ac_exeext
17347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17348   (eval $ac_link) 2>&5
17349   ac_status=$?
17350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351   (exit $ac_status); } &&
17352          { ac_try='test -s conftest$ac_exeext'
17353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17354   (eval $ac_try) 2>&5
17355   ac_status=$?
17356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17357   (exit $ac_status); }; }; then
17358   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17359 else
17360   echo "$as_me: failed program was:" >&5
17361 sed 's/^/| /' conftest.$ac_ext >&5
17362
17363 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17364 fi
17365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17366 else
17367   cat >conftest.$ac_ext <<_ACEOF
17368 #line $LINENO "configure"
17369 /* confdefs.h.  */
17370 _ACEOF
17371 cat confdefs.h >>conftest.$ac_ext
17372 cat >>conftest.$ac_ext <<_ACEOF
17373 /* end confdefs.h.  */
17374 /* pthread test headers */
17375 #include <pthread.h>
17376 #if HAVE_PTHREADS < 7
17377 #include <errno.h>
17378 #endif
17379 #ifndef NULL
17380 #define NULL (void*)0
17381 #endif
17382
17383 static void *task(p)
17384         void *p;
17385 {
17386         return (void *) (p == NULL);
17387 }
17388
17389
17390 int main(argc, argv)
17391         int argc;
17392         char **argv;
17393 {
17394
17395         /* pthread test function */
17396 #ifndef PTHREAD_CREATE_DETACHED
17397 #define PTHREAD_CREATE_DETACHED 1
17398 #endif
17399         pthread_t t;
17400         int status;
17401         int detach = PTHREAD_CREATE_DETACHED;
17402
17403 #if HAVE_PTHREADS > 4
17404         /* Final pthreads */
17405         pthread_attr_t attr;
17406
17407         status = pthread_attr_init(&attr);
17408         if( status ) return status;
17409
17410 #if HAVE_PTHREADS < 7
17411         status = pthread_attr_setdetachstate(&attr, &detach);
17412         if( status < 0 ) status = errno;
17413 #else
17414         status = pthread_attr_setdetachstate(&attr, detach);
17415 #endif
17416         if( status ) return status;
17417         status = pthread_create( &t, &attr, task, NULL );
17418 #if HAVE_PTHREADS < 7
17419         if( status < 0 ) status = errno;
17420 #endif
17421         if( status ) return status;
17422 #else
17423         /* Draft 4 pthreads */
17424         status = pthread_create( &t, pthread_attr_default, task, NULL );
17425         if( status ) return errno;
17426
17427         /* give thread a chance to complete */
17428         /* it should remain joinable and hence detachable */
17429         sleep( 1 );
17430
17431         status = pthread_detach( &t );
17432         if( status ) return errno;
17433 #endif
17434
17435 #ifdef HAVE_LINUX_THREADS
17436         pthread_kill_other_threads_np();
17437 #endif
17438
17439         return 0;
17440
17441 }
17442
17443 _ACEOF
17444 rm -f conftest$ac_exeext
17445 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17446   (eval $ac_link) 2>&5
17447   ac_status=$?
17448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17449   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17451   (eval $ac_try) 2>&5
17452   ac_status=$?
17453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17454   (exit $ac_status); }; }; then
17455   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17456 else
17457   echo "$as_me: program exited with status $ac_status" >&5
17458 echo "$as_me: failed program was:" >&5
17459 sed 's/^/| /' conftest.$ac_ext >&5
17460
17461 ( exit $ac_status )
17462 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17463 fi
17464 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17465 fi
17466
17467                 # restore the LIBS
17468                 LIBS="$ol_LIBS"
17469
17470 fi
17471 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17472 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
17473
17474         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17475                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17476                 ol_link_threads=posix
17477         fi
17478 fi
17479
17480                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17481 if test "$ol_link_threads" = no ; then
17482         # try -lpthread -lmach -lexc
17483         echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
17484 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
17485 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
17486   echo $ECHO_N "(cached) $ECHO_C" >&6
17487 else
17488
17489                 # save the flags
17490                 ol_LIBS="$LIBS"
17491                 LIBS="-lpthread -lmach -lexc $LIBS"
17492
17493                 if test "$cross_compiling" = yes; then
17494   cat >conftest.$ac_ext <<_ACEOF
17495 #line $LINENO "configure"
17496 /* confdefs.h.  */
17497 _ACEOF
17498 cat confdefs.h >>conftest.$ac_ext
17499 cat >>conftest.$ac_ext <<_ACEOF
17500 /* end confdefs.h.  */
17501 /* pthread test headers */
17502 #include <pthread.h>
17503 #if HAVE_PTHREADS < 7
17504 #include <errno.h>
17505 #endif
17506 #ifndef NULL
17507 #define NULL (void*)0
17508 #endif
17509
17510 static void *task(p)
17511         void *p;
17512 {
17513         return (void *) (p == NULL);
17514 }
17515
17516 int
17517 main ()
17518 {
17519
17520         /* pthread test function */
17521 #ifndef PTHREAD_CREATE_DETACHED
17522 #define PTHREAD_CREATE_DETACHED 1
17523 #endif
17524         pthread_t t;
17525         int status;
17526         int detach = PTHREAD_CREATE_DETACHED;
17527
17528 #if HAVE_PTHREADS > 4
17529         /* Final pthreads */
17530         pthread_attr_t attr;
17531
17532         status = pthread_attr_init(&attr);
17533         if( status ) return status;
17534
17535 #if HAVE_PTHREADS < 7
17536         status = pthread_attr_setdetachstate(&attr, &detach);
17537         if( status < 0 ) status = errno;
17538 #else
17539         status = pthread_attr_setdetachstate(&attr, detach);
17540 #endif
17541         if( status ) return status;
17542         status = pthread_create( &t, &attr, task, NULL );
17543 #if HAVE_PTHREADS < 7
17544         if( status < 0 ) status = errno;
17545 #endif
17546         if( status ) return status;
17547 #else
17548         /* Draft 4 pthreads */
17549         status = pthread_create( &t, pthread_attr_default, task, NULL );
17550         if( status ) return errno;
17551
17552         /* give thread a chance to complete */
17553         /* it should remain joinable and hence detachable */
17554         sleep( 1 );
17555
17556         status = pthread_detach( &t );
17557         if( status ) return errno;
17558 #endif
17559
17560 #ifdef HAVE_LINUX_THREADS
17561         pthread_kill_other_threads_np();
17562 #endif
17563
17564         return 0;
17565
17566   ;
17567   return 0;
17568 }
17569 _ACEOF
17570 rm -f conftest.$ac_objext conftest$ac_exeext
17571 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17572   (eval $ac_link) 2>&5
17573   ac_status=$?
17574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17575   (exit $ac_status); } &&
17576          { ac_try='test -s conftest$ac_exeext'
17577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17578   (eval $ac_try) 2>&5
17579   ac_status=$?
17580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581   (exit $ac_status); }; }; then
17582   ol_cv_pthread_lpthread_lmach_lexc=yes
17583 else
17584   echo "$as_me: failed program was:" >&5
17585 sed 's/^/| /' conftest.$ac_ext >&5
17586
17587 ol_cv_pthread_lpthread_lmach_lexc=no
17588 fi
17589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17590 else
17591   cat >conftest.$ac_ext <<_ACEOF
17592 #line $LINENO "configure"
17593 /* confdefs.h.  */
17594 _ACEOF
17595 cat confdefs.h >>conftest.$ac_ext
17596 cat >>conftest.$ac_ext <<_ACEOF
17597 /* end confdefs.h.  */
17598 /* pthread test headers */
17599 #include <pthread.h>
17600 #if HAVE_PTHREADS < 7
17601 #include <errno.h>
17602 #endif
17603 #ifndef NULL
17604 #define NULL (void*)0
17605 #endif
17606
17607 static void *task(p)
17608         void *p;
17609 {
17610         return (void *) (p == NULL);
17611 }
17612
17613
17614 int main(argc, argv)
17615         int argc;
17616         char **argv;
17617 {
17618
17619         /* pthread test function */
17620 #ifndef PTHREAD_CREATE_DETACHED
17621 #define PTHREAD_CREATE_DETACHED 1
17622 #endif
17623         pthread_t t;
17624         int status;
17625         int detach = PTHREAD_CREATE_DETACHED;
17626
17627 #if HAVE_PTHREADS > 4
17628         /* Final pthreads */
17629         pthread_attr_t attr;
17630
17631         status = pthread_attr_init(&attr);
17632         if( status ) return status;
17633
17634 #if HAVE_PTHREADS < 7
17635         status = pthread_attr_setdetachstate(&attr, &detach);
17636         if( status < 0 ) status = errno;
17637 #else
17638         status = pthread_attr_setdetachstate(&attr, detach);
17639 #endif
17640         if( status ) return status;
17641         status = pthread_create( &t, &attr, task, NULL );
17642 #if HAVE_PTHREADS < 7
17643         if( status < 0 ) status = errno;
17644 #endif
17645         if( status ) return status;
17646 #else
17647         /* Draft 4 pthreads */
17648         status = pthread_create( &t, pthread_attr_default, task, NULL );
17649         if( status ) return errno;
17650
17651         /* give thread a chance to complete */
17652         /* it should remain joinable and hence detachable */
17653         sleep( 1 );
17654
17655         status = pthread_detach( &t );
17656         if( status ) return errno;
17657 #endif
17658
17659 #ifdef HAVE_LINUX_THREADS
17660         pthread_kill_other_threads_np();
17661 #endif
17662
17663         return 0;
17664
17665 }
17666
17667 _ACEOF
17668 rm -f conftest$ac_exeext
17669 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17670   (eval $ac_link) 2>&5
17671   ac_status=$?
17672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17673   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17675   (eval $ac_try) 2>&5
17676   ac_status=$?
17677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17678   (exit $ac_status); }; }; then
17679   ol_cv_pthread_lpthread_lmach_lexc=yes
17680 else
17681   echo "$as_me: program exited with status $ac_status" >&5
17682 echo "$as_me: failed program was:" >&5
17683 sed 's/^/| /' conftest.$ac_ext >&5
17684
17685 ( exit $ac_status )
17686 ol_cv_pthread_lpthread_lmach_lexc=no
17687 fi
17688 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17689 fi
17690
17691                 # restore the LIBS
17692                 LIBS="$ol_LIBS"
17693
17694 fi
17695 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17696 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
17697
17698         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17699                 ol_link_pthreads="-lpthread -lmach -lexc"
17700                 ol_link_threads=posix
17701         fi
17702 fi
17703
17704
17705                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17706 if test "$ol_link_threads" = no ; then
17707         # try -lpthread -Wl,-woff,85
17708         echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17709 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
17710 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713
17714                 # save the flags
17715                 ol_LIBS="$LIBS"
17716                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17717
17718                 if test "$cross_compiling" = yes; then
17719   cat >conftest.$ac_ext <<_ACEOF
17720 #line $LINENO "configure"
17721 /* confdefs.h.  */
17722 _ACEOF
17723 cat confdefs.h >>conftest.$ac_ext
17724 cat >>conftest.$ac_ext <<_ACEOF
17725 /* end confdefs.h.  */
17726 /* pthread test headers */
17727 #include <pthread.h>
17728 #if HAVE_PTHREADS < 7
17729 #include <errno.h>
17730 #endif
17731 #ifndef NULL
17732 #define NULL (void*)0
17733 #endif
17734
17735 static void *task(p)
17736         void *p;
17737 {
17738         return (void *) (p == NULL);
17739 }
17740
17741 int
17742 main ()
17743 {
17744
17745         /* pthread test function */
17746 #ifndef PTHREAD_CREATE_DETACHED
17747 #define PTHREAD_CREATE_DETACHED 1
17748 #endif
17749         pthread_t t;
17750         int status;
17751         int detach = PTHREAD_CREATE_DETACHED;
17752
17753 #if HAVE_PTHREADS > 4
17754         /* Final pthreads */
17755         pthread_attr_t attr;
17756
17757         status = pthread_attr_init(&attr);
17758         if( status ) return status;
17759
17760 #if HAVE_PTHREADS < 7
17761         status = pthread_attr_setdetachstate(&attr, &detach);
17762         if( status < 0 ) status = errno;
17763 #else
17764         status = pthread_attr_setdetachstate(&attr, detach);
17765 #endif
17766         if( status ) return status;
17767         status = pthread_create( &t, &attr, task, NULL );
17768 #if HAVE_PTHREADS < 7
17769         if( status < 0 ) status = errno;
17770 #endif
17771         if( status ) return status;
17772 #else
17773         /* Draft 4 pthreads */
17774         status = pthread_create( &t, pthread_attr_default, task, NULL );
17775         if( status ) return errno;
17776
17777         /* give thread a chance to complete */
17778         /* it should remain joinable and hence detachable */
17779         sleep( 1 );
17780
17781         status = pthread_detach( &t );
17782         if( status ) return errno;
17783 #endif
17784
17785 #ifdef HAVE_LINUX_THREADS
17786         pthread_kill_other_threads_np();
17787 #endif
17788
17789         return 0;
17790
17791   ;
17792   return 0;
17793 }
17794 _ACEOF
17795 rm -f conftest.$ac_objext conftest$ac_exeext
17796 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17797   (eval $ac_link) 2>&5
17798   ac_status=$?
17799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17800   (exit $ac_status); } &&
17801          { ac_try='test -s conftest$ac_exeext'
17802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17803   (eval $ac_try) 2>&5
17804   ac_status=$?
17805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17806   (exit $ac_status); }; }; then
17807   ol_cv_pthread_lib_lpthread_woff=yes
17808 else
17809   echo "$as_me: failed program was:" >&5
17810 sed 's/^/| /' conftest.$ac_ext >&5
17811
17812 ol_cv_pthread_lib_lpthread_woff=no
17813 fi
17814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17815 else
17816   cat >conftest.$ac_ext <<_ACEOF
17817 #line $LINENO "configure"
17818 /* confdefs.h.  */
17819 _ACEOF
17820 cat confdefs.h >>conftest.$ac_ext
17821 cat >>conftest.$ac_ext <<_ACEOF
17822 /* end confdefs.h.  */
17823 /* pthread test headers */
17824 #include <pthread.h>
17825 #if HAVE_PTHREADS < 7
17826 #include <errno.h>
17827 #endif
17828 #ifndef NULL
17829 #define NULL (void*)0
17830 #endif
17831
17832 static void *task(p)
17833         void *p;
17834 {
17835         return (void *) (p == NULL);
17836 }
17837
17838
17839 int main(argc, argv)
17840         int argc;
17841         char **argv;
17842 {
17843
17844         /* pthread test function */
17845 #ifndef PTHREAD_CREATE_DETACHED
17846 #define PTHREAD_CREATE_DETACHED 1
17847 #endif
17848         pthread_t t;
17849         int status;
17850         int detach = PTHREAD_CREATE_DETACHED;
17851
17852 #if HAVE_PTHREADS > 4
17853         /* Final pthreads */
17854         pthread_attr_t attr;
17855
17856         status = pthread_attr_init(&attr);
17857         if( status ) return status;
17858
17859 #if HAVE_PTHREADS < 7
17860         status = pthread_attr_setdetachstate(&attr, &detach);
17861         if( status < 0 ) status = errno;
17862 #else
17863         status = pthread_attr_setdetachstate(&attr, detach);
17864 #endif
17865         if( status ) return status;
17866         status = pthread_create( &t, &attr, task, NULL );
17867 #if HAVE_PTHREADS < 7
17868         if( status < 0 ) status = errno;
17869 #endif
17870         if( status ) return status;
17871 #else
17872         /* Draft 4 pthreads */
17873         status = pthread_create( &t, pthread_attr_default, task, NULL );
17874         if( status ) return errno;
17875
17876         /* give thread a chance to complete */
17877         /* it should remain joinable and hence detachable */
17878         sleep( 1 );
17879
17880         status = pthread_detach( &t );
17881         if( status ) return errno;
17882 #endif
17883
17884 #ifdef HAVE_LINUX_THREADS
17885         pthread_kill_other_threads_np();
17886 #endif
17887
17888         return 0;
17889
17890 }
17891
17892 _ACEOF
17893 rm -f conftest$ac_exeext
17894 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17895   (eval $ac_link) 2>&5
17896   ac_status=$?
17897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17898   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17899   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17900   (eval $ac_try) 2>&5
17901   ac_status=$?
17902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17903   (exit $ac_status); }; }; then
17904   ol_cv_pthread_lib_lpthread_woff=yes
17905 else
17906   echo "$as_me: program exited with status $ac_status" >&5
17907 echo "$as_me: failed program was:" >&5
17908 sed 's/^/| /' conftest.$ac_ext >&5
17909
17910 ( exit $ac_status )
17911 ol_cv_pthread_lib_lpthread_woff=no
17912 fi
17913 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17914 fi
17915
17916                 # restore the LIBS
17917                 LIBS="$ol_LIBS"
17918
17919 fi
17920 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17921 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
17922
17923         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17924                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17925                 ol_link_threads=posix
17926         fi
17927 fi
17928
17929
17930                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17931 if test "$ol_link_threads" = no ; then
17932         # try -lpthread
17933         echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
17934 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
17935 if test "${ol_cv_pthread_lpthread+set}" = set; then
17936   echo $ECHO_N "(cached) $ECHO_C" >&6
17937 else
17938
17939                 # save the flags
17940                 ol_LIBS="$LIBS"
17941                 LIBS="-lpthread $LIBS"
17942
17943                 if test "$cross_compiling" = yes; then
17944   cat >conftest.$ac_ext <<_ACEOF
17945 #line $LINENO "configure"
17946 /* confdefs.h.  */
17947 _ACEOF
17948 cat confdefs.h >>conftest.$ac_ext
17949 cat >>conftest.$ac_ext <<_ACEOF
17950 /* end confdefs.h.  */
17951 /* pthread test headers */
17952 #include <pthread.h>
17953 #if HAVE_PTHREADS < 7
17954 #include <errno.h>
17955 #endif
17956 #ifndef NULL
17957 #define NULL (void*)0
17958 #endif
17959
17960 static void *task(p)
17961         void *p;
17962 {
17963         return (void *) (p == NULL);
17964 }
17965
17966 int
17967 main ()
17968 {
17969
17970         /* pthread test function */
17971 #ifndef PTHREAD_CREATE_DETACHED
17972 #define PTHREAD_CREATE_DETACHED 1
17973 #endif
17974         pthread_t t;
17975         int status;
17976         int detach = PTHREAD_CREATE_DETACHED;
17977
17978 #if HAVE_PTHREADS > 4
17979         /* Final pthreads */
17980         pthread_attr_t attr;
17981
17982         status = pthread_attr_init(&attr);
17983         if( status ) return status;
17984
17985 #if HAVE_PTHREADS < 7
17986         status = pthread_attr_setdetachstate(&attr, &detach);
17987         if( status < 0 ) status = errno;
17988 #else
17989         status = pthread_attr_setdetachstate(&attr, detach);
17990 #endif
17991         if( status ) return status;
17992         status = pthread_create( &t, &attr, task, NULL );
17993 #if HAVE_PTHREADS < 7
17994         if( status < 0 ) status = errno;
17995 #endif
17996         if( status ) return status;
17997 #else
17998         /* Draft 4 pthreads */
17999         status = pthread_create( &t, pthread_attr_default, task, NULL );
18000         if( status ) return errno;
18001
18002         /* give thread a chance to complete */
18003         /* it should remain joinable and hence detachable */
18004         sleep( 1 );
18005
18006         status = pthread_detach( &t );
18007         if( status ) return errno;
18008 #endif
18009
18010 #ifdef HAVE_LINUX_THREADS
18011         pthread_kill_other_threads_np();
18012 #endif
18013
18014         return 0;
18015
18016   ;
18017   return 0;
18018 }
18019 _ACEOF
18020 rm -f conftest.$ac_objext conftest$ac_exeext
18021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18022   (eval $ac_link) 2>&5
18023   ac_status=$?
18024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025   (exit $ac_status); } &&
18026          { ac_try='test -s conftest$ac_exeext'
18027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18028   (eval $ac_try) 2>&5
18029   ac_status=$?
18030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18031   (exit $ac_status); }; }; then
18032   ol_cv_pthread_lpthread=yes
18033 else
18034   echo "$as_me: failed program was:" >&5
18035 sed 's/^/| /' conftest.$ac_ext >&5
18036
18037 ol_cv_pthread_lpthread=no
18038 fi
18039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18040 else
18041   cat >conftest.$ac_ext <<_ACEOF
18042 #line $LINENO "configure"
18043 /* confdefs.h.  */
18044 _ACEOF
18045 cat confdefs.h >>conftest.$ac_ext
18046 cat >>conftest.$ac_ext <<_ACEOF
18047 /* end confdefs.h.  */
18048 /* pthread test headers */
18049 #include <pthread.h>
18050 #if HAVE_PTHREADS < 7
18051 #include <errno.h>
18052 #endif
18053 #ifndef NULL
18054 #define NULL (void*)0
18055 #endif
18056
18057 static void *task(p)
18058         void *p;
18059 {
18060         return (void *) (p == NULL);
18061 }
18062
18063
18064 int main(argc, argv)
18065         int argc;
18066         char **argv;
18067 {
18068
18069         /* pthread test function */
18070 #ifndef PTHREAD_CREATE_DETACHED
18071 #define PTHREAD_CREATE_DETACHED 1
18072 #endif
18073         pthread_t t;
18074         int status;
18075         int detach = PTHREAD_CREATE_DETACHED;
18076
18077 #if HAVE_PTHREADS > 4
18078         /* Final pthreads */
18079         pthread_attr_t attr;
18080
18081         status = pthread_attr_init(&attr);
18082         if( status ) return status;
18083
18084 #if HAVE_PTHREADS < 7
18085         status = pthread_attr_setdetachstate(&attr, &detach);
18086         if( status < 0 ) status = errno;
18087 #else
18088         status = pthread_attr_setdetachstate(&attr, detach);
18089 #endif
18090         if( status ) return status;
18091         status = pthread_create( &t, &attr, task, NULL );
18092 #if HAVE_PTHREADS < 7
18093         if( status < 0 ) status = errno;
18094 #endif
18095         if( status ) return status;
18096 #else
18097         /* Draft 4 pthreads */
18098         status = pthread_create( &t, pthread_attr_default, task, NULL );
18099         if( status ) return errno;
18100
18101         /* give thread a chance to complete */
18102         /* it should remain joinable and hence detachable */
18103         sleep( 1 );
18104
18105         status = pthread_detach( &t );
18106         if( status ) return errno;
18107 #endif
18108
18109 #ifdef HAVE_LINUX_THREADS
18110         pthread_kill_other_threads_np();
18111 #endif
18112
18113         return 0;
18114
18115 }
18116
18117 _ACEOF
18118 rm -f conftest$ac_exeext
18119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18120   (eval $ac_link) 2>&5
18121   ac_status=$?
18122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18123   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18125   (eval $ac_try) 2>&5
18126   ac_status=$?
18127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18128   (exit $ac_status); }; }; then
18129   ol_cv_pthread_lpthread=yes
18130 else
18131   echo "$as_me: program exited with status $ac_status" >&5
18132 echo "$as_me: failed program was:" >&5
18133 sed 's/^/| /' conftest.$ac_ext >&5
18134
18135 ( exit $ac_status )
18136 ol_cv_pthread_lpthread=no
18137 fi
18138 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18139 fi
18140
18141                 # restore the LIBS
18142                 LIBS="$ol_LIBS"
18143
18144 fi
18145 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
18146 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
18147
18148         if test $ol_cv_pthread_lpthread = yes ; then
18149                 ol_link_pthreads="-lpthread"
18150                 ol_link_threads=posix
18151         fi
18152 fi
18153
18154                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
18155 if test "$ol_link_threads" = no ; then
18156         # try -lc_r
18157         echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
18158 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
18159 if test "${ol_cv_pthread_lc_r+set}" = set; then
18160   echo $ECHO_N "(cached) $ECHO_C" >&6
18161 else
18162
18163                 # save the flags
18164                 ol_LIBS="$LIBS"
18165                 LIBS="-lc_r $LIBS"
18166
18167                 if test "$cross_compiling" = yes; then
18168   cat >conftest.$ac_ext <<_ACEOF
18169 #line $LINENO "configure"
18170 /* confdefs.h.  */
18171 _ACEOF
18172 cat confdefs.h >>conftest.$ac_ext
18173 cat >>conftest.$ac_ext <<_ACEOF
18174 /* end confdefs.h.  */
18175 /* pthread test headers */
18176 #include <pthread.h>
18177 #if HAVE_PTHREADS < 7
18178 #include <errno.h>
18179 #endif
18180 #ifndef NULL
18181 #define NULL (void*)0
18182 #endif
18183
18184 static void *task(p)
18185         void *p;
18186 {
18187         return (void *) (p == NULL);
18188 }
18189
18190 int
18191 main ()
18192 {
18193
18194         /* pthread test function */
18195 #ifndef PTHREAD_CREATE_DETACHED
18196 #define PTHREAD_CREATE_DETACHED 1
18197 #endif
18198         pthread_t t;
18199         int status;
18200         int detach = PTHREAD_CREATE_DETACHED;
18201
18202 #if HAVE_PTHREADS > 4
18203         /* Final pthreads */
18204         pthread_attr_t attr;
18205
18206         status = pthread_attr_init(&attr);
18207         if( status ) return status;
18208
18209 #if HAVE_PTHREADS < 7
18210         status = pthread_attr_setdetachstate(&attr, &detach);
18211         if( status < 0 ) status = errno;
18212 #else
18213         status = pthread_attr_setdetachstate(&attr, detach);
18214 #endif
18215         if( status ) return status;
18216         status = pthread_create( &t, &attr, task, NULL );
18217 #if HAVE_PTHREADS < 7
18218         if( status < 0 ) status = errno;
18219 #endif
18220         if( status ) return status;
18221 #else
18222         /* Draft 4 pthreads */
18223         status = pthread_create( &t, pthread_attr_default, task, NULL );
18224         if( status ) return errno;
18225
18226         /* give thread a chance to complete */
18227         /* it should remain joinable and hence detachable */
18228         sleep( 1 );
18229
18230         status = pthread_detach( &t );
18231         if( status ) return errno;
18232 #endif
18233
18234 #ifdef HAVE_LINUX_THREADS
18235         pthread_kill_other_threads_np();
18236 #endif
18237
18238         return 0;
18239
18240   ;
18241   return 0;
18242 }
18243 _ACEOF
18244 rm -f conftest.$ac_objext conftest$ac_exeext
18245 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18246   (eval $ac_link) 2>&5
18247   ac_status=$?
18248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18249   (exit $ac_status); } &&
18250          { ac_try='test -s conftest$ac_exeext'
18251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18252   (eval $ac_try) 2>&5
18253   ac_status=$?
18254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18255   (exit $ac_status); }; }; then
18256   ol_cv_pthread_lc_r=yes
18257 else
18258   echo "$as_me: failed program was:" >&5
18259 sed 's/^/| /' conftest.$ac_ext >&5
18260
18261 ol_cv_pthread_lc_r=no
18262 fi
18263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18264 else
18265   cat >conftest.$ac_ext <<_ACEOF
18266 #line $LINENO "configure"
18267 /* confdefs.h.  */
18268 _ACEOF
18269 cat confdefs.h >>conftest.$ac_ext
18270 cat >>conftest.$ac_ext <<_ACEOF
18271 /* end confdefs.h.  */
18272 /* pthread test headers */
18273 #include <pthread.h>
18274 #if HAVE_PTHREADS < 7
18275 #include <errno.h>
18276 #endif
18277 #ifndef NULL
18278 #define NULL (void*)0
18279 #endif
18280
18281 static void *task(p)
18282         void *p;
18283 {
18284         return (void *) (p == NULL);
18285 }
18286
18287
18288 int main(argc, argv)
18289         int argc;
18290         char **argv;
18291 {
18292
18293         /* pthread test function */
18294 #ifndef PTHREAD_CREATE_DETACHED
18295 #define PTHREAD_CREATE_DETACHED 1
18296 #endif
18297         pthread_t t;
18298         int status;
18299         int detach = PTHREAD_CREATE_DETACHED;
18300
18301 #if HAVE_PTHREADS > 4
18302         /* Final pthreads */
18303         pthread_attr_t attr;
18304
18305         status = pthread_attr_init(&attr);
18306         if( status ) return status;
18307
18308 #if HAVE_PTHREADS < 7
18309         status = pthread_attr_setdetachstate(&attr, &detach);
18310         if( status < 0 ) status = errno;
18311 #else
18312         status = pthread_attr_setdetachstate(&attr, detach);
18313 #endif
18314         if( status ) return status;
18315         status = pthread_create( &t, &attr, task, NULL );
18316 #if HAVE_PTHREADS < 7
18317         if( status < 0 ) status = errno;
18318 #endif
18319         if( status ) return status;
18320 #else
18321         /* Draft 4 pthreads */
18322         status = pthread_create( &t, pthread_attr_default, task, NULL );
18323         if( status ) return errno;
18324
18325         /* give thread a chance to complete */
18326         /* it should remain joinable and hence detachable */
18327         sleep( 1 );
18328
18329         status = pthread_detach( &t );
18330         if( status ) return errno;
18331 #endif
18332
18333 #ifdef HAVE_LINUX_THREADS
18334         pthread_kill_other_threads_np();
18335 #endif
18336
18337         return 0;
18338
18339 }
18340
18341 _ACEOF
18342 rm -f conftest$ac_exeext
18343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18344   (eval $ac_link) 2>&5
18345   ac_status=$?
18346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18347   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18349   (eval $ac_try) 2>&5
18350   ac_status=$?
18351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18352   (exit $ac_status); }; }; then
18353   ol_cv_pthread_lc_r=yes
18354 else
18355   echo "$as_me: program exited with status $ac_status" >&5
18356 echo "$as_me: failed program was:" >&5
18357 sed 's/^/| /' conftest.$ac_ext >&5
18358
18359 ( exit $ac_status )
18360 ol_cv_pthread_lc_r=no
18361 fi
18362 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18363 fi
18364
18365                 # restore the LIBS
18366                 LIBS="$ol_LIBS"
18367
18368 fi
18369 echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
18370 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
18371
18372         if test $ol_cv_pthread_lc_r = yes ; then
18373                 ol_link_pthreads="-lc_r"
18374                 ol_link_threads=posix
18375         fi
18376 fi
18377
18378
18379                 # Pthread try link: -threads (ol_cv_pthread_threads)
18380 if test "$ol_link_threads" = no ; then
18381         # try -threads
18382         echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
18383 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
18384 if test "${ol_cv_pthread_threads+set}" = set; then
18385   echo $ECHO_N "(cached) $ECHO_C" >&6
18386 else
18387
18388                 # save the flags
18389                 ol_LIBS="$LIBS"
18390                 LIBS="-threads $LIBS"
18391
18392                 if test "$cross_compiling" = yes; then
18393   cat >conftest.$ac_ext <<_ACEOF
18394 #line $LINENO "configure"
18395 /* confdefs.h.  */
18396 _ACEOF
18397 cat confdefs.h >>conftest.$ac_ext
18398 cat >>conftest.$ac_ext <<_ACEOF
18399 /* end confdefs.h.  */
18400 /* pthread test headers */
18401 #include <pthread.h>
18402 #if HAVE_PTHREADS < 7
18403 #include <errno.h>
18404 #endif
18405 #ifndef NULL
18406 #define NULL (void*)0
18407 #endif
18408
18409 static void *task(p)
18410         void *p;
18411 {
18412         return (void *) (p == NULL);
18413 }
18414
18415 int
18416 main ()
18417 {
18418
18419         /* pthread test function */
18420 #ifndef PTHREAD_CREATE_DETACHED
18421 #define PTHREAD_CREATE_DETACHED 1
18422 #endif
18423         pthread_t t;
18424         int status;
18425         int detach = PTHREAD_CREATE_DETACHED;
18426
18427 #if HAVE_PTHREADS > 4
18428         /* Final pthreads */
18429         pthread_attr_t attr;
18430
18431         status = pthread_attr_init(&attr);
18432         if( status ) return status;
18433
18434 #if HAVE_PTHREADS < 7
18435         status = pthread_attr_setdetachstate(&attr, &detach);
18436         if( status < 0 ) status = errno;
18437 #else
18438         status = pthread_attr_setdetachstate(&attr, detach);
18439 #endif
18440         if( status ) return status;
18441         status = pthread_create( &t, &attr, task, NULL );
18442 #if HAVE_PTHREADS < 7
18443         if( status < 0 ) status = errno;
18444 #endif
18445         if( status ) return status;
18446 #else
18447         /* Draft 4 pthreads */
18448         status = pthread_create( &t, pthread_attr_default, task, NULL );
18449         if( status ) return errno;
18450
18451         /* give thread a chance to complete */
18452         /* it should remain joinable and hence detachable */
18453         sleep( 1 );
18454
18455         status = pthread_detach( &t );
18456         if( status ) return errno;
18457 #endif
18458
18459 #ifdef HAVE_LINUX_THREADS
18460         pthread_kill_other_threads_np();
18461 #endif
18462
18463         return 0;
18464
18465   ;
18466   return 0;
18467 }
18468 _ACEOF
18469 rm -f conftest.$ac_objext conftest$ac_exeext
18470 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18471   (eval $ac_link) 2>&5
18472   ac_status=$?
18473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18474   (exit $ac_status); } &&
18475          { ac_try='test -s conftest$ac_exeext'
18476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18477   (eval $ac_try) 2>&5
18478   ac_status=$?
18479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18480   (exit $ac_status); }; }; then
18481   ol_cv_pthread_threads=yes
18482 else
18483   echo "$as_me: failed program was:" >&5
18484 sed 's/^/| /' conftest.$ac_ext >&5
18485
18486 ol_cv_pthread_threads=no
18487 fi
18488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18489 else
18490   cat >conftest.$ac_ext <<_ACEOF
18491 #line $LINENO "configure"
18492 /* confdefs.h.  */
18493 _ACEOF
18494 cat confdefs.h >>conftest.$ac_ext
18495 cat >>conftest.$ac_ext <<_ACEOF
18496 /* end confdefs.h.  */
18497 /* pthread test headers */
18498 #include <pthread.h>
18499 #if HAVE_PTHREADS < 7
18500 #include <errno.h>
18501 #endif
18502 #ifndef NULL
18503 #define NULL (void*)0
18504 #endif
18505
18506 static void *task(p)
18507         void *p;
18508 {
18509         return (void *) (p == NULL);
18510 }
18511
18512
18513 int main(argc, argv)
18514         int argc;
18515         char **argv;
18516 {
18517
18518         /* pthread test function */
18519 #ifndef PTHREAD_CREATE_DETACHED
18520 #define PTHREAD_CREATE_DETACHED 1
18521 #endif
18522         pthread_t t;
18523         int status;
18524         int detach = PTHREAD_CREATE_DETACHED;
18525
18526 #if HAVE_PTHREADS > 4
18527         /* Final pthreads */
18528         pthread_attr_t attr;
18529
18530         status = pthread_attr_init(&attr);
18531         if( status ) return status;
18532
18533 #if HAVE_PTHREADS < 7
18534         status = pthread_attr_setdetachstate(&attr, &detach);
18535         if( status < 0 ) status = errno;
18536 #else
18537         status = pthread_attr_setdetachstate(&attr, detach);
18538 #endif
18539         if( status ) return status;
18540         status = pthread_create( &t, &attr, task, NULL );
18541 #if HAVE_PTHREADS < 7
18542         if( status < 0 ) status = errno;
18543 #endif
18544         if( status ) return status;
18545 #else
18546         /* Draft 4 pthreads */
18547         status = pthread_create( &t, pthread_attr_default, task, NULL );
18548         if( status ) return errno;
18549
18550         /* give thread a chance to complete */
18551         /* it should remain joinable and hence detachable */
18552         sleep( 1 );
18553
18554         status = pthread_detach( &t );
18555         if( status ) return errno;
18556 #endif
18557
18558 #ifdef HAVE_LINUX_THREADS
18559         pthread_kill_other_threads_np();
18560 #endif
18561
18562         return 0;
18563
18564 }
18565
18566 _ACEOF
18567 rm -f conftest$ac_exeext
18568 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18569   (eval $ac_link) 2>&5
18570   ac_status=$?
18571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18572   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18574   (eval $ac_try) 2>&5
18575   ac_status=$?
18576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18577   (exit $ac_status); }; }; then
18578   ol_cv_pthread_threads=yes
18579 else
18580   echo "$as_me: program exited with status $ac_status" >&5
18581 echo "$as_me: failed program was:" >&5
18582 sed 's/^/| /' conftest.$ac_ext >&5
18583
18584 ( exit $ac_status )
18585 ol_cv_pthread_threads=no
18586 fi
18587 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18588 fi
18589
18590                 # restore the LIBS
18591                 LIBS="$ol_LIBS"
18592
18593 fi
18594 echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
18595 echo "${ECHO_T}$ol_cv_pthread_threads" >&6
18596
18597         if test $ol_cv_pthread_threads = yes ; then
18598                 ol_link_pthreads="-threads"
18599                 ol_link_threads=posix
18600         fi
18601 fi
18602
18603
18604                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18605 if test "$ol_link_threads" = no ; then
18606         # try -lpthreads -lmach -lexc -lc_r
18607         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18608 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
18609 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
18610   echo $ECHO_N "(cached) $ECHO_C" >&6
18611 else
18612
18613                 # save the flags
18614                 ol_LIBS="$LIBS"
18615                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18616
18617                 if test "$cross_compiling" = yes; then
18618   cat >conftest.$ac_ext <<_ACEOF
18619 #line $LINENO "configure"
18620 /* confdefs.h.  */
18621 _ACEOF
18622 cat confdefs.h >>conftest.$ac_ext
18623 cat >>conftest.$ac_ext <<_ACEOF
18624 /* end confdefs.h.  */
18625 /* pthread test headers */
18626 #include <pthread.h>
18627 #if HAVE_PTHREADS < 7
18628 #include <errno.h>
18629 #endif
18630 #ifndef NULL
18631 #define NULL (void*)0
18632 #endif
18633
18634 static void *task(p)
18635         void *p;
18636 {
18637         return (void *) (p == NULL);
18638 }
18639
18640 int
18641 main ()
18642 {
18643
18644         /* pthread test function */
18645 #ifndef PTHREAD_CREATE_DETACHED
18646 #define PTHREAD_CREATE_DETACHED 1
18647 #endif
18648         pthread_t t;
18649         int status;
18650         int detach = PTHREAD_CREATE_DETACHED;
18651
18652 #if HAVE_PTHREADS > 4
18653         /* Final pthreads */
18654         pthread_attr_t attr;
18655
18656         status = pthread_attr_init(&attr);
18657         if( status ) return status;
18658
18659 #if HAVE_PTHREADS < 7
18660         status = pthread_attr_setdetachstate(&attr, &detach);
18661         if( status < 0 ) status = errno;
18662 #else
18663         status = pthread_attr_setdetachstate(&attr, detach);
18664 #endif
18665         if( status ) return status;
18666         status = pthread_create( &t, &attr, task, NULL );
18667 #if HAVE_PTHREADS < 7
18668         if( status < 0 ) status = errno;
18669 #endif
18670         if( status ) return status;
18671 #else
18672         /* Draft 4 pthreads */
18673         status = pthread_create( &t, pthread_attr_default, task, NULL );
18674         if( status ) return errno;
18675
18676         /* give thread a chance to complete */
18677         /* it should remain joinable and hence detachable */
18678         sleep( 1 );
18679
18680         status = pthread_detach( &t );
18681         if( status ) return errno;
18682 #endif
18683
18684 #ifdef HAVE_LINUX_THREADS
18685         pthread_kill_other_threads_np();
18686 #endif
18687
18688         return 0;
18689
18690   ;
18691   return 0;
18692 }
18693 _ACEOF
18694 rm -f conftest.$ac_objext conftest$ac_exeext
18695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18696   (eval $ac_link) 2>&5
18697   ac_status=$?
18698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18699   (exit $ac_status); } &&
18700          { ac_try='test -s conftest$ac_exeext'
18701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18702   (eval $ac_try) 2>&5
18703   ac_status=$?
18704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18705   (exit $ac_status); }; }; then
18706   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18707 else
18708   echo "$as_me: failed program was:" >&5
18709 sed 's/^/| /' conftest.$ac_ext >&5
18710
18711 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18712 fi
18713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18714 else
18715   cat >conftest.$ac_ext <<_ACEOF
18716 #line $LINENO "configure"
18717 /* confdefs.h.  */
18718 _ACEOF
18719 cat confdefs.h >>conftest.$ac_ext
18720 cat >>conftest.$ac_ext <<_ACEOF
18721 /* end confdefs.h.  */
18722 /* pthread test headers */
18723 #include <pthread.h>
18724 #if HAVE_PTHREADS < 7
18725 #include <errno.h>
18726 #endif
18727 #ifndef NULL
18728 #define NULL (void*)0
18729 #endif
18730
18731 static void *task(p)
18732         void *p;
18733 {
18734         return (void *) (p == NULL);
18735 }
18736
18737
18738 int main(argc, argv)
18739         int argc;
18740         char **argv;
18741 {
18742
18743         /* pthread test function */
18744 #ifndef PTHREAD_CREATE_DETACHED
18745 #define PTHREAD_CREATE_DETACHED 1
18746 #endif
18747         pthread_t t;
18748         int status;
18749         int detach = PTHREAD_CREATE_DETACHED;
18750
18751 #if HAVE_PTHREADS > 4
18752         /* Final pthreads */
18753         pthread_attr_t attr;
18754
18755         status = pthread_attr_init(&attr);
18756         if( status ) return status;
18757
18758 #if HAVE_PTHREADS < 7
18759         status = pthread_attr_setdetachstate(&attr, &detach);
18760         if( status < 0 ) status = errno;
18761 #else
18762         status = pthread_attr_setdetachstate(&attr, detach);
18763 #endif
18764         if( status ) return status;
18765         status = pthread_create( &t, &attr, task, NULL );
18766 #if HAVE_PTHREADS < 7
18767         if( status < 0 ) status = errno;
18768 #endif
18769         if( status ) return status;
18770 #else
18771         /* Draft 4 pthreads */
18772         status = pthread_create( &t, pthread_attr_default, task, NULL );
18773         if( status ) return errno;
18774
18775         /* give thread a chance to complete */
18776         /* it should remain joinable and hence detachable */
18777         sleep( 1 );
18778
18779         status = pthread_detach( &t );
18780         if( status ) return errno;
18781 #endif
18782
18783 #ifdef HAVE_LINUX_THREADS
18784         pthread_kill_other_threads_np();
18785 #endif
18786
18787         return 0;
18788
18789 }
18790
18791 _ACEOF
18792 rm -f conftest$ac_exeext
18793 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18794   (eval $ac_link) 2>&5
18795   ac_status=$?
18796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18797   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18799   (eval $ac_try) 2>&5
18800   ac_status=$?
18801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18802   (exit $ac_status); }; }; then
18803   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18804 else
18805   echo "$as_me: program exited with status $ac_status" >&5
18806 echo "$as_me: failed program was:" >&5
18807 sed 's/^/| /' conftest.$ac_ext >&5
18808
18809 ( exit $ac_status )
18810 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18811 fi
18812 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18813 fi
18814
18815                 # restore the LIBS
18816                 LIBS="$ol_LIBS"
18817
18818 fi
18819 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18820 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
18821
18822         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18823                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18824                 ol_link_threads=posix
18825         fi
18826 fi
18827
18828                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18829 if test "$ol_link_threads" = no ; then
18830         # try -lpthreads -lmach -lexc
18831         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
18832 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
18833 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
18834   echo $ECHO_N "(cached) $ECHO_C" >&6
18835 else
18836
18837                 # save the flags
18838                 ol_LIBS="$LIBS"
18839                 LIBS="-lpthreads -lmach -lexc $LIBS"
18840
18841                 if test "$cross_compiling" = yes; then
18842   cat >conftest.$ac_ext <<_ACEOF
18843 #line $LINENO "configure"
18844 /* confdefs.h.  */
18845 _ACEOF
18846 cat confdefs.h >>conftest.$ac_ext
18847 cat >>conftest.$ac_ext <<_ACEOF
18848 /* end confdefs.h.  */
18849 /* pthread test headers */
18850 #include <pthread.h>
18851 #if HAVE_PTHREADS < 7
18852 #include <errno.h>
18853 #endif
18854 #ifndef NULL
18855 #define NULL (void*)0
18856 #endif
18857
18858 static void *task(p)
18859         void *p;
18860 {
18861         return (void *) (p == NULL);
18862 }
18863
18864 int
18865 main ()
18866 {
18867
18868         /* pthread test function */
18869 #ifndef PTHREAD_CREATE_DETACHED
18870 #define PTHREAD_CREATE_DETACHED 1
18871 #endif
18872         pthread_t t;
18873         int status;
18874         int detach = PTHREAD_CREATE_DETACHED;
18875
18876 #if HAVE_PTHREADS > 4
18877         /* Final pthreads */
18878         pthread_attr_t attr;
18879
18880         status = pthread_attr_init(&attr);
18881         if( status ) return status;
18882
18883 #if HAVE_PTHREADS < 7
18884         status = pthread_attr_setdetachstate(&attr, &detach);
18885         if( status < 0 ) status = errno;
18886 #else
18887         status = pthread_attr_setdetachstate(&attr, detach);
18888 #endif
18889         if( status ) return status;
18890         status = pthread_create( &t, &attr, task, NULL );
18891 #if HAVE_PTHREADS < 7
18892         if( status < 0 ) status = errno;
18893 #endif
18894         if( status ) return status;
18895 #else
18896         /* Draft 4 pthreads */
18897         status = pthread_create( &t, pthread_attr_default, task, NULL );
18898         if( status ) return errno;
18899
18900         /* give thread a chance to complete */
18901         /* it should remain joinable and hence detachable */
18902         sleep( 1 );
18903
18904         status = pthread_detach( &t );
18905         if( status ) return errno;
18906 #endif
18907
18908 #ifdef HAVE_LINUX_THREADS
18909         pthread_kill_other_threads_np();
18910 #endif
18911
18912         return 0;
18913
18914   ;
18915   return 0;
18916 }
18917 _ACEOF
18918 rm -f conftest.$ac_objext conftest$ac_exeext
18919 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18920   (eval $ac_link) 2>&5
18921   ac_status=$?
18922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18923   (exit $ac_status); } &&
18924          { ac_try='test -s conftest$ac_exeext'
18925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18926   (eval $ac_try) 2>&5
18927   ac_status=$?
18928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18929   (exit $ac_status); }; }; then
18930   ol_cv_pthread_lpthreads_lmach_lexc=yes
18931 else
18932   echo "$as_me: failed program was:" >&5
18933 sed 's/^/| /' conftest.$ac_ext >&5
18934
18935 ol_cv_pthread_lpthreads_lmach_lexc=no
18936 fi
18937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18938 else
18939   cat >conftest.$ac_ext <<_ACEOF
18940 #line $LINENO "configure"
18941 /* confdefs.h.  */
18942 _ACEOF
18943 cat confdefs.h >>conftest.$ac_ext
18944 cat >>conftest.$ac_ext <<_ACEOF
18945 /* end confdefs.h.  */
18946 /* pthread test headers */
18947 #include <pthread.h>
18948 #if HAVE_PTHREADS < 7
18949 #include <errno.h>
18950 #endif
18951 #ifndef NULL
18952 #define NULL (void*)0
18953 #endif
18954
18955 static void *task(p)
18956         void *p;
18957 {
18958         return (void *) (p == NULL);
18959 }
18960
18961
18962 int main(argc, argv)
18963         int argc;
18964         char **argv;
18965 {
18966
18967         /* pthread test function */
18968 #ifndef PTHREAD_CREATE_DETACHED
18969 #define PTHREAD_CREATE_DETACHED 1
18970 #endif
18971         pthread_t t;
18972         int status;
18973         int detach = PTHREAD_CREATE_DETACHED;
18974
18975 #if HAVE_PTHREADS > 4
18976         /* Final pthreads */
18977         pthread_attr_t attr;
18978
18979         status = pthread_attr_init(&attr);
18980         if( status ) return status;
18981
18982 #if HAVE_PTHREADS < 7
18983         status = pthread_attr_setdetachstate(&attr, &detach);
18984         if( status < 0 ) status = errno;
18985 #else
18986         status = pthread_attr_setdetachstate(&attr, detach);
18987 #endif
18988         if( status ) return status;
18989         status = pthread_create( &t, &attr, task, NULL );
18990 #if HAVE_PTHREADS < 7
18991         if( status < 0 ) status = errno;
18992 #endif
18993         if( status ) return status;
18994 #else
18995         /* Draft 4 pthreads */
18996         status = pthread_create( &t, pthread_attr_default, task, NULL );
18997         if( status ) return errno;
18998
18999         /* give thread a chance to complete */
19000         /* it should remain joinable and hence detachable */
19001         sleep( 1 );
19002
19003         status = pthread_detach( &t );
19004         if( status ) return errno;
19005 #endif
19006
19007 #ifdef HAVE_LINUX_THREADS
19008         pthread_kill_other_threads_np();
19009 #endif
19010
19011         return 0;
19012
19013 }
19014
19015 _ACEOF
19016 rm -f conftest$ac_exeext
19017 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19018   (eval $ac_link) 2>&5
19019   ac_status=$?
19020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19021   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19023   (eval $ac_try) 2>&5
19024   ac_status=$?
19025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19026   (exit $ac_status); }; }; then
19027   ol_cv_pthread_lpthreads_lmach_lexc=yes
19028 else
19029   echo "$as_me: program exited with status $ac_status" >&5
19030 echo "$as_me: failed program was:" >&5
19031 sed 's/^/| /' conftest.$ac_ext >&5
19032
19033 ( exit $ac_status )
19034 ol_cv_pthread_lpthreads_lmach_lexc=no
19035 fi
19036 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19037 fi
19038
19039                 # restore the LIBS
19040                 LIBS="$ol_LIBS"
19041
19042 fi
19043 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
19044 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
19045
19046         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
19047                 ol_link_pthreads="-lpthreads -lmach -lexc"
19048                 ol_link_threads=posix
19049         fi
19050 fi
19051
19052                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
19053 if test "$ol_link_threads" = no ; then
19054         # try -lpthreads -lexc
19055         echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
19056 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
19057 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
19058   echo $ECHO_N "(cached) $ECHO_C" >&6
19059 else
19060
19061                 # save the flags
19062                 ol_LIBS="$LIBS"
19063                 LIBS="-lpthreads -lexc $LIBS"
19064
19065                 if test "$cross_compiling" = yes; then
19066   cat >conftest.$ac_ext <<_ACEOF
19067 #line $LINENO "configure"
19068 /* confdefs.h.  */
19069 _ACEOF
19070 cat confdefs.h >>conftest.$ac_ext
19071 cat >>conftest.$ac_ext <<_ACEOF
19072 /* end confdefs.h.  */
19073 /* pthread test headers */
19074 #include <pthread.h>
19075 #if HAVE_PTHREADS < 7
19076 #include <errno.h>
19077 #endif
19078 #ifndef NULL
19079 #define NULL (void*)0
19080 #endif
19081
19082 static void *task(p)
19083         void *p;
19084 {
19085         return (void *) (p == NULL);
19086 }
19087
19088 int
19089 main ()
19090 {
19091
19092         /* pthread test function */
19093 #ifndef PTHREAD_CREATE_DETACHED
19094 #define PTHREAD_CREATE_DETACHED 1
19095 #endif
19096         pthread_t t;
19097         int status;
19098         int detach = PTHREAD_CREATE_DETACHED;
19099
19100 #if HAVE_PTHREADS > 4
19101         /* Final pthreads */
19102         pthread_attr_t attr;
19103
19104         status = pthread_attr_init(&attr);
19105         if( status ) return status;
19106
19107 #if HAVE_PTHREADS < 7
19108         status = pthread_attr_setdetachstate(&attr, &detach);
19109         if( status < 0 ) status = errno;
19110 #else
19111         status = pthread_attr_setdetachstate(&attr, detach);
19112 #endif
19113         if( status ) return status;
19114         status = pthread_create( &t, &attr, task, NULL );
19115 #if HAVE_PTHREADS < 7
19116         if( status < 0 ) status = errno;
19117 #endif
19118         if( status ) return status;
19119 #else
19120         /* Draft 4 pthreads */
19121         status = pthread_create( &t, pthread_attr_default, task, NULL );
19122         if( status ) return errno;
19123
19124         /* give thread a chance to complete */
19125         /* it should remain joinable and hence detachable */
19126         sleep( 1 );
19127
19128         status = pthread_detach( &t );
19129         if( status ) return errno;
19130 #endif
19131
19132 #ifdef HAVE_LINUX_THREADS
19133         pthread_kill_other_threads_np();
19134 #endif
19135
19136         return 0;
19137
19138   ;
19139   return 0;
19140 }
19141 _ACEOF
19142 rm -f conftest.$ac_objext conftest$ac_exeext
19143 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19144   (eval $ac_link) 2>&5
19145   ac_status=$?
19146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19147   (exit $ac_status); } &&
19148          { ac_try='test -s conftest$ac_exeext'
19149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19150   (eval $ac_try) 2>&5
19151   ac_status=$?
19152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19153   (exit $ac_status); }; }; then
19154   ol_cv_pthread_lpthreads_lexc=yes
19155 else
19156   echo "$as_me: failed program was:" >&5
19157 sed 's/^/| /' conftest.$ac_ext >&5
19158
19159 ol_cv_pthread_lpthreads_lexc=no
19160 fi
19161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19162 else
19163   cat >conftest.$ac_ext <<_ACEOF
19164 #line $LINENO "configure"
19165 /* confdefs.h.  */
19166 _ACEOF
19167 cat confdefs.h >>conftest.$ac_ext
19168 cat >>conftest.$ac_ext <<_ACEOF
19169 /* end confdefs.h.  */
19170 /* pthread test headers */
19171 #include <pthread.h>
19172 #if HAVE_PTHREADS < 7
19173 #include <errno.h>
19174 #endif
19175 #ifndef NULL
19176 #define NULL (void*)0
19177 #endif
19178
19179 static void *task(p)
19180         void *p;
19181 {
19182         return (void *) (p == NULL);
19183 }
19184
19185
19186 int main(argc, argv)
19187         int argc;
19188         char **argv;
19189 {
19190
19191         /* pthread test function */
19192 #ifndef PTHREAD_CREATE_DETACHED
19193 #define PTHREAD_CREATE_DETACHED 1
19194 #endif
19195         pthread_t t;
19196         int status;
19197         int detach = PTHREAD_CREATE_DETACHED;
19198
19199 #if HAVE_PTHREADS > 4
19200         /* Final pthreads */
19201         pthread_attr_t attr;
19202
19203         status = pthread_attr_init(&attr);
19204         if( status ) return status;
19205
19206 #if HAVE_PTHREADS < 7
19207         status = pthread_attr_setdetachstate(&attr, &detach);
19208         if( status < 0 ) status = errno;
19209 #else
19210         status = pthread_attr_setdetachstate(&attr, detach);
19211 #endif
19212         if( status ) return status;
19213         status = pthread_create( &t, &attr, task, NULL );
19214 #if HAVE_PTHREADS < 7
19215         if( status < 0 ) status = errno;
19216 #endif
19217         if( status ) return status;
19218 #else
19219         /* Draft 4 pthreads */
19220         status = pthread_create( &t, pthread_attr_default, task, NULL );
19221         if( status ) return errno;
19222
19223         /* give thread a chance to complete */
19224         /* it should remain joinable and hence detachable */
19225         sleep( 1 );
19226
19227         status = pthread_detach( &t );
19228         if( status ) return errno;
19229 #endif
19230
19231 #ifdef HAVE_LINUX_THREADS
19232         pthread_kill_other_threads_np();
19233 #endif
19234
19235         return 0;
19236
19237 }
19238
19239 _ACEOF
19240 rm -f conftest$ac_exeext
19241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19242   (eval $ac_link) 2>&5
19243   ac_status=$?
19244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19247   (eval $ac_try) 2>&5
19248   ac_status=$?
19249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250   (exit $ac_status); }; }; then
19251   ol_cv_pthread_lpthreads_lexc=yes
19252 else
19253   echo "$as_me: program exited with status $ac_status" >&5
19254 echo "$as_me: failed program was:" >&5
19255 sed 's/^/| /' conftest.$ac_ext >&5
19256
19257 ( exit $ac_status )
19258 ol_cv_pthread_lpthreads_lexc=no
19259 fi
19260 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19261 fi
19262
19263                 # restore the LIBS
19264                 LIBS="$ol_LIBS"
19265
19266 fi
19267 echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
19268 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
19269
19270         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
19271                 ol_link_pthreads="-lpthreads -lexc"
19272                 ol_link_threads=posix
19273         fi
19274 fi
19275
19276
19277                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
19278 if test "$ol_link_threads" = no ; then
19279         # try -lpthreads
19280         echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
19281 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
19282 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
19283   echo $ECHO_N "(cached) $ECHO_C" >&6
19284 else
19285
19286                 # save the flags
19287                 ol_LIBS="$LIBS"
19288                 LIBS="-lpthreads $LIBS"
19289
19290                 if test "$cross_compiling" = yes; then
19291   cat >conftest.$ac_ext <<_ACEOF
19292 #line $LINENO "configure"
19293 /* confdefs.h.  */
19294 _ACEOF
19295 cat confdefs.h >>conftest.$ac_ext
19296 cat >>conftest.$ac_ext <<_ACEOF
19297 /* end confdefs.h.  */
19298 /* pthread test headers */
19299 #include <pthread.h>
19300 #if HAVE_PTHREADS < 7
19301 #include <errno.h>
19302 #endif
19303 #ifndef NULL
19304 #define NULL (void*)0
19305 #endif
19306
19307 static void *task(p)
19308         void *p;
19309 {
19310         return (void *) (p == NULL);
19311 }
19312
19313 int
19314 main ()
19315 {
19316
19317         /* pthread test function */
19318 #ifndef PTHREAD_CREATE_DETACHED
19319 #define PTHREAD_CREATE_DETACHED 1
19320 #endif
19321         pthread_t t;
19322         int status;
19323         int detach = PTHREAD_CREATE_DETACHED;
19324
19325 #if HAVE_PTHREADS > 4
19326         /* Final pthreads */
19327         pthread_attr_t attr;
19328
19329         status = pthread_attr_init(&attr);
19330         if( status ) return status;
19331
19332 #if HAVE_PTHREADS < 7
19333         status = pthread_attr_setdetachstate(&attr, &detach);
19334         if( status < 0 ) status = errno;
19335 #else
19336         status = pthread_attr_setdetachstate(&attr, detach);
19337 #endif
19338         if( status ) return status;
19339         status = pthread_create( &t, &attr, task, NULL );
19340 #if HAVE_PTHREADS < 7
19341         if( status < 0 ) status = errno;
19342 #endif
19343         if( status ) return status;
19344 #else
19345         /* Draft 4 pthreads */
19346         status = pthread_create( &t, pthread_attr_default, task, NULL );
19347         if( status ) return errno;
19348
19349         /* give thread a chance to complete */
19350         /* it should remain joinable and hence detachable */
19351         sleep( 1 );
19352
19353         status = pthread_detach( &t );
19354         if( status ) return errno;
19355 #endif
19356
19357 #ifdef HAVE_LINUX_THREADS
19358         pthread_kill_other_threads_np();
19359 #endif
19360
19361         return 0;
19362
19363   ;
19364   return 0;
19365 }
19366 _ACEOF
19367 rm -f conftest.$ac_objext conftest$ac_exeext
19368 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19369   (eval $ac_link) 2>&5
19370   ac_status=$?
19371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19372   (exit $ac_status); } &&
19373          { ac_try='test -s conftest$ac_exeext'
19374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19375   (eval $ac_try) 2>&5
19376   ac_status=$?
19377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19378   (exit $ac_status); }; }; then
19379   ol_cv_pthread_lib_lpthreads=yes
19380 else
19381   echo "$as_me: failed program was:" >&5
19382 sed 's/^/| /' conftest.$ac_ext >&5
19383
19384 ol_cv_pthread_lib_lpthreads=no
19385 fi
19386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19387 else
19388   cat >conftest.$ac_ext <<_ACEOF
19389 #line $LINENO "configure"
19390 /* confdefs.h.  */
19391 _ACEOF
19392 cat confdefs.h >>conftest.$ac_ext
19393 cat >>conftest.$ac_ext <<_ACEOF
19394 /* end confdefs.h.  */
19395 /* pthread test headers */
19396 #include <pthread.h>
19397 #if HAVE_PTHREADS < 7
19398 #include <errno.h>
19399 #endif
19400 #ifndef NULL
19401 #define NULL (void*)0
19402 #endif
19403
19404 static void *task(p)
19405         void *p;
19406 {
19407         return (void *) (p == NULL);
19408 }
19409
19410
19411 int main(argc, argv)
19412         int argc;
19413         char **argv;
19414 {
19415
19416         /* pthread test function */
19417 #ifndef PTHREAD_CREATE_DETACHED
19418 #define PTHREAD_CREATE_DETACHED 1
19419 #endif
19420         pthread_t t;
19421         int status;
19422         int detach = PTHREAD_CREATE_DETACHED;
19423
19424 #if HAVE_PTHREADS > 4
19425         /* Final pthreads */
19426         pthread_attr_t attr;
19427
19428         status = pthread_attr_init(&attr);
19429         if( status ) return status;
19430
19431 #if HAVE_PTHREADS < 7
19432         status = pthread_attr_setdetachstate(&attr, &detach);
19433         if( status < 0 ) status = errno;
19434 #else
19435         status = pthread_attr_setdetachstate(&attr, detach);
19436 #endif
19437         if( status ) return status;
19438         status = pthread_create( &t, &attr, task, NULL );
19439 #if HAVE_PTHREADS < 7
19440         if( status < 0 ) status = errno;
19441 #endif
19442         if( status ) return status;
19443 #else
19444         /* Draft 4 pthreads */
19445         status = pthread_create( &t, pthread_attr_default, task, NULL );
19446         if( status ) return errno;
19447
19448         /* give thread a chance to complete */
19449         /* it should remain joinable and hence detachable */
19450         sleep( 1 );
19451
19452         status = pthread_detach( &t );
19453         if( status ) return errno;
19454 #endif
19455
19456 #ifdef HAVE_LINUX_THREADS
19457         pthread_kill_other_threads_np();
19458 #endif
19459
19460         return 0;
19461
19462 }
19463
19464 _ACEOF
19465 rm -f conftest$ac_exeext
19466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19467   (eval $ac_link) 2>&5
19468   ac_status=$?
19469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19470   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19472   (eval $ac_try) 2>&5
19473   ac_status=$?
19474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19475   (exit $ac_status); }; }; then
19476   ol_cv_pthread_lib_lpthreads=yes
19477 else
19478   echo "$as_me: program exited with status $ac_status" >&5
19479 echo "$as_me: failed program was:" >&5
19480 sed 's/^/| /' conftest.$ac_ext >&5
19481
19482 ( exit $ac_status )
19483 ol_cv_pthread_lib_lpthreads=no
19484 fi
19485 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19486 fi
19487
19488                 # restore the LIBS
19489                 LIBS="$ol_LIBS"
19490
19491 fi
19492 echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
19493 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
19494
19495         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19496                 ol_link_pthreads="-lpthreads"
19497                 ol_link_threads=posix
19498         fi
19499 fi
19500
19501
19502                 if test $ol_link_threads != no ; then
19503                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19504
19505                                                 save_CPPFLAGS="$CPPFLAGS"
19506                         save_LIBS="$LIBS"
19507                         LIBS="$LTHREAD_LIBS $LIBS"
19508
19509
19510
19511
19512 for ac_func in sched_yield pthread_yield thr_yield
19513 do
19514 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19515 echo "$as_me:$LINENO: checking for $ac_func" >&5
19516 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19517 if eval "test \"\${$as_ac_var+set}\" = set"; then
19518   echo $ECHO_N "(cached) $ECHO_C" >&6
19519 else
19520   cat >conftest.$ac_ext <<_ACEOF
19521 #line $LINENO "configure"
19522 /* confdefs.h.  */
19523 _ACEOF
19524 cat confdefs.h >>conftest.$ac_ext
19525 cat >>conftest.$ac_ext <<_ACEOF
19526 /* end confdefs.h.  */
19527 /* System header to define __stub macros and hopefully few prototypes,
19528     which can conflict with char $ac_func (); below.
19529     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19530     <limits.h> exists even on freestanding compilers.  */
19531 #ifdef __STDC__
19532 # include <limits.h>
19533 #else
19534 # include <assert.h>
19535 #endif
19536 /* Override any gcc2 internal prototype to avoid an error.  */
19537 #ifdef __cplusplus
19538 extern "C"
19539 {
19540 #endif
19541 /* We use char because int might match the return type of a gcc2
19542    builtin and then its argument prototype would still apply.  */
19543 char $ac_func ();
19544 /* The GNU C library defines this for functions which it implements
19545     to always fail with ENOSYS.  Some functions are actually named
19546     something starting with __ and the normal name is an alias.  */
19547 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19548 choke me
19549 #else
19550 char (*f) () = $ac_func;
19551 #endif
19552 #ifdef __cplusplus
19553 }
19554 #endif
19555
19556 int
19557 main ()
19558 {
19559 return f != $ac_func;
19560   ;
19561   return 0;
19562 }
19563 _ACEOF
19564 rm -f conftest.$ac_objext conftest$ac_exeext
19565 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19566   (eval $ac_link) 2>&5
19567   ac_status=$?
19568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19569   (exit $ac_status); } &&
19570          { ac_try='test -s conftest$ac_exeext'
19571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19572   (eval $ac_try) 2>&5
19573   ac_status=$?
19574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19575   (exit $ac_status); }; }; then
19576   eval "$as_ac_var=yes"
19577 else
19578   echo "$as_me: failed program was:" >&5
19579 sed 's/^/| /' conftest.$ac_ext >&5
19580
19581 eval "$as_ac_var=no"
19582 fi
19583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19584 fi
19585 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19586 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19587 if test `eval echo '${'$as_ac_var'}'` = yes; then
19588   cat >>confdefs.h <<_ACEOF
19589 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19590 _ACEOF
19591
19592 fi
19593 done
19594
19595
19596                         if test $ac_cv_func_sched_yield = no -a \
19597                                 $ac_cv_func_pthread_yield = no -a \
19598                                 $ac_cv_func_thr_yield = no ; then
19599                                                                 echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
19600 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
19601 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
19602   echo $ECHO_N "(cached) $ECHO_C" >&6
19603 else
19604   ac_check_lib_save_LIBS=$LIBS
19605 LIBS="-lrt  $LIBS"
19606 cat >conftest.$ac_ext <<_ACEOF
19607 #line $LINENO "configure"
19608 /* confdefs.h.  */
19609 _ACEOF
19610 cat confdefs.h >>conftest.$ac_ext
19611 cat >>conftest.$ac_ext <<_ACEOF
19612 /* end confdefs.h.  */
19613
19614 /* Override any gcc2 internal prototype to avoid an error.  */
19615 #ifdef __cplusplus
19616 extern "C"
19617 #endif
19618 /* We use char because int might match the return type of a gcc2
19619    builtin and then its argument prototype would still apply.  */
19620 char sched_yield ();
19621 int
19622 main ()
19623 {
19624 sched_yield ();
19625   ;
19626   return 0;
19627 }
19628 _ACEOF
19629 rm -f conftest.$ac_objext conftest$ac_exeext
19630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19631   (eval $ac_link) 2>&5
19632   ac_status=$?
19633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19634   (exit $ac_status); } &&
19635          { ac_try='test -s conftest$ac_exeext'
19636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19637   (eval $ac_try) 2>&5
19638   ac_status=$?
19639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19640   (exit $ac_status); }; }; then
19641   ac_cv_lib_rt_sched_yield=yes
19642 else
19643   echo "$as_me: failed program was:" >&5
19644 sed 's/^/| /' conftest.$ac_ext >&5
19645
19646 ac_cv_lib_rt_sched_yield=no
19647 fi
19648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19649 LIBS=$ac_check_lib_save_LIBS
19650 fi
19651 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
19652 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
19653 if test $ac_cv_lib_rt_sched_yield = yes; then
19654   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19655
19656 cat >>confdefs.h <<\_ACEOF
19657 #define HAVE_SCHED_YIELD 1
19658 _ACEOF
19659
19660                                         ac_cv_func_sched_yield=yes
19661 else
19662   ac_cv_func_sched_yield=no
19663 fi
19664
19665                         fi
19666                         if test $ac_cv_func_sched_yield = no -a \
19667                                 $ac_cv_func_pthread_yield = no -a \
19668                                 "$ac_cv_func_thr_yield" = no ; then
19669                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19670 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19671                         fi
19672
19673
19674
19675 for ac_func in pthread_kill pthread_rwlock_destroy
19676 do
19677 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19678 echo "$as_me:$LINENO: checking for $ac_func" >&5
19679 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19680 if eval "test \"\${$as_ac_var+set}\" = set"; then
19681   echo $ECHO_N "(cached) $ECHO_C" >&6
19682 else
19683   cat >conftest.$ac_ext <<_ACEOF
19684 #line $LINENO "configure"
19685 /* confdefs.h.  */
19686 _ACEOF
19687 cat confdefs.h >>conftest.$ac_ext
19688 cat >>conftest.$ac_ext <<_ACEOF
19689 /* end confdefs.h.  */
19690 /* System header to define __stub macros and hopefully few prototypes,
19691     which can conflict with char $ac_func (); below.
19692     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19693     <limits.h> exists even on freestanding compilers.  */
19694 #ifdef __STDC__
19695 # include <limits.h>
19696 #else
19697 # include <assert.h>
19698 #endif
19699 /* Override any gcc2 internal prototype to avoid an error.  */
19700 #ifdef __cplusplus
19701 extern "C"
19702 {
19703 #endif
19704 /* We use char because int might match the return type of a gcc2
19705    builtin and then its argument prototype would still apply.  */
19706 char $ac_func ();
19707 /* The GNU C library defines this for functions which it implements
19708     to always fail with ENOSYS.  Some functions are actually named
19709     something starting with __ and the normal name is an alias.  */
19710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19711 choke me
19712 #else
19713 char (*f) () = $ac_func;
19714 #endif
19715 #ifdef __cplusplus
19716 }
19717 #endif
19718
19719 int
19720 main ()
19721 {
19722 return f != $ac_func;
19723   ;
19724   return 0;
19725 }
19726 _ACEOF
19727 rm -f conftest.$ac_objext conftest$ac_exeext
19728 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19729   (eval $ac_link) 2>&5
19730   ac_status=$?
19731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19732   (exit $ac_status); } &&
19733          { ac_try='test -s conftest$ac_exeext'
19734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19735   (eval $ac_try) 2>&5
19736   ac_status=$?
19737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738   (exit $ac_status); }; }; then
19739   eval "$as_ac_var=yes"
19740 else
19741   echo "$as_me: failed program was:" >&5
19742 sed 's/^/| /' conftest.$ac_ext >&5
19743
19744 eval "$as_ac_var=no"
19745 fi
19746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19747 fi
19748 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19749 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19750 if test `eval echo '${'$as_ac_var'}'` = yes; then
19751   cat >>confdefs.h <<_ACEOF
19752 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19753 _ACEOF
19754
19755 fi
19756 done
19757
19758
19759                                                                         echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
19760 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
19761 if test "${ol_cv_func_pthread_detach+set}" = set; then
19762   echo $ECHO_N "(cached) $ECHO_C" >&6
19763 else
19764
19765                                                                 cat >conftest.$ac_ext <<_ACEOF
19766 #line $LINENO "configure"
19767 /* confdefs.h.  */
19768 _ACEOF
19769 cat confdefs.h >>conftest.$ac_ext
19770 cat >>conftest.$ac_ext <<_ACEOF
19771 /* end confdefs.h.  */
19772
19773 #include <pthread.h>
19774 #ifndef NULL
19775 #define NULL (void*)0
19776 #endif
19777
19778 int
19779 main ()
19780 {
19781 pthread_detach(NULL);
19782   ;
19783   return 0;
19784 }
19785 _ACEOF
19786 rm -f conftest.$ac_objext conftest$ac_exeext
19787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19788   (eval $ac_link) 2>&5
19789   ac_status=$?
19790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19791   (exit $ac_status); } &&
19792          { ac_try='test -s conftest$ac_exeext'
19793   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19794   (eval $ac_try) 2>&5
19795   ac_status=$?
19796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19797   (exit $ac_status); }; }; then
19798   ol_cv_func_pthread_detach=yes
19799 else
19800   echo "$as_me: failed program was:" >&5
19801 sed 's/^/| /' conftest.$ac_ext >&5
19802
19803 ol_cv_func_pthread_detach=no
19804 fi
19805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19806
19807 fi
19808 echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
19809 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
19810
19811                         if test $ol_cv_func_pthread_detach = no ; then
19812                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
19813 echo "$as_me: error: could not locate pthread_detach()" >&2;}
19814    { (exit 1); exit 1; }; }
19815                         fi
19816
19817
19818 cat >>confdefs.h <<\_ACEOF
19819 #define HAVE_PTHREAD_DETACH 1
19820 _ACEOF
19821
19822
19823
19824
19825
19826
19827 for ac_func in \
19828                                 pthread_setconcurrency \
19829                                 pthread_getconcurrency \
19830                                 thr_setconcurrency \
19831                                 thr_getconcurrency \
19832
19833 do
19834 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19835 echo "$as_me:$LINENO: checking for $ac_func" >&5
19836 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19837 if eval "test \"\${$as_ac_var+set}\" = set"; then
19838   echo $ECHO_N "(cached) $ECHO_C" >&6
19839 else
19840   cat >conftest.$ac_ext <<_ACEOF
19841 #line $LINENO "configure"
19842 /* confdefs.h.  */
19843 _ACEOF
19844 cat confdefs.h >>conftest.$ac_ext
19845 cat >>conftest.$ac_ext <<_ACEOF
19846 /* end confdefs.h.  */
19847 /* System header to define __stub macros and hopefully few prototypes,
19848     which can conflict with char $ac_func (); below.
19849     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19850     <limits.h> exists even on freestanding compilers.  */
19851 #ifdef __STDC__
19852 # include <limits.h>
19853 #else
19854 # include <assert.h>
19855 #endif
19856 /* Override any gcc2 internal prototype to avoid an error.  */
19857 #ifdef __cplusplus
19858 extern "C"
19859 {
19860 #endif
19861 /* We use char because int might match the return type of a gcc2
19862    builtin and then its argument prototype would still apply.  */
19863 char $ac_func ();
19864 /* The GNU C library defines this for functions which it implements
19865     to always fail with ENOSYS.  Some functions are actually named
19866     something starting with __ and the normal name is an alias.  */
19867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19868 choke me
19869 #else
19870 char (*f) () = $ac_func;
19871 #endif
19872 #ifdef __cplusplus
19873 }
19874 #endif
19875
19876 int
19877 main ()
19878 {
19879 return f != $ac_func;
19880   ;
19881   return 0;
19882 }
19883 _ACEOF
19884 rm -f conftest.$ac_objext conftest$ac_exeext
19885 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19886   (eval $ac_link) 2>&5
19887   ac_status=$?
19888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19889   (exit $ac_status); } &&
19890          { ac_try='test -s conftest$ac_exeext'
19891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19892   (eval $ac_try) 2>&5
19893   ac_status=$?
19894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19895   (exit $ac_status); }; }; then
19896   eval "$as_ac_var=yes"
19897 else
19898   echo "$as_me: failed program was:" >&5
19899 sed 's/^/| /' conftest.$ac_ext >&5
19900
19901 eval "$as_ac_var=no"
19902 fi
19903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19904 fi
19905 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19906 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19907 if test `eval echo '${'$as_ac_var'}'` = yes; then
19908   cat >>confdefs.h <<_ACEOF
19909 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19910 _ACEOF
19911
19912 fi
19913 done
19914
19915
19916
19917
19918 for ac_func in pthread_kill_other_threads_np
19919 do
19920 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19921 echo "$as_me:$LINENO: checking for $ac_func" >&5
19922 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19923 if eval "test \"\${$as_ac_var+set}\" = set"; then
19924   echo $ECHO_N "(cached) $ECHO_C" >&6
19925 else
19926   cat >conftest.$ac_ext <<_ACEOF
19927 #line $LINENO "configure"
19928 /* confdefs.h.  */
19929 _ACEOF
19930 cat confdefs.h >>conftest.$ac_ext
19931 cat >>conftest.$ac_ext <<_ACEOF
19932 /* end confdefs.h.  */
19933 /* System header to define __stub macros and hopefully few prototypes,
19934     which can conflict with char $ac_func (); below.
19935     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19936     <limits.h> exists even on freestanding compilers.  */
19937 #ifdef __STDC__
19938 # include <limits.h>
19939 #else
19940 # include <assert.h>
19941 #endif
19942 /* Override any gcc2 internal prototype to avoid an error.  */
19943 #ifdef __cplusplus
19944 extern "C"
19945 {
19946 #endif
19947 /* We use char because int might match the return type of a gcc2
19948    builtin and then its argument prototype would still apply.  */
19949 char $ac_func ();
19950 /* The GNU C library defines this for functions which it implements
19951     to always fail with ENOSYS.  Some functions are actually named
19952     something starting with __ and the normal name is an alias.  */
19953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19954 choke me
19955 #else
19956 char (*f) () = $ac_func;
19957 #endif
19958 #ifdef __cplusplus
19959 }
19960 #endif
19961
19962 int
19963 main ()
19964 {
19965 return f != $ac_func;
19966   ;
19967   return 0;
19968 }
19969 _ACEOF
19970 rm -f conftest.$ac_objext conftest$ac_exeext
19971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19972   (eval $ac_link) 2>&5
19973   ac_status=$?
19974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19975   (exit $ac_status); } &&
19976          { ac_try='test -s conftest$ac_exeext'
19977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19978   (eval $ac_try) 2>&5
19979   ac_status=$?
19980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19981   (exit $ac_status); }; }; then
19982   eval "$as_ac_var=yes"
19983 else
19984   echo "$as_me: failed program was:" >&5
19985 sed 's/^/| /' conftest.$ac_ext >&5
19986
19987 eval "$as_ac_var=no"
19988 fi
19989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19990 fi
19991 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19992 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19993 if test `eval echo '${'$as_ac_var'}'` = yes; then
19994   cat >>confdefs.h <<_ACEOF
19995 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19996 _ACEOF
19997
19998 fi
19999 done
20000
20001         echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
20002 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
20003 if test "${ol_cv_sys_linux_threads+set}" = set; then
20004   echo $ECHO_N "(cached) $ECHO_C" >&6
20005 else
20006   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
20007 fi
20008 echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
20009 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
20010
20011
20012
20013
20014         echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
20015 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
20016 if test "${ol_cv_linux_threads+set}" = set; then
20017   echo $ECHO_N "(cached) $ECHO_C" >&6
20018 else
20019
20020                 if test $ol_cv_header_linux_threads = yes -a \
20021                         $ol_cv_sys_linux_threads = yes; then
20022                         ol_cv_linux_threads=yes
20023                 elif test $ol_cv_header_linux_threads = no -a \
20024                         $ol_cv_sys_linux_threads = no; then
20025                         ol_cv_linux_threads=no
20026                 else
20027                         ol_cv_linux_threads=error
20028                 fi
20029
20030 fi
20031 echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
20032 echo "${ECHO_T}$ol_cv_linux_threads" >&6
20033
20034
20035                         if test $ol_cv_linux_threads = error; then
20036                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
20037 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
20038    { (exit 1); exit 1; }; };
20039                         fi
20040
20041                         echo "$as_me:$LINENO: checking if pthread_create() works" >&5
20042 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
20043 if test "${ol_cv_pthread_create_works+set}" = set; then
20044   echo $ECHO_N "(cached) $ECHO_C" >&6
20045 else
20046
20047                         if test "$cross_compiling" = yes; then
20048                                 ol_cv_pthread_create_works=yes
20049 else
20050   cat >conftest.$ac_ext <<_ACEOF
20051 #line $LINENO "configure"
20052 /* confdefs.h.  */
20053 _ACEOF
20054 cat confdefs.h >>conftest.$ac_ext
20055 cat >>conftest.$ac_ext <<_ACEOF
20056 /* end confdefs.h.  */
20057 /* pthread test headers */
20058 #include <pthread.h>
20059 #if HAVE_PTHREADS < 7
20060 #include <errno.h>
20061 #endif
20062 #ifndef NULL
20063 #define NULL (void*)0
20064 #endif
20065
20066 static void *task(p)
20067         void *p;
20068 {
20069         return (void *) (p == NULL);
20070 }
20071
20072
20073 int main(argc, argv)
20074         int argc;
20075         char **argv;
20076 {
20077
20078         /* pthread test function */
20079 #ifndef PTHREAD_CREATE_DETACHED
20080 #define PTHREAD_CREATE_DETACHED 1
20081 #endif
20082         pthread_t t;
20083         int status;
20084         int detach = PTHREAD_CREATE_DETACHED;
20085
20086 #if HAVE_PTHREADS > 4
20087         /* Final pthreads */
20088         pthread_attr_t attr;
20089
20090         status = pthread_attr_init(&attr);
20091         if( status ) return status;
20092
20093 #if HAVE_PTHREADS < 7
20094         status = pthread_attr_setdetachstate(&attr, &detach);
20095         if( status < 0 ) status = errno;
20096 #else
20097         status = pthread_attr_setdetachstate(&attr, detach);
20098 #endif
20099         if( status ) return status;
20100         status = pthread_create( &t, &attr, task, NULL );
20101 #if HAVE_PTHREADS < 7
20102         if( status < 0 ) status = errno;
20103 #endif
20104         if( status ) return status;
20105 #else
20106         /* Draft 4 pthreads */
20107         status = pthread_create( &t, pthread_attr_default, task, NULL );
20108         if( status ) return errno;
20109
20110         /* give thread a chance to complete */
20111         /* it should remain joinable and hence detachable */
20112         sleep( 1 );
20113
20114         status = pthread_detach( &t );
20115         if( status ) return errno;
20116 #endif
20117
20118 #ifdef HAVE_LINUX_THREADS
20119         pthread_kill_other_threads_np();
20120 #endif
20121
20122         return 0;
20123
20124 }
20125
20126 _ACEOF
20127 rm -f conftest$ac_exeext
20128 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20129   (eval $ac_link) 2>&5
20130   ac_status=$?
20131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20132   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20134   (eval $ac_try) 2>&5
20135   ac_status=$?
20136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20137   (exit $ac_status); }; }; then
20138   ol_cv_pthread_create_works=yes
20139 else
20140   echo "$as_me: program exited with status $ac_status" >&5
20141 echo "$as_me: failed program was:" >&5
20142 sed 's/^/| /' conftest.$ac_ext >&5
20143
20144 ( exit $ac_status )
20145 ol_cv_pthread_create_works=no
20146 fi
20147 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20148 fi
20149 fi
20150 echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
20151 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
20152
20153                         if test $ol_cv_pthread_create_works = no ; then
20154                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
20155 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
20156    { (exit 1); exit 1; }; }
20157                         fi
20158
20159                                                 if test $ol_with_yielding_select = auto ; then
20160                                 echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
20161 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
20162 if test "${ol_cv_pthread_select_yields+set}" = set; then
20163   echo $ECHO_N "(cached) $ECHO_C" >&6
20164 else
20165
20166                                 if test "$cross_compiling" = yes; then
20167   ol_cv_pthread_select_yields=cross
20168 else
20169   cat >conftest.$ac_ext <<_ACEOF
20170 #line $LINENO "configure"
20171 /* confdefs.h.  */
20172 _ACEOF
20173 cat confdefs.h >>conftest.$ac_ext
20174 cat >>conftest.$ac_ext <<_ACEOF
20175 /* end confdefs.h.  */
20176
20177 #include <sys/types.h>
20178 #include <sys/time.h>
20179 #include <unistd.h>
20180 #include <pthread.h>
20181 #ifndef NULL
20182 #define NULL (void*) 0
20183 #endif
20184
20185 static int fildes[2];
20186
20187 static void *task(p)
20188         void *p;
20189 {
20190         int i;
20191         struct timeval tv;
20192
20193         fd_set rfds;
20194
20195         tv.tv_sec=10;
20196         tv.tv_usec=0;
20197
20198         FD_ZERO(&rfds);
20199         FD_SET(fildes[0], &rfds);
20200
20201         /* we're not interested in any fds */
20202         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
20203
20204         if(i < 0) {
20205                 perror("select");
20206                 exit(10);
20207         }
20208
20209         exit(0); /* if we exit here, the select blocked the whole process */
20210 }
20211
20212 int main(argc, argv)
20213         int argc;
20214         char **argv;
20215 {
20216         pthread_t t;
20217
20218         /* create a pipe to select */
20219         if(pipe(&fildes[0])) {
20220                 perror("select");
20221                 exit(1);
20222         }
20223
20224 #ifdef HAVE_PTHREAD_SETCONCURRENCY
20225         (void) pthread_setconcurrency(2);
20226 #else
20227 #ifdef HAVE_THR_SETCONCURRENCY
20228         /* Set Solaris LWP concurrency to 2 */
20229         thr_setconcurrency(2);
20230 #endif
20231 #endif
20232
20233 #if HAVE_PTHREADS < 6
20234         pthread_create(&t, pthread_attr_default, task, NULL);
20235 #else
20236         pthread_create(&t, NULL, task, NULL);
20237 #endif
20238
20239         /* make sure task runs first */
20240 #if HAVE_THR_YIELD
20241         thr_yield();
20242 #elif defined( HAVE_SCHED_YIELD )
20243         sched_yield();
20244 #elif defined( HAVE_PTHREAD_YIELD )
20245         pthread_yield();
20246 #endif
20247
20248         exit(2);
20249 }
20250 _ACEOF
20251 rm -f conftest$ac_exeext
20252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20253   (eval $ac_link) 2>&5
20254   ac_status=$?
20255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20256   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20258   (eval $ac_try) 2>&5
20259   ac_status=$?
20260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20261   (exit $ac_status); }; }; then
20262   ol_cv_pthread_select_yields=no
20263 else
20264   echo "$as_me: program exited with status $ac_status" >&5
20265 echo "$as_me: failed program was:" >&5
20266 sed 's/^/| /' conftest.$ac_ext >&5
20267
20268 ( exit $ac_status )
20269 ol_cv_pthread_select_yields=yes
20270 fi
20271 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20272 fi
20273 fi
20274 echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
20275 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
20276
20277                                 if test $ol_cv_pthread_select_yields = cross ; then
20278                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
20279 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
20280    { (exit 1); exit 1; }; }
20281                                 fi
20282
20283                                 if test $ol_cv_pthread_select_yields = yes ; then
20284                                         ol_with_yielding_select=yes
20285                                 fi
20286                         fi
20287
20288                                                 CPPFLAGS="$save_CPPFLAGS"
20289                         LIBS="$save_LIBS"
20290                 else
20291                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
20292 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
20293    { (exit 1); exit 1; }; }
20294                 fi
20295         fi
20296
20297         if test $ol_with_threads = posix ; then
20298                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
20299 echo "$as_me: error: could not locate POSIX Threads" >&2;}
20300    { (exit 1); exit 1; }; }
20301         fi
20302 fi
20303
20304 if test $ol_with_threads = auto -o $ol_with_threads = yes \
20305         -o $ol_with_threads = mach ; then
20306
20307
20308
20309 for ac_header in mach/cthreads.h cthreads.h
20310 do
20311 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20312 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20313   echo "$as_me:$LINENO: checking for $ac_header" >&5
20314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20316   echo $ECHO_N "(cached) $ECHO_C" >&6
20317 fi
20318 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20319 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20320 else
20321   # Is the header compilable?
20322 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20323 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20324 cat >conftest.$ac_ext <<_ACEOF
20325 #line $LINENO "configure"
20326 /* confdefs.h.  */
20327 _ACEOF
20328 cat confdefs.h >>conftest.$ac_ext
20329 cat >>conftest.$ac_ext <<_ACEOF
20330 /* end confdefs.h.  */
20331 $ac_includes_default
20332 #include <$ac_header>
20333 _ACEOF
20334 rm -f conftest.$ac_objext
20335 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20336   (eval $ac_compile) 2>&5
20337   ac_status=$?
20338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20339   (exit $ac_status); } &&
20340          { ac_try='test -s conftest.$ac_objext'
20341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20342   (eval $ac_try) 2>&5
20343   ac_status=$?
20344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20345   (exit $ac_status); }; }; then
20346   ac_header_compiler=yes
20347 else
20348   echo "$as_me: failed program was:" >&5
20349 sed 's/^/| /' conftest.$ac_ext >&5
20350
20351 ac_header_compiler=no
20352 fi
20353 rm -f conftest.$ac_objext conftest.$ac_ext
20354 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20355 echo "${ECHO_T}$ac_header_compiler" >&6
20356
20357 # Is the header present?
20358 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20359 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20360 cat >conftest.$ac_ext <<_ACEOF
20361 #line $LINENO "configure"
20362 /* confdefs.h.  */
20363 _ACEOF
20364 cat confdefs.h >>conftest.$ac_ext
20365 cat >>conftest.$ac_ext <<_ACEOF
20366 /* end confdefs.h.  */
20367 #include <$ac_header>
20368 _ACEOF
20369 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20371   ac_status=$?
20372   grep -v '^ *+' conftest.er1 >conftest.err
20373   rm -f conftest.er1
20374   cat conftest.err >&5
20375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20376   (exit $ac_status); } >/dev/null; then
20377   if test -s conftest.err; then
20378     ac_cpp_err=$ac_c_preproc_warn_flag
20379   else
20380     ac_cpp_err=
20381   fi
20382 else
20383   ac_cpp_err=yes
20384 fi
20385 if test -z "$ac_cpp_err"; then
20386   ac_header_preproc=yes
20387 else
20388   echo "$as_me: failed program was:" >&5
20389 sed 's/^/| /' conftest.$ac_ext >&5
20390
20391   ac_header_preproc=no
20392 fi
20393 rm -f conftest.err conftest.$ac_ext
20394 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20395 echo "${ECHO_T}$ac_header_preproc" >&6
20396
20397 # So?  What about this header?
20398 case $ac_header_compiler:$ac_header_preproc in
20399   yes:no )
20400     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20401 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20402     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20403 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20404     (
20405       cat <<\_ASBOX
20406 ## ------------------------------------ ##
20407 ## Report this to bug-autoconf@gnu.org. ##
20408 ## ------------------------------------ ##
20409 _ASBOX
20410     ) |
20411       sed "s/^/$as_me: WARNING:     /" >&2
20412     ;;
20413   no:yes )
20414     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20415 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20416     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20417 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20418     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20419 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20420     (
20421       cat <<\_ASBOX
20422 ## ------------------------------------ ##
20423 ## Report this to bug-autoconf@gnu.org. ##
20424 ## ------------------------------------ ##
20425 _ASBOX
20426     ) |
20427       sed "s/^/$as_me: WARNING:     /" >&2
20428     ;;
20429 esac
20430 echo "$as_me:$LINENO: checking for $ac_header" >&5
20431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20433   echo $ECHO_N "(cached) $ECHO_C" >&6
20434 else
20435   eval "$as_ac_Header=$ac_header_preproc"
20436 fi
20437 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20438 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20439
20440 fi
20441 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20442   cat >>confdefs.h <<_ACEOF
20443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20444 _ACEOF
20445
20446 fi
20447
20448 done
20449
20450         if test $ac_cv_header_mach_cthreads_h = yes ; then
20451                 ol_with_threads=found
20452
20453                                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
20454 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
20455 if test "${ac_cv_func_cthread_fork+set}" = set; then
20456   echo $ECHO_N "(cached) $ECHO_C" >&6
20457 else
20458   cat >conftest.$ac_ext <<_ACEOF
20459 #line $LINENO "configure"
20460 /* confdefs.h.  */
20461 _ACEOF
20462 cat confdefs.h >>conftest.$ac_ext
20463 cat >>conftest.$ac_ext <<_ACEOF
20464 /* end confdefs.h.  */
20465 /* System header to define __stub macros and hopefully few prototypes,
20466     which can conflict with char cthread_fork (); below.
20467     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20468     <limits.h> exists even on freestanding compilers.  */
20469 #ifdef __STDC__
20470 # include <limits.h>
20471 #else
20472 # include <assert.h>
20473 #endif
20474 /* Override any gcc2 internal prototype to avoid an error.  */
20475 #ifdef __cplusplus
20476 extern "C"
20477 {
20478 #endif
20479 /* We use char because int might match the return type of a gcc2
20480    builtin and then its argument prototype would still apply.  */
20481 char cthread_fork ();
20482 /* The GNU C library defines this for functions which it implements
20483     to always fail with ENOSYS.  Some functions are actually named
20484     something starting with __ and the normal name is an alias.  */
20485 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
20486 choke me
20487 #else
20488 char (*f) () = cthread_fork;
20489 #endif
20490 #ifdef __cplusplus
20491 }
20492 #endif
20493
20494 int
20495 main ()
20496 {
20497 return f != cthread_fork;
20498   ;
20499   return 0;
20500 }
20501 _ACEOF
20502 rm -f conftest.$ac_objext conftest$ac_exeext
20503 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20504   (eval $ac_link) 2>&5
20505   ac_status=$?
20506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20507   (exit $ac_status); } &&
20508          { ac_try='test -s conftest$ac_exeext'
20509   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20510   (eval $ac_try) 2>&5
20511   ac_status=$?
20512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20513   (exit $ac_status); }; }; then
20514   ac_cv_func_cthread_fork=yes
20515 else
20516   echo "$as_me: failed program was:" >&5
20517 sed 's/^/| /' conftest.$ac_ext >&5
20518
20519 ac_cv_func_cthread_fork=no
20520 fi
20521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20522 fi
20523 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
20524 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
20525 if test $ac_cv_func_cthread_fork = yes; then
20526   ol_link_threads=yes
20527 fi
20528
20529
20530                 if test $ol_link_threads = no ; then
20531                                                                         echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
20532 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
20533 if test "${ol_cv_cthread_all_load+set}" = set; then
20534   echo $ECHO_N "(cached) $ECHO_C" >&6
20535 else
20536
20537                                                                 save_LIBS="$LIBS"
20538                                 LIBS="-all_load $LIBS"
20539                                 cat >conftest.$ac_ext <<_ACEOF
20540 #line $LINENO "configure"
20541 /* confdefs.h.  */
20542 _ACEOF
20543 cat confdefs.h >>conftest.$ac_ext
20544 cat >>conftest.$ac_ext <<_ACEOF
20545 /* end confdefs.h.  */
20546 #include <mach/cthreads.h>
20547 int
20548 main ()
20549 {
20550
20551                                         cthread_fork((void *)0, (void *)0);
20552
20553   ;
20554   return 0;
20555 }
20556 _ACEOF
20557 rm -f conftest.$ac_objext conftest$ac_exeext
20558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20559   (eval $ac_link) 2>&5
20560   ac_status=$?
20561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20562   (exit $ac_status); } &&
20563          { ac_try='test -s conftest$ac_exeext'
20564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20565   (eval $ac_try) 2>&5
20566   ac_status=$?
20567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20568   (exit $ac_status); }; }; then
20569   ol_cv_cthread_all_load=yes
20570 else
20571   echo "$as_me: failed program was:" >&5
20572 sed 's/^/| /' conftest.$ac_ext >&5
20573
20574 ol_cv_cthread_all_load=no
20575 fi
20576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20577                                                                 LIBS="$save_LIBS"
20578
20579 fi
20580 echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
20581 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
20582
20583                         if test $ol_cv_cthread_all_load = yes ; then
20584                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
20585                                 ol_link_threads=mach
20586                                 ol_with_threads=found
20587                         fi
20588                 fi
20589
20590         elif test $ac_cv_header_cthreads_h = yes ; then
20591
20592                 ol_with_threads=found
20593
20594                                 save_LIBS="$LIBS"
20595                 LIBS="$LIBS -lthreads"
20596                 echo "$as_me:$LINENO: checking for cthread_fork" >&5
20597 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
20598 if test "${ac_cv_func_cthread_fork+set}" = set; then
20599   echo $ECHO_N "(cached) $ECHO_C" >&6
20600 else
20601   cat >conftest.$ac_ext <<_ACEOF
20602 #line $LINENO "configure"
20603 /* confdefs.h.  */
20604 _ACEOF
20605 cat confdefs.h >>conftest.$ac_ext
20606 cat >>conftest.$ac_ext <<_ACEOF
20607 /* end confdefs.h.  */
20608 /* System header to define __stub macros and hopefully few prototypes,
20609     which can conflict with char cthread_fork (); below.
20610     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20611     <limits.h> exists even on freestanding compilers.  */
20612 #ifdef __STDC__
20613 # include <limits.h>
20614 #else
20615 # include <assert.h>
20616 #endif
20617 /* Override any gcc2 internal prototype to avoid an error.  */
20618 #ifdef __cplusplus
20619 extern "C"
20620 {
20621 #endif
20622 /* We use char because int might match the return type of a gcc2
20623    builtin and then its argument prototype would still apply.  */
20624 char cthread_fork ();
20625 /* The GNU C library defines this for functions which it implements
20626     to always fail with ENOSYS.  Some functions are actually named
20627     something starting with __ and the normal name is an alias.  */
20628 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
20629 choke me
20630 #else
20631 char (*f) () = cthread_fork;
20632 #endif
20633 #ifdef __cplusplus
20634 }
20635 #endif
20636
20637 int
20638 main ()
20639 {
20640 return f != cthread_fork;
20641   ;
20642   return 0;
20643 }
20644 _ACEOF
20645 rm -f conftest.$ac_objext conftest$ac_exeext
20646 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20647   (eval $ac_link) 2>&5
20648   ac_status=$?
20649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20650   (exit $ac_status); } &&
20651          { ac_try='test -s conftest$ac_exeext'
20652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20653   (eval $ac_try) 2>&5
20654   ac_status=$?
20655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20656   (exit $ac_status); }; }; then
20657   ac_cv_func_cthread_fork=yes
20658 else
20659   echo "$as_me: failed program was:" >&5
20660 sed 's/^/| /' conftest.$ac_ext >&5
20661
20662 ac_cv_func_cthread_fork=no
20663 fi
20664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20665 fi
20666 echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
20667 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
20668 if test $ac_cv_func_cthread_fork = yes; then
20669   ol_link_threads=yes
20670 fi
20671
20672                 LIBS="$save_LIBS"
20673
20674                 if test $ol_link_threads = yes ; then
20675                         LTHREAD_LIBS="-lthreads"
20676                         ol_link_threads=mach
20677                         ol_with_threads=found
20678                 else
20679                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
20680 echo "$as_me: error: could not link with Mach CThreads" >&2;}
20681    { (exit 1); exit 1; }; }
20682                 fi
20683
20684         elif test $ol_with_threads = mach ; then
20685                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
20686 echo "$as_me: error: could not locate Mach CThreads" >&2;}
20687    { (exit 1); exit 1; }; }
20688         fi
20689
20690         if test $ol_link_threads = mach ; then
20691
20692 cat >>confdefs.h <<\_ACEOF
20693 #define HAVE_MACH_CTHREADS 1
20694 _ACEOF
20695
20696         elif test $ol_with_threads = found ; then
20697                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
20698 echo "$as_me: error: could not link with Mach CThreads" >&2;}
20699    { (exit 1); exit 1; }; }
20700         fi
20701 fi
20702
20703 if test $ol_with_threads = auto -o $ol_with_threads = yes \
20704         -o $ol_with_threads = pth ; then
20705
20706
20707 for ac_header in pth.h
20708 do
20709 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20710 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20711   echo "$as_me:$LINENO: checking for $ac_header" >&5
20712 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20713 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20714   echo $ECHO_N "(cached) $ECHO_C" >&6
20715 fi
20716 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20717 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20718 else
20719   # Is the header compilable?
20720 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20721 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20722 cat >conftest.$ac_ext <<_ACEOF
20723 #line $LINENO "configure"
20724 /* confdefs.h.  */
20725 _ACEOF
20726 cat confdefs.h >>conftest.$ac_ext
20727 cat >>conftest.$ac_ext <<_ACEOF
20728 /* end confdefs.h.  */
20729 $ac_includes_default
20730 #include <$ac_header>
20731 _ACEOF
20732 rm -f conftest.$ac_objext
20733 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20734   (eval $ac_compile) 2>&5
20735   ac_status=$?
20736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20737   (exit $ac_status); } &&
20738          { ac_try='test -s conftest.$ac_objext'
20739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20740   (eval $ac_try) 2>&5
20741   ac_status=$?
20742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20743   (exit $ac_status); }; }; then
20744   ac_header_compiler=yes
20745 else
20746   echo "$as_me: failed program was:" >&5
20747 sed 's/^/| /' conftest.$ac_ext >&5
20748
20749 ac_header_compiler=no
20750 fi
20751 rm -f conftest.$ac_objext conftest.$ac_ext
20752 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20753 echo "${ECHO_T}$ac_header_compiler" >&6
20754
20755 # Is the header present?
20756 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20757 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20758 cat >conftest.$ac_ext <<_ACEOF
20759 #line $LINENO "configure"
20760 /* confdefs.h.  */
20761 _ACEOF
20762 cat confdefs.h >>conftest.$ac_ext
20763 cat >>conftest.$ac_ext <<_ACEOF
20764 /* end confdefs.h.  */
20765 #include <$ac_header>
20766 _ACEOF
20767 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20768   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20769   ac_status=$?
20770   grep -v '^ *+' conftest.er1 >conftest.err
20771   rm -f conftest.er1
20772   cat conftest.err >&5
20773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20774   (exit $ac_status); } >/dev/null; then
20775   if test -s conftest.err; then
20776     ac_cpp_err=$ac_c_preproc_warn_flag
20777   else
20778     ac_cpp_err=
20779   fi
20780 else
20781   ac_cpp_err=yes
20782 fi
20783 if test -z "$ac_cpp_err"; then
20784   ac_header_preproc=yes
20785 else
20786   echo "$as_me: failed program was:" >&5
20787 sed 's/^/| /' conftest.$ac_ext >&5
20788
20789   ac_header_preproc=no
20790 fi
20791 rm -f conftest.err conftest.$ac_ext
20792 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20793 echo "${ECHO_T}$ac_header_preproc" >&6
20794
20795 # So?  What about this header?
20796 case $ac_header_compiler:$ac_header_preproc in
20797   yes:no )
20798     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20799 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20800     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20801 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20802     (
20803       cat <<\_ASBOX
20804 ## ------------------------------------ ##
20805 ## Report this to bug-autoconf@gnu.org. ##
20806 ## ------------------------------------ ##
20807 _ASBOX
20808     ) |
20809       sed "s/^/$as_me: WARNING:     /" >&2
20810     ;;
20811   no:yes )
20812     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20813 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20814     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20815 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20816     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20817 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20818     (
20819       cat <<\_ASBOX
20820 ## ------------------------------------ ##
20821 ## Report this to bug-autoconf@gnu.org. ##
20822 ## ------------------------------------ ##
20823 _ASBOX
20824     ) |
20825       sed "s/^/$as_me: WARNING:     /" >&2
20826     ;;
20827 esac
20828 echo "$as_me:$LINENO: checking for $ac_header" >&5
20829 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20830 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20831   echo $ECHO_N "(cached) $ECHO_C" >&6
20832 else
20833   eval "$as_ac_Header=$ac_header_preproc"
20834 fi
20835 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20836 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20837
20838 fi
20839 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20840   cat >>confdefs.h <<_ACEOF
20841 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20842 _ACEOF
20843
20844 fi
20845
20846 done
20847
20848
20849         if test $ac_cv_header_pth_h = yes ; then
20850                 echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
20851 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
20852 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
20853   echo $ECHO_N "(cached) $ECHO_C" >&6
20854 else
20855   ac_check_lib_save_LIBS=$LIBS
20856 LIBS="-lpth  $LIBS"
20857 cat >conftest.$ac_ext <<_ACEOF
20858 #line $LINENO "configure"
20859 /* confdefs.h.  */
20860 _ACEOF
20861 cat confdefs.h >>conftest.$ac_ext
20862 cat >>conftest.$ac_ext <<_ACEOF
20863 /* end confdefs.h.  */
20864
20865 /* Override any gcc2 internal prototype to avoid an error.  */
20866 #ifdef __cplusplus
20867 extern "C"
20868 #endif
20869 /* We use char because int might match the return type of a gcc2
20870    builtin and then its argument prototype would still apply.  */
20871 char pth_version ();
20872 int
20873 main ()
20874 {
20875 pth_version ();
20876   ;
20877   return 0;
20878 }
20879 _ACEOF
20880 rm -f conftest.$ac_objext conftest$ac_exeext
20881 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20882   (eval $ac_link) 2>&5
20883   ac_status=$?
20884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20885   (exit $ac_status); } &&
20886          { ac_try='test -s conftest$ac_exeext'
20887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20888   (eval $ac_try) 2>&5
20889   ac_status=$?
20890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20891   (exit $ac_status); }; }; then
20892   ac_cv_lib_pth_pth_version=yes
20893 else
20894   echo "$as_me: failed program was:" >&5
20895 sed 's/^/| /' conftest.$ac_ext >&5
20896
20897 ac_cv_lib_pth_pth_version=no
20898 fi
20899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20900 LIBS=$ac_check_lib_save_LIBS
20901 fi
20902 echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
20903 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
20904 if test $ac_cv_lib_pth_pth_version = yes; then
20905   have_pth=yes
20906 else
20907   have_pth=no
20908 fi
20909
20910
20911                 if test $have_pth = yes ; then
20912
20913 cat >>confdefs.h <<\_ACEOF
20914 #define HAVE_GNU_PTH 1
20915 _ACEOF
20916
20917                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
20918                         ol_link_threads=pth
20919                         ol_with_threads=found
20920
20921                         if test $ol_with_yielding_select = auto ; then
20922                                 ol_with_yielding_select=yes
20923                         fi
20924                 fi
20925         fi
20926 fi
20927
20928 if test $ol_with_threads = auto -o $ol_with_threads = yes \
20929         -o $ol_with_threads = lwp ; then
20930
20931
20932
20933 for ac_header in thread.h synch.h
20934 do
20935 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20937   echo "$as_me:$LINENO: checking for $ac_header" >&5
20938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20940   echo $ECHO_N "(cached) $ECHO_C" >&6
20941 fi
20942 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
20943 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20944 else
20945   # Is the header compilable?
20946 echo "$as_me:$LINENO: checking $ac_header usability" >&5
20947 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
20948 cat >conftest.$ac_ext <<_ACEOF
20949 #line $LINENO "configure"
20950 /* confdefs.h.  */
20951 _ACEOF
20952 cat confdefs.h >>conftest.$ac_ext
20953 cat >>conftest.$ac_ext <<_ACEOF
20954 /* end confdefs.h.  */
20955 $ac_includes_default
20956 #include <$ac_header>
20957 _ACEOF
20958 rm -f conftest.$ac_objext
20959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20960   (eval $ac_compile) 2>&5
20961   ac_status=$?
20962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20963   (exit $ac_status); } &&
20964          { ac_try='test -s conftest.$ac_objext'
20965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20966   (eval $ac_try) 2>&5
20967   ac_status=$?
20968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20969   (exit $ac_status); }; }; then
20970   ac_header_compiler=yes
20971 else
20972   echo "$as_me: failed program was:" >&5
20973 sed 's/^/| /' conftest.$ac_ext >&5
20974
20975 ac_header_compiler=no
20976 fi
20977 rm -f conftest.$ac_objext conftest.$ac_ext
20978 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20979 echo "${ECHO_T}$ac_header_compiler" >&6
20980
20981 # Is the header present?
20982 echo "$as_me:$LINENO: checking $ac_header presence" >&5
20983 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
20984 cat >conftest.$ac_ext <<_ACEOF
20985 #line $LINENO "configure"
20986 /* confdefs.h.  */
20987 _ACEOF
20988 cat confdefs.h >>conftest.$ac_ext
20989 cat >>conftest.$ac_ext <<_ACEOF
20990 /* end confdefs.h.  */
20991 #include <$ac_header>
20992 _ACEOF
20993 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20994   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20995   ac_status=$?
20996   grep -v '^ *+' conftest.er1 >conftest.err
20997   rm -f conftest.er1
20998   cat conftest.err >&5
20999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21000   (exit $ac_status); } >/dev/null; then
21001   if test -s conftest.err; then
21002     ac_cpp_err=$ac_c_preproc_warn_flag
21003   else
21004     ac_cpp_err=
21005   fi
21006 else
21007   ac_cpp_err=yes
21008 fi
21009 if test -z "$ac_cpp_err"; then
21010   ac_header_preproc=yes
21011 else
21012   echo "$as_me: failed program was:" >&5
21013 sed 's/^/| /' conftest.$ac_ext >&5
21014
21015   ac_header_preproc=no
21016 fi
21017 rm -f conftest.err conftest.$ac_ext
21018 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21019 echo "${ECHO_T}$ac_header_preproc" >&6
21020
21021 # So?  What about this header?
21022 case $ac_header_compiler:$ac_header_preproc in
21023   yes:no )
21024     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21025 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21026     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21027 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21028     (
21029       cat <<\_ASBOX
21030 ## ------------------------------------ ##
21031 ## Report this to bug-autoconf@gnu.org. ##
21032 ## ------------------------------------ ##
21033 _ASBOX
21034     ) |
21035       sed "s/^/$as_me: WARNING:     /" >&2
21036     ;;
21037   no:yes )
21038     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21039 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21040     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21041 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21042     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21043 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21044     (
21045       cat <<\_ASBOX
21046 ## ------------------------------------ ##
21047 ## Report this to bug-autoconf@gnu.org. ##
21048 ## ------------------------------------ ##
21049 _ASBOX
21050     ) |
21051       sed "s/^/$as_me: WARNING:     /" >&2
21052     ;;
21053 esac
21054 echo "$as_me:$LINENO: checking for $ac_header" >&5
21055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21057   echo $ECHO_N "(cached) $ECHO_C" >&6
21058 else
21059   eval "$as_ac_Header=$ac_header_preproc"
21060 fi
21061 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21062 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21063
21064 fi
21065 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21066   cat >>confdefs.h <<_ACEOF
21067 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21068 _ACEOF
21069
21070 fi
21071
21072 done
21073
21074         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
21075                 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
21076 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
21077 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
21078   echo $ECHO_N "(cached) $ECHO_C" >&6
21079 else
21080   ac_check_lib_save_LIBS=$LIBS
21081 LIBS="-lthread  $LIBS"
21082 cat >conftest.$ac_ext <<_ACEOF
21083 #line $LINENO "configure"
21084 /* confdefs.h.  */
21085 _ACEOF
21086 cat confdefs.h >>conftest.$ac_ext
21087 cat >>conftest.$ac_ext <<_ACEOF
21088 /* end confdefs.h.  */
21089
21090 /* Override any gcc2 internal prototype to avoid an error.  */
21091 #ifdef __cplusplus
21092 extern "C"
21093 #endif
21094 /* We use char because int might match the return type of a gcc2
21095    builtin and then its argument prototype would still apply.  */
21096 char thr_create ();
21097 int
21098 main ()
21099 {
21100 thr_create ();
21101   ;
21102   return 0;
21103 }
21104 _ACEOF
21105 rm -f conftest.$ac_objext conftest$ac_exeext
21106 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21107   (eval $ac_link) 2>&5
21108   ac_status=$?
21109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21110   (exit $ac_status); } &&
21111          { ac_try='test -s conftest$ac_exeext'
21112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21113   (eval $ac_try) 2>&5
21114   ac_status=$?
21115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21116   (exit $ac_status); }; }; then
21117   ac_cv_lib_thread_thr_create=yes
21118 else
21119   echo "$as_me: failed program was:" >&5
21120 sed 's/^/| /' conftest.$ac_ext >&5
21121
21122 ac_cv_lib_thread_thr_create=no
21123 fi
21124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21125 LIBS=$ac_check_lib_save_LIBS
21126 fi
21127 echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
21128 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
21129 if test $ac_cv_lib_thread_thr_create = yes; then
21130   have_thr=yes
21131 else
21132   have_thr=no
21133 fi
21134
21135
21136                 if test $have_thr = yes ; then
21137
21138 cat >>confdefs.h <<\_ACEOF
21139 #define HAVE_THR 1
21140 _ACEOF
21141
21142                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
21143                         ol_link_threads=thr
21144
21145                         if test $ol_with_yielding_select = auto ; then
21146                                 ol_with_yielding_select=yes
21147                         fi
21148
21149
21150
21151 for ac_func in \
21152                                 thr_setconcurrency \
21153                                 thr_getconcurrency \
21154
21155 do
21156 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21157 echo "$as_me:$LINENO: checking for $ac_func" >&5
21158 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21159 if eval "test \"\${$as_ac_var+set}\" = set"; then
21160   echo $ECHO_N "(cached) $ECHO_C" >&6
21161 else
21162   cat >conftest.$ac_ext <<_ACEOF
21163 #line $LINENO "configure"
21164 /* confdefs.h.  */
21165 _ACEOF
21166 cat confdefs.h >>conftest.$ac_ext
21167 cat >>conftest.$ac_ext <<_ACEOF
21168 /* end confdefs.h.  */
21169 /* System header to define __stub macros and hopefully few prototypes,
21170     which can conflict with char $ac_func (); below.
21171     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21172     <limits.h> exists even on freestanding compilers.  */
21173 #ifdef __STDC__
21174 # include <limits.h>
21175 #else
21176 # include <assert.h>
21177 #endif
21178 /* Override any gcc2 internal prototype to avoid an error.  */
21179 #ifdef __cplusplus
21180 extern "C"
21181 {
21182 #endif
21183 /* We use char because int might match the return type of a gcc2
21184    builtin and then its argument prototype would still apply.  */
21185 char $ac_func ();
21186 /* The GNU C library defines this for functions which it implements
21187     to always fail with ENOSYS.  Some functions are actually named
21188     something starting with __ and the normal name is an alias.  */
21189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21190 choke me
21191 #else
21192 char (*f) () = $ac_func;
21193 #endif
21194 #ifdef __cplusplus
21195 }
21196 #endif
21197
21198 int
21199 main ()
21200 {
21201 return f != $ac_func;
21202   ;
21203   return 0;
21204 }
21205 _ACEOF
21206 rm -f conftest.$ac_objext conftest$ac_exeext
21207 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21208   (eval $ac_link) 2>&5
21209   ac_status=$?
21210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21211   (exit $ac_status); } &&
21212          { ac_try='test -s conftest$ac_exeext'
21213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21214   (eval $ac_try) 2>&5
21215   ac_status=$?
21216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21217   (exit $ac_status); }; }; then
21218   eval "$as_ac_var=yes"
21219 else
21220   echo "$as_me: failed program was:" >&5
21221 sed 's/^/| /' conftest.$ac_ext >&5
21222
21223 eval "$as_ac_var=no"
21224 fi
21225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21226 fi
21227 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
21228 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21229 if test `eval echo '${'$as_ac_var'}'` = yes; then
21230   cat >>confdefs.h <<_ACEOF
21231 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21232 _ACEOF
21233
21234 fi
21235 done
21236
21237                 fi
21238         fi
21239
21240
21241 for ac_header in lwp/lwp.h
21242 do
21243 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21244 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21245   echo "$as_me:$LINENO: checking for $ac_header" >&5
21246 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21247 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21248   echo $ECHO_N "(cached) $ECHO_C" >&6
21249 fi
21250 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21251 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21252 else
21253   # Is the header compilable?
21254 echo "$as_me:$LINENO: checking $ac_header usability" >&5
21255 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21256 cat >conftest.$ac_ext <<_ACEOF
21257 #line $LINENO "configure"
21258 /* confdefs.h.  */
21259 _ACEOF
21260 cat confdefs.h >>conftest.$ac_ext
21261 cat >>conftest.$ac_ext <<_ACEOF
21262 /* end confdefs.h.  */
21263 $ac_includes_default
21264 #include <$ac_header>
21265 _ACEOF
21266 rm -f conftest.$ac_objext
21267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21268   (eval $ac_compile) 2>&5
21269   ac_status=$?
21270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21271   (exit $ac_status); } &&
21272          { ac_try='test -s conftest.$ac_objext'
21273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21274   (eval $ac_try) 2>&5
21275   ac_status=$?
21276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21277   (exit $ac_status); }; }; then
21278   ac_header_compiler=yes
21279 else
21280   echo "$as_me: failed program was:" >&5
21281 sed 's/^/| /' conftest.$ac_ext >&5
21282
21283 ac_header_compiler=no
21284 fi
21285 rm -f conftest.$ac_objext conftest.$ac_ext
21286 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21287 echo "${ECHO_T}$ac_header_compiler" >&6
21288
21289 # Is the header present?
21290 echo "$as_me:$LINENO: checking $ac_header presence" >&5
21291 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21292 cat >conftest.$ac_ext <<_ACEOF
21293 #line $LINENO "configure"
21294 /* confdefs.h.  */
21295 _ACEOF
21296 cat confdefs.h >>conftest.$ac_ext
21297 cat >>conftest.$ac_ext <<_ACEOF
21298 /* end confdefs.h.  */
21299 #include <$ac_header>
21300 _ACEOF
21301 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21302   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21303   ac_status=$?
21304   grep -v '^ *+' conftest.er1 >conftest.err
21305   rm -f conftest.er1
21306   cat conftest.err >&5
21307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21308   (exit $ac_status); } >/dev/null; then
21309   if test -s conftest.err; then
21310     ac_cpp_err=$ac_c_preproc_warn_flag
21311   else
21312     ac_cpp_err=
21313   fi
21314 else
21315   ac_cpp_err=yes
21316 fi
21317 if test -z "$ac_cpp_err"; then
21318   ac_header_preproc=yes
21319 else
21320   echo "$as_me: failed program was:" >&5
21321 sed 's/^/| /' conftest.$ac_ext >&5
21322
21323   ac_header_preproc=no
21324 fi
21325 rm -f conftest.err conftest.$ac_ext
21326 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21327 echo "${ECHO_T}$ac_header_preproc" >&6
21328
21329 # So?  What about this header?
21330 case $ac_header_compiler:$ac_header_preproc in
21331   yes:no )
21332     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21333 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21334     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21335 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21336     (
21337       cat <<\_ASBOX
21338 ## ------------------------------------ ##
21339 ## Report this to bug-autoconf@gnu.org. ##
21340 ## ------------------------------------ ##
21341 _ASBOX
21342     ) |
21343       sed "s/^/$as_me: WARNING:     /" >&2
21344     ;;
21345   no:yes )
21346     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21347 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21348     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21349 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21350     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21351 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21352     (
21353       cat <<\_ASBOX
21354 ## ------------------------------------ ##
21355 ## Report this to bug-autoconf@gnu.org. ##
21356 ## ------------------------------------ ##
21357 _ASBOX
21358     ) |
21359       sed "s/^/$as_me: WARNING:     /" >&2
21360     ;;
21361 esac
21362 echo "$as_me:$LINENO: checking for $ac_header" >&5
21363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21365   echo $ECHO_N "(cached) $ECHO_C" >&6
21366 else
21367   eval "$as_ac_Header=$ac_header_preproc"
21368 fi
21369 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21370 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21371
21372 fi
21373 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21374   cat >>confdefs.h <<_ACEOF
21375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21376 _ACEOF
21377
21378 fi
21379
21380 done
21381
21382         if test $ac_cv_header_lwp_lwp_h = yes ; then
21383                 echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
21384 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
21385 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
21386   echo $ECHO_N "(cached) $ECHO_C" >&6
21387 else
21388   ac_check_lib_save_LIBS=$LIBS
21389 LIBS="-llwp  $LIBS"
21390 cat >conftest.$ac_ext <<_ACEOF
21391 #line $LINENO "configure"
21392 /* confdefs.h.  */
21393 _ACEOF
21394 cat confdefs.h >>conftest.$ac_ext
21395 cat >>conftest.$ac_ext <<_ACEOF
21396 /* end confdefs.h.  */
21397
21398 /* Override any gcc2 internal prototype to avoid an error.  */
21399 #ifdef __cplusplus
21400 extern "C"
21401 #endif
21402 /* We use char because int might match the return type of a gcc2
21403    builtin and then its argument prototype would still apply.  */
21404 char lwp_create ();
21405 int
21406 main ()
21407 {
21408 lwp_create ();
21409   ;
21410   return 0;
21411 }
21412 _ACEOF
21413 rm -f conftest.$ac_objext conftest$ac_exeext
21414 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21415   (eval $ac_link) 2>&5
21416   ac_status=$?
21417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21418   (exit $ac_status); } &&
21419          { ac_try='test -s conftest$ac_exeext'
21420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21421   (eval $ac_try) 2>&5
21422   ac_status=$?
21423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21424   (exit $ac_status); }; }; then
21425   ac_cv_lib_lwp_lwp_create=yes
21426 else
21427   echo "$as_me: failed program was:" >&5
21428 sed 's/^/| /' conftest.$ac_ext >&5
21429
21430 ac_cv_lib_lwp_lwp_create=no
21431 fi
21432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21433 LIBS=$ac_check_lib_save_LIBS
21434 fi
21435 echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
21436 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
21437 if test $ac_cv_lib_lwp_lwp_create = yes; then
21438   have_lwp=yes
21439 else
21440   have_lwp=no
21441 fi
21442
21443
21444                 if test $have_lwp = yes ; then
21445
21446 cat >>confdefs.h <<\_ACEOF
21447 #define HAVE_LWP 1
21448 _ACEOF
21449
21450                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
21451                         ol_link_threads=lwp
21452
21453                         if test $ol_with_yielding_select = auto ; then
21454                                 ol_with_yielding_select=no
21455                         fi
21456                 fi
21457         fi
21458 fi
21459
21460 if test $ol_with_yielding_select = yes ; then
21461
21462 cat >>confdefs.h <<\_ACEOF
21463 #define HAVE_YIELDING_SELECT 1
21464 _ACEOF
21465
21466 fi
21467
21468 if test $ol_with_threads = manual ; then
21469                 ol_link_threads=yes
21470
21471         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
21472 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
21473
21474
21475
21476 for ac_header in pthread.h sched.h
21477 do
21478 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21479 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21480   echo "$as_me:$LINENO: checking for $ac_header" >&5
21481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21483   echo $ECHO_N "(cached) $ECHO_C" >&6
21484 fi
21485 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21486 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21487 else
21488   # Is the header compilable?
21489 echo "$as_me:$LINENO: checking $ac_header usability" >&5
21490 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21491 cat >conftest.$ac_ext <<_ACEOF
21492 #line $LINENO "configure"
21493 /* confdefs.h.  */
21494 _ACEOF
21495 cat confdefs.h >>conftest.$ac_ext
21496 cat >>conftest.$ac_ext <<_ACEOF
21497 /* end confdefs.h.  */
21498 $ac_includes_default
21499 #include <$ac_header>
21500 _ACEOF
21501 rm -f conftest.$ac_objext
21502 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21503   (eval $ac_compile) 2>&5
21504   ac_status=$?
21505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21506   (exit $ac_status); } &&
21507          { ac_try='test -s conftest.$ac_objext'
21508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21509   (eval $ac_try) 2>&5
21510   ac_status=$?
21511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21512   (exit $ac_status); }; }; then
21513   ac_header_compiler=yes
21514 else
21515   echo "$as_me: failed program was:" >&5
21516 sed 's/^/| /' conftest.$ac_ext >&5
21517
21518 ac_header_compiler=no
21519 fi
21520 rm -f conftest.$ac_objext conftest.$ac_ext
21521 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21522 echo "${ECHO_T}$ac_header_compiler" >&6
21523
21524 # Is the header present?
21525 echo "$as_me:$LINENO: checking $ac_header presence" >&5
21526 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21527 cat >conftest.$ac_ext <<_ACEOF
21528 #line $LINENO "configure"
21529 /* confdefs.h.  */
21530 _ACEOF
21531 cat confdefs.h >>conftest.$ac_ext
21532 cat >>conftest.$ac_ext <<_ACEOF
21533 /* end confdefs.h.  */
21534 #include <$ac_header>
21535 _ACEOF
21536 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21537   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21538   ac_status=$?
21539   grep -v '^ *+' conftest.er1 >conftest.err
21540   rm -f conftest.er1
21541   cat conftest.err >&5
21542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21543   (exit $ac_status); } >/dev/null; then
21544   if test -s conftest.err; then
21545     ac_cpp_err=$ac_c_preproc_warn_flag
21546   else
21547     ac_cpp_err=
21548   fi
21549 else
21550   ac_cpp_err=yes
21551 fi
21552 if test -z "$ac_cpp_err"; then
21553   ac_header_preproc=yes
21554 else
21555   echo "$as_me: failed program was:" >&5
21556 sed 's/^/| /' conftest.$ac_ext >&5
21557
21558   ac_header_preproc=no
21559 fi
21560 rm -f conftest.err conftest.$ac_ext
21561 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21562 echo "${ECHO_T}$ac_header_preproc" >&6
21563
21564 # So?  What about this header?
21565 case $ac_header_compiler:$ac_header_preproc in
21566   yes:no )
21567     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21568 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21569     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21570 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21571     (
21572       cat <<\_ASBOX
21573 ## ------------------------------------ ##
21574 ## Report this to bug-autoconf@gnu.org. ##
21575 ## ------------------------------------ ##
21576 _ASBOX
21577     ) |
21578       sed "s/^/$as_me: WARNING:     /" >&2
21579     ;;
21580   no:yes )
21581     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21582 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21583     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21584 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21585     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21586 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21587     (
21588       cat <<\_ASBOX
21589 ## ------------------------------------ ##
21590 ## Report this to bug-autoconf@gnu.org. ##
21591 ## ------------------------------------ ##
21592 _ASBOX
21593     ) |
21594       sed "s/^/$as_me: WARNING:     /" >&2
21595     ;;
21596 esac
21597 echo "$as_me:$LINENO: checking for $ac_header" >&5
21598 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21600   echo $ECHO_N "(cached) $ECHO_C" >&6
21601 else
21602   eval "$as_ac_Header=$ac_header_preproc"
21603 fi
21604 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21605 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21606
21607 fi
21608 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21609   cat >>confdefs.h <<_ACEOF
21610 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21611 _ACEOF
21612
21613 fi
21614
21615 done
21616
21617
21618
21619 for ac_func in sched_yield pthread_yield
21620 do
21621 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21622 echo "$as_me:$LINENO: checking for $ac_func" >&5
21623 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21624 if eval "test \"\${$as_ac_var+set}\" = set"; then
21625   echo $ECHO_N "(cached) $ECHO_C" >&6
21626 else
21627   cat >conftest.$ac_ext <<_ACEOF
21628 #line $LINENO "configure"
21629 /* confdefs.h.  */
21630 _ACEOF
21631 cat confdefs.h >>conftest.$ac_ext
21632 cat >>conftest.$ac_ext <<_ACEOF
21633 /* end confdefs.h.  */
21634 /* System header to define __stub macros and hopefully few prototypes,
21635     which can conflict with char $ac_func (); below.
21636     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21637     <limits.h> exists even on freestanding compilers.  */
21638 #ifdef __STDC__
21639 # include <limits.h>
21640 #else
21641 # include <assert.h>
21642 #endif
21643 /* Override any gcc2 internal prototype to avoid an error.  */
21644 #ifdef __cplusplus
21645 extern "C"
21646 {
21647 #endif
21648 /* We use char because int might match the return type of a gcc2
21649    builtin and then its argument prototype would still apply.  */
21650 char $ac_func ();
21651 /* The GNU C library defines this for functions which it implements
21652     to always fail with ENOSYS.  Some functions are actually named
21653     something starting with __ and the normal name is an alias.  */
21654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21655 choke me
21656 #else
21657 char (*f) () = $ac_func;
21658 #endif
21659 #ifdef __cplusplus
21660 }
21661 #endif
21662
21663 int
21664 main ()
21665 {
21666 return f != $ac_func;
21667   ;
21668   return 0;
21669 }
21670 _ACEOF
21671 rm -f conftest.$ac_objext conftest$ac_exeext
21672 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21673   (eval $ac_link) 2>&5
21674   ac_status=$?
21675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21676   (exit $ac_status); } &&
21677          { ac_try='test -s conftest$ac_exeext'
21678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21679   (eval $ac_try) 2>&5
21680   ac_status=$?
21681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21682   (exit $ac_status); }; }; then
21683   eval "$as_ac_var=yes"
21684 else
21685   echo "$as_me: failed program was:" >&5
21686 sed 's/^/| /' conftest.$ac_ext >&5
21687
21688 eval "$as_ac_var=no"
21689 fi
21690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21691 fi
21692 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
21693 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21694 if test `eval echo '${'$as_ac_var'}'` = yes; then
21695   cat >>confdefs.h <<_ACEOF
21696 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21697 _ACEOF
21698
21699 fi
21700 done
21701
21702
21703         echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
21704 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
21705 if test "${ol_cv_header_linux_threads+set}" = set; then
21706   echo $ECHO_N "(cached) $ECHO_C" >&6
21707 else
21708   cat >conftest.$ac_ext <<_ACEOF
21709 #line $LINENO "configure"
21710 /* confdefs.h.  */
21711 _ACEOF
21712 cat confdefs.h >>conftest.$ac_ext
21713 cat >>conftest.$ac_ext <<_ACEOF
21714 /* end confdefs.h.  */
21715 #include <pthread.h>
21716 _ACEOF
21717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21718   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
21719   ol_cv_header_linux_threads=yes
21720 else
21721   ol_cv_header_linux_threads=no
21722 fi
21723 rm -f conftest*
21724
21725
21726 fi
21727 echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
21728 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
21729         if test $ol_cv_header_linux_threads = yes; then
21730
21731 cat >>confdefs.h <<\_ACEOF
21732 #define HAVE_LINUX_THREADS 1
21733 _ACEOF
21734
21735         fi
21736
21737
21738
21739 for ac_header in mach/cthreads.h
21740 do
21741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21743   echo "$as_me:$LINENO: checking for $ac_header" >&5
21744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21746   echo $ECHO_N "(cached) $ECHO_C" >&6
21747 fi
21748 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21749 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21750 else
21751   # Is the header compilable?
21752 echo "$as_me:$LINENO: checking $ac_header usability" >&5
21753 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21754 cat >conftest.$ac_ext <<_ACEOF
21755 #line $LINENO "configure"
21756 /* confdefs.h.  */
21757 _ACEOF
21758 cat confdefs.h >>conftest.$ac_ext
21759 cat >>conftest.$ac_ext <<_ACEOF
21760 /* end confdefs.h.  */
21761 $ac_includes_default
21762 #include <$ac_header>
21763 _ACEOF
21764 rm -f conftest.$ac_objext
21765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21766   (eval $ac_compile) 2>&5
21767   ac_status=$?
21768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21769   (exit $ac_status); } &&
21770          { ac_try='test -s conftest.$ac_objext'
21771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21772   (eval $ac_try) 2>&5
21773   ac_status=$?
21774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21775   (exit $ac_status); }; }; then
21776   ac_header_compiler=yes
21777 else
21778   echo "$as_me: failed program was:" >&5
21779 sed 's/^/| /' conftest.$ac_ext >&5
21780
21781 ac_header_compiler=no
21782 fi
21783 rm -f conftest.$ac_objext conftest.$ac_ext
21784 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21785 echo "${ECHO_T}$ac_header_compiler" >&6
21786
21787 # Is the header present?
21788 echo "$as_me:$LINENO: checking $ac_header presence" >&5
21789 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21790 cat >conftest.$ac_ext <<_ACEOF
21791 #line $LINENO "configure"
21792 /* confdefs.h.  */
21793 _ACEOF
21794 cat confdefs.h >>conftest.$ac_ext
21795 cat >>conftest.$ac_ext <<_ACEOF
21796 /* end confdefs.h.  */
21797 #include <$ac_header>
21798 _ACEOF
21799 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21801   ac_status=$?
21802   grep -v '^ *+' conftest.er1 >conftest.err
21803   rm -f conftest.er1
21804   cat conftest.err >&5
21805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21806   (exit $ac_status); } >/dev/null; then
21807   if test -s conftest.err; then
21808     ac_cpp_err=$ac_c_preproc_warn_flag
21809   else
21810     ac_cpp_err=
21811   fi
21812 else
21813   ac_cpp_err=yes
21814 fi
21815 if test -z "$ac_cpp_err"; then
21816   ac_header_preproc=yes
21817 else
21818   echo "$as_me: failed program was:" >&5
21819 sed 's/^/| /' conftest.$ac_ext >&5
21820
21821   ac_header_preproc=no
21822 fi
21823 rm -f conftest.err conftest.$ac_ext
21824 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21825 echo "${ECHO_T}$ac_header_preproc" >&6
21826
21827 # So?  What about this header?
21828 case $ac_header_compiler:$ac_header_preproc in
21829   yes:no )
21830     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21831 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21832     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21833 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21834     (
21835       cat <<\_ASBOX
21836 ## ------------------------------------ ##
21837 ## Report this to bug-autoconf@gnu.org. ##
21838 ## ------------------------------------ ##
21839 _ASBOX
21840     ) |
21841       sed "s/^/$as_me: WARNING:     /" >&2
21842     ;;
21843   no:yes )
21844     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21845 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21846     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21847 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21848     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21849 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21850     (
21851       cat <<\_ASBOX
21852 ## ------------------------------------ ##
21853 ## Report this to bug-autoconf@gnu.org. ##
21854 ## ------------------------------------ ##
21855 _ASBOX
21856     ) |
21857       sed "s/^/$as_me: WARNING:     /" >&2
21858     ;;
21859 esac
21860 echo "$as_me:$LINENO: checking for $ac_header" >&5
21861 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21863   echo $ECHO_N "(cached) $ECHO_C" >&6
21864 else
21865   eval "$as_ac_Header=$ac_header_preproc"
21866 fi
21867 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21868 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21869
21870 fi
21871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21872   cat >>confdefs.h <<_ACEOF
21873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21874 _ACEOF
21875
21876 fi
21877
21878 done
21879
21880
21881 for ac_header in lwp/lwp.h
21882 do
21883 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21884 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21885   echo "$as_me:$LINENO: checking for $ac_header" >&5
21886 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21888   echo $ECHO_N "(cached) $ECHO_C" >&6
21889 fi
21890 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
21891 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21892 else
21893   # Is the header compilable?
21894 echo "$as_me:$LINENO: checking $ac_header usability" >&5
21895 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
21896 cat >conftest.$ac_ext <<_ACEOF
21897 #line $LINENO "configure"
21898 /* confdefs.h.  */
21899 _ACEOF
21900 cat confdefs.h >>conftest.$ac_ext
21901 cat >>conftest.$ac_ext <<_ACEOF
21902 /* end confdefs.h.  */
21903 $ac_includes_default
21904 #include <$ac_header>
21905 _ACEOF
21906 rm -f conftest.$ac_objext
21907 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21908   (eval $ac_compile) 2>&5
21909   ac_status=$?
21910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21911   (exit $ac_status); } &&
21912          { ac_try='test -s conftest.$ac_objext'
21913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21914   (eval $ac_try) 2>&5
21915   ac_status=$?
21916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21917   (exit $ac_status); }; }; then
21918   ac_header_compiler=yes
21919 else
21920   echo "$as_me: failed program was:" >&5
21921 sed 's/^/| /' conftest.$ac_ext >&5
21922
21923 ac_header_compiler=no
21924 fi
21925 rm -f conftest.$ac_objext conftest.$ac_ext
21926 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21927 echo "${ECHO_T}$ac_header_compiler" >&6
21928
21929 # Is the header present?
21930 echo "$as_me:$LINENO: checking $ac_header presence" >&5
21931 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
21932 cat >conftest.$ac_ext <<_ACEOF
21933 #line $LINENO "configure"
21934 /* confdefs.h.  */
21935 _ACEOF
21936 cat confdefs.h >>conftest.$ac_ext
21937 cat >>conftest.$ac_ext <<_ACEOF
21938 /* end confdefs.h.  */
21939 #include <$ac_header>
21940 _ACEOF
21941 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21942   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21943   ac_status=$?
21944   grep -v '^ *+' conftest.er1 >conftest.err
21945   rm -f conftest.er1
21946   cat conftest.err >&5
21947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21948   (exit $ac_status); } >/dev/null; then
21949   if test -s conftest.err; then
21950     ac_cpp_err=$ac_c_preproc_warn_flag
21951   else
21952     ac_cpp_err=
21953   fi
21954 else
21955   ac_cpp_err=yes
21956 fi
21957 if test -z "$ac_cpp_err"; then
21958   ac_header_preproc=yes
21959 else
21960   echo "$as_me: failed program was:" >&5
21961 sed 's/^/| /' conftest.$ac_ext >&5
21962
21963   ac_header_preproc=no
21964 fi
21965 rm -f conftest.err conftest.$ac_ext
21966 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21967 echo "${ECHO_T}$ac_header_preproc" >&6
21968
21969 # So?  What about this header?
21970 case $ac_header_compiler:$ac_header_preproc in
21971   yes:no )
21972     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21973 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
21974     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21975 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21976     (
21977       cat <<\_ASBOX
21978 ## ------------------------------------ ##
21979 ## Report this to bug-autoconf@gnu.org. ##
21980 ## ------------------------------------ ##
21981 _ASBOX
21982     ) |
21983       sed "s/^/$as_me: WARNING:     /" >&2
21984     ;;
21985   no:yes )
21986     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21987 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
21988     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21989 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21990     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21991 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
21992     (
21993       cat <<\_ASBOX
21994 ## ------------------------------------ ##
21995 ## Report this to bug-autoconf@gnu.org. ##
21996 ## ------------------------------------ ##
21997 _ASBOX
21998     ) |
21999       sed "s/^/$as_me: WARNING:     /" >&2
22000     ;;
22001 esac
22002 echo "$as_me:$LINENO: checking for $ac_header" >&5
22003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22005   echo $ECHO_N "(cached) $ECHO_C" >&6
22006 else
22007   eval "$as_ac_Header=$ac_header_preproc"
22008 fi
22009 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22011
22012 fi
22013 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22014   cat >>confdefs.h <<_ACEOF
22015 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22016 _ACEOF
22017
22018 fi
22019
22020 done
22021
22022
22023
22024 for ac_header in thread.h synch.h
22025 do
22026 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22027 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22028   echo "$as_me:$LINENO: checking for $ac_header" >&5
22029 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22030 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22031   echo $ECHO_N "(cached) $ECHO_C" >&6
22032 fi
22033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22035 else
22036   # Is the header compilable?
22037 echo "$as_me:$LINENO: checking $ac_header usability" >&5
22038 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
22039 cat >conftest.$ac_ext <<_ACEOF
22040 #line $LINENO "configure"
22041 /* confdefs.h.  */
22042 _ACEOF
22043 cat confdefs.h >>conftest.$ac_ext
22044 cat >>conftest.$ac_ext <<_ACEOF
22045 /* end confdefs.h.  */
22046 $ac_includes_default
22047 #include <$ac_header>
22048 _ACEOF
22049 rm -f conftest.$ac_objext
22050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22051   (eval $ac_compile) 2>&5
22052   ac_status=$?
22053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22054   (exit $ac_status); } &&
22055          { ac_try='test -s conftest.$ac_objext'
22056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22057   (eval $ac_try) 2>&5
22058   ac_status=$?
22059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22060   (exit $ac_status); }; }; then
22061   ac_header_compiler=yes
22062 else
22063   echo "$as_me: failed program was:" >&5
22064 sed 's/^/| /' conftest.$ac_ext >&5
22065
22066 ac_header_compiler=no
22067 fi
22068 rm -f conftest.$ac_objext conftest.$ac_ext
22069 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22070 echo "${ECHO_T}$ac_header_compiler" >&6
22071
22072 # Is the header present?
22073 echo "$as_me:$LINENO: checking $ac_header presence" >&5
22074 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
22075 cat >conftest.$ac_ext <<_ACEOF
22076 #line $LINENO "configure"
22077 /* confdefs.h.  */
22078 _ACEOF
22079 cat confdefs.h >>conftest.$ac_ext
22080 cat >>conftest.$ac_ext <<_ACEOF
22081 /* end confdefs.h.  */
22082 #include <$ac_header>
22083 _ACEOF
22084 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22085   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22086   ac_status=$?
22087   grep -v '^ *+' conftest.er1 >conftest.err
22088   rm -f conftest.er1
22089   cat conftest.err >&5
22090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22091   (exit $ac_status); } >/dev/null; then
22092   if test -s conftest.err; then
22093     ac_cpp_err=$ac_c_preproc_warn_flag
22094   else
22095     ac_cpp_err=
22096   fi
22097 else
22098   ac_cpp_err=yes
22099 fi
22100 if test -z "$ac_cpp_err"; then
22101   ac_header_preproc=yes
22102 else
22103   echo "$as_me: failed program was:" >&5
22104 sed 's/^/| /' conftest.$ac_ext >&5
22105
22106   ac_header_preproc=no
22107 fi
22108 rm -f conftest.err conftest.$ac_ext
22109 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22110 echo "${ECHO_T}$ac_header_preproc" >&6
22111
22112 # So?  What about this header?
22113 case $ac_header_compiler:$ac_header_preproc in
22114   yes:no )
22115     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22116 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22117     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22118 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22119     (
22120       cat <<\_ASBOX
22121 ## ------------------------------------ ##
22122 ## Report this to bug-autoconf@gnu.org. ##
22123 ## ------------------------------------ ##
22124 _ASBOX
22125     ) |
22126       sed "s/^/$as_me: WARNING:     /" >&2
22127     ;;
22128   no:yes )
22129     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22130 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22131     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22132 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22133     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22134 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22135     (
22136       cat <<\_ASBOX
22137 ## ------------------------------------ ##
22138 ## Report this to bug-autoconf@gnu.org. ##
22139 ## ------------------------------------ ##
22140 _ASBOX
22141     ) |
22142       sed "s/^/$as_me: WARNING:     /" >&2
22143     ;;
22144 esac
22145 echo "$as_me:$LINENO: checking for $ac_header" >&5
22146 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22148   echo $ECHO_N "(cached) $ECHO_C" >&6
22149 else
22150   eval "$as_ac_Header=$ac_header_preproc"
22151 fi
22152 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22153 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22154
22155 fi
22156 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22157   cat >>confdefs.h <<_ACEOF
22158 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22159 _ACEOF
22160
22161 fi
22162
22163 done
22164
22165 fi
22166
22167 if test $ol_link_threads != no -a $ol_link_threads != nt ; then
22168                         cat >>confdefs.h <<\_ACEOF
22169 #define REENTRANT 1
22170 _ACEOF
22171
22172         cat >>confdefs.h <<\_ACEOF
22173 #define _REENTRANT 1
22174 _ACEOF
22175
22176         cat >>confdefs.h <<\_ACEOF
22177 #define THREAD_SAFE 1
22178 _ACEOF
22179
22180         cat >>confdefs.h <<\_ACEOF
22181 #define _THREAD_SAFE 1
22182 _ACEOF
22183
22184         cat >>confdefs.h <<\_ACEOF
22185 #define THREADSAFE 1
22186 _ACEOF
22187
22188         cat >>confdefs.h <<\_ACEOF
22189 #define _THREADSAFE 1
22190 _ACEOF
22191
22192         cat >>confdefs.h <<\_ACEOF
22193 #define _SGI_MP_SOURCE 1
22194 _ACEOF
22195
22196
22197                         echo "$as_me:$LINENO: checking for thread specific errno" >&5
22198 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
22199 if test "${ol_cv_errno_thread_specific+set}" = set; then
22200   echo $ECHO_N "(cached) $ECHO_C" >&6
22201 else
22202
22203                 cat >conftest.$ac_ext <<_ACEOF
22204 #line $LINENO "configure"
22205 /* confdefs.h.  */
22206 _ACEOF
22207 cat confdefs.h >>conftest.$ac_ext
22208 cat >>conftest.$ac_ext <<_ACEOF
22209 /* end confdefs.h.  */
22210 #include <errno.h>
22211 int
22212 main ()
22213 {
22214 errno = 0;
22215   ;
22216   return 0;
22217 }
22218 _ACEOF
22219 rm -f conftest.$ac_objext conftest$ac_exeext
22220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22221   (eval $ac_link) 2>&5
22222   ac_status=$?
22223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22224   (exit $ac_status); } &&
22225          { ac_try='test -s conftest$ac_exeext'
22226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22227   (eval $ac_try) 2>&5
22228   ac_status=$?
22229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22230   (exit $ac_status); }; }; then
22231   ol_cv_errno_thread_specific=yes
22232 else
22233   echo "$as_me: failed program was:" >&5
22234 sed 's/^/| /' conftest.$ac_ext >&5
22235
22236 ol_cv_errno_thread_specific=no
22237 fi
22238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22239
22240 fi
22241 echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
22242 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
22243
22244                         echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
22245 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
22246 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
22247   echo $ECHO_N "(cached) $ECHO_C" >&6
22248 else
22249
22250                 cat >conftest.$ac_ext <<_ACEOF
22251 #line $LINENO "configure"
22252 /* confdefs.h.  */
22253 _ACEOF
22254 cat confdefs.h >>conftest.$ac_ext
22255 cat >>conftest.$ac_ext <<_ACEOF
22256 /* end confdefs.h.  */
22257 #include <netdb.h>
22258 int
22259 main ()
22260 {
22261 h_errno = 0;
22262   ;
22263   return 0;
22264 }
22265 _ACEOF
22266 rm -f conftest.$ac_objext conftest$ac_exeext
22267 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22268   (eval $ac_link) 2>&5
22269   ac_status=$?
22270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22271   (exit $ac_status); } &&
22272          { ac_try='test -s conftest$ac_exeext'
22273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22274   (eval $ac_try) 2>&5
22275   ac_status=$?
22276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22277   (exit $ac_status); }; }; then
22278   ol_cv_h_errno_thread_specific=yes
22279 else
22280   echo "$as_me: failed program was:" >&5
22281 sed 's/^/| /' conftest.$ac_ext >&5
22282
22283 ol_cv_h_errno_thread_specific=no
22284 fi
22285 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22286
22287 fi
22288 echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
22289 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
22290
22291         if test $ol_cv_errno_thread_specific != yes \
22292                 -o $ol_cv_h_errno_thread_specific != yes ; then
22293                 LIBS="$LTHREAD_LIBS $LIBS"
22294                 LTHREAD_LIBS=""
22295         fi
22296
22297 fi
22298
22299 if test $ol_link_threads = no ; then
22300         if test $ol_with_threads = yes ; then
22301                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
22302 echo "$as_me: error: no suitable thread support" >&2;}
22303    { (exit 1); exit 1; }; }
22304         fi
22305
22306         if test $ol_with_threads = auto ; then
22307                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
22308 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
22309                 ol_with_threads=no
22310         fi
22311
22312
22313 cat >>confdefs.h <<\_ACEOF
22314 #define NO_THREADS 1
22315 _ACEOF
22316
22317         LTHREAD_LIBS=""
22318 fi
22319
22320 if test $ol_link_threads != no ; then
22321         cat >>confdefs.h <<\_ACEOF
22322 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
22323 _ACEOF
22324
22325 fi
22326
22327
22328
22329
22330 for ac_func in \
22331         ctime_r                 \
22332         gethostbyname_r gethostbyaddr_r \
22333
22334 do
22335 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22336 echo "$as_me:$LINENO: checking for $ac_func" >&5
22337 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22338 if eval "test \"\${$as_ac_var+set}\" = set"; then
22339   echo $ECHO_N "(cached) $ECHO_C" >&6
22340 else
22341   cat >conftest.$ac_ext <<_ACEOF
22342 #line $LINENO "configure"
22343 /* confdefs.h.  */
22344 _ACEOF
22345 cat confdefs.h >>conftest.$ac_ext
22346 cat >>conftest.$ac_ext <<_ACEOF
22347 /* end confdefs.h.  */
22348 /* System header to define __stub macros and hopefully few prototypes,
22349     which can conflict with char $ac_func (); below.
22350     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22351     <limits.h> exists even on freestanding compilers.  */
22352 #ifdef __STDC__
22353 # include <limits.h>
22354 #else
22355 # include <assert.h>
22356 #endif
22357 /* Override any gcc2 internal prototype to avoid an error.  */
22358 #ifdef __cplusplus
22359 extern "C"
22360 {
22361 #endif
22362 /* We use char because int might match the return type of a gcc2
22363    builtin and then its argument prototype would still apply.  */
22364 char $ac_func ();
22365 /* The GNU C library defines this for functions which it implements
22366     to always fail with ENOSYS.  Some functions are actually named
22367     something starting with __ and the normal name is an alias.  */
22368 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22369 choke me
22370 #else
22371 char (*f) () = $ac_func;
22372 #endif
22373 #ifdef __cplusplus
22374 }
22375 #endif
22376
22377 int
22378 main ()
22379 {
22380 return f != $ac_func;
22381   ;
22382   return 0;
22383 }
22384 _ACEOF
22385 rm -f conftest.$ac_objext conftest$ac_exeext
22386 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22387   (eval $ac_link) 2>&5
22388   ac_status=$?
22389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22390   (exit $ac_status); } &&
22391          { ac_try='test -s conftest$ac_exeext'
22392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22393   (eval $ac_try) 2>&5
22394   ac_status=$?
22395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22396   (exit $ac_status); }; }; then
22397   eval "$as_ac_var=yes"
22398 else
22399   echo "$as_me: failed program was:" >&5
22400 sed 's/^/| /' conftest.$ac_ext >&5
22401
22402 eval "$as_ac_var=no"
22403 fi
22404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22405 fi
22406 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
22407 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22408 if test `eval echo '${'$as_ac_var'}'` = yes; then
22409   cat >>confdefs.h <<_ACEOF
22410 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22411 _ACEOF
22412
22413 fi
22414 done
22415
22416
22417 if test "$ac_cv_func_ctime_r" = no ; then
22418         ol_cv_func_ctime_r_nargs=0
22419 else
22420         echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
22421 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
22422 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
22423   echo $ECHO_N "(cached) $ECHO_C" >&6
22424 else
22425   cat >conftest.$ac_ext <<_ACEOF
22426 #line $LINENO "configure"
22427 /* confdefs.h.  */
22428 _ACEOF
22429 cat confdefs.h >>conftest.$ac_ext
22430 cat >>conftest.$ac_ext <<_ACEOF
22431 /* end confdefs.h.  */
22432 #include <time.h>
22433 int
22434 main ()
22435 {
22436 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
22437   ;
22438   return 0;
22439 }
22440 _ACEOF
22441 rm -f conftest.$ac_objext
22442 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22443   (eval $ac_compile) 2>&5
22444   ac_status=$?
22445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22446   (exit $ac_status); } &&
22447          { ac_try='test -s conftest.$ac_objext'
22448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22449   (eval $ac_try) 2>&5
22450   ac_status=$?
22451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22452   (exit $ac_status); }; }; then
22453   ol_cv_func_ctime_r_nargs3=yes
22454 else
22455   echo "$as_me: failed program was:" >&5
22456 sed 's/^/| /' conftest.$ac_ext >&5
22457
22458 ol_cv_func_ctime_r_nargs3=no
22459 fi
22460 rm -f conftest.$ac_objext conftest.$ac_ext
22461
22462         cat >conftest.$ac_ext <<_ACEOF
22463 #line $LINENO "configure"
22464 /* confdefs.h.  */
22465 _ACEOF
22466 cat confdefs.h >>conftest.$ac_ext
22467 cat >>conftest.$ac_ext <<_ACEOF
22468 /* end confdefs.h.  */
22469 #include <time.h>
22470 int
22471 main ()
22472 {
22473 time_t ti; char *buffer; ctime_r(&ti,buffer);
22474   ;
22475   return 0;
22476 }
22477 _ACEOF
22478 rm -f conftest.$ac_objext
22479 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22480   (eval $ac_compile) 2>&5
22481   ac_status=$?
22482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22483   (exit $ac_status); } &&
22484          { ac_try='test -s conftest.$ac_objext'
22485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22486   (eval $ac_try) 2>&5
22487   ac_status=$?
22488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22489   (exit $ac_status); }; }; then
22490   ol_cv_func_ctime_r_nargs2=yes
22491 else
22492   echo "$as_me: failed program was:" >&5
22493 sed 's/^/| /' conftest.$ac_ext >&5
22494
22495 ol_cv_func_ctime_r_nargs2=no
22496 fi
22497 rm -f conftest.$ac_objext conftest.$ac_ext
22498
22499         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
22500                 $ol_cv_func_ctime_r_nargs2 = no ; then
22501
22502                 ol_cv_func_ctime_r_nargs=3
22503
22504         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
22505                 $ol_cv_func_ctime_r_nargs2 = yes ; then
22506
22507                 ol_cv_func_ctime_r_nargs=2
22508
22509         else
22510                 ol_cv_func_ctime_r_nargs=0
22511         fi
22512
22513 fi
22514 echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
22515 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
22516
22517   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
22518
22519 cat >>confdefs.h <<_ACEOF
22520 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
22521 _ACEOF
22522
22523   fi
22524
22525 fi
22526
22527 if test "$ac_cv_func_gethostbyname_r" = yes ; then
22528         echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
22529 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
22530 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
22531   echo $ECHO_N "(cached) $ECHO_C" >&6
22532 else
22533   cat >conftest.$ac_ext <<_ACEOF
22534 #line $LINENO "configure"
22535 /* confdefs.h.  */
22536 _ACEOF
22537 cat confdefs.h >>conftest.$ac_ext
22538 cat >>conftest.$ac_ext <<_ACEOF
22539 /* end confdefs.h.  */
22540 #include <sys/types.h>
22541 #include <sys/socket.h>
22542 #include <netinet/in.h>
22543 #include <netdb.h>
22544 #define BUFSIZE (sizeof(struct hostent)+10)
22545 int
22546 main ()
22547 {
22548 struct hostent hent; char buffer[BUFSIZE];
22549                 int bufsize=BUFSIZE;int h_errno;
22550                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
22551                         buffer, bufsize, &h_errno);
22552   ;
22553   return 0;
22554 }
22555 _ACEOF
22556 rm -f conftest.$ac_objext
22557 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22558   (eval $ac_compile) 2>&5
22559   ac_status=$?
22560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22561   (exit $ac_status); } &&
22562          { ac_try='test -s conftest.$ac_objext'
22563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22564   (eval $ac_try) 2>&5
22565   ac_status=$?
22566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22567   (exit $ac_status); }; }; then
22568   ol_cv_func_gethostbyname_r_nargs5=yes
22569 else
22570   echo "$as_me: failed program was:" >&5
22571 sed 's/^/| /' conftest.$ac_ext >&5
22572
22573 ol_cv_func_gethostbyname_r_nargs5=no
22574 fi
22575 rm -f conftest.$ac_objext conftest.$ac_ext
22576
22577         cat >conftest.$ac_ext <<_ACEOF
22578 #line $LINENO "configure"
22579 /* confdefs.h.  */
22580 _ACEOF
22581 cat confdefs.h >>conftest.$ac_ext
22582 cat >>conftest.$ac_ext <<_ACEOF
22583 /* end confdefs.h.  */
22584 #include <sys/types.h>
22585 #include <sys/socket.h>
22586 #include <netinet/in.h>
22587 #include <netdb.h>
22588 #define BUFSIZE (sizeof(struct hostent)+10)
22589 int
22590 main ()
22591 {
22592 struct hostent hent;struct hostent *rhent;
22593                 char buffer[BUFSIZE];
22594                 int bufsize=BUFSIZE;int h_errno;
22595                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
22596                         &rhent, &h_errno);
22597   ;
22598   return 0;
22599 }
22600 _ACEOF
22601 rm -f conftest.$ac_objext
22602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22603   (eval $ac_compile) 2>&5
22604   ac_status=$?
22605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22606   (exit $ac_status); } &&
22607          { ac_try='test -s conftest.$ac_objext'
22608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22609   (eval $ac_try) 2>&5
22610   ac_status=$?
22611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22612   (exit $ac_status); }; }; then
22613   ol_cv_func_gethostbyname_r_nargs6=yes
22614 else
22615   echo "$as_me: failed program was:" >&5
22616 sed 's/^/| /' conftest.$ac_ext >&5
22617
22618 ol_cv_func_gethostbyname_r_nargs6=no
22619 fi
22620 rm -f conftest.$ac_objext conftest.$ac_ext
22621
22622         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
22623                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
22624
22625                 ol_cv_func_gethostbyname_r_nargs=5
22626
22627         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
22628                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
22629
22630                 ol_cv_func_gethostbyname_r_nargs=6
22631
22632         else
22633                 ol_cv_func_gethostbyname_r_nargs=0
22634         fi
22635
22636 fi
22637 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
22638 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
22639   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
22640
22641 cat >>confdefs.h <<_ACEOF
22642 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
22643 _ACEOF
22644
22645   fi
22646
22647 else
22648         ol_cv_func_gethostbyname_r_nargs=0
22649 fi
22650
22651 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
22652         echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
22653 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
22654 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
22655   echo $ECHO_N "(cached) $ECHO_C" >&6
22656 else
22657   cat >conftest.$ac_ext <<_ACEOF
22658 #line $LINENO "configure"
22659 /* confdefs.h.  */
22660 _ACEOF
22661 cat confdefs.h >>conftest.$ac_ext
22662 cat >>conftest.$ac_ext <<_ACEOF
22663 /* end confdefs.h.  */
22664 #include <sys/types.h>
22665 #include <sys/socket.h>
22666 #include <netinet/in.h>
22667 #include <netdb.h>
22668 #define BUFSIZE (sizeof(struct hostent)+10)
22669 int
22670 main ()
22671 {
22672 struct hostent hent; char buffer[BUFSIZE];
22673             struct in_addr add;
22674             size_t alen=sizeof(struct in_addr);
22675             int bufsize=BUFSIZE;int h_errno;
22676                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
22677                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
22678   ;
22679   return 0;
22680 }
22681 _ACEOF
22682 rm -f conftest.$ac_objext
22683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22684   (eval $ac_compile) 2>&5
22685   ac_status=$?
22686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22687   (exit $ac_status); } &&
22688          { ac_try='test -s conftest.$ac_objext'
22689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22690   (eval $ac_try) 2>&5
22691   ac_status=$?
22692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22693   (exit $ac_status); }; }; then
22694   ol_cv_func_gethostbyaddr_r_nargs7=yes
22695 else
22696   echo "$as_me: failed program was:" >&5
22697 sed 's/^/| /' conftest.$ac_ext >&5
22698
22699 ol_cv_func_gethostbyaddr_r_nargs7=no
22700 fi
22701 rm -f conftest.$ac_objext conftest.$ac_ext
22702
22703         cat >conftest.$ac_ext <<_ACEOF
22704 #line $LINENO "configure"
22705 /* confdefs.h.  */
22706 _ACEOF
22707 cat confdefs.h >>conftest.$ac_ext
22708 cat >>conftest.$ac_ext <<_ACEOF
22709 /* end confdefs.h.  */
22710 #include <sys/types.h>
22711 #include <sys/socket.h>
22712 #include <netinet/in.h>
22713 #include <netdb.h>
22714 #define BUFSIZE (sizeof(struct hostent)+10)
22715 int
22716 main ()
22717 {
22718 struct hostent hent;
22719                 struct hostent *rhent; char buffer[BUFSIZE];
22720                 struct in_addr add;
22721                 size_t alen=sizeof(struct in_addr);
22722                 int bufsize=BUFSIZE;int h_errno;
22723                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
22724                         alen, AF_INET, &hent, buffer, bufsize,
22725                         &rhent, &h_errno);
22726   ;
22727   return 0;
22728 }
22729 _ACEOF
22730 rm -f conftest.$ac_objext
22731 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22732   (eval $ac_compile) 2>&5
22733   ac_status=$?
22734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22735   (exit $ac_status); } &&
22736          { ac_try='test -s conftest.$ac_objext'
22737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22738   (eval $ac_try) 2>&5
22739   ac_status=$?
22740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22741   (exit $ac_status); }; }; then
22742   ol_cv_func_gethostbyaddr_r_nargs8=yes
22743 else
22744   echo "$as_me: failed program was:" >&5
22745 sed 's/^/| /' conftest.$ac_ext >&5
22746
22747 ol_cv_func_gethostbyaddr_r_nargs8=no
22748 fi
22749 rm -f conftest.$ac_objext conftest.$ac_ext
22750
22751         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
22752                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
22753
22754                 ol_cv_func_gethostbyaddr_r_nargs=7
22755
22756         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
22757                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
22758
22759                 ol_cv_func_gethostbyaddr_r_nargs=8
22760
22761         else
22762                 ol_cv_func_gethostbyaddr_r_nargs=0
22763         fi
22764
22765 fi
22766 echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
22767 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
22768   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
22769
22770 cat >>confdefs.h <<_ACEOF
22771 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
22772 _ACEOF
22773
22774   fi
22775
22776 else
22777         ol_cv_func_gethostbyaddr_r_nargs=0
22778 fi
22779
22780 ol_link_ldbm=no
22781
22782 if test $ol_with_ldbm_api = auto \
22783         -o $ol_with_ldbm_api = berkeley \
22784         -o $ol_with_ldbm_api = bcompat ; then
22785
22786         if test $ol_with_ldbm_api = bcompat; then \
22787
22788
22789 for ac_header in db_185.h db.h
22790 do
22791 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22792 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22793   echo "$as_me:$LINENO: checking for $ac_header" >&5
22794 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22795 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22796   echo $ECHO_N "(cached) $ECHO_C" >&6
22797 fi
22798 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22799 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22800 else
22801   # Is the header compilable?
22802 echo "$as_me:$LINENO: checking $ac_header usability" >&5
22803 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
22804 cat >conftest.$ac_ext <<_ACEOF
22805 #line $LINENO "configure"
22806 /* confdefs.h.  */
22807 _ACEOF
22808 cat confdefs.h >>conftest.$ac_ext
22809 cat >>conftest.$ac_ext <<_ACEOF
22810 /* end confdefs.h.  */
22811 $ac_includes_default
22812 #include <$ac_header>
22813 _ACEOF
22814 rm -f conftest.$ac_objext
22815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22816   (eval $ac_compile) 2>&5
22817   ac_status=$?
22818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22819   (exit $ac_status); } &&
22820          { ac_try='test -s conftest.$ac_objext'
22821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22822   (eval $ac_try) 2>&5
22823   ac_status=$?
22824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22825   (exit $ac_status); }; }; then
22826   ac_header_compiler=yes
22827 else
22828   echo "$as_me: failed program was:" >&5
22829 sed 's/^/| /' conftest.$ac_ext >&5
22830
22831 ac_header_compiler=no
22832 fi
22833 rm -f conftest.$ac_objext conftest.$ac_ext
22834 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22835 echo "${ECHO_T}$ac_header_compiler" >&6
22836
22837 # Is the header present?
22838 echo "$as_me:$LINENO: checking $ac_header presence" >&5
22839 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
22840 cat >conftest.$ac_ext <<_ACEOF
22841 #line $LINENO "configure"
22842 /* confdefs.h.  */
22843 _ACEOF
22844 cat confdefs.h >>conftest.$ac_ext
22845 cat >>conftest.$ac_ext <<_ACEOF
22846 /* end confdefs.h.  */
22847 #include <$ac_header>
22848 _ACEOF
22849 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22851   ac_status=$?
22852   grep -v '^ *+' conftest.er1 >conftest.err
22853   rm -f conftest.er1
22854   cat conftest.err >&5
22855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22856   (exit $ac_status); } >/dev/null; then
22857   if test -s conftest.err; then
22858     ac_cpp_err=$ac_c_preproc_warn_flag
22859   else
22860     ac_cpp_err=
22861   fi
22862 else
22863   ac_cpp_err=yes
22864 fi
22865 if test -z "$ac_cpp_err"; then
22866   ac_header_preproc=yes
22867 else
22868   echo "$as_me: failed program was:" >&5
22869 sed 's/^/| /' conftest.$ac_ext >&5
22870
22871   ac_header_preproc=no
22872 fi
22873 rm -f conftest.err conftest.$ac_ext
22874 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22875 echo "${ECHO_T}$ac_header_preproc" >&6
22876
22877 # So?  What about this header?
22878 case $ac_header_compiler:$ac_header_preproc in
22879   yes:no )
22880     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22881 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
22882     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22883 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22884     (
22885       cat <<\_ASBOX
22886 ## ------------------------------------ ##
22887 ## Report this to bug-autoconf@gnu.org. ##
22888 ## ------------------------------------ ##
22889 _ASBOX
22890     ) |
22891       sed "s/^/$as_me: WARNING:     /" >&2
22892     ;;
22893   no:yes )
22894     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22895 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
22896     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22897 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22898     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22899 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
22900     (
22901       cat <<\_ASBOX
22902 ## ------------------------------------ ##
22903 ## Report this to bug-autoconf@gnu.org. ##
22904 ## ------------------------------------ ##
22905 _ASBOX
22906     ) |
22907       sed "s/^/$as_me: WARNING:     /" >&2
22908     ;;
22909 esac
22910 echo "$as_me:$LINENO: checking for $ac_header" >&5
22911 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22912 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22913   echo $ECHO_N "(cached) $ECHO_C" >&6
22914 else
22915   eval "$as_ac_Header=$ac_header_preproc"
22916 fi
22917 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
22918 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22919
22920 fi
22921 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22922   cat >>confdefs.h <<_ACEOF
22923 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22924 _ACEOF
22925
22926 fi
22927
22928 done
22929
22930 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
22931         echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
22932 echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
22933 if test "${ol_cv_header_db1+set}" = set; then
22934   echo $ECHO_N "(cached) $ECHO_C" >&6
22935 else
22936
22937                 cat >conftest.$ac_ext <<_ACEOF
22938 #line $LINENO "configure"
22939 /* confdefs.h.  */
22940 _ACEOF
22941 cat confdefs.h >>conftest.$ac_ext
22942 cat >>conftest.$ac_ext <<_ACEOF
22943 /* end confdefs.h.  */
22944
22945 #if HAVE_DB_185_H
22946 #       include <db_185.h>
22947 #else
22948 #       include <db.h>
22949 #endif
22950
22951  /* this check could be improved */
22952 #ifndef DB_VERSION_MAJOR
22953 #       define DB_VERSION_MAJOR 1
22954 #endif
22955
22956 #if DB_VERSION_MAJOR == 1
22957         __db_version_1
22958 #endif
22959
22960 _ACEOF
22961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22962   $EGREP "__db_version_1" >/dev/null 2>&1; then
22963   ol_cv_header_db1=yes
22964 else
22965   ol_cv_header_db1=no
22966 fi
22967 rm -f conftest*
22968
22969 fi
22970 echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
22971 echo "${ECHO_T}$ol_cv_header_db1" >&6
22972
22973         if test $ol_cv_header_db1 = yes ; then
22974                 ol_cv_lib_db=no
22975 if test $ol_cv_lib_db = no ; then
22976         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
22977 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
22978 if test "${ol_cv_db_none+set}" = set; then
22979   echo $ECHO_N "(cached) $ECHO_C" >&6
22980 else
22981
22982         ol_DB_LIB=
22983         ol_LIBS=$LIBS
22984         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
22985
22986         cat >conftest.$ac_ext <<_ACEOF
22987 #line $LINENO "configure"
22988 /* confdefs.h.  */
22989 _ACEOF
22990 cat confdefs.h >>conftest.$ac_ext
22991 cat >>conftest.$ac_ext <<_ACEOF
22992 /* end confdefs.h.  */
22993
22994 #ifdef HAVE_DB_185_H
22995 # include <db_185.h>
22996 #else
22997 # include <db.h>
22998 #endif
22999
23000 #ifndef DB_VERSION_MAJOR
23001 # define DB_VERSION_MAJOR 1
23002 #endif
23003
23004 #ifndef NULL
23005 #define NULL ((void*)0)
23006 #endif
23007
23008 int
23009 main ()
23010 {
23011
23012 #if DB_VERSION_MAJOR > 1
23013         {
23014                 char *version;
23015                 int major, minor, patch;
23016
23017                 version = db_version( &major, &minor, &patch );
23018
23019                 if( major != DB_VERSION_MAJOR ||
23020                         minor < DB_VERSION_MINOR )
23021                 {
23022                         printf("Berkeley DB version mismatch\n"
23023                                 "\texpected: %s\n\tgot: %s\n",
23024                                 DB_VERSION_STRING, version);
23025                         return 1;
23026                 }
23027         }
23028 #endif
23029
23030 #if DB_VERSION_MAJOR > 2
23031         db_env_create( NULL, 0 );
23032 #elif DB_VERSION_MAJOR > 1
23033         db_appexit( NULL );
23034 #else
23035         (void) dbopen( NULL, 0, 0, 0, NULL);
23036 #endif
23037
23038   ;
23039   return 0;
23040 }
23041 _ACEOF
23042 rm -f conftest.$ac_objext conftest$ac_exeext
23043 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23044   (eval $ac_link) 2>&5
23045   ac_status=$?
23046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23047   (exit $ac_status); } &&
23048          { ac_try='test -s conftest$ac_exeext'
23049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23050   (eval $ac_try) 2>&5
23051   ac_status=$?
23052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23053   (exit $ac_status); }; }; then
23054   ol_cv_db_none=yes
23055 else
23056   echo "$as_me: failed program was:" >&5
23057 sed 's/^/| /' conftest.$ac_ext >&5
23058
23059 ol_cv_db_none=no
23060 fi
23061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23062
23063         LIBS="$ol_LIBS"
23064
23065 fi
23066 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
23067 echo "${ECHO_T}$ol_cv_db_none" >&6
23068
23069         if test $ol_cv_db_none = yes ; then
23070                 ol_cv_lib_db=yes
23071         fi
23072 fi
23073
23074 if test $ol_cv_lib_db = no ; then
23075         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
23076 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
23077 if test "${ol_cv_db_db41+set}" = set; then
23078   echo $ECHO_N "(cached) $ECHO_C" >&6
23079 else
23080
23081         ol_DB_LIB=-ldb41
23082         ol_LIBS=$LIBS
23083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23084
23085         cat >conftest.$ac_ext <<_ACEOF
23086 #line $LINENO "configure"
23087 /* confdefs.h.  */
23088 _ACEOF
23089 cat confdefs.h >>conftest.$ac_ext
23090 cat >>conftest.$ac_ext <<_ACEOF
23091 /* end confdefs.h.  */
23092
23093 #ifdef HAVE_DB_185_H
23094 # include <db_185.h>
23095 #else
23096 # include <db.h>
23097 #endif
23098
23099 #ifndef DB_VERSION_MAJOR
23100 # define DB_VERSION_MAJOR 1
23101 #endif
23102
23103 #ifndef NULL
23104 #define NULL ((void*)0)
23105 #endif
23106
23107 int
23108 main ()
23109 {
23110
23111 #if DB_VERSION_MAJOR > 1
23112         {
23113                 char *version;
23114                 int major, minor, patch;
23115
23116                 version = db_version( &major, &minor, &patch );
23117
23118                 if( major != DB_VERSION_MAJOR ||
23119                         minor < DB_VERSION_MINOR )
23120                 {
23121                         printf("Berkeley DB version mismatch\n"
23122                                 "\texpected: %s\n\tgot: %s\n",
23123                                 DB_VERSION_STRING, version);
23124                         return 1;
23125                 }
23126         }
23127 #endif
23128
23129 #if DB_VERSION_MAJOR > 2
23130         db_env_create( NULL, 0 );
23131 #elif DB_VERSION_MAJOR > 1
23132         db_appexit( NULL );
23133 #else
23134         (void) dbopen( NULL, 0, 0, 0, NULL);
23135 #endif
23136
23137   ;
23138   return 0;
23139 }
23140 _ACEOF
23141 rm -f conftest.$ac_objext conftest$ac_exeext
23142 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23143   (eval $ac_link) 2>&5
23144   ac_status=$?
23145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23146   (exit $ac_status); } &&
23147          { ac_try='test -s conftest$ac_exeext'
23148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23149   (eval $ac_try) 2>&5
23150   ac_status=$?
23151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23152   (exit $ac_status); }; }; then
23153   ol_cv_db_db41=yes
23154 else
23155   echo "$as_me: failed program was:" >&5
23156 sed 's/^/| /' conftest.$ac_ext >&5
23157
23158 ol_cv_db_db41=no
23159 fi
23160 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23161
23162         LIBS="$ol_LIBS"
23163
23164 fi
23165 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
23166 echo "${ECHO_T}$ol_cv_db_db41" >&6
23167
23168         if test $ol_cv_db_db41 = yes ; then
23169                 ol_cv_lib_db=-ldb41
23170         fi
23171 fi
23172
23173 if test $ol_cv_lib_db = no ; then
23174         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
23175 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
23176 if test "${ol_cv_db_db_41+set}" = set; then
23177   echo $ECHO_N "(cached) $ECHO_C" >&6
23178 else
23179
23180         ol_DB_LIB=-ldb-41
23181         ol_LIBS=$LIBS
23182         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23183
23184         cat >conftest.$ac_ext <<_ACEOF
23185 #line $LINENO "configure"
23186 /* confdefs.h.  */
23187 _ACEOF
23188 cat confdefs.h >>conftest.$ac_ext
23189 cat >>conftest.$ac_ext <<_ACEOF
23190 /* end confdefs.h.  */
23191
23192 #ifdef HAVE_DB_185_H
23193 # include <db_185.h>
23194 #else
23195 # include <db.h>
23196 #endif
23197
23198 #ifndef DB_VERSION_MAJOR
23199 # define DB_VERSION_MAJOR 1
23200 #endif
23201
23202 #ifndef NULL
23203 #define NULL ((void*)0)
23204 #endif
23205
23206 int
23207 main ()
23208 {
23209
23210 #if DB_VERSION_MAJOR > 1
23211         {
23212                 char *version;
23213                 int major, minor, patch;
23214
23215                 version = db_version( &major, &minor, &patch );
23216
23217                 if( major != DB_VERSION_MAJOR ||
23218                         minor < DB_VERSION_MINOR )
23219                 {
23220                         printf("Berkeley DB version mismatch\n"
23221                                 "\texpected: %s\n\tgot: %s\n",
23222                                 DB_VERSION_STRING, version);
23223                         return 1;
23224                 }
23225         }
23226 #endif
23227
23228 #if DB_VERSION_MAJOR > 2
23229         db_env_create( NULL, 0 );
23230 #elif DB_VERSION_MAJOR > 1
23231         db_appexit( NULL );
23232 #else
23233         (void) dbopen( NULL, 0, 0, 0, NULL);
23234 #endif
23235
23236   ;
23237   return 0;
23238 }
23239 _ACEOF
23240 rm -f conftest.$ac_objext conftest$ac_exeext
23241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23242   (eval $ac_link) 2>&5
23243   ac_status=$?
23244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23245   (exit $ac_status); } &&
23246          { ac_try='test -s conftest$ac_exeext'
23247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23248   (eval $ac_try) 2>&5
23249   ac_status=$?
23250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23251   (exit $ac_status); }; }; then
23252   ol_cv_db_db_41=yes
23253 else
23254   echo "$as_me: failed program was:" >&5
23255 sed 's/^/| /' conftest.$ac_ext >&5
23256
23257 ol_cv_db_db_41=no
23258 fi
23259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23260
23261         LIBS="$ol_LIBS"
23262
23263 fi
23264 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
23265 echo "${ECHO_T}$ol_cv_db_db_41" >&6
23266
23267         if test $ol_cv_db_db_41 = yes ; then
23268                 ol_cv_lib_db=-ldb-41
23269         fi
23270 fi
23271
23272 if test $ol_cv_lib_db = no ; then
23273         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
23274 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
23275 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
23276   echo $ECHO_N "(cached) $ECHO_C" >&6
23277 else
23278
23279         ol_DB_LIB=-ldb-4.1
23280         ol_LIBS=$LIBS
23281         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23282
23283         cat >conftest.$ac_ext <<_ACEOF
23284 #line $LINENO "configure"
23285 /* confdefs.h.  */
23286 _ACEOF
23287 cat confdefs.h >>conftest.$ac_ext
23288 cat >>conftest.$ac_ext <<_ACEOF
23289 /* end confdefs.h.  */
23290
23291 #ifdef HAVE_DB_185_H
23292 # include <db_185.h>
23293 #else
23294 # include <db.h>
23295 #endif
23296
23297 #ifndef DB_VERSION_MAJOR
23298 # define DB_VERSION_MAJOR 1
23299 #endif
23300
23301 #ifndef NULL
23302 #define NULL ((void*)0)
23303 #endif
23304
23305 int
23306 main ()
23307 {
23308
23309 #if DB_VERSION_MAJOR > 1
23310         {
23311                 char *version;
23312                 int major, minor, patch;
23313
23314                 version = db_version( &major, &minor, &patch );
23315
23316                 if( major != DB_VERSION_MAJOR ||
23317                         minor < DB_VERSION_MINOR )
23318                 {
23319                         printf("Berkeley DB version mismatch\n"
23320                                 "\texpected: %s\n\tgot: %s\n",
23321                                 DB_VERSION_STRING, version);
23322                         return 1;
23323                 }
23324         }
23325 #endif
23326
23327 #if DB_VERSION_MAJOR > 2
23328         db_env_create( NULL, 0 );
23329 #elif DB_VERSION_MAJOR > 1
23330         db_appexit( NULL );
23331 #else
23332         (void) dbopen( NULL, 0, 0, 0, NULL);
23333 #endif
23334
23335   ;
23336   return 0;
23337 }
23338 _ACEOF
23339 rm -f conftest.$ac_objext conftest$ac_exeext
23340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23341   (eval $ac_link) 2>&5
23342   ac_status=$?
23343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23344   (exit $ac_status); } &&
23345          { ac_try='test -s conftest$ac_exeext'
23346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23347   (eval $ac_try) 2>&5
23348   ac_status=$?
23349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23350   (exit $ac_status); }; }; then
23351   ol_cv_db_db_4_dot_1=yes
23352 else
23353   echo "$as_me: failed program was:" >&5
23354 sed 's/^/| /' conftest.$ac_ext >&5
23355
23356 ol_cv_db_db_4_dot_1=no
23357 fi
23358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23359
23360         LIBS="$ol_LIBS"
23361
23362 fi
23363 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
23364 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
23365
23366         if test $ol_cv_db_db_4_dot_1 = yes ; then
23367                 ol_cv_lib_db=-ldb-4.1
23368         fi
23369 fi
23370
23371 if test $ol_cv_lib_db = no ; then
23372         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
23373 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
23374 if test "${ol_cv_db_db_4_1+set}" = set; then
23375   echo $ECHO_N "(cached) $ECHO_C" >&6
23376 else
23377
23378         ol_DB_LIB=-ldb-4-1
23379         ol_LIBS=$LIBS
23380         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23381
23382         cat >conftest.$ac_ext <<_ACEOF
23383 #line $LINENO "configure"
23384 /* confdefs.h.  */
23385 _ACEOF
23386 cat confdefs.h >>conftest.$ac_ext
23387 cat >>conftest.$ac_ext <<_ACEOF
23388 /* end confdefs.h.  */
23389
23390 #ifdef HAVE_DB_185_H
23391 # include <db_185.h>
23392 #else
23393 # include <db.h>
23394 #endif
23395
23396 #ifndef DB_VERSION_MAJOR
23397 # define DB_VERSION_MAJOR 1
23398 #endif
23399
23400 #ifndef NULL
23401 #define NULL ((void*)0)
23402 #endif
23403
23404 int
23405 main ()
23406 {
23407
23408 #if DB_VERSION_MAJOR > 1
23409         {
23410                 char *version;
23411                 int major, minor, patch;
23412
23413                 version = db_version( &major, &minor, &patch );
23414
23415                 if( major != DB_VERSION_MAJOR ||
23416                         minor < DB_VERSION_MINOR )
23417                 {
23418                         printf("Berkeley DB version mismatch\n"
23419                                 "\texpected: %s\n\tgot: %s\n",
23420                                 DB_VERSION_STRING, version);
23421                         return 1;
23422                 }
23423         }
23424 #endif
23425
23426 #if DB_VERSION_MAJOR > 2
23427         db_env_create( NULL, 0 );
23428 #elif DB_VERSION_MAJOR > 1
23429         db_appexit( NULL );
23430 #else
23431         (void) dbopen( NULL, 0, 0, 0, NULL);
23432 #endif
23433
23434   ;
23435   return 0;
23436 }
23437 _ACEOF
23438 rm -f conftest.$ac_objext conftest$ac_exeext
23439 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23440   (eval $ac_link) 2>&5
23441   ac_status=$?
23442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23443   (exit $ac_status); } &&
23444          { ac_try='test -s conftest$ac_exeext'
23445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23446   (eval $ac_try) 2>&5
23447   ac_status=$?
23448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23449   (exit $ac_status); }; }; then
23450   ol_cv_db_db_4_1=yes
23451 else
23452   echo "$as_me: failed program was:" >&5
23453 sed 's/^/| /' conftest.$ac_ext >&5
23454
23455 ol_cv_db_db_4_1=no
23456 fi
23457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23458
23459         LIBS="$ol_LIBS"
23460
23461 fi
23462 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
23463 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
23464
23465         if test $ol_cv_db_db_4_1 = yes ; then
23466                 ol_cv_lib_db=-ldb-4-1
23467         fi
23468 fi
23469
23470 if test $ol_cv_lib_db = no ; then
23471         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
23472 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
23473 if test "${ol_cv_db_db_4+set}" = set; then
23474   echo $ECHO_N "(cached) $ECHO_C" >&6
23475 else
23476
23477         ol_DB_LIB=-ldb-4
23478         ol_LIBS=$LIBS
23479         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23480
23481         cat >conftest.$ac_ext <<_ACEOF
23482 #line $LINENO "configure"
23483 /* confdefs.h.  */
23484 _ACEOF
23485 cat confdefs.h >>conftest.$ac_ext
23486 cat >>conftest.$ac_ext <<_ACEOF
23487 /* end confdefs.h.  */
23488
23489 #ifdef HAVE_DB_185_H
23490 # include <db_185.h>
23491 #else
23492 # include <db.h>
23493 #endif
23494
23495 #ifndef DB_VERSION_MAJOR
23496 # define DB_VERSION_MAJOR 1
23497 #endif
23498
23499 #ifndef NULL
23500 #define NULL ((void*)0)
23501 #endif
23502
23503 int
23504 main ()
23505 {
23506
23507 #if DB_VERSION_MAJOR > 1
23508         {
23509                 char *version;
23510                 int major, minor, patch;
23511
23512                 version = db_version( &major, &minor, &patch );
23513
23514                 if( major != DB_VERSION_MAJOR ||
23515                         minor < DB_VERSION_MINOR )
23516                 {
23517                         printf("Berkeley DB version mismatch\n"
23518                                 "\texpected: %s\n\tgot: %s\n",
23519                                 DB_VERSION_STRING, version);
23520                         return 1;
23521                 }
23522         }
23523 #endif
23524
23525 #if DB_VERSION_MAJOR > 2
23526         db_env_create( NULL, 0 );
23527 #elif DB_VERSION_MAJOR > 1
23528         db_appexit( NULL );
23529 #else
23530         (void) dbopen( NULL, 0, 0, 0, NULL);
23531 #endif
23532
23533   ;
23534   return 0;
23535 }
23536 _ACEOF
23537 rm -f conftest.$ac_objext conftest$ac_exeext
23538 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23539   (eval $ac_link) 2>&5
23540   ac_status=$?
23541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23542   (exit $ac_status); } &&
23543          { ac_try='test -s conftest$ac_exeext'
23544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23545   (eval $ac_try) 2>&5
23546   ac_status=$?
23547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23548   (exit $ac_status); }; }; then
23549   ol_cv_db_db_4=yes
23550 else
23551   echo "$as_me: failed program was:" >&5
23552 sed 's/^/| /' conftest.$ac_ext >&5
23553
23554 ol_cv_db_db_4=no
23555 fi
23556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23557
23558         LIBS="$ol_LIBS"
23559
23560 fi
23561 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
23562 echo "${ECHO_T}$ol_cv_db_db_4" >&6
23563
23564         if test $ol_cv_db_db_4 = yes ; then
23565                 ol_cv_lib_db=-ldb-4
23566         fi
23567 fi
23568
23569 if test $ol_cv_lib_db = no ; then
23570         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
23571 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
23572 if test "${ol_cv_db_db4+set}" = set; then
23573   echo $ECHO_N "(cached) $ECHO_C" >&6
23574 else
23575
23576         ol_DB_LIB=-ldb4
23577         ol_LIBS=$LIBS
23578         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23579
23580         cat >conftest.$ac_ext <<_ACEOF
23581 #line $LINENO "configure"
23582 /* confdefs.h.  */
23583 _ACEOF
23584 cat confdefs.h >>conftest.$ac_ext
23585 cat >>conftest.$ac_ext <<_ACEOF
23586 /* end confdefs.h.  */
23587
23588 #ifdef HAVE_DB_185_H
23589 # include <db_185.h>
23590 #else
23591 # include <db.h>
23592 #endif
23593
23594 #ifndef DB_VERSION_MAJOR
23595 # define DB_VERSION_MAJOR 1
23596 #endif
23597
23598 #ifndef NULL
23599 #define NULL ((void*)0)
23600 #endif
23601
23602 int
23603 main ()
23604 {
23605
23606 #if DB_VERSION_MAJOR > 1
23607         {
23608                 char *version;
23609                 int major, minor, patch;
23610
23611                 version = db_version( &major, &minor, &patch );
23612
23613                 if( major != DB_VERSION_MAJOR ||
23614                         minor < DB_VERSION_MINOR )
23615                 {
23616                         printf("Berkeley DB version mismatch\n"
23617                                 "\texpected: %s\n\tgot: %s\n",
23618                                 DB_VERSION_STRING, version);
23619                         return 1;
23620                 }
23621         }
23622 #endif
23623
23624 #if DB_VERSION_MAJOR > 2
23625         db_env_create( NULL, 0 );
23626 #elif DB_VERSION_MAJOR > 1
23627         db_appexit( NULL );
23628 #else
23629         (void) dbopen( NULL, 0, 0, 0, NULL);
23630 #endif
23631
23632   ;
23633   return 0;
23634 }
23635 _ACEOF
23636 rm -f conftest.$ac_objext conftest$ac_exeext
23637 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23638   (eval $ac_link) 2>&5
23639   ac_status=$?
23640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23641   (exit $ac_status); } &&
23642          { ac_try='test -s conftest$ac_exeext'
23643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23644   (eval $ac_try) 2>&5
23645   ac_status=$?
23646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23647   (exit $ac_status); }; }; then
23648   ol_cv_db_db4=yes
23649 else
23650   echo "$as_me: failed program was:" >&5
23651 sed 's/^/| /' conftest.$ac_ext >&5
23652
23653 ol_cv_db_db4=no
23654 fi
23655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23656
23657         LIBS="$ol_LIBS"
23658
23659 fi
23660 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
23661 echo "${ECHO_T}$ol_cv_db_db4" >&6
23662
23663         if test $ol_cv_db_db4 = yes ; then
23664                 ol_cv_lib_db=-ldb4
23665         fi
23666 fi
23667
23668 if test $ol_cv_lib_db = no ; then
23669         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
23670 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
23671 if test "${ol_cv_db_db+set}" = set; then
23672   echo $ECHO_N "(cached) $ECHO_C" >&6
23673 else
23674
23675         ol_DB_LIB=-ldb
23676         ol_LIBS=$LIBS
23677         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23678
23679         cat >conftest.$ac_ext <<_ACEOF
23680 #line $LINENO "configure"
23681 /* confdefs.h.  */
23682 _ACEOF
23683 cat confdefs.h >>conftest.$ac_ext
23684 cat >>conftest.$ac_ext <<_ACEOF
23685 /* end confdefs.h.  */
23686
23687 #ifdef HAVE_DB_185_H
23688 # include <db_185.h>
23689 #else
23690 # include <db.h>
23691 #endif
23692
23693 #ifndef DB_VERSION_MAJOR
23694 # define DB_VERSION_MAJOR 1
23695 #endif
23696
23697 #ifndef NULL
23698 #define NULL ((void*)0)
23699 #endif
23700
23701 int
23702 main ()
23703 {
23704
23705 #if DB_VERSION_MAJOR > 1
23706         {
23707                 char *version;
23708                 int major, minor, patch;
23709
23710                 version = db_version( &major, &minor, &patch );
23711
23712                 if( major != DB_VERSION_MAJOR ||
23713                         minor < DB_VERSION_MINOR )
23714                 {
23715                         printf("Berkeley DB version mismatch\n"
23716                                 "\texpected: %s\n\tgot: %s\n",
23717                                 DB_VERSION_STRING, version);
23718                         return 1;
23719                 }
23720         }
23721 #endif
23722
23723 #if DB_VERSION_MAJOR > 2
23724         db_env_create( NULL, 0 );
23725 #elif DB_VERSION_MAJOR > 1
23726         db_appexit( NULL );
23727 #else
23728         (void) dbopen( NULL, 0, 0, 0, NULL);
23729 #endif
23730
23731   ;
23732   return 0;
23733 }
23734 _ACEOF
23735 rm -f conftest.$ac_objext conftest$ac_exeext
23736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23737   (eval $ac_link) 2>&5
23738   ac_status=$?
23739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23740   (exit $ac_status); } &&
23741          { ac_try='test -s conftest$ac_exeext'
23742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23743   (eval $ac_try) 2>&5
23744   ac_status=$?
23745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23746   (exit $ac_status); }; }; then
23747   ol_cv_db_db=yes
23748 else
23749   echo "$as_me: failed program was:" >&5
23750 sed 's/^/| /' conftest.$ac_ext >&5
23751
23752 ol_cv_db_db=no
23753 fi
23754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23755
23756         LIBS="$ol_LIBS"
23757
23758 fi
23759 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
23760 echo "${ECHO_T}$ol_cv_db_db" >&6
23761
23762         if test $ol_cv_db_db = yes ; then
23763                 ol_cv_lib_db=-ldb
23764         fi
23765 fi
23766
23767 if test $ol_cv_lib_db = no ; then
23768         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
23769 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
23770 if test "${ol_cv_db_db3+set}" = set; then
23771   echo $ECHO_N "(cached) $ECHO_C" >&6
23772 else
23773
23774         ol_DB_LIB=-ldb3
23775         ol_LIBS=$LIBS
23776         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23777
23778         cat >conftest.$ac_ext <<_ACEOF
23779 #line $LINENO "configure"
23780 /* confdefs.h.  */
23781 _ACEOF
23782 cat confdefs.h >>conftest.$ac_ext
23783 cat >>conftest.$ac_ext <<_ACEOF
23784 /* end confdefs.h.  */
23785
23786 #ifdef HAVE_DB_185_H
23787 # include <db_185.h>
23788 #else
23789 # include <db.h>
23790 #endif
23791
23792 #ifndef DB_VERSION_MAJOR
23793 # define DB_VERSION_MAJOR 1
23794 #endif
23795
23796 #ifndef NULL
23797 #define NULL ((void*)0)
23798 #endif
23799
23800 int
23801 main ()
23802 {
23803
23804 #if DB_VERSION_MAJOR > 1
23805         {
23806                 char *version;
23807                 int major, minor, patch;
23808
23809                 version = db_version( &major, &minor, &patch );
23810
23811                 if( major != DB_VERSION_MAJOR ||
23812                         minor < DB_VERSION_MINOR )
23813                 {
23814                         printf("Berkeley DB version mismatch\n"
23815                                 "\texpected: %s\n\tgot: %s\n",
23816                                 DB_VERSION_STRING, version);
23817                         return 1;
23818                 }
23819         }
23820 #endif
23821
23822 #if DB_VERSION_MAJOR > 2
23823         db_env_create( NULL, 0 );
23824 #elif DB_VERSION_MAJOR > 1
23825         db_appexit( NULL );
23826 #else
23827         (void) dbopen( NULL, 0, 0, 0, NULL);
23828 #endif
23829
23830   ;
23831   return 0;
23832 }
23833 _ACEOF
23834 rm -f conftest.$ac_objext conftest$ac_exeext
23835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23836   (eval $ac_link) 2>&5
23837   ac_status=$?
23838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23839   (exit $ac_status); } &&
23840          { ac_try='test -s conftest$ac_exeext'
23841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23842   (eval $ac_try) 2>&5
23843   ac_status=$?
23844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23845   (exit $ac_status); }; }; then
23846   ol_cv_db_db3=yes
23847 else
23848   echo "$as_me: failed program was:" >&5
23849 sed 's/^/| /' conftest.$ac_ext >&5
23850
23851 ol_cv_db_db3=no
23852 fi
23853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23854
23855         LIBS="$ol_LIBS"
23856
23857 fi
23858 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
23859 echo "${ECHO_T}$ol_cv_db_db3" >&6
23860
23861         if test $ol_cv_db_db3 = yes ; then
23862                 ol_cv_lib_db=-ldb3
23863         fi
23864 fi
23865
23866 if test $ol_cv_lib_db = no ; then
23867         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
23868 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
23869 if test "${ol_cv_db_db_3+set}" = set; then
23870   echo $ECHO_N "(cached) $ECHO_C" >&6
23871 else
23872
23873         ol_DB_LIB=-ldb-3
23874         ol_LIBS=$LIBS
23875         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23876
23877         cat >conftest.$ac_ext <<_ACEOF
23878 #line $LINENO "configure"
23879 /* confdefs.h.  */
23880 _ACEOF
23881 cat confdefs.h >>conftest.$ac_ext
23882 cat >>conftest.$ac_ext <<_ACEOF
23883 /* end confdefs.h.  */
23884
23885 #ifdef HAVE_DB_185_H
23886 # include <db_185.h>
23887 #else
23888 # include <db.h>
23889 #endif
23890
23891 #ifndef DB_VERSION_MAJOR
23892 # define DB_VERSION_MAJOR 1
23893 #endif
23894
23895 #ifndef NULL
23896 #define NULL ((void*)0)
23897 #endif
23898
23899 int
23900 main ()
23901 {
23902
23903 #if DB_VERSION_MAJOR > 1
23904         {
23905                 char *version;
23906                 int major, minor, patch;
23907
23908                 version = db_version( &major, &minor, &patch );
23909
23910                 if( major != DB_VERSION_MAJOR ||
23911                         minor < DB_VERSION_MINOR )
23912                 {
23913                         printf("Berkeley DB version mismatch\n"
23914                                 "\texpected: %s\n\tgot: %s\n",
23915                                 DB_VERSION_STRING, version);
23916                         return 1;
23917                 }
23918         }
23919 #endif
23920
23921 #if DB_VERSION_MAJOR > 2
23922         db_env_create( NULL, 0 );
23923 #elif DB_VERSION_MAJOR > 1
23924         db_appexit( NULL );
23925 #else
23926         (void) dbopen( NULL, 0, 0, 0, NULL);
23927 #endif
23928
23929   ;
23930   return 0;
23931 }
23932 _ACEOF
23933 rm -f conftest.$ac_objext conftest$ac_exeext
23934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23935   (eval $ac_link) 2>&5
23936   ac_status=$?
23937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23938   (exit $ac_status); } &&
23939          { ac_try='test -s conftest$ac_exeext'
23940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23941   (eval $ac_try) 2>&5
23942   ac_status=$?
23943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23944   (exit $ac_status); }; }; then
23945   ol_cv_db_db_3=yes
23946 else
23947   echo "$as_me: failed program was:" >&5
23948 sed 's/^/| /' conftest.$ac_ext >&5
23949
23950 ol_cv_db_db_3=no
23951 fi
23952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23953
23954         LIBS="$ol_LIBS"
23955
23956 fi
23957 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
23958 echo "${ECHO_T}$ol_cv_db_db_3" >&6
23959
23960         if test $ol_cv_db_db_3 = yes ; then
23961                 ol_cv_lib_db=-ldb-3
23962         fi
23963 fi
23964
23965 if test $ol_cv_lib_db = no ; then
23966         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
23967 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
23968 if test "${ol_cv_db_db2+set}" = set; then
23969   echo $ECHO_N "(cached) $ECHO_C" >&6
23970 else
23971
23972         ol_DB_LIB=-ldb2
23973         ol_LIBS=$LIBS
23974         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
23975
23976         cat >conftest.$ac_ext <<_ACEOF
23977 #line $LINENO "configure"
23978 /* confdefs.h.  */
23979 _ACEOF
23980 cat confdefs.h >>conftest.$ac_ext
23981 cat >>conftest.$ac_ext <<_ACEOF
23982 /* end confdefs.h.  */
23983
23984 #ifdef HAVE_DB_185_H
23985 # include <db_185.h>
23986 #else
23987 # include <db.h>
23988 #endif
23989
23990 #ifndef DB_VERSION_MAJOR
23991 # define DB_VERSION_MAJOR 1
23992 #endif
23993
23994 #ifndef NULL
23995 #define NULL ((void*)0)
23996 #endif
23997
23998 int
23999 main ()
24000 {
24001
24002 #if DB_VERSION_MAJOR > 1
24003         {
24004                 char *version;
24005                 int major, minor, patch;
24006
24007                 version = db_version( &major, &minor, &patch );
24008
24009                 if( major != DB_VERSION_MAJOR ||
24010                         minor < DB_VERSION_MINOR )
24011                 {
24012                         printf("Berkeley DB version mismatch\n"
24013                                 "\texpected: %s\n\tgot: %s\n",
24014                                 DB_VERSION_STRING, version);
24015                         return 1;
24016                 }
24017         }
24018 #endif
24019
24020 #if DB_VERSION_MAJOR > 2
24021         db_env_create( NULL, 0 );
24022 #elif DB_VERSION_MAJOR > 1
24023         db_appexit( NULL );
24024 #else
24025         (void) dbopen( NULL, 0, 0, 0, NULL);
24026 #endif
24027
24028   ;
24029   return 0;
24030 }
24031 _ACEOF
24032 rm -f conftest.$ac_objext conftest$ac_exeext
24033 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24034   (eval $ac_link) 2>&5
24035   ac_status=$?
24036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24037   (exit $ac_status); } &&
24038          { ac_try='test -s conftest$ac_exeext'
24039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24040   (eval $ac_try) 2>&5
24041   ac_status=$?
24042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24043   (exit $ac_status); }; }; then
24044   ol_cv_db_db2=yes
24045 else
24046   echo "$as_me: failed program was:" >&5
24047 sed 's/^/| /' conftest.$ac_ext >&5
24048
24049 ol_cv_db_db2=no
24050 fi
24051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24052
24053         LIBS="$ol_LIBS"
24054
24055 fi
24056 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
24057 echo "${ECHO_T}$ol_cv_db_db2" >&6
24058
24059         if test $ol_cv_db_db2 = yes ; then
24060                 ol_cv_lib_db=-ldb2
24061         fi
24062 fi
24063
24064 if test $ol_cv_lib_db = no ; then
24065         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
24066 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
24067 if test "${ol_cv_db_db_2+set}" = set; then
24068   echo $ECHO_N "(cached) $ECHO_C" >&6
24069 else
24070
24071         ol_DB_LIB=-ldb-2
24072         ol_LIBS=$LIBS
24073         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24074
24075         cat >conftest.$ac_ext <<_ACEOF
24076 #line $LINENO "configure"
24077 /* confdefs.h.  */
24078 _ACEOF
24079 cat confdefs.h >>conftest.$ac_ext
24080 cat >>conftest.$ac_ext <<_ACEOF
24081 /* end confdefs.h.  */
24082
24083 #ifdef HAVE_DB_185_H
24084 # include <db_185.h>
24085 #else
24086 # include <db.h>
24087 #endif
24088
24089 #ifndef DB_VERSION_MAJOR
24090 # define DB_VERSION_MAJOR 1
24091 #endif
24092
24093 #ifndef NULL
24094 #define NULL ((void*)0)
24095 #endif
24096
24097 int
24098 main ()
24099 {
24100
24101 #if DB_VERSION_MAJOR > 1
24102         {
24103                 char *version;
24104                 int major, minor, patch;
24105
24106                 version = db_version( &major, &minor, &patch );
24107
24108                 if( major != DB_VERSION_MAJOR ||
24109                         minor < DB_VERSION_MINOR )
24110                 {
24111                         printf("Berkeley DB version mismatch\n"
24112                                 "\texpected: %s\n\tgot: %s\n",
24113                                 DB_VERSION_STRING, version);
24114                         return 1;
24115                 }
24116         }
24117 #endif
24118
24119 #if DB_VERSION_MAJOR > 2
24120         db_env_create( NULL, 0 );
24121 #elif DB_VERSION_MAJOR > 1
24122         db_appexit( NULL );
24123 #else
24124         (void) dbopen( NULL, 0, 0, 0, NULL);
24125 #endif
24126
24127   ;
24128   return 0;
24129 }
24130 _ACEOF
24131 rm -f conftest.$ac_objext conftest$ac_exeext
24132 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24133   (eval $ac_link) 2>&5
24134   ac_status=$?
24135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24136   (exit $ac_status); } &&
24137          { ac_try='test -s conftest$ac_exeext'
24138   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24139   (eval $ac_try) 2>&5
24140   ac_status=$?
24141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24142   (exit $ac_status); }; }; then
24143   ol_cv_db_db_2=yes
24144 else
24145   echo "$as_me: failed program was:" >&5
24146 sed 's/^/| /' conftest.$ac_ext >&5
24147
24148 ol_cv_db_db_2=no
24149 fi
24150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24151
24152         LIBS="$ol_LIBS"
24153
24154 fi
24155 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
24156 echo "${ECHO_T}$ol_cv_db_db_2" >&6
24157
24158         if test $ol_cv_db_db_2 = yes ; then
24159                 ol_cv_lib_db=-ldb-2
24160         fi
24161 fi
24162
24163 if test $ol_cv_lib_db = no ; then
24164         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
24165 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
24166 if test "${ol_cv_db_db1+set}" = set; then
24167   echo $ECHO_N "(cached) $ECHO_C" >&6
24168 else
24169
24170         ol_DB_LIB=-ldb1
24171         ol_LIBS=$LIBS
24172         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24173
24174         cat >conftest.$ac_ext <<_ACEOF
24175 #line $LINENO "configure"
24176 /* confdefs.h.  */
24177 _ACEOF
24178 cat confdefs.h >>conftest.$ac_ext
24179 cat >>conftest.$ac_ext <<_ACEOF
24180 /* end confdefs.h.  */
24181
24182 #ifdef HAVE_DB_185_H
24183 # include <db_185.h>
24184 #else
24185 # include <db.h>
24186 #endif
24187
24188 #ifndef DB_VERSION_MAJOR
24189 # define DB_VERSION_MAJOR 1
24190 #endif
24191
24192 #ifndef NULL
24193 #define NULL ((void*)0)
24194 #endif
24195
24196 int
24197 main ()
24198 {
24199
24200 #if DB_VERSION_MAJOR > 1
24201         {
24202                 char *version;
24203                 int major, minor, patch;
24204
24205                 version = db_version( &major, &minor, &patch );
24206
24207                 if( major != DB_VERSION_MAJOR ||
24208                         minor < DB_VERSION_MINOR )
24209                 {
24210                         printf("Berkeley DB version mismatch\n"
24211                                 "\texpected: %s\n\tgot: %s\n",
24212                                 DB_VERSION_STRING, version);
24213                         return 1;
24214                 }
24215         }
24216 #endif
24217
24218 #if DB_VERSION_MAJOR > 2
24219         db_env_create( NULL, 0 );
24220 #elif DB_VERSION_MAJOR > 1
24221         db_appexit( NULL );
24222 #else
24223         (void) dbopen( NULL, 0, 0, 0, NULL);
24224 #endif
24225
24226   ;
24227   return 0;
24228 }
24229 _ACEOF
24230 rm -f conftest.$ac_objext conftest$ac_exeext
24231 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24232   (eval $ac_link) 2>&5
24233   ac_status=$?
24234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24235   (exit $ac_status); } &&
24236          { ac_try='test -s conftest$ac_exeext'
24237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24238   (eval $ac_try) 2>&5
24239   ac_status=$?
24240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24241   (exit $ac_status); }; }; then
24242   ol_cv_db_db1=yes
24243 else
24244   echo "$as_me: failed program was:" >&5
24245 sed 's/^/| /' conftest.$ac_ext >&5
24246
24247 ol_cv_db_db1=no
24248 fi
24249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24250
24251         LIBS="$ol_LIBS"
24252
24253 fi
24254 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
24255 echo "${ECHO_T}$ol_cv_db_db1" >&6
24256
24257         if test $ol_cv_db_db1 = yes ; then
24258                 ol_cv_lib_db=-ldb1
24259         fi
24260 fi
24261
24262 if test $ol_cv_lib_db = no ; then
24263         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
24264 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
24265 if test "${ol_cv_db_db_1+set}" = set; then
24266   echo $ECHO_N "(cached) $ECHO_C" >&6
24267 else
24268
24269         ol_DB_LIB=-ldb-1
24270         ol_LIBS=$LIBS
24271         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24272
24273         cat >conftest.$ac_ext <<_ACEOF
24274 #line $LINENO "configure"
24275 /* confdefs.h.  */
24276 _ACEOF
24277 cat confdefs.h >>conftest.$ac_ext
24278 cat >>conftest.$ac_ext <<_ACEOF
24279 /* end confdefs.h.  */
24280
24281 #ifdef HAVE_DB_185_H
24282 # include <db_185.h>
24283 #else
24284 # include <db.h>
24285 #endif
24286
24287 #ifndef DB_VERSION_MAJOR
24288 # define DB_VERSION_MAJOR 1
24289 #endif
24290
24291 #ifndef NULL
24292 #define NULL ((void*)0)
24293 #endif
24294
24295 int
24296 main ()
24297 {
24298
24299 #if DB_VERSION_MAJOR > 1
24300         {
24301                 char *version;
24302                 int major, minor, patch;
24303
24304                 version = db_version( &major, &minor, &patch );
24305
24306                 if( major != DB_VERSION_MAJOR ||
24307                         minor < DB_VERSION_MINOR )
24308                 {
24309                         printf("Berkeley DB version mismatch\n"
24310                                 "\texpected: %s\n\tgot: %s\n",
24311                                 DB_VERSION_STRING, version);
24312                         return 1;
24313                 }
24314         }
24315 #endif
24316
24317 #if DB_VERSION_MAJOR > 2
24318         db_env_create( NULL, 0 );
24319 #elif DB_VERSION_MAJOR > 1
24320         db_appexit( NULL );
24321 #else
24322         (void) dbopen( NULL, 0, 0, 0, NULL);
24323 #endif
24324
24325   ;
24326   return 0;
24327 }
24328 _ACEOF
24329 rm -f conftest.$ac_objext conftest$ac_exeext
24330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24331   (eval $ac_link) 2>&5
24332   ac_status=$?
24333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24334   (exit $ac_status); } &&
24335          { ac_try='test -s conftest$ac_exeext'
24336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24337   (eval $ac_try) 2>&5
24338   ac_status=$?
24339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24340   (exit $ac_status); }; }; then
24341   ol_cv_db_db_1=yes
24342 else
24343   echo "$as_me: failed program was:" >&5
24344 sed 's/^/| /' conftest.$ac_ext >&5
24345
24346 ol_cv_db_db_1=no
24347 fi
24348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24349
24350         LIBS="$ol_LIBS"
24351
24352 fi
24353 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
24354 echo "${ECHO_T}$ol_cv_db_db_1" >&6
24355
24356         if test $ol_cv_db_db_1 = yes ; then
24357                 ol_cv_lib_db=-ldb-1
24358         fi
24359 fi
24360
24361
24362                 if test "$ol_cv_lib_db" != no ; then
24363                         ol_cv_berkeley_db=yes
24364                 fi
24365         fi
24366 fi
24367
24368         else
24369                 ol_cv_berkeley_db=no
24370
24371 for ac_header in db.h
24372 do
24373 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24374 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24375   echo "$as_me:$LINENO: checking for $ac_header" >&5
24376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24378   echo $ECHO_N "(cached) $ECHO_C" >&6
24379 fi
24380 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24381 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24382 else
24383   # Is the header compilable?
24384 echo "$as_me:$LINENO: checking $ac_header usability" >&5
24385 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
24386 cat >conftest.$ac_ext <<_ACEOF
24387 #line $LINENO "configure"
24388 /* confdefs.h.  */
24389 _ACEOF
24390 cat confdefs.h >>conftest.$ac_ext
24391 cat >>conftest.$ac_ext <<_ACEOF
24392 /* end confdefs.h.  */
24393 $ac_includes_default
24394 #include <$ac_header>
24395 _ACEOF
24396 rm -f conftest.$ac_objext
24397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
24398   (eval $ac_compile) 2>&5
24399   ac_status=$?
24400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24401   (exit $ac_status); } &&
24402          { ac_try='test -s conftest.$ac_objext'
24403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24404   (eval $ac_try) 2>&5
24405   ac_status=$?
24406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24407   (exit $ac_status); }; }; then
24408   ac_header_compiler=yes
24409 else
24410   echo "$as_me: failed program was:" >&5
24411 sed 's/^/| /' conftest.$ac_ext >&5
24412
24413 ac_header_compiler=no
24414 fi
24415 rm -f conftest.$ac_objext conftest.$ac_ext
24416 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24417 echo "${ECHO_T}$ac_header_compiler" >&6
24418
24419 # Is the header present?
24420 echo "$as_me:$LINENO: checking $ac_header presence" >&5
24421 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
24422 cat >conftest.$ac_ext <<_ACEOF
24423 #line $LINENO "configure"
24424 /* confdefs.h.  */
24425 _ACEOF
24426 cat confdefs.h >>conftest.$ac_ext
24427 cat >>conftest.$ac_ext <<_ACEOF
24428 /* end confdefs.h.  */
24429 #include <$ac_header>
24430 _ACEOF
24431 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
24432   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24433   ac_status=$?
24434   grep -v '^ *+' conftest.er1 >conftest.err
24435   rm -f conftest.er1
24436   cat conftest.err >&5
24437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24438   (exit $ac_status); } >/dev/null; then
24439   if test -s conftest.err; then
24440     ac_cpp_err=$ac_c_preproc_warn_flag
24441   else
24442     ac_cpp_err=
24443   fi
24444 else
24445   ac_cpp_err=yes
24446 fi
24447 if test -z "$ac_cpp_err"; then
24448   ac_header_preproc=yes
24449 else
24450   echo "$as_me: failed program was:" >&5
24451 sed 's/^/| /' conftest.$ac_ext >&5
24452
24453   ac_header_preproc=no
24454 fi
24455 rm -f conftest.err conftest.$ac_ext
24456 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24457 echo "${ECHO_T}$ac_header_preproc" >&6
24458
24459 # So?  What about this header?
24460 case $ac_header_compiler:$ac_header_preproc in
24461   yes:no )
24462     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
24463 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
24464     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
24465 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
24466     (
24467       cat <<\_ASBOX
24468 ## ------------------------------------ ##
24469 ## Report this to bug-autoconf@gnu.org. ##
24470 ## ------------------------------------ ##
24471 _ASBOX
24472     ) |
24473       sed "s/^/$as_me: WARNING:     /" >&2
24474     ;;
24475   no:yes )
24476     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
24477 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
24478     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
24479 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
24480     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
24481 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
24482     (
24483       cat <<\_ASBOX
24484 ## ------------------------------------ ##
24485 ## Report this to bug-autoconf@gnu.org. ##
24486 ## ------------------------------------ ##
24487 _ASBOX
24488     ) |
24489       sed "s/^/$as_me: WARNING:     /" >&2
24490     ;;
24491 esac
24492 echo "$as_me:$LINENO: checking for $ac_header" >&5
24493 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24494 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24495   echo $ECHO_N "(cached) $ECHO_C" >&6
24496 else
24497   eval "$as_ac_Header=$ac_header_preproc"
24498 fi
24499 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
24500 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24501
24502 fi
24503 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24504   cat >>confdefs.h <<_ACEOF
24505 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24506 _ACEOF
24507
24508 fi
24509
24510 done
24511
24512 if test $ac_cv_header_db_h = yes; then
24513         ol_cv_lib_db=no
24514 if test $ol_cv_lib_db = no ; then
24515         echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
24516 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
24517 if test "${ol_cv_db_none+set}" = set; then
24518   echo $ECHO_N "(cached) $ECHO_C" >&6
24519 else
24520
24521         ol_DB_LIB=
24522         ol_LIBS=$LIBS
24523         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24524
24525         cat >conftest.$ac_ext <<_ACEOF
24526 #line $LINENO "configure"
24527 /* confdefs.h.  */
24528 _ACEOF
24529 cat confdefs.h >>conftest.$ac_ext
24530 cat >>conftest.$ac_ext <<_ACEOF
24531 /* end confdefs.h.  */
24532
24533 #ifdef HAVE_DB_185_H
24534 # include <db_185.h>
24535 #else
24536 # include <db.h>
24537 #endif
24538
24539 #ifndef DB_VERSION_MAJOR
24540 # define DB_VERSION_MAJOR 1
24541 #endif
24542
24543 #ifndef NULL
24544 #define NULL ((void*)0)
24545 #endif
24546
24547 int
24548 main ()
24549 {
24550
24551 #if DB_VERSION_MAJOR > 1
24552         {
24553                 char *version;
24554                 int major, minor, patch;
24555
24556                 version = db_version( &major, &minor, &patch );
24557
24558                 if( major != DB_VERSION_MAJOR ||
24559                         minor < DB_VERSION_MINOR )
24560                 {
24561                         printf("Berkeley DB version mismatch\n"
24562                                 "\texpected: %s\n\tgot: %s\n",
24563                                 DB_VERSION_STRING, version);
24564                         return 1;
24565                 }
24566         }
24567 #endif
24568
24569 #if DB_VERSION_MAJOR > 2
24570         db_env_create( NULL, 0 );
24571 #elif DB_VERSION_MAJOR > 1
24572         db_appexit( NULL );
24573 #else
24574         (void) dbopen( NULL, 0, 0, 0, NULL);
24575 #endif
24576
24577   ;
24578   return 0;
24579 }
24580 _ACEOF
24581 rm -f conftest.$ac_objext conftest$ac_exeext
24582 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24583   (eval $ac_link) 2>&5
24584   ac_status=$?
24585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24586   (exit $ac_status); } &&
24587          { ac_try='test -s conftest$ac_exeext'
24588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24589   (eval $ac_try) 2>&5
24590   ac_status=$?
24591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24592   (exit $ac_status); }; }; then
24593   ol_cv_db_none=yes
24594 else
24595   echo "$as_me: failed program was:" >&5
24596 sed 's/^/| /' conftest.$ac_ext >&5
24597
24598 ol_cv_db_none=no
24599 fi
24600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24601
24602         LIBS="$ol_LIBS"
24603
24604 fi
24605 echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
24606 echo "${ECHO_T}$ol_cv_db_none" >&6
24607
24608         if test $ol_cv_db_none = yes ; then
24609                 ol_cv_lib_db=yes
24610         fi
24611 fi
24612
24613 if test $ol_cv_lib_db = no ; then
24614         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
24615 echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
24616 if test "${ol_cv_db_db41+set}" = set; then
24617   echo $ECHO_N "(cached) $ECHO_C" >&6
24618 else
24619
24620         ol_DB_LIB=-ldb41
24621         ol_LIBS=$LIBS
24622         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24623
24624         cat >conftest.$ac_ext <<_ACEOF
24625 #line $LINENO "configure"
24626 /* confdefs.h.  */
24627 _ACEOF
24628 cat confdefs.h >>conftest.$ac_ext
24629 cat >>conftest.$ac_ext <<_ACEOF
24630 /* end confdefs.h.  */
24631
24632 #ifdef HAVE_DB_185_H
24633 # include <db_185.h>
24634 #else
24635 # include <db.h>
24636 #endif
24637
24638 #ifndef DB_VERSION_MAJOR
24639 # define DB_VERSION_MAJOR 1
24640 #endif
24641
24642 #ifndef NULL
24643 #define NULL ((void*)0)
24644 #endif
24645
24646 int
24647 main ()
24648 {
24649
24650 #if DB_VERSION_MAJOR > 1
24651         {
24652                 char *version;
24653                 int major, minor, patch;
24654
24655                 version = db_version( &major, &minor, &patch );
24656
24657                 if( major != DB_VERSION_MAJOR ||
24658                         minor < DB_VERSION_MINOR )
24659                 {
24660                         printf("Berkeley DB version mismatch\n"
24661                                 "\texpected: %s\n\tgot: %s\n",
24662                                 DB_VERSION_STRING, version);
24663                         return 1;
24664                 }
24665         }
24666 #endif
24667
24668 #if DB_VERSION_MAJOR > 2
24669         db_env_create( NULL, 0 );
24670 #elif DB_VERSION_MAJOR > 1
24671         db_appexit( NULL );
24672 #else
24673         (void) dbopen( NULL, 0, 0, 0, NULL);
24674 #endif
24675
24676   ;
24677   return 0;
24678 }
24679 _ACEOF
24680 rm -f conftest.$ac_objext conftest$ac_exeext
24681 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24682   (eval $ac_link) 2>&5
24683   ac_status=$?
24684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24685   (exit $ac_status); } &&
24686          { ac_try='test -s conftest$ac_exeext'
24687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24688   (eval $ac_try) 2>&5
24689   ac_status=$?
24690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24691   (exit $ac_status); }; }; then
24692   ol_cv_db_db41=yes
24693 else
24694   echo "$as_me: failed program was:" >&5
24695 sed 's/^/| /' conftest.$ac_ext >&5
24696
24697 ol_cv_db_db41=no
24698 fi
24699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24700
24701         LIBS="$ol_LIBS"
24702
24703 fi
24704 echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
24705 echo "${ECHO_T}$ol_cv_db_db41" >&6
24706
24707         if test $ol_cv_db_db41 = yes ; then
24708                 ol_cv_lib_db=-ldb41
24709         fi
24710 fi
24711
24712 if test $ol_cv_lib_db = no ; then
24713         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
24714 echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
24715 if test "${ol_cv_db_db_41+set}" = set; then
24716   echo $ECHO_N "(cached) $ECHO_C" >&6
24717 else
24718
24719         ol_DB_LIB=-ldb-41
24720         ol_LIBS=$LIBS
24721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24722
24723         cat >conftest.$ac_ext <<_ACEOF
24724 #line $LINENO "configure"
24725 /* confdefs.h.  */
24726 _ACEOF
24727 cat confdefs.h >>conftest.$ac_ext
24728 cat >>conftest.$ac_ext <<_ACEOF
24729 /* end confdefs.h.  */
24730
24731 #ifdef HAVE_DB_185_H
24732 # include <db_185.h>
24733 #else
24734 # include <db.h>
24735 #endif
24736
24737 #ifndef DB_VERSION_MAJOR
24738 # define DB_VERSION_MAJOR 1
24739 #endif
24740
24741 #ifndef NULL
24742 #define NULL ((void*)0)
24743 #endif
24744
24745 int
24746 main ()
24747 {
24748
24749 #if DB_VERSION_MAJOR > 1
24750         {
24751                 char *version;
24752                 int major, minor, patch;
24753
24754                 version = db_version( &major, &minor, &patch );
24755
24756                 if( major != DB_VERSION_MAJOR ||
24757                         minor < DB_VERSION_MINOR )
24758                 {
24759                         printf("Berkeley DB version mismatch\n"
24760                                 "\texpected: %s\n\tgot: %s\n",
24761                                 DB_VERSION_STRING, version);
24762                         return 1;
24763                 }
24764         }
24765 #endif
24766
24767 #if DB_VERSION_MAJOR > 2
24768         db_env_create( NULL, 0 );
24769 #elif DB_VERSION_MAJOR > 1
24770         db_appexit( NULL );
24771 #else
24772         (void) dbopen( NULL, 0, 0, 0, NULL);
24773 #endif
24774
24775   ;
24776   return 0;
24777 }
24778 _ACEOF
24779 rm -f conftest.$ac_objext conftest$ac_exeext
24780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24781   (eval $ac_link) 2>&5
24782   ac_status=$?
24783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24784   (exit $ac_status); } &&
24785          { ac_try='test -s conftest$ac_exeext'
24786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24787   (eval $ac_try) 2>&5
24788   ac_status=$?
24789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24790   (exit $ac_status); }; }; then
24791   ol_cv_db_db_41=yes
24792 else
24793   echo "$as_me: failed program was:" >&5
24794 sed 's/^/| /' conftest.$ac_ext >&5
24795
24796 ol_cv_db_db_41=no
24797 fi
24798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24799
24800         LIBS="$ol_LIBS"
24801
24802 fi
24803 echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
24804 echo "${ECHO_T}$ol_cv_db_db_41" >&6
24805
24806         if test $ol_cv_db_db_41 = yes ; then
24807                 ol_cv_lib_db=-ldb-41
24808         fi
24809 fi
24810
24811 if test $ol_cv_lib_db = no ; then
24812         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
24813 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
24814 if test "${ol_cv_db_db_4_dot_1+set}" = set; then
24815   echo $ECHO_N "(cached) $ECHO_C" >&6
24816 else
24817
24818         ol_DB_LIB=-ldb-4.1
24819         ol_LIBS=$LIBS
24820         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24821
24822         cat >conftest.$ac_ext <<_ACEOF
24823 #line $LINENO "configure"
24824 /* confdefs.h.  */
24825 _ACEOF
24826 cat confdefs.h >>conftest.$ac_ext
24827 cat >>conftest.$ac_ext <<_ACEOF
24828 /* end confdefs.h.  */
24829
24830 #ifdef HAVE_DB_185_H
24831 # include <db_185.h>
24832 #else
24833 # include <db.h>
24834 #endif
24835
24836 #ifndef DB_VERSION_MAJOR
24837 # define DB_VERSION_MAJOR 1
24838 #endif
24839
24840 #ifndef NULL
24841 #define NULL ((void*)0)
24842 #endif
24843
24844 int
24845 main ()
24846 {
24847
24848 #if DB_VERSION_MAJOR > 1
24849         {
24850                 char *version;
24851                 int major, minor, patch;
24852
24853                 version = db_version( &major, &minor, &patch );
24854
24855                 if( major != DB_VERSION_MAJOR ||
24856                         minor < DB_VERSION_MINOR )
24857                 {
24858                         printf("Berkeley DB version mismatch\n"
24859                                 "\texpected: %s\n\tgot: %s\n",
24860                                 DB_VERSION_STRING, version);
24861                         return 1;
24862                 }
24863         }
24864 #endif
24865
24866 #if DB_VERSION_MAJOR > 2
24867         db_env_create( NULL, 0 );
24868 #elif DB_VERSION_MAJOR > 1
24869         db_appexit( NULL );
24870 #else
24871         (void) dbopen( NULL, 0, 0, 0, NULL);
24872 #endif
24873
24874   ;
24875   return 0;
24876 }
24877 _ACEOF
24878 rm -f conftest.$ac_objext conftest$ac_exeext
24879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24880   (eval $ac_link) 2>&5
24881   ac_status=$?
24882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24883   (exit $ac_status); } &&
24884          { ac_try='test -s conftest$ac_exeext'
24885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24886   (eval $ac_try) 2>&5
24887   ac_status=$?
24888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24889   (exit $ac_status); }; }; then
24890   ol_cv_db_db_4_dot_1=yes
24891 else
24892   echo "$as_me: failed program was:" >&5
24893 sed 's/^/| /' conftest.$ac_ext >&5
24894
24895 ol_cv_db_db_4_dot_1=no
24896 fi
24897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24898
24899         LIBS="$ol_LIBS"
24900
24901 fi
24902 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
24903 echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
24904
24905         if test $ol_cv_db_db_4_dot_1 = yes ; then
24906                 ol_cv_lib_db=-ldb-4.1
24907         fi
24908 fi
24909
24910 if test $ol_cv_lib_db = no ; then
24911         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
24912 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
24913 if test "${ol_cv_db_db_4_1+set}" = set; then
24914   echo $ECHO_N "(cached) $ECHO_C" >&6
24915 else
24916
24917         ol_DB_LIB=-ldb-4-1
24918         ol_LIBS=$LIBS
24919         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
24920
24921         cat >conftest.$ac_ext <<_ACEOF
24922 #line $LINENO "configure"
24923 /* confdefs.h.  */
24924 _ACEOF
24925 cat confdefs.h >>conftest.$ac_ext
24926 cat >>conftest.$ac_ext <<_ACEOF
24927 /* end confdefs.h.  */
24928
24929 #ifdef HAVE_DB_185_H
24930 # include <db_185.h>
24931 #else
24932 # include <db.h>
24933 #endif
24934
24935 #ifndef DB_VERSION_MAJOR
24936 # define DB_VERSION_MAJOR 1
24937 #endif
24938
24939 #ifndef NULL
24940 #define NULL ((void*)0)
24941 #endif
24942
24943 int
24944 main ()
24945 {
24946
24947 #if DB_VERSION_MAJOR > 1
24948         {
24949                 char *version;
24950                 int major, minor, patch;
24951
24952                 version = db_version( &major, &minor, &patch );
24953
24954                 if( major != DB_VERSION_MAJOR ||
24955                         minor < DB_VERSION_MINOR )
24956                 {
24957                         printf("Berkeley DB version mismatch\n"
24958                                 "\texpected: %s\n\tgot: %s\n",
24959                                 DB_VERSION_STRING, version);
24960                         return 1;
24961                 }
24962         }
24963 #endif
24964
24965 #if DB_VERSION_MAJOR > 2
24966         db_env_create( NULL, 0 );
24967 #elif DB_VERSION_MAJOR > 1
24968         db_appexit( NULL );
24969 #else
24970         (void) dbopen( NULL, 0, 0, 0, NULL);
24971 #endif
24972
24973   ;
24974   return 0;
24975 }
24976 _ACEOF
24977 rm -f conftest.$ac_objext conftest$ac_exeext
24978 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
24979   (eval $ac_link) 2>&5
24980   ac_status=$?
24981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24982   (exit $ac_status); } &&
24983          { ac_try='test -s conftest$ac_exeext'
24984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24985   (eval $ac_try) 2>&5
24986   ac_status=$?
24987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24988   (exit $ac_status); }; }; then
24989   ol_cv_db_db_4_1=yes
24990 else
24991   echo "$as_me: failed program was:" >&5
24992 sed 's/^/| /' conftest.$ac_ext >&5
24993
24994 ol_cv_db_db_4_1=no
24995 fi
24996 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24997
24998         LIBS="$ol_LIBS"
24999
25000 fi
25001 echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
25002 echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
25003
25004         if test $ol_cv_db_db_4_1 = yes ; then
25005                 ol_cv_lib_db=-ldb-4-1
25006         fi
25007 fi
25008
25009 if test $ol_cv_lib_db = no ; then
25010         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
25011 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
25012 if test "${ol_cv_db_db_4+set}" = set; then
25013   echo $ECHO_N "(cached) $ECHO_C" >&6
25014 else
25015
25016         ol_DB_LIB=-ldb-4
25017         ol_LIBS=$LIBS
25018         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25019
25020         cat >conftest.$ac_ext <<_ACEOF
25021 #line $LINENO "configure"
25022 /* confdefs.h.  */
25023 _ACEOF
25024 cat confdefs.h >>conftest.$ac_ext
25025 cat >>conftest.$ac_ext <<_ACEOF
25026 /* end confdefs.h.  */
25027
25028 #ifdef HAVE_DB_185_H
25029 # include <db_185.h>
25030 #else
25031 # include <db.h>
25032 #endif
25033
25034 #ifndef DB_VERSION_MAJOR
25035 # define DB_VERSION_MAJOR 1
25036 #endif
25037
25038 #ifndef NULL
25039 #define NULL ((void*)0)
25040 #endif
25041
25042 int
25043 main ()
25044 {
25045
25046 #if DB_VERSION_MAJOR > 1
25047         {
25048                 char *version;
25049                 int major, minor, patch;
25050
25051                 version = db_version( &major, &minor, &patch );
25052
25053                 if( major != DB_VERSION_MAJOR ||
25054                         minor < DB_VERSION_MINOR )
25055                 {
25056                         printf("Berkeley DB version mismatch\n"
25057                                 "\texpected: %s\n\tgot: %s\n",
25058                                 DB_VERSION_STRING, version);
25059                         return 1;
25060                 }
25061         }
25062 #endif
25063
25064 #if DB_VERSION_MAJOR > 2
25065         db_env_create( NULL, 0 );
25066 #elif DB_VERSION_MAJOR > 1
25067         db_appexit( NULL );
25068 #else
25069         (void) dbopen( NULL, 0, 0, 0, NULL);
25070 #endif
25071
25072   ;
25073   return 0;
25074 }
25075 _ACEOF
25076 rm -f conftest.$ac_objext conftest$ac_exeext
25077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25078   (eval $ac_link) 2>&5
25079   ac_status=$?
25080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25081   (exit $ac_status); } &&
25082          { ac_try='test -s conftest$ac_exeext'
25083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25084   (eval $ac_try) 2>&5
25085   ac_status=$?
25086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25087   (exit $ac_status); }; }; then
25088   ol_cv_db_db_4=yes
25089 else
25090   echo "$as_me: failed program was:" >&5
25091 sed 's/^/| /' conftest.$ac_ext >&5
25092
25093 ol_cv_db_db_4=no
25094 fi
25095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25096
25097         LIBS="$ol_LIBS"
25098
25099 fi
25100 echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
25101 echo "${ECHO_T}$ol_cv_db_db_4" >&6
25102
25103         if test $ol_cv_db_db_4 = yes ; then
25104                 ol_cv_lib_db=-ldb-4
25105         fi
25106 fi
25107
25108 if test $ol_cv_lib_db = no ; then
25109         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
25110 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
25111 if test "${ol_cv_db_db4+set}" = set; then
25112   echo $ECHO_N "(cached) $ECHO_C" >&6
25113 else
25114
25115         ol_DB_LIB=-ldb4
25116         ol_LIBS=$LIBS
25117         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25118
25119         cat >conftest.$ac_ext <<_ACEOF
25120 #line $LINENO "configure"
25121 /* confdefs.h.  */
25122 _ACEOF
25123 cat confdefs.h >>conftest.$ac_ext
25124 cat >>conftest.$ac_ext <<_ACEOF
25125 /* end confdefs.h.  */
25126
25127 #ifdef HAVE_DB_185_H
25128 # include <db_185.h>
25129 #else
25130 # include <db.h>
25131 #endif
25132
25133 #ifndef DB_VERSION_MAJOR
25134 # define DB_VERSION_MAJOR 1
25135 #endif
25136
25137 #ifndef NULL
25138 #define NULL ((void*)0)
25139 #endif
25140
25141 int
25142 main ()
25143 {
25144
25145 #if DB_VERSION_MAJOR > 1
25146         {
25147                 char *version;
25148                 int major, minor, patch;
25149
25150                 version = db_version( &major, &minor, &patch );
25151
25152                 if( major != DB_VERSION_MAJOR ||
25153                         minor < DB_VERSION_MINOR )
25154                 {
25155                         printf("Berkeley DB version mismatch\n"
25156                                 "\texpected: %s\n\tgot: %s\n",
25157                                 DB_VERSION_STRING, version);
25158                         return 1;
25159                 }
25160         }
25161 #endif
25162
25163 #if DB_VERSION_MAJOR > 2
25164         db_env_create( NULL, 0 );
25165 #elif DB_VERSION_MAJOR > 1
25166         db_appexit( NULL );
25167 #else
25168         (void) dbopen( NULL, 0, 0, 0, NULL);
25169 #endif
25170
25171   ;
25172   return 0;
25173 }
25174 _ACEOF
25175 rm -f conftest.$ac_objext conftest$ac_exeext
25176 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25177   (eval $ac_link) 2>&5
25178   ac_status=$?
25179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25180   (exit $ac_status); } &&
25181          { ac_try='test -s conftest$ac_exeext'
25182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25183   (eval $ac_try) 2>&5
25184   ac_status=$?
25185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25186   (exit $ac_status); }; }; then
25187   ol_cv_db_db4=yes
25188 else
25189   echo "$as_me: failed program was:" >&5
25190 sed 's/^/| /' conftest.$ac_ext >&5
25191
25192 ol_cv_db_db4=no
25193 fi
25194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25195
25196         LIBS="$ol_LIBS"
25197
25198 fi
25199 echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
25200 echo "${ECHO_T}$ol_cv_db_db4" >&6
25201
25202         if test $ol_cv_db_db4 = yes ; then
25203                 ol_cv_lib_db=-ldb4
25204         fi
25205 fi
25206
25207 if test $ol_cv_lib_db = no ; then
25208         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
25209 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
25210 if test "${ol_cv_db_db+set}" = set; then
25211   echo $ECHO_N "(cached) $ECHO_C" >&6
25212 else
25213
25214         ol_DB_LIB=-ldb
25215         ol_LIBS=$LIBS
25216         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25217
25218         cat >conftest.$ac_ext <<_ACEOF
25219 #line $LINENO "configure"
25220 /* confdefs.h.  */
25221 _ACEOF
25222 cat confdefs.h >>conftest.$ac_ext
25223 cat >>conftest.$ac_ext <<_ACEOF
25224 /* end confdefs.h.  */
25225
25226 #ifdef HAVE_DB_185_H
25227 # include <db_185.h>
25228 #else
25229 # include <db.h>
25230 #endif
25231
25232 #ifndef DB_VERSION_MAJOR
25233 # define DB_VERSION_MAJOR 1
25234 #endif
25235
25236 #ifndef NULL
25237 #define NULL ((void*)0)
25238 #endif
25239
25240 int
25241 main ()
25242 {
25243
25244 #if DB_VERSION_MAJOR > 1
25245         {
25246                 char *version;
25247                 int major, minor, patch;
25248
25249                 version = db_version( &major, &minor, &patch );
25250
25251                 if( major != DB_VERSION_MAJOR ||
25252                         minor < DB_VERSION_MINOR )
25253                 {
25254                         printf("Berkeley DB version mismatch\n"
25255                                 "\texpected: %s\n\tgot: %s\n",
25256                                 DB_VERSION_STRING, version);
25257                         return 1;
25258                 }
25259         }
25260 #endif
25261
25262 #if DB_VERSION_MAJOR > 2
25263         db_env_create( NULL, 0 );
25264 #elif DB_VERSION_MAJOR > 1
25265         db_appexit( NULL );
25266 #else
25267         (void) dbopen( NULL, 0, 0, 0, NULL);
25268 #endif
25269
25270   ;
25271   return 0;
25272 }
25273 _ACEOF
25274 rm -f conftest.$ac_objext conftest$ac_exeext
25275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25276   (eval $ac_link) 2>&5
25277   ac_status=$?
25278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25279   (exit $ac_status); } &&
25280          { ac_try='test -s conftest$ac_exeext'
25281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25282   (eval $ac_try) 2>&5
25283   ac_status=$?
25284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25285   (exit $ac_status); }; }; then
25286   ol_cv_db_db=yes
25287 else
25288   echo "$as_me: failed program was:" >&5
25289 sed 's/^/| /' conftest.$ac_ext >&5
25290
25291 ol_cv_db_db=no
25292 fi
25293 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25294
25295         LIBS="$ol_LIBS"
25296
25297 fi
25298 echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
25299 echo "${ECHO_T}$ol_cv_db_db" >&6
25300
25301         if test $ol_cv_db_db = yes ; then
25302                 ol_cv_lib_db=-ldb
25303         fi
25304 fi
25305
25306 if test $ol_cv_lib_db = no ; then
25307         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
25308 echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
25309 if test "${ol_cv_db_db3+set}" = set; then
25310   echo $ECHO_N "(cached) $ECHO_C" >&6
25311 else
25312
25313         ol_DB_LIB=-ldb3
25314         ol_LIBS=$LIBS
25315         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25316
25317         cat >conftest.$ac_ext <<_ACEOF
25318 #line $LINENO "configure"
25319 /* confdefs.h.  */
25320 _ACEOF
25321 cat confdefs.h >>conftest.$ac_ext
25322 cat >>conftest.$ac_ext <<_ACEOF
25323 /* end confdefs.h.  */
25324
25325 #ifdef HAVE_DB_185_H
25326 # include <db_185.h>
25327 #else
25328 # include <db.h>
25329 #endif
25330
25331 #ifndef DB_VERSION_MAJOR
25332 # define DB_VERSION_MAJOR 1
25333 #endif
25334
25335 #ifndef NULL
25336 #define NULL ((void*)0)
25337 #endif
25338
25339 int
25340 main ()
25341 {
25342
25343 #if DB_VERSION_MAJOR > 1
25344         {
25345                 char *version;
25346                 int major, minor, patch;
25347
25348                 version = db_version( &major, &minor, &patch );
25349
25350                 if( major != DB_VERSION_MAJOR ||
25351                         minor < DB_VERSION_MINOR )
25352                 {
25353                         printf("Berkeley DB version mismatch\n"
25354                                 "\texpected: %s\n\tgot: %s\n",
25355                                 DB_VERSION_STRING, version);
25356                         return 1;
25357                 }
25358         }
25359 #endif
25360
25361 #if DB_VERSION_MAJOR > 2
25362         db_env_create( NULL, 0 );
25363 #elif DB_VERSION_MAJOR > 1
25364         db_appexit( NULL );
25365 #else
25366         (void) dbopen( NULL, 0, 0, 0, NULL);
25367 #endif
25368
25369   ;
25370   return 0;
25371 }
25372 _ACEOF
25373 rm -f conftest.$ac_objext conftest$ac_exeext
25374 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25375   (eval $ac_link) 2>&5
25376   ac_status=$?
25377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25378   (exit $ac_status); } &&
25379          { ac_try='test -s conftest$ac_exeext'
25380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25381   (eval $ac_try) 2>&5
25382   ac_status=$?
25383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25384   (exit $ac_status); }; }; then
25385   ol_cv_db_db3=yes
25386 else
25387   echo "$as_me: failed program was:" >&5
25388 sed 's/^/| /' conftest.$ac_ext >&5
25389
25390 ol_cv_db_db3=no
25391 fi
25392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25393
25394         LIBS="$ol_LIBS"
25395
25396 fi
25397 echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
25398 echo "${ECHO_T}$ol_cv_db_db3" >&6
25399
25400         if test $ol_cv_db_db3 = yes ; then
25401                 ol_cv_lib_db=-ldb3
25402         fi
25403 fi
25404
25405 if test $ol_cv_lib_db = no ; then
25406         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
25407 echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
25408 if test "${ol_cv_db_db_3+set}" = set; then
25409   echo $ECHO_N "(cached) $ECHO_C" >&6
25410 else
25411
25412         ol_DB_LIB=-ldb-3
25413         ol_LIBS=$LIBS
25414         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25415
25416         cat >conftest.$ac_ext <<_ACEOF
25417 #line $LINENO "configure"
25418 /* confdefs.h.  */
25419 _ACEOF
25420 cat confdefs.h >>conftest.$ac_ext
25421 cat >>conftest.$ac_ext <<_ACEOF
25422 /* end confdefs.h.  */
25423
25424 #ifdef HAVE_DB_185_H
25425 # include <db_185.h>
25426 #else
25427 # include <db.h>
25428 #endif
25429
25430 #ifndef DB_VERSION_MAJOR
25431 # define DB_VERSION_MAJOR 1
25432 #endif
25433
25434 #ifndef NULL
25435 #define NULL ((void*)0)
25436 #endif
25437
25438 int
25439 main ()
25440 {
25441
25442 #if DB_VERSION_MAJOR > 1
25443         {
25444                 char *version;
25445                 int major, minor, patch;
25446
25447                 version = db_version( &major, &minor, &patch );
25448
25449                 if( major != DB_VERSION_MAJOR ||
25450                         minor < DB_VERSION_MINOR )
25451                 {
25452                         printf("Berkeley DB version mismatch\n"
25453                                 "\texpected: %s\n\tgot: %s\n",
25454                                 DB_VERSION_STRING, version);
25455                         return 1;
25456                 }
25457         }
25458 #endif
25459
25460 #if DB_VERSION_MAJOR > 2
25461         db_env_create( NULL, 0 );
25462 #elif DB_VERSION_MAJOR > 1
25463         db_appexit( NULL );
25464 #else
25465         (void) dbopen( NULL, 0, 0, 0, NULL);
25466 #endif
25467
25468   ;
25469   return 0;
25470 }
25471 _ACEOF
25472 rm -f conftest.$ac_objext conftest$ac_exeext
25473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25474   (eval $ac_link) 2>&5
25475   ac_status=$?
25476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25477   (exit $ac_status); } &&
25478          { ac_try='test -s conftest$ac_exeext'
25479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25480   (eval $ac_try) 2>&5
25481   ac_status=$?
25482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25483   (exit $ac_status); }; }; then
25484   ol_cv_db_db_3=yes
25485 else
25486   echo "$as_me: failed program was:" >&5
25487 sed 's/^/| /' conftest.$ac_ext >&5
25488
25489 ol_cv_db_db_3=no
25490 fi
25491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25492
25493         LIBS="$ol_LIBS"
25494
25495 fi
25496 echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
25497 echo "${ECHO_T}$ol_cv_db_db_3" >&6
25498
25499         if test $ol_cv_db_db_3 = yes ; then
25500                 ol_cv_lib_db=-ldb-3
25501         fi
25502 fi
25503
25504 if test $ol_cv_lib_db = no ; then
25505         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
25506 echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
25507 if test "${ol_cv_db_db2+set}" = set; then
25508   echo $ECHO_N "(cached) $ECHO_C" >&6
25509 else
25510
25511         ol_DB_LIB=-ldb2
25512         ol_LIBS=$LIBS
25513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25514
25515         cat >conftest.$ac_ext <<_ACEOF
25516 #line $LINENO "configure"
25517 /* confdefs.h.  */
25518 _ACEOF
25519 cat confdefs.h >>conftest.$ac_ext
25520 cat >>conftest.$ac_ext <<_ACEOF
25521 /* end confdefs.h.  */
25522
25523 #ifdef HAVE_DB_185_H
25524 # include <db_185.h>
25525 #else
25526 # include <db.h>
25527 #endif
25528
25529 #ifndef DB_VERSION_MAJOR
25530 # define DB_VERSION_MAJOR 1
25531 #endif
25532
25533 #ifndef NULL
25534 #define NULL ((void*)0)
25535 #endif
25536
25537 int
25538 main ()
25539 {
25540
25541 #if DB_VERSION_MAJOR > 1
25542         {
25543                 char *version;
25544                 int major, minor, patch;
25545
25546                 version = db_version( &major, &minor, &patch );
25547
25548                 if( major != DB_VERSION_MAJOR ||
25549                         minor < DB_VERSION_MINOR )
25550                 {
25551                         printf("Berkeley DB version mismatch\n"
25552                                 "\texpected: %s\n\tgot: %s\n",
25553                                 DB_VERSION_STRING, version);
25554                         return 1;
25555                 }
25556         }
25557 #endif
25558
25559 #if DB_VERSION_MAJOR > 2
25560         db_env_create( NULL, 0 );
25561 #elif DB_VERSION_MAJOR > 1
25562         db_appexit( NULL );
25563 #else
25564         (void) dbopen( NULL, 0, 0, 0, NULL);
25565 #endif
25566
25567   ;
25568   return 0;
25569 }
25570 _ACEOF
25571 rm -f conftest.$ac_objext conftest$ac_exeext
25572 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25573   (eval $ac_link) 2>&5
25574   ac_status=$?
25575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25576   (exit $ac_status); } &&
25577          { ac_try='test -s conftest$ac_exeext'
25578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25579   (eval $ac_try) 2>&5
25580   ac_status=$?
25581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25582   (exit $ac_status); }; }; then
25583   ol_cv_db_db2=yes
25584 else
25585   echo "$as_me: failed program was:" >&5
25586 sed 's/^/| /' conftest.$ac_ext >&5
25587
25588 ol_cv_db_db2=no
25589 fi
25590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25591
25592         LIBS="$ol_LIBS"
25593
25594 fi
25595 echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
25596 echo "${ECHO_T}$ol_cv_db_db2" >&6
25597
25598         if test $ol_cv_db_db2 = yes ; then
25599                 ol_cv_lib_db=-ldb2
25600         fi
25601 fi
25602
25603 if test $ol_cv_lib_db = no ; then
25604         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
25605 echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
25606 if test "${ol_cv_db_db_2+set}" = set; then
25607   echo $ECHO_N "(cached) $ECHO_C" >&6
25608 else
25609
25610         ol_DB_LIB=-ldb-2
25611         ol_LIBS=$LIBS
25612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25613
25614         cat >conftest.$ac_ext <<_ACEOF
25615 #line $LINENO "configure"
25616 /* confdefs.h.  */
25617 _ACEOF
25618 cat confdefs.h >>conftest.$ac_ext
25619 cat >>conftest.$ac_ext <<_ACEOF
25620 /* end confdefs.h.  */
25621
25622 #ifdef HAVE_DB_185_H
25623 # include <db_185.h>
25624 #else
25625 # include <db.h>
25626 #endif
25627
25628 #ifndef DB_VERSION_MAJOR
25629 # define DB_VERSION_MAJOR 1
25630 #endif
25631
25632 #ifndef NULL
25633 #define NULL ((void*)0)
25634 #endif
25635
25636 int
25637 main ()
25638 {
25639
25640 #if DB_VERSION_MAJOR > 1
25641         {
25642                 char *version;
25643                 int major, minor, patch;
25644
25645                 version = db_version( &major, &minor, &patch );
25646
25647                 if( major != DB_VERSION_MAJOR ||
25648                         minor < DB_VERSION_MINOR )
25649                 {
25650                         printf("Berkeley DB version mismatch\n"
25651                                 "\texpected: %s\n\tgot: %s\n",
25652                                 DB_VERSION_STRING, version);
25653                         return 1;
25654                 }
25655         }
25656 #endif
25657
25658 #if DB_VERSION_MAJOR > 2
25659         db_env_create( NULL, 0 );
25660 #elif DB_VERSION_MAJOR > 1
25661         db_appexit( NULL );
25662 #else
25663         (void) dbopen( NULL, 0, 0, 0, NULL);
25664 #endif
25665
25666   ;
25667   return 0;
25668 }
25669 _ACEOF
25670 rm -f conftest.$ac_objext conftest$ac_exeext
25671 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25672   (eval $ac_link) 2>&5
25673   ac_status=$?
25674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25675   (exit $ac_status); } &&
25676          { ac_try='test -s conftest$ac_exeext'
25677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25678   (eval $ac_try) 2>&5
25679   ac_status=$?
25680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25681   (exit $ac_status); }; }; then
25682   ol_cv_db_db_2=yes
25683 else
25684   echo "$as_me: failed program was:" >&5
25685 sed 's/^/| /' conftest.$ac_ext >&5
25686
25687 ol_cv_db_db_2=no
25688 fi
25689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25690
25691         LIBS="$ol_LIBS"
25692
25693 fi
25694 echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
25695 echo "${ECHO_T}$ol_cv_db_db_2" >&6
25696
25697         if test $ol_cv_db_db_2 = yes ; then
25698                 ol_cv_lib_db=-ldb-2
25699         fi
25700 fi
25701
25702 if test $ol_cv_lib_db = no ; then
25703         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
25704 echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
25705 if test "${ol_cv_db_db1+set}" = set; then
25706   echo $ECHO_N "(cached) $ECHO_C" >&6
25707 else
25708
25709         ol_DB_LIB=-ldb1
25710         ol_LIBS=$LIBS
25711         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25712
25713         cat >conftest.$ac_ext <<_ACEOF
25714 #line $LINENO "configure"
25715 /* confdefs.h.  */
25716 _ACEOF
25717 cat confdefs.h >>conftest.$ac_ext
25718 cat >>conftest.$ac_ext <<_ACEOF
25719 /* end confdefs.h.  */
25720
25721 #ifdef HAVE_DB_185_H
25722 # include <db_185.h>
25723 #else
25724 # include <db.h>
25725 #endif
25726
25727 #ifndef DB_VERSION_MAJOR
25728 # define DB_VERSION_MAJOR 1
25729 #endif
25730
25731 #ifndef NULL
25732 #define NULL ((void*)0)
25733 #endif
25734
25735 int
25736 main ()
25737 {
25738
25739 #if DB_VERSION_MAJOR > 1
25740         {
25741                 char *version;
25742                 int major, minor, patch;
25743
25744                 version = db_version( &major, &minor, &patch );
25745
25746                 if( major != DB_VERSION_MAJOR ||
25747                         minor < DB_VERSION_MINOR )
25748                 {
25749                         printf("Berkeley DB version mismatch\n"
25750                                 "\texpected: %s\n\tgot: %s\n",
25751                                 DB_VERSION_STRING, version);
25752                         return 1;
25753                 }
25754         }
25755 #endif
25756
25757 #if DB_VERSION_MAJOR > 2
25758         db_env_create( NULL, 0 );
25759 #elif DB_VERSION_MAJOR > 1
25760         db_appexit( NULL );
25761 #else
25762         (void) dbopen( NULL, 0, 0, 0, NULL);
25763 #endif
25764
25765   ;
25766   return 0;
25767 }
25768 _ACEOF
25769 rm -f conftest.$ac_objext conftest$ac_exeext
25770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25771   (eval $ac_link) 2>&5
25772   ac_status=$?
25773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25774   (exit $ac_status); } &&
25775          { ac_try='test -s conftest$ac_exeext'
25776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25777   (eval $ac_try) 2>&5
25778   ac_status=$?
25779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25780   (exit $ac_status); }; }; then
25781   ol_cv_db_db1=yes
25782 else
25783   echo "$as_me: failed program was:" >&5
25784 sed 's/^/| /' conftest.$ac_ext >&5
25785
25786 ol_cv_db_db1=no
25787 fi
25788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25789
25790         LIBS="$ol_LIBS"
25791
25792 fi
25793 echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
25794 echo "${ECHO_T}$ol_cv_db_db1" >&6
25795
25796         if test $ol_cv_db_db1 = yes ; then
25797                 ol_cv_lib_db=-ldb1
25798         fi
25799 fi
25800
25801 if test $ol_cv_lib_db = no ; then
25802         echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
25803 echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
25804 if test "${ol_cv_db_db_1+set}" = set; then
25805   echo $ECHO_N "(cached) $ECHO_C" >&6
25806 else
25807
25808         ol_DB_LIB=-ldb-1
25809         ol_LIBS=$LIBS
25810         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
25811
25812         cat >conftest.$ac_ext <<_ACEOF
25813 #line $LINENO "configure"
25814 /* confdefs.h.  */
25815 _ACEOF
25816 cat confdefs.h >>conftest.$ac_ext
25817 cat >>conftest.$ac_ext <<_ACEOF
25818 /* end confdefs.h.  */
25819
25820 #ifdef HAVE_DB_185_H
25821 # include <db_185.h>
25822 #else
25823 # include <db.h>
25824 #endif
25825
25826 #ifndef DB_VERSION_MAJOR
25827 # define DB_VERSION_MAJOR 1
25828 #endif
25829
25830 #ifndef NULL
25831 #define NULL ((void*)0)
25832 #endif
25833
25834 int
25835 main ()
25836 {
25837
25838 #if DB_VERSION_MAJOR > 1
25839         {
25840                 char *version;
25841                 int major, minor, patch;
25842
25843                 version = db_version( &major, &minor, &patch );
25844
25845                 if( major != DB_VERSION_MAJOR ||
25846                         minor < DB_VERSION_MINOR )
25847                 {
25848                         printf("Berkeley DB version mismatch\n"
25849                                 "\texpected: %s\n\tgot: %s\n",
25850                                 DB_VERSION_STRING, version);
25851                         return 1;
25852                 }
25853         }
25854 #endif
25855
25856 #if DB_VERSION_MAJOR > 2
25857         db_env_create( NULL, 0 );
25858 #elif DB_VERSION_MAJOR > 1
25859         db_appexit( NULL );
25860 #else
25861         (void) dbopen( NULL, 0, 0, 0, NULL);
25862 #endif
25863
25864   ;
25865   return 0;
25866 }
25867 _ACEOF
25868 rm -f conftest.$ac_objext conftest$ac_exeext
25869 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25870   (eval $ac_link) 2>&5
25871   ac_status=$?
25872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25873   (exit $ac_status); } &&
25874          { ac_try='test -s conftest$ac_exeext'
25875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25876   (eval $ac_try) 2>&5
25877   ac_status=$?
25878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25879   (exit $ac_status); }; }; then
25880   ol_cv_db_db_1=yes
25881 else
25882   echo "$as_me: failed program was:" >&5
25883 sed 's/^/| /' conftest.$ac_ext >&5
25884
25885 ol_cv_db_db_1=no
25886 fi
25887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25888
25889         LIBS="$ol_LIBS"
25890
25891 fi
25892 echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
25893 echo "${ECHO_T}$ol_cv_db_db_1" >&6
25894
25895         if test $ol_cv_db_db_1 = yes ; then
25896                 ol_cv_lib_db=-ldb-1
25897         fi
25898 fi
25899
25900
25901         if test "$ol_cv_lib_db" != no ; then
25902                 ol_cv_berkeley_db=yes
25903                 echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
25904 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
25905 if test "${ol_cv_berkeley_db_thread+set}" = set; then
25906   echo $ECHO_N "(cached) $ECHO_C" >&6
25907 else
25908
25909         ol_LIBS="$LIBS"
25910         LIBS="$LTHREAD_LIBS $LIBS"
25911         if test $ol_cv_lib_db != yes ; then
25912                 LIBS="$ol_cv_lib_db $LIBS"
25913         fi
25914
25915         if test "$cross_compiling" = yes; then
25916   ol_cv_berkeley_db_thread=cross
25917 else
25918   cat >conftest.$ac_ext <<_ACEOF
25919 #line $LINENO "configure"
25920 /* confdefs.h.  */
25921 _ACEOF
25922 cat confdefs.h >>conftest.$ac_ext
25923 cat >>conftest.$ac_ext <<_ACEOF
25924 /* end confdefs.h.  */
25925
25926 #ifdef HAVE_DB_185_H
25927         choke me;
25928 #else
25929 #include <db.h>
25930 #endif
25931 #ifndef NULL
25932 #define NULL ((void *)0)
25933 #endif
25934 main()
25935 {
25936         int rc;
25937         u_int32_t flags = DB_CREATE |
25938 #ifdef DB_PRIVATE
25939                 DB_PRIVATE |
25940 #endif
25941                 DB_THREAD;
25942
25943 #if DB_VERSION_MAJOR > 2
25944         DB_ENV *env = NULL;
25945
25946         rc = db_env_create( &env, 0 );
25947
25948         flags |= DB_INIT_MPOOL;
25949 #ifdef DB_MPOOL_PRIVATE
25950         flags |= DB_MPOOL_PRIVATE;
25951 #endif
25952
25953         if( rc ) {
25954                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
25955                 return rc;
25956         }
25957
25958 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
25959         rc = env->open( env, NULL, flags, 0 );
25960 #else
25961         rc = env->open( env, NULL, NULL, flags, 0 );
25962 #endif
25963
25964         if ( rc == 0 ) {
25965                 rc = env->close( env, 0 );
25966         }
25967
25968         if( rc ) {
25969                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
25970                 return rc;
25971         }
25972
25973 #else
25974         DB_ENV env;
25975         memset( &env, '\0', sizeof(env) );
25976
25977         rc = db_appinit( NULL, NULL, &env, flags );
25978
25979         if( rc == 0 ) {
25980                 db_appexit( &env );
25981         }
25982
25983         unlink("__db_mpool.share");
25984         unlink("__db_lock.share");
25985 #endif
25986
25987         return rc;
25988 }
25989 _ACEOF
25990 rm -f conftest$ac_exeext
25991 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25992   (eval $ac_link) 2>&5
25993   ac_status=$?
25994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25995   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25997   (eval $ac_try) 2>&5
25998   ac_status=$?
25999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26000   (exit $ac_status); }; }; then
26001   ol_cv_berkeley_db_thread=yes
26002 else
26003   echo "$as_me: program exited with status $ac_status" >&5
26004 echo "$as_me: failed program was:" >&5
26005 sed 's/^/| /' conftest.$ac_ext >&5
26006
26007 ( exit $ac_status )
26008 ol_cv_berkeley_db_thread=no
26009 fi
26010 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26011 fi
26012
26013         LIBS="$ol_LIBS"
26014
26015 fi
26016 echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
26017 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
26018
26019         if test $ol_cv_berkeley_db_thread != no ; then
26020
26021 cat >>confdefs.h <<\_ACEOF
26022 #define HAVE_BERKELEY_DB_THREAD 1
26023 _ACEOF
26024
26025         fi
26026
26027         fi
26028 fi
26029
26030         fi
26031
26032         if test $ol_cv_berkeley_db != no ; then
26033
26034 cat >>confdefs.h <<\_ACEOF
26035 #define HAVE_BERKELEY_DB 1
26036 _ACEOF
26037
26038
26039                 ol_link_ldbm=berkeley
26040                 ol_with_ldbm_api=berkeley
26041
26042                 if test $ol_with_ldbm_type = hash ; then
26043
26044 cat >>confdefs.h <<\_ACEOF
26045 #define LDBM_USE_DBHASH 1
26046 _ACEOF
26047
26048                 else
26049
26050 cat >>confdefs.h <<\_ACEOF
26051 #define LDBM_USE_DBBTREE 1
26052 _ACEOF
26053
26054                 fi
26055
26056                                                 if test $ol_cv_lib_db != yes ; then
26057                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
26058                 fi
26059         fi
26060 fi
26061
26062 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
26063         { { echo "$as_me:$LINENO: error: BDB: BerkeleyDB not available" >&5
26064 echo "$as_me: error: BDB: BerkeleyDB not available" >&2;}
26065    { (exit 1); exit 1; }; }
26066 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
26067         echo "$as_me:$LINENO: checking Berkeley DB version for BDB backend" >&5
26068 echo $ECHO_N "checking Berkeley DB version for BDB backend... $ECHO_C" >&6
26069 if test "${ol_cv_bdb_compat+set}" = set; then
26070   echo $ECHO_N "(cached) $ECHO_C" >&6
26071 else
26072
26073         cat >conftest.$ac_ext <<_ACEOF
26074 #line $LINENO "configure"
26075 /* confdefs.h.  */
26076 _ACEOF
26077 cat confdefs.h >>conftest.$ac_ext
26078 cat >>conftest.$ac_ext <<_ACEOF
26079 /* end confdefs.h.  */
26080
26081 #include <db.h>
26082
26083  /* this check could be improved */
26084 #ifndef DB_VERSION_MAJOR
26085 #       define DB_VERSION_MAJOR 1
26086 #endif
26087 #ifndef DB_VERSION_MINOR
26088 #       define DB_VERSION_MINOR 0
26089 #endif
26090
26091 /* require 4.1 or later */
26092 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
26093         __db_version_compat
26094 #endif
26095
26096 _ACEOF
26097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26098   $EGREP "__db_version_compat" >/dev/null 2>&1; then
26099   ol_cv_bdb_compat=yes
26100 else
26101   ol_cv_bdb_compat=no
26102 fi
26103 rm -f conftest*
26104
26105 fi
26106 echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
26107 echo "${ECHO_T}$ol_cv_bdb_compat" >&6
26108
26109
26110         if test $ol_cv_bdb_compat = yes ; then
26111                 ol_enable_bdb=yes
26112         elif test $ol_enable_bdb = yes ; then
26113                 { { echo "$as_me:$LINENO: error: BDB: BerkeleyDB version incompatible" >&5
26114 echo "$as_me: error: BDB: BerkeleyDB version incompatible" >&2;}
26115    { (exit 1); exit 1; }; }
26116         else
26117                 ol_enable_bdb=no
26118         fi
26119 fi
26120
26121 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
26122         { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
26123 echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
26124         ol_with_ldbm_api=none
26125 fi
26126
26127 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
26128         echo "$as_me:$LINENO: checking for MDBM library" >&5
26129 echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
26130 if test "${ol_cv_lib_mdbm+set}" = set; then
26131   echo $ECHO_N "(cached) $ECHO_C" >&6
26132 else
26133         ol_LIBS="$LIBS"
26134         echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
26135 echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
26136 if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
26137   echo $ECHO_N "(cached) $ECHO_C" >&6
26138 else
26139   cat >conftest.$ac_ext <<_ACEOF
26140 #line $LINENO "configure"
26141 /* confdefs.h.  */
26142 _ACEOF
26143 cat confdefs.h >>conftest.$ac_ext
26144 cat >>conftest.$ac_ext <<_ACEOF
26145 /* end confdefs.h.  */
26146 /* System header to define __stub macros and hopefully few prototypes,
26147     which can conflict with char mdbm_set_chain (); below.
26148     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26149     <limits.h> exists even on freestanding compilers.  */
26150 #ifdef __STDC__
26151 # include <limits.h>
26152 #else
26153 # include <assert.h>
26154 #endif
26155 /* Override any gcc2 internal prototype to avoid an error.  */
26156 #ifdef __cplusplus
26157 extern "C"
26158 {
26159 #endif
26160 /* We use char because int might match the return type of a gcc2
26161    builtin and then its argument prototype would still apply.  */
26162 char mdbm_set_chain ();
26163 /* The GNU C library defines this for functions which it implements
26164     to always fail with ENOSYS.  Some functions are actually named
26165     something starting with __ and the normal name is an alias.  */
26166 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
26167 choke me
26168 #else
26169 char (*f) () = mdbm_set_chain;
26170 #endif
26171 #ifdef __cplusplus
26172 }
26173 #endif
26174
26175 int
26176 main ()
26177 {
26178 return f != mdbm_set_chain;
26179   ;
26180   return 0;
26181 }
26182 _ACEOF
26183 rm -f conftest.$ac_objext conftest$ac_exeext
26184 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26185   (eval $ac_link) 2>&5
26186   ac_status=$?
26187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26188   (exit $ac_status); } &&
26189          { ac_try='test -s conftest$ac_exeext'
26190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26191   (eval $ac_try) 2>&5
26192   ac_status=$?
26193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26194   (exit $ac_status); }; }; then
26195   ac_cv_func_mdbm_set_chain=yes
26196 else
26197   echo "$as_me: failed program was:" >&5
26198 sed 's/^/| /' conftest.$ac_ext >&5
26199
26200 ac_cv_func_mdbm_set_chain=no
26201 fi
26202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26203 fi
26204 echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
26205 echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
26206 if test $ac_cv_func_mdbm_set_chain = yes; then
26207   ol_cv_lib_mdbm=yes
26208 else
26209
26210                 echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
26211 echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
26212 if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
26213   echo $ECHO_N "(cached) $ECHO_C" >&6
26214 else
26215   ac_check_lib_save_LIBS=$LIBS
26216 LIBS="-lmdbm  $LIBS"
26217 cat >conftest.$ac_ext <<_ACEOF
26218 #line $LINENO "configure"
26219 /* confdefs.h.  */
26220 _ACEOF
26221 cat confdefs.h >>conftest.$ac_ext
26222 cat >>conftest.$ac_ext <<_ACEOF
26223 /* end confdefs.h.  */
26224
26225 /* Override any gcc2 internal prototype to avoid an error.  */
26226 #ifdef __cplusplus
26227 extern "C"
26228 #endif
26229 /* We use char because int might match the return type of a gcc2
26230    builtin and then its argument prototype would still apply.  */
26231 char mdbm_set_chain ();
26232 int
26233 main ()
26234 {
26235 mdbm_set_chain ();
26236   ;
26237   return 0;
26238 }
26239 _ACEOF
26240 rm -f conftest.$ac_objext conftest$ac_exeext
26241 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26242   (eval $ac_link) 2>&5
26243   ac_status=$?
26244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26245   (exit $ac_status); } &&
26246          { ac_try='test -s conftest$ac_exeext'
26247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26248   (eval $ac_try) 2>&5
26249   ac_status=$?
26250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26251   (exit $ac_status); }; }; then
26252   ac_cv_lib_mdbm_mdbm_set_chain=yes
26253 else
26254   echo "$as_me: failed program was:" >&5
26255 sed 's/^/| /' conftest.$ac_ext >&5
26256
26257 ac_cv_lib_mdbm_mdbm_set_chain=no
26258 fi
26259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26260 LIBS=$ac_check_lib_save_LIBS
26261 fi
26262 echo "$as_me:$LINENO: result: $ac_cv_lib_mdbm_mdbm_set_chain" >&5
26263 echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
26264 if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
26265   ol_cv_lib_mdbm=-lmdbm
26266 else
26267   ol_cv_lib_mdbm=no
26268 fi
26269
26270
26271 fi
26272
26273         LIBS="$ol_LIBS"
26274
26275 fi
26276 echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
26277 echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
26278
26279
26280
26281 for ac_header in mdbm.h
26282 do
26283 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26284 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26285   echo "$as_me:$LINENO: checking for $ac_header" >&5
26286 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26287 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26288   echo $ECHO_N "(cached) $ECHO_C" >&6
26289 fi
26290 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26291 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26292 else
26293   # Is the header compilable?
26294 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26295 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26296 cat >conftest.$ac_ext <<_ACEOF
26297 #line $LINENO "configure"
26298 /* confdefs.h.  */
26299 _ACEOF
26300 cat confdefs.h >>conftest.$ac_ext
26301 cat >>conftest.$ac_ext <<_ACEOF
26302 /* end confdefs.h.  */
26303 $ac_includes_default
26304 #include <$ac_header>
26305 _ACEOF
26306 rm -f conftest.$ac_objext
26307 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26308   (eval $ac_compile) 2>&5
26309   ac_status=$?
26310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26311   (exit $ac_status); } &&
26312          { ac_try='test -s conftest.$ac_objext'
26313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26314   (eval $ac_try) 2>&5
26315   ac_status=$?
26316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26317   (exit $ac_status); }; }; then
26318   ac_header_compiler=yes
26319 else
26320   echo "$as_me: failed program was:" >&5
26321 sed 's/^/| /' conftest.$ac_ext >&5
26322
26323 ac_header_compiler=no
26324 fi
26325 rm -f conftest.$ac_objext conftest.$ac_ext
26326 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26327 echo "${ECHO_T}$ac_header_compiler" >&6
26328
26329 # Is the header present?
26330 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26331 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26332 cat >conftest.$ac_ext <<_ACEOF
26333 #line $LINENO "configure"
26334 /* confdefs.h.  */
26335 _ACEOF
26336 cat confdefs.h >>conftest.$ac_ext
26337 cat >>conftest.$ac_ext <<_ACEOF
26338 /* end confdefs.h.  */
26339 #include <$ac_header>
26340 _ACEOF
26341 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26343   ac_status=$?
26344   grep -v '^ *+' conftest.er1 >conftest.err
26345   rm -f conftest.er1
26346   cat conftest.err >&5
26347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26348   (exit $ac_status); } >/dev/null; then
26349   if test -s conftest.err; then
26350     ac_cpp_err=$ac_c_preproc_warn_flag
26351   else
26352     ac_cpp_err=
26353   fi
26354 else
26355   ac_cpp_err=yes
26356 fi
26357 if test -z "$ac_cpp_err"; then
26358   ac_header_preproc=yes
26359 else
26360   echo "$as_me: failed program was:" >&5
26361 sed 's/^/| /' conftest.$ac_ext >&5
26362
26363   ac_header_preproc=no
26364 fi
26365 rm -f conftest.err conftest.$ac_ext
26366 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26367 echo "${ECHO_T}$ac_header_preproc" >&6
26368
26369 # So?  What about this header?
26370 case $ac_header_compiler:$ac_header_preproc in
26371   yes:no )
26372     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26373 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26374     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26375 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26376     (
26377       cat <<\_ASBOX
26378 ## ------------------------------------ ##
26379 ## Report this to bug-autoconf@gnu.org. ##
26380 ## ------------------------------------ ##
26381 _ASBOX
26382     ) |
26383       sed "s/^/$as_me: WARNING:     /" >&2
26384     ;;
26385   no:yes )
26386     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26387 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26388     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
26389 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
26390     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26391 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26392     (
26393       cat <<\_ASBOX
26394 ## ------------------------------------ ##
26395 ## Report this to bug-autoconf@gnu.org. ##
26396 ## ------------------------------------ ##
26397 _ASBOX
26398     ) |
26399       sed "s/^/$as_me: WARNING:     /" >&2
26400     ;;
26401 esac
26402 echo "$as_me:$LINENO: checking for $ac_header" >&5
26403 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26404 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26405   echo $ECHO_N "(cached) $ECHO_C" >&6
26406 else
26407   eval "$as_ac_Header=$ac_header_preproc"
26408 fi
26409 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26410 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26411
26412 fi
26413 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26414   cat >>confdefs.h <<_ACEOF
26415 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26416 _ACEOF
26417
26418 fi
26419
26420 done
26421
26422  echo "$as_me:$LINENO: checking for db" >&5
26423 echo $ECHO_N "checking for db... $ECHO_C" >&6
26424 if test "${ol_cv_mdbm+set}" = set; then
26425   echo $ECHO_N "(cached) $ECHO_C" >&6
26426 else
26427
26428         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
26429                 ol_cv_mdbm=no
26430         else
26431                 ol_cv_mdbm=yes
26432         fi
26433
26434 fi
26435 echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
26436 echo "${ECHO_T}$ol_cv_mdbm" >&6
26437  if test $ol_cv_mdbm = yes ; then
26438
26439 cat >>confdefs.h <<\_ACEOF
26440 #define HAVE_MDBM 1
26441 _ACEOF
26442
26443  fi
26444
26445
26446         if test $ol_cv_mdbm = yes ; then
26447                 ol_link_ldbm=mdbm
26448                 ol_with_ldbm_api=mdbm
26449                 if test $ol_cv_lib_mdbm != yes ; then
26450                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
26451                 fi
26452         fi
26453 fi
26454
26455 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
26456         echo "$as_me:$LINENO: checking for GDBM library" >&5
26457 echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
26458 if test "${ol_cv_lib_gdbm+set}" = set; then
26459   echo $ECHO_N "(cached) $ECHO_C" >&6
26460 else
26461         ol_LIBS="$LIBS"
26462         echo "$as_me:$LINENO: checking for gdbm_open" >&5
26463 echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
26464 if test "${ac_cv_func_gdbm_open+set}" = set; then
26465   echo $ECHO_N "(cached) $ECHO_C" >&6
26466 else
26467   cat >conftest.$ac_ext <<_ACEOF
26468 #line $LINENO "configure"
26469 /* confdefs.h.  */
26470 _ACEOF
26471 cat confdefs.h >>conftest.$ac_ext
26472 cat >>conftest.$ac_ext <<_ACEOF
26473 /* end confdefs.h.  */
26474 /* System header to define __stub macros and hopefully few prototypes,
26475     which can conflict with char gdbm_open (); below.
26476     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26477     <limits.h> exists even on freestanding compilers.  */
26478 #ifdef __STDC__
26479 # include <limits.h>
26480 #else
26481 # include <assert.h>
26482 #endif
26483 /* Override any gcc2 internal prototype to avoid an error.  */
26484 #ifdef __cplusplus
26485 extern "C"
26486 {
26487 #endif
26488 /* We use char because int might match the return type of a gcc2
26489    builtin and then its argument prototype would still apply.  */
26490 char gdbm_open ();
26491 /* The GNU C library defines this for functions which it implements
26492     to always fail with ENOSYS.  Some functions are actually named
26493     something starting with __ and the normal name is an alias.  */
26494 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
26495 choke me
26496 #else
26497 char (*f) () = gdbm_open;
26498 #endif
26499 #ifdef __cplusplus
26500 }
26501 #endif
26502
26503 int
26504 main ()
26505 {
26506 return f != gdbm_open;
26507   ;
26508   return 0;
26509 }
26510 _ACEOF
26511 rm -f conftest.$ac_objext conftest$ac_exeext
26512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26513   (eval $ac_link) 2>&5
26514   ac_status=$?
26515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26516   (exit $ac_status); } &&
26517          { ac_try='test -s conftest$ac_exeext'
26518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26519   (eval $ac_try) 2>&5
26520   ac_status=$?
26521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26522   (exit $ac_status); }; }; then
26523   ac_cv_func_gdbm_open=yes
26524 else
26525   echo "$as_me: failed program was:" >&5
26526 sed 's/^/| /' conftest.$ac_ext >&5
26527
26528 ac_cv_func_gdbm_open=no
26529 fi
26530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26531 fi
26532 echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
26533 echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
26534 if test $ac_cv_func_gdbm_open = yes; then
26535   ol_cv_lib_gdbm=yes
26536 else
26537
26538                 echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
26539 echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
26540 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
26541   echo $ECHO_N "(cached) $ECHO_C" >&6
26542 else
26543   ac_check_lib_save_LIBS=$LIBS
26544 LIBS="-lgdbm  $LIBS"
26545 cat >conftest.$ac_ext <<_ACEOF
26546 #line $LINENO "configure"
26547 /* confdefs.h.  */
26548 _ACEOF
26549 cat confdefs.h >>conftest.$ac_ext
26550 cat >>conftest.$ac_ext <<_ACEOF
26551 /* end confdefs.h.  */
26552
26553 /* Override any gcc2 internal prototype to avoid an error.  */
26554 #ifdef __cplusplus
26555 extern "C"
26556 #endif
26557 /* We use char because int might match the return type of a gcc2
26558    builtin and then its argument prototype would still apply.  */
26559 char gdbm_open ();
26560 int
26561 main ()
26562 {
26563 gdbm_open ();
26564   ;
26565   return 0;
26566 }
26567 _ACEOF
26568 rm -f conftest.$ac_objext conftest$ac_exeext
26569 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26570   (eval $ac_link) 2>&5
26571   ac_status=$?
26572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26573   (exit $ac_status); } &&
26574          { ac_try='test -s conftest$ac_exeext'
26575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26576   (eval $ac_try) 2>&5
26577   ac_status=$?
26578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26579   (exit $ac_status); }; }; then
26580   ac_cv_lib_gdbm_gdbm_open=yes
26581 else
26582   echo "$as_me: failed program was:" >&5
26583 sed 's/^/| /' conftest.$ac_ext >&5
26584
26585 ac_cv_lib_gdbm_gdbm_open=no
26586 fi
26587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26588 LIBS=$ac_check_lib_save_LIBS
26589 fi
26590 echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
26591 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
26592 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
26593   ol_cv_lib_gdbm=-lgdbm
26594 else
26595   ol_cv_lib_gdbm=no
26596 fi
26597
26598
26599 fi
26600
26601         LIBS="$ol_LIBS"
26602
26603 fi
26604 echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
26605 echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
26606
26607
26608
26609 for ac_header in gdbm.h
26610 do
26611 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26613   echo "$as_me:$LINENO: checking for $ac_header" >&5
26614 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26615 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26616   echo $ECHO_N "(cached) $ECHO_C" >&6
26617 fi
26618 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26619 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26620 else
26621   # Is the header compilable?
26622 echo "$as_me:$LINENO: checking $ac_header usability" >&5
26623 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
26624 cat >conftest.$ac_ext <<_ACEOF
26625 #line $LINENO "configure"
26626 /* confdefs.h.  */
26627 _ACEOF
26628 cat confdefs.h >>conftest.$ac_ext
26629 cat >>conftest.$ac_ext <<_ACEOF
26630 /* end confdefs.h.  */
26631 $ac_includes_default
26632 #include <$ac_header>
26633 _ACEOF
26634 rm -f conftest.$ac_objext
26635 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
26636   (eval $ac_compile) 2>&5
26637   ac_status=$?
26638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26639   (exit $ac_status); } &&
26640          { ac_try='test -s conftest.$ac_objext'
26641   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26642   (eval $ac_try) 2>&5
26643   ac_status=$?
26644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26645   (exit $ac_status); }; }; then
26646   ac_header_compiler=yes
26647 else
26648   echo "$as_me: failed program was:" >&5
26649 sed 's/^/| /' conftest.$ac_ext >&5
26650
26651 ac_header_compiler=no
26652 fi
26653 rm -f conftest.$ac_objext conftest.$ac_ext
26654 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26655 echo "${ECHO_T}$ac_header_compiler" >&6
26656
26657 # Is the header present?
26658 echo "$as_me:$LINENO: checking $ac_header presence" >&5
26659 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
26660 cat >conftest.$ac_ext <<_ACEOF
26661 #line $LINENO "configure"
26662 /* confdefs.h.  */
26663 _ACEOF
26664 cat confdefs.h >>conftest.$ac_ext
26665 cat >>conftest.$ac_ext <<_ACEOF
26666 /* end confdefs.h.  */
26667 #include <$ac_header>
26668 _ACEOF
26669 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
26670   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26671   ac_status=$?
26672   grep -v '^ *+' conftest.er1 >conftest.err
26673   rm -f conftest.er1
26674   cat conftest.err >&5
26675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26676   (exit $ac_status); } >/dev/null; then
26677   if test -s conftest.err; then
26678     ac_cpp_err=$ac_c_preproc_warn_flag
26679   else
26680     ac_cpp_err=
26681   fi
26682 else
26683   ac_cpp_err=yes
26684 fi
26685 if test -z "$ac_cpp_err"; then
26686   ac_header_preproc=yes
26687 else
26688   echo "$as_me: failed program was:" >&5
26689 sed 's/^/| /' conftest.$ac_ext >&5
26690
26691   ac_header_preproc=no
26692 fi
26693 rm -f conftest.err conftest.$ac_ext
26694 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26695 echo "${ECHO_T}$ac_header_preproc" >&6
26696
26697 # So?  What about this header?
26698 case $ac_header_compiler:$ac_header_preproc in
26699   yes:no )
26700     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26701 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26702     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26703 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26704     (
26705       cat <<\_ASBOX
26706 ## ------------------------------------ ##
26707 ## Report this to bug-autoconf@gnu.org. ##
26708 ## ------------------------------------ ##
26709 _ASBOX
26710     ) |
26711       sed "s/^/$as_me: WARNING:     /" >&2
26712     ;;
26713   no:yes )
26714     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26715 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26716     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
26717 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
26718     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26719 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26720     (
26721       cat <<\_ASBOX
26722 ## ------------------------------------ ##
26723 ## Report this to bug-autoconf@gnu.org. ##
26724 ## ------------------------------------ ##
26725 _ASBOX
26726     ) |
26727       sed "s/^/$as_me: WARNING:     /" >&2
26728     ;;
26729 esac
26730 echo "$as_me:$LINENO: checking for $ac_header" >&5
26731 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26732 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26733   echo $ECHO_N "(cached) $ECHO_C" >&6
26734 else
26735   eval "$as_ac_Header=$ac_header_preproc"
26736 fi
26737 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
26738 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26739
26740 fi
26741 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26742   cat >>confdefs.h <<_ACEOF
26743 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26744 _ACEOF
26745
26746 fi
26747
26748 done
26749
26750  echo "$as_me:$LINENO: checking for db" >&5
26751 echo $ECHO_N "checking for db... $ECHO_C" >&6
26752 if test "${ol_cv_gdbm+set}" = set; then
26753   echo $ECHO_N "(cached) $ECHO_C" >&6
26754 else
26755
26756         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
26757                 ol_cv_gdbm=no
26758         else
26759                 ol_cv_gdbm=yes
26760         fi
26761
26762 fi
26763 echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
26764 echo "${ECHO_T}$ol_cv_gdbm" >&6
26765  if test $ol_cv_gdbm = yes ; then
26766
26767 cat >>confdefs.h <<\_ACEOF
26768 #define HAVE_GDBM 1
26769 _ACEOF
26770
26771  fi
26772
26773
26774         if test $ol_cv_gdbm = yes ; then
26775                 ol_link_ldbm=gdbm
26776                 ol_with_ldbm_api=gdbm
26777
26778                 if test $ol_cv_lib_gdbm != yes ; then
26779                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
26780                 fi
26781         fi
26782 fi
26783
26784 if test $ol_with_ldbm_api = ndbm ; then
26785         echo "$as_me:$LINENO: checking for NDBM library" >&5
26786 echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
26787 if test "${ol_cv_lib_ndbm+set}" = set; then
26788   echo $ECHO_N "(cached) $ECHO_C" >&6
26789 else
26790         ol_LIBS="$LIBS"
26791         echo "$as_me:$LINENO: checking for dbm_open" >&5
26792 echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
26793 if test "${ac_cv_func_dbm_open+set}" = set; then
26794   echo $ECHO_N "(cached) $ECHO_C" >&6
26795 else
26796   cat >conftest.$ac_ext <<_ACEOF
26797 #line $LINENO "configure"
26798 /* confdefs.h.  */
26799 _ACEOF
26800 cat confdefs.h >>conftest.$ac_ext
26801 cat >>conftest.$ac_ext <<_ACEOF
26802 /* end confdefs.h.  */
26803 /* System header to define __stub macros and hopefully few prototypes,
26804     which can conflict with char dbm_open (); below.
26805     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26806     <limits.h> exists even on freestanding compilers.  */
26807 #ifdef __STDC__
26808 # include <limits.h>
26809 #else
26810 # include <assert.h>
26811 #endif
26812 /* Override any gcc2 internal prototype to avoid an error.  */
26813 #ifdef __cplusplus
26814 extern "C"
26815 {
26816 #endif
26817 /* We use char because int might match the return type of a gcc2
26818    builtin and then its argument prototype would still apply.  */
26819 char dbm_open ();
26820 /* The GNU C library defines this for functions which it implements
26821     to always fail with ENOSYS.  Some functions are actually named
26822     something starting with __ and the normal name is an alias.  */
26823 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
26824 choke me
26825 #else
26826 char (*f) () = dbm_open;
26827 #endif
26828 #ifdef __cplusplus
26829 }
26830 #endif
26831
26832 int
26833 main ()
26834 {
26835 return f != dbm_open;
26836   ;
26837   return 0;
26838 }
26839 _ACEOF
26840 rm -f conftest.$ac_objext conftest$ac_exeext
26841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26842   (eval $ac_link) 2>&5
26843   ac_status=$?
26844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26845   (exit $ac_status); } &&
26846          { ac_try='test -s conftest$ac_exeext'
26847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26848   (eval $ac_try) 2>&5
26849   ac_status=$?
26850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26851   (exit $ac_status); }; }; then
26852   ac_cv_func_dbm_open=yes
26853 else
26854   echo "$as_me: failed program was:" >&5
26855 sed 's/^/| /' conftest.$ac_ext >&5
26856
26857 ac_cv_func_dbm_open=no
26858 fi
26859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26860 fi
26861 echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
26862 echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
26863 if test $ac_cv_func_dbm_open = yes; then
26864   ol_cv_lib_ndbm=yes
26865 else
26866
26867                 echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
26868 echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
26869 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
26870   echo $ECHO_N "(cached) $ECHO_C" >&6
26871 else
26872   ac_check_lib_save_LIBS=$LIBS
26873 LIBS="-lndbm  $LIBS"
26874 cat >conftest.$ac_ext <<_ACEOF
26875 #line $LINENO "configure"
26876 /* confdefs.h.  */
26877 _ACEOF
26878 cat confdefs.h >>conftest.$ac_ext
26879 cat >>conftest.$ac_ext <<_ACEOF
26880 /* end confdefs.h.  */
26881
26882 /* Override any gcc2 internal prototype to avoid an error.  */
26883 #ifdef __cplusplus
26884 extern "C"
26885 #endif
26886 /* We use char because int might match the return type of a gcc2
26887    builtin and then its argument prototype would still apply.  */
26888 char dbm_open ();
26889 int
26890 main ()
26891 {
26892 dbm_open ();
26893   ;
26894   return 0;
26895 }
26896 _ACEOF
26897 rm -f conftest.$ac_objext conftest$ac_exeext
26898 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26899   (eval $ac_link) 2>&5
26900   ac_status=$?
26901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26902   (exit $ac_status); } &&
26903          { ac_try='test -s conftest$ac_exeext'
26904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26905   (eval $ac_try) 2>&5
26906   ac_status=$?
26907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26908   (exit $ac_status); }; }; then
26909   ac_cv_lib_ndbm_dbm_open=yes
26910 else
26911   echo "$as_me: failed program was:" >&5
26912 sed 's/^/| /' conftest.$ac_ext >&5
26913
26914 ac_cv_lib_ndbm_dbm_open=no
26915 fi
26916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26917 LIBS=$ac_check_lib_save_LIBS
26918 fi
26919 echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
26920 echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
26921 if test $ac_cv_lib_ndbm_dbm_open = yes; then
26922   ol_cv_lib_ndbm=-lndbm
26923 else
26924
26925                         echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
26926 echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
26927 if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
26928   echo $ECHO_N "(cached) $ECHO_C" >&6
26929 else
26930   ac_check_lib_save_LIBS=$LIBS
26931 LIBS="-ldbm  $LIBS"
26932 cat >conftest.$ac_ext <<_ACEOF
26933 #line $LINENO "configure"
26934 /* confdefs.h.  */
26935 _ACEOF
26936 cat confdefs.h >>conftest.$ac_ext
26937 cat >>conftest.$ac_ext <<_ACEOF
26938 /* end confdefs.h.  */
26939
26940 /* Override any gcc2 internal prototype to avoid an error.  */
26941 #ifdef __cplusplus
26942 extern "C"
26943 #endif
26944 /* We use char because int might match the return type of a gcc2
26945    builtin and then its argument prototype would still apply.  */
26946 char dbm_open ();
26947 int
26948 main ()
26949 {
26950 dbm_open ();
26951   ;
26952   return 0;
26953 }
26954 _ACEOF
26955 rm -f conftest.$ac_objext conftest$ac_exeext
26956 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
26957   (eval $ac_link) 2>&5
26958   ac_status=$?
26959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26960   (exit $ac_status); } &&
26961          { ac_try='test -s conftest$ac_exeext'
26962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
26963   (eval $ac_try) 2>&5
26964   ac_status=$?
26965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26966   (exit $ac_status); }; }; then
26967   ac_cv_lib_dbm_dbm_open=yes
26968 else
26969   echo "$as_me: failed program was:" >&5
26970 sed 's/^/| /' conftest.$ac_ext >&5
26971
26972 ac_cv_lib_dbm_dbm_open=no
26973 fi
26974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26975 LIBS=$ac_check_lib_save_LIBS
26976 fi
26977 echo "$as_me:$LINENO: result: $ac_cv_lib_dbm_dbm_open" >&5
26978 echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
26979 if test $ac_cv_lib_dbm_dbm_open = yes; then
26980   ol_cv_lib_ndbm=-ldbm
26981 else
26982   ol_cv_lib_ndbm=no
26983 fi
26984
26985 fi
26986
26987
26988 fi
26989
26990         LIBS="$ol_LIBS"
26991
26992 fi
26993 echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
26994 echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
26995
26996
26997
26998 for ac_header in ndbm.h
26999 do
27000 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27001 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27002   echo "$as_me:$LINENO: checking for $ac_header" >&5
27003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27005   echo $ECHO_N "(cached) $ECHO_C" >&6
27006 fi
27007 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27008 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27009 else
27010   # Is the header compilable?
27011 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27012 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27013 cat >conftest.$ac_ext <<_ACEOF
27014 #line $LINENO "configure"
27015 /* confdefs.h.  */
27016 _ACEOF
27017 cat confdefs.h >>conftest.$ac_ext
27018 cat >>conftest.$ac_ext <<_ACEOF
27019 /* end confdefs.h.  */
27020 $ac_includes_default
27021 #include <$ac_header>
27022 _ACEOF
27023 rm -f conftest.$ac_objext
27024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27025   (eval $ac_compile) 2>&5
27026   ac_status=$?
27027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27028   (exit $ac_status); } &&
27029          { ac_try='test -s conftest.$ac_objext'
27030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27031   (eval $ac_try) 2>&5
27032   ac_status=$?
27033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27034   (exit $ac_status); }; }; then
27035   ac_header_compiler=yes
27036 else
27037   echo "$as_me: failed program was:" >&5
27038 sed 's/^/| /' conftest.$ac_ext >&5
27039
27040 ac_header_compiler=no
27041 fi
27042 rm -f conftest.$ac_objext conftest.$ac_ext
27043 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27044 echo "${ECHO_T}$ac_header_compiler" >&6
27045
27046 # Is the header present?
27047 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27048 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27049 cat >conftest.$ac_ext <<_ACEOF
27050 #line $LINENO "configure"
27051 /* confdefs.h.  */
27052 _ACEOF
27053 cat confdefs.h >>conftest.$ac_ext
27054 cat >>conftest.$ac_ext <<_ACEOF
27055 /* end confdefs.h.  */
27056 #include <$ac_header>
27057 _ACEOF
27058 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27060   ac_status=$?
27061   grep -v '^ *+' conftest.er1 >conftest.err
27062   rm -f conftest.er1
27063   cat conftest.err >&5
27064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27065   (exit $ac_status); } >/dev/null; then
27066   if test -s conftest.err; then
27067     ac_cpp_err=$ac_c_preproc_warn_flag
27068   else
27069     ac_cpp_err=
27070   fi
27071 else
27072   ac_cpp_err=yes
27073 fi
27074 if test -z "$ac_cpp_err"; then
27075   ac_header_preproc=yes
27076 else
27077   echo "$as_me: failed program was:" >&5
27078 sed 's/^/| /' conftest.$ac_ext >&5
27079
27080   ac_header_preproc=no
27081 fi
27082 rm -f conftest.err conftest.$ac_ext
27083 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27084 echo "${ECHO_T}$ac_header_preproc" >&6
27085
27086 # So?  What about this header?
27087 case $ac_header_compiler:$ac_header_preproc in
27088   yes:no )
27089     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27090 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27091     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27092 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27093     (
27094       cat <<\_ASBOX
27095 ## ------------------------------------ ##
27096 ## Report this to bug-autoconf@gnu.org. ##
27097 ## ------------------------------------ ##
27098 _ASBOX
27099     ) |
27100       sed "s/^/$as_me: WARNING:     /" >&2
27101     ;;
27102   no:yes )
27103     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27104 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27105     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
27106 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
27107     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27108 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27109     (
27110       cat <<\_ASBOX
27111 ## ------------------------------------ ##
27112 ## Report this to bug-autoconf@gnu.org. ##
27113 ## ------------------------------------ ##
27114 _ASBOX
27115     ) |
27116       sed "s/^/$as_me: WARNING:     /" >&2
27117     ;;
27118 esac
27119 echo "$as_me:$LINENO: checking for $ac_header" >&5
27120 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27122   echo $ECHO_N "(cached) $ECHO_C" >&6
27123 else
27124   eval "$as_ac_Header=$ac_header_preproc"
27125 fi
27126 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27127 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27128
27129 fi
27130 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27131   cat >>confdefs.h <<_ACEOF
27132 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27133 _ACEOF
27134
27135 fi
27136
27137 done
27138
27139  echo "$as_me:$LINENO: checking for db" >&5
27140 echo $ECHO_N "checking for db... $ECHO_C" >&6
27141 if test "${ol_cv_ndbm+set}" = set; then
27142   echo $ECHO_N "(cached) $ECHO_C" >&6
27143 else
27144
27145         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
27146                 ol_cv_ndbm=no
27147         else
27148                 ol_cv_ndbm=yes
27149         fi
27150
27151 fi
27152 echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
27153 echo "${ECHO_T}$ol_cv_ndbm" >&6
27154  if test $ol_cv_ndbm = yes ; then
27155
27156 cat >>confdefs.h <<\_ACEOF
27157 #define HAVE_NDBM 1
27158 _ACEOF
27159
27160  fi
27161
27162
27163         if test $ol_cv_ndbm = yes ; then
27164                 ol_link_ldbm=ndbm
27165                 ol_with_ldbm_api=ndbm
27166
27167                 if test $ol_cv_lib_ndbm != yes ; then
27168                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
27169                 fi
27170         fi
27171 fi
27172
27173 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
27174         { echo "$as_me:$LINENO: WARNING: could not find suitable LDBM backend" >&5
27175 echo "$as_me: WARNING: could not find suitable LDBM backend" >&2;}
27176         if test $ol_enable_ldbm = yes ; then
27177                 { { echo "$as_me:$LINENO: error: select appropriate LDBM options or disable" >&5
27178 echo "$as_me: error: select appropriate LDBM options or disable" >&2;}
27179    { (exit 1); exit 1; }; }
27180         fi
27181
27182         { echo "$as_me:$LINENO: WARNING: disabling LDBM" >&5
27183 echo "$as_me: WARNING: disabling LDBM" >&2;}
27184         ol_enable_ldbm=no
27185 fi
27186
27187
27188 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
27189         BUILD_LIBS_DYNAMIC=shared
27190
27191 cat >>confdefs.h <<\_ACEOF
27192 #define LDAP_LIBS_DYNAMIC 1
27193 _ACEOF
27194
27195         LTSTATIC=""
27196 else
27197         BUILD_LIBS_DYNAMIC=static
27198         LTSTATIC="-static"
27199 fi
27200
27201 if test $ol_enable_wrappers != no ; then
27202
27203 for ac_header in tcpd.h
27204 do
27205 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27206 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27207   echo "$as_me:$LINENO: checking for $ac_header" >&5
27208 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27209 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27210   echo $ECHO_N "(cached) $ECHO_C" >&6
27211 fi
27212 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27213 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27214 else
27215   # Is the header compilable?
27216 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27217 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27218 cat >conftest.$ac_ext <<_ACEOF
27219 #line $LINENO "configure"
27220 /* confdefs.h.  */
27221 _ACEOF
27222 cat confdefs.h >>conftest.$ac_ext
27223 cat >>conftest.$ac_ext <<_ACEOF
27224 /* end confdefs.h.  */
27225 $ac_includes_default
27226 #include <$ac_header>
27227 _ACEOF
27228 rm -f conftest.$ac_objext
27229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27230   (eval $ac_compile) 2>&5
27231   ac_status=$?
27232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27233   (exit $ac_status); } &&
27234          { ac_try='test -s conftest.$ac_objext'
27235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27236   (eval $ac_try) 2>&5
27237   ac_status=$?
27238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27239   (exit $ac_status); }; }; then
27240   ac_header_compiler=yes
27241 else
27242   echo "$as_me: failed program was:" >&5
27243 sed 's/^/| /' conftest.$ac_ext >&5
27244
27245 ac_header_compiler=no
27246 fi
27247 rm -f conftest.$ac_objext conftest.$ac_ext
27248 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27249 echo "${ECHO_T}$ac_header_compiler" >&6
27250
27251 # Is the header present?
27252 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27253 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27254 cat >conftest.$ac_ext <<_ACEOF
27255 #line $LINENO "configure"
27256 /* confdefs.h.  */
27257 _ACEOF
27258 cat confdefs.h >>conftest.$ac_ext
27259 cat >>conftest.$ac_ext <<_ACEOF
27260 /* end confdefs.h.  */
27261 #include <$ac_header>
27262 _ACEOF
27263 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27264   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27265   ac_status=$?
27266   grep -v '^ *+' conftest.er1 >conftest.err
27267   rm -f conftest.er1
27268   cat conftest.err >&5
27269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27270   (exit $ac_status); } >/dev/null; then
27271   if test -s conftest.err; then
27272     ac_cpp_err=$ac_c_preproc_warn_flag
27273   else
27274     ac_cpp_err=
27275   fi
27276 else
27277   ac_cpp_err=yes
27278 fi
27279 if test -z "$ac_cpp_err"; then
27280   ac_header_preproc=yes
27281 else
27282   echo "$as_me: failed program was:" >&5
27283 sed 's/^/| /' conftest.$ac_ext >&5
27284
27285   ac_header_preproc=no
27286 fi
27287 rm -f conftest.err conftest.$ac_ext
27288 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27289 echo "${ECHO_T}$ac_header_preproc" >&6
27290
27291 # So?  What about this header?
27292 case $ac_header_compiler:$ac_header_preproc in
27293   yes:no )
27294     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27295 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27296     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27297 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27298     (
27299       cat <<\_ASBOX
27300 ## ------------------------------------ ##
27301 ## Report this to bug-autoconf@gnu.org. ##
27302 ## ------------------------------------ ##
27303 _ASBOX
27304     ) |
27305       sed "s/^/$as_me: WARNING:     /" >&2
27306     ;;
27307   no:yes )
27308     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27309 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27310     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
27311 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
27312     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27313 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27314     (
27315       cat <<\_ASBOX
27316 ## ------------------------------------ ##
27317 ## Report this to bug-autoconf@gnu.org. ##
27318 ## ------------------------------------ ##
27319 _ASBOX
27320     ) |
27321       sed "s/^/$as_me: WARNING:     /" >&2
27322     ;;
27323 esac
27324 echo "$as_me:$LINENO: checking for $ac_header" >&5
27325 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27326 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27327   echo $ECHO_N "(cached) $ECHO_C" >&6
27328 else
27329   eval "$as_ac_Header=$ac_header_preproc"
27330 fi
27331 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27332 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27333
27334 fi
27335 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27336   cat >>confdefs.h <<_ACEOF
27337 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27338 _ACEOF
27339
27340                 echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
27341 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
27342                 save_LIBS="$LIBS"
27343                 LIBS="$LIBS -lwrap"
27344                 cat >conftest.$ac_ext <<_ACEOF
27345 #line $LINENO "configure"
27346 /* confdefs.h.  */
27347 _ACEOF
27348 cat confdefs.h >>conftest.$ac_ext
27349 cat >>conftest.$ac_ext <<_ACEOF
27350 /* end confdefs.h.  */
27351
27352 #include <tcpd.h>
27353 int allow_severity = 0;
27354 int deny_severity  = 0;
27355
27356 struct request_info *req;
27357
27358 int
27359 main ()
27360 {
27361
27362 hosts_access(req)
27363
27364   ;
27365   return 0;
27366 }
27367 _ACEOF
27368 rm -f conftest.$ac_objext conftest$ac_exeext
27369 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27370   (eval $ac_link) 2>&5
27371   ac_status=$?
27372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27373   (exit $ac_status); } &&
27374          { ac_try='test -s conftest$ac_exeext'
27375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27376   (eval $ac_try) 2>&5
27377   ac_status=$?
27378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27379   (exit $ac_status); }; }; then
27380   echo "$as_me:$LINENO: result: -lwrap" >&5
27381 echo "${ECHO_T}-lwrap" >&6
27382                 have_wrappers=yes
27383                 LIBS="$save_LIBS"
27384 else
27385   echo "$as_me: failed program was:" >&5
27386 sed 's/^/| /' conftest.$ac_ext >&5
27387
27388
27389                                 LIBS="$LIBS -lnsl"
27390                 cat >conftest.$ac_ext <<_ACEOF
27391 #line $LINENO "configure"
27392 /* confdefs.h.  */
27393 _ACEOF
27394 cat confdefs.h >>conftest.$ac_ext
27395 cat >>conftest.$ac_ext <<_ACEOF
27396 /* end confdefs.h.  */
27397
27398 #include <tcpd.h>
27399 int allow_severity = 0;
27400 int deny_severity  = 0;
27401
27402 struct request_info *req;
27403
27404 int
27405 main ()
27406 {
27407
27408 hosts_access(req)
27409
27410   ;
27411   return 0;
27412 }
27413 _ACEOF
27414 rm -f conftest.$ac_objext conftest$ac_exeext
27415 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27416   (eval $ac_link) 2>&5
27417   ac_status=$?
27418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27419   (exit $ac_status); } &&
27420          { ac_try='test -s conftest$ac_exeext'
27421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27422   (eval $ac_try) 2>&5
27423   ac_status=$?
27424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27425   (exit $ac_status); }; }; then
27426   echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
27427 echo "${ECHO_T}-lwrap -lnsl" >&6
27428                 have_wrappers=yes
27429                 LIBS="$save_LIBS -lnsl"
27430 else
27431   echo "$as_me: failed program was:" >&5
27432 sed 's/^/| /' conftest.$ac_ext >&5
27433
27434
27435                 echo "$as_me:$LINENO: result: no" >&5
27436 echo "${ECHO_T}no" >&6
27437                 have_wrappers=no
27438                 LIBS=$save_LIBS
27439 fi
27440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27441 fi
27442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27443 else
27444   have_wrappers=no
27445 fi
27446
27447 done
27448
27449
27450         if test $have_wrappers = yes ; then
27451
27452 cat >>confdefs.h <<\_ACEOF
27453 #define HAVE_TCPD 1
27454 _ACEOF
27455
27456                 WRAP_LIBS="-lwrap"
27457         elif test $ol_enable_wrappers = yes ; then
27458                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options ore disable" >&5
27459 echo "$as_me: error: could not find TCP wrappers, select apppropriate options ore disable" >&2;}
27460    { (exit 1); exit 1; }; }
27461         else
27462                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
27463 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
27464                 WRAP_LIBS=""
27465         fi
27466 fi
27467
27468 if test $ol_enable_syslog != no ; then
27469         echo "$as_me:$LINENO: checking for openlog" >&5
27470 echo $ECHO_N "checking for openlog... $ECHO_C" >&6
27471 if test "${ac_cv_func_openlog+set}" = set; then
27472   echo $ECHO_N "(cached) $ECHO_C" >&6
27473 else
27474   cat >conftest.$ac_ext <<_ACEOF
27475 #line $LINENO "configure"
27476 /* confdefs.h.  */
27477 _ACEOF
27478 cat confdefs.h >>conftest.$ac_ext
27479 cat >>conftest.$ac_ext <<_ACEOF
27480 /* end confdefs.h.  */
27481 /* System header to define __stub macros and hopefully few prototypes,
27482     which can conflict with char openlog (); below.
27483     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27484     <limits.h> exists even on freestanding compilers.  */
27485 #ifdef __STDC__
27486 # include <limits.h>
27487 #else
27488 # include <assert.h>
27489 #endif
27490 /* Override any gcc2 internal prototype to avoid an error.  */
27491 #ifdef __cplusplus
27492 extern "C"
27493 {
27494 #endif
27495 /* We use char because int might match the return type of a gcc2
27496    builtin and then its argument prototype would still apply.  */
27497 char openlog ();
27498 /* The GNU C library defines this for functions which it implements
27499     to always fail with ENOSYS.  Some functions are actually named
27500     something starting with __ and the normal name is an alias.  */
27501 #if defined (__stub_openlog) || defined (__stub___openlog)
27502 choke me
27503 #else
27504 char (*f) () = openlog;
27505 #endif
27506 #ifdef __cplusplus
27507 }
27508 #endif
27509
27510 int
27511 main ()
27512 {
27513 return f != openlog;
27514   ;
27515   return 0;
27516 }
27517 _ACEOF
27518 rm -f conftest.$ac_objext conftest$ac_exeext
27519 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27520   (eval $ac_link) 2>&5
27521   ac_status=$?
27522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27523   (exit $ac_status); } &&
27524          { ac_try='test -s conftest$ac_exeext'
27525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27526   (eval $ac_try) 2>&5
27527   ac_status=$?
27528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27529   (exit $ac_status); }; }; then
27530   ac_cv_func_openlog=yes
27531 else
27532   echo "$as_me: failed program was:" >&5
27533 sed 's/^/| /' conftest.$ac_ext >&5
27534
27535 ac_cv_func_openlog=no
27536 fi
27537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27538 fi
27539 echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
27540 echo "${ECHO_T}$ac_cv_func_openlog" >&6
27541
27542         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
27543                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
27544 echo "$as_me: error: could not find syslog" >&2;}
27545    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
27546         fi
27547         ol_enable_syslog=$ac_cv_func_openlog
27548 fi
27549
27550
27551 ol_link_sql=no
27552 if test $ol_enable_sql != no ; then
27553
27554
27555 for ac_header in sql.h sqlext.h
27556 do
27557 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27559   echo "$as_me:$LINENO: checking for $ac_header" >&5
27560 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27561 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27562   echo $ECHO_N "(cached) $ECHO_C" >&6
27563 fi
27564 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27565 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27566 else
27567   # Is the header compilable?
27568 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27569 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27570 cat >conftest.$ac_ext <<_ACEOF
27571 #line $LINENO "configure"
27572 /* confdefs.h.  */
27573 _ACEOF
27574 cat confdefs.h >>conftest.$ac_ext
27575 cat >>conftest.$ac_ext <<_ACEOF
27576 /* end confdefs.h.  */
27577 $ac_includes_default
27578 #include <$ac_header>
27579 _ACEOF
27580 rm -f conftest.$ac_objext
27581 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27582   (eval $ac_compile) 2>&5
27583   ac_status=$?
27584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27585   (exit $ac_status); } &&
27586          { ac_try='test -s conftest.$ac_objext'
27587   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27588   (eval $ac_try) 2>&5
27589   ac_status=$?
27590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27591   (exit $ac_status); }; }; then
27592   ac_header_compiler=yes
27593 else
27594   echo "$as_me: failed program was:" >&5
27595 sed 's/^/| /' conftest.$ac_ext >&5
27596
27597 ac_header_compiler=no
27598 fi
27599 rm -f conftest.$ac_objext conftest.$ac_ext
27600 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27601 echo "${ECHO_T}$ac_header_compiler" >&6
27602
27603 # Is the header present?
27604 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27605 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27606 cat >conftest.$ac_ext <<_ACEOF
27607 #line $LINENO "configure"
27608 /* confdefs.h.  */
27609 _ACEOF
27610 cat confdefs.h >>conftest.$ac_ext
27611 cat >>conftest.$ac_ext <<_ACEOF
27612 /* end confdefs.h.  */
27613 #include <$ac_header>
27614 _ACEOF
27615 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27617   ac_status=$?
27618   grep -v '^ *+' conftest.er1 >conftest.err
27619   rm -f conftest.er1
27620   cat conftest.err >&5
27621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27622   (exit $ac_status); } >/dev/null; then
27623   if test -s conftest.err; then
27624     ac_cpp_err=$ac_c_preproc_warn_flag
27625   else
27626     ac_cpp_err=
27627   fi
27628 else
27629   ac_cpp_err=yes
27630 fi
27631 if test -z "$ac_cpp_err"; then
27632   ac_header_preproc=yes
27633 else
27634   echo "$as_me: failed program was:" >&5
27635 sed 's/^/| /' conftest.$ac_ext >&5
27636
27637   ac_header_preproc=no
27638 fi
27639 rm -f conftest.err conftest.$ac_ext
27640 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27641 echo "${ECHO_T}$ac_header_preproc" >&6
27642
27643 # So?  What about this header?
27644 case $ac_header_compiler:$ac_header_preproc in
27645   yes:no )
27646     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27647 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27648     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27649 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27650     (
27651       cat <<\_ASBOX
27652 ## ------------------------------------ ##
27653 ## Report this to bug-autoconf@gnu.org. ##
27654 ## ------------------------------------ ##
27655 _ASBOX
27656     ) |
27657       sed "s/^/$as_me: WARNING:     /" >&2
27658     ;;
27659   no:yes )
27660     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27661 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27662     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
27663 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
27664     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27665 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27666     (
27667       cat <<\_ASBOX
27668 ## ------------------------------------ ##
27669 ## Report this to bug-autoconf@gnu.org. ##
27670 ## ------------------------------------ ##
27671 _ASBOX
27672     ) |
27673       sed "s/^/$as_me: WARNING:     /" >&2
27674     ;;
27675 esac
27676 echo "$as_me:$LINENO: checking for $ac_header" >&5
27677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27679   echo $ECHO_N "(cached) $ECHO_C" >&6
27680 else
27681   eval "$as_ac_Header=$ac_header_preproc"
27682 fi
27683 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27684 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27685
27686 fi
27687 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27688   cat >>confdefs.h <<_ACEOF
27689 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27690 _ACEOF
27691
27692 else
27693
27694                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
27695 echo "$as_me: error: could not locate SQL headers" >&2;}
27696    { (exit 1); exit 1; }; }
27697
27698 fi
27699
27700 done
27701
27702
27703         echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
27704 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
27705 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
27706   echo $ECHO_N "(cached) $ECHO_C" >&6
27707 else
27708   ac_check_lib_save_LIBS=$LIBS
27709 LIBS="-liodbc  $LIBS"
27710 cat >conftest.$ac_ext <<_ACEOF
27711 #line $LINENO "configure"
27712 /* confdefs.h.  */
27713 _ACEOF
27714 cat confdefs.h >>conftest.$ac_ext
27715 cat >>conftest.$ac_ext <<_ACEOF
27716 /* end confdefs.h.  */
27717
27718 /* Override any gcc2 internal prototype to avoid an error.  */
27719 #ifdef __cplusplus
27720 extern "C"
27721 #endif
27722 /* We use char because int might match the return type of a gcc2
27723    builtin and then its argument prototype would still apply.  */
27724 char SQLDriverConnect ();
27725 int
27726 main ()
27727 {
27728 SQLDriverConnect ();
27729   ;
27730   return 0;
27731 }
27732 _ACEOF
27733 rm -f conftest.$ac_objext conftest$ac_exeext
27734 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27735   (eval $ac_link) 2>&5
27736   ac_status=$?
27737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27738   (exit $ac_status); } &&
27739          { ac_try='test -s conftest$ac_exeext'
27740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27741   (eval $ac_try) 2>&5
27742   ac_status=$?
27743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27744   (exit $ac_status); }; }; then
27745   ac_cv_lib_iodbc_SQLDriverConnect=yes
27746 else
27747   echo "$as_me: failed program was:" >&5
27748 sed 's/^/| /' conftest.$ac_ext >&5
27749
27750 ac_cv_lib_iodbc_SQLDriverConnect=no
27751 fi
27752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27753 LIBS=$ac_check_lib_save_LIBS
27754 fi
27755 echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
27756 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
27757 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
27758   have_iodbc=yes
27759 else
27760   have_iodbc=no
27761 fi
27762
27763         if test $have_iodbc = yes ; then
27764                 ol_link_sql="-liodbc"
27765         else
27766                 echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
27767 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
27768 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
27769   echo $ECHO_N "(cached) $ECHO_C" >&6
27770 else
27771   ac_check_lib_save_LIBS=$LIBS
27772 LIBS="-lodbc  $LIBS"
27773 cat >conftest.$ac_ext <<_ACEOF
27774 #line $LINENO "configure"
27775 /* confdefs.h.  */
27776 _ACEOF
27777 cat confdefs.h >>conftest.$ac_ext
27778 cat >>conftest.$ac_ext <<_ACEOF
27779 /* end confdefs.h.  */
27780
27781 /* Override any gcc2 internal prototype to avoid an error.  */
27782 #ifdef __cplusplus
27783 extern "C"
27784 #endif
27785 /* We use char because int might match the return type of a gcc2
27786    builtin and then its argument prototype would still apply.  */
27787 char SQLDriverConnect ();
27788 int
27789 main ()
27790 {
27791 SQLDriverConnect ();
27792   ;
27793   return 0;
27794 }
27795 _ACEOF
27796 rm -f conftest.$ac_objext conftest$ac_exeext
27797 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
27798   (eval $ac_link) 2>&5
27799   ac_status=$?
27800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27801   (exit $ac_status); } &&
27802          { ac_try='test -s conftest$ac_exeext'
27803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27804   (eval $ac_try) 2>&5
27805   ac_status=$?
27806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27807   (exit $ac_status); }; }; then
27808   ac_cv_lib_odbc_SQLDriverConnect=yes
27809 else
27810   echo "$as_me: failed program was:" >&5
27811 sed 's/^/| /' conftest.$ac_ext >&5
27812
27813 ac_cv_lib_odbc_SQLDriverConnect=no
27814 fi
27815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27816 LIBS=$ac_check_lib_save_LIBS
27817 fi
27818 echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
27819 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
27820 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
27821   have_odbc=yes
27822 else
27823   have_odbc=no
27824 fi
27825
27826                 if test $have_odbc = yes ; then
27827                         ol_link_sql="-lodbc"
27828                 fi
27829         fi
27830
27831         if test $ol_link_sql != no ; then
27832                 SLAPD_SQL_LIBS="$ol_link_sql"
27833
27834         elif test $ol_enable_sql != auto ; then
27835                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
27836 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
27837    { (exit 1); exit 1; }; }
27838         fi
27839 fi
27840
27841 if test $ol_enable_tcl != no ; then
27842
27843 for ac_header in tcl.h
27844 do
27845 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27846 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27847   echo "$as_me:$LINENO: checking for $ac_header" >&5
27848 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27849 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27850   echo $ECHO_N "(cached) $ECHO_C" >&6
27851 fi
27852 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27853 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27854 else
27855   # Is the header compilable?
27856 echo "$as_me:$LINENO: checking $ac_header usability" >&5
27857 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
27858 cat >conftest.$ac_ext <<_ACEOF
27859 #line $LINENO "configure"
27860 /* confdefs.h.  */
27861 _ACEOF
27862 cat confdefs.h >>conftest.$ac_ext
27863 cat >>conftest.$ac_ext <<_ACEOF
27864 /* end confdefs.h.  */
27865 $ac_includes_default
27866 #include <$ac_header>
27867 _ACEOF
27868 rm -f conftest.$ac_objext
27869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27870   (eval $ac_compile) 2>&5
27871   ac_status=$?
27872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27873   (exit $ac_status); } &&
27874          { ac_try='test -s conftest.$ac_objext'
27875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
27876   (eval $ac_try) 2>&5
27877   ac_status=$?
27878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27879   (exit $ac_status); }; }; then
27880   ac_header_compiler=yes
27881 else
27882   echo "$as_me: failed program was:" >&5
27883 sed 's/^/| /' conftest.$ac_ext >&5
27884
27885 ac_header_compiler=no
27886 fi
27887 rm -f conftest.$ac_objext conftest.$ac_ext
27888 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27889 echo "${ECHO_T}$ac_header_compiler" >&6
27890
27891 # Is the header present?
27892 echo "$as_me:$LINENO: checking $ac_header presence" >&5
27893 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
27894 cat >conftest.$ac_ext <<_ACEOF
27895 #line $LINENO "configure"
27896 /* confdefs.h.  */
27897 _ACEOF
27898 cat confdefs.h >>conftest.$ac_ext
27899 cat >>conftest.$ac_ext <<_ACEOF
27900 /* end confdefs.h.  */
27901 #include <$ac_header>
27902 _ACEOF
27903 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
27904   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
27905   ac_status=$?
27906   grep -v '^ *+' conftest.er1 >conftest.err
27907   rm -f conftest.er1
27908   cat conftest.err >&5
27909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27910   (exit $ac_status); } >/dev/null; then
27911   if test -s conftest.err; then
27912     ac_cpp_err=$ac_c_preproc_warn_flag
27913   else
27914     ac_cpp_err=
27915   fi
27916 else
27917   ac_cpp_err=yes
27918 fi
27919 if test -z "$ac_cpp_err"; then
27920   ac_header_preproc=yes
27921 else
27922   echo "$as_me: failed program was:" >&5
27923 sed 's/^/| /' conftest.$ac_ext >&5
27924
27925   ac_header_preproc=no
27926 fi
27927 rm -f conftest.err conftest.$ac_ext
27928 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27929 echo "${ECHO_T}$ac_header_preproc" >&6
27930
27931 # So?  What about this header?
27932 case $ac_header_compiler:$ac_header_preproc in
27933   yes:no )
27934     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27935 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27936     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27937 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27938     (
27939       cat <<\_ASBOX
27940 ## ------------------------------------ ##
27941 ## Report this to bug-autoconf@gnu.org. ##
27942 ## ------------------------------------ ##
27943 _ASBOX
27944     ) |
27945       sed "s/^/$as_me: WARNING:     /" >&2
27946     ;;
27947   no:yes )
27948     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27949 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27950     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
27951 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
27952     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27953 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27954     (
27955       cat <<\_ASBOX
27956 ## ------------------------------------ ##
27957 ## Report this to bug-autoconf@gnu.org. ##
27958 ## ------------------------------------ ##
27959 _ASBOX
27960     ) |
27961       sed "s/^/$as_me: WARNING:     /" >&2
27962     ;;
27963 esac
27964 echo "$as_me:$LINENO: checking for $ac_header" >&5
27965 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
27966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
27967   echo $ECHO_N "(cached) $ECHO_C" >&6
27968 else
27969   eval "$as_ac_Header=$ac_header_preproc"
27970 fi
27971 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
27972 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
27973
27974 fi
27975 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27976   cat >>confdefs.h <<_ACEOF
27977 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27978 _ACEOF
27979
27980 fi
27981
27982 done
27983
27984
27985         if test $ac_cv_header_tcl_h != yes ; then
27986                 have_tcl=no
27987         else
27988                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
27989                         as_ac_Lib=`echo "ac_cv_lib_$lib''_main" | $as_tr_sh`
27990 echo "$as_me:$LINENO: checking for main in -l$lib" >&5
27991 echo $ECHO_N "checking for main in -l$lib... $ECHO_C" >&6
27992 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
27993   echo $ECHO_N "(cached) $ECHO_C" >&6
27994 else
27995   ac_check_lib_save_LIBS=$LIBS
27996 LIBS="-l$lib  $LIBS"
27997 cat >conftest.$ac_ext <<_ACEOF
27998 #line $LINENO "configure"
27999 /* confdefs.h.  */
28000 _ACEOF
28001 cat confdefs.h >>conftest.$ac_ext
28002 cat >>conftest.$ac_ext <<_ACEOF
28003 /* end confdefs.h.  */
28004
28005
28006 int
28007 main ()
28008 {
28009 main ();
28010   ;
28011   return 0;
28012 }
28013 _ACEOF
28014 rm -f conftest.$ac_objext conftest$ac_exeext
28015 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28016   (eval $ac_link) 2>&5
28017   ac_status=$?
28018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28019   (exit $ac_status); } &&
28020          { ac_try='test -s conftest$ac_exeext'
28021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28022   (eval $ac_try) 2>&5
28023   ac_status=$?
28024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28025   (exit $ac_status); }; }; then
28026   eval "$as_ac_Lib=yes"
28027 else
28028   echo "$as_me: failed program was:" >&5
28029 sed 's/^/| /' conftest.$ac_ext >&5
28030
28031 eval "$as_ac_Lib=no"
28032 fi
28033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28034 LIBS=$ac_check_lib_save_LIBS
28035 fi
28036 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
28037 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
28038 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
28039   have_tcl=yes
28040                            if test x"$ol_with_tcl_module" = "xstatic" ; then
28041                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
28042                            else
28043                                         MOD_TCL_LIB="-l${lib}"
28044                            fi;break
28045 else
28046   have_tcl=no
28047 fi
28048
28049                 done
28050         fi
28051
28052         if test $have_tcl != yes ; then
28053                 { echo "$as_me:$LINENO: WARNING: could not find -ltcl" >&5
28054 echo "$as_me: WARNING: could not find -ltcl" >&2;}
28055                 if test $ol_enable_tcl = yes ; then
28056                         { { echo "$as_me:$LINENO: error: could not find tcl, select appropriate options or disable" >&5
28057 echo "$as_me: error: could not find tcl, select appropriate options or disable" >&2;}
28058    { (exit 1); exit 1; }; }
28059                 fi
28060
28061                 ol_enable_tcl=no
28062         fi
28063 fi
28064
28065 ol_link_termcap=no
28066
28067
28068 for ac_header in termcap.h ncurses.h
28069 do
28070 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28071 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28072   echo "$as_me:$LINENO: checking for $ac_header" >&5
28073 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28074 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28075   echo $ECHO_N "(cached) $ECHO_C" >&6
28076 fi
28077 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28078 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28079 else
28080   # Is the header compilable?
28081 echo "$as_me:$LINENO: checking $ac_header usability" >&5
28082 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
28083 cat >conftest.$ac_ext <<_ACEOF
28084 #line $LINENO "configure"
28085 /* confdefs.h.  */
28086 _ACEOF
28087 cat confdefs.h >>conftest.$ac_ext
28088 cat >>conftest.$ac_ext <<_ACEOF
28089 /* end confdefs.h.  */
28090 $ac_includes_default
28091 #include <$ac_header>
28092 _ACEOF
28093 rm -f conftest.$ac_objext
28094 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
28095   (eval $ac_compile) 2>&5
28096   ac_status=$?
28097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28098   (exit $ac_status); } &&
28099          { ac_try='test -s conftest.$ac_objext'
28100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28101   (eval $ac_try) 2>&5
28102   ac_status=$?
28103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28104   (exit $ac_status); }; }; then
28105   ac_header_compiler=yes
28106 else
28107   echo "$as_me: failed program was:" >&5
28108 sed 's/^/| /' conftest.$ac_ext >&5
28109
28110 ac_header_compiler=no
28111 fi
28112 rm -f conftest.$ac_objext conftest.$ac_ext
28113 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28114 echo "${ECHO_T}$ac_header_compiler" >&6
28115
28116 # Is the header present?
28117 echo "$as_me:$LINENO: checking $ac_header presence" >&5
28118 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
28119 cat >conftest.$ac_ext <<_ACEOF
28120 #line $LINENO "configure"
28121 /* confdefs.h.  */
28122 _ACEOF
28123 cat confdefs.h >>conftest.$ac_ext
28124 cat >>conftest.$ac_ext <<_ACEOF
28125 /* end confdefs.h.  */
28126 #include <$ac_header>
28127 _ACEOF
28128 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
28129   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
28130   ac_status=$?
28131   grep -v '^ *+' conftest.er1 >conftest.err
28132   rm -f conftest.er1
28133   cat conftest.err >&5
28134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28135   (exit $ac_status); } >/dev/null; then
28136   if test -s conftest.err; then
28137     ac_cpp_err=$ac_c_preproc_warn_flag
28138   else
28139     ac_cpp_err=
28140   fi
28141 else
28142   ac_cpp_err=yes
28143 fi
28144 if test -z "$ac_cpp_err"; then
28145   ac_header_preproc=yes
28146 else
28147   echo "$as_me: failed program was:" >&5
28148 sed 's/^/| /' conftest.$ac_ext >&5
28149
28150   ac_header_preproc=no
28151 fi
28152 rm -f conftest.err conftest.$ac_ext
28153 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28154 echo "${ECHO_T}$ac_header_preproc" >&6
28155
28156 # So?  What about this header?
28157 case $ac_header_compiler:$ac_header_preproc in
28158   yes:no )
28159     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28160 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28161     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28162 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28163     (
28164       cat <<\_ASBOX
28165 ## ------------------------------------ ##
28166 ## Report this to bug-autoconf@gnu.org. ##
28167 ## ------------------------------------ ##
28168 _ASBOX
28169     ) |
28170       sed "s/^/$as_me: WARNING:     /" >&2
28171     ;;
28172   no:yes )
28173     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28174 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28175     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
28176 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
28177     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28178 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28179     (
28180       cat <<\_ASBOX
28181 ## ------------------------------------ ##
28182 ## Report this to bug-autoconf@gnu.org. ##
28183 ## ------------------------------------ ##
28184 _ASBOX
28185     ) |
28186       sed "s/^/$as_me: WARNING:     /" >&2
28187     ;;
28188 esac
28189 echo "$as_me:$LINENO: checking for $ac_header" >&5
28190 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28191 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28192   echo $ECHO_N "(cached) $ECHO_C" >&6
28193 else
28194   eval "$as_ac_Header=$ac_header_preproc"
28195 fi
28196 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28197 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28198
28199 fi
28200 if test `eval echo '${'$as_ac_Header'}'` = yes; then
28201   cat >>confdefs.h <<_ACEOF
28202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28203 _ACEOF
28204
28205 fi
28206
28207 done
28208
28209
28210 if test $ol_link_termcap = no ; then
28211         echo "$as_me:$LINENO: checking for tputs in -ltermcap" >&5
28212 echo $ECHO_N "checking for tputs in -ltermcap... $ECHO_C" >&6
28213 if test "${ac_cv_lib_termcap_tputs+set}" = set; then
28214   echo $ECHO_N "(cached) $ECHO_C" >&6
28215 else
28216   ac_check_lib_save_LIBS=$LIBS
28217 LIBS="-ltermcap  $LIBS"
28218 cat >conftest.$ac_ext <<_ACEOF
28219 #line $LINENO "configure"
28220 /* confdefs.h.  */
28221 _ACEOF
28222 cat confdefs.h >>conftest.$ac_ext
28223 cat >>conftest.$ac_ext <<_ACEOF
28224 /* end confdefs.h.  */
28225
28226 /* Override any gcc2 internal prototype to avoid an error.  */
28227 #ifdef __cplusplus
28228 extern "C"
28229 #endif
28230 /* We use char because int might match the return type of a gcc2
28231    builtin and then its argument prototype would still apply.  */
28232 char tputs ();
28233 int
28234 main ()
28235 {
28236 tputs ();
28237   ;
28238   return 0;
28239 }
28240 _ACEOF
28241 rm -f conftest.$ac_objext conftest$ac_exeext
28242 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28243   (eval $ac_link) 2>&5
28244   ac_status=$?
28245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28246   (exit $ac_status); } &&
28247          { ac_try='test -s conftest$ac_exeext'
28248   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28249   (eval $ac_try) 2>&5
28250   ac_status=$?
28251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28252   (exit $ac_status); }; }; then
28253   ac_cv_lib_termcap_tputs=yes
28254 else
28255   echo "$as_me: failed program was:" >&5
28256 sed 's/^/| /' conftest.$ac_ext >&5
28257
28258 ac_cv_lib_termcap_tputs=no
28259 fi
28260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28261 LIBS=$ac_check_lib_save_LIBS
28262 fi
28263 echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tputs" >&5
28264 echo "${ECHO_T}$ac_cv_lib_termcap_tputs" >&6
28265 if test $ac_cv_lib_termcap_tputs = yes; then
28266   have_termcap=yes
28267 else
28268   have_termcap=no
28269 fi
28270
28271         if test $have_termcap = yes ; then
28272
28273 cat >>confdefs.h <<\_ACEOF
28274 #define HAVE_TERMCAP 1
28275 _ACEOF
28276
28277                 ol_link_termcap=yes
28278                 TERMCAP_LIBS=-ltermcap
28279         fi
28280 fi
28281
28282 if test $ol_link_termcap = no ; then
28283         echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5
28284 echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6
28285 if test "${ac_cv_lib_ncurses_initscr+set}" = set; then
28286   echo $ECHO_N "(cached) $ECHO_C" >&6
28287 else
28288   ac_check_lib_save_LIBS=$LIBS
28289 LIBS="-lncurses  $LIBS"
28290 cat >conftest.$ac_ext <<_ACEOF
28291 #line $LINENO "configure"
28292 /* confdefs.h.  */
28293 _ACEOF
28294 cat confdefs.h >>conftest.$ac_ext
28295 cat >>conftest.$ac_ext <<_ACEOF
28296 /* end confdefs.h.  */
28297
28298 /* Override any gcc2 internal prototype to avoid an error.  */
28299 #ifdef __cplusplus
28300 extern "C"
28301 #endif
28302 /* We use char because int might match the return type of a gcc2
28303    builtin and then its argument prototype would still apply.  */
28304 char initscr ();
28305 int
28306 main ()
28307 {
28308 initscr ();
28309   ;
28310   return 0;
28311 }
28312 _ACEOF
28313 rm -f conftest.$ac_objext conftest$ac_exeext
28314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28315   (eval $ac_link) 2>&5
28316   ac_status=$?
28317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28318   (exit $ac_status); } &&
28319          { ac_try='test -s conftest$ac_exeext'
28320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28321   (eval $ac_try) 2>&5
28322   ac_status=$?
28323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28324   (exit $ac_status); }; }; then
28325   ac_cv_lib_ncurses_initscr=yes
28326 else
28327   echo "$as_me: failed program was:" >&5
28328 sed 's/^/| /' conftest.$ac_ext >&5
28329
28330 ac_cv_lib_ncurses_initscr=no
28331 fi
28332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28333 LIBS=$ac_check_lib_save_LIBS
28334 fi
28335 echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5
28336 echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6
28337 if test $ac_cv_lib_ncurses_initscr = yes; then
28338   have_ncurses=yes
28339 else
28340   have_ncurses=no
28341 fi
28342
28343         if test $have_ncurses = yes ; then
28344
28345 cat >>confdefs.h <<\_ACEOF
28346 #define HAVE_NCURSES 1
28347 _ACEOF
28348
28349                 ol_link_termcap=yes
28350                 TERMCAP_LIBS=-lncurses
28351         fi
28352 fi
28353
28354 if test $ol_link_termcap = no ; then
28355
28356 cat >>confdefs.h <<\_ACEOF
28357 #define NO_TERMCAP 1
28358 _ACEOF
28359
28360         TERMCAP_LIBS=
28361 fi
28362
28363 ol_link_sasl=no
28364 ol_link_spasswd=no
28365 if test $ol_with_cyrus_sasl != no ; then
28366
28367
28368 for ac_header in sasl/sasl.h sasl.h
28369 do
28370 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28371 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28372   echo "$as_me:$LINENO: checking for $ac_header" >&5
28373 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28374 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28375   echo $ECHO_N "(cached) $ECHO_C" >&6
28376 fi
28377 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28378 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28379 else
28380   # Is the header compilable?
28381 echo "$as_me:$LINENO: checking $ac_header usability" >&5
28382 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
28383 cat >conftest.$ac_ext <<_ACEOF
28384 #line $LINENO "configure"
28385 /* confdefs.h.  */
28386 _ACEOF
28387 cat confdefs.h >>conftest.$ac_ext
28388 cat >>conftest.$ac_ext <<_ACEOF
28389 /* end confdefs.h.  */
28390 $ac_includes_default
28391 #include <$ac_header>
28392 _ACEOF
28393 rm -f conftest.$ac_objext
28394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
28395   (eval $ac_compile) 2>&5
28396   ac_status=$?
28397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28398   (exit $ac_status); } &&
28399          { ac_try='test -s conftest.$ac_objext'
28400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28401   (eval $ac_try) 2>&5
28402   ac_status=$?
28403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28404   (exit $ac_status); }; }; then
28405   ac_header_compiler=yes
28406 else
28407   echo "$as_me: failed program was:" >&5
28408 sed 's/^/| /' conftest.$ac_ext >&5
28409
28410 ac_header_compiler=no
28411 fi
28412 rm -f conftest.$ac_objext conftest.$ac_ext
28413 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28414 echo "${ECHO_T}$ac_header_compiler" >&6
28415
28416 # Is the header present?
28417 echo "$as_me:$LINENO: checking $ac_header presence" >&5
28418 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
28419 cat >conftest.$ac_ext <<_ACEOF
28420 #line $LINENO "configure"
28421 /* confdefs.h.  */
28422 _ACEOF
28423 cat confdefs.h >>conftest.$ac_ext
28424 cat >>conftest.$ac_ext <<_ACEOF
28425 /* end confdefs.h.  */
28426 #include <$ac_header>
28427 _ACEOF
28428 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
28429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
28430   ac_status=$?
28431   grep -v '^ *+' conftest.er1 >conftest.err
28432   rm -f conftest.er1
28433   cat conftest.err >&5
28434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28435   (exit $ac_status); } >/dev/null; then
28436   if test -s conftest.err; then
28437     ac_cpp_err=$ac_c_preproc_warn_flag
28438   else
28439     ac_cpp_err=
28440   fi
28441 else
28442   ac_cpp_err=yes
28443 fi
28444 if test -z "$ac_cpp_err"; then
28445   ac_header_preproc=yes
28446 else
28447   echo "$as_me: failed program was:" >&5
28448 sed 's/^/| /' conftest.$ac_ext >&5
28449
28450   ac_header_preproc=no
28451 fi
28452 rm -f conftest.err conftest.$ac_ext
28453 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28454 echo "${ECHO_T}$ac_header_preproc" >&6
28455
28456 # So?  What about this header?
28457 case $ac_header_compiler:$ac_header_preproc in
28458   yes:no )
28459     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28460 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28461     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28462 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28463     (
28464       cat <<\_ASBOX
28465 ## ------------------------------------ ##
28466 ## Report this to bug-autoconf@gnu.org. ##
28467 ## ------------------------------------ ##
28468 _ASBOX
28469     ) |
28470       sed "s/^/$as_me: WARNING:     /" >&2
28471     ;;
28472   no:yes )
28473     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28474 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28475     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
28476 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
28477     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28478 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28479     (
28480       cat <<\_ASBOX
28481 ## ------------------------------------ ##
28482 ## Report this to bug-autoconf@gnu.org. ##
28483 ## ------------------------------------ ##
28484 _ASBOX
28485     ) |
28486       sed "s/^/$as_me: WARNING:     /" >&2
28487     ;;
28488 esac
28489 echo "$as_me:$LINENO: checking for $ac_header" >&5
28490 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28491 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28492   echo $ECHO_N "(cached) $ECHO_C" >&6
28493 else
28494   eval "$as_ac_Header=$ac_header_preproc"
28495 fi
28496 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28497 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28498
28499 fi
28500 if test `eval echo '${'$as_ac_Header'}'` = yes; then
28501   cat >>confdefs.h <<_ACEOF
28502 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28503 _ACEOF
28504
28505 fi
28506
28507 done
28508
28509
28510         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
28511                 echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
28512 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
28513 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
28514   echo $ECHO_N "(cached) $ECHO_C" >&6
28515 else
28516   ac_check_lib_save_LIBS=$LIBS
28517 LIBS="-lsasl2  $LIBS"
28518 cat >conftest.$ac_ext <<_ACEOF
28519 #line $LINENO "configure"
28520 /* confdefs.h.  */
28521 _ACEOF
28522 cat confdefs.h >>conftest.$ac_ext
28523 cat >>conftest.$ac_ext <<_ACEOF
28524 /* end confdefs.h.  */
28525
28526 /* Override any gcc2 internal prototype to avoid an error.  */
28527 #ifdef __cplusplus
28528 extern "C"
28529 #endif
28530 /* We use char because int might match the return type of a gcc2
28531    builtin and then its argument prototype would still apply.  */
28532 char sasl_client_init ();
28533 int
28534 main ()
28535 {
28536 sasl_client_init ();
28537   ;
28538   return 0;
28539 }
28540 _ACEOF
28541 rm -f conftest.$ac_objext conftest$ac_exeext
28542 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28543   (eval $ac_link) 2>&5
28544   ac_status=$?
28545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28546   (exit $ac_status); } &&
28547          { ac_try='test -s conftest$ac_exeext'
28548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28549   (eval $ac_try) 2>&5
28550   ac_status=$?
28551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28552   (exit $ac_status); }; }; then
28553   ac_cv_lib_sasl2_sasl_client_init=yes
28554 else
28555   echo "$as_me: failed program was:" >&5
28556 sed 's/^/| /' conftest.$ac_ext >&5
28557
28558 ac_cv_lib_sasl2_sasl_client_init=no
28559 fi
28560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28561 LIBS=$ac_check_lib_save_LIBS
28562 fi
28563 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
28564 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
28565 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
28566   ol_link_sasl="-lsasl2"
28567 else
28568   echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
28569 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
28570 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
28571   echo $ECHO_N "(cached) $ECHO_C" >&6
28572 else
28573   ac_check_lib_save_LIBS=$LIBS
28574 LIBS="-lsasl  $LIBS"
28575 cat >conftest.$ac_ext <<_ACEOF
28576 #line $LINENO "configure"
28577 /* confdefs.h.  */
28578 _ACEOF
28579 cat confdefs.h >>conftest.$ac_ext
28580 cat >>conftest.$ac_ext <<_ACEOF
28581 /* end confdefs.h.  */
28582
28583 /* Override any gcc2 internal prototype to avoid an error.  */
28584 #ifdef __cplusplus
28585 extern "C"
28586 #endif
28587 /* We use char because int might match the return type of a gcc2
28588    builtin and then its argument prototype would still apply.  */
28589 char sasl_client_init ();
28590 int
28591 main ()
28592 {
28593 sasl_client_init ();
28594   ;
28595   return 0;
28596 }
28597 _ACEOF
28598 rm -f conftest.$ac_objext conftest$ac_exeext
28599 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28600   (eval $ac_link) 2>&5
28601   ac_status=$?
28602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28603   (exit $ac_status); } &&
28604          { ac_try='test -s conftest$ac_exeext'
28605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28606   (eval $ac_try) 2>&5
28607   ac_status=$?
28608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28609   (exit $ac_status); }; }; then
28610   ac_cv_lib_sasl_sasl_client_init=yes
28611 else
28612   echo "$as_me: failed program was:" >&5
28613 sed 's/^/| /' conftest.$ac_ext >&5
28614
28615 ac_cv_lib_sasl_sasl_client_init=no
28616 fi
28617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28618 LIBS=$ac_check_lib_save_LIBS
28619 fi
28620 echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
28621 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
28622 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
28623   ol_link_sasl="-lsasl"
28624 fi
28625
28626 fi
28627
28628         fi
28629
28630         if test $ol_link_sasl = no ; then
28631                 if test $ol_with_cyrus_sasl != auto ; then
28632                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
28633 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
28634    { (exit 1); exit 1; }; }
28635                 else
28636                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
28637 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
28638                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
28639 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
28640                         if test $ol_link_tls = no ; then
28641                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
28642 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
28643                         fi
28644                 fi
28645         else
28646                 echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
28647 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
28648 if test "${ol_cv_sasl_compat+set}" = set; then
28649   echo $ECHO_N "(cached) $ECHO_C" >&6
28650 else
28651
28652         cat >conftest.$ac_ext <<_ACEOF
28653 #line $LINENO "configure"
28654 /* confdefs.h.  */
28655 _ACEOF
28656 cat confdefs.h >>conftest.$ac_ext
28657 cat >>conftest.$ac_ext <<_ACEOF
28658 /* end confdefs.h.  */
28659
28660 #ifdef HAVE_SASL_SASL_H
28661 #include <sasl/sasl.h>
28662 #else
28663 #include <sasl.h>
28664 #endif
28665
28666 /* require 2.1.3 or later */
28667 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
28668         char *__sasl_compat = "1.5.x okay";
28669 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
28670         __sasl_compat "2.2+ or better okay (we guess)";
28671 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
28672         && SASL_VERSION_STEP >=3
28673         __sasl_compat = "2.1.3+ or better okay";
28674 #endif
28675
28676 _ACEOF
28677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28678   $EGREP "__sasl_compat" >/dev/null 2>&1; then
28679   ol_cv_sasl_compat=yes
28680 else
28681   ol_cv_sasl_compat=no
28682 fi
28683 rm -f conftest*
28684
28685 fi
28686 echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
28687 echo "${ECHO_T}$ol_cv_sasl_compat" >&6
28688
28689                 if test $ol_cv_sasl_compat = no ; then
28690                         ol_link_sasl=no
28691                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but incompatible" >&5
28692 echo "$as_me: error: Cyrus SASL library located but incompatible" >&2;}
28693    { (exit 1); exit 1; }; }
28694                 fi
28695
28696
28697 cat >>confdefs.h <<\_ACEOF
28698 #define HAVE_CYRUS_SASL 1
28699 _ACEOF
28700
28701                 SASL_LIBS="$ol_link_sasl"
28702                 if test $ol_enable_spasswd != no ; then
28703                         ol_link_spasswd=yes
28704                 fi
28705
28706                 ac_save_LIBS="$LIBS"
28707                 LIBS="$LIBS $ol_link_sasl"
28708                 echo "$as_me:$LINENO: checking for sasl_version" >&5
28709 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
28710 if test "${ac_cv_func_sasl_version+set}" = set; then
28711   echo $ECHO_N "(cached) $ECHO_C" >&6
28712 else
28713   cat >conftest.$ac_ext <<_ACEOF
28714 #line $LINENO "configure"
28715 /* confdefs.h.  */
28716 _ACEOF
28717 cat confdefs.h >>conftest.$ac_ext
28718 cat >>conftest.$ac_ext <<_ACEOF
28719 /* end confdefs.h.  */
28720 /* System header to define __stub macros and hopefully few prototypes,
28721     which can conflict with char sasl_version (); below.
28722     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
28723     <limits.h> exists even on freestanding compilers.  */
28724 #ifdef __STDC__
28725 # include <limits.h>
28726 #else
28727 # include <assert.h>
28728 #endif
28729 /* Override any gcc2 internal prototype to avoid an error.  */
28730 #ifdef __cplusplus
28731 extern "C"
28732 {
28733 #endif
28734 /* We use char because int might match the return type of a gcc2
28735    builtin and then its argument prototype would still apply.  */
28736 char sasl_version ();
28737 /* The GNU C library defines this for functions which it implements
28738     to always fail with ENOSYS.  Some functions are actually named
28739     something starting with __ and the normal name is an alias.  */
28740 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
28741 choke me
28742 #else
28743 char (*f) () = sasl_version;
28744 #endif
28745 #ifdef __cplusplus
28746 }
28747 #endif
28748
28749 int
28750 main ()
28751 {
28752 return f != sasl_version;
28753   ;
28754   return 0;
28755 }
28756 _ACEOF
28757 rm -f conftest.$ac_objext conftest$ac_exeext
28758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28759   (eval $ac_link) 2>&5
28760   ac_status=$?
28761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28762   (exit $ac_status); } &&
28763          { ac_try='test -s conftest$ac_exeext'
28764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28765   (eval $ac_try) 2>&5
28766   ac_status=$?
28767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28768   (exit $ac_status); }; }; then
28769   ac_cv_func_sasl_version=yes
28770 else
28771   echo "$as_me: failed program was:" >&5
28772 sed 's/^/| /' conftest.$ac_ext >&5
28773
28774 ac_cv_func_sasl_version=no
28775 fi
28776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28777 fi
28778 echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
28779 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
28780 if test $ac_cv_func_sasl_version = yes; then
28781
28782 cat >>confdefs.h <<\_ACEOF
28783 #define HAVE_SASL_VERSION 1
28784 _ACEOF
28785
28786 fi
28787
28788                 LIBS="$ac_save_LIBS"
28789         fi
28790
28791 else
28792         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
28793 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
28794         if test $ol_link_tls = no ; then
28795                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
28796 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
28797         fi
28798 fi
28799
28800 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
28801         dev=no
28802         if test -r /dev/urandom ; then
28803                 dev="/dev/urandom";
28804         elif test -r /idev/urandom ; then
28805                 dev="/idev/urandom";
28806         elif test -r /dev/srandom ; then
28807                 dev="/dev/srandom";
28808         elif test -r /dev/random ; then
28809                 dev="/dev/random";
28810         elif test -r /idev/random ; then
28811                 dev="/idev/random";
28812         fi
28813
28814         if test $dev != no ; then
28815
28816 cat >>confdefs.h <<_ACEOF
28817 #define URANDOM_DEVICE "$dev"
28818 _ACEOF
28819
28820         fi
28821 fi
28822
28823 ol_link_fetch=no
28824 if test $ol_with_fetch != no ; then
28825         ol_LIBS=$LIBS
28826 LIBS="-lfetch -lcom_err $LIBS"
28827 echo "$as_me:$LINENO: checking fetch(3) library" >&5
28828 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
28829 if test "${ol_cv_lib_fetch+set}" = set; then
28830   echo $ECHO_N "(cached) $ECHO_C" >&6
28831 else
28832
28833         cat >conftest.$ac_ext <<_ACEOF
28834 #line $LINENO "configure"
28835 /* confdefs.h.  */
28836 _ACEOF
28837 cat confdefs.h >>conftest.$ac_ext
28838 cat >>conftest.$ac_ext <<_ACEOF
28839 /* end confdefs.h.  */
28840
28841 #include <sys/param.h>
28842 #include <stdio.h>
28843 #include <fetch.h>
28844 int
28845 main ()
28846 {
28847 struct url *u = fetchParseURL("file:///");
28848   ;
28849   return 0;
28850 }
28851 _ACEOF
28852 rm -f conftest.$ac_objext conftest$ac_exeext
28853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
28854   (eval $ac_link) 2>&5
28855   ac_status=$?
28856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28857   (exit $ac_status); } &&
28858          { ac_try='test -s conftest$ac_exeext'
28859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28860   (eval $ac_try) 2>&5
28861   ac_status=$?
28862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28863   (exit $ac_status); }; }; then
28864   ol_cv_lib_fetch=yes
28865 else
28866   echo "$as_me: failed program was:" >&5
28867 sed 's/^/| /' conftest.$ac_ext >&5
28868
28869 ol_cv_lib_fetch=no
28870 fi
28871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28872 fi
28873 echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
28874 echo "${ECHO_T}$ol_cv_lib_fetch" >&6
28875 LIBS=$ol_LIBS
28876 if test $ol_cv_lib_fetch != no ; then
28877         ol_link_fetch="-lfetch -lcom_err"
28878
28879 cat >>confdefs.h <<\_ACEOF
28880 #define HAVE_FETCH 1
28881 _ACEOF
28882
28883 fi
28884
28885
28886         if test $ol_cv_lib_fetch != no ; then
28887                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
28888                 ol_link_fetch=freebsd
28889
28890         elif test $ol_with_fetch != auto ; then
28891                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
28892 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
28893    { (exit 1); exit 1; }; }
28894         fi
28895 fi
28896
28897 ol_link_readline=no
28898 if test $ol_with_readline != no ; then
28899
28900
28901 for ac_header in readline/readline.h readline/history.h
28902 do
28903 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28904 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28905   echo "$as_me:$LINENO: checking for $ac_header" >&5
28906 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28907 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28908   echo $ECHO_N "(cached) $ECHO_C" >&6
28909 fi
28910 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
28911 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28912 else
28913   # Is the header compilable?
28914 echo "$as_me:$LINENO: checking $ac_header usability" >&5
28915 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
28916 cat >conftest.$ac_ext <<_ACEOF
28917 #line $LINENO "configure"
28918 /* confdefs.h.  */
28919 _ACEOF
28920 cat confdefs.h >>conftest.$ac_ext
28921 cat >>conftest.$ac_ext <<_ACEOF
28922 /* end confdefs.h.  */
28923 $ac_includes_default
28924 #include <$ac_header>
28925 _ACEOF
28926 rm -f conftest.$ac_objext
28927 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
28928   (eval $ac_compile) 2>&5
28929   ac_status=$?
28930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28931   (exit $ac_status); } &&
28932          { ac_try='test -s conftest.$ac_objext'
28933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
28934   (eval $ac_try) 2>&5
28935   ac_status=$?
28936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28937   (exit $ac_status); }; }; then
28938   ac_header_compiler=yes
28939 else
28940   echo "$as_me: failed program was:" >&5
28941 sed 's/^/| /' conftest.$ac_ext >&5
28942
28943 ac_header_compiler=no
28944 fi
28945 rm -f conftest.$ac_objext conftest.$ac_ext
28946 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28947 echo "${ECHO_T}$ac_header_compiler" >&6
28948
28949 # Is the header present?
28950 echo "$as_me:$LINENO: checking $ac_header presence" >&5
28951 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
28952 cat >conftest.$ac_ext <<_ACEOF
28953 #line $LINENO "configure"
28954 /* confdefs.h.  */
28955 _ACEOF
28956 cat confdefs.h >>conftest.$ac_ext
28957 cat >>conftest.$ac_ext <<_ACEOF
28958 /* end confdefs.h.  */
28959 #include <$ac_header>
28960 _ACEOF
28961 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
28962   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
28963   ac_status=$?
28964   grep -v '^ *+' conftest.er1 >conftest.err
28965   rm -f conftest.er1
28966   cat conftest.err >&5
28967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28968   (exit $ac_status); } >/dev/null; then
28969   if test -s conftest.err; then
28970     ac_cpp_err=$ac_c_preproc_warn_flag
28971   else
28972     ac_cpp_err=
28973   fi
28974 else
28975   ac_cpp_err=yes
28976 fi
28977 if test -z "$ac_cpp_err"; then
28978   ac_header_preproc=yes
28979 else
28980   echo "$as_me: failed program was:" >&5
28981 sed 's/^/| /' conftest.$ac_ext >&5
28982
28983   ac_header_preproc=no
28984 fi
28985 rm -f conftest.err conftest.$ac_ext
28986 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28987 echo "${ECHO_T}$ac_header_preproc" >&6
28988
28989 # So?  What about this header?
28990 case $ac_header_compiler:$ac_header_preproc in
28991   yes:no )
28992     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28993 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28994     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28995 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28996     (
28997       cat <<\_ASBOX
28998 ## ------------------------------------ ##
28999 ## Report this to bug-autoconf@gnu.org. ##
29000 ## ------------------------------------ ##
29001 _ASBOX
29002     ) |
29003       sed "s/^/$as_me: WARNING:     /" >&2
29004     ;;
29005   no:yes )
29006     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29007 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29008     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29009 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29010     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29011 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29012     (
29013       cat <<\_ASBOX
29014 ## ------------------------------------ ##
29015 ## Report this to bug-autoconf@gnu.org. ##
29016 ## ------------------------------------ ##
29017 _ASBOX
29018     ) |
29019       sed "s/^/$as_me: WARNING:     /" >&2
29020     ;;
29021 esac
29022 echo "$as_me:$LINENO: checking for $ac_header" >&5
29023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
29024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
29025   echo $ECHO_N "(cached) $ECHO_C" >&6
29026 else
29027   eval "$as_ac_Header=$ac_header_preproc"
29028 fi
29029 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
29030 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
29031
29032 fi
29033 if test `eval echo '${'$as_ac_Header'}'` = yes; then
29034   cat >>confdefs.h <<_ACEOF
29035 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29036 _ACEOF
29037
29038 fi
29039
29040 done
29041
29042
29043         if test $ac_cv_header_readline_readline_h = yes ; then
29044                 save_LIBS="$LIBS"
29045                 LIBS="$TERMCAP_LIBS $LIBS"
29046                 echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
29047 echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
29048 if test "${ac_cv_lib_readline_readline+set}" = set; then
29049   echo $ECHO_N "(cached) $ECHO_C" >&6
29050 else
29051   ac_check_lib_save_LIBS=$LIBS
29052 LIBS="-lreadline  $LIBS"
29053 cat >conftest.$ac_ext <<_ACEOF
29054 #line $LINENO "configure"
29055 /* confdefs.h.  */
29056 _ACEOF
29057 cat confdefs.h >>conftest.$ac_ext
29058 cat >>conftest.$ac_ext <<_ACEOF
29059 /* end confdefs.h.  */
29060
29061 /* Override any gcc2 internal prototype to avoid an error.  */
29062 #ifdef __cplusplus
29063 extern "C"
29064 #endif
29065 /* We use char because int might match the return type of a gcc2
29066    builtin and then its argument prototype would still apply.  */
29067 char readline ();
29068 int
29069 main ()
29070 {
29071 readline ();
29072   ;
29073   return 0;
29074 }
29075 _ACEOF
29076 rm -f conftest.$ac_objext conftest$ac_exeext
29077 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29078   (eval $ac_link) 2>&5
29079   ac_status=$?
29080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29081   (exit $ac_status); } &&
29082          { ac_try='test -s conftest$ac_exeext'
29083   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29084   (eval $ac_try) 2>&5
29085   ac_status=$?
29086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29087   (exit $ac_status); }; }; then
29088   ac_cv_lib_readline_readline=yes
29089 else
29090   echo "$as_me: failed program was:" >&5
29091 sed 's/^/| /' conftest.$ac_ext >&5
29092
29093 ac_cv_lib_readline_readline=no
29094 fi
29095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29096 LIBS=$ac_check_lib_save_LIBS
29097 fi
29098 echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
29099 echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
29100 if test $ac_cv_lib_readline_readline = yes; then
29101   have_readline=yes
29102 else
29103   have_readline=no
29104 fi
29105
29106                 LIBS="$save_LIBS"
29107
29108                 if test $have_readline = yes ; then
29109                         ol_with_readline=found
29110                         ol_link_readline=yes
29111
29112                         READLINE_LIBS="-lreadline"
29113                 fi
29114         fi
29115 fi
29116
29117 if test $ol_link_readline = yes ; then
29118
29119 cat >>confdefs.h <<\_ACEOF
29120 #define HAVE_READLINE 1
29121 _ACEOF
29122
29123 fi
29124
29125
29126 if test $ol_enable_crypt != no ; then
29127         save_LIBS="$LIBS"
29128         LIBS="$TLS_LIBS $LIBS"
29129
29130         echo "$as_me:$LINENO: checking for crypt" >&5
29131 echo $ECHO_N "checking for crypt... $ECHO_C" >&6
29132 if test "${ac_cv_func_crypt+set}" = set; then
29133   echo $ECHO_N "(cached) $ECHO_C" >&6
29134 else
29135   cat >conftest.$ac_ext <<_ACEOF
29136 #line $LINENO "configure"
29137 /* confdefs.h.  */
29138 _ACEOF
29139 cat confdefs.h >>conftest.$ac_ext
29140 cat >>conftest.$ac_ext <<_ACEOF
29141 /* end confdefs.h.  */
29142 /* System header to define __stub macros and hopefully few prototypes,
29143     which can conflict with char crypt (); below.
29144     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29145     <limits.h> exists even on freestanding compilers.  */
29146 #ifdef __STDC__
29147 # include <limits.h>
29148 #else
29149 # include <assert.h>
29150 #endif
29151 /* Override any gcc2 internal prototype to avoid an error.  */
29152 #ifdef __cplusplus
29153 extern "C"
29154 {
29155 #endif
29156 /* We use char because int might match the return type of a gcc2
29157    builtin and then its argument prototype would still apply.  */
29158 char crypt ();
29159 /* The GNU C library defines this for functions which it implements
29160     to always fail with ENOSYS.  Some functions are actually named
29161     something starting with __ and the normal name is an alias.  */
29162 #if defined (__stub_crypt) || defined (__stub___crypt)
29163 choke me
29164 #else
29165 char (*f) () = crypt;
29166 #endif
29167 #ifdef __cplusplus
29168 }
29169 #endif
29170
29171 int
29172 main ()
29173 {
29174 return f != crypt;
29175   ;
29176   return 0;
29177 }
29178 _ACEOF
29179 rm -f conftest.$ac_objext conftest$ac_exeext
29180 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29181   (eval $ac_link) 2>&5
29182   ac_status=$?
29183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29184   (exit $ac_status); } &&
29185          { ac_try='test -s conftest$ac_exeext'
29186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29187   (eval $ac_try) 2>&5
29188   ac_status=$?
29189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29190   (exit $ac_status); }; }; then
29191   ac_cv_func_crypt=yes
29192 else
29193   echo "$as_me: failed program was:" >&5
29194 sed 's/^/| /' conftest.$ac_ext >&5
29195
29196 ac_cv_func_crypt=no
29197 fi
29198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29199 fi
29200 echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
29201 echo "${ECHO_T}$ac_cv_func_crypt" >&6
29202 if test $ac_cv_func_crypt = yes; then
29203   have_crypt=yes
29204 else
29205
29206                 LIBS="$save_LIBS"
29207                 echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
29208 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
29209 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
29210   echo $ECHO_N "(cached) $ECHO_C" >&6
29211 else
29212   ac_check_lib_save_LIBS=$LIBS
29213 LIBS="-lcrypt  $LIBS"
29214 cat >conftest.$ac_ext <<_ACEOF
29215 #line $LINENO "configure"
29216 /* confdefs.h.  */
29217 _ACEOF
29218 cat confdefs.h >>conftest.$ac_ext
29219 cat >>conftest.$ac_ext <<_ACEOF
29220 /* end confdefs.h.  */
29221
29222 /* Override any gcc2 internal prototype to avoid an error.  */
29223 #ifdef __cplusplus
29224 extern "C"
29225 #endif
29226 /* We use char because int might match the return type of a gcc2
29227    builtin and then its argument prototype would still apply.  */
29228 char crypt ();
29229 int
29230 main ()
29231 {
29232 crypt ();
29233   ;
29234   return 0;
29235 }
29236 _ACEOF
29237 rm -f conftest.$ac_objext conftest$ac_exeext
29238 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29239   (eval $ac_link) 2>&5
29240   ac_status=$?
29241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29242   (exit $ac_status); } &&
29243          { ac_try='test -s conftest$ac_exeext'
29244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29245   (eval $ac_try) 2>&5
29246   ac_status=$?
29247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29248   (exit $ac_status); }; }; then
29249   ac_cv_lib_crypt_crypt=yes
29250 else
29251   echo "$as_me: failed program was:" >&5
29252 sed 's/^/| /' conftest.$ac_ext >&5
29253
29254 ac_cv_lib_crypt_crypt=no
29255 fi
29256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29257 LIBS=$ac_check_lib_save_LIBS
29258 fi
29259 echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
29260 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
29261 if test $ac_cv_lib_crypt_crypt = yes; then
29262   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
29263                         have_crypt=yes
29264 else
29265   have_crypt=no
29266 fi
29267
29268 fi
29269
29270
29271         LIBS="$save_LIBS"
29272
29273         if test $have_crypt = yes ; then
29274
29275 cat >>confdefs.h <<\_ACEOF
29276 #define HAVE_CRYPT 1
29277 _ACEOF
29278
29279         else
29280                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
29281 echo "$as_me: WARNING: could not find crypt" >&2;}
29282                 if test $ol_enable_crypt = yes ; then
29283                         { { echo "$as_me:$LINENO: error: could not find crypt" >&5
29284 echo "$as_me: error: could not find crypt" >&2;}
29285    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
29286                 fi
29287
29288                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
29289 echo "$as_me: WARNING: disabling crypt support" >&2;}
29290                 ol_enable_crypt=no
29291         fi
29292 fi
29293
29294 if test $ol_enable_proctitle != no ; then
29295         echo "$as_me:$LINENO: checking for setproctitle" >&5
29296 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
29297 if test "${ac_cv_func_setproctitle+set}" = set; then
29298   echo $ECHO_N "(cached) $ECHO_C" >&6
29299 else
29300   cat >conftest.$ac_ext <<_ACEOF
29301 #line $LINENO "configure"
29302 /* confdefs.h.  */
29303 _ACEOF
29304 cat confdefs.h >>conftest.$ac_ext
29305 cat >>conftest.$ac_ext <<_ACEOF
29306 /* end confdefs.h.  */
29307 /* System header to define __stub macros and hopefully few prototypes,
29308     which can conflict with char setproctitle (); below.
29309     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29310     <limits.h> exists even on freestanding compilers.  */
29311 #ifdef __STDC__
29312 # include <limits.h>
29313 #else
29314 # include <assert.h>
29315 #endif
29316 /* Override any gcc2 internal prototype to avoid an error.  */
29317 #ifdef __cplusplus
29318 extern "C"
29319 {
29320 #endif
29321 /* We use char because int might match the return type of a gcc2
29322    builtin and then its argument prototype would still apply.  */
29323 char setproctitle ();
29324 /* The GNU C library defines this for functions which it implements
29325     to always fail with ENOSYS.  Some functions are actually named
29326     something starting with __ and the normal name is an alias.  */
29327 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
29328 choke me
29329 #else
29330 char (*f) () = setproctitle;
29331 #endif
29332 #ifdef __cplusplus
29333 }
29334 #endif
29335
29336 int
29337 main ()
29338 {
29339 return f != setproctitle;
29340   ;
29341   return 0;
29342 }
29343 _ACEOF
29344 rm -f conftest.$ac_objext conftest$ac_exeext
29345 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29346   (eval $ac_link) 2>&5
29347   ac_status=$?
29348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29349   (exit $ac_status); } &&
29350          { ac_try='test -s conftest$ac_exeext'
29351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29352   (eval $ac_try) 2>&5
29353   ac_status=$?
29354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29355   (exit $ac_status); }; }; then
29356   ac_cv_func_setproctitle=yes
29357 else
29358   echo "$as_me: failed program was:" >&5
29359 sed 's/^/| /' conftest.$ac_ext >&5
29360
29361 ac_cv_func_setproctitle=no
29362 fi
29363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29364 fi
29365 echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
29366 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
29367 if test $ac_cv_func_setproctitle = yes; then
29368   have_setproctitle=yes
29369 else
29370
29371                 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
29372 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
29373 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
29374   echo $ECHO_N "(cached) $ECHO_C" >&6
29375 else
29376   ac_check_lib_save_LIBS=$LIBS
29377 LIBS="-lutil  $LIBS"
29378 cat >conftest.$ac_ext <<_ACEOF
29379 #line $LINENO "configure"
29380 /* confdefs.h.  */
29381 _ACEOF
29382 cat confdefs.h >>conftest.$ac_ext
29383 cat >>conftest.$ac_ext <<_ACEOF
29384 /* end confdefs.h.  */
29385
29386 /* Override any gcc2 internal prototype to avoid an error.  */
29387 #ifdef __cplusplus
29388 extern "C"
29389 #endif
29390 /* We use char because int might match the return type of a gcc2
29391    builtin and then its argument prototype would still apply.  */
29392 char setproctitle ();
29393 int
29394 main ()
29395 {
29396 setproctitle ();
29397   ;
29398   return 0;
29399 }
29400 _ACEOF
29401 rm -f conftest.$ac_objext conftest$ac_exeext
29402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29403   (eval $ac_link) 2>&5
29404   ac_status=$?
29405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29406   (exit $ac_status); } &&
29407          { ac_try='test -s conftest$ac_exeext'
29408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29409   (eval $ac_try) 2>&5
29410   ac_status=$?
29411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29412   (exit $ac_status); }; }; then
29413   ac_cv_lib_util_setproctitle=yes
29414 else
29415   echo "$as_me: failed program was:" >&5
29416 sed 's/^/| /' conftest.$ac_ext >&5
29417
29418 ac_cv_lib_util_setproctitle=no
29419 fi
29420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29421 LIBS=$ac_check_lib_save_LIBS
29422 fi
29423 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
29424 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
29425 if test $ac_cv_lib_util_setproctitle = yes; then
29426   have_setproctitle=yes
29427                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
29428 else
29429   have_setproctitle=no
29430                         LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
29431                         LIBSRCS="$LIBSRCS setproctitle.c"
29432 fi
29433
29434 fi
29435
29436
29437         if test $have_setproctitle = yes ; then
29438
29439 cat >>confdefs.h <<\_ACEOF
29440 #define HAVE_SETPROCTITLE 1
29441 _ACEOF
29442
29443         fi
29444 fi
29445
29446 if test $ol_enable_slp != no ; then
29447
29448 for ac_header in slp.h
29449 do
29450 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29451 if eval "test \"\${$as_ac_Header+set}\" = set"; then
29452   echo "$as_me:$LINENO: checking for $ac_header" >&5
29453 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
29454 if eval "test \"\${$as_ac_Header+set}\" = set"; then
29455   echo $ECHO_N "(cached) $ECHO_C" >&6
29456 fi
29457 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
29458 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
29459 else
29460   # Is the header compilable?
29461 echo "$as_me:$LINENO: checking $ac_header usability" >&5
29462 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
29463 cat >conftest.$ac_ext <<_ACEOF
29464 #line $LINENO "configure"
29465 /* confdefs.h.  */
29466 _ACEOF
29467 cat confdefs.h >>conftest.$ac_ext
29468 cat >>conftest.$ac_ext <<_ACEOF
29469 /* end confdefs.h.  */
29470 $ac_includes_default
29471 #include <$ac_header>
29472 _ACEOF
29473 rm -f conftest.$ac_objext
29474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29475   (eval $ac_compile) 2>&5
29476   ac_status=$?
29477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29478   (exit $ac_status); } &&
29479          { ac_try='test -s conftest.$ac_objext'
29480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29481   (eval $ac_try) 2>&5
29482   ac_status=$?
29483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29484   (exit $ac_status); }; }; then
29485   ac_header_compiler=yes
29486 else
29487   echo "$as_me: failed program was:" >&5
29488 sed 's/^/| /' conftest.$ac_ext >&5
29489
29490 ac_header_compiler=no
29491 fi
29492 rm -f conftest.$ac_objext conftest.$ac_ext
29493 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29494 echo "${ECHO_T}$ac_header_compiler" >&6
29495
29496 # Is the header present?
29497 echo "$as_me:$LINENO: checking $ac_header presence" >&5
29498 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
29499 cat >conftest.$ac_ext <<_ACEOF
29500 #line $LINENO "configure"
29501 /* confdefs.h.  */
29502 _ACEOF
29503 cat confdefs.h >>conftest.$ac_ext
29504 cat >>conftest.$ac_ext <<_ACEOF
29505 /* end confdefs.h.  */
29506 #include <$ac_header>
29507 _ACEOF
29508 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
29509   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
29510   ac_status=$?
29511   grep -v '^ *+' conftest.er1 >conftest.err
29512   rm -f conftest.er1
29513   cat conftest.err >&5
29514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29515   (exit $ac_status); } >/dev/null; then
29516   if test -s conftest.err; then
29517     ac_cpp_err=$ac_c_preproc_warn_flag
29518   else
29519     ac_cpp_err=
29520   fi
29521 else
29522   ac_cpp_err=yes
29523 fi
29524 if test -z "$ac_cpp_err"; then
29525   ac_header_preproc=yes
29526 else
29527   echo "$as_me: failed program was:" >&5
29528 sed 's/^/| /' conftest.$ac_ext >&5
29529
29530   ac_header_preproc=no
29531 fi
29532 rm -f conftest.err conftest.$ac_ext
29533 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29534 echo "${ECHO_T}$ac_header_preproc" >&6
29535
29536 # So?  What about this header?
29537 case $ac_header_compiler:$ac_header_preproc in
29538   yes:no )
29539     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29540 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29541     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29542 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29543     (
29544       cat <<\_ASBOX
29545 ## ------------------------------------ ##
29546 ## Report this to bug-autoconf@gnu.org. ##
29547 ## ------------------------------------ ##
29548 _ASBOX
29549     ) |
29550       sed "s/^/$as_me: WARNING:     /" >&2
29551     ;;
29552   no:yes )
29553     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29554 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29555     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29556 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29557     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29558 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29559     (
29560       cat <<\_ASBOX
29561 ## ------------------------------------ ##
29562 ## Report this to bug-autoconf@gnu.org. ##
29563 ## ------------------------------------ ##
29564 _ASBOX
29565     ) |
29566       sed "s/^/$as_me: WARNING:     /" >&2
29567     ;;
29568 esac
29569 echo "$as_me:$LINENO: checking for $ac_header" >&5
29570 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
29571 if eval "test \"\${$as_ac_Header+set}\" = set"; then
29572   echo $ECHO_N "(cached) $ECHO_C" >&6
29573 else
29574   eval "$as_ac_Header=$ac_header_preproc"
29575 fi
29576 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
29577 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
29578
29579 fi
29580 if test `eval echo '${'$as_ac_Header'}'` = yes; then
29581   cat >>confdefs.h <<_ACEOF
29582 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29583 _ACEOF
29584
29585 fi
29586
29587 done
29588
29589
29590         if test $ac_cv_header_slp_h = yes ; then
29591                 echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
29592 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
29593 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
29594   echo $ECHO_N "(cached) $ECHO_C" >&6
29595 else
29596   ac_check_lib_save_LIBS=$LIBS
29597 LIBS="-lslp  $LIBS"
29598 cat >conftest.$ac_ext <<_ACEOF
29599 #line $LINENO "configure"
29600 /* confdefs.h.  */
29601 _ACEOF
29602 cat confdefs.h >>conftest.$ac_ext
29603 cat >>conftest.$ac_ext <<_ACEOF
29604 /* end confdefs.h.  */
29605
29606 /* Override any gcc2 internal prototype to avoid an error.  */
29607 #ifdef __cplusplus
29608 extern "C"
29609 #endif
29610 /* We use char because int might match the return type of a gcc2
29611    builtin and then its argument prototype would still apply.  */
29612 char SLPOpen ();
29613 int
29614 main ()
29615 {
29616 SLPOpen ();
29617   ;
29618   return 0;
29619 }
29620 _ACEOF
29621 rm -f conftest.$ac_objext conftest$ac_exeext
29622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
29623   (eval $ac_link) 2>&5
29624   ac_status=$?
29625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29626   (exit $ac_status); } &&
29627          { ac_try='test -s conftest$ac_exeext'
29628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29629   (eval $ac_try) 2>&5
29630   ac_status=$?
29631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29632   (exit $ac_status); }; }; then
29633   ac_cv_lib_slp_SLPOpen=yes
29634 else
29635   echo "$as_me: failed program was:" >&5
29636 sed 's/^/| /' conftest.$ac_ext >&5
29637
29638 ac_cv_lib_slp_SLPOpen=no
29639 fi
29640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29641 LIBS=$ac_check_lib_save_LIBS
29642 fi
29643 echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
29644 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
29645 if test $ac_cv_lib_slp_SLPOpen = yes; then
29646   have_slp=yes
29647 else
29648   have_slp=no
29649 fi
29650
29651                 if test $have_slp = yes ; then
29652
29653 cat >>confdefs.h <<\_ACEOF
29654 #define HAVE_SLP 1
29655 _ACEOF
29656
29657                         SLAPD_SLP_LIBS=-lslp
29658                 fi
29659
29660         elif test $ol_enable_slp = yes ; then
29661                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
29662 echo "$as_me: error: SLP not found" >&2;}
29663    { (exit 1); exit 1; }; }
29664         fi
29665 fi
29666
29667 echo "$as_me:$LINENO: checking for mode_t" >&5
29668 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
29669 if test "${ac_cv_type_mode_t+set}" = set; then
29670   echo $ECHO_N "(cached) $ECHO_C" >&6
29671 else
29672   cat >conftest.$ac_ext <<_ACEOF
29673 #line $LINENO "configure"
29674 /* confdefs.h.  */
29675 _ACEOF
29676 cat confdefs.h >>conftest.$ac_ext
29677 cat >>conftest.$ac_ext <<_ACEOF
29678 /* end confdefs.h.  */
29679 $ac_includes_default
29680 int
29681 main ()
29682 {
29683 if ((mode_t *) 0)
29684   return 0;
29685 if (sizeof (mode_t))
29686   return 0;
29687   ;
29688   return 0;
29689 }
29690 _ACEOF
29691 rm -f conftest.$ac_objext
29692 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29693   (eval $ac_compile) 2>&5
29694   ac_status=$?
29695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29696   (exit $ac_status); } &&
29697          { ac_try='test -s conftest.$ac_objext'
29698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29699   (eval $ac_try) 2>&5
29700   ac_status=$?
29701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29702   (exit $ac_status); }; }; then
29703   ac_cv_type_mode_t=yes
29704 else
29705   echo "$as_me: failed program was:" >&5
29706 sed 's/^/| /' conftest.$ac_ext >&5
29707
29708 ac_cv_type_mode_t=no
29709 fi
29710 rm -f conftest.$ac_objext conftest.$ac_ext
29711 fi
29712 echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
29713 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
29714 if test $ac_cv_type_mode_t = yes; then
29715   :
29716 else
29717
29718 cat >>confdefs.h <<_ACEOF
29719 #define mode_t int
29720 _ACEOF
29721
29722 fi
29723
29724 echo "$as_me:$LINENO: checking for off_t" >&5
29725 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
29726 if test "${ac_cv_type_off_t+set}" = set; then
29727   echo $ECHO_N "(cached) $ECHO_C" >&6
29728 else
29729   cat >conftest.$ac_ext <<_ACEOF
29730 #line $LINENO "configure"
29731 /* confdefs.h.  */
29732 _ACEOF
29733 cat confdefs.h >>conftest.$ac_ext
29734 cat >>conftest.$ac_ext <<_ACEOF
29735 /* end confdefs.h.  */
29736 $ac_includes_default
29737 int
29738 main ()
29739 {
29740 if ((off_t *) 0)
29741   return 0;
29742 if (sizeof (off_t))
29743   return 0;
29744   ;
29745   return 0;
29746 }
29747 _ACEOF
29748 rm -f conftest.$ac_objext
29749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29750   (eval $ac_compile) 2>&5
29751   ac_status=$?
29752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29753   (exit $ac_status); } &&
29754          { ac_try='test -s conftest.$ac_objext'
29755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29756   (eval $ac_try) 2>&5
29757   ac_status=$?
29758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29759   (exit $ac_status); }; }; then
29760   ac_cv_type_off_t=yes
29761 else
29762   echo "$as_me: failed program was:" >&5
29763 sed 's/^/| /' conftest.$ac_ext >&5
29764
29765 ac_cv_type_off_t=no
29766 fi
29767 rm -f conftest.$ac_objext conftest.$ac_ext
29768 fi
29769 echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
29770 echo "${ECHO_T}$ac_cv_type_off_t" >&6
29771 if test $ac_cv_type_off_t = yes; then
29772   :
29773 else
29774
29775 cat >>confdefs.h <<_ACEOF
29776 #define off_t long
29777 _ACEOF
29778
29779 fi
29780
29781 echo "$as_me:$LINENO: checking for pid_t" >&5
29782 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
29783 if test "${ac_cv_type_pid_t+set}" = set; then
29784   echo $ECHO_N "(cached) $ECHO_C" >&6
29785 else
29786   cat >conftest.$ac_ext <<_ACEOF
29787 #line $LINENO "configure"
29788 /* confdefs.h.  */
29789 _ACEOF
29790 cat confdefs.h >>conftest.$ac_ext
29791 cat >>conftest.$ac_ext <<_ACEOF
29792 /* end confdefs.h.  */
29793 $ac_includes_default
29794 int
29795 main ()
29796 {
29797 if ((pid_t *) 0)
29798   return 0;
29799 if (sizeof (pid_t))
29800   return 0;
29801   ;
29802   return 0;
29803 }
29804 _ACEOF
29805 rm -f conftest.$ac_objext
29806 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29807   (eval $ac_compile) 2>&5
29808   ac_status=$?
29809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29810   (exit $ac_status); } &&
29811          { ac_try='test -s conftest.$ac_objext'
29812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29813   (eval $ac_try) 2>&5
29814   ac_status=$?
29815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29816   (exit $ac_status); }; }; then
29817   ac_cv_type_pid_t=yes
29818 else
29819   echo "$as_me: failed program was:" >&5
29820 sed 's/^/| /' conftest.$ac_ext >&5
29821
29822 ac_cv_type_pid_t=no
29823 fi
29824 rm -f conftest.$ac_objext conftest.$ac_ext
29825 fi
29826 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
29827 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
29828 if test $ac_cv_type_pid_t = yes; then
29829   :
29830 else
29831
29832 cat >>confdefs.h <<_ACEOF
29833 #define pid_t int
29834 _ACEOF
29835
29836 fi
29837
29838 echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
29839 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
29840 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
29841   echo $ECHO_N "(cached) $ECHO_C" >&6
29842 else
29843   cat >conftest.$ac_ext <<_ACEOF
29844 #line $LINENO "configure"
29845 /* confdefs.h.  */
29846 _ACEOF
29847 cat confdefs.h >>conftest.$ac_ext
29848 cat >>conftest.$ac_ext <<_ACEOF
29849 /* end confdefs.h.  */
29850 $ac_includes_default
29851 int
29852 main ()
29853 {
29854 if ((ptrdiff_t *) 0)
29855   return 0;
29856 if (sizeof (ptrdiff_t))
29857   return 0;
29858   ;
29859   return 0;
29860 }
29861 _ACEOF
29862 rm -f conftest.$ac_objext
29863 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29864   (eval $ac_compile) 2>&5
29865   ac_status=$?
29866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29867   (exit $ac_status); } &&
29868          { ac_try='test -s conftest.$ac_objext'
29869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29870   (eval $ac_try) 2>&5
29871   ac_status=$?
29872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29873   (exit $ac_status); }; }; then
29874   ac_cv_type_ptrdiff_t=yes
29875 else
29876   echo "$as_me: failed program was:" >&5
29877 sed 's/^/| /' conftest.$ac_ext >&5
29878
29879 ac_cv_type_ptrdiff_t=no
29880 fi
29881 rm -f conftest.$ac_objext conftest.$ac_ext
29882 fi
29883 echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
29884 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
29885 if test $ac_cv_type_ptrdiff_t = yes; then
29886
29887 cat >>confdefs.h <<_ACEOF
29888 #define HAVE_PTRDIFF_T 1
29889 _ACEOF
29890
29891
29892 fi
29893 echo "$as_me:$LINENO: checking for uintmax_t" >&5
29894 echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6
29895 if test "${ac_cv_type_uintmax_t+set}" = set; then
29896   echo $ECHO_N "(cached) $ECHO_C" >&6
29897 else
29898   cat >conftest.$ac_ext <<_ACEOF
29899 #line $LINENO "configure"
29900 /* confdefs.h.  */
29901 _ACEOF
29902 cat confdefs.h >>conftest.$ac_ext
29903 cat >>conftest.$ac_ext <<_ACEOF
29904 /* end confdefs.h.  */
29905 $ac_includes_default
29906 int
29907 main ()
29908 {
29909 if ((uintmax_t *) 0)
29910   return 0;
29911 if (sizeof (uintmax_t))
29912   return 0;
29913   ;
29914   return 0;
29915 }
29916 _ACEOF
29917 rm -f conftest.$ac_objext
29918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29919   (eval $ac_compile) 2>&5
29920   ac_status=$?
29921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29922   (exit $ac_status); } &&
29923          { ac_try='test -s conftest.$ac_objext'
29924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29925   (eval $ac_try) 2>&5
29926   ac_status=$?
29927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29928   (exit $ac_status); }; }; then
29929   ac_cv_type_uintmax_t=yes
29930 else
29931   echo "$as_me: failed program was:" >&5
29932 sed 's/^/| /' conftest.$ac_ext >&5
29933
29934 ac_cv_type_uintmax_t=no
29935 fi
29936 rm -f conftest.$ac_objext conftest.$ac_ext
29937 fi
29938 echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
29939 echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6
29940 if test $ac_cv_type_uintmax_t = yes; then
29941
29942 cat >>confdefs.h <<_ACEOF
29943 #define HAVE_UINTMAX_T 1
29944 _ACEOF
29945
29946
29947 fi
29948
29949 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
29950 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
29951 if test "${ac_cv_type_signal+set}" = set; then
29952   echo $ECHO_N "(cached) $ECHO_C" >&6
29953 else
29954   cat >conftest.$ac_ext <<_ACEOF
29955 #line $LINENO "configure"
29956 /* confdefs.h.  */
29957 _ACEOF
29958 cat confdefs.h >>conftest.$ac_ext
29959 cat >>conftest.$ac_ext <<_ACEOF
29960 /* end confdefs.h.  */
29961 #include <sys/types.h>
29962 #include <signal.h>
29963 #ifdef signal
29964 # undef signal
29965 #endif
29966 #ifdef __cplusplus
29967 extern "C" void (*signal (int, void (*)(int)))(int);
29968 #else
29969 void (*signal ()) ();
29970 #endif
29971
29972 int
29973 main ()
29974 {
29975 int i;
29976   ;
29977   return 0;
29978 }
29979 _ACEOF
29980 rm -f conftest.$ac_objext
29981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
29982   (eval $ac_compile) 2>&5
29983   ac_status=$?
29984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29985   (exit $ac_status); } &&
29986          { ac_try='test -s conftest.$ac_objext'
29987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
29988   (eval $ac_try) 2>&5
29989   ac_status=$?
29990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29991   (exit $ac_status); }; }; then
29992   ac_cv_type_signal=void
29993 else
29994   echo "$as_me: failed program was:" >&5
29995 sed 's/^/| /' conftest.$ac_ext >&5
29996
29997 ac_cv_type_signal=int
29998 fi
29999 rm -f conftest.$ac_objext conftest.$ac_ext
30000 fi
30001 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
30002 echo "${ECHO_T}$ac_cv_type_signal" >&6
30003
30004 cat >>confdefs.h <<_ACEOF
30005 #define RETSIGTYPE $ac_cv_type_signal
30006 _ACEOF
30007
30008
30009 echo "$as_me:$LINENO: checking for size_t" >&5
30010 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
30011 if test "${ac_cv_type_size_t+set}" = set; then
30012   echo $ECHO_N "(cached) $ECHO_C" >&6
30013 else
30014   cat >conftest.$ac_ext <<_ACEOF
30015 #line $LINENO "configure"
30016 /* confdefs.h.  */
30017 _ACEOF
30018 cat confdefs.h >>conftest.$ac_ext
30019 cat >>conftest.$ac_ext <<_ACEOF
30020 /* end confdefs.h.  */
30021 $ac_includes_default
30022 int
30023 main ()
30024 {
30025 if ((size_t *) 0)
30026   return 0;
30027 if (sizeof (size_t))
30028   return 0;
30029   ;
30030   return 0;
30031 }
30032 _ACEOF
30033 rm -f conftest.$ac_objext
30034 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30035   (eval $ac_compile) 2>&5
30036   ac_status=$?
30037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30038   (exit $ac_status); } &&
30039          { ac_try='test -s conftest.$ac_objext'
30040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30041   (eval $ac_try) 2>&5
30042   ac_status=$?
30043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30044   (exit $ac_status); }; }; then
30045   ac_cv_type_size_t=yes
30046 else
30047   echo "$as_me: failed program was:" >&5
30048 sed 's/^/| /' conftest.$ac_ext >&5
30049
30050 ac_cv_type_size_t=no
30051 fi
30052 rm -f conftest.$ac_objext conftest.$ac_ext
30053 fi
30054 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
30055 echo "${ECHO_T}$ac_cv_type_size_t" >&6
30056 if test $ac_cv_type_size_t = yes; then
30057   :
30058 else
30059
30060 cat >>confdefs.h <<_ACEOF
30061 #define size_t unsigned
30062 _ACEOF
30063
30064 fi
30065
30066
30067 echo "$as_me:$LINENO: checking for ssize_t" >&5
30068 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
30069 if test "${ac_cv_type_ssize_t+set}" = set; then
30070   echo $ECHO_N "(cached) $ECHO_C" >&6
30071 else
30072   cat >conftest.$ac_ext <<_ACEOF
30073 #line $LINENO "configure"
30074 /* confdefs.h.  */
30075 _ACEOF
30076 cat confdefs.h >>conftest.$ac_ext
30077 cat >>conftest.$ac_ext <<_ACEOF
30078 /* end confdefs.h.  */
30079 $ac_includes_default
30080 int
30081 main ()
30082 {
30083 if ((ssize_t *) 0)
30084   return 0;
30085 if (sizeof (ssize_t))
30086   return 0;
30087   ;
30088   return 0;
30089 }
30090 _ACEOF
30091 rm -f conftest.$ac_objext
30092 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30093   (eval $ac_compile) 2>&5
30094   ac_status=$?
30095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30096   (exit $ac_status); } &&
30097          { ac_try='test -s conftest.$ac_objext'
30098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30099   (eval $ac_try) 2>&5
30100   ac_status=$?
30101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30102   (exit $ac_status); }; }; then
30103   ac_cv_type_ssize_t=yes
30104 else
30105   echo "$as_me: failed program was:" >&5
30106 sed 's/^/| /' conftest.$ac_ext >&5
30107
30108 ac_cv_type_ssize_t=no
30109 fi
30110 rm -f conftest.$ac_objext conftest.$ac_ext
30111 fi
30112 echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
30113 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
30114 if test $ac_cv_type_ssize_t = yes; then
30115
30116 cat >>confdefs.h <<_ACEOF
30117 #define HAVE_SSIZE_T 1
30118 _ACEOF
30119
30120
30121 fi
30122 echo "$as_me:$LINENO: checking for signed int" >&5
30123 echo $ECHO_N "checking for signed int... $ECHO_C" >&6
30124 if test "${ac_cv_type_signed_int+set}" = set; then
30125   echo $ECHO_N "(cached) $ECHO_C" >&6
30126 else
30127   cat >conftest.$ac_ext <<_ACEOF
30128 #line $LINENO "configure"
30129 /* confdefs.h.  */
30130 _ACEOF
30131 cat confdefs.h >>conftest.$ac_ext
30132 cat >>conftest.$ac_ext <<_ACEOF
30133 /* end confdefs.h.  */
30134 $ac_includes_default
30135 int
30136 main ()
30137 {
30138 if ((signed int *) 0)
30139   return 0;
30140 if (sizeof (signed int))
30141   return 0;
30142   ;
30143   return 0;
30144 }
30145 _ACEOF
30146 rm -f conftest.$ac_objext
30147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30148   (eval $ac_compile) 2>&5
30149   ac_status=$?
30150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30151   (exit $ac_status); } &&
30152          { ac_try='test -s conftest.$ac_objext'
30153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30154   (eval $ac_try) 2>&5
30155   ac_status=$?
30156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30157   (exit $ac_status); }; }; then
30158   ac_cv_type_signed_int=yes
30159 else
30160   echo "$as_me: failed program was:" >&5
30161 sed 's/^/| /' conftest.$ac_ext >&5
30162
30163 ac_cv_type_signed_int=no
30164 fi
30165 rm -f conftest.$ac_objext conftest.$ac_ext
30166 fi
30167 echo "$as_me:$LINENO: result: $ac_cv_type_signed_int" >&5
30168 echo "${ECHO_T}$ac_cv_type_signed_int" >&6
30169 if test $ac_cv_type_signed_int = yes; then
30170
30171 cat >>confdefs.h <<_ACEOF
30172 #define HAVE_SIGNED_INT 1
30173 _ACEOF
30174
30175
30176 fi
30177
30178 echo "$as_me:$LINENO: checking for caddr_t" >&5
30179 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
30180 if test "${ac_cv_type_caddr_t+set}" = set; then
30181   echo $ECHO_N "(cached) $ECHO_C" >&6
30182 else
30183   cat >conftest.$ac_ext <<_ACEOF
30184 #line $LINENO "configure"
30185 /* confdefs.h.  */
30186 _ACEOF
30187 cat confdefs.h >>conftest.$ac_ext
30188 cat >>conftest.$ac_ext <<_ACEOF
30189 /* end confdefs.h.  */
30190 $ac_includes_default
30191 int
30192 main ()
30193 {
30194 if ((caddr_t *) 0)
30195   return 0;
30196 if (sizeof (caddr_t))
30197   return 0;
30198   ;
30199   return 0;
30200 }
30201 _ACEOF
30202 rm -f conftest.$ac_objext
30203 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30204   (eval $ac_compile) 2>&5
30205   ac_status=$?
30206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30207   (exit $ac_status); } &&
30208          { ac_try='test -s conftest.$ac_objext'
30209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30210   (eval $ac_try) 2>&5
30211   ac_status=$?
30212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30213   (exit $ac_status); }; }; then
30214   ac_cv_type_caddr_t=yes
30215 else
30216   echo "$as_me: failed program was:" >&5
30217 sed 's/^/| /' conftest.$ac_ext >&5
30218
30219 ac_cv_type_caddr_t=no
30220 fi
30221 rm -f conftest.$ac_objext conftest.$ac_ext
30222 fi
30223 echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
30224 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
30225 if test $ac_cv_type_caddr_t = yes; then
30226
30227 cat >>confdefs.h <<_ACEOF
30228 #define HAVE_CADDR_T 1
30229 _ACEOF
30230
30231
30232 fi
30233 echo "$as_me:$LINENO: checking for char *" >&5
30234 echo $ECHO_N "checking for char *... $ECHO_C" >&6
30235 if test "${ac_cv_type_char_p+set}" = set; then
30236   echo $ECHO_N "(cached) $ECHO_C" >&6
30237 else
30238   cat >conftest.$ac_ext <<_ACEOF
30239 #line $LINENO "configure"
30240 /* confdefs.h.  */
30241 _ACEOF
30242 cat confdefs.h >>conftest.$ac_ext
30243 cat >>conftest.$ac_ext <<_ACEOF
30244 /* end confdefs.h.  */
30245 $ac_includes_default
30246 int
30247 main ()
30248 {
30249 if ((char * *) 0)
30250   return 0;
30251 if (sizeof (char *))
30252   return 0;
30253   ;
30254   return 0;
30255 }
30256 _ACEOF
30257 rm -f conftest.$ac_objext
30258 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30259   (eval $ac_compile) 2>&5
30260   ac_status=$?
30261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30262   (exit $ac_status); } &&
30263          { ac_try='test -s conftest.$ac_objext'
30264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30265   (eval $ac_try) 2>&5
30266   ac_status=$?
30267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30268   (exit $ac_status); }; }; then
30269   ac_cv_type_char_p=yes
30270 else
30271   echo "$as_me: failed program was:" >&5
30272 sed 's/^/| /' conftest.$ac_ext >&5
30273
30274 ac_cv_type_char_p=no
30275 fi
30276 rm -f conftest.$ac_objext conftest.$ac_ext
30277 fi
30278 echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5
30279 echo "${ECHO_T}$ac_cv_type_char_p" >&6
30280 if test $ac_cv_type_char_p = yes; then
30281
30282 cat >>confdefs.h <<_ACEOF
30283 #define HAVE_CHAR_P 1
30284 _ACEOF
30285
30286
30287 fi
30288
30289
30290 echo "$as_me:$LINENO: checking for socklen_t" >&5
30291 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
30292 if test "${ol_cv_type_socklen_t+set}" = set; then
30293   echo $ECHO_N "(cached) $ECHO_C" >&6
30294 else
30295   cat >conftest.$ac_ext <<_ACEOF
30296 #line $LINENO "configure"
30297 /* confdefs.h.  */
30298 _ACEOF
30299 cat confdefs.h >>conftest.$ac_ext
30300 cat >>conftest.$ac_ext <<_ACEOF
30301 /* end confdefs.h.  */
30302
30303 #ifdef HAVE_SYS_TYPES_H
30304 #include <sys/types.h>
30305 #endif
30306 #ifdef HAVE_SYS_SOCKET_H
30307 #include <sys/socket.h>
30308 #endif
30309
30310 int
30311 main ()
30312 {
30313 socklen_t len;
30314   ;
30315   return 0;
30316 }
30317 _ACEOF
30318 rm -f conftest.$ac_objext
30319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30320   (eval $ac_compile) 2>&5
30321   ac_status=$?
30322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30323   (exit $ac_status); } &&
30324          { ac_try='test -s conftest.$ac_objext'
30325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30326   (eval $ac_try) 2>&5
30327   ac_status=$?
30328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30329   (exit $ac_status); }; }; then
30330   ol_cv_type_socklen_t=yes
30331 else
30332   echo "$as_me: failed program was:" >&5
30333 sed 's/^/| /' conftest.$ac_ext >&5
30334
30335 ol_cv_type_socklen_t=no
30336 fi
30337 rm -f conftest.$ac_objext conftest.$ac_ext
30338 fi
30339 echo "$as_me:$LINENO: result: $ol_cv_type_socklen_t" >&5
30340 echo "${ECHO_T}$ol_cv_type_socklen_t" >&6
30341   if test $ol_cv_type_socklen_t = no; then
30342
30343 cat >>confdefs.h <<\_ACEOF
30344 #define socklen_t int
30345 _ACEOF
30346
30347   fi
30348
30349
30350 echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
30351 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
30352 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
30353   echo $ECHO_N "(cached) $ECHO_C" >&6
30354 else
30355   cat >conftest.$ac_ext <<_ACEOF
30356 #line $LINENO "configure"
30357 /* confdefs.h.  */
30358 _ACEOF
30359 cat confdefs.h >>conftest.$ac_ext
30360 cat >>conftest.$ac_ext <<_ACEOF
30361 /* end confdefs.h.  */
30362 $ac_includes_default
30363 int
30364 main ()
30365 {
30366 static struct stat ac_aggr;
30367 if (ac_aggr.st_blksize)
30368 return 0;
30369   ;
30370   return 0;
30371 }
30372 _ACEOF
30373 rm -f conftest.$ac_objext
30374 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30375   (eval $ac_compile) 2>&5
30376   ac_status=$?
30377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30378   (exit $ac_status); } &&
30379          { ac_try='test -s conftest.$ac_objext'
30380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30381   (eval $ac_try) 2>&5
30382   ac_status=$?
30383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30384   (exit $ac_status); }; }; then
30385   ac_cv_member_struct_stat_st_blksize=yes
30386 else
30387   echo "$as_me: failed program was:" >&5
30388 sed 's/^/| /' conftest.$ac_ext >&5
30389
30390 cat >conftest.$ac_ext <<_ACEOF
30391 #line $LINENO "configure"
30392 /* confdefs.h.  */
30393 _ACEOF
30394 cat confdefs.h >>conftest.$ac_ext
30395 cat >>conftest.$ac_ext <<_ACEOF
30396 /* end confdefs.h.  */
30397 $ac_includes_default
30398 int
30399 main ()
30400 {
30401 static struct stat ac_aggr;
30402 if (sizeof ac_aggr.st_blksize)
30403 return 0;
30404   ;
30405   return 0;
30406 }
30407 _ACEOF
30408 rm -f conftest.$ac_objext
30409 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30410   (eval $ac_compile) 2>&5
30411   ac_status=$?
30412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30413   (exit $ac_status); } &&
30414          { ac_try='test -s conftest.$ac_objext'
30415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30416   (eval $ac_try) 2>&5
30417   ac_status=$?
30418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30419   (exit $ac_status); }; }; then
30420   ac_cv_member_struct_stat_st_blksize=yes
30421 else
30422   echo "$as_me: failed program was:" >&5
30423 sed 's/^/| /' conftest.$ac_ext >&5
30424
30425 ac_cv_member_struct_stat_st_blksize=no
30426 fi
30427 rm -f conftest.$ac_objext conftest.$ac_ext
30428 fi
30429 rm -f conftest.$ac_objext conftest.$ac_ext
30430 fi
30431 echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
30432 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
30433 if test $ac_cv_member_struct_stat_st_blksize = yes; then
30434
30435 cat >>confdefs.h <<_ACEOF
30436 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
30437 _ACEOF
30438
30439
30440 cat >>confdefs.h <<\_ACEOF
30441 #define HAVE_ST_BLKSIZE 1
30442 _ACEOF
30443
30444 fi
30445
30446
30447 echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
30448 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
30449 if test "${ac_cv_header_time+set}" = set; then
30450   echo $ECHO_N "(cached) $ECHO_C" >&6
30451 else
30452   cat >conftest.$ac_ext <<_ACEOF
30453 #line $LINENO "configure"
30454 /* confdefs.h.  */
30455 _ACEOF
30456 cat confdefs.h >>conftest.$ac_ext
30457 cat >>conftest.$ac_ext <<_ACEOF
30458 /* end confdefs.h.  */
30459 #include <sys/types.h>
30460 #include <sys/time.h>
30461 #include <time.h>
30462
30463 int
30464 main ()
30465 {
30466 if ((struct tm *) 0)
30467 return 0;
30468   ;
30469   return 0;
30470 }
30471 _ACEOF
30472 rm -f conftest.$ac_objext
30473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30474   (eval $ac_compile) 2>&5
30475   ac_status=$?
30476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30477   (exit $ac_status); } &&
30478          { ac_try='test -s conftest.$ac_objext'
30479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30480   (eval $ac_try) 2>&5
30481   ac_status=$?
30482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30483   (exit $ac_status); }; }; then
30484   ac_cv_header_time=yes
30485 else
30486   echo "$as_me: failed program was:" >&5
30487 sed 's/^/| /' conftest.$ac_ext >&5
30488
30489 ac_cv_header_time=no
30490 fi
30491 rm -f conftest.$ac_objext conftest.$ac_ext
30492 fi
30493 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
30494 echo "${ECHO_T}$ac_cv_header_time" >&6
30495 if test $ac_cv_header_time = yes; then
30496
30497 cat >>confdefs.h <<\_ACEOF
30498 #define TIME_WITH_SYS_TIME 1
30499 _ACEOF
30500
30501 fi
30502
30503 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
30504 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
30505 if test "${ac_cv_struct_tm+set}" = set; then
30506   echo $ECHO_N "(cached) $ECHO_C" >&6
30507 else
30508   cat >conftest.$ac_ext <<_ACEOF
30509 #line $LINENO "configure"
30510 /* confdefs.h.  */
30511 _ACEOF
30512 cat confdefs.h >>conftest.$ac_ext
30513 cat >>conftest.$ac_ext <<_ACEOF
30514 /* end confdefs.h.  */
30515 #include <sys/types.h>
30516 #include <time.h>
30517
30518 int
30519 main ()
30520 {
30521 struct tm *tp; tp->tm_sec;
30522   ;
30523   return 0;
30524 }
30525 _ACEOF
30526 rm -f conftest.$ac_objext
30527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30528   (eval $ac_compile) 2>&5
30529   ac_status=$?
30530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30531   (exit $ac_status); } &&
30532          { ac_try='test -s conftest.$ac_objext'
30533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30534   (eval $ac_try) 2>&5
30535   ac_status=$?
30536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30537   (exit $ac_status); }; }; then
30538   ac_cv_struct_tm=time.h
30539 else
30540   echo "$as_me: failed program was:" >&5
30541 sed 's/^/| /' conftest.$ac_ext >&5
30542
30543 ac_cv_struct_tm=sys/time.h
30544 fi
30545 rm -f conftest.$ac_objext conftest.$ac_ext
30546 fi
30547 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
30548 echo "${ECHO_T}$ac_cv_struct_tm" >&6
30549 if test $ac_cv_struct_tm = sys/time.h; then
30550
30551 cat >>confdefs.h <<\_ACEOF
30552 #define TM_IN_SYS_TIME 1
30553 _ACEOF
30554
30555 fi
30556
30557 echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
30558 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
30559 if test "${ac_cv_type_uid_t+set}" = set; then
30560   echo $ECHO_N "(cached) $ECHO_C" >&6
30561 else
30562   cat >conftest.$ac_ext <<_ACEOF
30563 #line $LINENO "configure"
30564 /* confdefs.h.  */
30565 _ACEOF
30566 cat confdefs.h >>conftest.$ac_ext
30567 cat >>conftest.$ac_ext <<_ACEOF
30568 /* end confdefs.h.  */
30569 #include <sys/types.h>
30570
30571 _ACEOF
30572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30573   $EGREP "uid_t" >/dev/null 2>&1; then
30574   ac_cv_type_uid_t=yes
30575 else
30576   ac_cv_type_uid_t=no
30577 fi
30578 rm -f conftest*
30579
30580 fi
30581 echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
30582 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
30583 if test $ac_cv_type_uid_t = no; then
30584
30585 cat >>confdefs.h <<\_ACEOF
30586 #define uid_t int
30587 _ACEOF
30588
30589
30590 cat >>confdefs.h <<\_ACEOF
30591 #define gid_t int
30592 _ACEOF
30593
30594 fi
30595
30596 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
30597 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
30598 if test "${ol_cv_type_sig_atomic_t+set}" = set; then
30599   echo $ECHO_N "(cached) $ECHO_C" >&6
30600 else
30601   cat >conftest.$ac_ext <<_ACEOF
30602 #line $LINENO "configure"
30603 /* confdefs.h.  */
30604 _ACEOF
30605 cat confdefs.h >>conftest.$ac_ext
30606 cat >>conftest.$ac_ext <<_ACEOF
30607 /* end confdefs.h.  */
30608 #include <signal.h>
30609 int
30610 main ()
30611 {
30612 sig_atomic_t atomic;
30613   ;
30614   return 0;
30615 }
30616 _ACEOF
30617 rm -f conftest.$ac_objext
30618 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30619   (eval $ac_compile) 2>&5
30620   ac_status=$?
30621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30622   (exit $ac_status); } &&
30623          { ac_try='test -s conftest.$ac_objext'
30624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30625   (eval $ac_try) 2>&5
30626   ac_status=$?
30627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30628   (exit $ac_status); }; }; then
30629   ol_cv_type_sig_atomic_t=yes
30630 else
30631   echo "$as_me: failed program was:" >&5
30632 sed 's/^/| /' conftest.$ac_ext >&5
30633
30634 ol_cv_type_sig_atomic_t=no
30635 fi
30636 rm -f conftest.$ac_objext conftest.$ac_ext
30637 fi
30638 echo "$as_me:$LINENO: result: $ol_cv_type_sig_atomic_t" >&5
30639 echo "${ECHO_T}$ol_cv_type_sig_atomic_t" >&6
30640   if test $ol_cv_type_sig_atomic_t = no; then
30641
30642 cat >>confdefs.h <<\_ACEOF
30643 #define sig_atomic_t int
30644 _ACEOF
30645
30646   fi
30647
30648
30649
30650 # test for pw_gecos in struct passwd
30651    echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
30652 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
30653 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
30654   echo $ECHO_N "(cached) $ECHO_C" >&6
30655 else
30656   cat >conftest.$ac_ext <<_ACEOF
30657 #line $LINENO "configure"
30658 /* confdefs.h.  */
30659 _ACEOF
30660 cat confdefs.h >>conftest.$ac_ext
30661 cat >>conftest.$ac_ext <<_ACEOF
30662 /* end confdefs.h.  */
30663 #include <pwd.h>
30664
30665 int
30666 main ()
30667 {
30668 static struct passwd ac_aggr;
30669 if (ac_aggr.pw_gecos)
30670 return 0;
30671   ;
30672   return 0;
30673 }
30674 _ACEOF
30675 rm -f conftest.$ac_objext
30676 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30677   (eval $ac_compile) 2>&5
30678   ac_status=$?
30679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30680   (exit $ac_status); } &&
30681          { ac_try='test -s conftest.$ac_objext'
30682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30683   (eval $ac_try) 2>&5
30684   ac_status=$?
30685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30686   (exit $ac_status); }; }; then
30687   ac_cv_member_struct_passwd_pw_gecos=yes
30688 else
30689   echo "$as_me: failed program was:" >&5
30690 sed 's/^/| /' conftest.$ac_ext >&5
30691
30692 cat >conftest.$ac_ext <<_ACEOF
30693 #line $LINENO "configure"
30694 /* confdefs.h.  */
30695 _ACEOF
30696 cat confdefs.h >>conftest.$ac_ext
30697 cat >>conftest.$ac_ext <<_ACEOF
30698 /* end confdefs.h.  */
30699 #include <pwd.h>
30700
30701 int
30702 main ()
30703 {
30704 static struct passwd ac_aggr;
30705 if (sizeof ac_aggr.pw_gecos)
30706 return 0;
30707   ;
30708   return 0;
30709 }
30710 _ACEOF
30711 rm -f conftest.$ac_objext
30712 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30713   (eval $ac_compile) 2>&5
30714   ac_status=$?
30715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30716   (exit $ac_status); } &&
30717          { ac_try='test -s conftest.$ac_objext'
30718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30719   (eval $ac_try) 2>&5
30720   ac_status=$?
30721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30722   (exit $ac_status); }; }; then
30723   ac_cv_member_struct_passwd_pw_gecos=yes
30724 else
30725   echo "$as_me: failed program was:" >&5
30726 sed 's/^/| /' conftest.$ac_ext >&5
30727
30728 ac_cv_member_struct_passwd_pw_gecos=no
30729 fi
30730 rm -f conftest.$ac_objext conftest.$ac_ext
30731 fi
30732 rm -f conftest.$ac_objext conftest.$ac_ext
30733 fi
30734 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
30735 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
30736
30737    if test $ac_cv_member_struct_passwd_pw_gecos = "yes" ; then
30738
30739 cat >>confdefs.h <<\_ACEOF
30740 #define HAVE_PW_GECOS 1
30741 _ACEOF
30742
30743    fi
30744
30745 # test for pw_passwd in struct passwd
30746    echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
30747 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
30748 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
30749   echo $ECHO_N "(cached) $ECHO_C" >&6
30750 else
30751   cat >conftest.$ac_ext <<_ACEOF
30752 #line $LINENO "configure"
30753 /* confdefs.h.  */
30754 _ACEOF
30755 cat confdefs.h >>conftest.$ac_ext
30756 cat >>conftest.$ac_ext <<_ACEOF
30757 /* end confdefs.h.  */
30758 #include <pwd.h>
30759
30760 int
30761 main ()
30762 {
30763 static struct passwd ac_aggr;
30764 if (ac_aggr.pw_passwd)
30765 return 0;
30766   ;
30767   return 0;
30768 }
30769 _ACEOF
30770 rm -f conftest.$ac_objext
30771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30772   (eval $ac_compile) 2>&5
30773   ac_status=$?
30774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30775   (exit $ac_status); } &&
30776          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
30782   ac_cv_member_struct_passwd_pw_passwd=yes
30783 else
30784   echo "$as_me: failed program was:" >&5
30785 sed 's/^/| /' conftest.$ac_ext >&5
30786
30787 cat >conftest.$ac_ext <<_ACEOF
30788 #line $LINENO "configure"
30789 /* confdefs.h.  */
30790 _ACEOF
30791 cat confdefs.h >>conftest.$ac_ext
30792 cat >>conftest.$ac_ext <<_ACEOF
30793 /* end confdefs.h.  */
30794 #include <pwd.h>
30795
30796 int
30797 main ()
30798 {
30799 static struct passwd ac_aggr;
30800 if (sizeof ac_aggr.pw_passwd)
30801 return 0;
30802   ;
30803   return 0;
30804 }
30805 _ACEOF
30806 rm -f conftest.$ac_objext
30807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30808   (eval $ac_compile) 2>&5
30809   ac_status=$?
30810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30811   (exit $ac_status); } &&
30812          { ac_try='test -s conftest.$ac_objext'
30813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30814   (eval $ac_try) 2>&5
30815   ac_status=$?
30816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30817   (exit $ac_status); }; }; then
30818   ac_cv_member_struct_passwd_pw_passwd=yes
30819 else
30820   echo "$as_me: failed program was:" >&5
30821 sed 's/^/| /' conftest.$ac_ext >&5
30822
30823 ac_cv_member_struct_passwd_pw_passwd=no
30824 fi
30825 rm -f conftest.$ac_objext conftest.$ac_ext
30826 fi
30827 rm -f conftest.$ac_objext conftest.$ac_ext
30828 fi
30829 echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
30830 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
30831
30832    if test $ac_cv_member_struct_passwd_pw_passwd = "yes" ; then
30833
30834 cat >>confdefs.h <<\_ACEOF
30835 #define HAVE_PW_PASSWD 1
30836 _ACEOF
30837
30838    fi
30839
30840
30841 echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
30842 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
30843 if test "${ol_cv_c_upper_lower+set}" = set; then
30844   echo $ECHO_N "(cached) $ECHO_C" >&6
30845 else
30846
30847         if test "$cross_compiling" = yes; then
30848   ol_cv_c_upper_lower=safe
30849 else
30850   cat >conftest.$ac_ext <<_ACEOF
30851 #line $LINENO "configure"
30852 /* confdefs.h.  */
30853 _ACEOF
30854 cat confdefs.h >>conftest.$ac_ext
30855 cat >>conftest.$ac_ext <<_ACEOF
30856 /* end confdefs.h.  */
30857
30858 #include <ctype.h>
30859 main()
30860 {
30861         if ('C' == toupper('C'))
30862                 exit(0);
30863         else
30864                 exit(1);
30865 }
30866 _ACEOF
30867 rm -f conftest$ac_exeext
30868 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
30869   (eval $ac_link) 2>&5
30870   ac_status=$?
30871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30872   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30874   (eval $ac_try) 2>&5
30875   ac_status=$?
30876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30877   (exit $ac_status); }; }; then
30878   ol_cv_c_upper_lower=no
30879 else
30880   echo "$as_me: program exited with status $ac_status" >&5
30881 echo "$as_me: failed program was:" >&5
30882 sed 's/^/| /' conftest.$ac_ext >&5
30883
30884 ( exit $ac_status )
30885 ol_cv_c_upper_lower=yes
30886 fi
30887 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30888 fi
30889 fi
30890 echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
30891 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
30892 if test $ol_cv_c_upper_lower != no ; then
30893
30894 cat >>confdefs.h <<\_ACEOF
30895 #define C_UPPER_LOWER 1
30896 _ACEOF
30897
30898 fi
30899
30900 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
30901 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
30902 if test "${ac_cv_c_const+set}" = set; then
30903   echo $ECHO_N "(cached) $ECHO_C" >&6
30904 else
30905   cat >conftest.$ac_ext <<_ACEOF
30906 #line $LINENO "configure"
30907 /* confdefs.h.  */
30908 _ACEOF
30909 cat confdefs.h >>conftest.$ac_ext
30910 cat >>conftest.$ac_ext <<_ACEOF
30911 /* end confdefs.h.  */
30912
30913 int
30914 main ()
30915 {
30916 /* FIXME: Include the comments suggested by Paul. */
30917 #ifndef __cplusplus
30918   /* Ultrix mips cc rejects this.  */
30919   typedef int charset[2];
30920   const charset x;
30921   /* SunOS 4.1.1 cc rejects this.  */
30922   char const *const *ccp;
30923   char **p;
30924   /* NEC SVR4.0.2 mips cc rejects this.  */
30925   struct point {int x, y;};
30926   static struct point const zero = {0,0};
30927   /* AIX XL C 1.02.0.0 rejects this.
30928      It does not let you subtract one const X* pointer from another in
30929      an arm of an if-expression whose if-part is not a constant
30930      expression */
30931   const char *g = "string";
30932   ccp = &g + (g ? g-g : 0);
30933   /* HPUX 7.0 cc rejects these. */
30934   ++ccp;
30935   p = (char**) ccp;
30936   ccp = (char const *const *) p;
30937   { /* SCO 3.2v4 cc rejects this.  */
30938     char *t;
30939     char const *s = 0 ? (char *) 0 : (char const *) 0;
30940
30941     *t++ = 0;
30942   }
30943   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
30944     int x[] = {25, 17};
30945     const int *foo = &x[0];
30946     ++foo;
30947   }
30948   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
30949     typedef const int *iptr;
30950     iptr p = 0;
30951     ++p;
30952   }
30953   { /* AIX XL C 1.02.0.0 rejects this saying
30954        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
30955     struct s { int j; const int *ap[3]; };
30956     struct s *b; b->j = 5;
30957   }
30958   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
30959     const int foo = 10;
30960   }
30961 #endif
30962
30963   ;
30964   return 0;
30965 }
30966 _ACEOF
30967 rm -f conftest.$ac_objext
30968 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
30969   (eval $ac_compile) 2>&5
30970   ac_status=$?
30971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30972   (exit $ac_status); } &&
30973          { ac_try='test -s conftest.$ac_objext'
30974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30975   (eval $ac_try) 2>&5
30976   ac_status=$?
30977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30978   (exit $ac_status); }; }; then
30979   ac_cv_c_const=yes
30980 else
30981   echo "$as_me: failed program was:" >&5
30982 sed 's/^/| /' conftest.$ac_ext >&5
30983
30984 ac_cv_c_const=no
30985 fi
30986 rm -f conftest.$ac_objext conftest.$ac_ext
30987 fi
30988 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
30989 echo "${ECHO_T}$ac_cv_c_const" >&6
30990 if test $ac_cv_c_const = no; then
30991
30992 cat >>confdefs.h <<\_ACEOF
30993 #define const
30994 _ACEOF
30995
30996 fi
30997
30998 echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
30999 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
31000 if test "${ol_cv_c_volatile+set}" = set; then
31001   echo $ECHO_N "(cached) $ECHO_C" >&6
31002 else
31003   cat >conftest.$ac_ext <<_ACEOF
31004 #line $LINENO "configure"
31005 /* confdefs.h.  */
31006 _ACEOF
31007 cat confdefs.h >>conftest.$ac_ext
31008 cat >>conftest.$ac_ext <<_ACEOF
31009 /* end confdefs.h.  */
31010 int x, y, z;
31011 int
31012 main ()
31013 {
31014 volatile int a; int * volatile b = x ? &y : &z;
31015       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
31016       *b = 0;
31017   ;
31018   return 0;
31019 }
31020 _ACEOF
31021 rm -f conftest.$ac_objext
31022 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31023   (eval $ac_compile) 2>&5
31024   ac_status=$?
31025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31026   (exit $ac_status); } &&
31027          { ac_try='test -s conftest.$ac_objext'
31028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31029   (eval $ac_try) 2>&5
31030   ac_status=$?
31031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31032   (exit $ac_status); }; }; then
31033   ol_cv_c_volatile=yes
31034 else
31035   echo "$as_me: failed program was:" >&5
31036 sed 's/^/| /' conftest.$ac_ext >&5
31037
31038 ol_cv_c_volatile=no
31039 fi
31040 rm -f conftest.$ac_objext conftest.$ac_ext
31041 fi
31042 echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
31043 echo "${ECHO_T}$ol_cv_c_volatile" >&6
31044   if test $ol_cv_c_volatile = yes; then
31045     :
31046   else
31047
31048 cat >>confdefs.h <<\_ACEOF
31049 #define volatile
31050 _ACEOF
31051
31052   fi
31053
31054
31055 if test $cross_compiling = yes ; then
31056
31057 cat >>confdefs.h <<\_ACEOF
31058 #define CROSS_COMPILING 1
31059 _ACEOF
31060
31061 else
31062         echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
31063 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
31064 if test "${ac_cv_c_bigendian+set}" = set; then
31065   echo $ECHO_N "(cached) $ECHO_C" >&6
31066 else
31067   # See if sys/param.h defines the BYTE_ORDER macro.
31068 cat >conftest.$ac_ext <<_ACEOF
31069 #line $LINENO "configure"
31070 /* confdefs.h.  */
31071 _ACEOF
31072 cat confdefs.h >>conftest.$ac_ext
31073 cat >>conftest.$ac_ext <<_ACEOF
31074 /* end confdefs.h.  */
31075 #include <sys/types.h>
31076 #include <sys/param.h>
31077
31078 int
31079 main ()
31080 {
31081 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
31082  bogus endian macros
31083 #endif
31084
31085   ;
31086   return 0;
31087 }
31088 _ACEOF
31089 rm -f conftest.$ac_objext
31090 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31091   (eval $ac_compile) 2>&5
31092   ac_status=$?
31093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31094   (exit $ac_status); } &&
31095          { ac_try='test -s conftest.$ac_objext'
31096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31097   (eval $ac_try) 2>&5
31098   ac_status=$?
31099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31100   (exit $ac_status); }; }; then
31101   # It does; now see whether it defined to BIG_ENDIAN or not.
31102 cat >conftest.$ac_ext <<_ACEOF
31103 #line $LINENO "configure"
31104 /* confdefs.h.  */
31105 _ACEOF
31106 cat confdefs.h >>conftest.$ac_ext
31107 cat >>conftest.$ac_ext <<_ACEOF
31108 /* end confdefs.h.  */
31109 #include <sys/types.h>
31110 #include <sys/param.h>
31111
31112 int
31113 main ()
31114 {
31115 #if BYTE_ORDER != BIG_ENDIAN
31116  not big endian
31117 #endif
31118
31119   ;
31120   return 0;
31121 }
31122 _ACEOF
31123 rm -f conftest.$ac_objext
31124 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31125   (eval $ac_compile) 2>&5
31126   ac_status=$?
31127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31128   (exit $ac_status); } &&
31129          { ac_try='test -s conftest.$ac_objext'
31130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31131   (eval $ac_try) 2>&5
31132   ac_status=$?
31133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31134   (exit $ac_status); }; }; then
31135   ac_cv_c_bigendian=yes
31136 else
31137   echo "$as_me: failed program was:" >&5
31138 sed 's/^/| /' conftest.$ac_ext >&5
31139
31140 ac_cv_c_bigendian=no
31141 fi
31142 rm -f conftest.$ac_objext conftest.$ac_ext
31143 else
31144   echo "$as_me: failed program was:" >&5
31145 sed 's/^/| /' conftest.$ac_ext >&5
31146
31147 # It does not; compile a test program.
31148 if test "$cross_compiling" = yes; then
31149   # try to guess the endianness by grepping values into an object file
31150   ac_cv_c_bigendian=unknown
31151   cat >conftest.$ac_ext <<_ACEOF
31152 #line $LINENO "configure"
31153 /* confdefs.h.  */
31154 _ACEOF
31155 cat confdefs.h >>conftest.$ac_ext
31156 cat >>conftest.$ac_ext <<_ACEOF
31157 /* end confdefs.h.  */
31158 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
31159 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
31160 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
31161 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
31162 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
31163 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
31164 int
31165 main ()
31166 {
31167  _ascii (); _ebcdic ();
31168   ;
31169   return 0;
31170 }
31171 _ACEOF
31172 rm -f conftest.$ac_objext
31173 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31174   (eval $ac_compile) 2>&5
31175   ac_status=$?
31176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31177   (exit $ac_status); } &&
31178          { ac_try='test -s conftest.$ac_objext'
31179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31180   (eval $ac_try) 2>&5
31181   ac_status=$?
31182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31183   (exit $ac_status); }; }; then
31184   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
31185   ac_cv_c_bigendian=yes
31186 fi
31187 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
31188   if test "$ac_cv_c_bigendian" = unknown; then
31189     ac_cv_c_bigendian=no
31190   else
31191     # finding both strings is unlikely to happen, but who knows?
31192     ac_cv_c_bigendian=unknown
31193   fi
31194 fi
31195 else
31196   echo "$as_me: failed program was:" >&5
31197 sed 's/^/| /' conftest.$ac_ext >&5
31198
31199 fi
31200 rm -f conftest.$ac_objext conftest.$ac_ext
31201 else
31202   cat >conftest.$ac_ext <<_ACEOF
31203 #line $LINENO "configure"
31204 /* confdefs.h.  */
31205 _ACEOF
31206 cat confdefs.h >>conftest.$ac_ext
31207 cat >>conftest.$ac_ext <<_ACEOF
31208 /* end confdefs.h.  */
31209 int
31210 main ()
31211 {
31212   /* Are we little or big endian?  From Harbison&Steele.  */
31213   union
31214   {
31215     long l;
31216     char c[sizeof (long)];
31217   } u;
31218   u.l = 1;
31219   exit (u.c[sizeof (long) - 1] == 1);
31220 }
31221 _ACEOF
31222 rm -f conftest$ac_exeext
31223 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31224   (eval $ac_link) 2>&5
31225   ac_status=$?
31226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31227   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31229   (eval $ac_try) 2>&5
31230   ac_status=$?
31231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31232   (exit $ac_status); }; }; then
31233   ac_cv_c_bigendian=no
31234 else
31235   echo "$as_me: program exited with status $ac_status" >&5
31236 echo "$as_me: failed program was:" >&5
31237 sed 's/^/| /' conftest.$ac_ext >&5
31238
31239 ( exit $ac_status )
31240 ac_cv_c_bigendian=yes
31241 fi
31242 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
31243 fi
31244 fi
31245 rm -f conftest.$ac_objext conftest.$ac_ext
31246 fi
31247 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
31248 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
31249 case $ac_cv_c_bigendian in
31250   yes)
31251
31252 cat >>confdefs.h <<\_ACEOF
31253 #define WORDS_BIGENDIAN 1
31254 _ACEOF
31255  ;;
31256   no)
31257      ;;
31258   *)
31259     { { echo "$as_me:$LINENO: error: unknown endianness
31260 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
31261 echo "$as_me: error: unknown endianness
31262 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
31263    { (exit 1); exit 1; }; } ;;
31264 esac
31265
31266 fi
31267
31268 echo "$as_me:$LINENO: checking size of short" >&5
31269 echo $ECHO_N "checking size of short... $ECHO_C" >&6
31270 if test "${ac_cv_sizeof_short+set}" = set; then
31271   echo $ECHO_N "(cached) $ECHO_C" >&6
31272 else
31273   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
31274   cat >conftest.$ac_ext <<_ACEOF
31275 #line $LINENO "configure"
31276 /* confdefs.h.  */
31277 _ACEOF
31278 cat confdefs.h >>conftest.$ac_ext
31279 cat >>conftest.$ac_ext <<_ACEOF
31280 /* end confdefs.h.  */
31281 #include "confdefs.h"
31282 #include <sys/types.h>
31283
31284
31285 int
31286 main ()
31287 {
31288 switch (0) case 0: case (sizeof (short) == $ac_size):;
31289   ;
31290   return 0;
31291 }
31292 _ACEOF
31293 rm -f conftest.$ac_objext
31294 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31295   (eval $ac_compile) 2>&5
31296   ac_status=$?
31297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31298   (exit $ac_status); } &&
31299          { ac_try='test -s conftest.$ac_objext'
31300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31301   (eval $ac_try) 2>&5
31302   ac_status=$?
31303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31304   (exit $ac_status); }; }; then
31305   ac_cv_sizeof_short=$ac_size
31306 else
31307   echo "$as_me: failed program was:" >&5
31308 sed 's/^/| /' conftest.$ac_ext >&5
31309
31310 fi
31311 rm -f conftest.$ac_objext conftest.$ac_ext
31312   if test x$ac_cv_sizeof_short != x ; then break; fi
31313 done
31314
31315 fi
31316
31317 if test x$ac_cv_sizeof_short = x ; then
31318   { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
31319 echo "$as_me: error: cannot determine a size for short" >&2;}
31320    { (exit 1); exit 1; }; }
31321 fi
31322 echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
31323 echo "${ECHO_T}$ac_cv_sizeof_short" >&6
31324
31325 cat >>confdefs.h <<_ACEOF
31326 #define SIZEOF_SHORT $ac_cv_sizeof_short
31327 _ACEOF
31328
31329
31330 echo "$as_me:$LINENO: checking size of int" >&5
31331 echo $ECHO_N "checking size of int... $ECHO_C" >&6
31332 if test "${ac_cv_sizeof_int+set}" = set; then
31333   echo $ECHO_N "(cached) $ECHO_C" >&6
31334 else
31335   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
31336   cat >conftest.$ac_ext <<_ACEOF
31337 #line $LINENO "configure"
31338 /* confdefs.h.  */
31339 _ACEOF
31340 cat confdefs.h >>conftest.$ac_ext
31341 cat >>conftest.$ac_ext <<_ACEOF
31342 /* end confdefs.h.  */
31343 #include "confdefs.h"
31344 #include <sys/types.h>
31345
31346
31347 int
31348 main ()
31349 {
31350 switch (0) case 0: case (sizeof (int) == $ac_size):;
31351   ;
31352   return 0;
31353 }
31354 _ACEOF
31355 rm -f conftest.$ac_objext
31356 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31357   (eval $ac_compile) 2>&5
31358   ac_status=$?
31359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31360   (exit $ac_status); } &&
31361          { ac_try='test -s conftest.$ac_objext'
31362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31363   (eval $ac_try) 2>&5
31364   ac_status=$?
31365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31366   (exit $ac_status); }; }; then
31367   ac_cv_sizeof_int=$ac_size
31368 else
31369   echo "$as_me: failed program was:" >&5
31370 sed 's/^/| /' conftest.$ac_ext >&5
31371
31372 fi
31373 rm -f conftest.$ac_objext conftest.$ac_ext
31374   if test x$ac_cv_sizeof_int != x ; then break; fi
31375 done
31376
31377 fi
31378
31379 if test x$ac_cv_sizeof_int = x ; then
31380   { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
31381 echo "$as_me: error: cannot determine a size for int" >&2;}
31382    { (exit 1); exit 1; }; }
31383 fi
31384 echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
31385 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
31386
31387 cat >>confdefs.h <<_ACEOF
31388 #define SIZEOF_INT $ac_cv_sizeof_int
31389 _ACEOF
31390
31391
31392 echo "$as_me:$LINENO: checking size of long" >&5
31393 echo $ECHO_N "checking size of long... $ECHO_C" >&6
31394 if test "${ac_cv_sizeof_long+set}" = set; then
31395   echo $ECHO_N "(cached) $ECHO_C" >&6
31396 else
31397   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
31398   cat >conftest.$ac_ext <<_ACEOF
31399 #line $LINENO "configure"
31400 /* confdefs.h.  */
31401 _ACEOF
31402 cat confdefs.h >>conftest.$ac_ext
31403 cat >>conftest.$ac_ext <<_ACEOF
31404 /* end confdefs.h.  */
31405 #include "confdefs.h"
31406 #include <sys/types.h>
31407
31408
31409 int
31410 main ()
31411 {
31412 switch (0) case 0: case (sizeof (long) == $ac_size):;
31413   ;
31414   return 0;
31415 }
31416 _ACEOF
31417 rm -f conftest.$ac_objext
31418 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
31419   (eval $ac_compile) 2>&5
31420   ac_status=$?
31421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31422   (exit $ac_status); } &&
31423          { ac_try='test -s conftest.$ac_objext'
31424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31425   (eval $ac_try) 2>&5
31426   ac_status=$?
31427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31428   (exit $ac_status); }; }; then
31429   ac_cv_sizeof_long=$ac_size
31430 else
31431   echo "$as_me: failed program was:" >&5
31432 sed 's/^/| /' conftest.$ac_ext >&5
31433
31434 fi
31435 rm -f conftest.$ac_objext conftest.$ac_ext
31436   if test x$ac_cv_sizeof_long != x ; then break; fi
31437 done
31438
31439 fi
31440
31441 if test x$ac_cv_sizeof_long = x ; then
31442   { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
31443 echo "$as_me: error: cannot determine a size for long" >&2;}
31444    { (exit 1); exit 1; }; }
31445 fi
31446 echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
31447 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
31448
31449 cat >>confdefs.h <<_ACEOF
31450 #define SIZEOF_LONG $ac_cv_sizeof_long
31451 _ACEOF
31452
31453
31454
31455 if test "$ac_cv_sizeof_int" -lt 4 ; then
31456         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
31457 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
31458
31459         cat >>confdefs.h <<\_ACEOF
31460 #define LBER_INT_T long
31461 _ACEOF
31462
31463 else
31464         cat >>confdefs.h <<\_ACEOF
31465 #define LBER_INT_T int
31466 _ACEOF
31467
31468 fi
31469
31470 cat >>confdefs.h <<\_ACEOF
31471 #define LBER_LEN_T long
31472 _ACEOF
31473
31474 cat >>confdefs.h <<\_ACEOF
31475 #define LBER_SOCKET_T int
31476 _ACEOF
31477
31478 cat >>confdefs.h <<\_ACEOF
31479 #define LBER_TAG_T long
31480 _ACEOF
31481
31482
31483 echo "$as_me:$LINENO: checking for working memcmp" >&5
31484 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
31485 if test "${ac_cv_func_memcmp_working+set}" = set; then
31486   echo $ECHO_N "(cached) $ECHO_C" >&6
31487 else
31488   if test "$cross_compiling" = yes; then
31489   ac_cv_func_memcmp_working=no
31490 else
31491   cat >conftest.$ac_ext <<_ACEOF
31492 #line $LINENO "configure"
31493 /* confdefs.h.  */
31494 _ACEOF
31495 cat confdefs.h >>conftest.$ac_ext
31496 cat >>conftest.$ac_ext <<_ACEOF
31497 /* end confdefs.h.  */
31498
31499 int
31500 main ()
31501 {
31502
31503   /* Some versions of memcmp are not 8-bit clean.  */
31504   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
31505   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
31506     exit (1);
31507
31508   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
31509      or more and with at least one buffer not starting on a 4-byte boundary.
31510      William Lewis provided this test program.   */
31511   {
31512     char foo[21];
31513     char bar[21];
31514     int i;
31515     for (i = 0; i < 4; i++)
31516       {
31517         char *a = foo + i;
31518         char *b = bar + i;
31519         strcpy (a, "--------01111111");
31520         strcpy (b, "--------10000000");
31521         if (memcmp (a, b, 16) >= 0)
31522           exit (1);
31523       }
31524     exit (0);
31525   }
31526
31527   ;
31528   return 0;
31529 }
31530 _ACEOF
31531 rm -f conftest$ac_exeext
31532 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31533   (eval $ac_link) 2>&5
31534   ac_status=$?
31535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31536   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31538   (eval $ac_try) 2>&5
31539   ac_status=$?
31540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31541   (exit $ac_status); }; }; then
31542   ac_cv_func_memcmp_working=yes
31543 else
31544   echo "$as_me: program exited with status $ac_status" >&5
31545 echo "$as_me: failed program was:" >&5
31546 sed 's/^/| /' conftest.$ac_ext >&5
31547
31548 ( exit $ac_status )
31549 ac_cv_func_memcmp_working=no
31550 fi
31551 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
31552 fi
31553 fi
31554 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
31555 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
31556 test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
31557
31558
31559 for ac_func in strftime
31560 do
31561 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
31562 echo "$as_me:$LINENO: checking for $ac_func" >&5
31563 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
31564 if eval "test \"\${$as_ac_var+set}\" = set"; then
31565   echo $ECHO_N "(cached) $ECHO_C" >&6
31566 else
31567   cat >conftest.$ac_ext <<_ACEOF
31568 #line $LINENO "configure"
31569 /* confdefs.h.  */
31570 _ACEOF
31571 cat confdefs.h >>conftest.$ac_ext
31572 cat >>conftest.$ac_ext <<_ACEOF
31573 /* end confdefs.h.  */
31574 /* System header to define __stub macros and hopefully few prototypes,
31575     which can conflict with char $ac_func (); below.
31576     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31577     <limits.h> exists even on freestanding compilers.  */
31578 #ifdef __STDC__
31579 # include <limits.h>
31580 #else
31581 # include <assert.h>
31582 #endif
31583 /* Override any gcc2 internal prototype to avoid an error.  */
31584 #ifdef __cplusplus
31585 extern "C"
31586 {
31587 #endif
31588 /* We use char because int might match the return type of a gcc2
31589    builtin and then its argument prototype would still apply.  */
31590 char $ac_func ();
31591 /* The GNU C library defines this for functions which it implements
31592     to always fail with ENOSYS.  Some functions are actually named
31593     something starting with __ and the normal name is an alias.  */
31594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
31595 choke me
31596 #else
31597 char (*f) () = $ac_func;
31598 #endif
31599 #ifdef __cplusplus
31600 }
31601 #endif
31602
31603 int
31604 main ()
31605 {
31606 return f != $ac_func;
31607   ;
31608   return 0;
31609 }
31610 _ACEOF
31611 rm -f conftest.$ac_objext conftest$ac_exeext
31612 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31613   (eval $ac_link) 2>&5
31614   ac_status=$?
31615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31616   (exit $ac_status); } &&
31617          { ac_try='test -s conftest$ac_exeext'
31618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31619   (eval $ac_try) 2>&5
31620   ac_status=$?
31621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31622   (exit $ac_status); }; }; then
31623   eval "$as_ac_var=yes"
31624 else
31625   echo "$as_me: failed program was:" >&5
31626 sed 's/^/| /' conftest.$ac_ext >&5
31627
31628 eval "$as_ac_var=no"
31629 fi
31630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31631 fi
31632 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
31633 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
31634 if test `eval echo '${'$as_ac_var'}'` = yes; then
31635   cat >>confdefs.h <<_ACEOF
31636 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
31637 _ACEOF
31638
31639 else
31640   # strftime is in -lintl on SCO UNIX.
31641 echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
31642 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
31643 if test "${ac_cv_lib_intl_strftime+set}" = set; then
31644   echo $ECHO_N "(cached) $ECHO_C" >&6
31645 else
31646   ac_check_lib_save_LIBS=$LIBS
31647 LIBS="-lintl  $LIBS"
31648 cat >conftest.$ac_ext <<_ACEOF
31649 #line $LINENO "configure"
31650 /* confdefs.h.  */
31651 _ACEOF
31652 cat confdefs.h >>conftest.$ac_ext
31653 cat >>conftest.$ac_ext <<_ACEOF
31654 /* end confdefs.h.  */
31655
31656 /* Override any gcc2 internal prototype to avoid an error.  */
31657 #ifdef __cplusplus
31658 extern "C"
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 strftime ();
31663 int
31664 main ()
31665 {
31666 strftime ();
31667   ;
31668   return 0;
31669 }
31670 _ACEOF
31671 rm -f conftest.$ac_objext conftest$ac_exeext
31672 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31673   (eval $ac_link) 2>&5
31674   ac_status=$?
31675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31676   (exit $ac_status); } &&
31677          { ac_try='test -s conftest$ac_exeext'
31678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31679   (eval $ac_try) 2>&5
31680   ac_status=$?
31681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31682   (exit $ac_status); }; }; then
31683   ac_cv_lib_intl_strftime=yes
31684 else
31685   echo "$as_me: failed program was:" >&5
31686 sed 's/^/| /' conftest.$ac_ext >&5
31687
31688 ac_cv_lib_intl_strftime=no
31689 fi
31690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31691 LIBS=$ac_check_lib_save_LIBS
31692 fi
31693 echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
31694 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
31695 if test $ac_cv_lib_intl_strftime = yes; then
31696   cat >>confdefs.h <<\_ACEOF
31697 #define HAVE_STRFTIME 1
31698 _ACEOF
31699
31700 LIBS="-lintl $LIBS"
31701 fi
31702
31703 fi
31704 done
31705
31706
31707 echo "$as_me:$LINENO: checking for inet_aton()" >&5
31708 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
31709 if test "${ol_cv_func_inet_aton+set}" = set; then
31710   echo $ECHO_N "(cached) $ECHO_C" >&6
31711 else
31712   cat >conftest.$ac_ext <<_ACEOF
31713 #line $LINENO "configure"
31714 /* confdefs.h.  */
31715 _ACEOF
31716 cat confdefs.h >>conftest.$ac_ext
31717 cat >>conftest.$ac_ext <<_ACEOF
31718 /* end confdefs.h.  */
31719
31720 #ifdef HAVE_SYS_TYPES_H
31721 #       include <sys/types.h>
31722 #endif
31723 #ifdef HAVE_SYS_SOCKET_H
31724 #       include <sys/socket.h>
31725 #       ifdef HAVE_SYS_SELECT_H
31726 #               include <sys/select.h>
31727 #       endif
31728 #       include <netinet/in.h>
31729 #       ifdef HAVE_ARPA_INET_H
31730 #               include <arpa/inet.h>
31731 #       endif
31732 #endif
31733
31734 int
31735 main ()
31736 {
31737 struct in_addr in;
31738 int rc = inet_aton( "255.255.255.255", &in );
31739   ;
31740   return 0;
31741 }
31742 _ACEOF
31743 rm -f conftest.$ac_objext conftest$ac_exeext
31744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31745   (eval $ac_link) 2>&5
31746   ac_status=$?
31747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31748   (exit $ac_status); } &&
31749          { ac_try='test -s conftest$ac_exeext'
31750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31751   (eval $ac_try) 2>&5
31752   ac_status=$?
31753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31754   (exit $ac_status); }; }; then
31755   ol_cv_func_inet_aton=yes
31756 else
31757   echo "$as_me: failed program was:" >&5
31758 sed 's/^/| /' conftest.$ac_ext >&5
31759
31760 ol_cv_func_inet_aton=no
31761 fi
31762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31763 fi
31764 echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
31765 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
31766   if test $ol_cv_func_inet_aton != no; then
31767
31768 cat >>confdefs.h <<\_ACEOF
31769 #define HAVE_INET_ATON 1
31770 _ACEOF
31771
31772   fi
31773
31774
31775 echo "$as_me:$LINENO: checking for _spawnlp" >&5
31776 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
31777 if test "${ac_cv_func__spawnlp+set}" = set; then
31778   echo $ECHO_N "(cached) $ECHO_C" >&6
31779 else
31780   cat >conftest.$ac_ext <<_ACEOF
31781 #line $LINENO "configure"
31782 /* confdefs.h.  */
31783 _ACEOF
31784 cat confdefs.h >>conftest.$ac_ext
31785 cat >>conftest.$ac_ext <<_ACEOF
31786 /* end confdefs.h.  */
31787 /* System header to define __stub macros and hopefully few prototypes,
31788     which can conflict with char _spawnlp (); below.
31789     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31790     <limits.h> exists even on freestanding compilers.  */
31791 #ifdef __STDC__
31792 # include <limits.h>
31793 #else
31794 # include <assert.h>
31795 #endif
31796 /* Override any gcc2 internal prototype to avoid an error.  */
31797 #ifdef __cplusplus
31798 extern "C"
31799 {
31800 #endif
31801 /* We use char because int might match the return type of a gcc2
31802    builtin and then its argument prototype would still apply.  */
31803 char _spawnlp ();
31804 /* The GNU C library defines this for functions which it implements
31805     to always fail with ENOSYS.  Some functions are actually named
31806     something starting with __ and the normal name is an alias.  */
31807 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
31808 choke me
31809 #else
31810 char (*f) () = _spawnlp;
31811 #endif
31812 #ifdef __cplusplus
31813 }
31814 #endif
31815
31816 int
31817 main ()
31818 {
31819 return f != _spawnlp;
31820   ;
31821   return 0;
31822 }
31823 _ACEOF
31824 rm -f conftest.$ac_objext conftest$ac_exeext
31825 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31826   (eval $ac_link) 2>&5
31827   ac_status=$?
31828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31829   (exit $ac_status); } &&
31830          { ac_try='test -s conftest$ac_exeext'
31831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31832   (eval $ac_try) 2>&5
31833   ac_status=$?
31834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31835   (exit $ac_status); }; }; then
31836   ac_cv_func__spawnlp=yes
31837 else
31838   echo "$as_me: failed program was:" >&5
31839 sed 's/^/| /' conftest.$ac_ext >&5
31840
31841 ac_cv_func__spawnlp=no
31842 fi
31843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31844 fi
31845 echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
31846 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
31847 if test $ac_cv_func__spawnlp = yes; then
31848
31849 cat >>confdefs.h <<\_ACEOF
31850 #define HAVE_SPAWNLP 1
31851 _ACEOF
31852
31853 fi
31854
31855
31856 echo "$as_me:$LINENO: checking for _snprintf" >&5
31857 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
31858 if test "${ac_cv_func__snprintf+set}" = set; then
31859   echo $ECHO_N "(cached) $ECHO_C" >&6
31860 else
31861   cat >conftest.$ac_ext <<_ACEOF
31862 #line $LINENO "configure"
31863 /* confdefs.h.  */
31864 _ACEOF
31865 cat confdefs.h >>conftest.$ac_ext
31866 cat >>conftest.$ac_ext <<_ACEOF
31867 /* end confdefs.h.  */
31868 /* System header to define __stub macros and hopefully few prototypes,
31869     which can conflict with char _snprintf (); below.
31870     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31871     <limits.h> exists even on freestanding compilers.  */
31872 #ifdef __STDC__
31873 # include <limits.h>
31874 #else
31875 # include <assert.h>
31876 #endif
31877 /* Override any gcc2 internal prototype to avoid an error.  */
31878 #ifdef __cplusplus
31879 extern "C"
31880 {
31881 #endif
31882 /* We use char because int might match the return type of a gcc2
31883    builtin and then its argument prototype would still apply.  */
31884 char _snprintf ();
31885 /* The GNU C library defines this for functions which it implements
31886     to always fail with ENOSYS.  Some functions are actually named
31887     something starting with __ and the normal name is an alias.  */
31888 #if defined (__stub__snprintf) || defined (__stub____snprintf)
31889 choke me
31890 #else
31891 char (*f) () = _snprintf;
31892 #endif
31893 #ifdef __cplusplus
31894 }
31895 #endif
31896
31897 int
31898 main ()
31899 {
31900 return f != _snprintf;
31901   ;
31902   return 0;
31903 }
31904 _ACEOF
31905 rm -f conftest.$ac_objext conftest$ac_exeext
31906 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31907   (eval $ac_link) 2>&5
31908   ac_status=$?
31909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31910   (exit $ac_status); } &&
31911          { ac_try='test -s conftest$ac_exeext'
31912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31913   (eval $ac_try) 2>&5
31914   ac_status=$?
31915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31916   (exit $ac_status); }; }; then
31917   ac_cv_func__snprintf=yes
31918 else
31919   echo "$as_me: failed program was:" >&5
31920 sed 's/^/| /' conftest.$ac_ext >&5
31921
31922 ac_cv_func__snprintf=no
31923 fi
31924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31925 fi
31926 echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
31927 echo "${ECHO_T}$ac_cv_func__snprintf" >&6
31928 if test $ac_cv_func__snprintf = yes; then
31929   ac_cv_func_snprintf=yes
31930
31931 cat >>confdefs.h <<\_ACEOF
31932 #define snprintf _snprintf
31933 _ACEOF
31934
31935
31936 fi
31937
31938
31939 echo "$as_me:$LINENO: checking for _vsnprintf" >&5
31940 echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
31941 if test "${ac_cv_func__vsnprintf+set}" = set; then
31942   echo $ECHO_N "(cached) $ECHO_C" >&6
31943 else
31944   cat >conftest.$ac_ext <<_ACEOF
31945 #line $LINENO "configure"
31946 /* confdefs.h.  */
31947 _ACEOF
31948 cat confdefs.h >>conftest.$ac_ext
31949 cat >>conftest.$ac_ext <<_ACEOF
31950 /* end confdefs.h.  */
31951 /* System header to define __stub macros and hopefully few prototypes,
31952     which can conflict with char _vsnprintf (); below.
31953     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31954     <limits.h> exists even on freestanding compilers.  */
31955 #ifdef __STDC__
31956 # include <limits.h>
31957 #else
31958 # include <assert.h>
31959 #endif
31960 /* Override any gcc2 internal prototype to avoid an error.  */
31961 #ifdef __cplusplus
31962 extern "C"
31963 {
31964 #endif
31965 /* We use char because int might match the return type of a gcc2
31966    builtin and then its argument prototype would still apply.  */
31967 char _vsnprintf ();
31968 /* The GNU C library defines this for functions which it implements
31969     to always fail with ENOSYS.  Some functions are actually named
31970     something starting with __ and the normal name is an alias.  */
31971 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
31972 choke me
31973 #else
31974 char (*f) () = _vsnprintf;
31975 #endif
31976 #ifdef __cplusplus
31977 }
31978 #endif
31979
31980 int
31981 main ()
31982 {
31983 return f != _vsnprintf;
31984   ;
31985   return 0;
31986 }
31987 _ACEOF
31988 rm -f conftest.$ac_objext conftest$ac_exeext
31989 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
31990   (eval $ac_link) 2>&5
31991   ac_status=$?
31992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31993   (exit $ac_status); } &&
31994          { ac_try='test -s conftest$ac_exeext'
31995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
31996   (eval $ac_try) 2>&5
31997   ac_status=$?
31998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31999   (exit $ac_status); }; }; then
32000   ac_cv_func__vsnprintf=yes
32001 else
32002   echo "$as_me: failed program was:" >&5
32003 sed 's/^/| /' conftest.$ac_ext >&5
32004
32005 ac_cv_func__vsnprintf=no
32006 fi
32007 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32008 fi
32009 echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
32010 echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
32011 if test $ac_cv_func__vsnprintf = yes; then
32012   ac_cv_func_vsnprintf=yes
32013
32014 cat >>confdefs.h <<\_ACEOF
32015 #define vsnprintf _vsnprintf
32016 _ACEOF
32017
32018
32019 fi
32020
32021
32022
32023 for ac_func in vprintf
32024 do
32025 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32026 echo "$as_me:$LINENO: checking for $ac_func" >&5
32027 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32028 if eval "test \"\${$as_ac_var+set}\" = set"; then
32029   echo $ECHO_N "(cached) $ECHO_C" >&6
32030 else
32031   cat >conftest.$ac_ext <<_ACEOF
32032 #line $LINENO "configure"
32033 /* confdefs.h.  */
32034 _ACEOF
32035 cat confdefs.h >>conftest.$ac_ext
32036 cat >>conftest.$ac_ext <<_ACEOF
32037 /* end confdefs.h.  */
32038 /* System header to define __stub macros and hopefully few prototypes,
32039     which can conflict with char $ac_func (); below.
32040     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32041     <limits.h> exists even on freestanding compilers.  */
32042 #ifdef __STDC__
32043 # include <limits.h>
32044 #else
32045 # include <assert.h>
32046 #endif
32047 /* Override any gcc2 internal prototype to avoid an error.  */
32048 #ifdef __cplusplus
32049 extern "C"
32050 {
32051 #endif
32052 /* We use char because int might match the return type of a gcc2
32053    builtin and then its argument prototype would still apply.  */
32054 char $ac_func ();
32055 /* The GNU C library defines this for functions which it implements
32056     to always fail with ENOSYS.  Some functions are actually named
32057     something starting with __ and the normal name is an alias.  */
32058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32059 choke me
32060 #else
32061 char (*f) () = $ac_func;
32062 #endif
32063 #ifdef __cplusplus
32064 }
32065 #endif
32066
32067 int
32068 main ()
32069 {
32070 return f != $ac_func;
32071   ;
32072   return 0;
32073 }
32074 _ACEOF
32075 rm -f conftest.$ac_objext conftest$ac_exeext
32076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32077   (eval $ac_link) 2>&5
32078   ac_status=$?
32079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32080   (exit $ac_status); } &&
32081          { ac_try='test -s conftest$ac_exeext'
32082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32083   (eval $ac_try) 2>&5
32084   ac_status=$?
32085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32086   (exit $ac_status); }; }; then
32087   eval "$as_ac_var=yes"
32088 else
32089   echo "$as_me: failed program was:" >&5
32090 sed 's/^/| /' conftest.$ac_ext >&5
32091
32092 eval "$as_ac_var=no"
32093 fi
32094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32095 fi
32096 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
32097 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
32098 if test `eval echo '${'$as_ac_var'}'` = yes; then
32099   cat >>confdefs.h <<_ACEOF
32100 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32101 _ACEOF
32102
32103 echo "$as_me:$LINENO: checking for _doprnt" >&5
32104 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
32105 if test "${ac_cv_func__doprnt+set}" = set; then
32106   echo $ECHO_N "(cached) $ECHO_C" >&6
32107 else
32108   cat >conftest.$ac_ext <<_ACEOF
32109 #line $LINENO "configure"
32110 /* confdefs.h.  */
32111 _ACEOF
32112 cat confdefs.h >>conftest.$ac_ext
32113 cat >>conftest.$ac_ext <<_ACEOF
32114 /* end confdefs.h.  */
32115 /* System header to define __stub macros and hopefully few prototypes,
32116     which can conflict with char _doprnt (); below.
32117     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32118     <limits.h> exists even on freestanding compilers.  */
32119 #ifdef __STDC__
32120 # include <limits.h>
32121 #else
32122 # include <assert.h>
32123 #endif
32124 /* Override any gcc2 internal prototype to avoid an error.  */
32125 #ifdef __cplusplus
32126 extern "C"
32127 {
32128 #endif
32129 /* We use char because int might match the return type of a gcc2
32130    builtin and then its argument prototype would still apply.  */
32131 char _doprnt ();
32132 /* The GNU C library defines this for functions which it implements
32133     to always fail with ENOSYS.  Some functions are actually named
32134     something starting with __ and the normal name is an alias.  */
32135 #if defined (__stub__doprnt) || defined (__stub____doprnt)
32136 choke me
32137 #else
32138 char (*f) () = _doprnt;
32139 #endif
32140 #ifdef __cplusplus
32141 }
32142 #endif
32143
32144 int
32145 main ()
32146 {
32147 return f != _doprnt;
32148   ;
32149   return 0;
32150 }
32151 _ACEOF
32152 rm -f conftest.$ac_objext conftest$ac_exeext
32153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32154   (eval $ac_link) 2>&5
32155   ac_status=$?
32156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32157   (exit $ac_status); } &&
32158          { ac_try='test -s conftest$ac_exeext'
32159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32160   (eval $ac_try) 2>&5
32161   ac_status=$?
32162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32163   (exit $ac_status); }; }; then
32164   ac_cv_func__doprnt=yes
32165 else
32166   echo "$as_me: failed program was:" >&5
32167 sed 's/^/| /' conftest.$ac_ext >&5
32168
32169 ac_cv_func__doprnt=no
32170 fi
32171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32172 fi
32173 echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
32174 echo "${ECHO_T}$ac_cv_func__doprnt" >&6
32175 if test $ac_cv_func__doprnt = yes; then
32176
32177 cat >>confdefs.h <<\_ACEOF
32178 #define HAVE_DOPRNT 1
32179 _ACEOF
32180
32181 fi
32182
32183 fi
32184 done
32185
32186
32187
32188 if test $ac_cv_func_vprintf = yes ; then
32189
32190
32191 for ac_func in snprintf vsnprintf
32192 do
32193 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32194 echo "$as_me:$LINENO: checking for $ac_func" >&5
32195 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32196 if eval "test \"\${$as_ac_var+set}\" = set"; then
32197   echo $ECHO_N "(cached) $ECHO_C" >&6
32198 else
32199   cat >conftest.$ac_ext <<_ACEOF
32200 #line $LINENO "configure"
32201 /* confdefs.h.  */
32202 _ACEOF
32203 cat confdefs.h >>conftest.$ac_ext
32204 cat >>conftest.$ac_ext <<_ACEOF
32205 /* end confdefs.h.  */
32206 /* System header to define __stub macros and hopefully few prototypes,
32207     which can conflict with char $ac_func (); below.
32208     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32209     <limits.h> exists even on freestanding compilers.  */
32210 #ifdef __STDC__
32211 # include <limits.h>
32212 #else
32213 # include <assert.h>
32214 #endif
32215 /* Override any gcc2 internal prototype to avoid an error.  */
32216 #ifdef __cplusplus
32217 extern "C"
32218 {
32219 #endif
32220 /* We use char because int might match the return type of a gcc2
32221    builtin and then its argument prototype would still apply.  */
32222 char $ac_func ();
32223 /* The GNU C library defines this for functions which it implements
32224     to always fail with ENOSYS.  Some functions are actually named
32225     something starting with __ and the normal name is an alias.  */
32226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32227 choke me
32228 #else
32229 char (*f) () = $ac_func;
32230 #endif
32231 #ifdef __cplusplus
32232 }
32233 #endif
32234
32235 int
32236 main ()
32237 {
32238 return f != $ac_func;
32239   ;
32240   return 0;
32241 }
32242 _ACEOF
32243 rm -f conftest.$ac_objext conftest$ac_exeext
32244 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32245   (eval $ac_link) 2>&5
32246   ac_status=$?
32247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32248   (exit $ac_status); } &&
32249          { ac_try='test -s conftest$ac_exeext'
32250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32251   (eval $ac_try) 2>&5
32252   ac_status=$?
32253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32254   (exit $ac_status); }; }; then
32255   eval "$as_ac_var=yes"
32256 else
32257   echo "$as_me: failed program was:" >&5
32258 sed 's/^/| /' conftest.$ac_ext >&5
32259
32260 eval "$as_ac_var=no"
32261 fi
32262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32263 fi
32264 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
32265 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
32266 if test `eval echo '${'$as_ac_var'}'` = yes; then
32267   cat >>confdefs.h <<_ACEOF
32268 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32269 _ACEOF
32270
32271 fi
32272 done
32273
32274 fi
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329 for ac_func in \
32330         bcopy                   \
32331         closesocket             \
32332         chroot                  \
32333         endgrent                \
32334         endpwent                \
32335         fcntl                   \
32336         flock                   \
32337         fstat                   \
32338         getdtablesize   \
32339         getgrgid                \
32340         gethostname             \
32341         getpass                 \
32342         getpassphrase   \
32343         getpwuid                \
32344         getpwnam                \
32345         getspnam                \
32346         gettimeofday    \
32347         initgroups              \
32348         lockf                   \
32349         memcpy                  \
32350         memmove                 \
32351         mkstemp                 \
32352         mktemp                  \
32353         pipe                    \
32354         read                    \
32355         recv                    \
32356         recvfrom                \
32357         setpwfile               \
32358         setgid                  \
32359         setegid                 \
32360         setsid                  \
32361         setuid                  \
32362         seteuid                 \
32363         sigaction               \
32364         signal                  \
32365         sigset                  \
32366         strdup                  \
32367         strerror                \
32368         strpbrk                 \
32369         strrchr                 \
32370         strsep                  \
32371         strstr                  \
32372         strtol                  \
32373         strtoul                 \
32374         strspn                  \
32375         sysconf                 \
32376         usleep                  \
32377         waitpid                 \
32378         wait4                   \
32379         write                   \
32380         send                    \
32381         sendmsg                 \
32382         sendto                  \
32383
32384 do
32385 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32386 echo "$as_me:$LINENO: checking for $ac_func" >&5
32387 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32388 if eval "test \"\${$as_ac_var+set}\" = set"; then
32389   echo $ECHO_N "(cached) $ECHO_C" >&6
32390 else
32391   cat >conftest.$ac_ext <<_ACEOF
32392 #line $LINENO "configure"
32393 /* confdefs.h.  */
32394 _ACEOF
32395 cat confdefs.h >>conftest.$ac_ext
32396 cat >>conftest.$ac_ext <<_ACEOF
32397 /* end confdefs.h.  */
32398 /* System header to define __stub macros and hopefully few prototypes,
32399     which can conflict with char $ac_func (); below.
32400     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32401     <limits.h> exists even on freestanding compilers.  */
32402 #ifdef __STDC__
32403 # include <limits.h>
32404 #else
32405 # include <assert.h>
32406 #endif
32407 /* Override any gcc2 internal prototype to avoid an error.  */
32408 #ifdef __cplusplus
32409 extern "C"
32410 {
32411 #endif
32412 /* We use char because int might match the return type of a gcc2
32413    builtin and then its argument prototype would still apply.  */
32414 char $ac_func ();
32415 /* The GNU C library defines this for functions which it implements
32416     to always fail with ENOSYS.  Some functions are actually named
32417     something starting with __ and the normal name is an alias.  */
32418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32419 choke me
32420 #else
32421 char (*f) () = $ac_func;
32422 #endif
32423 #ifdef __cplusplus
32424 }
32425 #endif
32426
32427 int
32428 main ()
32429 {
32430 return f != $ac_func;
32431   ;
32432   return 0;
32433 }
32434 _ACEOF
32435 rm -f conftest.$ac_objext conftest$ac_exeext
32436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32437   (eval $ac_link) 2>&5
32438   ac_status=$?
32439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32440   (exit $ac_status); } &&
32441          { ac_try='test -s conftest$ac_exeext'
32442   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32443   (eval $ac_try) 2>&5
32444   ac_status=$?
32445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32446   (exit $ac_status); }; }; then
32447   eval "$as_ac_var=yes"
32448 else
32449   echo "$as_me: failed program was:" >&5
32450 sed 's/^/| /' conftest.$ac_ext >&5
32451
32452 eval "$as_ac_var=no"
32453 fi
32454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32455 fi
32456 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
32457 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
32458 if test `eval echo '${'$as_ac_var'}'` = yes; then
32459   cat >>confdefs.h <<_ACEOF
32460 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32461 _ACEOF
32462
32463 fi
32464 done
32465
32466
32467
32468
32469 for ac_func in getopt getpeereid
32470 do
32471 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32472 echo "$as_me:$LINENO: checking for $ac_func" >&5
32473 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32474 if eval "test \"\${$as_ac_var+set}\" = set"; then
32475   echo $ECHO_N "(cached) $ECHO_C" >&6
32476 else
32477   cat >conftest.$ac_ext <<_ACEOF
32478 #line $LINENO "configure"
32479 /* confdefs.h.  */
32480 _ACEOF
32481 cat confdefs.h >>conftest.$ac_ext
32482 cat >>conftest.$ac_ext <<_ACEOF
32483 /* end confdefs.h.  */
32484 /* System header to define __stub macros and hopefully few prototypes,
32485     which can conflict with char $ac_func (); below.
32486     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32487     <limits.h> exists even on freestanding compilers.  */
32488 #ifdef __STDC__
32489 # include <limits.h>
32490 #else
32491 # include <assert.h>
32492 #endif
32493 /* Override any gcc2 internal prototype to avoid an error.  */
32494 #ifdef __cplusplus
32495 extern "C"
32496 {
32497 #endif
32498 /* We use char because int might match the return type of a gcc2
32499    builtin and then its argument prototype would still apply.  */
32500 char $ac_func ();
32501 /* The GNU C library defines this for functions which it implements
32502     to always fail with ENOSYS.  Some functions are actually named
32503     something starting with __ and the normal name is an alias.  */
32504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32505 choke me
32506 #else
32507 char (*f) () = $ac_func;
32508 #endif
32509 #ifdef __cplusplus
32510 }
32511 #endif
32512
32513 int
32514 main ()
32515 {
32516 return f != $ac_func;
32517   ;
32518   return 0;
32519 }
32520 _ACEOF
32521 rm -f conftest.$ac_objext conftest$ac_exeext
32522 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32523   (eval $ac_link) 2>&5
32524   ac_status=$?
32525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32526   (exit $ac_status); } &&
32527          { ac_try='test -s conftest$ac_exeext'
32528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32529   (eval $ac_try) 2>&5
32530   ac_status=$?
32531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32532   (exit $ac_status); }; }; then
32533   eval "$as_ac_var=yes"
32534 else
32535   echo "$as_me: failed program was:" >&5
32536 sed 's/^/| /' conftest.$ac_ext >&5
32537
32538 eval "$as_ac_var=no"
32539 fi
32540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32541 fi
32542 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
32543 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
32544 if test `eval echo '${'$as_ac_var'}'` = yes; then
32545   cat >>confdefs.h <<_ACEOF
32546 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32547 _ACEOF
32548
32549 else
32550   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
32551 fi
32552 done
32553
32554
32555
32556 if test "$ac_cv_func_getopt" != yes; then
32557         LIBSRCS="$LIBSRCS getopt.c"
32558 fi
32559 if test "$ac_cv_func_getpeereid" != yes; then
32560         echo "$as_me:$LINENO: checking for struct msghdr.msg_accrights" >&5
32561 echo $ECHO_N "checking for struct msghdr.msg_accrights... $ECHO_C" >&6
32562 if test "${ac_cv_member_struct_msghdr_msg_accrights+set}" = set; then
32563   echo $ECHO_N "(cached) $ECHO_C" >&6
32564 else
32565   cat >conftest.$ac_ext <<_ACEOF
32566 #line $LINENO "configure"
32567 /* confdefs.h.  */
32568 _ACEOF
32569 cat confdefs.h >>conftest.$ac_ext
32570 cat >>conftest.$ac_ext <<_ACEOF
32571 /* end confdefs.h.  */
32572 #include <sys/socket.h>
32573
32574 int
32575 main ()
32576 {
32577 static struct msghdr ac_aggr;
32578 if (ac_aggr.msg_accrights)
32579 return 0;
32580   ;
32581   return 0;
32582 }
32583 _ACEOF
32584 rm -f conftest.$ac_objext
32585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32586   (eval $ac_compile) 2>&5
32587   ac_status=$?
32588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32589   (exit $ac_status); } &&
32590          { ac_try='test -s conftest.$ac_objext'
32591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32592   (eval $ac_try) 2>&5
32593   ac_status=$?
32594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32595   (exit $ac_status); }; }; then
32596   ac_cv_member_struct_msghdr_msg_accrights=yes
32597 else
32598   echo "$as_me: failed program was:" >&5
32599 sed 's/^/| /' conftest.$ac_ext >&5
32600
32601 cat >conftest.$ac_ext <<_ACEOF
32602 #line $LINENO "configure"
32603 /* confdefs.h.  */
32604 _ACEOF
32605 cat confdefs.h >>conftest.$ac_ext
32606 cat >>conftest.$ac_ext <<_ACEOF
32607 /* end confdefs.h.  */
32608 #include <sys/socket.h>
32609
32610 int
32611 main ()
32612 {
32613 static struct msghdr ac_aggr;
32614 if (sizeof ac_aggr.msg_accrights)
32615 return 0;
32616   ;
32617   return 0;
32618 }
32619 _ACEOF
32620 rm -f conftest.$ac_objext
32621 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32622   (eval $ac_compile) 2>&5
32623   ac_status=$?
32624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32625   (exit $ac_status); } &&
32626          { ac_try='test -s conftest.$ac_objext'
32627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32628   (eval $ac_try) 2>&5
32629   ac_status=$?
32630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32631   (exit $ac_status); }; }; then
32632   ac_cv_member_struct_msghdr_msg_accrights=yes
32633 else
32634   echo "$as_me: failed program was:" >&5
32635 sed 's/^/| /' conftest.$ac_ext >&5
32636
32637 ac_cv_member_struct_msghdr_msg_accrights=no
32638 fi
32639 rm -f conftest.$ac_objext conftest.$ac_ext
32640 fi
32641 rm -f conftest.$ac_objext conftest.$ac_ext
32642 fi
32643 echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrights" >&5
32644 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrights" >&6
32645
32646    if test $ac_cv_member_struct_msghdr_msg_accrights = "yes" ; then
32647
32648 cat >>confdefs.h <<\_ACEOF
32649 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
32650 _ACEOF
32651
32652    fi
32653
32654         LIBSRCS="$LIBSRCS getpeereid.c"
32655 fi
32656 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
32657         if test "$ac_cv_func_snprintf" != yes; then
32658
32659 cat >>confdefs.h <<\_ACEOF
32660 #define snprintf ber_pvt_snprintf
32661 _ACEOF
32662
32663         fi
32664         if test "$ac_cv_func_vsnprintf" != yes; then
32665
32666 cat >>confdefs.h <<\_ACEOF
32667 #define vsnprintf ber_pvt_vsnprintf
32668 _ACEOF
32669
32670         fi
32671 fi
32672
32673 # Check Configuration
32674 echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
32675 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
32676 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
32677   echo $ECHO_N "(cached) $ECHO_C" >&6
32678 else
32679
32680         cat >conftest.$ac_ext <<_ACEOF
32681 #line $LINENO "configure"
32682 /* confdefs.h.  */
32683 _ACEOF
32684 cat confdefs.h >>conftest.$ac_ext
32685 cat >>conftest.$ac_ext <<_ACEOF
32686 /* end confdefs.h.  */
32687
32688 #include <stdio.h>
32689 #include <sys/types.h>
32690 #include <errno.h>
32691 #ifdef WINNT
32692 #include <stdlib.h>
32693 #endif
32694 int
32695 main ()
32696 {
32697 char *c = (char *) *sys_errlist
32698   ;
32699   return 0;
32700 }
32701 _ACEOF
32702 rm -f conftest.$ac_objext
32703 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32704   (eval $ac_compile) 2>&5
32705   ac_status=$?
32706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32707   (exit $ac_status); } &&
32708          { ac_try='test -s conftest.$ac_objext'
32709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32710   (eval $ac_try) 2>&5
32711   ac_status=$?
32712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32713   (exit $ac_status); }; }; then
32714   ol_cv_dcl_sys_errlist=yes
32715         ol_cv_have_sys_errlist=yes
32716 else
32717   echo "$as_me: failed program was:" >&5
32718 sed 's/^/| /' conftest.$ac_ext >&5
32719
32720 ol_cv_dcl_sys_errlist=no
32721 fi
32722 rm -f conftest.$ac_objext conftest.$ac_ext
32723 fi
32724 echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
32725 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
32726 #
32727 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
32728 if test $ol_cv_dcl_sys_errlist = no ; then
32729
32730 cat >>confdefs.h <<\_ACEOF
32731 #define DECL_SYS_ERRLIST 1
32732 _ACEOF
32733
32734
32735         echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
32736 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
32737 if test "${ol_cv_have_sys_errlist+set}" = set; then
32738   echo $ECHO_N "(cached) $ECHO_C" >&6
32739 else
32740
32741                 cat >conftest.$ac_ext <<_ACEOF
32742 #line $LINENO "configure"
32743 /* confdefs.h.  */
32744 _ACEOF
32745 cat confdefs.h >>conftest.$ac_ext
32746 cat >>conftest.$ac_ext <<_ACEOF
32747 /* end confdefs.h.  */
32748 #include <errno.h>
32749 int
32750 main ()
32751 {
32752 char *c = (char *) *sys_errlist
32753   ;
32754   return 0;
32755 }
32756 _ACEOF
32757 rm -f conftest.$ac_objext conftest$ac_exeext
32758 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32759   (eval $ac_link) 2>&5
32760   ac_status=$?
32761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32762   (exit $ac_status); } &&
32763          { ac_try='test -s conftest$ac_exeext'
32764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32765   (eval $ac_try) 2>&5
32766   ac_status=$?
32767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32768   (exit $ac_status); }; }; then
32769   ol_cv_have_sys_errlist=yes
32770 else
32771   echo "$as_me: failed program was:" >&5
32772 sed 's/^/| /' conftest.$ac_ext >&5
32773
32774 ol_cv_have_sys_errlist=no
32775 fi
32776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32777 fi
32778 echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
32779 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
32780 fi
32781 if test $ol_cv_have_sys_errlist = yes ; then
32782
32783 cat >>confdefs.h <<\_ACEOF
32784 #define HAVE_SYS_ERRLIST 1
32785 _ACEOF
32786
32787 fi
32788
32789
32790
32791 if test "$ol_enable_slapi" != no ; then
32792
32793 for ac_header in ltdl.h
32794 do
32795 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
32796 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32797   echo "$as_me:$LINENO: checking for $ac_header" >&5
32798 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32799 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32800   echo $ECHO_N "(cached) $ECHO_C" >&6
32801 fi
32802 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32803 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32804 else
32805   # Is the header compilable?
32806 echo "$as_me:$LINENO: checking $ac_header usability" >&5
32807 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
32808 cat >conftest.$ac_ext <<_ACEOF
32809 #line $LINENO "configure"
32810 /* confdefs.h.  */
32811 _ACEOF
32812 cat confdefs.h >>conftest.$ac_ext
32813 cat >>conftest.$ac_ext <<_ACEOF
32814 /* end confdefs.h.  */
32815 $ac_includes_default
32816 #include <$ac_header>
32817 _ACEOF
32818 rm -f conftest.$ac_objext
32819 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
32820   (eval $ac_compile) 2>&5
32821   ac_status=$?
32822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32823   (exit $ac_status); } &&
32824          { ac_try='test -s conftest.$ac_objext'
32825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32826   (eval $ac_try) 2>&5
32827   ac_status=$?
32828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32829   (exit $ac_status); }; }; then
32830   ac_header_compiler=yes
32831 else
32832   echo "$as_me: failed program was:" >&5
32833 sed 's/^/| /' conftest.$ac_ext >&5
32834
32835 ac_header_compiler=no
32836 fi
32837 rm -f conftest.$ac_objext conftest.$ac_ext
32838 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
32839 echo "${ECHO_T}$ac_header_compiler" >&6
32840
32841 # Is the header present?
32842 echo "$as_me:$LINENO: checking $ac_header presence" >&5
32843 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
32844 cat >conftest.$ac_ext <<_ACEOF
32845 #line $LINENO "configure"
32846 /* confdefs.h.  */
32847 _ACEOF
32848 cat confdefs.h >>conftest.$ac_ext
32849 cat >>conftest.$ac_ext <<_ACEOF
32850 /* end confdefs.h.  */
32851 #include <$ac_header>
32852 _ACEOF
32853 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
32854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
32855   ac_status=$?
32856   grep -v '^ *+' conftest.er1 >conftest.err
32857   rm -f conftest.er1
32858   cat conftest.err >&5
32859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32860   (exit $ac_status); } >/dev/null; then
32861   if test -s conftest.err; then
32862     ac_cpp_err=$ac_c_preproc_warn_flag
32863   else
32864     ac_cpp_err=
32865   fi
32866 else
32867   ac_cpp_err=yes
32868 fi
32869 if test -z "$ac_cpp_err"; then
32870   ac_header_preproc=yes
32871 else
32872   echo "$as_me: failed program was:" >&5
32873 sed 's/^/| /' conftest.$ac_ext >&5
32874
32875   ac_header_preproc=no
32876 fi
32877 rm -f conftest.err conftest.$ac_ext
32878 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
32879 echo "${ECHO_T}$ac_header_preproc" >&6
32880
32881 # So?  What about this header?
32882 case $ac_header_compiler:$ac_header_preproc in
32883   yes:no )
32884     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
32885 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
32886     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32887 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32888     (
32889       cat <<\_ASBOX
32890 ## ------------------------------------ ##
32891 ## Report this to bug-autoconf@gnu.org. ##
32892 ## ------------------------------------ ##
32893 _ASBOX
32894     ) |
32895       sed "s/^/$as_me: WARNING:     /" >&2
32896     ;;
32897   no:yes )
32898     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
32899 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
32900     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
32901 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
32902     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
32903 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
32904     (
32905       cat <<\_ASBOX
32906 ## ------------------------------------ ##
32907 ## Report this to bug-autoconf@gnu.org. ##
32908 ## ------------------------------------ ##
32909 _ASBOX
32910     ) |
32911       sed "s/^/$as_me: WARNING:     /" >&2
32912     ;;
32913 esac
32914 echo "$as_me:$LINENO: checking for $ac_header" >&5
32915 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32917   echo $ECHO_N "(cached) $ECHO_C" >&6
32918 else
32919   eval "$as_ac_Header=$ac_header_preproc"
32920 fi
32921 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
32922 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
32923
32924 fi
32925 if test `eval echo '${'$as_ac_Header'}'` = yes; then
32926   cat >>confdefs.h <<_ACEOF
32927 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
32928 _ACEOF
32929
32930 fi
32931
32932 done
32933
32934
32935         if test $ac_cv_header_ltdl_h != yes ; then
32936                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
32937 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
32938    { (exit 1); exit 1; }; }
32939         fi
32940         echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
32941 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
32942 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
32943   echo $ECHO_N "(cached) $ECHO_C" >&6
32944 else
32945   ac_check_lib_save_LIBS=$LIBS
32946 LIBS="-lltdl  $LIBS"
32947 cat >conftest.$ac_ext <<_ACEOF
32948 #line $LINENO "configure"
32949 /* confdefs.h.  */
32950 _ACEOF
32951 cat confdefs.h >>conftest.$ac_ext
32952 cat >>conftest.$ac_ext <<_ACEOF
32953 /* end confdefs.h.  */
32954
32955 /* Override any gcc2 internal prototype to avoid an error.  */
32956 #ifdef __cplusplus
32957 extern "C"
32958 #endif
32959 /* We use char because int might match the return type of a gcc2
32960    builtin and then its argument prototype would still apply.  */
32961 char lt_dlinit ();
32962 int
32963 main ()
32964 {
32965 lt_dlinit ();
32966   ;
32967   return 0;
32968 }
32969 _ACEOF
32970 rm -f conftest.$ac_objext conftest$ac_exeext
32971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
32972   (eval $ac_link) 2>&5
32973   ac_status=$?
32974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32975   (exit $ac_status); } &&
32976          { ac_try='test -s conftest$ac_exeext'
32977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
32978   (eval $ac_try) 2>&5
32979   ac_status=$?
32980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32981   (exit $ac_status); }; }; then
32982   ac_cv_lib_ltdl_lt_dlinit=yes
32983 else
32984   echo "$as_me: failed program was:" >&5
32985 sed 's/^/| /' conftest.$ac_ext >&5
32986
32987 ac_cv_lib_ltdl_lt_dlinit=no
32988 fi
32989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32990 LIBS=$ac_check_lib_save_LIBS
32991 fi
32992 echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
32993 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
32994 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
32995
32996                 SLAPI_LIBS=-lltdl
32997                 LIBSLAPI=./libslapi.a
32998                 LIBSLAPITOOLS=../libslapi.a
32999
33000 cat >>confdefs.h <<\_ACEOF
33001 #define HAVE_LIBLTDL 1
33002 _ACEOF
33003
33004
33005 else
33006   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
33007 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
33008    { (exit 1); exit 1; }; }
33009 fi
33010
33011
33012
33013 cat >>confdefs.h <<\_ACEOF
33014 #define LDAP_SLAPI 1
33015 _ACEOF
33016
33017 fi
33018
33019 if test "$ol_enable_debug" != no ; then
33020
33021 cat >>confdefs.h <<\_ACEOF
33022 #define LDAP_DEBUG 1
33023 _ACEOF
33024
33025 fi
33026 if test "$ol_enable_syslog" = yes ; then
33027
33028 cat >>confdefs.h <<\_ACEOF
33029 #define LDAP_SYSLOG 1
33030 _ACEOF
33031
33032 fi
33033 if test "$ol_link_kbind" != no ; then
33034         cat >>confdefs.h <<\_ACEOF
33035 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
33036 _ACEOF
33037
33038 fi
33039 if test "$ol_enable_proctitle" != no ; then
33040
33041 cat >>confdefs.h <<\_ACEOF
33042 #define LDAP_PROCTITLE 1
33043 _ACEOF
33044
33045 fi
33046 if test "$ol_enable_referrals" != no ; then
33047         cat >>confdefs.h <<\_ACEOF
33048 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
33049 _ACEOF
33050
33051 fi
33052 if test "$ol_enable_local" != no; then
33053
33054 cat >>confdefs.h <<\_ACEOF
33055 #define LDAP_PF_LOCAL 1
33056 _ACEOF
33057
33058 fi
33059 if test "$ol_link_ipv6" != no; then
33060
33061 cat >>confdefs.h <<\_ACEOF
33062 #define LDAP_PF_INET6 1
33063 _ACEOF
33064
33065 fi
33066 if test "$ol_enable_cleartext" != no ; then
33067
33068 cat >>confdefs.h <<\_ACEOF
33069 #define SLAPD_CLEARTEXT 1
33070 _ACEOF
33071
33072 fi
33073 if test "$ol_enable_crypt" != no ; then
33074
33075 cat >>confdefs.h <<\_ACEOF
33076 #define SLAPD_CRYPT 1
33077 _ACEOF
33078
33079 fi
33080 if test "$ol_link_kpasswd" != no ; then
33081
33082 cat >>confdefs.h <<\_ACEOF
33083 #define SLAPD_KPASSWD 1
33084 _ACEOF
33085
33086 fi
33087 if test "$ol_link_spasswd" != no ; then
33088
33089 cat >>confdefs.h <<\_ACEOF
33090 #define SLAPD_SPASSWD 1
33091 _ACEOF
33092
33093 fi
33094 if test "$ol_enable_multimaster" != no ; then
33095
33096 cat >>confdefs.h <<\_ACEOF
33097 #define SLAPD_MULTIMASTER 1
33098 _ACEOF
33099
33100 fi
33101 if test "$ol_enable_phonetic" != no ; then
33102
33103 cat >>confdefs.h <<\_ACEOF
33104 #define SLAPD_PHONETIC 1
33105 _ACEOF
33106
33107 fi
33108 if test "$ol_enable_rlookups" != no ; then
33109
33110 cat >>confdefs.h <<\_ACEOF
33111 #define SLAPD_RLOOKUPS 1
33112 _ACEOF
33113
33114 fi
33115 if test "$ol_enable_aci" != no ; then
33116
33117 cat >>confdefs.h <<\_ACEOF
33118 #define SLAPD_ACI_ENABLED 1
33119 _ACEOF
33120
33121 fi
33122
33123 if test "$ol_link_modules" != no ; then
33124
33125 cat >>confdefs.h <<\_ACEOF
33126 #define SLAPD_MODULES 1
33127 _ACEOF
33128
33129         BUILD_SLAPD=yes
33130         SLAPD_MODULES_LDFLAGS="-dlopen self"
33131 fi
33132
33133 if test "$ol_enable_bdb" != no ; then
33134
33135 cat >>confdefs.h <<\_ACEOF
33136 #define SLAPD_BDB 1
33137 _ACEOF
33138
33139         BUILD_SLAPD=yes
33140         BUILD_BDB=yes
33141         if test "$ol_with_bdb_module" != static ; then
33142
33143 cat >>confdefs.h <<\_ACEOF
33144 #define SLAPD_BDB_DYNAMIC 1
33145 _ACEOF
33146
33147                 BUILD_BDB=mod
33148                 BUILD_BDB_DYNAMIC=shared
33149                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
33150         else
33151                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
33152         fi
33153 fi
33154
33155 if test "$ol_link_dnssrv" != no ; then
33156
33157 cat >>confdefs.h <<\_ACEOF
33158 #define SLAPD_DNSSRV 1
33159 _ACEOF
33160
33161         BUILD_SLAPD=yes
33162         BUILD_DNSSRV=yes
33163         if test "$ol_with_dnssrv_module" != static ; then
33164
33165 cat >>confdefs.h <<\_ACEOF
33166 #define SLAPD_DNSSRV_DYNAMIC 1
33167 _ACEOF
33168
33169                 BUILD_DNSSRV=mod
33170                 BUILD_DNSSRV_DYNAMIC=shared
33171                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
33172         else
33173                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
33174         fi
33175 fi
33176
33177 if test "$ol_enable_ldap" != no ; then
33178
33179 cat >>confdefs.h <<\_ACEOF
33180 #define SLAPD_LDAP 1
33181 _ACEOF
33182
33183         BUILD_SLAPD=yes
33184         BUILD_LDAP=yes
33185         if test "$ol_with_ldap_module" != static ; then
33186
33187 cat >>confdefs.h <<\_ACEOF
33188 #define SLAPD_LDAP_DYNAMIC 1
33189 _ACEOF
33190
33191                 BUILD_LDAP=mod
33192                 BUILD_LDAP_DYNAMIC=shared
33193                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
33194         else
33195                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
33196         fi
33197 fi
33198
33199 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
33200
33201 cat >>confdefs.h <<\_ACEOF
33202 #define SLAPD_LDBM 1
33203 _ACEOF
33204
33205         BUILD_SLAPD=yes
33206         BUILD_LDBM=yes
33207         if test "$ol_with_ldbm_module" != static ; then
33208
33209 cat >>confdefs.h <<\_ACEOF
33210 #define SLAPD_LDBM_DYNAMIC 1
33211 _ACEOF
33212
33213                 BUILD_LDBM=mod
33214                 BUILD_LDBM_DYNAMIC=shared
33215                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
33216         else
33217                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
33218         fi
33219 fi
33220
33221 if test "$ol_enable_meta" != no ; then
33222         if test "$ol_enable_ldap" = no ; then
33223                 { { echo "$as_me:$LINENO: error: need --enable-ldap to use --enable-meta" >&5
33224 echo "$as_me: error: need --enable-ldap to use --enable-meta" >&2;}
33225    { (exit 1); exit 1; }; }
33226         fi
33227         if test "$ol_enable_rewrite" = no ; then
33228                 { { echo "$as_me:$LINENO: error: need --enable-rewrite to use --enable-meta" >&5
33229 echo "$as_me: error: need --enable-rewrite to use --enable-meta" >&2;}
33230    { (exit 1); exit 1; }; }
33231         fi
33232
33233 cat >>confdefs.h <<\_ACEOF
33234 #define SLAPD_META 1
33235 _ACEOF
33236
33237         BUILD_SLAPD=yes
33238         BUILD_META=yes
33239         BUILD_LDAP=yes
33240         BUILD_REWRITE=yes
33241         if test "$ol_with_meta_module" != static ; then
33242
33243 cat >>confdefs.h <<\_ACEOF
33244 #define SLAPD_META_DYNAMIC 1
33245 _ACEOF
33246
33247                 BUILD_META=mod
33248                 BUILD_META_DYNAMIC=shared
33249                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
33250         else
33251                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
33252         fi
33253 fi
33254
33255 if test "$ol_enable_monitor" != no ; then
33256
33257 cat >>confdefs.h <<\_ACEOF
33258 #define SLAPD_MONITOR 1
33259 _ACEOF
33260
33261         BUILD_SLAPD=yes
33262         BUILD_MONITOR=yes
33263         if test "$ol_with_monitor_module" != static ; then
33264
33265 cat >>confdefs.h <<\_ACEOF
33266 #define SLAPD_MONITOR_DYNAMIC 1
33267 _ACEOF
33268
33269                 BUILD_MONITOR=mod
33270                 BUILD_MONITOR_DYNAMIC=shared
33271                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
33272         else
33273                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
33274         fi
33275 fi
33276
33277 if test "$ol_enable_null" != no ; then
33278
33279 cat >>confdefs.h <<\_ACEOF
33280 #define SLAPD_NULL 1
33281 _ACEOF
33282
33283         BUILD_SLAPD=yes
33284         BUILD_NULL=yes
33285         if test "$ol_with_null_module" != static ; then
33286
33287 cat >>confdefs.h <<\_ACEOF
33288 #define SLAPD_NULL_DYNAMIC 1
33289 _ACEOF
33290
33291                 BUILD_NULL=mod
33292                 BUILD_NULL_DYNAMIC=shared
33293                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
33294         else
33295                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
33296         fi
33297 fi
33298
33299 if test "$ol_enable_passwd" != no ; then
33300
33301 cat >>confdefs.h <<\_ACEOF
33302 #define SLAPD_PASSWD 1
33303 _ACEOF
33304
33305         BUILD_SLAPD=yes
33306         BUILD_PASSWD=yes
33307         if test "$ol_with_passwd_module" != static ; then
33308
33309 cat >>confdefs.h <<\_ACEOF
33310 #define SLAPD_PASSWD_DYNAMIC 1
33311 _ACEOF
33312
33313                 BUILD_PASSWD=mod
33314                 BUILD_PASSWD_DYNAMIC=shared
33315                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
33316         else
33317                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
33318         fi
33319 fi
33320
33321 if test "$ol_link_perl" != no ; then
33322
33323 cat >>confdefs.h <<\_ACEOF
33324 #define SLAPD_PERL 1
33325 _ACEOF
33326
33327         BUILD_SLAPD=yes
33328         BUILD_PERL=yes
33329         if test "$ol_with_perl_module" != static ; then
33330
33331 cat >>confdefs.h <<\_ACEOF
33332 #define SLAPD_PERL_DYNAMIC 1
33333 _ACEOF
33334
33335                 BUILD_PERL=mod
33336                 BUILD_PERL_DYNAMIC=shared
33337                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
33338         else
33339                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
33340         fi
33341 fi
33342
33343 if test "$ol_enable_shell" != no ; then
33344         if test "$ol_link_thread" != no ; then
33345                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
33346 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
33347         fi
33348
33349 cat >>confdefs.h <<\_ACEOF
33350 #define SLAPD_SHELL 1
33351 _ACEOF
33352
33353         BUILD_SLAPD=yes
33354         BUILD_SHELL=yes
33355         if test "$ol_with_shell_module" != static ; then
33356
33357 cat >>confdefs.h <<\_ACEOF
33358 #define SLAPD_SHELL_DYNAMIC 1
33359 _ACEOF
33360
33361                 BUILD_SHELL=mod
33362                 BUILD_SHELL_DYNAMIC=shared
33363                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
33364         else
33365                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
33366         fi
33367 fi
33368
33369 if test "$ol_enable_tcl" != no ; then
33370
33371 cat >>confdefs.h <<\_ACEOF
33372 #define SLAPD_TCL 1
33373 _ACEOF
33374
33375         BUILD_SLAPD=yes
33376         BUILD_TCL=yes
33377         if test "$ol_with_tcl_module" != static; then
33378
33379 cat >>confdefs.h <<\_ACEOF
33380 #define SLAPD_TCL_DYNAMIC 1
33381 _ACEOF
33382
33383                 BUILD_TCL=mod
33384                 BUILD_TCL_DYNAMIC=shared
33385                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
33386         else
33387                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
33388         fi
33389 fi
33390
33391 if test "$ol_link_sql" != no ; then
33392
33393 cat >>confdefs.h <<\_ACEOF
33394 #define SLAPD_SQL 1
33395 _ACEOF
33396
33397         BUILD_SLAPD=yes
33398         BUILD_SQL=yes
33399         if test "$ol_with_sql_module" != static; then
33400
33401 cat >>confdefs.h <<\_ACEOF
33402 #define SLAPD_SQL_DYNAMIC 1
33403 _ACEOF
33404
33405                 BUILD_SQL=mod
33406                 BUILD_SQL_DYNAMIC=shared
33407                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
33408         else
33409                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
33410         fi
33411 fi
33412
33413 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
33414         $BUILD_SLAPD = yes ; then
33415         BUILD_SLURPD=yes
33416 fi
33417
33418 if test "$ol_enable_rewrite" != no ; then
33419
33420 cat >>confdefs.h <<\_ACEOF
33421 #define ENABLE_REWRITE 1
33422 _ACEOF
33423
33424         BUILD_REWRITE=yes
33425 fi
33426
33427 if test "$ol_enable_slapi" != no ; then
33428
33429 cat >>confdefs.h <<\_ACEOF
33430 #define ENABLE_SLAPI 1
33431 _ACEOF
33432
33433         BUILD_SLAPI=yes
33434         SLAPD_SLAPI_DEPEND=libslapi.a
33435 fi
33436
33437
33438
33439 if test "$ac_cv_mingw32" = yes ; then
33440         PLAT=NT
33441         SLAPD_MODULES_LDFLAGS=
33442 else
33443         PLAT=UNIX
33444 fi
33445
33446 if test -z "$SLAPD_STATIC_BACKENDS"; then
33447         SLAPD_NO_STATIC='#'
33448 else
33449         SLAPD_NO_STATIC=
33450 fi
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525 # Check whether --with-xxinstall or --without-xxinstall was given.
33526 if test "${with_xxinstall+set}" = set; then
33527   withval="$with_xxinstall"
33528
33529 fi;
33530
33531           ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk"
33532
33533           ac_config_files="$ac_config_files doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk"
33534
33535           ac_config_files="$ac_config_files doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk"
33536
33537           ac_config_files="$ac_config_files doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk"
33538
33539           ac_config_files="$ac_config_files doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk"
33540
33541           ac_config_files="$ac_config_files doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk"
33542
33543           ac_config_files="$ac_config_files doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk"
33544
33545           ac_config_files="$ac_config_files clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk"
33546
33547           ac_config_files="$ac_config_files clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk"
33548
33549           ac_config_files="$ac_config_files include/Makefile:build/top.mk:include/Makefile.in"
33550
33551           ac_config_files="$ac_config_files libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk"
33552
33553           ac_config_files="$ac_config_files libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk"
33554
33555           ac_config_files="$ac_config_files libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk"
33556
33557           ac_config_files="$ac_config_files libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk"
33558
33559           ac_config_files="$ac_config_files libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk"
33560
33561           ac_config_files="$ac_config_files libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk"
33562
33563           ac_config_files="$ac_config_files libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk"
33564
33565           ac_config_files="$ac_config_files libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk"
33566
33567           ac_config_files="$ac_config_files libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk"
33568
33569           ac_config_files="$ac_config_files libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk"
33570
33571           ac_config_files="$ac_config_files servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk"
33572
33573           ac_config_files="$ac_config_files servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk"
33574
33575           ac_config_files="$ac_config_files servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk"
33576
33577           ac_config_files="$ac_config_files servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk"
33578
33579           ac_config_files="$ac_config_files servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk"
33580
33581           ac_config_files="$ac_config_files servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk"
33582
33583           ac_config_files="$ac_config_files servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk"
33584
33585           ac_config_files="$ac_config_files servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk"
33586
33587           ac_config_files="$ac_config_files servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk"
33588
33589           ac_config_files="$ac_config_files servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk"
33590
33591           ac_config_files="$ac_config_files servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk"
33592
33593           ac_config_files="$ac_config_files servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk"
33594
33595           ac_config_files="$ac_config_files servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk"
33596
33597           ac_config_files="$ac_config_files servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk"
33598
33599           ac_config_files="$ac_config_files servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk"
33600
33601           ac_config_files="$ac_config_files servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk"
33602
33603           ac_config_files="$ac_config_files servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in"
33604
33605           ac_config_files="$ac_config_files servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk"
33606
33607           ac_config_files="$ac_config_files tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk"
33608
33609           ac_config_files="$ac_config_files tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk"
33610
33611
33612           ac_config_commands="$ac_config_commands time-stamp"
33613
33614 cat >confcache <<\_ACEOF
33615 # This file is a shell script that caches the results of configure
33616 # tests run on this system so they can be shared between configure
33617 # scripts and configure runs, see configure's option --config-cache.
33618 # It is not useful on other systems.  If it contains results you don't
33619 # want to keep, you may remove or edit it.
33620 #
33621 # config.status only pays attention to the cache file if you give it
33622 # the --recheck option to rerun configure.
33623 #
33624 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33625 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33626 # following values.
33627
33628 _ACEOF
33629
33630 # The following way of writing the cache mishandles newlines in values,
33631 # but we know of no workaround that is simple, portable, and efficient.
33632 # So, don't put newlines in cache variables' values.
33633 # Ultrix sh set writes to stderr and can't be redirected directly,
33634 # and sets the high bit in the cache file unless we assign to the vars.
33635 {
33636   (set) 2>&1 |
33637     case `(ac_space=' '; set | grep ac_space) 2>&1` in
33638     *ac_space=\ *)
33639       # `set' does not quote correctly, so add quotes (double-quote
33640       # substitution turns \\\\ into \\, and sed turns \\ into \).
33641       sed -n \
33642         "s/'/'\\\\''/g;
33643           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33644       ;;
33645     *)
33646       # `set' quotes correctly as required by POSIX, so do not add quotes.
33647       sed -n \
33648         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
33649       ;;
33650     esac;
33651 } |
33652   sed '
33653      t clear
33654      : clear
33655      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33656      t end
33657      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33658      : end' >>confcache
33659 if diff $cache_file confcache >/dev/null 2>&1; then :; else
33660   if test -w $cache_file; then
33661     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
33662     cat confcache >$cache_file
33663   else
33664     echo "not updating unwritable cache $cache_file"
33665   fi
33666 fi
33667 rm -f confcache
33668
33669 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33670 # Let make expand exec_prefix.
33671 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33672
33673 # VPATH may cause trouble with some makes, so we remove $(srcdir),
33674 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
33675 # trailing colons and then remove the whole line if VPATH becomes empty
33676 # (actually we leave an empty line to preserve line numbers).
33677 if test "x$srcdir" = x.; then
33678   ac_vpsub='/^[         ]*VPATH[        ]*=/{
33679 s/:*\$(srcdir):*/:/;
33680 s/:*\${srcdir}:*/:/;
33681 s/:*@srcdir@:*/:/;
33682 s/^\([^=]*=[    ]*\):*/\1/;
33683 s/:*$//;
33684 s/^[^=]*=[      ]*$//;
33685 }'
33686 fi
33687
33688 DEFS=-DHAVE_CONFIG_H
33689
33690 ac_libobjs=
33691 ac_ltlibobjs=
33692 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33693   # 1. Remove the extension, and $U if already installed.
33694   ac_i=`echo "$ac_i" |
33695          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
33696   # 2. Add them.
33697   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
33698   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
33699 done
33700 LIBOBJS=$ac_libobjs
33701
33702 LTLIBOBJS=$ac_ltlibobjs
33703
33704
33705
33706 : ${CONFIG_STATUS=./config.status}
33707 ac_clean_files_save=$ac_clean_files
33708 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33709 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
33710 echo "$as_me: creating $CONFIG_STATUS" >&6;}
33711 cat >$CONFIG_STATUS <<_ACEOF
33712 #! $SHELL
33713 # Generated by $as_me.
33714 # Run this file to recreate the current configuration.
33715 # Compiler output produced by configure, useful for debugging
33716 # configure, is in config.log if it exists.
33717
33718 debug=false
33719 ac_cs_recheck=false
33720 ac_cs_silent=false
33721 SHELL=\${CONFIG_SHELL-$SHELL}
33722 _ACEOF
33723
33724 cat >>$CONFIG_STATUS <<\_ACEOF
33725 ## --------------------- ##
33726 ## M4sh Initialization.  ##
33727 ## --------------------- ##
33728
33729 # Be Bourne compatible
33730 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
33731   emulate sh
33732   NULLCMD=:
33733   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
33734   # is contrary to our usage.  Disable this feature.
33735   alias -g '${1+"$@"}'='"$@"'
33736 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33737   set -o posix
33738 fi
33739
33740 # Support unset when possible.
33741 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33742   as_unset=unset
33743 else
33744   as_unset=false
33745 fi
33746
33747
33748 # Work around bugs in pre-3.0 UWIN ksh.
33749 $as_unset ENV MAIL MAILPATH
33750 PS1='$ '
33751 PS2='> '
33752 PS4='+ '
33753
33754 # NLS nuisances.
33755 for as_var in \
33756   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
33757   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
33758   LC_TELEPHONE LC_TIME
33759 do
33760   if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
33761     eval $as_var=C; export $as_var
33762   else
33763     $as_unset $as_var
33764   fi
33765 done
33766
33767 # Required to use basename.
33768 if expr a : '\(a\)' >/dev/null 2>&1; then
33769   as_expr=expr
33770 else
33771   as_expr=false
33772 fi
33773
33774 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
33775   as_basename=basename
33776 else
33777   as_basename=false
33778 fi
33779
33780
33781 # Name of the executable.
33782 as_me=`$as_basename "$0" ||
33783 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33784          X"$0" : 'X\(//\)$' \| \
33785          X"$0" : 'X\(/\)$' \| \
33786          .     : '\(.\)' 2>/dev/null ||
33787 echo X/"$0" |
33788     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
33789           /^X\/\(\/\/\)$/{ s//\1/; q; }
33790           /^X\/\(\/\).*/{ s//\1/; q; }
33791           s/.*/./; q'`
33792
33793
33794 # PATH needs CR, and LINENO needs CR and PATH.
33795 # Avoid depending upon Character Ranges.
33796 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33797 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33798 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33799 as_cr_digits='0123456789'
33800 as_cr_alnum=$as_cr_Letters$as_cr_digits
33801
33802 # The user is always right.
33803 if test "${PATH_SEPARATOR+set}" != set; then
33804   echo "#! /bin/sh" >conf$$.sh
33805   echo  "exit 0"   >>conf$$.sh
33806   chmod +x conf$$.sh
33807   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
33808     PATH_SEPARATOR=';'
33809   else
33810     PATH_SEPARATOR=:
33811   fi
33812   rm -f conf$$.sh
33813 fi
33814
33815
33816   as_lineno_1=$LINENO
33817   as_lineno_2=$LINENO
33818   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
33819   test "x$as_lineno_1" != "x$as_lineno_2" &&
33820   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
33821   # Find who we are.  Look in the path if we contain no path at all
33822   # relative or not.
33823   case $0 in
33824     *[\\/]* ) as_myself=$0 ;;
33825     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33826 for as_dir in $PATH
33827 do
33828   IFS=$as_save_IFS
33829   test -z "$as_dir" && as_dir=.
33830   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33831 done
33832
33833        ;;
33834   esac
33835   # We did not find ourselves, most probably we were run as `sh COMMAND'
33836   # in which case we are not to be found in the path.
33837   if test "x$as_myself" = x; then
33838     as_myself=$0
33839   fi
33840   if test ! -f "$as_myself"; then
33841     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
33842 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
33843    { (exit 1); exit 1; }; }
33844   fi
33845   case $CONFIG_SHELL in
33846   '')
33847     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33848 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
33849 do
33850   IFS=$as_save_IFS
33851   test -z "$as_dir" && as_dir=.
33852   for as_base in sh bash ksh sh5; do
33853          case $as_dir in
33854          /*)
33855            if ("$as_dir/$as_base" -c '
33856   as_lineno_1=$LINENO
33857   as_lineno_2=$LINENO
33858   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
33859   test "x$as_lineno_1" != "x$as_lineno_2" &&
33860   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
33861              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
33862              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
33863              CONFIG_SHELL=$as_dir/$as_base
33864              export CONFIG_SHELL
33865              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
33866            fi;;
33867          esac
33868        done
33869 done
33870 ;;
33871   esac
33872
33873   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
33874   # uniformly replaced by the line number.  The first 'sed' inserts a
33875   # line-number line before each line; the second 'sed' does the real
33876   # work.  The second script uses 'N' to pair each line-number line
33877   # with the numbered line, and appends trailing '-' during
33878   # substitution so that $LINENO is not a special case at line end.
33879   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
33880   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
33881   sed '=' <$as_myself |
33882     sed '
33883       N
33884       s,$,-,
33885       : loop
33886       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
33887       t loop
33888       s,-$,,
33889       s,^['$as_cr_digits']*\n,,
33890     ' >$as_me.lineno &&
33891   chmod +x $as_me.lineno ||
33892     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
33893 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
33894    { (exit 1); exit 1; }; }
33895
33896   # Don't try to exec as it changes $[0], causing all sort of problems
33897   # (the dirname of $[0] is not the place where we might find the
33898   # original and so on.  Autoconf is especially sensible to this).
33899   . ./$as_me.lineno
33900   # Exit status is that of the last command.
33901   exit
33902 }
33903
33904
33905 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
33906   *c*,-n*) ECHO_N= ECHO_C='
33907 ' ECHO_T='      ' ;;
33908   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
33909   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
33910 esac
33911
33912 if expr a : '\(a\)' >/dev/null 2>&1; then
33913   as_expr=expr
33914 else
33915   as_expr=false
33916 fi
33917
33918 rm -f conf$$ conf$$.exe conf$$.file
33919 echo >conf$$.file
33920 if ln -s conf$$.file conf$$ 2>/dev/null; then
33921   # We could just check for DJGPP; but this test a) works b) is more generic
33922   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
33923   if test -f conf$$.exe; then
33924     # Don't use ln at all; we don't have any links
33925     as_ln_s='cp -p'
33926   else
33927     as_ln_s='ln -s'
33928   fi
33929 elif ln conf$$.file conf$$ 2>/dev/null; then
33930   as_ln_s=ln
33931 else
33932   as_ln_s='cp -p'
33933 fi
33934 rm -f conf$$ conf$$.exe conf$$.file
33935
33936 if mkdir -p . 2>/dev/null; then
33937   as_mkdir_p=:
33938 else
33939   as_mkdir_p=false
33940 fi
33941
33942 as_executable_p="test -f"
33943
33944 # Sed expression to map a string onto a valid CPP name.
33945 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
33946
33947 # Sed expression to map a string onto a valid variable name.
33948 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
33949
33950
33951 # IFS
33952 # We need space, tab and new line, in precisely that order.
33953 as_nl='
33954 '
33955 IFS="   $as_nl"
33956
33957 # CDPATH.
33958 $as_unset CDPATH
33959
33960 exec 6>&1
33961
33962 # Open the log real soon, to keep \$[0] and so on meaningful, and to
33963 # report actual input values of CONFIG_FILES etc. instead of their
33964 # values after options handling.  Logging --version etc. is OK.
33965 exec 5>>config.log
33966 {
33967   echo
33968   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33969 ## Running $as_me. ##
33970 _ASBOX
33971 } >&5
33972 cat >&5 <<_CSEOF
33973
33974 This file was extended by $as_me, which was
33975 generated by GNU Autoconf 2.57.  Invocation command line was
33976
33977   CONFIG_FILES    = $CONFIG_FILES
33978   CONFIG_HEADERS  = $CONFIG_HEADERS
33979   CONFIG_LINKS    = $CONFIG_LINKS
33980   CONFIG_COMMANDS = $CONFIG_COMMANDS
33981   $ $0 $@
33982
33983 _CSEOF
33984 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
33985 echo >&5
33986 _ACEOF
33987
33988 # Files that config.status was made for.
33989 if test -n "$ac_config_files"; then
33990   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
33991 fi
33992
33993 if test -n "$ac_config_headers"; then
33994   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
33995 fi
33996
33997 if test -n "$ac_config_links"; then
33998   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
33999 fi
34000
34001 if test -n "$ac_config_commands"; then
34002   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
34003 fi
34004
34005 cat >>$CONFIG_STATUS <<\_ACEOF
34006
34007 ac_cs_usage="\
34008 \`$as_me' instantiates files from templates according to the
34009 current configuration.
34010
34011 Usage: $0 [OPTIONS] [FILE]...
34012
34013   -h, --help       print this help, then exit
34014   -V, --version    print version number, then exit
34015   -q, --quiet      do not print progress messages
34016   -d, --debug      don't remove temporary files
34017       --recheck    update $as_me by reconfiguring in the same conditions
34018   --file=FILE[:TEMPLATE]
34019                    instantiate the configuration file FILE
34020   --header=FILE[:TEMPLATE]
34021                    instantiate the configuration header FILE
34022
34023 Configuration files:
34024 $config_files
34025
34026 Configuration headers:
34027 $config_headers
34028
34029 Configuration commands:
34030 $config_commands
34031
34032 Report bugs to <bug-autoconf@gnu.org>."
34033 _ACEOF
34034
34035 cat >>$CONFIG_STATUS <<_ACEOF
34036 ac_cs_version="\\
34037 config.status
34038 configured by $0, generated by GNU Autoconf 2.57,
34039   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
34040
34041 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
34042 Free Software Foundation, Inc.
34043 This config.status script is free software; the Free Software Foundation
34044 gives unlimited permission to copy, distribute and modify it."
34045 srcdir=$srcdir
34046 INSTALL="$INSTALL"
34047 _ACEOF
34048
34049 cat >>$CONFIG_STATUS <<\_ACEOF
34050 # If no file are specified by the user, then we need to provide default
34051 # value.  By we need to know if files were specified by the user.
34052 ac_need_defaults=:
34053 while test $# != 0
34054 do
34055   case $1 in
34056   --*=*)
34057     ac_option=`expr "x$1" : 'x\([^=]*\)='`
34058     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
34059     ac_shift=:
34060     ;;
34061   -*)
34062     ac_option=$1
34063     ac_optarg=$2
34064     ac_shift=shift
34065     ;;
34066   *) # This is not an option, so the user has probably given explicit
34067      # arguments.
34068      ac_option=$1
34069      ac_need_defaults=false;;
34070   esac
34071
34072   case $ac_option in
34073   # Handling of the options.
34074 _ACEOF
34075 cat >>$CONFIG_STATUS <<\_ACEOF
34076   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34077     ac_cs_recheck=: ;;
34078   --version | --vers* | -V )
34079     echo "$ac_cs_version"; exit 0 ;;
34080   --he | --h)
34081     # Conflict between --help and --header
34082     { { echo "$as_me:$LINENO: error: ambiguous option: $1
34083 Try \`$0 --help' for more information." >&5
34084 echo "$as_me: error: ambiguous option: $1
34085 Try \`$0 --help' for more information." >&2;}
34086    { (exit 1); exit 1; }; };;
34087   --help | --hel | -h )
34088     echo "$ac_cs_usage"; exit 0 ;;
34089   --debug | --d* | -d )
34090     debug=: ;;
34091   --file | --fil | --fi | --f )
34092     $ac_shift
34093     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
34094     ac_need_defaults=false;;
34095   --header | --heade | --head | --hea )
34096     $ac_shift
34097     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
34098     ac_need_defaults=false;;
34099   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34100   | -silent | --silent | --silen | --sile | --sil | --si | --s)
34101     ac_cs_silent=: ;;
34102
34103   # This is an error.
34104   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
34105 Try \`$0 --help' for more information." >&5
34106 echo "$as_me: error: unrecognized option: $1
34107 Try \`$0 --help' for more information." >&2;}
34108    { (exit 1); exit 1; }; } ;;
34109
34110   *) ac_config_targets="$ac_config_targets $1" ;;
34111
34112   esac
34113   shift
34114 done
34115
34116 ac_configure_extra_args=
34117
34118 if $ac_cs_silent; then
34119   exec 6>/dev/null
34120   ac_configure_extra_args="$ac_configure_extra_args --silent"
34121 fi
34122
34123 _ACEOF
34124 cat >>$CONFIG_STATUS <<_ACEOF
34125 if \$ac_cs_recheck; then
34126   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
34127   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34128 fi
34129
34130 _ACEOF
34131
34132
34133
34134
34135
34136 cat >>$CONFIG_STATUS <<\_ACEOF
34137 for ac_config_target in $ac_config_targets
34138 do
34139   case "$ac_config_target" in
34140   # Handling of arguments.
34141   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
34142   "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
34143   "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
34144   "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
34145   "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
34146   "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
34147   "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
34148   "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
34149   "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
34150   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
34151   "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
34152   "libraries/libavl/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
34153   "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
34154   "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
34155   "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" ;;
34156   "libraries/libldbm/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
34157   "libraries/libldif/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
34158   "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
34159   "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
34160   "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
34161   "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
34162   "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
34163   "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" ;;
34164   "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" ;;
34165   "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" ;;
34166   "servers/slapd/back-ldbm/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk" ;;
34167   "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" ;;
34168   "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" ;;
34169   "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" ;;
34170   "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" ;;
34171   "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" ;;
34172   "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" ;;
34173   "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" ;;
34174   "servers/slapd/back-tcl/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk" ;;
34175   "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" ;;
34176   "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" ;;
34177   "servers/slapd/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in" ;;
34178   "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
34179   "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
34180   "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
34181   "time-stamp" ) CONFIG_COMMANDS="$CONFIG_COMMANDS time-stamp" ;;
34182   "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h" ;;
34183   "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h" ;;
34184   "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h" ;;
34185   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
34186 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
34187    { (exit 1); exit 1; }; };;
34188   esac
34189 done
34190
34191 # If the user did not use the arguments to specify the items to instantiate,
34192 # then the envvar interface is used.  Set only those that are not.
34193 # We use the long form for the default assignment because of an extremely
34194 # bizarre bug on SunOS 4.1.3.
34195 if $ac_need_defaults; then
34196   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34197   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34198   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
34199 fi
34200
34201 # Have a temporary directory for convenience.  Make it in the build tree
34202 # simply because there is no reason to put it here, and in addition,
34203 # creating and moving files from /tmp can sometimes cause problems.
34204 # Create a temporary directory, and hook for its removal unless debugging.
34205 $debug ||
34206 {
34207   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
34208   trap '{ (exit 1); exit 1; }' 1 2 13 15
34209 }
34210
34211 # Create a (secure) tmp directory for tmp files.
34212
34213 {
34214   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
34215   test -n "$tmp" && test -d "$tmp"
34216 }  ||
34217 {
34218   tmp=./confstat$$-$RANDOM
34219   (umask 077 && mkdir $tmp)
34220 } ||
34221 {
34222    echo "$me: cannot create a temporary directory in ." >&2
34223    { (exit 1); exit 1; }
34224 }
34225
34226 _ACEOF
34227
34228 cat >>$CONFIG_STATUS <<_ACEOF
34229
34230 #
34231 # CONFIG_FILES section.
34232 #
34233
34234 # No need to generate the scripts if there are no CONFIG_FILES.
34235 # This happens for instance when ./config.status config.h
34236 if test -n "\$CONFIG_FILES"; then
34237   # Protect against being on the right side of a sed subst in config.status.
34238   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
34239    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
34240 s,@SHELL@,$SHELL,;t t
34241 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
34242 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
34243 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
34244 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
34245 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
34246 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
34247 s,@exec_prefix@,$exec_prefix,;t t
34248 s,@prefix@,$prefix,;t t
34249 s,@program_transform_name@,$program_transform_name,;t t
34250 s,@bindir@,$bindir,;t t
34251 s,@sbindir@,$sbindir,;t t
34252 s,@libexecdir@,$libexecdir,;t t
34253 s,@datadir@,$datadir,;t t
34254 s,@sysconfdir@,$sysconfdir,;t t
34255 s,@sharedstatedir@,$sharedstatedir,;t t
34256 s,@localstatedir@,$localstatedir,;t t
34257 s,@libdir@,$libdir,;t t
34258 s,@includedir@,$includedir,;t t
34259 s,@oldincludedir@,$oldincludedir,;t t
34260 s,@infodir@,$infodir,;t t
34261 s,@mandir@,$mandir,;t t
34262 s,@build_alias@,$build_alias,;t t
34263 s,@host_alias@,$host_alias,;t t
34264 s,@target_alias@,$target_alias,;t t
34265 s,@DEFS@,$DEFS,;t t
34266 s,@ECHO_C@,$ECHO_C,;t t
34267 s,@ECHO_N@,$ECHO_N,;t t
34268 s,@ECHO_T@,$ECHO_T,;t t
34269 s,@LIBS@,$LIBS,;t t
34270 s,@SHTOOL@,$SHTOOL,;t t
34271 s,@build@,$build,;t t
34272 s,@build_cpu@,$build_cpu,;t t
34273 s,@build_vendor@,$build_vendor,;t t
34274 s,@build_os@,$build_os,;t t
34275 s,@host@,$host,;t t
34276 s,@host_cpu@,$host_cpu,;t t
34277 s,@host_vendor@,$host_vendor,;t t
34278 s,@host_os@,$host_os,;t t
34279 s,@target@,$target,;t t
34280 s,@target_cpu@,$target_cpu,;t t
34281 s,@target_vendor@,$target_vendor,;t t
34282 s,@target_os@,$target_os,;t t
34283 s,@OPENLDAP_PACKAGE@,$OPENLDAP_PACKAGE,;t t
34284 s,@OPENLDAP_VERSION@,$OPENLDAP_VERSION,;t t
34285 s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
34286 s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
34287 s,@top_builddir@,$top_builddir,;t t
34288 s,@ldap_subdir@,$ldap_subdir,;t t
34289 s,@SET_MAKE@,$SET_MAKE,;t t
34290 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
34291 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
34292 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
34293 s,@CC@,$CC,;t t
34294 s,@AR@,$AR,;t t
34295 s,@CFLAGS@,$CFLAGS,;t t
34296 s,@LDFLAGS@,$LDFLAGS,;t t
34297 s,@CPPFLAGS@,$CPPFLAGS,;t t
34298 s,@ac_ct_CC@,$ac_ct_CC,;t t
34299 s,@EXEEXT@,$EXEEXT,;t t
34300 s,@OBJEXT@,$OBJEXT,;t t
34301 s,@LN_S@,$LN_S,;t t
34302 s,@ECHO@,$ECHO,;t t
34303 s,@RANLIB@,$RANLIB,;t t
34304 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
34305 s,@STRIP@,$STRIP,;t t
34306 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
34307 s,@CPP@,$CPP,;t t
34308 s,@EGREP@,$EGREP,;t t
34309 s,@LIBTOOL@,$LIBTOOL,;t t
34310 s,@LN_H@,$LN_H,;t t
34311 s,@PERLBIN@,$PERLBIN,;t t
34312 s,@OL_MKDEP@,$OL_MKDEP,;t t
34313 s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
34314 s,@LTSTATIC@,$LTSTATIC,;t t
34315 s,@LIBOBJS@,$LIBOBJS,;t t
34316 s,@LIBSRCS@,$LIBSRCS,;t t
34317 s,@PLAT@,$PLAT,;t t
34318 s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
34319 s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
34320 s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
34321 s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
34322 s,@BUILD_BDB@,$BUILD_BDB,;t t
34323 s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
34324 s,@BUILD_LDAP@,$BUILD_LDAP,;t t
34325 s,@BUILD_LDBM@,$BUILD_LDBM,;t t
34326 s,@BUILD_META@,$BUILD_META,;t t
34327 s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
34328 s,@BUILD_NULL@,$BUILD_NULL,;t t
34329 s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
34330 s,@BUILD_PERL@,$BUILD_PERL,;t t
34331 s,@BUILD_SHELL@,$BUILD_SHELL,;t t
34332 s,@BUILD_SQL@,$BUILD_SQL,;t t
34333 s,@BUILD_TCL@,$BUILD_TCL,;t t
34334 s,@BUILD_BDB_DYNAMIC@,$BUILD_BDB_DYNAMIC,;t t
34335 s,@BUILD_DNSSRV_DYNAMIC@,$BUILD_DNSSRV_DYNAMIC,;t t
34336 s,@BUILD_LDAP_DYNAMIC@,$BUILD_LDAP_DYNAMIC,;t t
34337 s,@BUILD_LDBM_DYNAMIC@,$BUILD_LDBM_DYNAMIC,;t t
34338 s,@BUILD_META_DYNAMIC@,$BUILD_META_DYNAMIC,;t t
34339 s,@BUILD_MONITOR_DYNAMIC@,$BUILD_MONITOR_DYNAMIC,;t t
34340 s,@BUILD_NULL_DYNAMIC@,$BUILD_NULL_DYNAMIC,;t t
34341 s,@BUILD_PASSWD_DYNAMIC@,$BUILD_PASSWD_DYNAMIC,;t t
34342 s,@BUILD_PERL_DYNAMIC@,$BUILD_PERL_DYNAMIC,;t t
34343 s,@BUILD_SHELL_DYNAMIC@,$BUILD_SHELL_DYNAMIC,;t t
34344 s,@BUILD_SQL_DYNAMIC@,$BUILD_SQL_DYNAMIC,;t t
34345 s,@BUILD_TCL_DYNAMIC@,$BUILD_TCL_DYNAMIC,;t t
34346 s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
34347 s,@LDAP_LIBS@,$LDAP_LIBS,;t t
34348 s,@LDIF_LIBS@,$LDIF_LIBS,;t t
34349 s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
34350 s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
34351 s,@LDBM_LIBS@,$LDBM_LIBS,;t t
34352 s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
34353 s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
34354 s,@WRAP_LIBS@,$WRAP_LIBS,;t t
34355 s,@MOD_TCL_LIB@,$MOD_TCL_LIB,;t t
34356 s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
34357 s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
34358 s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
34359 s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
34360 s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
34361 s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
34362 s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
34363 s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
34364 s,@KRB4_LIBS@,$KRB4_LIBS,;t t
34365 s,@KRB5_LIBS@,$KRB5_LIBS,;t t
34366 s,@READLINE_LIBS@,$READLINE_LIBS,;t t
34367 s,@SASL_LIBS@,$SASL_LIBS,;t t
34368 s,@TERMCAP_LIBS@,$TERMCAP_LIBS,;t t
34369 s,@TLS_LIBS@,$TLS_LIBS,;t t
34370 s,@MODULES_LIBS@,$MODULES_LIBS,;t t
34371 s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
34372 s,@LIBSLAPI@,$LIBSLAPI,;t t
34373 s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
34374 s,@AUTH_LIBS@,$AUTH_LIBS,;t t
34375 s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
34376 s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
34377 s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
34378 s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
34379 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
34380 CEOF
34381
34382 _ACEOF
34383
34384   cat >>$CONFIG_STATUS <<\_ACEOF
34385   # Split the substitutions into bite-sized pieces for seds with
34386   # small command number limits, like on Digital OSF/1 and HP-UX.
34387   ac_max_sed_lines=48
34388   ac_sed_frag=1 # Number of current file.
34389   ac_beg=1 # First line for current file.
34390   ac_end=$ac_max_sed_lines # Line after last line for current file.
34391   ac_more_lines=:
34392   ac_sed_cmds=
34393   while $ac_more_lines; do
34394     if test $ac_beg -gt 1; then
34395       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
34396     else
34397       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
34398     fi
34399     if test ! -s $tmp/subs.frag; then
34400       ac_more_lines=false
34401     else
34402       # The purpose of the label and of the branching condition is to
34403       # speed up the sed processing (if there are no `@' at all, there
34404       # is no need to browse any of the substitutions).
34405       # These are the two extra sed commands mentioned above.
34406       (echo ':t
34407   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
34408       if test -z "$ac_sed_cmds"; then
34409         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
34410       else
34411         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
34412       fi
34413       ac_sed_frag=`expr $ac_sed_frag + 1`
34414       ac_beg=$ac_end
34415       ac_end=`expr $ac_end + $ac_max_sed_lines`
34416     fi
34417   done
34418   if test -z "$ac_sed_cmds"; then
34419     ac_sed_cmds=cat
34420   fi
34421 fi # test -n "$CONFIG_FILES"
34422
34423 _ACEOF
34424 cat >>$CONFIG_STATUS <<\_ACEOF
34425 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
34426   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
34427   case $ac_file in
34428   - | *:- | *:-:* ) # input from stdin
34429         cat >$tmp/stdin
34430         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
34431         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
34432   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
34433         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
34434   * )   ac_file_in=$ac_file.in ;;
34435   esac
34436
34437   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
34438   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
34439 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34440          X"$ac_file" : 'X\(//\)[^/]' \| \
34441          X"$ac_file" : 'X\(//\)$' \| \
34442          X"$ac_file" : 'X\(/\)' \| \
34443          .     : '\(.\)' 2>/dev/null ||
34444 echo X"$ac_file" |
34445     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
34446           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
34447           /^X\(\/\/\)$/{ s//\1/; q; }
34448           /^X\(\/\).*/{ s//\1/; q; }
34449           s/.*/./; q'`
34450   { if $as_mkdir_p; then
34451     mkdir -p "$ac_dir"
34452   else
34453     as_dir="$ac_dir"
34454     as_dirs=
34455     while test ! -d "$as_dir"; do
34456       as_dirs="$as_dir $as_dirs"
34457       as_dir=`(dirname "$as_dir") 2>/dev/null ||
34458 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34459          X"$as_dir" : 'X\(//\)[^/]' \| \
34460          X"$as_dir" : 'X\(//\)$' \| \
34461          X"$as_dir" : 'X\(/\)' \| \
34462          .     : '\(.\)' 2>/dev/null ||
34463 echo X"$as_dir" |
34464     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
34465           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
34466           /^X\(\/\/\)$/{ s//\1/; q; }
34467           /^X\(\/\).*/{ s//\1/; q; }
34468           s/.*/./; q'`
34469     done
34470     test ! -n "$as_dirs" || mkdir $as_dirs
34471   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
34472 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
34473    { (exit 1); exit 1; }; }; }
34474
34475   ac_builddir=.
34476
34477 if test "$ac_dir" != .; then
34478   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
34479   # A "../" for each directory in $ac_dir_suffix.
34480   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
34481 else
34482   ac_dir_suffix= ac_top_builddir=
34483 fi
34484
34485 case $srcdir in
34486   .)  # No --srcdir option.  We are building in place.
34487     ac_srcdir=.
34488     if test -z "$ac_top_builddir"; then
34489        ac_top_srcdir=.
34490     else
34491        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
34492     fi ;;
34493   [\\/]* | ?:[\\/]* )  # Absolute path.
34494     ac_srcdir=$srcdir$ac_dir_suffix;
34495     ac_top_srcdir=$srcdir ;;
34496   *) # Relative path.
34497     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
34498     ac_top_srcdir=$ac_top_builddir$srcdir ;;
34499 esac
34500 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
34501 # absolute.
34502 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
34503 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
34504 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
34505 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
34506
34507
34508   case $INSTALL in
34509   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
34510   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
34511   esac
34512
34513   if test x"$ac_file" != x-; then
34514     { echo "$as_me:$LINENO: creating $ac_file" >&5
34515 echo "$as_me: creating $ac_file" >&6;}
34516     rm -f "$ac_file"
34517   fi
34518   # Let's still pretend it is `configure' which instantiates (i.e., don't
34519   # use $as_me), people would be surprised to read:
34520   #    /* config.h.  Generated by config.status.  */
34521   if test x"$ac_file" = x-; then
34522     configure_input=
34523   else
34524     configure_input="$ac_file.  "
34525   fi
34526   configure_input=$configure_input"Generated from `echo $ac_file_in |
34527                                      sed 's,.*/,,'` by configure."
34528
34529   # First look for the input files in the build tree, otherwise in the
34530   # src tree.
34531   ac_file_inputs=`IFS=:
34532     for f in $ac_file_in; do
34533       case $f in
34534       -) echo $tmp/stdin ;;
34535       [\\/$]*)
34536          # Absolute (can't be DOS-style, as IFS=:)
34537          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
34538 echo "$as_me: error: cannot find input file: $f" >&2;}
34539    { (exit 1); exit 1; }; }
34540          echo $f;;
34541       *) # Relative
34542          if test -f "$f"; then
34543            # Build tree
34544            echo $f
34545          elif test -f "$srcdir/$f"; then
34546            # Source tree
34547            echo $srcdir/$f
34548          else
34549            # /dev/null tree
34550            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
34551 echo "$as_me: error: cannot find input file: $f" >&2;}
34552    { (exit 1); exit 1; }; }
34553          fi;;
34554       esac
34555     done` || { (exit 1); exit 1; }
34556 _ACEOF
34557 cat >>$CONFIG_STATUS <<_ACEOF
34558   sed "$ac_vpsub
34559 $extrasub
34560 _ACEOF
34561 cat >>$CONFIG_STATUS <<\_ACEOF
34562 :t
34563 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34564 s,@configure_input@,$configure_input,;t t
34565 s,@srcdir@,$ac_srcdir,;t t
34566 s,@abs_srcdir@,$ac_abs_srcdir,;t t
34567 s,@top_srcdir@,$ac_top_srcdir,;t t
34568 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
34569 s,@builddir@,$ac_builddir,;t t
34570 s,@abs_builddir@,$ac_abs_builddir,;t t
34571 s,@top_builddir@,$ac_top_builddir,;t t
34572 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
34573 s,@INSTALL@,$ac_INSTALL,;t t
34574 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
34575   rm -f $tmp/stdin
34576   if test x"$ac_file" != x-; then
34577     mv $tmp/out $ac_file
34578   else
34579     cat $tmp/out
34580     rm -f $tmp/out
34581   fi
34582
34583 done
34584 _ACEOF
34585 cat >>$CONFIG_STATUS <<\_ACEOF
34586
34587 #
34588 # CONFIG_HEADER section.
34589 #
34590
34591 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
34592 # NAME is the cpp macro being defined and VALUE is the value it is being given.
34593 #
34594 # ac_d sets the value in "#define NAME VALUE" lines.
34595 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
34596 ac_dB='[        ].*$,\1#\2'
34597 ac_dC=' '
34598 ac_dD=',;t'
34599 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
34600 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
34601 ac_uB='$,\1#\2define\3'
34602 ac_uC=' '
34603 ac_uD=',;t'
34604
34605 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
34606   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
34607   case $ac_file in
34608   - | *:- | *:-:* ) # input from stdin
34609         cat >$tmp/stdin
34610         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
34611         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
34612   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
34613         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
34614   * )   ac_file_in=$ac_file.in ;;
34615   esac
34616
34617   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
34618 echo "$as_me: creating $ac_file" >&6;}
34619
34620   # First look for the input files in the build tree, otherwise in the
34621   # src tree.
34622   ac_file_inputs=`IFS=:
34623     for f in $ac_file_in; do
34624       case $f in
34625       -) echo $tmp/stdin ;;
34626       [\\/$]*)
34627          # Absolute (can't be DOS-style, as IFS=:)
34628          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
34629 echo "$as_me: error: cannot find input file: $f" >&2;}
34630    { (exit 1); exit 1; }; }
34631          echo $f;;
34632       *) # Relative
34633          if test -f "$f"; then
34634            # Build tree
34635            echo $f
34636          elif test -f "$srcdir/$f"; then
34637            # Source tree
34638            echo $srcdir/$f
34639          else
34640            # /dev/null tree
34641            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
34642 echo "$as_me: error: cannot find input file: $f" >&2;}
34643    { (exit 1); exit 1; }; }
34644          fi;;
34645       esac
34646     done` || { (exit 1); exit 1; }
34647   # Remove the trailing spaces.
34648   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
34649
34650 _ACEOF
34651
34652 # Transform confdefs.h into two sed scripts, `conftest.defines' and
34653 # `conftest.undefs', that substitutes the proper values into
34654 # config.h.in to produce config.h.  The first handles `#define'
34655 # templates, and the second `#undef' templates.
34656 # And first: Protect against being on the right side of a sed subst in
34657 # config.status.  Protect against being in an unquoted here document
34658 # in config.status.
34659 rm -f conftest.defines conftest.undefs
34660 # Using a here document instead of a string reduces the quoting nightmare.
34661 # Putting comments in sed scripts is not portable.
34662 #
34663 # `end' is used to avoid that the second main sed command (meant for
34664 # 0-ary CPP macros) applies to n-ary macro definitions.
34665 # See the Autoconf documentation for `clear'.
34666 cat >confdef2sed.sed <<\_ACEOF
34667 s/[\\&,]/\\&/g
34668 s,[\\$`],\\&,g
34669 t clear
34670 : clear
34671 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
34672 t end
34673 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
34674 : end
34675 _ACEOF
34676 # If some macros were called several times there might be several times
34677 # the same #defines, which is useless.  Nevertheless, we may not want to
34678 # sort them, since we want the *last* AC-DEFINE to be honored.
34679 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
34680 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
34681 rm -f confdef2sed.sed
34682
34683 # This sed command replaces #undef with comments.  This is necessary, for
34684 # example, in the case of _POSIX_SOURCE, which is predefined and required
34685 # on some systems where configure will not decide to define it.
34686 cat >>conftest.undefs <<\_ACEOF
34687 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
34688 _ACEOF
34689
34690 # Break up conftest.defines because some shells have a limit on the size
34691 # of here documents, and old seds have small limits too (100 cmds).
34692 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
34693 echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
34694 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
34695 echo '  :' >>$CONFIG_STATUS
34696 rm -f conftest.tail
34697 while grep . conftest.defines >/dev/null
34698 do
34699   # Write a limited-size here document to $tmp/defines.sed.
34700   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
34701   # Speed up: don't consider the non `#define' lines.
34702   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
34703   # Work around the forget-to-reset-the-flag bug.
34704   echo 't clr' >>$CONFIG_STATUS
34705   echo ': clr' >>$CONFIG_STATUS
34706   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
34707   echo 'CEOF
34708   sed -f $tmp/defines.sed $tmp/in >$tmp/out
34709   rm -f $tmp/in
34710   mv $tmp/out $tmp/in
34711 ' >>$CONFIG_STATUS
34712   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
34713   rm -f conftest.defines
34714   mv conftest.tail conftest.defines
34715 done
34716 rm -f conftest.defines
34717 echo '  fi # grep' >>$CONFIG_STATUS
34718 echo >>$CONFIG_STATUS
34719
34720 # Break up conftest.undefs because some shells have a limit on the size
34721 # of here documents, and old seds have small limits too (100 cmds).
34722 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
34723 rm -f conftest.tail
34724 while grep . conftest.undefs >/dev/null
34725 do
34726   # Write a limited-size here document to $tmp/undefs.sed.
34727   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
34728   # Speed up: don't consider the non `#undef'
34729   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
34730   # Work around the forget-to-reset-the-flag bug.
34731   echo 't clr' >>$CONFIG_STATUS
34732   echo ': clr' >>$CONFIG_STATUS
34733   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
34734   echo 'CEOF
34735   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
34736   rm -f $tmp/in
34737   mv $tmp/out $tmp/in
34738 ' >>$CONFIG_STATUS
34739   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
34740   rm -f conftest.undefs
34741   mv conftest.tail conftest.undefs
34742 done
34743 rm -f conftest.undefs
34744
34745 cat >>$CONFIG_STATUS <<\_ACEOF
34746   # Let's still pretend it is `configure' which instantiates (i.e., don't
34747   # use $as_me), people would be surprised to read:
34748   #    /* config.h.  Generated by config.status.  */
34749   if test x"$ac_file" = x-; then
34750     echo "/* Generated by configure.  */" >$tmp/config.h
34751   else
34752     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
34753   fi
34754   cat $tmp/in >>$tmp/config.h
34755   rm -f $tmp/in
34756   if test x"$ac_file" != x-; then
34757     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
34758       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
34759 echo "$as_me: $ac_file is unchanged" >&6;}
34760     else
34761       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
34762 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34763          X"$ac_file" : 'X\(//\)[^/]' \| \
34764          X"$ac_file" : 'X\(//\)$' \| \
34765          X"$ac_file" : 'X\(/\)' \| \
34766          .     : '\(.\)' 2>/dev/null ||
34767 echo X"$ac_file" |
34768     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
34769           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
34770           /^X\(\/\/\)$/{ s//\1/; q; }
34771           /^X\(\/\).*/{ s//\1/; q; }
34772           s/.*/./; q'`
34773       { if $as_mkdir_p; then
34774     mkdir -p "$ac_dir"
34775   else
34776     as_dir="$ac_dir"
34777     as_dirs=
34778     while test ! -d "$as_dir"; do
34779       as_dirs="$as_dir $as_dirs"
34780       as_dir=`(dirname "$as_dir") 2>/dev/null ||
34781 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34782          X"$as_dir" : 'X\(//\)[^/]' \| \
34783          X"$as_dir" : 'X\(//\)$' \| \
34784          X"$as_dir" : 'X\(/\)' \| \
34785          .     : '\(.\)' 2>/dev/null ||
34786 echo X"$as_dir" |
34787     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
34788           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
34789           /^X\(\/\/\)$/{ s//\1/; q; }
34790           /^X\(\/\).*/{ s//\1/; q; }
34791           s/.*/./; q'`
34792     done
34793     test ! -n "$as_dirs" || mkdir $as_dirs
34794   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
34795 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
34796    { (exit 1); exit 1; }; }; }
34797
34798       rm -f $ac_file
34799       mv $tmp/config.h $ac_file
34800     fi
34801   else
34802     cat $tmp/config.h
34803     rm -f $tmp/config.h
34804   fi
34805 done
34806 _ACEOF
34807 cat >>$CONFIG_STATUS <<\_ACEOF
34808
34809 #
34810 # CONFIG_COMMANDS section.
34811 #
34812 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
34813   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
34814   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
34815   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
34816 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34817          X"$ac_dest" : 'X\(//\)[^/]' \| \
34818          X"$ac_dest" : 'X\(//\)$' \| \
34819          X"$ac_dest" : 'X\(/\)' \| \
34820          .     : '\(.\)' 2>/dev/null ||
34821 echo X"$ac_dest" |
34822     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
34823           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
34824           /^X\(\/\/\)$/{ s//\1/; q; }
34825           /^X\(\/\).*/{ s//\1/; q; }
34826           s/.*/./; q'`
34827   ac_builddir=.
34828
34829 if test "$ac_dir" != .; then
34830   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
34831   # A "../" for each directory in $ac_dir_suffix.
34832   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
34833 else
34834   ac_dir_suffix= ac_top_builddir=
34835 fi
34836
34837 case $srcdir in
34838   .)  # No --srcdir option.  We are building in place.
34839     ac_srcdir=.
34840     if test -z "$ac_top_builddir"; then
34841        ac_top_srcdir=.
34842     else
34843        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
34844     fi ;;
34845   [\\/]* | ?:[\\/]* )  # Absolute path.
34846     ac_srcdir=$srcdir$ac_dir_suffix;
34847     ac_top_srcdir=$srcdir ;;
34848   *) # Relative path.
34849     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
34850     ac_top_srcdir=$ac_top_builddir$srcdir ;;
34851 esac
34852 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
34853 # absolute.
34854 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
34855 ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
34856 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
34857 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
34858
34859
34860   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
34861 echo "$as_me: executing $ac_dest commands" >&6;}
34862   case $ac_dest in
34863     time-stamp ) date >stamp-h
34864 echo Please run \"make depend\" to build dependencies ;;
34865   esac
34866 done
34867 _ACEOF
34868
34869 cat >>$CONFIG_STATUS <<\_ACEOF
34870
34871 { (exit 0); exit 0; }
34872 _ACEOF
34873 chmod +x $CONFIG_STATUS
34874 ac_clean_files=$ac_clean_files_save
34875
34876
34877 # configure is writing to config.log, and then calls config.status.
34878 # config.status does its own redirection, appending to config.log.
34879 # Unfortunately, on DOS this fails, as config.log is still kept open
34880 # by configure, so config.status won't be able to write to it; its
34881 # output is simply discarded.  So we exec the FD to /dev/null,
34882 # effectively closing config.log, so it can be properly (re)opened and
34883 # appended to by config.status.  When coming back to configure, we
34884 # need to make the FD available again.
34885 if test "$no_create" != yes; then
34886   ac_cs_success=:
34887   ac_config_status_args=
34888   test "$silent" = yes &&
34889     ac_config_status_args="$ac_config_status_args --quiet"
34890   exec 5>/dev/null
34891   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34892   exec 5>>config.log
34893   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34894   # would make configure fail if this is the last instruction.
34895   $ac_cs_success || { (exit 1); exit 1; }
34896 fi
34897