]> git.sur5r.net Git - openldap/blob - configure
ITS#3577 Make librewrite shared - > liblrewrite.la
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.581 2005/05/08 22:06:28 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dynlist      Dynamic List overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
136 ac_help="$ac_help
137     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
146 ac_help="$ac_help
147     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]"
148 ac_help="$ac_help
149     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]"
150 ac_help="$ac_help
151     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
152 ac_help="$ac_help
153
154 SLURPD (Replication Daemon) Options:"
155 ac_help="$ac_help
156   --enable-slurpd         enable building slurpd [auto]"
157 ac_help="$ac_help
158
159 Library Generation & Linking Options"
160 ac_help="$ac_help
161   --enable-static[=PKGS]  build static libraries [default=yes]"
162 ac_help="$ac_help
163   --enable-shared[=PKGS]  build shared libraries [default=yes]"
164 ac_help="$ac_help
165   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
166 ac_help="$ac_help
167   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
168
169 # Find the correct PATH separator.  Usually this is `:', but
170 # DJGPP uses `;' like DOS.
171 if test "X${PATH_SEPARATOR+set}" != Xset; then
172   UNAME=${UNAME-`uname 2>/dev/null`}
173   case X$UNAME in
174     *-DOS) lt_cv_sys_path_separator=';' ;;
175     *)     lt_cv_sys_path_separator=':' ;;
176   esac
177   PATH_SEPARATOR=$lt_cv_sys_path_separator
178 fi
179
180
181 # Check that we are running under the correct shell.
182 SHELL=${CONFIG_SHELL-/bin/sh}
183
184 case X$ECHO in
185 X*--fallback-echo)
186   # Remove one level of quotation (which was required for Make).
187   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
188   ;;
189 esac
190
191 echo=${ECHO-echo}
192 if test "X$1" = X--no-reexec; then
193   # Discard the --no-reexec flag, and continue.
194   shift
195 elif test "X$1" = X--fallback-echo; then
196   # Avoid inline document here, it may be left over
197   :
198 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
199   # Yippee, $echo works!
200   :
201 else
202   # Restart under the correct shell.
203   exec $SHELL "$0" --no-reexec ${1+"$@"}
204 fi
205
206 if test "X$1" = X--fallback-echo; then
207   # used as fallback echo
208   shift
209   cat <<EOF
210
211 EOF
212   exit 0
213 fi
214
215 # The HP-UX ksh and POSIX shell print the target directory to stdout
216 # if CDPATH is set.
217 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
218
219 if test -z "$ECHO"; then
220 if test "X${echo_test_string+set}" != Xset; then
221 # find a string as large as possible, as long as the shell can cope with it
222   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
223     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
224     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
225        echo_test_string="`eval $cmd`" &&
226        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
227     then
228       break
229     fi
230   done
231 fi
232
233 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
234    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
235    test "X$echo_testing_string" = "X$echo_test_string"; then
236   :
237 else
238   # The Solaris, AIX, and Digital Unix default echo programs unquote
239   # backslashes.  This makes it impossible to quote backslashes using
240   #   echo "$something" | sed 's/\\/\\\\/g'
241   #
242   # So, first we look for a working echo in the user's PATH.
243
244   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
245   for dir in $PATH /usr/ucb; do
246     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
247        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
248        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
249        test "X$echo_testing_string" = "X$echo_test_string"; then
250       echo="$dir/echo"
251       break
252     fi
253   done
254   IFS="$save_ifs"
255
256   if test "X$echo" = Xecho; then
257     # We didn't find a better echo, so look for alternatives.
258     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
259        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
260        test "X$echo_testing_string" = "X$echo_test_string"; then
261       # This shell has a builtin print -r that does the trick.
262       echo='print -r'
263     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
264          test "X$CONFIG_SHELL" != X/bin/ksh; then
265       # If we have ksh, try running configure again with it.
266       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
267       export ORIGINAL_CONFIG_SHELL
268       CONFIG_SHELL=/bin/ksh
269       export CONFIG_SHELL
270       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
271     else
272       # Try using printf.
273       echo='printf %s\n'
274       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
275          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
276          test "X$echo_testing_string" = "X$echo_test_string"; then
277         # Cool, printf works
278         :
279       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
284         export CONFIG_SHELL
285         SHELL="$CONFIG_SHELL"
286         export SHELL
287         echo="$CONFIG_SHELL $0 --fallback-echo"
288       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
289            test "X$echo_testing_string" = 'X\t' &&
290            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
291            test "X$echo_testing_string" = "X$echo_test_string"; then
292         echo="$CONFIG_SHELL $0 --fallback-echo"
293       else
294         # maybe with a smaller string...
295         prev=:
296
297         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
298           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
299           then
300             break
301           fi
302           prev="$cmd"
303         done
304
305         if test "$prev" != 'sed 50q "$0"'; then
306           echo_test_string=`eval $prev`
307           export echo_test_string
308           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
309         else
310           # Oops.  We lost completely, so just stick with echo.
311           echo=echo
312         fi
313       fi
314     fi
315   fi
316 fi
317 fi
318
319 # Copy echo and quote the copy suitably for passing to libtool from
320 # the Makefile, instead of quoting the original, which is used later.
321 ECHO=$echo
322 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
323    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
324 fi
325
326
327 ac_help="$ac_help
328   --disable-libtool-lock  avoid locking (might break parallel builds)"
329 ac_help="$ac_help
330   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
331 ac_help="$ac_help
332
333 See INSTALL file for further details."
334
335 # Initialize some variables set by options.
336 # The variables have the same names as the options, with
337 # dashes changed to underlines.
338 build=NONE
339 cache_file=./config.cache
340 exec_prefix=NONE
341 host=NONE
342 no_create=
343 nonopt=NONE
344 no_recursion=
345 prefix=NONE
346 program_prefix=NONE
347 program_suffix=NONE
348 program_transform_name=s,x,x,
349 silent=
350 site=
351 srcdir=
352 target=NONE
353 verbose=
354 x_includes=NONE
355 x_libraries=NONE
356 bindir='${exec_prefix}/bin'
357 sbindir='${exec_prefix}/sbin'
358 libexecdir='${exec_prefix}/libexec'
359 datadir='${prefix}/share'
360 sysconfdir='${prefix}/etc'
361 sharedstatedir='${prefix}/com'
362 localstatedir='${prefix}/var'
363 libdir='${exec_prefix}/lib'
364 includedir='${prefix}/include'
365 oldincludedir='/usr/include'
366 infodir='${prefix}/info'
367 mandir='${prefix}/man'
368
369 # Initialize some other variables.
370 subdirs=
371 MFLAGS= MAKEFLAGS=
372 SHELL=${CONFIG_SHELL-/bin/sh}
373 # Maximum number of lines to put in a shell here document.
374 ac_max_here_lines=12
375
376 ac_prev=
377 for ac_option
378 do
379
380   # If the previous option needs an argument, assign it.
381   if test -n "$ac_prev"; then
382     eval "$ac_prev=\$ac_option"
383     ac_prev=
384     continue
385   fi
386
387   case "$ac_option" in
388   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
389   *) ac_optarg= ;;
390   esac
391
392   # Accept the important Cygnus configure options, so we can diagnose typos.
393
394   case "$ac_option" in
395
396   -bindir | --bindir | --bindi | --bind | --bin | --bi)
397     ac_prev=bindir ;;
398   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
399     bindir="$ac_optarg" ;;
400
401   -build | --build | --buil | --bui | --bu)
402     ac_prev=build ;;
403   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
404     build="$ac_optarg" ;;
405
406   -cache-file | --cache-file | --cache-fil | --cache-fi \
407   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
408     ac_prev=cache_file ;;
409   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
410   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
411     cache_file="$ac_optarg" ;;
412
413   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
414     ac_prev=datadir ;;
415   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
416   | --da=*)
417     datadir="$ac_optarg" ;;
418
419   -disable-* | --disable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     eval "enable_${ac_feature}=no" ;;
427
428   -enable-* | --enable-*)
429     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
430     # Reject names that are not valid shell variable names.
431     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
432       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
433     fi
434     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
435     case "$ac_option" in
436       *=*) ;;
437       *) ac_optarg=yes ;;
438     esac
439     eval "enable_${ac_feature}='$ac_optarg'" ;;
440
441   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
442   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
443   | --exec | --exe | --ex)
444     ac_prev=exec_prefix ;;
445   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
446   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
447   | --exec=* | --exe=* | --ex=*)
448     exec_prefix="$ac_optarg" ;;
449
450   -gas | --gas | --ga | --g)
451     # Obsolete; use --with-gas.
452     with_gas=yes ;;
453
454   -help | --help | --hel | --he)
455     # Omit some internal or obsolete options to make the list less imposing.
456     # This message is too long to be a string in the A/UX 3.1 sh.
457     cat << EOF
458 Usage: configure [options] [host]
459 Options: [defaults in brackets after descriptions]
460 Configuration:
461   --cache-file=FILE       cache test results in FILE
462   --help                  print this message
463   --no-create             do not create output files
464   --quiet, --silent       do not print \`checking...' messages
465   --version               print the version of autoconf that created configure
466 Directory and file names:
467   --prefix=PREFIX         install architecture-independent files in PREFIX
468                           [$ac_default_prefix]
469   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
470                           [same as prefix]
471   --bindir=DIR            user executables in DIR [EPREFIX/bin]
472   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
473   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
474   --datadir=DIR           read-only architecture-independent data in DIR
475                           [PREFIX/share]
476   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
477   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
478                           [PREFIX/com]
479   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
480   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
481   --includedir=DIR        C header files in DIR [PREFIX/include]
482   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
483   --infodir=DIR           info documentation in DIR [PREFIX/info]
484   --mandir=DIR            man documentation in DIR [PREFIX/man]
485   --srcdir=DIR            find the sources in DIR [configure dir or ..]
486   --program-prefix=PREFIX prepend PREFIX to installed program names
487   --program-suffix=SUFFIX append SUFFIX to installed program names
488   --program-transform-name=PROGRAM
489                           run sed PROGRAM on installed program names
490 EOF
491     cat << EOF
492 Host type:
493   --build=BUILD           configure for building on BUILD [BUILD=HOST]
494   --host=HOST             configure for HOST [guessed]
495   --target=TARGET         configure for TARGET [TARGET=HOST]
496 Features and packages:
497   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
498   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
499   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
500   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
501   --x-includes=DIR        X include files are in DIR
502   --x-libraries=DIR       X library files are in DIR
503 EOF
504     if test -n "$ac_help"; then
505       echo "--enable and --with options recognized:$ac_help"
506     fi
507     exit 0 ;;
508
509   -host | --host | --hos | --ho)
510     ac_prev=host ;;
511   -host=* | --host=* | --hos=* | --ho=*)
512     host="$ac_optarg" ;;
513
514   -includedir | --includedir | --includedi | --included | --include \
515   | --includ | --inclu | --incl | --inc)
516     ac_prev=includedir ;;
517   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
518   | --includ=* | --inclu=* | --incl=* | --inc=*)
519     includedir="$ac_optarg" ;;
520
521   -infodir | --infodir | --infodi | --infod | --info | --inf)
522     ac_prev=infodir ;;
523   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
524     infodir="$ac_optarg" ;;
525
526   -libdir | --libdir | --libdi | --libd)
527     ac_prev=libdir ;;
528   -libdir=* | --libdir=* | --libdi=* | --libd=*)
529     libdir="$ac_optarg" ;;
530
531   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
532   | --libexe | --libex | --libe)
533     ac_prev=libexecdir ;;
534   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
535   | --libexe=* | --libex=* | --libe=*)
536     libexecdir="$ac_optarg" ;;
537
538   -localstatedir | --localstatedir | --localstatedi | --localstated \
539   | --localstate | --localstat | --localsta | --localst \
540   | --locals | --local | --loca | --loc | --lo)
541     ac_prev=localstatedir ;;
542   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
543   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
544   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
545     localstatedir="$ac_optarg" ;;
546
547   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
548     ac_prev=mandir ;;
549   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
550     mandir="$ac_optarg" ;;
551
552   -nfp | --nfp | --nf)
553     # Obsolete; use --without-fp.
554     with_fp=no ;;
555
556   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
557   | --no-cr | --no-c)
558     no_create=yes ;;
559
560   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
561   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
562     no_recursion=yes ;;
563
564   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
565   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
566   | --oldin | --oldi | --old | --ol | --o)
567     ac_prev=oldincludedir ;;
568   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
569   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
570   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
571     oldincludedir="$ac_optarg" ;;
572
573   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
574     ac_prev=prefix ;;
575   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
576     prefix="$ac_optarg" ;;
577
578   -program-prefix | --program-prefix | --program-prefi | --program-pref \
579   | --program-pre | --program-pr | --program-p)
580     ac_prev=program_prefix ;;
581   -program-prefix=* | --program-prefix=* | --program-prefi=* \
582   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
583     program_prefix="$ac_optarg" ;;
584
585   -program-suffix | --program-suffix | --program-suffi | --program-suff \
586   | --program-suf | --program-su | --program-s)
587     ac_prev=program_suffix ;;
588   -program-suffix=* | --program-suffix=* | --program-suffi=* \
589   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
590     program_suffix="$ac_optarg" ;;
591
592   -program-transform-name | --program-transform-name \
593   | --program-transform-nam | --program-transform-na \
594   | --program-transform-n | --program-transform- \
595   | --program-transform | --program-transfor \
596   | --program-transfo | --program-transf \
597   | --program-trans | --program-tran \
598   | --progr-tra | --program-tr | --program-t)
599     ac_prev=program_transform_name ;;
600   -program-transform-name=* | --program-transform-name=* \
601   | --program-transform-nam=* | --program-transform-na=* \
602   | --program-transform-n=* | --program-transform-=* \
603   | --program-transform=* | --program-transfor=* \
604   | --program-transfo=* | --program-transf=* \
605   | --program-trans=* | --program-tran=* \
606   | --progr-tra=* | --program-tr=* | --program-t=*)
607     program_transform_name="$ac_optarg" ;;
608
609   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
610   | -silent | --silent | --silen | --sile | --sil)
611     silent=yes ;;
612
613   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
614     ac_prev=sbindir ;;
615   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
616   | --sbi=* | --sb=*)
617     sbindir="$ac_optarg" ;;
618
619   -sharedstatedir | --sharedstatedir | --sharedstatedi \
620   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
621   | --sharedst | --shareds | --shared | --share | --shar \
622   | --sha | --sh)
623     ac_prev=sharedstatedir ;;
624   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
625   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
626   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
627   | --sha=* | --sh=*)
628     sharedstatedir="$ac_optarg" ;;
629
630   -site | --site | --sit)
631     ac_prev=site ;;
632   -site=* | --site=* | --sit=*)
633     site="$ac_optarg" ;;
634
635   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
636     ac_prev=srcdir ;;
637   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
638     srcdir="$ac_optarg" ;;
639
640   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
641   | --syscon | --sysco | --sysc | --sys | --sy)
642     ac_prev=sysconfdir ;;
643   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
644   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
645     sysconfdir="$ac_optarg" ;;
646
647   -target | --target | --targe | --targ | --tar | --ta | --t)
648     ac_prev=target ;;
649   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
650     target="$ac_optarg" ;;
651
652   -v | -verbose | --verbose | --verbos | --verbo | --verb)
653     verbose=yes ;;
654
655   -version | --version | --versio | --versi | --vers)
656     echo "configure generated by autoconf version 2.13.1"
657     exit 0 ;;
658
659   -with-* | --with-*)
660     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
661     # Reject names that are not valid shell variable names.
662     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
663       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
664     fi
665     ac_package=`echo $ac_package| sed 's/-/_/g'`
666     case "$ac_option" in
667       *=*) ;;
668       *) ac_optarg=yes ;;
669     esac
670     eval "with_${ac_package}='$ac_optarg'" ;;
671
672   -without-* | --without-*)
673     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
674     # Reject names that are not valid shell variable names.
675     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
676       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
677     fi
678     ac_package=`echo $ac_package| sed 's/-/_/g'`
679     eval "with_${ac_package}=no" ;;
680
681   --x)
682     # Obsolete; use --with-x.
683     with_x=yes ;;
684
685   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
686   | --x-incl | --x-inc | --x-in | --x-i)
687     ac_prev=x_includes ;;
688   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
689   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
690     x_includes="$ac_optarg" ;;
691
692   -x-libraries | --x-libraries | --x-librarie | --x-librari \
693   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
694     ac_prev=x_libraries ;;
695   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
696   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
697     x_libraries="$ac_optarg" ;;
698
699   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
700     ;;
701
702   *)
703     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
704       echo "configure: warning: $ac_option: invalid host type" 1>&2
705     fi
706     if test "x$nonopt" != xNONE; then
707       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
708     fi
709     nonopt="$ac_option"
710     ;;
711
712   esac
713 done
714
715 if test -n "$ac_prev"; then
716   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
717 fi
718
719 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
720
721 # File descriptor usage:
722 # 0 standard input
723 # 1 file creation
724 # 2 errors and warnings
725 # 3 some systems may open it to /dev/tty
726 # 4 used on the Kubota Titan
727 # 6 checking for... messages and results
728 # 5 compiler messages saved in config.log
729 if test "$silent" = yes; then
730   exec 6>/dev/null
731 else
732   exec 6>&1
733 fi
734 exec 5>./config.log
735
736 echo "\
737 This file contains any messages produced by compilers while
738 running configure, to aid debugging if configure makes a mistake.
739 " 1>&5
740
741 # Strip out --no-create and --no-recursion so they do not pile up.
742 # Also quote any args containing shell metacharacters.
743 ac_configure_args=
744 for ac_arg
745 do
746   case "$ac_arg" in
747   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
748   | --no-cr | --no-c) ;;
749   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
750   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
751   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
752   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
753   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
754   esac
755 done
756
757 # NLS nuisances.
758 # Only set these to C if already set.  These must not be set unconditionally
759 # because not all systems understand e.g. LANG=C (notably SCO).
760 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
761 # Non-C LC_CTYPE values break the ctype check.
762 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
763 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
764 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
765 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
766
767 # confdefs.h avoids OS command line length limits that DEFS can exceed.
768 rm -rf conftest* confdefs.h
769 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
770 echo > confdefs.h
771
772 # A filename unique to this package, relative to the directory that
773 # configure is in, which we can look for to find out if srcdir is correct.
774 ac_unique_file=build/version.sh
775
776 # Find the source files, if location was not specified.
777 if test -z "$srcdir"; then
778   ac_srcdir_defaulted=yes
779   # Try the directory containing this script, then its parent.
780   ac_prog=$0
781   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
782   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
783   srcdir=$ac_confdir
784   if test ! -r $srcdir/$ac_unique_file; then
785     srcdir=..
786   fi
787 else
788   ac_srcdir_defaulted=no
789 fi
790 if test ! -r $srcdir/$ac_unique_file; then
791   if test "$ac_srcdir_defaulted" = yes; then
792     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
793   else
794     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
795   fi
796 fi
797 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
798
799 # Prefer explicitly selected file to automatically selected ones.
800 if test -z "$CONFIG_SITE"; then
801   if test "x$prefix" != xNONE; then
802     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
803   else
804     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
805   fi
806 fi
807 for ac_site_file in $CONFIG_SITE; do
808   if test -r "$ac_site_file"; then
809     echo "loading site script $ac_site_file"
810     . "$ac_site_file"
811   fi
812 done
813
814
815 ac_ext=c
816 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817 ac_cpp='$CPP $CPPFLAGS'
818 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820 cross_compiling=$ac_cv_prog_cc_cross
821
822 ac_exeext=
823 ac_objext=o
824 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
825   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
826   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
827     ac_n= ac_c='
828 ' ac_t='        '
829   else
830     ac_n=-n ac_c= ac_t=
831   fi
832 else
833   ac_n= ac_c='\c' ac_t=
834 fi
835
836
837 # set unset (borrowed from autoconf 2.49c)
838 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
839   ol_unset=unset
840 else
841   ol_unset=false
842 fi
843 # unset CDPATH
844 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
845
846 ac_aux_dir=
847 for ac_dir in build $srcdir/build; do
848   if test -f $ac_dir/install-sh; then
849     ac_aux_dir=$ac_dir
850     ac_install_sh="$ac_aux_dir/install-sh -c"
851     break
852   elif test -f $ac_dir/install.sh; then
853     ac_aux_dir=$ac_dir
854     ac_install_sh="$ac_aux_dir/install.sh -c"
855     break
856   elif test -f $ac_dir/shtool; then
857     ac_aux_dir=$ac_dir
858     ac_install_sh="$ac_aux_dir/shtool install -c"
859     break
860   fi
861 done
862 if test -z "$ac_aux_dir"; then
863   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
864 fi
865 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
866 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
867 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
868
869 eval `$ac_aux_dir/version.sh`
870 if test -z "$OL_STRING"; then
871         { echo "configure: error: could not determine version" 1>&2; exit 1; }
872 fi
873
874 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
875         ac_cv_shtool="$ac_aux_dir/shtool"
876 else
877         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
878 fi
879
880 SHTOOL="$ac_cv_shtool"
881
882 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
883 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
884
885 OPENLDAP_CVS=""
886 if test -d $ac_aux_dir/CVS; then
887         OPENLDAP_CVS="(from CVS sources) "
888 fi
889
890 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
891
892
893 echo $ac_n "checking host system type""... $ac_c" 1>&6
894 echo "configure:895: checking host system type" >&5
895 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
896
897 # Make sure we can run config.sub.
898   if $ac_config_sub sun4 >/dev/null 2>&1; then :
899     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
900   fi
901
902   ac_cv_host_alias=$host
903   case "$ac_cv_host_alias" in
904   NONE)
905     case $nonopt in
906     NONE)
907       if ac_cv_host_alias=`$ac_config_guess`; then :
908       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
909       fi ;;
910     *) ac_cv_host_alias=$nonopt ;;
911     esac ;;
912   esac
913
914   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
915   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
916   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
917   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
918 else
919   echo $ac_n "(cached) $ac_c" 1>&6
920 fi
921
922 echo "$ac_t""$ac_cv_host" 1>&6
923
924 host=$ac_cv_host
925 host_alias=$ac_cv_host_alias
926 host_cpu=$ac_cv_host_cpu
927 host_vendor=$ac_cv_host_vendor
928 host_os=$ac_cv_host_os
929
930
931
932
933
934 echo $ac_n "checking target system type""... $ac_c" 1>&6
935 echo "configure:936: checking target system type" >&5
936 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
937
938 # Make sure we can run config.sub.
939   if $ac_config_sub sun4 >/dev/null 2>&1; then :
940     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
941   fi
942
943   ac_cv_target_alias=$target
944   case "$ac_cv_target_alias" in
945   NONE)
946     case $nonopt in
947     NONE)
948       ac_cv_target_alias=$host_alias ;;
949
950     *) ac_cv_target_alias=$nonopt ;;
951     esac ;;
952   esac
953
954   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
955   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
956   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
957   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
958 else
959   echo $ac_n "(cached) $ac_c" 1>&6
960 fi
961
962 echo "$ac_t""$ac_cv_target" 1>&6
963
964 target=$ac_cv_target
965 target_alias=$ac_cv_target_alias
966 target_cpu=$ac_cv_target_cpu
967 target_vendor=$ac_cv_target_vendor
968 target_os=$ac_cv_target_os
969
970
971
972
973
974 echo $ac_n "checking build system type""... $ac_c" 1>&6
975 echo "configure:976: checking build system type" >&5
976 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
977
978 # Make sure we can run config.sub.
979   if $ac_config_sub sun4 >/dev/null 2>&1; then :
980     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
981   fi
982
983   ac_cv_build_alias=$build
984   case "$ac_cv_build_alias" in
985   NONE)
986     case $nonopt in
987     NONE)
988       ac_cv_build_alias=$host_alias ;;
989
990     *) ac_cv_build_alias=$nonopt ;;
991     esac ;;
992   esac
993
994   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
995   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
996   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
997   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
998 else
999   echo $ac_n "(cached) $ac_c" 1>&6
1000 fi
1001
1002 echo "$ac_t""$ac_cv_build" 1>&6
1003
1004 build=$ac_cv_build
1005 build_alias=$ac_cv_build_alias
1006 build_cpu=$ac_cv_build_cpu
1007 build_vendor=$ac_cv_build_vendor
1008 build_os=$ac_cv_build_os
1009
1010
1011
1012
1013
1014 # Do some error checking and defaulting for the host and target type.
1015 # The inputs are:
1016 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1017 #
1018 # The rules are:
1019 # 1. You are not allowed to specify --host, --target, and nonopt at the
1020 #    same time.
1021 # 2. Host defaults to nonopt.
1022 # 3. If nonopt is not specified, then host defaults to the current host,
1023 #    as determined by config.guess.
1024 # 4. Target and build default to nonopt.
1025 # 5. If nonopt is not specified, then target and build default to host.
1026
1027 # The aliases save the names the user supplied, while $host etc.
1028 # will get canonicalized.
1029 case $host---$target---$nonopt in
1030 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1031 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1032 esac
1033
1034 test "$host_alias" != "$target_alias" &&
1035   test "$program_prefix$program_suffix$program_transform_name" = \
1036     NONENONEs,x,x, &&
1037   program_prefix=${target_alias}-
1038
1039
1040 # Find a good install program.  We prefer a C program (faster),
1041 # so one script is as good as another.  But avoid the broken or
1042 # incompatible versions:
1043 # SysV /etc/install, /usr/sbin/install
1044 # SunOS /usr/etc/install
1045 # IRIX /sbin/install
1046 # AIX /bin/install
1047 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1048 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1049 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1050 # ./install, which can be erroneously created by make from ./install.sh.
1051 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1052 echo "configure:1053: checking for a BSD compatible install" >&5
1053 if test -z "$INSTALL"; then
1054 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1055   echo $ac_n "(cached) $ac_c" 1>&6
1056 else
1057     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1058   for ac_dir in $PATH; do
1059     # Account for people who put trailing slashes in PATH elements.
1060     case "$ac_dir/" in
1061     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1062     *)
1063       # OSF1 and SCO ODT 3.0 have their own names for install.
1064       # Don't use installbsd from OSF since it installs stuff as root
1065       # by default.
1066       for ac_prog in ginstall scoinst install; do
1067         if test -f $ac_dir/$ac_prog; then
1068           if test $ac_prog = install &&
1069             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1070             # AIX install.  It has an incompatible calling convention.
1071             :
1072           elif test $ac_prog = install &&
1073             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1074             # program-specific install script used by HP pwplus--don't use.
1075             :
1076           else
1077             ac_cv_path_install="$ac_dir/$ac_prog -c"
1078             break 2
1079           fi
1080         fi
1081       done
1082       ;;
1083     esac
1084   done
1085   IFS="$ac_save_IFS"
1086
1087 fi
1088   if test "${ac_cv_path_install+set}" = set; then
1089     INSTALL="$ac_cv_path_install"
1090   else
1091     # As a last resort, use the slow shell script.  We don't cache a
1092     # path for INSTALL within a source directory, because that will
1093     # break other packages using the cache if that directory is
1094     # removed, or if the path is relative.
1095     INSTALL="$ac_install_sh"
1096   fi
1097 fi
1098 echo "$ac_t""$INSTALL" 1>&6
1099
1100 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1101 # It thinks the first close brace ends the variable substitution.
1102 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1103
1104 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1105
1106 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1107
1108 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1109 echo "configure:1110: checking whether build environment is sane" >&5
1110 # Just in case
1111 sleep 1
1112 echo timestamp > conftestfile
1113 # Do `set' in a subshell so we don't clobber the current shell's
1114 # arguments.  Must try -L first in case configure is actually a
1115 # symlink; some systems play weird games with the mod time of symlinks
1116 # (eg FreeBSD returns the mod time of the symlink's containing
1117 # directory).
1118 if (
1119    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1120    if test "$*" = "X"; then
1121       # -L didn't work.
1122       set X `ls -t $srcdir/configure conftestfile`
1123    fi
1124    if test "$*" != "X $srcdir/configure conftestfile" \
1125       && test "$*" != "X conftestfile $srcdir/configure"; then
1126
1127       # If neither matched, then we have a broken ls.  This can happen
1128       # if, for instance, CONFIG_SHELL is bash and it inherits a
1129       # broken ls alias from the environment.  This has actually
1130       # happened.  Such a system could not be considered "sane".
1131       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1132 alias in your environment" 1>&2; exit 1; }
1133    fi
1134
1135    test "$2" = conftestfile
1136    )
1137 then
1138    # Ok.
1139    :
1140 else
1141    { echo "configure: error: newly created file is older than distributed files!
1142 Check your system clock" 1>&2; exit 1; }
1143 fi
1144 rm -f conftest*
1145 echo "$ac_t""yes" 1>&6
1146 if test "$program_transform_name" = s,x,x,; then
1147   program_transform_name=
1148 else
1149   # Double any \ or $.  echo might interpret backslashes.
1150   cat <<\EOF_SED > conftestsed
1151 s,\\,\\\\,g; s,\$,$$,g
1152 EOF_SED
1153   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1154   rm -f conftestsed
1155 fi
1156 test "$program_prefix" != NONE &&
1157   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1158 # Use a double $ so make ignores it.
1159 test "$program_suffix" != NONE &&
1160   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1161
1162 # sed with no file args requires a program.
1163 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1164
1165 for ac_prog in mawk gawk nawk awk
1166 do
1167 # Extract the first word of "$ac_prog", so it can be a program name with args.
1168 set dummy $ac_prog; ac_word=$2
1169 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1170 echo "configure:1171: checking for $ac_word" >&5
1171 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   if test -n "$AWK"; then
1175   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1176 else
1177   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1178   ac_dummy="$PATH"
1179   for ac_dir in $ac_dummy; do
1180     test -z "$ac_dir" && ac_dir=.
1181     if test -f $ac_dir/$ac_word; then
1182       ac_cv_prog_AWK="$ac_prog"
1183       break
1184     fi
1185   done
1186   IFS="$ac_save_ifs"
1187 fi
1188 fi
1189 AWK="$ac_cv_prog_AWK"
1190 if test -n "$AWK"; then
1191   echo "$ac_t""$AWK" 1>&6
1192 else
1193   echo "$ac_t""no" 1>&6
1194 fi
1195
1196 test -n "$AWK" && break
1197 done
1198
1199 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1200 echo "configure:1201: checking whether ${MAKE-make} sets \${MAKE}" >&5
1201 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1202 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1203   echo $ac_n "(cached) $ac_c" 1>&6
1204 else
1205   cat > conftestmake <<\EOF
1206 all:
1207         @echo 'ac_maketemp="${MAKE}"'
1208 EOF
1209 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1210 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1211 if test -n "$ac_maketemp"; then
1212   eval ac_cv_prog_make_${ac_make}_set=yes
1213 else
1214   eval ac_cv_prog_make_${ac_make}_set=no
1215 fi
1216 rm -f conftestmake
1217 fi
1218 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1219   echo "$ac_t""yes" 1>&6
1220   SET_MAKE=
1221 else
1222   echo "$ac_t""no" 1>&6
1223   SET_MAKE="MAKE=${MAKE-make}"
1224 fi
1225
1226
1227
1228 PACKAGE=$OL_PACKAGE
1229
1230 VERSION=$OL_VERSION
1231
1232 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1233   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1234 fi
1235
1236
1237
1238 missing_dir=`cd $ac_aux_dir && pwd`
1239 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1240 echo "configure:1241: checking for working aclocal" >&5
1241 # Run test in a subshell; some versions of sh will print an error if
1242 # an executable is not found, even if stderr is redirected.
1243 # Redirect stdin to placate older versions of autoconf.  Sigh.
1244 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1245    ACLOCAL=aclocal
1246    echo "$ac_t""found" 1>&6
1247 else
1248    ACLOCAL="$missing_dir/missing aclocal"
1249    echo "$ac_t""missing" 1>&6
1250 fi
1251
1252 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1253 echo "configure:1254: checking for working autoconf" >&5
1254 # Run test in a subshell; some versions of sh will print an error if
1255 # an executable is not found, even if stderr is redirected.
1256 # Redirect stdin to placate older versions of autoconf.  Sigh.
1257 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1258    AUTOCONF=autoconf
1259    echo "$ac_t""found" 1>&6
1260 else
1261    AUTOCONF="$missing_dir/missing autoconf"
1262    echo "$ac_t""missing" 1>&6
1263 fi
1264
1265 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1266 echo "configure:1267: checking for working automake" >&5
1267 # Run test in a subshell; some versions of sh will print an error if
1268 # an executable is not found, even if stderr is redirected.
1269 # Redirect stdin to placate older versions of autoconf.  Sigh.
1270 if (automake --version) < /dev/null > /dev/null 2>&1; then
1271    AUTOMAKE=automake
1272    echo "$ac_t""found" 1>&6
1273 else
1274    AUTOMAKE="$missing_dir/missing automake"
1275    echo "$ac_t""missing" 1>&6
1276 fi
1277
1278 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1279 echo "configure:1280: checking for working autoheader" >&5
1280 # Run test in a subshell; some versions of sh will print an error if
1281 # an executable is not found, even if stderr is redirected.
1282 # Redirect stdin to placate older versions of autoconf.  Sigh.
1283 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1284    AUTOHEADER=autoheader
1285    echo "$ac_t""found" 1>&6
1286 else
1287    AUTOHEADER="$missing_dir/missing autoheader"
1288    echo "$ac_t""missing" 1>&6
1289 fi
1290
1291 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1292 echo "configure:1293: checking for working makeinfo" >&5
1293 # Run test in a subshell; some versions of sh will print an error if
1294 # an executable is not found, even if stderr is redirected.
1295 # Redirect stdin to placate older versions of autoconf.  Sigh.
1296 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1297    MAKEINFO=makeinfo
1298    echo "$ac_t""found" 1>&6
1299 else
1300    MAKEINFO="$missing_dir/missing makeinfo"
1301    echo "$ac_t""missing" 1>&6
1302 fi
1303
1304 install_sh="$missing_dir/install-sh"
1305 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1306
1307 for ac_prog in gnutar gtar tar
1308 do
1309 # Extract the first word of "$ac_prog", so it can be a program name with args.
1310 set dummy $ac_prog; ac_word=$2
1311 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1312 echo "configure:1313: checking for $ac_word" >&5
1313 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1314   echo $ac_n "(cached) $ac_c" 1>&6
1315 else
1316   if test -n "$AMTAR"; then
1317   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1318 else
1319   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1320   ac_dummy="$PATH"
1321   for ac_dir in $ac_dummy; do
1322     test -z "$ac_dir" && ac_dir=.
1323     if test -f $ac_dir/$ac_word; then
1324       ac_cv_prog_AMTAR="$ac_prog"
1325       break
1326     fi
1327   done
1328   IFS="$ac_save_ifs"
1329 fi
1330 fi
1331 AMTAR="$ac_cv_prog_AMTAR"
1332 if test -n "$AMTAR"; then
1333   echo "$ac_t""$AMTAR" 1>&6
1334 else
1335   echo "$ac_t""no" 1>&6
1336 fi
1337
1338 test -n "$AMTAR" && break
1339 done
1340
1341
1342 AMTARFLAGS=
1343 if test -n "$AMTAR"; then
1344   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1345         AMTARFLAGS=o
1346   fi
1347 fi
1348
1349 cat >> confdefs.h <<EOF
1350 #define OPENLDAP_PACKAGE "$PACKAGE"
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define OPENLDAP_VERSION "$VERSION"
1355 EOF
1356
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION $OL_API_INC
1360 EOF
1361
1362 cat >> confdefs.h <<EOF
1363 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1364 EOF
1365
1366 cat >> confdefs.h <<EOF
1367 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1368 EOF
1369
1370 cat >> confdefs.h <<EOF
1371 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1372 EOF
1373
1374
1375 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1376
1377 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1378
1379 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1380
1381
1382
1383 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1384 echo "configure:1385: checking configure arguments" >&5
1385
1386
1387 top_builddir=`pwd`
1388
1389 ldap_subdir="/openldap"
1390
1391 # Check whether --with-subdir or --without-subdir was given.
1392 if test "${with_subdir+set}" = set; then
1393   withval="$with_subdir"
1394   case "$withval" in
1395         no) ldap_subdir=""
1396                 ;;
1397         yes)
1398                 ;;
1399         /*|\\*)
1400                 ldap_subdir="$withval"
1401                 ;;
1402         *)
1403                 ldap_subdir="/$withval"
1404                 ;;
1405 esac
1406
1407 fi
1408
1409
1410 # OpenLDAP --enable-debug
1411         # Check whether --enable-debug or --disable-debug was given.
1412 if test "${enable_debug+set}" = set; then
1413   enableval="$enable_debug"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto yes no ; do
1417                 if test "$enableval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1423         fi
1424         ol_enable_debug="$ol_arg"
1425
1426 else
1427         ol_enable_debug="yes"
1428 fi
1429 # end --enable-debug
1430 # OpenLDAP --enable-dynamic
1431         # Check whether --enable-dynamic or --disable-dynamic was given.
1432 if test "${enable_dynamic+set}" = set; then
1433   enableval="$enable_dynamic"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no ; do
1437                 if test "$enableval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1443         fi
1444         ol_enable_dynamic="$ol_arg"
1445
1446 else
1447         ol_enable_dynamic="no"
1448 fi
1449 # end --enable-dynamic
1450 # OpenLDAP --enable-syslog
1451         # Check whether --enable-syslog or --disable-syslog was given.
1452 if test "${enable_syslog+set}" = set; then
1453   enableval="$enable_syslog"
1454   
1455         ol_arg=invalid
1456         for ol_val in auto yes no ; do
1457                 if test "$enableval" = "$ol_val" ; then
1458                         ol_arg="$ol_val"
1459                 fi
1460         done
1461         if test "$ol_arg" = "invalid" ; then
1462                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1463         fi
1464         ol_enable_syslog="$ol_arg"
1465
1466 else
1467         ol_enable_syslog="auto"
1468 fi
1469 # end --enable-syslog
1470 # OpenLDAP --enable-proctitle
1471         # Check whether --enable-proctitle or --disable-proctitle was given.
1472 if test "${enable_proctitle+set}" = set; then
1473   enableval="$enable_proctitle"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no ; do
1477                 if test "$enableval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1483         fi
1484         ol_enable_proctitle="$ol_arg"
1485
1486 else
1487         ol_enable_proctitle="yes"
1488 fi
1489 # end --enable-proctitle
1490 ol_enable_referrals=${ol_enable_referrals-no}
1491 ol_enable_kbind=${ol_enable_kbind-no}
1492 # OpenLDAP --enable-ipv6
1493         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1494 if test "${enable_ipv6+set}" = set; then
1495   enableval="$enable_ipv6"
1496   
1497         ol_arg=invalid
1498         for ol_val in auto yes no ; do
1499                 if test "$enableval" = "$ol_val" ; then
1500                         ol_arg="$ol_val"
1501                 fi
1502         done
1503         if test "$ol_arg" = "invalid" ; then
1504                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1505         fi
1506         ol_enable_ipv6="$ol_arg"
1507
1508 else
1509         ol_enable_ipv6="auto"
1510 fi
1511 # end --enable-ipv6
1512 # OpenLDAP --enable-local
1513         # Check whether --enable-local or --disable-local was given.
1514 if test "${enable_local+set}" = set; then
1515   enableval="$enable_local"
1516   
1517         ol_arg=invalid
1518         for ol_val in auto yes no ; do
1519                 if test "$enableval" = "$ol_val" ; then
1520                         ol_arg="$ol_val"
1521                 fi
1522         done
1523         if test "$ol_arg" = "invalid" ; then
1524                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1525         fi
1526         ol_enable_local="$ol_arg"
1527
1528 else
1529         ol_enable_local="auto"
1530 fi
1531 # end --enable-local
1532
1533
1534 # OpenLDAP --with-cyrus_sasl
1535         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1536 if test "${with_cyrus_sasl+set}" = set; then
1537   withval="$with_cyrus_sasl"
1538   
1539         ol_arg=invalid
1540         for ol_val in auto yes no  ; do
1541                 if test "$withval" = "$ol_val" ; then
1542                         ol_arg="$ol_val"
1543                 fi
1544         done
1545         if test "$ol_arg" = "invalid" ; then
1546                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1547         fi
1548         ol_with_cyrus_sasl="$ol_arg"
1549
1550 else
1551         ol_with_cyrus_sasl="auto"
1552 fi
1553 # end --with-cyrus_sasl
1554
1555 # OpenLDAP --with-fetch
1556         # Check whether --with-fetch or --without-fetch was given.
1557 if test "${with_fetch+set}" = set; then
1558   withval="$with_fetch"
1559   
1560         ol_arg=invalid
1561         for ol_val in auto yes no  ; do
1562                 if test "$withval" = "$ol_val" ; then
1563                         ol_arg="$ol_val"
1564                 fi
1565         done
1566         if test "$ol_arg" = "invalid" ; then
1567                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1568         fi
1569         ol_with_fetch="$ol_arg"
1570
1571 else
1572         ol_with_fetch="auto"
1573 fi
1574 # end --with-fetch
1575
1576 ol_with_kerberos=${ol_with_kerberos-auto}
1577 # OpenLDAP --with-threads
1578         # Check whether --with-threads or --without-threads was given.
1579 if test "${with_threads+set}" = set; then
1580   withval="$with_threads"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1584                 if test "$withval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1590         fi
1591         ol_with_threads="$ol_arg"
1592
1593 else
1594         ol_with_threads="auto"
1595 fi
1596 # end --with-threads
1597
1598 # OpenLDAP --with-tls
1599         # Check whether --with-tls or --without-tls was given.
1600 if test "${with_tls+set}" = set; then
1601   withval="$with_tls"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto ssleay openssl yes no  ; do
1605                 if test "$withval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1611         fi
1612         ol_with_tls="$ol_arg"
1613
1614 else
1615         ol_with_tls="auto"
1616 fi
1617 # end --with-tls
1618
1619 # OpenLDAP --with-yielding_select
1620         # Check whether --with-yielding_select or --without-yielding_select was given.
1621 if test "${with_yielding_select+set}" = set; then
1622   withval="$with_yielding_select"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto yes no manual  ; do
1626                 if test "$withval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1632         fi
1633         ol_with_yielding_select="$ol_arg"
1634
1635 else
1636         ol_with_yielding_select="auto"
1637 fi
1638 # end --with-yielding_select
1639
1640 # OpenLDAP --with-multiple_precision
1641         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1642 if test "${with_multiple_precision+set}" = set; then
1643   withval="$with_multiple_precision"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto bignum gmp yes no  ; do
1647                 if test "$withval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1653         fi
1654         ol_with_multiple_precision="$ol_arg"
1655
1656 else
1657         ol_with_multiple_precision="auto"
1658 fi
1659 # end --with-multiple_precision
1660
1661
1662
1663 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1664 if test "${with_xxslapdoptions+set}" = set; then
1665   withval="$with_xxslapdoptions"
1666   :
1667 fi
1668
1669 # OpenLDAP --enable-slapd
1670         # Check whether --enable-slapd or --disable-slapd was given.
1671 if test "${enable_slapd+set}" = set; then
1672   enableval="$enable_slapd"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1682         fi
1683         ol_enable_slapd="$ol_arg"
1684
1685 else
1686         ol_enable_slapd="yes"
1687 fi
1688 # end --enable-slapd
1689 # OpenLDAP --enable-aci
1690         # Check whether --enable-aci or --disable-aci was given.
1691 if test "${enable_aci+set}" = set; then
1692   enableval="$enable_aci"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1702         fi
1703         ol_enable_aci="$ol_arg"
1704
1705 else
1706         ol_enable_aci="no"
1707 fi
1708 # end --enable-aci
1709 # OpenLDAP --enable-cleartext
1710         # Check whether --enable-cleartext or --disable-cleartext was given.
1711 if test "${enable_cleartext+set}" = set; then
1712   enableval="$enable_cleartext"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1722         fi
1723         ol_enable_cleartext="$ol_arg"
1724
1725 else
1726         ol_enable_cleartext="yes"
1727 fi
1728 # end --enable-cleartext
1729 # OpenLDAP --enable-crypt
1730         # Check whether --enable-crypt or --disable-crypt was given.
1731 if test "${enable_crypt+set}" = set; then
1732   enableval="$enable_crypt"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1742         fi
1743         ol_enable_crypt="$ol_arg"
1744
1745 else
1746         ol_enable_crypt="no"
1747 fi
1748 # end --enable-crypt
1749 # OpenLDAP --enable-lmpasswd
1750         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1751 if test "${enable_lmpasswd+set}" = set; then
1752   enableval="$enable_lmpasswd"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1762         fi
1763         ol_enable_lmpasswd="$ol_arg"
1764
1765 else
1766         ol_enable_lmpasswd="no"
1767 fi
1768 # end --enable-lmpasswd
1769 # OpenLDAP --enable-spasswd
1770         # Check whether --enable-spasswd or --disable-spasswd was given.
1771 if test "${enable_spasswd+set}" = set; then
1772   enableval="$enable_spasswd"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1782         fi
1783         ol_enable_spasswd="$ol_arg"
1784
1785 else
1786         ol_enable_spasswd="no"
1787 fi
1788 # end --enable-spasswd
1789 # OpenLDAP --enable-modules
1790         # Check whether --enable-modules or --disable-modules was given.
1791 if test "${enable_modules+set}" = set; then
1792   enableval="$enable_modules"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1802         fi
1803         ol_enable_modules="$ol_arg"
1804
1805 else
1806         ol_enable_modules="no"
1807 fi
1808 # end --enable-modules
1809 ol_enable_multimaster=${ol_enable_multimaster-no}
1810 # OpenLDAP --enable-rewrite
1811         # Check whether --enable-rewrite or --disable-rewrite was given.
1812 if test "${enable_rewrite+set}" = set; then
1813   enableval="$enable_rewrite"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1823         fi
1824         ol_enable_rewrite="$ol_arg"
1825
1826 else
1827         ol_enable_rewrite="auto"
1828 fi
1829 # end --enable-rewrite
1830 # OpenLDAP --enable-rlookups
1831         # Check whether --enable-rlookups or --disable-rlookups was given.
1832 if test "${enable_rlookups+set}" = set; then
1833   enableval="$enable_rlookups"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1843         fi
1844         ol_enable_rlookups="$ol_arg"
1845
1846 else
1847         ol_enable_rlookups="no"
1848 fi
1849 # end --enable-rlookups
1850 # OpenLDAP --enable-slapi
1851         # Check whether --enable-slapi or --disable-slapi was given.
1852 if test "${enable_slapi+set}" = set; then
1853   enableval="$enable_slapi"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1863         fi
1864         ol_enable_slapi="$ol_arg"
1865
1866 else
1867         ol_enable_slapi="no"
1868 fi
1869 # end --enable-slapi
1870 # OpenLDAP --enable-slp
1871         # Check whether --enable-slp or --disable-slp was given.
1872 if test "${enable_slp+set}" = set; then
1873   enableval="$enable_slp"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto yes no ; do
1877                 if test "$enableval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1883         fi
1884         ol_enable_slp="$ol_arg"
1885
1886 else
1887         ol_enable_slp="no"
1888 fi
1889 # end --enable-slp
1890 # OpenLDAP --enable-wrappers
1891         # Check whether --enable-wrappers or --disable-wrappers was given.
1892 if test "${enable_wrappers+set}" = set; then
1893   enableval="$enable_wrappers"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1903         fi
1904         ol_enable_wrappers="$ol_arg"
1905
1906 else
1907         ol_enable_wrappers="no"
1908 fi
1909 # end --enable-wrappers
1910
1911 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1912         passwd perl relay shell sql"
1913
1914 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1915 if test "${with_xxslapbackends+set}" = set; then
1916   withval="$with_xxslapbackends"
1917   :
1918 fi
1919
1920
1921 # OpenLDAP --enable-backends
1922         # Check whether --enable-backends or --disable-backends was given.
1923 if test "${enable_backends+set}" = set; then
1924   enableval="$enable_backends"
1925   
1926         ol_arg=invalid
1927         for ol_val in no yes mod ; do
1928                 if test "$enableval" = "$ol_val" ; then
1929                         ol_arg="$ol_val"
1930                 fi
1931         done
1932         if test "$ol_arg" = "invalid" ; then
1933                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1934         fi
1935         ol_enable_backends="$ol_arg"
1936
1937 else
1938         ol_enable_backends="no"
1939 fi
1940 # end --enable-backends
1941 # OpenLDAP --enable-bdb
1942         # Check whether --enable-bdb or --disable-bdb was given.
1943 if test "${enable_bdb+set}" = set; then
1944   enableval="$enable_bdb"
1945   
1946         ol_arg=invalid
1947         for ol_val in no yes mod ; do
1948                 if test "$enableval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1954         fi
1955         ol_enable_bdb="$ol_arg"
1956
1957 else
1958         ol_enable_bdb="yes"
1959 fi
1960 # end --enable-bdb
1961 # OpenLDAP --enable-dnssrv
1962         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1963 if test "${enable_dnssrv+set}" = set; then
1964   enableval="$enable_dnssrv"
1965   
1966         ol_arg=invalid
1967         for ol_val in no yes mod ; do
1968                 if test "$enableval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1974         fi
1975         ol_enable_dnssrv="$ol_arg"
1976
1977 else
1978         ol_enable_dnssrv="no"
1979 fi
1980 # end --enable-dnssrv
1981 # OpenLDAP --enable-hdb
1982         # Check whether --enable-hdb or --disable-hdb was given.
1983 if test "${enable_hdb+set}" = set; then
1984   enableval="$enable_hdb"
1985   
1986         ol_arg=invalid
1987         for ol_val in no yes mod ; do
1988                 if test "$enableval" = "$ol_val" ; then
1989                         ol_arg="$ol_val"
1990                 fi
1991         done
1992         if test "$ol_arg" = "invalid" ; then
1993                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1994         fi
1995         ol_enable_hdb="$ol_arg"
1996
1997 else
1998         ol_enable_hdb="yes"
1999 fi
2000 # end --enable-hdb
2001 # OpenLDAP --enable-ldap
2002         # Check whether --enable-ldap or --disable-ldap was given.
2003 if test "${enable_ldap+set}" = set; then
2004   enableval="$enable_ldap"
2005   
2006         ol_arg=invalid
2007         for ol_val in no yes mod ; do
2008                 if test "$enableval" = "$ol_val" ; then
2009                         ol_arg="$ol_val"
2010                 fi
2011         done
2012         if test "$ol_arg" = "invalid" ; then
2013                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2014         fi
2015         ol_enable_ldap="$ol_arg"
2016
2017 else
2018         ol_enable_ldap="no"
2019 fi
2020 # end --enable-ldap
2021 # OpenLDAP --enable-ldbm
2022         # Check whether --enable-ldbm or --disable-ldbm was given.
2023 if test "${enable_ldbm+set}" = set; then
2024   enableval="$enable_ldbm"
2025   
2026         ol_arg=invalid
2027         for ol_val in no yes mod ; do
2028                 if test "$enableval" = "$ol_val" ; then
2029                         ol_arg="$ol_val"
2030                 fi
2031         done
2032         if test "$ol_arg" = "invalid" ; then
2033                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2034         fi
2035         ol_enable_ldbm="$ol_arg"
2036
2037 else
2038         ol_enable_ldbm="no"
2039 fi
2040 # end --enable-ldbm
2041 # OpenLDAP --with-ldbm_api
2042         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2043 if test "${with_ldbm_api+set}" = set; then
2044   withval="$with_ldbm_api"
2045   
2046         ol_arg=invalid
2047         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2048                 if test "$withval" = "$ol_val" ; then
2049                         ol_arg="$ol_val"
2050                 fi
2051         done
2052         if test "$ol_arg" = "invalid" ; then
2053                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2054         fi
2055         ol_with_ldbm_api="$ol_arg"
2056
2057 else
2058         ol_with_ldbm_api="auto"
2059 fi
2060 # end --with-ldbm_api
2061
2062 # OpenLDAP --with-ldbm_type
2063         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2064 if test "${with_ldbm_type+set}" = set; then
2065   withval="$with_ldbm_type"
2066   
2067         ol_arg=invalid
2068         for ol_val in auto btree hash ; do
2069                 if test "$withval" = "$ol_val" ; then
2070                         ol_arg="$ol_val"
2071                 fi
2072         done
2073         if test "$ol_arg" = "invalid" ; then
2074                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2075         fi
2076         ol_with_ldbm_type="$ol_arg"
2077
2078 else
2079         ol_with_ldbm_type="auto"
2080 fi
2081 # end --with-ldbm_type
2082
2083 # OpenLDAP --enable-meta
2084         # Check whether --enable-meta or --disable-meta was given.
2085 if test "${enable_meta+set}" = set; then
2086   enableval="$enable_meta"
2087   
2088         ol_arg=invalid
2089         for ol_val in no yes mod ; do
2090                 if test "$enableval" = "$ol_val" ; then
2091                         ol_arg="$ol_val"
2092                 fi
2093         done
2094         if test "$ol_arg" = "invalid" ; then
2095                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2096         fi
2097         ol_enable_meta="$ol_arg"
2098
2099 else
2100         ol_enable_meta="no"
2101 fi
2102 # end --enable-meta
2103 # OpenLDAP --enable-monitor
2104         # Check whether --enable-monitor or --disable-monitor was given.
2105 if test "${enable_monitor+set}" = set; then
2106   enableval="$enable_monitor"
2107   
2108         ol_arg=invalid
2109         for ol_val in no yes mod ; do
2110                 if test "$enableval" = "$ol_val" ; then
2111                         ol_arg="$ol_val"
2112                 fi
2113         done
2114         if test "$ol_arg" = "invalid" ; then
2115                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2116         fi
2117         ol_enable_monitor="$ol_arg"
2118
2119 else
2120         ol_enable_monitor="yes"
2121 fi
2122 # end --enable-monitor
2123 # OpenLDAP --enable-null
2124         # Check whether --enable-null or --disable-null was given.
2125 if test "${enable_null+set}" = set; then
2126   enableval="$enable_null"
2127   
2128         ol_arg=invalid
2129         for ol_val in no yes mod ; do
2130                 if test "$enableval" = "$ol_val" ; then
2131                         ol_arg="$ol_val"
2132                 fi
2133         done
2134         if test "$ol_arg" = "invalid" ; then
2135                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2136         fi
2137         ol_enable_null="$ol_arg"
2138
2139 else
2140         ol_enable_null="no"
2141 fi
2142 # end --enable-null
2143 # OpenLDAP --enable-passwd
2144         # Check whether --enable-passwd or --disable-passwd was given.
2145 if test "${enable_passwd+set}" = set; then
2146   enableval="$enable_passwd"
2147   
2148         ol_arg=invalid
2149         for ol_val in no yes mod ; do
2150                 if test "$enableval" = "$ol_val" ; then
2151                         ol_arg="$ol_val"
2152                 fi
2153         done
2154         if test "$ol_arg" = "invalid" ; then
2155                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2156         fi
2157         ol_enable_passwd="$ol_arg"
2158
2159 else
2160         ol_enable_passwd="no"
2161 fi
2162 # end --enable-passwd
2163 # OpenLDAP --enable-perl
2164         # Check whether --enable-perl or --disable-perl was given.
2165 if test "${enable_perl+set}" = set; then
2166   enableval="$enable_perl"
2167   
2168         ol_arg=invalid
2169         for ol_val in no yes mod ; do
2170                 if test "$enableval" = "$ol_val" ; then
2171                         ol_arg="$ol_val"
2172                 fi
2173         done
2174         if test "$ol_arg" = "invalid" ; then
2175                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2176         fi
2177         ol_enable_perl="$ol_arg"
2178
2179 else
2180         ol_enable_perl="no"
2181 fi
2182 # end --enable-perl
2183 # OpenLDAP --enable-relay
2184         # Check whether --enable-relay or --disable-relay was given.
2185 if test "${enable_relay+set}" = set; then
2186   enableval="$enable_relay"
2187   
2188         ol_arg=invalid
2189         for ol_val in no yes mod ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2196         fi
2197         ol_enable_relay="$ol_arg"
2198
2199 else
2200         ol_enable_relay="yes"
2201 fi
2202 # end --enable-relay
2203 # OpenLDAP --enable-shell
2204         # Check whether --enable-shell or --disable-shell was given.
2205 if test "${enable_shell+set}" = set; then
2206   enableval="$enable_shell"
2207   
2208         ol_arg=invalid
2209         for ol_val in no yes mod ; do
2210                 if test "$enableval" = "$ol_val" ; then
2211                         ol_arg="$ol_val"
2212                 fi
2213         done
2214         if test "$ol_arg" = "invalid" ; then
2215                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2216         fi
2217         ol_enable_shell="$ol_arg"
2218
2219 else
2220         ol_enable_shell="no"
2221 fi
2222 # end --enable-shell
2223 # OpenLDAP --enable-sql
2224         # Check whether --enable-sql or --disable-sql was given.
2225 if test "${enable_sql+set}" = set; then
2226   enableval="$enable_sql"
2227   
2228         ol_arg=invalid
2229         for ol_val in no yes mod ; 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 "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2236         fi
2237         ol_enable_sql="$ol_arg"
2238
2239 else
2240         ol_enable_sql="no"
2241 fi
2242 # end --enable-sql
2243
2244 Overlays="denyop dyngroup dynlist glue lastmod ppolicy proxycache \
2245         refint rwm syncprov translucent unique"
2246
2247 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2248 if test "${with_xxslapoverlays+set}" = set; then
2249   withval="$with_xxslapoverlays"
2250   :
2251 fi
2252
2253
2254 # OpenLDAP --enable-overlays
2255         # Check whether --enable-overlays or --disable-overlays was given.
2256 if test "${enable_overlays+set}" = set; then
2257   enableval="$enable_overlays"
2258   
2259         ol_arg=invalid
2260         for ol_val in no yes mod ; do
2261                 if test "$enableval" = "$ol_val" ; then
2262                         ol_arg="$ol_val"
2263                 fi
2264         done
2265         if test "$ol_arg" = "invalid" ; then
2266                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2267         fi
2268         ol_enable_overlays="$ol_arg"
2269
2270 else
2271         ol_enable_overlays="no"
2272 fi
2273 # end --enable-overlays
2274 # OpenLDAP --enable-denyop
2275         # Check whether --enable-denyop or --disable-denyop was given.
2276 if test "${enable_denyop+set}" = set; then
2277   enableval="$enable_denyop"
2278   
2279         ol_arg=invalid
2280         for ol_val in no yes mod ; do
2281                 if test "$enableval" = "$ol_val" ; then
2282                         ol_arg="$ol_val"
2283                 fi
2284         done
2285         if test "$ol_arg" = "invalid" ; then
2286                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2287         fi
2288         ol_enable_denyop="$ol_arg"
2289
2290 else
2291         ol_enable_denyop="no"
2292 fi
2293 # end --enable-denyop
2294
2295 # OpenLDAP --enable-dyngroup
2296         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2297 if test "${enable_dyngroup+set}" = set; then
2298   enableval="$enable_dyngroup"
2299   
2300         ol_arg=invalid
2301         for ol_val in no yes mod ; do
2302                 if test "$enableval" = "$ol_val" ; then
2303                         ol_arg="$ol_val"
2304                 fi
2305         done
2306         if test "$ol_arg" = "invalid" ; then
2307                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2308         fi
2309         ol_enable_dyngroup="$ol_arg"
2310
2311 else
2312         ol_enable_dyngroup="no"
2313 fi
2314 # end --enable-dyngroup
2315
2316 # OpenLDAP --enable-dynlist
2317         # Check whether --enable-dynlist or --disable-dynlist was given.
2318 if test "${enable_dynlist+set}" = set; then
2319   enableval="$enable_dynlist"
2320   
2321         ol_arg=invalid
2322         for ol_val in no yes mod ; do
2323                 if test "$enableval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2329         fi
2330         ol_enable_dynlist="$ol_arg"
2331
2332 else
2333         ol_enable_dynlist="no"
2334 fi
2335 # end --enable-dynlist
2336
2337 # OpenLDAP --enable-glue
2338         # Check whether --enable-glue or --disable-glue was given.
2339 if test "${enable_glue+set}" = set; then
2340   enableval="$enable_glue"
2341   
2342         ol_arg=invalid
2343         for ol_val in no yes mod ; do
2344                 if test "$enableval" = "$ol_val" ; then
2345                         ol_arg="$ol_val"
2346                 fi
2347         done
2348         if test "$ol_arg" = "invalid" ; then
2349                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2350         fi
2351         ol_enable_glue="$ol_arg"
2352
2353 else
2354         ol_enable_glue="yes"
2355 fi
2356 # end --enable-glue
2357
2358 # OpenLDAP --enable-lastmod
2359         # Check whether --enable-lastmod or --disable-lastmod was given.
2360 if test "${enable_lastmod+set}" = set; then
2361   enableval="$enable_lastmod"
2362   
2363         ol_arg=invalid
2364         for ol_val in no yes mod ; do
2365                 if test "$enableval" = "$ol_val" ; then
2366                         ol_arg="$ol_val"
2367                 fi
2368         done
2369         if test "$ol_arg" = "invalid" ; then
2370                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2371         fi
2372         ol_enable_lastmod="$ol_arg"
2373
2374 else
2375         ol_enable_lastmod="no"
2376 fi
2377 # end --enable-lastmod
2378
2379 # OpenLDAP --enable-ppolicy
2380         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2381 if test "${enable_ppolicy+set}" = set; then
2382   enableval="$enable_ppolicy"
2383   
2384         ol_arg=invalid
2385         for ol_val in no yes mod ; do
2386                 if test "$enableval" = "$ol_val" ; then
2387                         ol_arg="$ol_val"
2388                 fi
2389         done
2390         if test "$ol_arg" = "invalid" ; then
2391                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2392         fi
2393         ol_enable_ppolicy="$ol_arg"
2394
2395 else
2396         ol_enable_ppolicy="no"
2397 fi
2398 # end --enable-ppolicy
2399
2400 # OpenLDAP --enable-proxycache
2401         # Check whether --enable-proxycache or --disable-proxycache was given.
2402 if test "${enable_proxycache+set}" = set; then
2403   enableval="$enable_proxycache"
2404   
2405         ol_arg=invalid
2406         for ol_val in no yes mod ; do
2407                 if test "$enableval" = "$ol_val" ; then
2408                         ol_arg="$ol_val"
2409                 fi
2410         done
2411         if test "$ol_arg" = "invalid" ; then
2412                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2413         fi
2414         ol_enable_proxycache="$ol_arg"
2415
2416 else
2417         ol_enable_proxycache="no"
2418 fi
2419 # end --enable-proxycache
2420
2421 # OpenLDAP --enable-refint
2422         # Check whether --enable-refint or --disable-refint was given.
2423 if test "${enable_refint+set}" = set; then
2424   enableval="$enable_refint"
2425   
2426         ol_arg=invalid
2427         for ol_val in no yes mod ; do
2428                 if test "$enableval" = "$ol_val" ; then
2429                         ol_arg="$ol_val"
2430                 fi
2431         done
2432         if test "$ol_arg" = "invalid" ; then
2433                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2434         fi
2435         ol_enable_refint="$ol_arg"
2436
2437 else
2438         ol_enable_refint="no"
2439 fi
2440 # end --enable-refint
2441
2442 # OpenLDAP --enable-rwm
2443         # Check whether --enable-rwm or --disable-rwm was given.
2444 if test "${enable_rwm+set}" = set; then
2445   enableval="$enable_rwm"
2446   
2447         ol_arg=invalid
2448         for ol_val in no yes mod ; do
2449                 if test "$enableval" = "$ol_val" ; then
2450                         ol_arg="$ol_val"
2451                 fi
2452         done
2453         if test "$ol_arg" = "invalid" ; then
2454                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2455         fi
2456         ol_enable_rwm="$ol_arg"
2457
2458 else
2459         ol_enable_rwm="no"
2460 fi
2461 # end --enable-rwm
2462
2463 # OpenLDAP --enable-syncprov
2464         # Check whether --enable-syncprov or --disable-syncprov was given.
2465 if test "${enable_syncprov+set}" = set; then
2466   enableval="$enable_syncprov"
2467   
2468         ol_arg=invalid
2469         for ol_val in no yes mod ; do
2470                 if test "$enableval" = "$ol_val" ; then
2471                         ol_arg="$ol_val"
2472                 fi
2473         done
2474         if test "$ol_arg" = "invalid" ; then
2475                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2476         fi
2477         ol_enable_syncprov="$ol_arg"
2478
2479 else
2480         ol_enable_syncprov="yes"
2481 fi
2482 # end --enable-syncprov
2483
2484 # OpenLDAP --enable-translucent
2485         # Check whether --enable-translucent or --disable-translucent was given.
2486 if test "${enable_translucent+set}" = set; then
2487   enableval="$enable_translucent"
2488   
2489         ol_arg=invalid
2490         for ol_val in no yes mod ; do
2491                 if test "$enableval" = "$ol_val" ; then
2492                         ol_arg="$ol_val"
2493                 fi
2494         done
2495         if test "$ol_arg" = "invalid" ; then
2496                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2497         fi
2498         ol_enable_translucent="$ol_arg"
2499
2500 else
2501         ol_enable_translucent="no"
2502 fi
2503 # end --enable-translucent
2504
2505 # OpenLDAP --enable-unique
2506         # Check whether --enable-unique or --disable-unique was given.
2507 if test "${enable_unique+set}" = set; then
2508   enableval="$enable_unique"
2509   
2510         ol_arg=invalid
2511         for ol_val in no yes mod ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2518         fi
2519         ol_enable_unique="$ol_arg"
2520
2521 else
2522         ol_enable_unique="no"
2523 fi
2524 # end --enable-unique
2525
2526
2527
2528 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2529 if test "${with_xxslurpdoptions+set}" = set; then
2530   withval="$with_xxslurpdoptions"
2531   :
2532 fi
2533
2534 # OpenLDAP --enable-slurpd
2535         # Check whether --enable-slurpd or --disable-slurpd was given.
2536 if test "${enable_slurpd+set}" = set; then
2537   enableval="$enable_slurpd"
2538   
2539         ol_arg=invalid
2540         for ol_val in auto yes no ; do
2541                 if test "$enableval" = "$ol_val" ; then
2542                         ol_arg="$ol_val"
2543                 fi
2544         done
2545         if test "$ol_arg" = "invalid" ; then
2546                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2547         fi
2548         ol_enable_slurpd="$ol_arg"
2549
2550 else
2551         ol_enable_slurpd="auto"
2552 fi
2553 # end --enable-slurpd
2554
2555 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2556 if test "${with_xxliboptions+set}" = set; then
2557   withval="$with_xxliboptions"
2558   :
2559 fi
2560
2561 # Check whether --enable-static or --disable-static was given.
2562 if test "${enable_static+set}" = set; then
2563   enableval="$enable_static"
2564   p=${PACKAGE-default}
2565 case $enableval in
2566 yes) enable_static=yes ;;
2567 no) enable_static=no ;;
2568 *)
2569   enable_static=no
2570   # Look at the argument we got.  We use all the common list separators.
2571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2572   for pkg in $enableval; do
2573     if test "X$pkg" = "X$p"; then
2574       enable_static=yes
2575     fi
2576   done
2577   IFS="$ac_save_ifs"
2578   ;;
2579 esac
2580 else
2581   enable_static=yes
2582 fi
2583
2584 # Check whether --enable-shared or --disable-shared was given.
2585 if test "${enable_shared+set}" = set; then
2586   enableval="$enable_shared"
2587   p=${PACKAGE-default}
2588 case $enableval in
2589 yes) enable_shared=yes ;;
2590 no) enable_shared=no ;;
2591 *)
2592   enable_shared=no
2593   # Look at the argument we got.  We use all the common list separators.
2594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2595   for pkg in $enableval; do
2596     if test "X$pkg" = "X$p"; then
2597       enable_shared=yes
2598     fi
2599   done
2600   IFS="$ac_save_ifs"
2601   ;;
2602 esac
2603 else
2604   enable_shared=yes
2605 fi
2606
2607
2608
2609 # Activate any backends that were not explicitly enabled.
2610 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2611 if test $ol_enable_backends != no ; then
2612         for i in $Backends; do
2613                 eval "ol_tmp=\$ol_enable_$i"
2614                 if test $ol_tmp = no ; then
2615                         eval "ol_enable_$i=$ol_enable_backends"
2616                 fi
2617         done
2618 fi
2619 # Activate the overlays
2620 if test $ol_enable_overlays != no ; then
2621         for i in $Overlays; do
2622                 eval "ol_tmp=\$ol_enable_$i"
2623                 if test $ol_tmp = no ; then
2624                         eval "ol_enable_$i=$ol_enable_overlays"
2625                 fi
2626         done
2627 fi
2628
2629 # validate options
2630 if test $ol_enable_slapd = no ; then
2631                 if test $ol_enable_slapi = yes ; then
2632                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2633         fi
2634         if test $ol_enable_backends != no ; then
2635                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2636         fi
2637         for i in $Backends; do
2638                 eval "ol_tmp=\$ol_enable_$i"
2639                 if test $ol_tmp != no ; then
2640                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2641                         eval "ol_enable_$i=no"
2642                 fi
2643         done
2644         if test $ol_enable_modules = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2646         fi
2647         if test $ol_enable_multimaster = yes ; then
2648                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2649         fi
2650         if test $ol_enable_wrappers = yes ; then
2651                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2652         fi
2653         if test $ol_enable_rlookups = yes ; then
2654                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2655         fi
2656         if test $ol_enable_aci = yes ; then
2657                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2658         fi
2659         if test $ol_with_ldbm_api != auto ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2661         fi
2662         if test $ol_with_ldbm_type != auto ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2664         fi
2665         if test $ol_enable_slurpd = yes ; then
2666                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2667         fi
2668         if test $ol_enable_rewrite = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2670         fi
2671                 if test $ol_enable_overlays != no ; then
2672                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2673         fi
2674         for i in $Overlays; do
2675                 eval "ol_tmp=\$ol_enable_$i"
2676                 if test $ol_tmp != no ; then
2677                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2678                         eval "ol_enable_$i=no"
2679                 fi
2680         done
2681
2682         # force settings to no
2683         ol_enable_slapi=no
2684
2685         ol_enable_backends=no
2686         ol_enable_overlays=no
2687         ol_enable_modules=no
2688         ol_enable_multimaster=no
2689         ol_enable_rlookups=no
2690         ol_enable_aci=no
2691         ol_enable_wrappers=no
2692
2693         ol_with_ldbm_api=no
2694         ol_with_ldbm_type=no
2695
2696         ol_enable_slurpd=no
2697
2698         ol_enable_rewrite=no
2699
2700 elif test $ol_enable_ldbm = no ; then
2701         
2702         if test $ol_with_ldbm_api != auto ; then
2703                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2704         fi
2705
2706         if test $ol_with_ldbm_type != auto ; then
2707                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2708         fi
2709
2710         if test $ol_enable_modules != yes -a \
2711                 $ol_enable_bdb = no -a \
2712                 $ol_enable_dnssrv = no -a \
2713                 $ol_enable_hdb = no -a \
2714                 $ol_enable_ldap = no -a \
2715                 $ol_enable_meta = no -a \
2716                 $ol_enable_monitor = no -a \
2717                 $ol_enable_null = no -a \
2718                 $ol_enable_passwd = no -a \
2719                 $ol_enable_perl = no -a \
2720                 $ol_enable_relay = no -a \
2721                 $ol_enable_shell = no -a \
2722                 $ol_enable_sql = no ; then
2723
2724                 if test $ol_enable_slapd = yes ; then
2725                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2726                 else
2727                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2728                         ol_enable_slapd=no
2729                 fi
2730         fi
2731
2732         ol_with_ldbm_api=no
2733         ol_with_ldbm_type=no
2734
2735         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2736                 ol_with_ldbm_api=berkeley
2737         fi
2738
2739 else
2740                 if test $ol_with_ldbm_api = gdbm -a \
2741                 $ol_with_ldbm_type = btree ; then
2742                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2743         fi
2744         if test $ol_with_ldbm_api = mdbm -a \
2745                 $ol_with_ldbm_type = btree ; then
2746                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2747         fi
2748         if test $ol_with_ldbm_api = ndbm -a \
2749                 $ol_with_ldbm_type = btree ; then
2750                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2751         fi
2752
2753         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2754                 if test $ol_with_ldbm_api = auto ; then
2755                         ol_with_ldbm_api=berkeley
2756                 elif test $ol_with_ldbm_api != berkeley ; then
2757                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2758                 fi
2759         fi
2760 fi
2761
2762 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2763         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2764 fi
2765
2766 if test $ol_enable_slurpd = yes ; then
2767                 if test $ol_with_threads = no ; then
2768                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2769         fi
2770 fi
2771
2772 if test $ol_enable_lmpasswd = yes ; then
2773         if test $ol_with_tls = no ; then
2774                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2775         fi
2776 fi
2777
2778 if test $ol_enable_kbind = yes ; then
2779         if test $ol_with_kerberos = no ; then
2780                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2781         elif test $ol_with_kerberos = auto ; then
2782                 ol_with_kerberos=yes
2783         fi
2784
2785 elif test $ol_enable_kbind = no ; then
2786         if test $ol_with_kerberos = auto ; then
2787                 ol_with_kerberos=no
2788         elif test $ol_with_kerberos != no ; then
2789                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2790                 ol_with_kerberos=no
2791         fi
2792 fi
2793
2794 if test $ol_enable_spasswd = yes ; then
2795         if test $ol_with_cyrus_sasl = no ; then
2796                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2797         fi
2798         ol_with_cyrus_sasl=yes
2799 fi
2800
2801 echo "$ac_t""done" 1>&6
2802
2803 LDAP_LIBS=
2804 LDBM_LIBS=
2805 LTHREAD_LIBS=
2806 LUTIL_LIBS=
2807
2808 SLAPD_LIBS=
2809 SLURPD_LIBS=
2810
2811 BUILD_SLAPD=no
2812 BUILD_SLURPD=no
2813
2814 BUILD_THREAD=no
2815
2816 BUILD_SLAPI=no
2817 SLAPD_SLAPI_DEPEND=
2818
2819 BUILD_BDB=no
2820 BUILD_DNSSRV=no
2821 BUILD_HDB=no
2822 BUILD_LDAP=no
2823 BUILD_LDBM=no
2824 BUILD_META=no
2825 BUILD_MONITOR=no
2826 BUILD_NULL=no
2827 BUILD_PASSWD=no
2828 BUILD_PERL=no
2829 BUILD_RELAY=no
2830 BUILD_SHELL=no
2831 BUILD_SQL=no
2832
2833 BUILD_CHAIN=no
2834 BUILD_DENYOP=no
2835 BUILD_DYNGROUP=no
2836 BUILD_DYNLIST=no
2837 BUILD_GLUE=no
2838 BUILD_LASTMOD=no
2839 BUILD_PPOLICY=no
2840 BUILD_PROXYCACHE=no
2841 BUILD_REFINT=no
2842 BUILD_RWM=no
2843 BUILD_SYNCPROV=no
2844 BUILD_TRANSLUCENT=no
2845 BUILD_UNIQUE=no
2846
2847 SLAPD_STATIC_OVERLAYS=
2848 SLAPD_DYNAMIC_OVERLAYS=
2849
2850 SLAPD_MODULES_LDFLAGS=
2851 SLAPD_MODULES_CPPFLAGS=
2852
2853 SLAPD_STATIC_BACKENDS=back-ldif
2854 SLAPD_DYNAMIC_BACKENDS=
2855
2856 SLAPD_PERL_LDFLAGS=
2857 MOD_PERL_LDFLAGS=
2858 PERL_CPPFLAGS=
2859
2860 SLAPD_SQL_LDFLAGS=
2861 SLAPD_SQL_LIBS=
2862 SLAPD_SQL_INCLUDES=
2863
2864 KRB4_LIBS=
2865 KRB5_LIBS=
2866 SASL_LIBS=
2867 TLS_LIBS=
2868 MODULES_LIBS=
2869 SLAPI_LIBS=
2870 LIBSLAPI=
2871 LIBSLAPITOOLS=
2872 AUTH_LIBS=
2873
2874 SLAPD_SLP_LIBS=
2875 SLAPD_GMP_LIBS=
2876
2877
2878 cat >> confdefs.h <<\EOF
2879 #define HAVE_MKVERSION 1
2880 EOF
2881
2882
2883
2884
2885 ol_aix_threads=no
2886 case "$target" in
2887 *-*-aix*)       if test -z "$CC" ; then
2888                 case "$ol_with_threads" in
2889                 auto | yes |  posix) ol_aix_threads=yes ;;
2890                 esac
2891         fi
2892 ;;
2893 esac
2894
2895 if test $ol_aix_threads = yes ; then
2896         if test -z "${CC}" ; then
2897                 for ac_prog in cc_r xlc_r cc
2898 do
2899 # Extract the first word of "$ac_prog", so it can be a program name with args.
2900 set dummy $ac_prog; ac_word=$2
2901 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2902 echo "configure:2903: checking for $ac_word" >&5
2903 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   if test -n "$CC"; then
2907   ac_cv_prog_CC="$CC" # Let the user override the test.
2908 else
2909   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2910   ac_dummy="$PATH"
2911   for ac_dir in $ac_dummy; do
2912     test -z "$ac_dir" && ac_dir=.
2913     if test -f $ac_dir/$ac_word; then
2914       ac_cv_prog_CC="$ac_prog"
2915       break
2916     fi
2917   done
2918   IFS="$ac_save_ifs"
2919 fi
2920 fi
2921 CC="$ac_cv_prog_CC"
2922 if test -n "$CC"; then
2923   echo "$ac_t""$CC" 1>&6
2924 else
2925   echo "$ac_t""no" 1>&6
2926 fi
2927
2928 test -n "$CC" && break
2929 done
2930
2931
2932                 if test "$CC" = cc ; then
2933                                                 if test $ol_with_threads != auto ; then
2934                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2935                         else
2936                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2937                         fi
2938                         ol_with_threads=no
2939                 fi
2940         fi
2941
2942         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2943                 ol_with_threads=posix
2944                 ol_cv_pthread_create=yes
2945         fi
2946 fi
2947
2948 if test -z "${CC}"; then
2949         for ac_prog in cc gcc
2950 do
2951 # Extract the first word of "$ac_prog", so it can be a program name with args.
2952 set dummy $ac_prog; ac_word=$2
2953 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2954 echo "configure:2955: checking for $ac_word" >&5
2955 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2956   echo $ac_n "(cached) $ac_c" 1>&6
2957 else
2958   if test -n "$CC"; then
2959   ac_cv_prog_CC="$CC" # Let the user override the test.
2960 else
2961   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2962   ac_dummy="$PATH"
2963   for ac_dir in $ac_dummy; do
2964     test -z "$ac_dir" && ac_dir=.
2965     if test -f $ac_dir/$ac_word; then
2966       ac_cv_prog_CC="$ac_prog"
2967       break
2968     fi
2969   done
2970   IFS="$ac_save_ifs"
2971 fi
2972 fi
2973 CC="$ac_cv_prog_CC"
2974 if test -n "$CC"; then
2975   echo "$ac_t""$CC" 1>&6
2976 else
2977   echo "$ac_t""no" 1>&6
2978 fi
2979
2980 test -n "$CC" && break
2981 done
2982 test -n "$CC" || CC="missing"
2983
2984
2985         if test "${CC}" = "missing" ; then
2986                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2987         fi
2988 fi
2989
2990 if test -z "${AR}"; then
2991         for ac_prog in ar gar
2992 do
2993 # Extract the first word of "$ac_prog", so it can be a program name with args.
2994 set dummy $ac_prog; ac_word=$2
2995 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $ac_word" >&5
2997 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   if test -n "$AR"; then
3001   ac_cv_prog_AR="$AR" # Let the user override the test.
3002 else
3003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3004   ac_dummy="$PATH"
3005   for ac_dir in $ac_dummy; do
3006     test -z "$ac_dir" && ac_dir=.
3007     if test -f $ac_dir/$ac_word; then
3008       ac_cv_prog_AR="$ac_prog"
3009       break
3010     fi
3011   done
3012   IFS="$ac_save_ifs"
3013 fi
3014 fi
3015 AR="$ac_cv_prog_AR"
3016 if test -n "$AR"; then
3017   echo "$ac_t""$AR" 1>&6
3018 else
3019   echo "$ac_t""no" 1>&6
3020 fi
3021
3022 test -n "$AR" && break
3023 done
3024 test -n "$AR" || AR="missing"
3025
3026
3027         if test "${AR}" = "missing" ; then
3028                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3029         fi
3030 fi
3031
3032
3033
3034 # Find the correct PATH separator.  Usually this is `:', but
3035 # DJGPP uses `;' like DOS.
3036 if test "X${PATH_SEPARATOR+set}" != Xset; then
3037   UNAME=${UNAME-`uname 2>/dev/null`}
3038   case X$UNAME in
3039     *-DOS) lt_cv_sys_path_separator=';' ;;
3040     *)     lt_cv_sys_path_separator=':' ;;
3041   esac
3042   PATH_SEPARATOR=$lt_cv_sys_path_separator
3043 fi
3044
3045 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3046 echo "configure:3047: checking for Cygwin environment" >&5
3047 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3048   echo $ac_n "(cached) $ac_c" 1>&6
3049 else
3050   cat > conftest.$ac_ext <<EOF
3051 #line 3052 "configure"
3052 #include "confdefs.h"
3053
3054 int main() {
3055
3056 #ifndef __CYGWIN__
3057 #define __CYGWIN__ __CYGWIN32__
3058 #endif
3059 return __CYGWIN__;
3060 ; return 0; }
3061 EOF
3062 if { (eval echo configure:3063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3063   rm -rf conftest*
3064   ac_cv_cygwin=yes
3065 else
3066   echo "configure: failed program was:" >&5
3067   cat conftest.$ac_ext >&5
3068   rm -rf conftest*
3069   ac_cv_cygwin=no
3070 fi
3071 rm -f conftest*
3072 fi
3073
3074 echo "$ac_t""$ac_cv_cygwin" 1>&6
3075 CYGWIN=
3076 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3077 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3078 echo "configure:3079: checking for mingw32 environment" >&5
3079 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3080   echo $ac_n "(cached) $ac_c" 1>&6
3081 else
3082   cat > conftest.$ac_ext <<EOF
3083 #line 3084 "configure"
3084 #include "confdefs.h"
3085
3086 int main() {
3087 return __MINGW32__;
3088 ; return 0; }
3089 EOF
3090 if { (eval echo configure:3091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3091   rm -rf conftest*
3092   ac_cv_mingw32=yes
3093 else
3094   echo "configure: failed program was:" >&5
3095   cat conftest.$ac_ext >&5
3096   rm -rf conftest*
3097   ac_cv_mingw32=no
3098 fi
3099 rm -f conftest*
3100 fi
3101
3102 echo "$ac_t""$ac_cv_mingw32" 1>&6
3103 MINGW32=
3104 test "$ac_cv_mingw32" = yes && MINGW32=yes
3105 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3106 echo "configure:3107: checking for EMX OS/2 environment" >&5
3107 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   cat > conftest.$ac_ext <<EOF
3111 #line 3112 "configure"
3112 #include "confdefs.h"
3113
3114 int main() {
3115 return __EMX__;
3116 ; return 0; }
3117 EOF
3118 if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3119   rm -rf conftest*
3120   ac_cv_emxos2=yes
3121 else
3122   echo "configure: failed program was:" >&5
3123   cat conftest.$ac_ext >&5
3124   rm -rf conftest*
3125   ac_cv_emxos2=no
3126 fi
3127 rm -f conftest*
3128 fi
3129
3130 echo "$ac_t""$ac_cv_emxos2" 1>&6
3131 EMXOS2=
3132 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3133 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3134 echo "configure:3135: checking how to run the C preprocessor" >&5
3135 # On Suns, sometimes $CPP names a directory.
3136 if test -n "$CPP" && test -d "$CPP"; then
3137   CPP=
3138 fi
3139 if test -z "$CPP"; then
3140 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3141   echo $ac_n "(cached) $ac_c" 1>&6
3142 else
3143     # This must be in double quotes, not single quotes, because CPP may get
3144   # substituted into the Makefile and "${CC-cc}" will confuse make.
3145   CPP="${CC-cc} -E"
3146   # On the NeXT, cc -E runs the code through the compiler's parser,
3147   # not just through cpp.
3148   cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151 #include <assert.h>
3152 Syntax Error
3153 EOF
3154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3155 { (eval echo configure:3156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3157 if test -z "$ac_err"; then
3158   :
3159 else
3160   echo "$ac_err" >&5
3161   echo "configure: failed program was:" >&5
3162   cat conftest.$ac_ext >&5
3163   rm -rf conftest*
3164   CPP="${CC-cc} -E -traditional-cpp"
3165   cat > conftest.$ac_ext <<EOF
3166 #line 3167 "configure"
3167 #include "confdefs.h"
3168 #include <assert.h>
3169 Syntax Error
3170 EOF
3171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3172 { (eval echo configure:3173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3174 if test -z "$ac_err"; then
3175   :
3176 else
3177   echo "$ac_err" >&5
3178   echo "configure: failed program was:" >&5
3179   cat conftest.$ac_ext >&5
3180   rm -rf conftest*
3181   CPP="${CC-cc} -nologo -E"
3182   cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 #include <assert.h>
3186 Syntax Error
3187 EOF
3188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3189 { (eval echo configure:3190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3191 if test -z "$ac_err"; then
3192   :
3193 else
3194   echo "$ac_err" >&5
3195   echo "configure: failed program was:" >&5
3196   cat conftest.$ac_ext >&5
3197   rm -rf conftest*
3198   CPP=/lib/cpp
3199 fi
3200 rm -f conftest*
3201 fi
3202 rm -f conftest*
3203 fi
3204 rm -f conftest*
3205   ac_cv_prog_CPP="$CPP"
3206 fi
3207   CPP="$ac_cv_prog_CPP"
3208 else
3209   ac_cv_prog_CPP="$CPP"
3210 fi
3211 echo "$ac_t""$CPP" 1>&6
3212
3213 # Check whether --enable-fast-install or --disable-fast-install was given.
3214 if test "${enable_fast_install+set}" = set; then
3215   enableval="$enable_fast_install"
3216   p=${PACKAGE-default}
3217 case $enableval in
3218 yes) enable_fast_install=yes ;;
3219 no) enable_fast_install=no ;;
3220 *)
3221   enable_fast_install=no
3222   # Look at the argument we got.  We use all the common list separators.
3223   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3224   for pkg in $enableval; do
3225     if test "X$pkg" = "X$p"; then
3226       enable_fast_install=yes
3227     fi
3228   done
3229   IFS="$ac_save_ifs"
3230   ;;
3231 esac
3232 else
3233   enable_fast_install=yes
3234 fi
3235
3236 # Extract the first word of "gcc", so it can be a program name with args.
3237 set dummy gcc; ac_word=$2
3238 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3239 echo "configure:3240: checking for $ac_word" >&5
3240 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   if test -n "$CC"; then
3244   ac_cv_prog_CC="$CC" # Let the user override the test.
3245 else
3246   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3247   ac_dummy="$PATH"
3248   for ac_dir in $ac_dummy; do
3249     test -z "$ac_dir" && ac_dir=.
3250     if test -f $ac_dir/$ac_word; then
3251       ac_cv_prog_CC="gcc"
3252       break
3253     fi
3254   done
3255   IFS="$ac_save_ifs"
3256 fi
3257 fi
3258 CC="$ac_cv_prog_CC"
3259 if test -n "$CC"; then
3260   echo "$ac_t""$CC" 1>&6
3261 else
3262   echo "$ac_t""no" 1>&6
3263 fi
3264
3265 if test -z "$CC"; then
3266   # Extract the first word of "cc", so it can be a program name with args.
3267 set dummy cc; ac_word=$2
3268 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3269 echo "configure:3270: checking for $ac_word" >&5
3270 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273   if test -n "$CC"; then
3274   ac_cv_prog_CC="$CC" # Let the user override the test.
3275 else
3276   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3277   ac_prog_rejected=no
3278   ac_dummy="$PATH"
3279   for ac_dir in $ac_dummy; do
3280     test -z "$ac_dir" && ac_dir=.
3281     if test -f $ac_dir/$ac_word; then
3282       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3283         ac_prog_rejected=yes
3284         continue
3285       fi
3286       ac_cv_prog_CC="cc"
3287       break
3288     fi
3289   done
3290   IFS="$ac_save_ifs"
3291 if test $ac_prog_rejected = yes; then
3292   # We found a bogon in the path, so make sure we never use it.
3293   set dummy $ac_cv_prog_CC
3294   shift
3295   if test $# -gt 0; then
3296     # We chose a different compiler from the bogus one.
3297     # However, it has the same basename, so the bogon will be chosen
3298     # first if we set CC to just the basename; use the full file name.
3299     shift
3300     set dummy "$ac_dir/$ac_word" "$@"
3301     shift
3302     ac_cv_prog_CC="$@"
3303   fi
3304 fi
3305 fi
3306 fi
3307 CC="$ac_cv_prog_CC"
3308 if test -n "$CC"; then
3309   echo "$ac_t""$CC" 1>&6
3310 else
3311   echo "$ac_t""no" 1>&6
3312 fi
3313
3314   if test -z "$CC"; then
3315     case "`uname -s`" in
3316     *win32* | *WIN32* | *CYGWIN*)
3317       # Extract the first word of "cl", so it can be a program name with args.
3318 set dummy cl; ac_word=$2
3319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3320 echo "configure:3321: checking for $ac_word" >&5
3321 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3322   echo $ac_n "(cached) $ac_c" 1>&6
3323 else
3324   if test -n "$CC"; then
3325   ac_cv_prog_CC="$CC" # Let the user override the test.
3326 else
3327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3328   ac_dummy="$PATH"
3329   for ac_dir in $ac_dummy; do
3330     test -z "$ac_dir" && ac_dir=.
3331     if test -f $ac_dir/$ac_word; then
3332       ac_cv_prog_CC="cl"
3333       break
3334     fi
3335   done
3336   IFS="$ac_save_ifs"
3337 fi
3338 fi
3339 CC="$ac_cv_prog_CC"
3340 if test -n "$CC"; then
3341   echo "$ac_t""$CC" 1>&6
3342 else
3343   echo "$ac_t""no" 1>&6
3344 fi
3345  ;;
3346     esac
3347   fi
3348   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3349 fi
3350
3351 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3352 echo "configure:3353: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3353
3354 ac_ext=c
3355 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3356 ac_cpp='$CPP $CPPFLAGS'
3357 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3358 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3359 cross_compiling=$ac_cv_prog_cc_cross
3360
3361 cat > conftest.$ac_ext << EOF
3362
3363 #line 3364 "configure"
3364 #include "confdefs.h"
3365
3366 main(){return(0);}
3367 EOF
3368 if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3369   ac_cv_prog_cc_works=yes
3370   # If we can't run a trivial program, we are probably using a cross compiler.
3371   if (./conftest; exit) 2>/dev/null; then
3372     ac_cv_prog_cc_cross=no
3373   else
3374     ac_cv_prog_cc_cross=yes
3375   fi
3376 else
3377   echo "configure: failed program was:" >&5
3378   cat conftest.$ac_ext >&5
3379   ac_cv_prog_cc_works=no
3380 fi
3381 rm -fr conftest*
3382 ac_ext=c
3383 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3384 ac_cpp='$CPP $CPPFLAGS'
3385 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3386 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3387 cross_compiling=$ac_cv_prog_cc_cross
3388
3389 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3390 if test $ac_cv_prog_cc_works = no; then
3391   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3392 fi
3393 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3394 echo "configure:3395: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3395 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3396 cross_compiling=$ac_cv_prog_cc_cross
3397
3398 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3399 echo "configure:3400: checking whether we are using GNU C" >&5
3400 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   cat > conftest.c <<EOF
3404 #ifdef __GNUC__
3405   yes;
3406 #endif
3407 EOF
3408 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3409   ac_cv_prog_gcc=yes
3410 else
3411   ac_cv_prog_gcc=no
3412 fi
3413 fi
3414
3415 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3416
3417 if test $ac_cv_prog_gcc = yes; then
3418   GCC=yes
3419 else
3420   GCC=
3421 fi
3422
3423 ac_test_CFLAGS="${CFLAGS+set}"
3424 ac_save_CFLAGS="$CFLAGS"
3425 CFLAGS=
3426 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3427 echo "configure:3428: checking whether ${CC-cc} accepts -g" >&5
3428 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3429   echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431   echo 'void f(){}' > conftest.c
3432 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3433   ac_cv_prog_cc_g=yes
3434 else
3435   ac_cv_prog_cc_g=no
3436 fi
3437 rm -f conftest*
3438
3439 fi
3440
3441 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3442 if test "$ac_test_CFLAGS" = set; then
3443   CFLAGS="$ac_save_CFLAGS"
3444 elif test $ac_cv_prog_cc_g = yes; then
3445   if test "$GCC" = yes; then
3446     CFLAGS="-g -O2"
3447   else
3448     CFLAGS="-g"
3449   fi
3450 else
3451   if test "$GCC" = yes; then
3452     CFLAGS="-O2"
3453   else
3454     CFLAGS=
3455   fi
3456 fi
3457
3458 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3459 if test "${with_gnu_ld+set}" = set; then
3460   withval="$with_gnu_ld"
3461   test "$withval" = no || with_gnu_ld=yes
3462 else
3463   with_gnu_ld=no
3464 fi
3465
3466 ac_prog=ld
3467 if test "$GCC" = yes; then
3468   # Check if gcc -print-prog-name=ld gives a path.
3469   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3470 echo "configure:3471: checking for ld used by GCC" >&5
3471   case $host in
3472   *-*-mingw*)
3473     # gcc leaves a trailing carriage return which upsets mingw
3474     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3475   *)
3476     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3477   esac
3478   case $ac_prog in
3479     # Accept absolute paths.
3480     [\\/]* | [A-Za-z]:[\\/]*)
3481       re_direlt='/[^/][^/]*/\.\./'
3482       # Canonicalize the path of ld
3483       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3484       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3485         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3486       done
3487       test -z "$LD" && LD="$ac_prog"
3488       ;;
3489   "")
3490     # If it fails, then pretend we aren't using GCC.
3491     ac_prog=ld
3492     ;;
3493   *)
3494     # If it is relative, then search for the first ld in PATH.
3495     with_gnu_ld=unknown
3496     ;;
3497   esac
3498 elif test "$with_gnu_ld" = yes; then
3499   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3500 echo "configure:3501: checking for GNU ld" >&5
3501 else
3502   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3503 echo "configure:3504: checking for non-GNU ld" >&5
3504 fi
3505 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3506   echo $ac_n "(cached) $ac_c" 1>&6
3507 else
3508   if test -z "$LD"; then
3509   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3510   for ac_dir in $PATH; do
3511     test -z "$ac_dir" && ac_dir=.
3512     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3513       lt_cv_path_LD="$ac_dir/$ac_prog"
3514       # Check to see if the program is GNU ld.  I'd rather use --version,
3515       # but apparently some GNU ld's only accept -v.
3516       # Break only if it was the GNU/non-GNU ld that we prefer.
3517       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3518         test "$with_gnu_ld" != no && break
3519       else
3520         test "$with_gnu_ld" != yes && break
3521       fi
3522     fi
3523   done
3524   IFS="$ac_save_ifs"
3525 else
3526   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3527 fi
3528 fi
3529
3530 LD="$lt_cv_path_LD"
3531 if test -n "$LD"; then
3532   echo "$ac_t""$LD" 1>&6
3533 else
3534   echo "$ac_t""no" 1>&6
3535 fi
3536 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3537 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3538 echo "configure:3539: checking if the linker ($LD) is GNU ld" >&5
3539 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3540   echo $ac_n "(cached) $ac_c" 1>&6
3541 else
3542   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3543 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3544   lt_cv_prog_gnu_ld=yes
3545 else
3546   lt_cv_prog_gnu_ld=no
3547 fi
3548 fi
3549
3550 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3551 with_gnu_ld=$lt_cv_prog_gnu_ld
3552
3553
3554 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3555 echo "configure:3556: checking for $LD option to reload object files" >&5
3556 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3557   echo $ac_n "(cached) $ac_c" 1>&6
3558 else
3559   lt_cv_ld_reload_flag='-r'
3560 fi
3561
3562 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3563 reload_flag=$lt_cv_ld_reload_flag
3564 test -n "$reload_flag" && reload_flag=" $reload_flag"
3565
3566 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3567 echo "configure:3568: checking for BSD-compatible nm" >&5
3568 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3569   echo $ac_n "(cached) $ac_c" 1>&6
3570 else
3571   if test -n "$NM"; then
3572   # Let the user override the test.
3573   lt_cv_path_NM="$NM"
3574 else
3575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3576   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3577     test -z "$ac_dir" && ac_dir=.
3578     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3579     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3580       # Check to see if the nm accepts a BSD-compat flag.
3581       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3582       #   nm: unknown option "B" ignored
3583       # Tru64's nm complains that /dev/null is an invalid object file
3584       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3585         lt_cv_path_NM="$tmp_nm -B"
3586         break
3587       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3588         lt_cv_path_NM="$tmp_nm -p"
3589         break
3590       else
3591         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3592         continue # so that we can try to find one that supports BSD flags
3593       fi
3594     fi
3595   done
3596   IFS="$ac_save_ifs"
3597   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3598 fi
3599 fi
3600
3601 NM="$lt_cv_path_NM"
3602 echo "$ac_t""$NM" 1>&6
3603
3604 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3605 echo "configure:3606: checking for a sed that does not truncate output" >&5
3606 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3607   echo $ac_n "(cached) $ac_c" 1>&6
3608 else
3609   # Loop through the user's path and test for sed and gsed.
3610 # Then use that list of sed's as ones to test for truncation.
3611 as_executable_p="test -f"
3612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613 for as_dir in $PATH
3614 do
3615   IFS=$as_save_IFS
3616   test -z "$as_dir" && as_dir=.
3617   for ac_prog in sed gsed; do
3618     for ac_exec_ext in '' $ac_executable_extensions; do
3619       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3620         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3621       fi
3622     done
3623   done
3624 done
3625
3626   # Create a temporary directory, and hook for its removal unless debugging.
3627 $debug ||
3628 {
3629   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3630   trap '{ (exit 1); exit 1; }' 1 2 13 15
3631 }
3632
3633 # Create a (secure) tmp directory for tmp files.
3634 : ${TMPDIR=/tmp}
3635 {
3636   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3637   test -n "$tmp" && test -d "$tmp"
3638 }  ||
3639 {
3640   tmp=$TMPDIR/sed$$-$RANDOM
3641   (umask 077 && mkdir $tmp)
3642 } ||
3643 {
3644    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3645    { (exit 1); exit 1; }
3646 }
3647   _max=0
3648   _count=0
3649   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3650   # along with /bin/sed that truncates output.
3651   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3652     test ! -f ${_sed} && break
3653     cat /dev/null > "$tmp/sed.in"
3654     _count=0
3655     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3656     # Check for GNU sed and select it if it is found.
3657     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3658       lt_cv_path_SED=${_sed}
3659       break
3660     fi
3661     while true; do
3662       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3663       mv "$tmp/sed.tmp" "$tmp/sed.in"
3664       cp "$tmp/sed.in" "$tmp/sed.nl"
3665       echo >>"$tmp/sed.nl"
3666       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3667       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3668       # 40000 chars as input seems more than enough
3669       test $_count -gt 10 && break
3670       _count=`expr $_count + 1`
3671       if test $_count -gt $_max; then
3672         _max=$_count
3673         lt_cv_path_SED=$_sed
3674       fi
3675     done
3676   done
3677   rm -rf "$tmp"
3678
3679 fi
3680
3681 if test "X$SED" != "X"; then
3682   lt_cv_path_SED=$SED
3683 else
3684   SED=$lt_cv_path_SED
3685 fi
3686 echo "$ac_t""$SED" 1>&6
3687
3688 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3689 echo "configure:3690: checking whether ln -s works" >&5
3690 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   rm -f conftestdata
3694 if ln -s X conftestdata 2>/dev/null
3695 then
3696   rm -f conftestdata
3697   ac_cv_prog_LN_S="ln -s"
3698 else
3699   ac_cv_prog_LN_S=ln
3700 fi
3701 fi
3702 LN_S="$ac_cv_prog_LN_S"
3703 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3704   echo "$ac_t""yes" 1>&6
3705 else
3706   echo "$ac_t""no" 1>&6
3707 fi
3708
3709 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3710 echo "configure:3711: checking how to recognise dependent libraries" >&5
3711 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3712   echo $ac_n "(cached) $ac_c" 1>&6
3713 else
3714   lt_cv_file_magic_cmd='$MAGIC_CMD'
3715 lt_cv_file_magic_test_file=
3716 lt_cv_deplibs_check_method='unknown'
3717 # Need to set the preceding variable on all platforms that support
3718 # interlibrary dependencies.
3719 # 'none' -- dependencies not supported.
3720 # `unknown' -- same as none, but documents that we really don't know.
3721 # 'pass_all' -- all dependencies passed with no checks.
3722 # 'test_compile' -- check by making test program.
3723 # 'file_magic [[regex]]' -- check by looking for files in library path
3724 # which responds to the $file_magic_cmd with a given egrep regex.
3725 # If you have `file' or equivalent on your system and you're not sure
3726 # whether `pass_all' will *always* work, you probably want this one.
3727
3728 case $host_os in
3729 aix4* | aix5*)
3730   lt_cv_deplibs_check_method=pass_all
3731   ;;
3732
3733 beos*)
3734   lt_cv_deplibs_check_method=pass_all
3735   ;;
3736
3737 bsdi4*)
3738   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3739   lt_cv_file_magic_cmd='/usr/bin/file -L'
3740   lt_cv_file_magic_test_file=/shlib/libc.so
3741   ;;
3742
3743 cygwin* | mingw* | pw32*)
3744   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3745   lt_cv_file_magic_cmd='$OBJDUMP -f'
3746   ;;
3747
3748 darwin* | rhapsody*)
3749   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3750   lt_cv_file_magic_cmd='/usr/bin/file -L'
3751   case "$host_os" in
3752   rhapsody* | darwin1.[012])
3753     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3754     ;;
3755   *) # Darwin 1.3 on
3756     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3757     ;;
3758   esac
3759   ;;
3760
3761 freebsd*)
3762   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3763     case $host_cpu in
3764     i*86 )
3765       # Not sure whether the presence of OpenBSD here was a mistake.
3766       # Let's accept both of them until this is cleared up.
3767       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3768       lt_cv_file_magic_cmd=/usr/bin/file
3769       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3770       ;;
3771     esac
3772   else
3773     lt_cv_deplibs_check_method=pass_all
3774   fi
3775   ;;
3776
3777 gnu*)
3778   lt_cv_deplibs_check_method=pass_all
3779   ;;
3780
3781 hpux10.20*|hpux11*)
3782   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3783   lt_cv_file_magic_cmd=/usr/bin/file
3784   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3785   ;;
3786
3787 irix5* | irix6* | nonstopux*)
3788   case $host_os in
3789   irix5* | nonstopux*)
3790     # this will be overridden with pass_all, but let us keep it just in case
3791     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3792     ;;
3793   *)
3794     case $LD in
3795     *-32|*"-32 ") libmagic=32-bit;;
3796     *-n32|*"-n32 ") libmagic=N32;;
3797     *-64|*"-64 ") libmagic=64-bit;;
3798     *) libmagic=never-match;;
3799     esac
3800     # this will be overridden with pass_all, but let us keep it just in case
3801     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3802     ;;
3803   esac
3804   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3805   lt_cv_deplibs_check_method=pass_all
3806   ;;
3807
3808 # This must be Linux ELF.
3809 linux-gnu*)
3810   case $host_cpu in
3811   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3812     lt_cv_deplibs_check_method=pass_all ;;
3813   *)
3814     # glibc up to 2.1.1 does not perform some relocations on ARM
3815     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3816   esac
3817   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3818   ;;
3819
3820 netbsd*)
3821   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3822     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3823   else
3824     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3825   fi
3826   ;;
3827
3828 newos6*)
3829   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3830   lt_cv_file_magic_cmd=/usr/bin/file
3831   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3832   ;;
3833
3834 openbsd*)
3835   lt_cv_file_magic_cmd=/usr/bin/file
3836   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3837   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3838     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3839   else
3840     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3841   fi
3842   ;;
3843
3844 openedition*)
3845   lt_cv_deplibs_check_method=pass_all
3846   ;;
3847
3848 osf3* | osf4* | osf5*)
3849   # this will be overridden with pass_all, but let us keep it just in case
3850   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3851   lt_cv_file_magic_test_file=/shlib/libc.so
3852   lt_cv_deplibs_check_method=pass_all
3853   ;;
3854
3855 sco3.2v5*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 solaris*)
3860   lt_cv_deplibs_check_method=pass_all
3861   lt_cv_file_magic_test_file=/lib/libc.so
3862   ;;
3863
3864 sysv5uw[78]* | sysv4*uw2*)
3865   lt_cv_deplibs_check_method=pass_all
3866   ;;
3867
3868 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3869   case $host_vendor in
3870   motorola)
3871     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]'
3872     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3873     ;;
3874   ncr)
3875     lt_cv_deplibs_check_method=pass_all
3876     ;;
3877   sequent)
3878     lt_cv_file_magic_cmd='/bin/file'
3879     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3880     ;;
3881   sni)
3882     lt_cv_file_magic_cmd='/bin/file'
3883     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3884     lt_cv_file_magic_test_file=/lib/libc.so
3885     ;;
3886   siemens)
3887     lt_cv_deplibs_check_method=pass_all
3888     ;;
3889   esac
3890   ;;
3891 esac
3892
3893 fi
3894
3895 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3896 file_magic_cmd=$lt_cv_file_magic_cmd
3897 deplibs_check_method=$lt_cv_deplibs_check_method
3898
3899 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3900 echo "configure:3901: checking for object suffix" >&5
3901 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   rm -f conftest*
3905 echo 'int i = 1;' > conftest.$ac_ext
3906 if { (eval echo configure:3907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3907   for ac_file in conftest.*; do
3908     case $ac_file in
3909     *.c) ;;
3910     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3911     esac
3912   done
3913 else
3914   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3915 fi
3916 rm -f conftest*
3917 fi
3918
3919 echo "$ac_t""$ac_cv_objext" 1>&6
3920 OBJEXT=$ac_cv_objext
3921 ac_objext=$ac_cv_objext
3922
3923
3924
3925
3926 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3927 echo "configure:3928: checking for executable suffix" >&5
3928 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3929   echo $ac_n "(cached) $ac_c" 1>&6
3930 else
3931   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3932   ac_cv_exeext=.exe
3933 else
3934   rm -f conftest*
3935   echo 'int main () { return 0; }' > conftest.$ac_ext
3936   ac_cv_exeext=
3937   if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3938     for file in conftest.*; do
3939       case $file in
3940       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3941       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3942       esac
3943     done
3944   else
3945     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3946   fi
3947   rm -f conftest*
3948   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3949 fi
3950 fi
3951
3952 EXEEXT=""
3953 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3954 echo "$ac_t""${ac_cv_exeext}" 1>&6
3955 ac_exeext=$EXEEXT
3956
3957 if test $host != $build; then
3958   ac_tool_prefix=${host_alias}-
3959 else
3960   ac_tool_prefix=
3961 fi
3962
3963
3964
3965
3966 # Check for command to grab the raw symbol name followed by C symbol from nm.
3967 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3968 echo "configure:3969: checking command to parse $NM output" >&5
3969 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3970   echo $ac_n "(cached) $ac_c" 1>&6
3971 else
3972   
3973 # These are sane defaults that work on at least a few old systems.
3974 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3975
3976 # Character class describing NM global symbol codes.
3977 symcode='[BCDEGRST]'
3978
3979 # Regexp to match symbols that can be accessed directly from C.
3980 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3981
3982 # Transform the above into a raw symbol and a C symbol.
3983 symxfrm='\1 \2\3 \3'
3984
3985 # Transform an extracted symbol line into a proper C declaration
3986 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3987
3988 # Transform an extracted symbol line into symbol name and symbol address
3989 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'"
3990
3991 # Define system-specific variables.
3992 case $host_os in
3993 aix*)
3994   symcode='[BCDT]'
3995   ;;
3996 cygwin* | mingw* | pw32*)
3997   symcode='[ABCDGISTW]'
3998   ;;
3999 hpux*) # Its linker distinguishes data from code symbols
4000   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4001   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'"
4002   ;;
4003 irix* | nonstopux*)
4004   symcode='[BCDEGRST]'
4005   ;;
4006 osf*)
4007   symcode='[BCDEGQRST]'
4008   ;;
4009 solaris* | sysv5*)
4010   symcode='[BDT]'
4011   ;;
4012 sysv4)
4013   symcode='[DFNSTU]'
4014   ;;
4015 esac
4016
4017 # Handle CRLF in mingw tool chain
4018 opt_cr=
4019 case $host_os in
4020 mingw*)
4021   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4022   ;;
4023 esac
4024
4025 # If we're using GNU nm, then use its standard symbol codes.
4026 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4027   symcode='[ABCDGISTW]'
4028 fi
4029
4030 # Try without a prefix undercore, then with it.
4031 for ac_symprfx in "" "_"; do
4032
4033   # Write the raw and C identifiers.
4034 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4035
4036   # Check to see that the pipe works correctly.
4037   pipe_works=no
4038   rm -f conftest*
4039   cat > conftest.$ac_ext <<EOF
4040 #ifdef __cplusplus
4041 extern "C" {
4042 #endif
4043 char nm_test_var;
4044 void nm_test_func(){}
4045 #ifdef __cplusplus
4046 }
4047 #endif
4048 int main(){nm_test_var='a';nm_test_func();return(0);}
4049 EOF
4050
4051   if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4052     # Now try to grab the symbols.
4053     nlist=conftest.nm
4054     if { (eval echo configure:4055: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
4055       # Try sorting and uniquifying the output.
4056       if sort "$nlist" | uniq > "$nlist"T; then
4057         mv -f "$nlist"T "$nlist"
4058       else
4059         rm -f "$nlist"T
4060       fi
4061
4062       # Make sure that we snagged all the symbols we need.
4063       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4064         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4065           cat <<EOF > conftest.$ac_ext
4066 #ifdef __cplusplus
4067 extern "C" {
4068 #endif
4069
4070 EOF
4071           # Now generate the symbol file.
4072           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4073
4074           cat <<EOF >> conftest.$ac_ext
4075 #if defined (__STDC__) && __STDC__
4076 # define lt_ptr void *
4077 #else
4078 # define lt_ptr char *
4079 # define const
4080 #endif
4081
4082 /* The mapping between symbol names and symbols. */
4083 const struct {
4084   const char *name;
4085   lt_ptr address;
4086 }
4087 lt_preloaded_symbols[] =
4088 {
4089 EOF
4090           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4091           cat <<\EOF >> conftest.$ac_ext
4092   {0, (lt_ptr) 0}
4093 };
4094
4095 #ifdef __cplusplus
4096 }
4097 #endif
4098 EOF
4099           # Now try linking the two files.
4100           mv conftest.$ac_objext conftstm.$ac_objext
4101           save_LIBS="$LIBS"
4102           save_CFLAGS="$CFLAGS"
4103           LIBS="conftstm.$ac_objext"
4104           CFLAGS="$CFLAGS$no_builtin_flag"
4105           if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4106             pipe_works=yes
4107           fi
4108           LIBS="$save_LIBS"
4109           CFLAGS="$save_CFLAGS"
4110         else
4111           echo "cannot find nm_test_func in $nlist" >&5
4112         fi
4113       else
4114         echo "cannot find nm_test_var in $nlist" >&5
4115       fi
4116     else
4117       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4118     fi
4119   else
4120     echo "$progname: failed program was:" >&5
4121     cat conftest.$ac_ext >&5
4122   fi
4123   rm -f conftest* conftst*
4124
4125   # Do not use the global_symbol_pipe unless it works.
4126   if test "$pipe_works" = yes; then
4127     break
4128   else
4129     lt_cv_sys_global_symbol_pipe=
4130   fi
4131 done
4132
4133 fi
4134
4135 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4136 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4137   global_symbol_to_cdecl=
4138   global_symbol_to_c_name_address=
4139 else
4140   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4141   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4142 fi
4143 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4144 then
4145   echo "$ac_t""failed" 1>&6
4146 else
4147   echo "$ac_t""ok" 1>&6
4148 fi
4149
4150 for ac_hdr in dlfcn.h
4151 do
4152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4154 echo "configure:4155: checking for $ac_hdr" >&5
4155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4156   echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158   cat > conftest.$ac_ext <<EOF
4159 #line 4160 "configure"
4160 #include "confdefs.h"
4161 #include <$ac_hdr>
4162 EOF
4163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4164 { (eval echo configure:4165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4166 if test -z "$ac_err"; then
4167   rm -rf conftest*
4168   eval "ac_cv_header_$ac_safe=yes"
4169 else
4170   echo "$ac_err" >&5
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   eval "ac_cv_header_$ac_safe=no"
4175 fi
4176 rm -f conftest*
4177 fi
4178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4179   echo "$ac_t""yes" 1>&6
4180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4181   cat >> confdefs.h <<EOF
4182 #define $ac_tr_hdr 1
4183 EOF
4184  
4185 else
4186   echo "$ac_t""no" 1>&6
4187 fi
4188 done
4189
4190
4191
4192
4193
4194
4195 # Only perform the check for file, if the check method requires it
4196 case $deplibs_check_method in
4197 file_magic*)
4198   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4199     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4200 echo "configure:4201: checking for ${ac_tool_prefix}file" >&5
4201 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4202   echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204   case $MAGIC_CMD in
4205   /*)
4206   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4207   ;;
4208   ?:/*)
4209   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4210   ;;
4211   *)
4212   ac_save_MAGIC_CMD="$MAGIC_CMD"
4213   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4214   ac_dummy="/usr/bin:$PATH"
4215   for ac_dir in $ac_dummy; do
4216     test -z "$ac_dir" && ac_dir=.
4217     if test -f $ac_dir/${ac_tool_prefix}file; then
4218       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4219       if test -n "$file_magic_test_file"; then
4220         case $deplibs_check_method in
4221         "file_magic "*)
4222           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4223           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4224           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4225             egrep "$file_magic_regex" > /dev/null; then
4226             :
4227           else
4228             cat <<EOF 1>&2
4229
4230 *** Warning: the command libtool uses to detect shared libraries,
4231 *** $file_magic_cmd, produces output that libtool cannot recognize.
4232 *** The result is that libtool may fail to recognize shared libraries
4233 *** as such.  This will affect the creation of libtool libraries that
4234 *** depend on shared libraries, but programs linked with such libtool
4235 *** libraries will work regardless of this problem.  Nevertheless, you
4236 *** may want to report the problem to your system manager and/or to
4237 *** bug-libtool@gnu.org
4238
4239 EOF
4240           fi ;;
4241         esac
4242       fi
4243       break
4244     fi
4245   done
4246   IFS="$ac_save_ifs"
4247   MAGIC_CMD="$ac_save_MAGIC_CMD"
4248   ;;
4249 esac
4250 fi
4251
4252 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4253 if test -n "$MAGIC_CMD"; then
4254   echo "$ac_t""$MAGIC_CMD" 1>&6
4255 else
4256   echo "$ac_t""no" 1>&6
4257 fi
4258
4259 if test -z "$lt_cv_path_MAGIC_CMD"; then
4260   if test -n "$ac_tool_prefix"; then
4261     echo $ac_n "checking for file""... $ac_c" 1>&6
4262 echo "configure:4263: checking for file" >&5
4263 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4264   echo $ac_n "(cached) $ac_c" 1>&6
4265 else
4266   case $MAGIC_CMD in
4267   /*)
4268   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4269   ;;
4270   ?:/*)
4271   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4272   ;;
4273   *)
4274   ac_save_MAGIC_CMD="$MAGIC_CMD"
4275   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4276   ac_dummy="/usr/bin:$PATH"
4277   for ac_dir in $ac_dummy; do
4278     test -z "$ac_dir" && ac_dir=.
4279     if test -f $ac_dir/file; then
4280       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4281       if test -n "$file_magic_test_file"; then
4282         case $deplibs_check_method in
4283         "file_magic "*)
4284           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4285           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4286           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4287             egrep "$file_magic_regex" > /dev/null; then
4288             :
4289           else
4290             cat <<EOF 1>&2
4291
4292 *** Warning: the command libtool uses to detect shared libraries,
4293 *** $file_magic_cmd, produces output that libtool cannot recognize.
4294 *** The result is that libtool may fail to recognize shared libraries
4295 *** as such.  This will affect the creation of libtool libraries that
4296 *** depend on shared libraries, but programs linked with such libtool
4297 *** libraries will work regardless of this problem.  Nevertheless, you
4298 *** may want to report the problem to your system manager and/or to
4299 *** bug-libtool@gnu.org
4300
4301 EOF
4302           fi ;;
4303         esac
4304       fi
4305       break
4306     fi
4307   done
4308   IFS="$ac_save_ifs"
4309   MAGIC_CMD="$ac_save_MAGIC_CMD"
4310   ;;
4311 esac
4312 fi
4313
4314 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4315 if test -n "$MAGIC_CMD"; then
4316   echo "$ac_t""$MAGIC_CMD" 1>&6
4317 else
4318   echo "$ac_t""no" 1>&6
4319 fi
4320
4321   else
4322     MAGIC_CMD=:
4323   fi
4324 fi
4325
4326   fi
4327   ;;
4328 esac
4329
4330 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4331 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4333 echo "configure:4334: checking for $ac_word" >&5
4334 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4335   echo $ac_n "(cached) $ac_c" 1>&6
4336 else
4337   if test -n "$RANLIB"; then
4338   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4339 else
4340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4341   ac_dummy="$PATH"
4342   for ac_dir in $ac_dummy; do
4343     test -z "$ac_dir" && ac_dir=.
4344     if test -f $ac_dir/$ac_word; then
4345       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4346       break
4347     fi
4348   done
4349   IFS="$ac_save_ifs"
4350 fi
4351 fi
4352 RANLIB="$ac_cv_prog_RANLIB"
4353 if test -n "$RANLIB"; then
4354   echo "$ac_t""$RANLIB" 1>&6
4355 else
4356   echo "$ac_t""no" 1>&6
4357 fi
4358
4359
4360 if test -z "$ac_cv_prog_RANLIB"; then
4361 if test -n "$ac_tool_prefix"; then
4362   # Extract the first word of "ranlib", so it can be a program name with args.
4363 set dummy ranlib; ac_word=$2
4364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4365 echo "configure:4366: checking for $ac_word" >&5
4366 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4367   echo $ac_n "(cached) $ac_c" 1>&6
4368 else
4369   if test -n "$RANLIB"; then
4370   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4371 else
4372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4373   ac_dummy="$PATH"
4374   for ac_dir in $ac_dummy; do
4375     test -z "$ac_dir" && ac_dir=.
4376     if test -f $ac_dir/$ac_word; then
4377       ac_cv_prog_RANLIB="ranlib"
4378       break
4379     fi
4380   done
4381   IFS="$ac_save_ifs"
4382   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4383 fi
4384 fi
4385 RANLIB="$ac_cv_prog_RANLIB"
4386 if test -n "$RANLIB"; then
4387   echo "$ac_t""$RANLIB" 1>&6
4388 else
4389   echo "$ac_t""no" 1>&6
4390 fi
4391
4392 else
4393   RANLIB=":"
4394 fi
4395 fi
4396
4397 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4398 set dummy ${ac_tool_prefix}strip; ac_word=$2
4399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4400 echo "configure:4401: checking for $ac_word" >&5
4401 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   if test -n "$STRIP"; then
4405   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4406 else
4407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4408   ac_dummy="$PATH"
4409   for ac_dir in $ac_dummy; do
4410     test -z "$ac_dir" && ac_dir=.
4411     if test -f $ac_dir/$ac_word; then
4412       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4413       break
4414     fi
4415   done
4416   IFS="$ac_save_ifs"
4417 fi
4418 fi
4419 STRIP="$ac_cv_prog_STRIP"
4420 if test -n "$STRIP"; then
4421   echo "$ac_t""$STRIP" 1>&6
4422 else
4423   echo "$ac_t""no" 1>&6
4424 fi
4425
4426
4427 if test -z "$ac_cv_prog_STRIP"; then
4428 if test -n "$ac_tool_prefix"; then
4429   # Extract the first word of "strip", so it can be a program name with args.
4430 set dummy strip; ac_word=$2
4431 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4432 echo "configure:4433: checking for $ac_word" >&5
4433 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4434   echo $ac_n "(cached) $ac_c" 1>&6
4435 else
4436   if test -n "$STRIP"; then
4437   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4438 else
4439   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4440   ac_dummy="$PATH"
4441   for ac_dir in $ac_dummy; do
4442     test -z "$ac_dir" && ac_dir=.
4443     if test -f $ac_dir/$ac_word; then
4444       ac_cv_prog_STRIP="strip"
4445       break
4446     fi
4447   done
4448   IFS="$ac_save_ifs"
4449   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4450 fi
4451 fi
4452 STRIP="$ac_cv_prog_STRIP"
4453 if test -n "$STRIP"; then
4454   echo "$ac_t""$STRIP" 1>&6
4455 else
4456   echo "$ac_t""no" 1>&6
4457 fi
4458
4459 else
4460   STRIP=":"
4461 fi
4462 fi
4463
4464
4465 enable_dlopen=yes
4466 enable_win32_dll=yes
4467
4468 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4469 if test "${enable_libtool_lock+set}" = set; then
4470   enableval="$enable_libtool_lock"
4471   :
4472 fi
4473
4474 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4475
4476 # Some flags need to be propagated to the compiler or linker for good
4477 # libtool support.
4478 case $host in
4479 *-*-irix6*)
4480   # Find out which ABI we are using.
4481   echo '#line 4482 "configure"' > conftest.$ac_ext
4482   if { (eval echo configure:4483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4483     case `/usr/bin/file conftest.$ac_objext` in
4484     *32-bit*)
4485       LD="${LD-ld} -32"
4486       ;;
4487     *N32*)
4488       LD="${LD-ld} -n32"
4489       ;;
4490     *64-bit*)
4491       LD="${LD-ld} -64"
4492       ;;
4493     esac
4494   fi
4495   rm -rf conftest*
4496   ;;
4497
4498 *-*-sco3.2v5*)
4499   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4500   SAVE_CFLAGS="$CFLAGS"
4501   CFLAGS="$CFLAGS -belf"
4502   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4503 echo "configure:4504: checking whether the C compiler needs -belf" >&5
4504 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4505   echo $ac_n "(cached) $ac_c" 1>&6
4506 else
4507   
4508      ac_ext=c
4509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4510 ac_cpp='$CPP $CPPFLAGS'
4511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4513 cross_compiling=$ac_cv_prog_cc_cross
4514
4515      cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518
4519 int main() {
4520
4521 ; return 0; }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4524   rm -rf conftest*
4525   lt_cv_cc_needs_belf=yes
4526 else
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -rf conftest*
4530   lt_cv_cc_needs_belf=no
4531 fi
4532 rm -f conftest*
4533      ac_ext=c
4534 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4535 ac_cpp='$CPP $CPPFLAGS'
4536 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4537 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4538 cross_compiling=$ac_cv_prog_cc_cross
4539
4540 fi
4541
4542 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4543   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4544     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4545     CFLAGS="$SAVE_CFLAGS"
4546   fi
4547   ;;
4548
4549 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4550   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4551 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4552 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4553 echo "configure:4554: checking for $ac_word" >&5
4554 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4555   echo $ac_n "(cached) $ac_c" 1>&6
4556 else
4557   if test -n "$DLLTOOL"; then
4558   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4559 else
4560   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4561   ac_dummy="$PATH"
4562   for ac_dir in $ac_dummy; do
4563     test -z "$ac_dir" && ac_dir=.
4564     if test -f $ac_dir/$ac_word; then
4565       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4566       break
4567     fi
4568   done
4569   IFS="$ac_save_ifs"
4570 fi
4571 fi
4572 DLLTOOL="$ac_cv_prog_DLLTOOL"
4573 if test -n "$DLLTOOL"; then
4574   echo "$ac_t""$DLLTOOL" 1>&6
4575 else
4576   echo "$ac_t""no" 1>&6
4577 fi
4578
4579
4580 if test -z "$ac_cv_prog_DLLTOOL"; then
4581 if test -n "$ac_tool_prefix"; then
4582   # Extract the first word of "dlltool", so it can be a program name with args.
4583 set dummy dlltool; ac_word=$2
4584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4585 echo "configure:4586: checking for $ac_word" >&5
4586 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4587   echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589   if test -n "$DLLTOOL"; then
4590   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4591 else
4592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4593   ac_dummy="$PATH"
4594   for ac_dir in $ac_dummy; do
4595     test -z "$ac_dir" && ac_dir=.
4596     if test -f $ac_dir/$ac_word; then
4597       ac_cv_prog_DLLTOOL="dlltool"
4598       break
4599     fi
4600   done
4601   IFS="$ac_save_ifs"
4602   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4603 fi
4604 fi
4605 DLLTOOL="$ac_cv_prog_DLLTOOL"
4606 if test -n "$DLLTOOL"; then
4607   echo "$ac_t""$DLLTOOL" 1>&6
4608 else
4609   echo "$ac_t""no" 1>&6
4610 fi
4611
4612 else
4613   DLLTOOL="false"
4614 fi
4615 fi
4616
4617   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4618 set dummy ${ac_tool_prefix}as; ac_word=$2
4619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_word" >&5
4621 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   if test -n "$AS"; then
4625   ac_cv_prog_AS="$AS" # Let the user override the test.
4626 else
4627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4628   ac_dummy="$PATH"
4629   for ac_dir in $ac_dummy; do
4630     test -z "$ac_dir" && ac_dir=.
4631     if test -f $ac_dir/$ac_word; then
4632       ac_cv_prog_AS="${ac_tool_prefix}as"
4633       break
4634     fi
4635   done
4636   IFS="$ac_save_ifs"
4637 fi
4638 fi
4639 AS="$ac_cv_prog_AS"
4640 if test -n "$AS"; then
4641   echo "$ac_t""$AS" 1>&6
4642 else
4643   echo "$ac_t""no" 1>&6
4644 fi
4645
4646
4647 if test -z "$ac_cv_prog_AS"; then
4648 if test -n "$ac_tool_prefix"; then
4649   # Extract the first word of "as", so it can be a program name with args.
4650 set dummy as; ac_word=$2
4651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $ac_word" >&5
4653 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   if test -n "$AS"; then
4657   ac_cv_prog_AS="$AS" # Let the user override the test.
4658 else
4659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4660   ac_dummy="$PATH"
4661   for ac_dir in $ac_dummy; do
4662     test -z "$ac_dir" && ac_dir=.
4663     if test -f $ac_dir/$ac_word; then
4664       ac_cv_prog_AS="as"
4665       break
4666     fi
4667   done
4668   IFS="$ac_save_ifs"
4669   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4670 fi
4671 fi
4672 AS="$ac_cv_prog_AS"
4673 if test -n "$AS"; then
4674   echo "$ac_t""$AS" 1>&6
4675 else
4676   echo "$ac_t""no" 1>&6
4677 fi
4678
4679 else
4680   AS="false"
4681 fi
4682 fi
4683
4684   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4685 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_word" >&5
4688 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   if test -n "$OBJDUMP"; then
4692   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4693 else
4694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4695   ac_dummy="$PATH"
4696   for ac_dir in $ac_dummy; do
4697     test -z "$ac_dir" && ac_dir=.
4698     if test -f $ac_dir/$ac_word; then
4699       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4700       break
4701     fi
4702   done
4703   IFS="$ac_save_ifs"
4704 fi
4705 fi
4706 OBJDUMP="$ac_cv_prog_OBJDUMP"
4707 if test -n "$OBJDUMP"; then
4708   echo "$ac_t""$OBJDUMP" 1>&6
4709 else
4710   echo "$ac_t""no" 1>&6
4711 fi
4712
4713
4714 if test -z "$ac_cv_prog_OBJDUMP"; then
4715 if test -n "$ac_tool_prefix"; then
4716   # Extract the first word of "objdump", so it can be a program name with args.
4717 set dummy objdump; ac_word=$2
4718 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4719 echo "configure:4720: checking for $ac_word" >&5
4720 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   if test -n "$OBJDUMP"; then
4724   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4725 else
4726   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4727   ac_dummy="$PATH"
4728   for ac_dir in $ac_dummy; do
4729     test -z "$ac_dir" && ac_dir=.
4730     if test -f $ac_dir/$ac_word; then
4731       ac_cv_prog_OBJDUMP="objdump"
4732       break
4733     fi
4734   done
4735   IFS="$ac_save_ifs"
4736   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4737 fi
4738 fi
4739 OBJDUMP="$ac_cv_prog_OBJDUMP"
4740 if test -n "$OBJDUMP"; then
4741   echo "$ac_t""$OBJDUMP" 1>&6
4742 else
4743   echo "$ac_t""no" 1>&6
4744 fi
4745
4746 else
4747   OBJDUMP="false"
4748 fi
4749 fi
4750
4751
4752   # recent cygwin and mingw systems supply a stub DllMain which the user
4753   # can override, but on older systems we have to supply one
4754   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4755 echo "configure:4756: checking if libtool should supply DllMain function" >&5
4756 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4757   echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759   cat > conftest.$ac_ext <<EOF
4760 #line 4761 "configure"
4761 #include "confdefs.h"
4762
4763 int main() {
4764 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4765       DllMain (0, 0, 0);
4766 ; return 0; }
4767 EOF
4768 if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4769   rm -rf conftest*
4770   lt_cv_need_dllmain=no
4771 else
4772   echo "configure: failed program was:" >&5
4773   cat conftest.$ac_ext >&5
4774   rm -rf conftest*
4775   lt_cv_need_dllmain=yes
4776 fi
4777 rm -f conftest*
4778 fi
4779
4780 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4781
4782   case $host/$CC in
4783   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4784     # old mingw systems require "-dll" to link a DLL, while more recent ones
4785     # require "-mdll"
4786     SAVE_CFLAGS="$CFLAGS"
4787     CFLAGS="$CFLAGS -mdll"
4788     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4789 echo "configure:4790: checking how to link DLLs" >&5
4790 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4791   echo $ac_n "(cached) $ac_c" 1>&6
4792 else
4793   cat > conftest.$ac_ext <<EOF
4794 #line 4795 "configure"
4795 #include "confdefs.h"
4796
4797 int main() {
4798
4799 ; return 0; }
4800 EOF
4801 if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4802   rm -rf conftest*
4803   lt_cv_cc_dll_switch=-mdll
4804 else
4805   echo "configure: failed program was:" >&5
4806   cat conftest.$ac_ext >&5
4807   rm -rf conftest*
4808   lt_cv_cc_dll_switch=-dll
4809 fi
4810 rm -f conftest*
4811 fi
4812
4813 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4814     CFLAGS="$SAVE_CFLAGS" ;;
4815   *-*-cygwin* | *-*-pw32*)
4816     # cygwin systems need to pass --dll to the linker, and not link
4817     # crt.o which will require a WinMain@16 definition.
4818     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4819   esac
4820   ;;
4821   
4822 esac
4823
4824 # Sed substitution that helps us do robust quoting.  It backslashifies
4825 # metacharacters that are still active within double-quoted strings.
4826 Xsed='sed -e s/^X//'
4827 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4828
4829 # Same as above, but do not quote variable references.
4830 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4831
4832 # Sed substitution to delay expansion of an escaped shell variable in a
4833 # double_quote_subst'ed string.
4834 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4835
4836 # Constants:
4837 rm="rm -f"
4838
4839 # Global variables:
4840 default_ofile=libtool
4841 can_build_shared=yes
4842
4843 # All known linkers require a `.a' archive for static linking (except M$VC,
4844 # which needs '.lib').
4845 libext=a
4846 ltmain="$ac_aux_dir/ltmain.sh"
4847 ofile="$default_ofile"
4848 with_gnu_ld="$lt_cv_prog_gnu_ld"
4849 need_locks="$enable_libtool_lock"
4850
4851 old_CC="$CC"
4852 old_CFLAGS="$CFLAGS"
4853
4854 # Set sane defaults for various variables
4855 test -z "$AR" && AR=ar
4856 test -z "$AR_FLAGS" && AR_FLAGS=cru
4857 test -z "$AS" && AS=as
4858 test -z "$CC" && CC=cc
4859 test -z "$DLLTOOL" && DLLTOOL=dlltool
4860 test -z "$LD" && LD=ld
4861 test -z "$LN_S" && LN_S="ln -s"
4862 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4863 test -z "$NM" && NM=nm
4864 test -z "$OBJDUMP" && OBJDUMP=objdump
4865 test -z "$RANLIB" && RANLIB=:
4866 test -z "$STRIP" && STRIP=:
4867 test -z "$ac_objext" && ac_objext=o
4868
4869 if test x"$host" != x"$build"; then
4870   ac_tool_prefix=${host_alias}-
4871 else
4872   ac_tool_prefix=
4873 fi
4874
4875 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4876 case $host_os in
4877 linux-gnu*) ;;
4878 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4879 esac
4880
4881 case $host_os in
4882 aix3*)
4883   # AIX sometimes has problems with the GCC collect2 program.  For some
4884   # reason, if we set the COLLECT_NAMES environment variable, the problems
4885   # vanish in a puff of smoke.
4886   if test "X${COLLECT_NAMES+set}" != Xset; then
4887     COLLECT_NAMES=
4888     export COLLECT_NAMES
4889   fi
4890   ;;
4891 esac
4892
4893 # Determine commands to create old-style static archives.
4894 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4895 old_postinstall_cmds='chmod 644 $oldlib'
4896 old_postuninstall_cmds=
4897
4898 if test -n "$RANLIB"; then
4899   case $host_os in
4900   openbsd*)
4901     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4902     ;;
4903   *)
4904     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4905     ;;
4906   esac
4907   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4908 fi
4909
4910 # Allow CC to be a program name with arguments.
4911 set dummy $CC
4912 compiler="$2"
4913
4914 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4915 echo "configure:4916: checking for objdir" >&5
4916 rm -f .libs 2>/dev/null
4917 mkdir .libs 2>/dev/null
4918 if test -d .libs; then
4919   objdir=.libs
4920 else
4921   # MS-DOS does not allow filenames that begin with a dot.
4922   objdir=_libs
4923 fi
4924 rmdir .libs 2>/dev/null
4925 echo "$ac_t""$objdir" 1>&6
4926
4927
4928 # Check whether --with-pic or --without-pic was given.
4929 if test "${with_pic+set}" = set; then
4930   withval="$with_pic"
4931   pic_mode="$withval"
4932 else
4933   pic_mode=default
4934 fi
4935
4936 test -z "$pic_mode" && pic_mode=default
4937
4938 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4939 # in isolation, and that seeing it set (from the cache) indicates that
4940 # the associated values are set (in the cache) correctly too.
4941 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4942 echo "configure:4943: checking for $compiler option to produce PIC" >&5
4943 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4944   echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946    lt_cv_prog_cc_pic=
4947   lt_cv_prog_cc_shlib=
4948   lt_cv_prog_cc_wl=
4949   lt_cv_prog_cc_static=
4950   lt_cv_prog_cc_no_builtin=
4951   lt_cv_prog_cc_can_build_shared=$can_build_shared
4952
4953   if test "$GCC" = yes; then
4954     lt_cv_prog_cc_wl='-Wl,'
4955     lt_cv_prog_cc_static='-static'
4956
4957     case $host_os in
4958     aix*)
4959       # Below there is a dirty hack to force normal static linking with -ldl
4960       # The problem is because libdl dynamically linked with both libc and
4961       # libC (AIX C++ library), which obviously doesn't included in libraries
4962       # list by gcc. This cause undefined symbols with -static flags.
4963       # This hack allows C programs to be linked with "-static -ldl", but
4964       # not sure about C++ programs.
4965       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4966       ;;
4967     amigaos*)
4968       # FIXME: we need at least 68020 code to build shared libraries, but
4969       # adding the `-m68020' flag to GCC prevents building anything better,
4970       # like `-m68040'.
4971       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4972       ;;
4973     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4974       # PIC is the default for these OSes.
4975       ;;
4976     darwin* | rhapsody*)
4977       # PIC is the default on this platform
4978       # Common symbols not allowed in MH_DYLIB files
4979       lt_cv_prog_cc_pic='-fno-common'
4980       ;;
4981     cygwin* | mingw* | pw32* | os2*)
4982       # This hack is so that the source file can tell whether it is being
4983       # built for inclusion in a dll (and should export symbols for example).
4984       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4985       ;;
4986     sysv4*MP*)
4987       if test -d /usr/nec; then
4988          lt_cv_prog_cc_pic=-Kconform_pic
4989       fi
4990       ;;
4991     *)
4992       lt_cv_prog_cc_pic='-fPIC'
4993       ;;
4994     esac
4995   else
4996     # PORTME Check for PIC flags for the system compiler.
4997     case $host_os in
4998     aix3* | aix4* | aix5*)
4999       lt_cv_prog_cc_wl='-Wl,'
5000       # All AIX code is PIC.
5001       if test "$host_cpu" = ia64; then
5002         # AIX 5 now supports IA64 processor
5003         lt_cv_prog_cc_static='-Bstatic'
5004       else
5005         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5006       fi
5007       ;;
5008
5009     hpux9* | hpux10* | hpux11*)
5010       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5011       lt_cv_prog_cc_wl='-Wl,'
5012       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5013       lt_cv_prog_cc_pic='+Z'
5014       ;;
5015
5016     irix5* | irix6* | nonstopux*)
5017       lt_cv_prog_cc_wl='-Wl,'
5018       lt_cv_prog_cc_static='-non_shared'
5019       # PIC (with -KPIC) is the default.
5020       ;;
5021
5022     cygwin* | mingw* | pw32* | os2*)
5023       # This hack is so that the source file can tell whether it is being
5024       # built for inclusion in a dll (and should export symbols for example).
5025       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5026       ;;
5027
5028     newsos6)
5029       lt_cv_prog_cc_pic='-KPIC'
5030       lt_cv_prog_cc_static='-Bstatic'
5031       ;;
5032     
5033     openedition)
5034       # XPLINK code is PIC by default
5035       ;;
5036
5037     osf3* | osf4* | osf5*)
5038       # All OSF/1 code is PIC.
5039       lt_cv_prog_cc_wl='-Wl,'
5040       lt_cv_prog_cc_static='-non_shared'
5041       ;;
5042
5043     sco3.2v5*)
5044       lt_cv_prog_cc_pic='-Kpic'
5045       lt_cv_prog_cc_static='-dn'
5046       lt_cv_prog_cc_shlib='-belf'
5047       ;;
5048
5049     solaris*)
5050       lt_cv_prog_cc_pic='-KPIC'
5051       lt_cv_prog_cc_static='-Bstatic'
5052       lt_cv_prog_cc_wl='-Wl,'
5053       ;;
5054
5055     sunos4*)
5056       lt_cv_prog_cc_pic='-PIC'
5057       lt_cv_prog_cc_static='-Bstatic'
5058       lt_cv_prog_cc_wl='-Qoption ld '
5059       ;;
5060
5061     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5062       lt_cv_prog_cc_pic='-KPIC'
5063       lt_cv_prog_cc_static='-Bstatic'
5064       lt_cv_prog_cc_wl='-Wl,'
5065       ;;
5066
5067     uts4*)
5068       lt_cv_prog_cc_pic='-pic'
5069       lt_cv_prog_cc_static='-Bstatic'
5070       ;;
5071
5072     sysv4*MP*)
5073       if test -d /usr/nec ;then
5074         lt_cv_prog_cc_pic='-Kconform_pic'
5075         lt_cv_prog_cc_static='-Bstatic'
5076       fi
5077       ;;
5078
5079     *)
5080       lt_cv_prog_cc_can_build_shared=no
5081       ;;
5082     esac
5083   fi
5084
5085 fi
5086
5087 if test -z "$lt_cv_prog_cc_pic"; then
5088   echo "$ac_t""none" 1>&6
5089 else
5090   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5091
5092   # Check to make sure the pic_flag actually works.
5093   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5094 echo "configure:5095: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5095   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5096   echo $ac_n "(cached) $ac_c" 1>&6
5097 else
5098       save_CFLAGS="$CFLAGS"
5099     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5100     cat > conftest.$ac_ext <<EOF
5101 #line 5102 "configure"
5102 #include "confdefs.h"
5103
5104 int main() {
5105
5106 ; return 0; }
5107 EOF
5108 if { (eval echo configure:5109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5109   rm -rf conftest*
5110         case $host_os in
5111       hpux9* | hpux10* | hpux11*)
5112         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5113         # they create non-PIC objects.  So, if there were any warnings, we
5114         # assume that PIC is not supported.
5115         if test -s conftest.err; then
5116           lt_cv_prog_cc_pic_works=no
5117         else
5118           lt_cv_prog_cc_pic_works=yes
5119         fi
5120         ;;
5121       *)
5122         lt_cv_prog_cc_pic_works=yes
5123         ;;
5124       esac
5125     
5126 else
5127   echo "configure: failed program was:" >&5
5128   cat conftest.$ac_ext >&5
5129   rm -rf conftest*
5130         lt_cv_prog_cc_pic_works=no
5131     
5132 fi
5133 rm -f conftest*
5134     CFLAGS="$save_CFLAGS"
5135   
5136 fi
5137
5138
5139   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5140     lt_cv_prog_cc_pic=
5141     lt_cv_prog_cc_can_build_shared=no
5142   else
5143     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5144   fi
5145
5146   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5147 fi
5148
5149 # Check for any special shared library compilation flags.
5150 if test -n "$lt_cv_prog_cc_shlib"; then
5151   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5152   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5153   else
5154    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5155     lt_cv_prog_cc_can_build_shared=no
5156   fi
5157 fi
5158
5159 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5160 echo "configure:5161: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5161 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5162   echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164     lt_cv_prog_cc_static_works=no
5165   save_LDFLAGS="$LDFLAGS"
5166   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5167   cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170
5171 int main() {
5172
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5176   rm -rf conftest*
5177   lt_cv_prog_cc_static_works=yes
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181 fi
5182 rm -f conftest*
5183   LDFLAGS="$save_LDFLAGS"
5184
5185 fi
5186
5187
5188 # Belt *and* braces to stop my trousers falling down:
5189 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5190 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5191
5192 pic_flag="$lt_cv_prog_cc_pic"
5193 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5194 wl="$lt_cv_prog_cc_wl"
5195 link_static_flag="$lt_cv_prog_cc_static"
5196 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5197 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5198
5199
5200 # Check to see if options -o and -c are simultaneously supported by compiler
5201 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5202 echo "configure:5203: checking if $compiler supports -c -o file.$ac_objext" >&5
5203 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5204   echo $ac_n "(cached) $ac_c" 1>&6
5205 else
5206   
5207 $rm -r conftest 2>/dev/null
5208 mkdir conftest
5209 cd conftest
5210 echo "int some_variable = 0;" > conftest.$ac_ext
5211 mkdir out
5212 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5213 # that will create temporary files in the current directory regardless of
5214 # the output directory.  Thus, making CWD read-only will cause this test
5215 # to fail, enabling locking or at least warning the user not to do parallel
5216 # builds.
5217 chmod -w .
5218 save_CFLAGS="$CFLAGS"
5219 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5220 compiler_c_o=no
5221 if { (eval echo configure:5222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5222   # The compiler can only warn and ignore the option if not recognized
5223   # So say no if there are warnings
5224   if test -s out/conftest.err; then
5225     lt_cv_compiler_c_o=no
5226   else
5227     lt_cv_compiler_c_o=yes
5228   fi
5229 else
5230   # Append any errors to the config.log.
5231   cat out/conftest.err 1>&5
5232   lt_cv_compiler_c_o=no
5233 fi
5234 CFLAGS="$save_CFLAGS"
5235 chmod u+w .
5236 $rm conftest* out/*
5237 rmdir out
5238 cd ..
5239 rmdir conftest
5240 $rm -r conftest 2>/dev/null
5241
5242 fi
5243
5244 compiler_c_o=$lt_cv_compiler_c_o
5245 echo "$ac_t""$compiler_c_o" 1>&6
5246
5247 if test x"$compiler_c_o" = x"yes"; then
5248   # Check to see if we can write to a .lo
5249   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5250 echo "configure:5251: checking if $compiler supports -c -o file.lo" >&5
5251   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5252   echo $ac_n "(cached) $ac_c" 1>&6
5253 else
5254   
5255   lt_cv_compiler_o_lo=no
5256   save_CFLAGS="$CFLAGS"
5257   CFLAGS="$CFLAGS -c -o conftest.lo"
5258   save_objext="$ac_objext"
5259   ac_objext=lo
5260   cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263
5264 int main() {
5265 int some_variable = 0;
5266 ; return 0; }
5267 EOF
5268 if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5269   rm -rf conftest*
5270       # The compiler can only warn and ignore the option if not recognized
5271     # So say no if there are warnings
5272     if test -s conftest.err; then
5273       lt_cv_compiler_o_lo=no
5274     else
5275       lt_cv_compiler_o_lo=yes
5276     fi
5277   
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281 fi
5282 rm -f conftest*
5283   ac_objext="$save_objext"
5284   CFLAGS="$save_CFLAGS"
5285   
5286 fi
5287
5288   compiler_o_lo=$lt_cv_compiler_o_lo
5289   echo "$ac_t""$compiler_o_lo" 1>&6
5290 else
5291   compiler_o_lo=no
5292 fi
5293
5294 # Check to see if we can do hard links to lock some files if needed
5295 hard_links="nottested"
5296 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5297   # do not overwrite the value of need_locks provided by the user
5298   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5299 echo "configure:5300: checking if we can lock with hard links" >&5
5300   hard_links=yes
5301   $rm conftest*
5302   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5303   touch conftest.a
5304   ln conftest.a conftest.b 2>&5 || hard_links=no
5305   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5306   echo "$ac_t""$hard_links" 1>&6
5307   if test "$hard_links" = no; then
5308     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5309     need_locks=warn
5310   fi
5311 else
5312   need_locks=no
5313 fi
5314
5315 if test "$GCC" = yes; then
5316   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5317   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5318 echo "configure:5319: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5319   echo "int some_variable = 0;" > conftest.$ac_ext
5320   save_CFLAGS="$CFLAGS"
5321   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5322   compiler_rtti_exceptions=no
5323   cat > conftest.$ac_ext <<EOF
5324 #line 5325 "configure"
5325 #include "confdefs.h"
5326
5327 int main() {
5328 int some_variable = 0;
5329 ; return 0; }
5330 EOF
5331 if { (eval echo configure:5332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5332   rm -rf conftest*
5333       # The compiler can only warn and ignore the option if not recognized
5334     # So say no if there are warnings
5335     if test -s conftest.err; then
5336       compiler_rtti_exceptions=no
5337     else
5338       compiler_rtti_exceptions=yes
5339     fi
5340   
5341 else
5342   echo "configure: failed program was:" >&5
5343   cat conftest.$ac_ext >&5
5344 fi
5345 rm -f conftest*
5346   CFLAGS="$save_CFLAGS"
5347   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5348
5349   if test "$compiler_rtti_exceptions" = "yes"; then
5350     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5351   else
5352     no_builtin_flag=' -fno-builtin'
5353   fi
5354 fi
5355
5356 # See if the linker supports building shared libraries.
5357 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5358 echo "configure:5359: checking whether the linker ($LD) supports shared libraries" >&5
5359
5360 allow_undefined_flag=
5361 no_undefined_flag=
5362 need_lib_prefix=unknown
5363 need_version=unknown
5364 # when you set need_version to no, make sure it does not cause -set_version
5365 # flags to be left without arguments
5366 archive_cmds=
5367 archive_expsym_cmds=
5368 old_archive_from_new_cmds=
5369 old_archive_from_expsyms_cmds=
5370 export_dynamic_flag_spec=
5371 whole_archive_flag_spec=
5372 thread_safe_flag_spec=
5373 hardcode_into_libs=no
5374 hardcode_libdir_flag_spec=
5375 hardcode_libdir_separator=
5376 hardcode_direct=no
5377 hardcode_minus_L=no
5378 hardcode_shlibpath_var=unsupported
5379 runpath_var=
5380 link_all_deplibs=unknown
5381 always_export_symbols=no
5382 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5383 # include_expsyms should be a list of space-separated symbols to be *always*
5384 # included in the symbol list
5385 include_expsyms=
5386 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5387 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5388 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5389 # as well as any symbol that contains `d'.
5390 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5391 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5392 # platforms (ab)use it in PIC code, but their linkers get confused if
5393 # the symbol is explicitly referenced.  Since portable code cannot
5394 # rely on this symbol name, it's probably fine to never include it in
5395 # preloaded symbol tables.
5396 extract_expsyms_cmds=
5397
5398 case $host_os in
5399 cygwin* | mingw* | pw32*)
5400   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5401   # When not using gcc, we currently assume that we are using
5402   # Microsoft Visual C++.
5403   if test "$GCC" != yes; then
5404     with_gnu_ld=no
5405   fi
5406   ;;
5407 openbsd*)
5408   with_gnu_ld=no
5409   ;;
5410 esac
5411
5412 ld_shlibs=yes
5413 if test "$with_gnu_ld" = yes; then
5414   # If archive_cmds runs LD, not CC, wlarc should be empty
5415   wlarc='${wl}'
5416
5417   # See if GNU ld supports shared libraries.
5418   case $host_os in
5419   aix3* | aix4* | aix5*)
5420     # On AIX, the GNU linker is very broken
5421     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5422     ld_shlibs=no
5423     cat <<EOF 1>&2
5424
5425 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5426 *** to be unable to reliably create shared libraries on AIX.
5427 *** Therefore, libtool is disabling shared libraries support.  If you
5428 *** really care for shared libraries, you may want to modify your PATH
5429 *** so that a non-GNU linker is found, and then restart.
5430
5431 EOF
5432     ;;
5433
5434   amigaos*)
5435     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)'
5436     hardcode_libdir_flag_spec='-L$libdir'
5437     hardcode_minus_L=yes
5438
5439     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5440     # that the semantics of dynamic libraries on AmigaOS, at least up
5441     # to version 4, is to share data among multiple programs linked
5442     # with the same dynamic library.  Since this doesn't match the
5443     # behavior of shared libraries on other platforms, we can use
5444     # them.
5445     ld_shlibs=no
5446     ;;
5447
5448   beos*)
5449     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5450       allow_undefined_flag=unsupported
5451       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5452       # support --undefined.  This deserves some investigation.  FIXME
5453       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5454     else
5455       ld_shlibs=no
5456     fi
5457     ;;
5458
5459   cygwin* | mingw* | pw32*)
5460     # hardcode_libdir_flag_spec is actually meaningless, as there is
5461     # no search path for DLLs.
5462     hardcode_libdir_flag_spec='-L$libdir'
5463     allow_undefined_flag=unsupported
5464     always_export_symbols=yes
5465
5466     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5467       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5468       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5469       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5470       else $CC -o impgen impgen.c ; fi)~
5471       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5472
5473     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5474
5475     # cygwin and mingw dlls have different entry points and sets of symbols
5476     # to exclude.
5477     # FIXME: what about values for MSVC?
5478     dll_entry=__cygwin_dll_entry@12
5479     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5480     case $host_os in
5481     mingw*)
5482       # mingw values
5483       dll_entry=_DllMainCRTStartup@12
5484       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5485       ;;
5486     esac
5487
5488     # mingw and cygwin differ, and it's simplest to just exclude the union
5489     # of the two symbol sets.
5490     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5491
5492     # recent cygwin and mingw systems supply a stub DllMain which the user
5493     # can override, but on older systems we have to supply one (in ltdll.c)
5494     if test "x$lt_cv_need_dllmain" = "xyes"; then
5495       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5496       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~
5497         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5498     else
5499       ltdll_obj=
5500       ltdll_cmds=
5501     fi
5502
5503     # Extract the symbol export list from an `--export-all' def file,
5504     # then regenerate the def file from the symbol export list, so that
5505     # the compiled dll only exports the symbol export list.
5506     # Be careful not to strip the DATA tag left be newer dlltools.
5507     export_symbols_cmds="$ltdll_cmds"'
5508       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5509       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5510
5511     # If the export-symbols file already is a .def file (1st line
5512     # is EXPORTS), use it as is.
5513     # If DATA tags from a recent dlltool are present, honour them!
5514     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5515         cp $export_symbols $output_objdir/$soname-def;
5516       else
5517         echo EXPORTS > $output_objdir/$soname-def;
5518         _lt_hint=1;
5519         cat $export_symbols | while read symbol; do
5520          set dummy \$symbol;
5521          case \$# in
5522            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5523            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5524            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5525          esac;
5526          _lt_hint=`expr 1 + \$_lt_hint`;
5527         done;
5528       fi~
5529       '"$ltdll_cmds"'
5530       $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~
5531       $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~
5532       $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~
5533       $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~
5534       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5535     ;;
5536
5537   netbsd*)
5538     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5539       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5540       wlarc=
5541     else
5542       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5543       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5544     fi
5545     ;;
5546
5547   solaris* | sysv5*)
5548     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5549       ld_shlibs=no
5550       cat <<EOF 1>&2
5551
5552 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5553 *** create shared libraries on Solaris systems.  Therefore, libtool
5554 *** is disabling shared libraries support.  We urge you to upgrade GNU
5555 *** binutils to release 2.9.1 or newer.  Another option is to modify
5556 *** your PATH or compiler configuration so that the native linker is
5557 *** used, and then restart.
5558
5559 EOF
5560     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5561       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5562       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5563     else
5564       ld_shlibs=no
5565     fi
5566     ;;
5567
5568   sunos4*)
5569     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5570     wlarc=
5571     hardcode_direct=yes
5572     hardcode_shlibpath_var=no
5573     ;;
5574
5575   *)
5576     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5577       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5578       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5579     else
5580       ld_shlibs=no
5581     fi
5582     ;;
5583   esac
5584
5585   if test "$ld_shlibs" = yes; then
5586     runpath_var=LD_RUN_PATH
5587     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5588     export_dynamic_flag_spec='${wl}--export-dynamic'
5589     case $host_os in
5590     cygwin* | mingw* | pw32*)
5591       # dlltool doesn't understand --whole-archive et. al.
5592       whole_archive_flag_spec=
5593       ;;
5594     *)
5595       # ancient GNU ld didn't support --whole-archive et. al.
5596       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5597         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5598       else
5599         whole_archive_flag_spec=
5600       fi
5601       ;;
5602     esac
5603   fi
5604 else
5605   # PORTME fill in a description of your system's linker (not GNU ld)
5606   case $host_os in
5607   aix3*)
5608     allow_undefined_flag=unsupported
5609     always_export_symbols=yes
5610     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'
5611     # Note: this linker hardcodes the directories in LIBPATH if there
5612     # are no directories specified by -L.
5613     hardcode_minus_L=yes
5614     if test "$GCC" = yes && test -z "$link_static_flag"; then
5615       # Neither direct hardcoding nor static linking is supported with a
5616       # broken collect2.
5617       hardcode_direct=unsupported
5618     fi
5619     ;;
5620
5621   aix4* | aix5*)
5622     if test "$host_cpu" = ia64; then
5623       # On IA64, the linker does run time linking by default, so we don't
5624       # have to do anything special.
5625       aix_use_runtimelinking=no
5626       exp_sym_flag='-Bexport'
5627       no_entry_flag=""
5628     else
5629       aix_use_runtimelinking=no
5630
5631       # Test if we are trying to use run time linking or normal
5632       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5633       # need to do runtime linking.
5634       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5635         for ld_flag in $LDFLAGS; do
5636           case $ld_flag in
5637           *-brtl*)
5638             aix_use_runtimelinking=yes
5639             break
5640           ;;
5641           esac
5642         done
5643       esac
5644
5645       exp_sym_flag='-bexport'
5646       no_entry_flag='-bnoentry'
5647     fi
5648
5649     # When large executables or shared objects are built, AIX ld can
5650     # have problems creating the table of contents.  If linking a library
5651     # or program results in "error TOC overflow" add -mminimal-toc to
5652     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5653     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5654
5655     hardcode_direct=yes
5656     archive_cmds=''
5657     hardcode_libdir_separator=':'
5658     if test "$GCC" = yes; then
5659       case $host_os in aix4.[012]|aix4.[012].*)
5660         collect2name=`${CC} -print-prog-name=collect2`
5661         if test -f "$collect2name" && \
5662           strings "$collect2name" | grep resolve_lib_name >/dev/null
5663         then
5664           # We have reworked collect2
5665           hardcode_direct=yes
5666         else
5667           # We have old collect2
5668           hardcode_direct=unsupported
5669           # It fails to find uninstalled libraries when the uninstalled
5670           # path is not listed in the libpath.  Setting hardcode_minus_L
5671           # to unsupported forces relinking
5672           hardcode_minus_L=yes
5673           hardcode_libdir_flag_spec='-L$libdir'
5674           hardcode_libdir_separator=
5675         fi
5676       esac
5677
5678       shared_flag='-shared'
5679     else
5680       # not using gcc
5681       if test "$host_cpu" = ia64; then
5682         shared_flag='${wl}-G'
5683       else
5684         if test "$aix_use_runtimelinking" = yes; then
5685           shared_flag='${wl}-G'
5686         else
5687           shared_flag='${wl}-bM:SRE'
5688         fi
5689       fi
5690     fi
5691
5692     # It seems that -bexpall can do strange things, so it is better to
5693     # generate a list of symbols to export.
5694     always_export_symbols=yes
5695     if test "$aix_use_runtimelinking" = yes; then
5696       # Warning - without using the other runtime loading flags (-brtl),
5697       # -berok will link without error, but may produce a broken library.
5698       allow_undefined_flag='-berok'
5699       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5700       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"
5701     else
5702       if test "$host_cpu" = ia64; then
5703         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5704         allow_undefined_flag="-z nodefs"
5705         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"
5706       else
5707         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5708         # Warning - without using the other run time loading flags,
5709         # -berok will link without error, but may produce a broken library.
5710         allow_undefined_flag='${wl}-berok'
5711         # This is a bit strange, but is similar to how AIX traditionally builds
5712         # it's shared libraries.
5713         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'
5714       fi
5715     fi
5716     ;;
5717
5718   amigaos*)
5719     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)'
5720     hardcode_libdir_flag_spec='-L$libdir'
5721     hardcode_minus_L=yes
5722     # see comment about different semantics on the GNU ld section
5723     ld_shlibs=no
5724     ;;
5725
5726   cygwin* | mingw* | pw32*)
5727     # When not using gcc, we currently assume that we are using
5728     # Microsoft Visual C++.
5729     # hardcode_libdir_flag_spec is actually meaningless, as there is
5730     # no search path for DLLs.
5731     hardcode_libdir_flag_spec=' '
5732     allow_undefined_flag=unsupported
5733     # Tell ltmain to make .lib files, not .a files.
5734     libext=lib
5735     # FIXME: Setting linknames here is a bad hack.
5736     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5737     # The linker will automatically build a .lib file if we build a DLL.
5738     old_archive_from_new_cmds='true'
5739     # FIXME: Should let the user specify the lib program.
5740     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5741     fix_srcfile_path='`cygpath -w "$srcfile"`'
5742     ;;
5743
5744   darwin* | rhapsody*)
5745     case "$host_os" in
5746     rhapsody* | darwin1.[012])
5747       allow_undefined_flag='-undefined suppress'
5748       ;;
5749     *) # Darwin 1.3 on
5750       allow_undefined_flag='-flat_namespace -undefined suppress'
5751       ;;
5752     esac
5753     # FIXME: Relying on posixy $() will cause problems for
5754     #        cross-compilation, but unfortunately the echo tests do not
5755     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5756     #        `"' quotes if we put them in here... so don't!
5757     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)'
5758     # We need to add '_' to the symbols in $export_symbols first
5759     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5760     hardcode_direct=yes
5761     hardcode_shlibpath_var=no
5762     whole_archive_flag_spec='-all_load $convenience'
5763     ;;
5764
5765   freebsd1*)
5766     ld_shlibs=no
5767     ;;
5768
5769   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5770   # support.  Future versions do this automatically, but an explicit c++rt0.o
5771   # does not break anything, and helps significantly (at the cost of a little
5772   # extra space).
5773   freebsd2.2*)
5774     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5775     hardcode_libdir_flag_spec='-R$libdir'
5776     hardcode_direct=yes
5777     hardcode_shlibpath_var=no
5778     ;;
5779
5780   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5781   freebsd2*)
5782     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5783     hardcode_direct=yes
5784     hardcode_minus_L=yes
5785     hardcode_shlibpath_var=no
5786     ;;
5787
5788   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5789   freebsd*)
5790     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5791     hardcode_libdir_flag_spec='-R$libdir'
5792     hardcode_direct=yes
5793     hardcode_shlibpath_var=no
5794     ;;
5795
5796   hpux9* | hpux10* | hpux11*)
5797     case $host_os in
5798     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' ;;
5799     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5800     esac
5801     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5802     hardcode_libdir_separator=:
5803     hardcode_direct=yes
5804     hardcode_minus_L=yes # Not in the search PATH, but as the default
5805                          # location of the library.
5806     export_dynamic_flag_spec='${wl}-E'
5807     ;;
5808
5809   irix5* | irix6* | nonstopux*)
5810     if test "$GCC" = yes; then
5811       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'
5812       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5813     else
5814       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'
5815       hardcode_libdir_flag_spec='-rpath $libdir'
5816     fi
5817     hardcode_libdir_separator=:
5818     link_all_deplibs=yes
5819     ;;
5820
5821   netbsd*)
5822     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5823       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5824     else
5825       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5826     fi
5827     hardcode_libdir_flag_spec='-R$libdir'
5828     hardcode_direct=yes
5829     hardcode_shlibpath_var=no
5830     ;;
5831
5832   newsos6)
5833     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5834     hardcode_direct=yes
5835     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5836     hardcode_libdir_separator=:
5837     hardcode_shlibpath_var=no
5838     ;;
5839
5840   openbsd*)
5841     hardcode_direct=yes
5842     hardcode_shlibpath_var=no
5843     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5844       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5845       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5846       export_dynamic_flag_spec='${wl}-E'
5847     else
5848       case "$host_os" in
5849       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5850         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5851         hardcode_libdir_flag_spec='-R$libdir'
5852         ;;
5853       *)
5854         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5855         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5856         ;;
5857       esac
5858     fi
5859     ;;
5860
5861   openedition*)
5862     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5863         cp \$linknames \$output_objdir && linknames=''"
5864     export_dynamic_flag_spec="-Wl,DLL"
5865     ;;
5866
5867   os2*)
5868     hardcode_libdir_flag_spec='-L$libdir'
5869     hardcode_minus_L=yes
5870     allow_undefined_flag=unsupported
5871     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'
5872     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5873     ;;
5874
5875   osf3*)
5876     if test "$GCC" = yes; then
5877       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5878       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'
5879     else
5880       allow_undefined_flag=' -expect_unresolved \*'
5881       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'
5882     fi
5883     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5884     hardcode_libdir_separator=:
5885     ;;
5886
5887   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5888     if test "$GCC" = yes; then
5889       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5890       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'
5891       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5892     else
5893       allow_undefined_flag=' -expect_unresolved \*'
5894       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'
5895       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5896       $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'
5897
5898       #Both c and cxx compiler support -rpath directly
5899       hardcode_libdir_flag_spec='-rpath $libdir'
5900     fi
5901     hardcode_libdir_separator=:
5902     ;;
5903
5904   sco3.2v5*)
5905     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5906     hardcode_shlibpath_var=no
5907     runpath_var=LD_RUN_PATH
5908     hardcode_runpath_var=yes
5909     export_dynamic_flag_spec='${wl}-Bexport'
5910     ;;
5911
5912   solaris*)
5913     # gcc --version < 3.0 without binutils cannot create self contained
5914     # shared libraries reliably, requiring libgcc.a to resolve some of
5915     # the object symbols generated in some cases.  Libraries that use
5916     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5917     # a copy of libgcc.a into every shared library to guarantee resolving
5918     # such symbols causes other problems:  According to Tim Van Holder
5919     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5920     # (to the application) exception stack for one thing.
5921     no_undefined_flag=' -z defs'
5922     if test "$GCC" = yes; then
5923       case `$CC --version 2>/dev/null` in
5924       [12].*)
5925         cat <<EOF 1>&2
5926
5927 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5928 *** create self contained shared libraries on Solaris systems, without
5929 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5930 *** -no-undefined support, which will at least allow you to build shared
5931 *** libraries.  However, you may find that when you link such libraries
5932 *** into an application without using GCC, you have to manually add
5933 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5934 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5935 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5936
5937 EOF
5938         no_undefined_flag=
5939         ;;
5940       esac
5941     fi
5942     # $CC -shared without GNU ld will not create a library from C++
5943     # object files and a static libstdc++, better avoid it by now
5944     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5945     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5946                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5947     hardcode_libdir_flag_spec='-R$libdir'
5948     hardcode_shlibpath_var=no
5949     case $host_os in
5950     solaris2.[0-5] | solaris2.[0-5].*) ;;
5951     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5952       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5953     esac
5954     link_all_deplibs=yes
5955     ;;
5956
5957   sunos4*)
5958     if test "x$host_vendor" = xsequent; then
5959       # Use $CC to link under sequent, because it throws in some extra .o
5960       # files that make .init and .fini sections work.
5961       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5962     else
5963       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5964     fi
5965     hardcode_libdir_flag_spec='-L$libdir'
5966     hardcode_direct=yes
5967     hardcode_minus_L=yes
5968     hardcode_shlibpath_var=no
5969     ;;
5970
5971   sysv4)
5972     case $host_vendor in
5973       sni)
5974         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5975         hardcode_direct=yes # is this really true???
5976         ;;
5977       siemens)
5978         ## LD is ld it makes a PLAMLIB
5979         ## CC just makes a GrossModule.
5980         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5981         reload_cmds='$CC -r -o $output$reload_objs'
5982         hardcode_direct=no
5983         ;;
5984       motorola)
5985         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5987         ;;
5988     esac
5989     runpath_var='LD_RUN_PATH'
5990     hardcode_shlibpath_var=no
5991     ;;
5992
5993   sysv4.3*)
5994     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5995     hardcode_shlibpath_var=no
5996     export_dynamic_flag_spec='-Bexport'
5997     ;;
5998
5999   sysv5*)
6000     no_undefined_flag=' -z text'
6001     # $CC -shared without GNU ld will not create a library from C++
6002     # object files and a static libstdc++, better avoid it by now
6003     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6004     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6005                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6006     hardcode_libdir_flag_spec=
6007     hardcode_shlibpath_var=no
6008     runpath_var='LD_RUN_PATH'
6009     ;;
6010
6011   uts4*)
6012     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6013     hardcode_libdir_flag_spec='-L$libdir'
6014     hardcode_shlibpath_var=no
6015     ;;
6016
6017   dgux*)
6018     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019     hardcode_libdir_flag_spec='-L$libdir'
6020     hardcode_shlibpath_var=no
6021     ;;
6022
6023   sysv4*MP*)
6024     if test -d /usr/nec; then
6025       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6026       hardcode_shlibpath_var=no
6027       runpath_var=LD_RUN_PATH
6028       hardcode_runpath_var=yes
6029       ld_shlibs=yes
6030     fi
6031     ;;
6032
6033   sysv4.2uw2*)
6034     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6035     hardcode_direct=yes
6036     hardcode_minus_L=no
6037     hardcode_shlibpath_var=no
6038     hardcode_runpath_var=yes
6039     runpath_var=LD_RUN_PATH
6040     ;;
6041
6042   sysv5uw7* | unixware7*)
6043     no_undefined_flag='${wl}-z ${wl}text'
6044     if test "$GCC" = yes; then
6045       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6046     else
6047       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6048     fi
6049     runpath_var='LD_RUN_PATH'
6050     hardcode_shlibpath_var=no
6051     ;;
6052
6053   *)
6054     ld_shlibs=no
6055     ;;
6056   esac
6057 fi
6058 echo "$ac_t""$ld_shlibs" 1>&6
6059 test "$ld_shlibs" = no && can_build_shared=no
6060
6061 # Check hardcoding attributes.
6062 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6063 echo "configure:6064: checking how to hardcode library paths into programs" >&5
6064 hardcode_action=
6065 if test -n "$hardcode_libdir_flag_spec" || \
6066    test -n "$runpath_var"; then
6067
6068   # We can hardcode non-existant directories.
6069   if test "$hardcode_direct" != no &&
6070      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6071      # have to relink, otherwise we might link with an installed library
6072      # when we should be linking with a yet-to-be-installed one
6073      ## test "$hardcode_shlibpath_var" != no &&
6074      test "$hardcode_minus_L" != no; then
6075     # Linking always hardcodes the temporary library directory.
6076     hardcode_action=relink
6077   else
6078     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6079     hardcode_action=immediate
6080   fi
6081 else
6082   # We cannot hardcode anything, or else we can only hardcode existing
6083   # directories.
6084   hardcode_action=unsupported
6085 fi
6086 echo "$ac_t""$hardcode_action" 1>&6
6087
6088 striplib=
6089 old_striplib=
6090 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6091 echo "configure:6092: checking whether stripping libraries is possible" >&5
6092 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6093   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6094   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6095   echo "$ac_t""yes" 1>&6
6096 else
6097   echo "$ac_t""no" 1>&6
6098 fi
6099
6100 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6101 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6102
6103 # PORTME Fill in your ld.so characteristics
6104 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6105 echo "configure:6106: checking dynamic linker characteristics" >&5
6106 library_names_spec=
6107 libname_spec='lib$name'
6108 soname_spec=
6109 postinstall_cmds=
6110 postuninstall_cmds=
6111 finish_cmds=
6112 finish_eval=
6113 shlibpath_var=
6114 shlibpath_overrides_runpath=unknown
6115 version_type=none
6116 dynamic_linker="$host_os ld.so"
6117 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6118 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6119
6120 case $host_os in
6121 aix3*)
6122   version_type=linux
6123   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6124   shlibpath_var=LIBPATH
6125
6126   # AIX has no versioning support, so we append a major version to the name.
6127   soname_spec='${libname}${release}.so$major'
6128   ;;
6129
6130 aix4* | aix5*)
6131   version_type=linux
6132   need_lib_prefix=no
6133   need_version=no
6134   hardcode_into_libs=yes
6135   if test "$host_cpu" = ia64; then
6136     # AIX 5 supports IA64
6137     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6138     shlibpath_var=LD_LIBRARY_PATH
6139   else
6140     # With GCC up to 2.95.x, collect2 would create an import file
6141     # for dependence libraries.  The import file would start with
6142     # the line `#! .'.  This would cause the generated library to
6143     # depend on `.', always an invalid library.  This was fixed in
6144     # development snapshots of GCC prior to 3.0.
6145     case $host_os in
6146       aix4 | aix4.[01] | aix4.[01].*)
6147         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6148              echo ' yes '
6149              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6150           :
6151         else
6152           can_build_shared=no
6153         fi
6154         ;;
6155     esac
6156     # AIX (on Power*) has no versioning support, so currently we can
6157     # not hardcode correct soname into executable. Probably we can
6158     # add versioning support to collect2, so additional links can
6159     # be useful in future.
6160     if test "$aix_use_runtimelinking" = yes; then
6161       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6162       # instead of lib<name>.a to let people know that these are not
6163       # typical AIX shared libraries.
6164       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6165     else
6166       # We preserve .a as extension for shared libraries through AIX4.2
6167       # and later when we are not doing run time linking.
6168       library_names_spec='${libname}${release}.a $libname.a'
6169       soname_spec='${libname}${release}.so$major'
6170     fi
6171     shlibpath_var=LIBPATH
6172   fi
6173   hardcode_into_libs=yes
6174   ;;
6175
6176 amigaos*)
6177   library_names_spec='$libname.ixlibrary $libname.a'
6178   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6179   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'
6180   ;;
6181
6182 beos*)
6183   library_names_spec='${libname}.so'
6184   dynamic_linker="$host_os ld.so"
6185   shlibpath_var=LIBRARY_PATH
6186   ;;
6187
6188 bsdi4*)
6189   version_type=linux
6190   need_version=no
6191   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6192   soname_spec='${libname}${release}.so$major'
6193   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6194   shlibpath_var=LD_LIBRARY_PATH
6195   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6196   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6197   export_dynamic_flag_spec=-rdynamic
6198   # the default ld.so.conf also contains /usr/contrib/lib and
6199   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6200   # libtool to hard-code these into programs
6201   ;;
6202
6203 cygwin* | mingw* | pw32*)
6204   version_type=windows
6205   need_version=no
6206   need_lib_prefix=no
6207   case $GCC,$host_os in
6208   yes,cygwin*)
6209     library_names_spec='$libname.dll.a'
6210     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6211     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6212       dldir=$destdir/`dirname \$dlpath`~
6213       test -d \$dldir || mkdir -p \$dldir~
6214       $install_prog .libs/$dlname \$dldir/$dlname'
6215     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6216       dlpath=$dir/\$dldll~
6217        $rm \$dlpath'
6218     ;;
6219   yes,mingw*)
6220     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6221     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6222     ;;
6223   yes,pw32*)
6224     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6225     ;;
6226   *)
6227     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6228     ;;
6229   esac
6230   dynamic_linker='Win32 ld.exe'
6231   # FIXME: first we should search . and the directory the executable is in
6232   shlibpath_var=PATH
6233   ;;
6234
6235 darwin* | rhapsody*)
6236   dynamic_linker="$host_os dyld"
6237   version_type=darwin
6238   need_lib_prefix=no
6239   need_version=no
6240   # FIXME: Relying on posixy $() will cause problems for
6241   #        cross-compilation, but unfortunately the echo tests do not
6242   #        yet detect zsh echo's removal of \ escapes.
6243   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)'
6244   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6245   shlibpath_overrides_runpath=yes
6246   shlibpath_var=DYLD_LIBRARY_PATH
6247   ;;
6248
6249 freebsd1*)
6250   dynamic_linker=no
6251   ;;
6252
6253 freebsd*)
6254   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6255   version_type=freebsd-$objformat
6256   case $version_type in
6257     freebsd-elf*)
6258       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6259       need_version=no
6260       need_lib_prefix=no
6261       ;;
6262     freebsd-*)
6263       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6264       need_version=yes
6265       ;;
6266   esac
6267   shlibpath_var=LD_LIBRARY_PATH
6268   case $host_os in
6269   freebsd2*)
6270     shlibpath_overrides_runpath=yes
6271     ;;
6272   *)
6273     shlibpath_overrides_runpath=no
6274     hardcode_into_libs=yes
6275     ;;
6276   esac
6277   ;;
6278
6279 gnu*)
6280   version_type=linux
6281   need_lib_prefix=no
6282   need_version=no
6283   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6284   soname_spec='${libname}${release}.so$major'
6285   shlibpath_var=LD_LIBRARY_PATH
6286   hardcode_into_libs=yes
6287   ;;
6288
6289 hpux9* | hpux10* | hpux11*)
6290   # Give a soname corresponding to the major version so that dld.sl refuses to
6291   # link against other versions.
6292   dynamic_linker="$host_os dld.sl"
6293   version_type=sunos
6294   need_lib_prefix=no
6295   need_version=no
6296   shlibpath_var=SHLIB_PATH
6297   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6298   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6299   soname_spec='${libname}${release}.sl$major'
6300   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6301   postinstall_cmds='chmod 555 $lib'
6302   ;;
6303
6304 irix5* | irix6* | nonstopux*)
6305   case $host_os in
6306     nonstopux*) version_type=nonstopux ;;
6307     *)          version_type=irix ;;
6308   esac
6309   need_lib_prefix=no
6310   need_version=no
6311   soname_spec='${libname}${release}.so$major'
6312   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6313   case $host_os in
6314   irix5* | nonstopux*)
6315     libsuff= shlibsuff=
6316     ;;
6317   *)
6318     case $LD in # libtool.m4 will add one of these switches to LD
6319     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6320     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6321     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6322     *) libsuff= shlibsuff= libmagic=never-match;;
6323     esac
6324     ;;
6325   esac
6326   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6327   shlibpath_overrides_runpath=no
6328   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6329   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6330   ;;
6331
6332 # No shared lib support for Linux oldld, aout, or coff.
6333 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6334   dynamic_linker=no
6335   ;;
6336
6337 # This must be Linux ELF.
6338 linux-gnu*)
6339   version_type=linux
6340   need_lib_prefix=no
6341   need_version=no
6342   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6343   soname_spec='${libname}${release}.so$major'
6344   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6345   shlibpath_var=LD_LIBRARY_PATH
6346   shlibpath_overrides_runpath=no
6347   # This implies no fast_install, which is unacceptable.
6348   # Some rework will be needed to allow for fast_install
6349   # before this can be enabled.
6350   hardcode_into_libs=yes
6351
6352   # We used to test for /lib/ld.so.1 and disable shared libraries on
6353   # powerpc, because MkLinux only supported shared libraries with the
6354   # GNU dynamic linker.  Since this was broken with cross compilers,
6355   # most powerpc-linux boxes support dynamic linking these days and
6356   # people can always --disable-shared, the test was removed, and we
6357   # assume the GNU/Linux dynamic linker is in use.
6358   dynamic_linker='GNU/Linux ld.so'
6359   ;;
6360
6361 netbsd*)
6362   version_type=sunos
6363   need_lib_prefix=no
6364   need_version=no
6365   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6366     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6367     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6368     dynamic_linker='NetBSD (a.out) ld.so'
6369   else
6370     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6371     soname_spec='${libname}${release}.so$major'
6372     dynamic_linker='NetBSD ld.elf_so'
6373   fi
6374   shlibpath_var=LD_LIBRARY_PATH
6375   shlibpath_overrides_runpath=yes
6376   hardcode_into_libs=yes
6377   ;;
6378
6379 newsos6)
6380   version_type=linux
6381   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   shlibpath_overrides_runpath=yes
6384   ;;
6385
6386 openbsd*)
6387   version_type=sunos
6388   need_lib_prefix=no
6389   need_version=no
6390   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6391     case "$host_os" in
6392     openbsd2.[89] | openbsd2.[89].*)
6393       shlibpath_overrides_runpath=no
6394       ;;
6395     *)
6396       shlibpath_overrides_runpath=yes
6397       ;;
6398     esac
6399   else
6400     shlibpath_overrides_runpath=yes
6401   fi
6402   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6403   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6404   shlibpath_var=LD_LIBRARY_PATH
6405   ;;
6406
6407 openedition*)
6408   need_lib_prefix=no
6409   need_version=no
6410   shlibpath_overrides_runpath=yes
6411   shlibpath_var=LIBPATH
6412   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6413   # the library's exports are in libname.x; this is the file that must
6414   # actually be linked with to use a DLL.
6415   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6416   ;;
6417
6418 os2*)
6419   libname_spec='$name'
6420   need_lib_prefix=no
6421   library_names_spec='$libname.dll $libname.a'
6422   dynamic_linker='OS/2 ld.exe'
6423   shlibpath_var=LIBPATH
6424   ;;
6425
6426 osf3* | osf4* | osf5*)
6427   version_type=osf
6428   need_version=no
6429   soname_spec='${libname}${release}.so$major'
6430   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6433   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6434   hardcode_into_libs=yes
6435   ;;
6436
6437 sco3.2v5*)
6438   version_type=osf
6439   soname_spec='${libname}${release}.so$major'
6440   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6441   shlibpath_var=LD_LIBRARY_PATH
6442   ;;
6443
6444 solaris*)
6445   version_type=linux
6446   need_lib_prefix=no
6447   need_version=no
6448   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6449   soname_spec='${libname}${release}.so$major'
6450   shlibpath_var=LD_LIBRARY_PATH
6451   shlibpath_overrides_runpath=yes
6452   hardcode_into_libs=yes
6453   # ldd complains unless libraries are executable
6454   postinstall_cmds='chmod +x $lib'
6455   ;;
6456
6457 sunos4*)
6458   version_type=sunos
6459   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6460   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6461   shlibpath_var=LD_LIBRARY_PATH
6462   shlibpath_overrides_runpath=yes
6463   if test "$with_gnu_ld" = yes; then
6464     need_lib_prefix=no
6465   fi
6466   need_version=yes
6467   ;;
6468
6469 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6470   version_type=linux
6471   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6472   soname_spec='${libname}${release}.so$major'
6473   shlibpath_var=LD_LIBRARY_PATH
6474   case $host_vendor in
6475     sni)
6476       shlibpath_overrides_runpath=no
6477       need_lib_prefix=no
6478       export_dynamic_flag_spec='${wl}-Blargedynsym'
6479       runpath_var=LD_RUN_PATH
6480       ;;
6481     siemens)
6482       need_lib_prefix=no
6483       ;;
6484     motorola)
6485       need_lib_prefix=no
6486       need_version=no
6487       shlibpath_overrides_runpath=no
6488       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6489       ;;
6490   esac
6491   ;;
6492
6493 uts4*)
6494   version_type=linux
6495   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6496   soname_spec='${libname}${release}.so$major'
6497   shlibpath_var=LD_LIBRARY_PATH
6498   ;;
6499
6500 dgux*)
6501   version_type=linux
6502   need_lib_prefix=no
6503   need_version=no
6504   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6505   soname_spec='${libname}${release}.so$major'
6506   shlibpath_var=LD_LIBRARY_PATH
6507   ;;
6508
6509 sysv4*MP*)
6510   if test -d /usr/nec ;then
6511     version_type=linux
6512     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6513     soname_spec='$libname.so.$major'
6514     shlibpath_var=LD_LIBRARY_PATH
6515   fi
6516   ;;
6517
6518 *)
6519   dynamic_linker=no
6520   ;;
6521 esac
6522 echo "$ac_t""$dynamic_linker" 1>&6
6523 test "$dynamic_linker" = no && can_build_shared=no
6524
6525 # Report the final consequences.
6526 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking if libtool supports shared libraries" >&5
6528 echo "$ac_t""$can_build_shared" 1>&6
6529
6530 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6531 echo "configure:6532: checking whether to build shared libraries" >&5
6532 test "$can_build_shared" = "no" && enable_shared=no
6533
6534 # On AIX, shared libraries and static libraries use the same namespace, and
6535 # are all built from PIC.
6536 case "$host_os" in
6537 aix3*)
6538   test "$enable_shared" = yes && enable_static=no
6539   if test -n "$RANLIB"; then
6540     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6541     postinstall_cmds='$RANLIB $lib'
6542   fi
6543   ;;
6544
6545 aix4*)
6546   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6547     test "$enable_shared" = yes && enable_static=no
6548   fi
6549   ;;
6550 esac
6551 echo "$ac_t""$enable_shared" 1>&6
6552
6553 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6554 echo "configure:6555: checking whether to build static libraries" >&5
6555 # Make sure either enable_shared or enable_static is yes.
6556 test "$enable_shared" = yes || enable_static=yes
6557 echo "$ac_t""$enable_static" 1>&6
6558
6559 if test "$hardcode_action" = relink; then
6560   # Fast installation is not supported
6561   enable_fast_install=no
6562 elif test "$shlibpath_overrides_runpath" = yes ||
6563      test "$enable_shared" = no; then
6564   # Fast installation is not necessary
6565   enable_fast_install=needless
6566 fi
6567
6568 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6569 if test "$GCC" = yes; then
6570   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6571 fi
6572
6573 if test "x$enable_dlopen" != xyes; then
6574   enable_dlopen=unknown
6575   enable_dlopen_self=unknown
6576   enable_dlopen_self_static=unknown
6577 else
6578   lt_cv_dlopen=no
6579   lt_cv_dlopen_libs=
6580
6581   case $host_os in
6582   beos*)
6583     lt_cv_dlopen="load_add_on"
6584     lt_cv_dlopen_libs=
6585     lt_cv_dlopen_self=yes
6586     ;;
6587
6588   cygwin* | mingw* | pw32*)
6589     lt_cv_dlopen="LoadLibrary"
6590     lt_cv_dlopen_libs=
6591    ;;
6592
6593   *)
6594     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6595 echo "configure:6596: checking for dllload" >&5
6596 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   cat > conftest.$ac_ext <<EOF
6600 #line 6601 "configure"
6601 #include "confdefs.h"
6602 /* System header to define __stub macros and hopefully few prototypes,
6603     which can conflict with char dllload(); below.  */
6604 #include <assert.h>
6605 /* Override any gcc2 internal prototype to avoid an error.  */
6606 /* We use char because int might match the return type of a gcc2
6607     builtin and then its argument prototype would still apply.  */
6608 char dllload();
6609 char (*f)();
6610
6611 int main() {
6612
6613 /* The GNU C library defines this for functions which it implements
6614     to always fail with ENOSYS.  Some functions are actually named
6615     something starting with __ and the normal name is an alias.  */
6616 #if defined (__stub_dllload) || defined (__stub___dllload)
6617 choke me
6618 #else
6619 f = dllload;
6620 #endif
6621
6622 ; return 0; }
6623 EOF
6624 if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6625   rm -rf conftest*
6626   eval "ac_cv_func_dllload=yes"
6627 else
6628   echo "configure: failed program was:" >&5
6629   cat conftest.$ac_ext >&5
6630   rm -rf conftest*
6631   eval "ac_cv_func_dllload=no"
6632 fi
6633 rm -f conftest*
6634 fi
6635
6636 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6637   echo "$ac_t""yes" 1>&6
6638   lt_cv_dlopen="dllload"
6639 else
6640   echo "$ac_t""no" 1>&6
6641 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6642 echo "configure:6643: checking for shl_load" >&5
6643 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6644   echo $ac_n "(cached) $ac_c" 1>&6
6645 else
6646   cat > conftest.$ac_ext <<EOF
6647 #line 6648 "configure"
6648 #include "confdefs.h"
6649 /* System header to define __stub macros and hopefully few prototypes,
6650     which can conflict with char shl_load(); below.  */
6651 #include <assert.h>
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 /* We use char because int might match the return type of a gcc2
6654     builtin and then its argument prototype would still apply.  */
6655 char shl_load();
6656 char (*f)();
6657
6658 int main() {
6659
6660 /* The GNU C library defines this for functions which it implements
6661     to always fail with ENOSYS.  Some functions are actually named
6662     something starting with __ and the normal name is an alias.  */
6663 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6664 choke me
6665 #else
6666 f = shl_load;
6667 #endif
6668
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6672   rm -rf conftest*
6673   eval "ac_cv_func_shl_load=yes"
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   eval "ac_cv_func_shl_load=no"
6679 fi
6680 rm -f conftest*
6681 fi
6682
6683 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6684   echo "$ac_t""yes" 1>&6
6685   lt_cv_dlopen="shl_load"
6686 else
6687   echo "$ac_t""no" 1>&6
6688 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6689 echo "configure:6690: checking for shl_load in -ldld" >&5
6690 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6692   echo $ac_n "(cached) $ac_c" 1>&6
6693 else
6694   ac_save_LIBS="$LIBS"
6695 LIBS="-ldld  $LIBS"
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 /* We use char because int might match the return type of a gcc2
6701     builtin and then its argument prototype would still apply.  */
6702 char shl_load();
6703
6704 int main() {
6705 shl_load()
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=no"
6716 fi
6717 rm -f conftest*
6718 LIBS="$ac_save_LIBS"
6719
6720 fi
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6724 else
6725   echo "$ac_t""no" 1>&6
6726 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6727 echo "configure:6728: checking for dlopen" >&5
6728 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6729   echo $ac_n "(cached) $ac_c" 1>&6
6730 else
6731   cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 /* System header to define __stub macros and hopefully few prototypes,
6735     which can conflict with char dlopen(); below.  */
6736 #include <assert.h>
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char dlopen();
6741 char (*f)();
6742
6743 int main() {
6744
6745 /* The GNU C library defines this for functions which it implements
6746     to always fail with ENOSYS.  Some functions are actually named
6747     something starting with __ and the normal name is an alias.  */
6748 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6749 choke me
6750 #else
6751 f = dlopen;
6752 #endif
6753
6754 ; return 0; }
6755 EOF
6756 if { (eval echo configure:6757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6757   rm -rf conftest*
6758   eval "ac_cv_func_dlopen=yes"
6759 else
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   eval "ac_cv_func_dlopen=no"
6764 fi
6765 rm -f conftest*
6766 fi
6767
6768 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770   lt_cv_dlopen="dlopen"
6771 else
6772   echo "$ac_t""no" 1>&6
6773 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6774 echo "configure:6775: checking for dlopen in -ldl" >&5
6775 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6777   echo $ac_n "(cached) $ac_c" 1>&6
6778 else
6779   ac_save_LIBS="$LIBS"
6780 LIBS="-ldl  $LIBS"
6781 cat > conftest.$ac_ext <<EOF
6782 #line 6783 "configure"
6783 #include "confdefs.h"
6784 /* Override any gcc2 internal prototype to avoid an error.  */
6785 /* We use char because int might match the return type of a gcc2
6786     builtin and then its argument prototype would still apply.  */
6787 char dlopen();
6788
6789 int main() {
6790 dlopen()
6791 ; return 0; }
6792 EOF
6793 if { (eval echo configure:6794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6794   rm -rf conftest*
6795   eval "ac_cv_lib_$ac_lib_var=yes"
6796 else
6797   echo "configure: failed program was:" >&5
6798   cat conftest.$ac_ext >&5
6799   rm -rf conftest*
6800   eval "ac_cv_lib_$ac_lib_var=no"
6801 fi
6802 rm -f conftest*
6803 LIBS="$ac_save_LIBS"
6804
6805 fi
6806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6807   echo "$ac_t""yes" 1>&6
6808   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6809 else
6810   echo "$ac_t""no" 1>&6
6811 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6812 echo "configure:6813: checking for dlopen in -lsvld" >&5
6813 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6815   echo $ac_n "(cached) $ac_c" 1>&6
6816 else
6817   ac_save_LIBS="$LIBS"
6818 LIBS="-lsvld  $LIBS"
6819 cat > conftest.$ac_ext <<EOF
6820 #line 6821 "configure"
6821 #include "confdefs.h"
6822 /* Override any gcc2 internal prototype to avoid an error.  */
6823 /* We use char because int might match the return type of a gcc2
6824     builtin and then its argument prototype would still apply.  */
6825 char dlopen();
6826
6827 int main() {
6828 dlopen()
6829 ; return 0; }
6830 EOF
6831 if { (eval echo configure:6832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6832   rm -rf conftest*
6833   eval "ac_cv_lib_$ac_lib_var=yes"
6834 else
6835   echo "configure: failed program was:" >&5
6836   cat conftest.$ac_ext >&5
6837   rm -rf conftest*
6838   eval "ac_cv_lib_$ac_lib_var=no"
6839 fi
6840 rm -f conftest*
6841 LIBS="$ac_save_LIBS"
6842
6843 fi
6844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6845   echo "$ac_t""yes" 1>&6
6846   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6847 else
6848   echo "$ac_t""no" 1>&6
6849 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6850 echo "configure:6851: checking for dld_link in -ldld" >&5
6851 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6852 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   ac_save_LIBS="$LIBS"
6856 LIBS="-ldld  $LIBS"
6857 cat > conftest.$ac_ext <<EOF
6858 #line 6859 "configure"
6859 #include "confdefs.h"
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char dld_link();
6864
6865 int main() {
6866 dld_link()
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_lib_$ac_lib_var=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_lib_$ac_lib_var=no"
6877 fi
6878 rm -f conftest*
6879 LIBS="$ac_save_LIBS"
6880
6881 fi
6882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6883   echo "$ac_t""yes" 1>&6
6884   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6885 else
6886   echo "$ac_t""no" 1>&6
6887 fi
6888
6889               
6890 fi
6891
6892             
6893 fi
6894
6895           
6896 fi
6897
6898         
6899 fi
6900
6901       
6902 fi
6903
6904     
6905 fi
6906
6907     ;;
6908   esac
6909
6910   if test "x$lt_cv_dlopen" != xno; then
6911     enable_dlopen=yes
6912   else
6913     enable_dlopen=no
6914   fi
6915
6916   case $lt_cv_dlopen in
6917   dlopen)
6918     save_CPPFLAGS="$CPPFLAGS"
6919         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6920
6921     save_LDFLAGS="$LDFLAGS"
6922     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6923
6924     save_LIBS="$LIBS"
6925     LIBS="$lt_cv_dlopen_libs $LIBS"
6926
6927     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6928 echo "configure:6929: checking whether a program can dlopen itself" >&5
6929 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6930   echo $ac_n "(cached) $ac_c" 1>&6
6931 else
6932           if test "$cross_compiling" = yes; then :
6933   lt_cv_dlopen_self=cross
6934 else
6935     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6936   lt_status=$lt_dlunknown
6937   cat > conftest.$ac_ext <<EOF
6938 #line 6939 "configure"
6939 #include "confdefs.h"
6940
6941 #if HAVE_DLFCN_H
6942 #include <dlfcn.h>
6943 #endif
6944
6945 #include <stdio.h>
6946
6947 #ifdef RTLD_GLOBAL
6948 #  define LT_DLGLOBAL           RTLD_GLOBAL
6949 #else
6950 #  ifdef DL_GLOBAL
6951 #    define LT_DLGLOBAL         DL_GLOBAL
6952 #  else
6953 #    define LT_DLGLOBAL         0
6954 #  endif
6955 #endif
6956
6957 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6958    find out it does not work in some platform. */
6959 #ifndef LT_DLLAZY_OR_NOW
6960 #  ifdef RTLD_LAZY
6961 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6962 #  else
6963 #    ifdef DL_LAZY
6964 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6965 #    else
6966 #      ifdef RTLD_NOW
6967 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6968 #      else
6969 #        ifdef DL_NOW
6970 #          define LT_DLLAZY_OR_NOW      DL_NOW
6971 #        else
6972 #          define LT_DLLAZY_OR_NOW      0
6973 #        endif
6974 #      endif
6975 #    endif
6976 #  endif
6977 #endif
6978
6979 #ifdef __cplusplus
6980 extern "C" void exit (int);
6981 #endif
6982
6983 void fnord() { int i=42;}
6984 int main ()
6985 {
6986   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6987   int status = $lt_dlunknown;
6988
6989   if (self)
6990     {
6991       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6992       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6993       /* dlclose (self); */
6994     }
6995
6996     exit (status);
6997 }
6998 EOF
6999   if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7000     (./conftest; exit; ) 2>/dev/null
7001     lt_status=$?
7002     case x$lt_status in
7003       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7004       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7005       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7006     esac
7007   else :
7008     # compilation failed
7009     lt_cv_dlopen_self=no
7010   fi
7011 fi
7012 rm -fr conftest*
7013
7014     
7015 fi
7016
7017 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7018
7019     if test "x$lt_cv_dlopen_self" = xyes; then
7020       LDFLAGS="$LDFLAGS $link_static_flag"
7021       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7022 echo "configure:7023: checking whether a statically linked program can dlopen itself" >&5
7023 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7024   echo $ac_n "(cached) $ac_c" 1>&6
7025 else
7026           if test "$cross_compiling" = yes; then :
7027   lt_cv_dlopen_self_static=cross
7028 else
7029     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7030   lt_status=$lt_dlunknown
7031   cat > conftest.$ac_ext <<EOF
7032 #line 7033 "configure"
7033 #include "confdefs.h"
7034
7035 #if HAVE_DLFCN_H
7036 #include <dlfcn.h>
7037 #endif
7038
7039 #include <stdio.h>
7040
7041 #ifdef RTLD_GLOBAL
7042 #  define LT_DLGLOBAL           RTLD_GLOBAL
7043 #else
7044 #  ifdef DL_GLOBAL
7045 #    define LT_DLGLOBAL         DL_GLOBAL
7046 #  else
7047 #    define LT_DLGLOBAL         0
7048 #  endif
7049 #endif
7050
7051 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7052    find out it does not work in some platform. */
7053 #ifndef LT_DLLAZY_OR_NOW
7054 #  ifdef RTLD_LAZY
7055 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7056 #  else
7057 #    ifdef DL_LAZY
7058 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7059 #    else
7060 #      ifdef RTLD_NOW
7061 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7062 #      else
7063 #        ifdef DL_NOW
7064 #          define LT_DLLAZY_OR_NOW      DL_NOW
7065 #        else
7066 #          define LT_DLLAZY_OR_NOW      0
7067 #        endif
7068 #      endif
7069 #    endif
7070 #  endif
7071 #endif
7072
7073 #ifdef __cplusplus
7074 extern "C" void exit (int);
7075 #endif
7076
7077 void fnord() { int i=42;}
7078 int main ()
7079 {
7080   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7081   int status = $lt_dlunknown;
7082
7083   if (self)
7084     {
7085       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7086       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7087       /* dlclose (self); */
7088     }
7089
7090     exit (status);
7091 }
7092 EOF
7093   if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7094     (./conftest; exit; ) 2>/dev/null
7095     lt_status=$?
7096     case x$lt_status in
7097       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7098       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7099       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7100     esac
7101   else :
7102     # compilation failed
7103     lt_cv_dlopen_self_static=no
7104   fi
7105 fi
7106 rm -fr conftest*
7107
7108       
7109 fi
7110
7111 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7112     fi
7113
7114     CPPFLAGS="$save_CPPFLAGS"
7115     LDFLAGS="$save_LDFLAGS"
7116     LIBS="$save_LIBS"
7117     ;;
7118   esac
7119
7120   case $lt_cv_dlopen_self in
7121   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7122   *) enable_dlopen_self=unknown ;;
7123   esac
7124
7125   case $lt_cv_dlopen_self_static in
7126   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7127   *) enable_dlopen_self_static=unknown ;;
7128   esac
7129 fi
7130
7131
7132 if test "$enable_shared" = yes && test "$GCC" = yes; then
7133   case $archive_cmds in
7134   *'~'*)
7135     # FIXME: we may have to deal with multi-command sequences.
7136     ;;
7137   '$CC '*)
7138     # Test whether the compiler implicitly links with -lc since on some
7139     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7140     # to ld, don't add -lc before -lgcc.
7141     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7142 echo "configure:7143: checking whether -lc should be explicitly linked in" >&5
7143     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7144   echo $ac_n "(cached) $ac_c" 1>&6
7145 else
7146   $rm conftest*
7147     echo 'static int dummy;' > conftest.$ac_ext
7148
7149     if { (eval echo configure:7150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7150       soname=conftest
7151       lib=conftest
7152       libobjs=conftest.$ac_objext
7153       deplibs=
7154       wl=$lt_cv_prog_cc_wl
7155       compiler_flags=-v
7156       linker_flags=-v
7157       verstring=
7158       output_objdir=.
7159       libname=conftest
7160       save_allow_undefined_flag=$allow_undefined_flag
7161       allow_undefined_flag=
7162       if { (eval echo configure:7163: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
7163       then
7164         lt_cv_archive_cmds_need_lc=no
7165       else
7166         lt_cv_archive_cmds_need_lc=yes
7167       fi
7168       allow_undefined_flag=$save_allow_undefined_flag
7169     else
7170       cat conftest.err 1>&5
7171     fi
7172 fi
7173
7174     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7175     ;;
7176   esac
7177 fi
7178 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7179
7180 # The second clause should only fire when bootstrapping the
7181 # libtool distribution, otherwise you forgot to ship ltmain.sh
7182 # with your package, and you will get complaints that there are
7183 # no rules to generate ltmain.sh.
7184 if test -f "$ltmain"; then
7185   :
7186 else
7187   # If there is no Makefile yet, we rely on a make rule to execute
7188   # `config.status --recheck' to rerun these tests and create the
7189   # libtool script then.
7190   test -f Makefile && make "$ltmain"
7191 fi
7192
7193 if test -f "$ltmain"; then
7194   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7195   $rm -f "${ofile}T"
7196
7197   echo creating $ofile
7198
7199   # Now quote all the things that may contain metacharacters while being
7200   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7201   # variables and quote the copies for generation of the libtool script.
7202   for var in echo old_CC old_CFLAGS SED \
7203     AR AR_FLAGS CC LD LN_S NM SHELL \
7204     reload_flag reload_cmds wl \
7205     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7206     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7207     library_names_spec soname_spec \
7208     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7209     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7210     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7211     old_striplib striplib file_magic_cmd export_symbols_cmds \
7212     deplibs_check_method allow_undefined_flag no_undefined_flag \
7213     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7214     global_symbol_to_c_name_address \
7215     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7216     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7217     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7218
7219     case $var in
7220     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7221     old_postinstall_cmds | old_postuninstall_cmds | \
7222     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7223     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7224     postinstall_cmds | postuninstall_cmds | \
7225     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7226       # Double-quote double-evaled strings.
7227       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7228       ;;
7229     *)
7230       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7231       ;;
7232     esac
7233   done
7234
7235   cat <<__EOF__ > "${ofile}T"
7236 #! $SHELL
7237
7238 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7239 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7240 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7241 #
7242 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7243 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7244 #
7245 # This program is free software; you can redistribute it and/or modify
7246 # it under the terms of the GNU General Public License as published by
7247 # the Free Software Foundation; either version 2 of the License, or
7248 # (at your option) any later version.
7249 #
7250 # This program is distributed in the hope that it will be useful, but
7251 # WITHOUT ANY WARRANTY; without even the implied warranty of
7252 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7253 # General Public License for more details.
7254 #
7255 # You should have received a copy of the GNU General Public License
7256 # along with this program; if not, write to the Free Software
7257 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7258 #
7259 # As a special exception to the GNU General Public License, if you
7260 # distribute this file as part of a program that contains a
7261 # configuration script generated by Autoconf, you may include it under
7262 # the same distribution terms that you use for the rest of that program.
7263
7264 # A sed that does not truncate output.
7265 SED=$lt_SED
7266
7267 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7268 Xsed="${SED} -e s/^X//"
7269
7270 # The HP-UX ksh and POSIX shell print the target directory to stdout
7271 # if CDPATH is set.
7272 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7273
7274 # ### BEGIN LIBTOOL CONFIG
7275
7276 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7277
7278 # Shell to use when invoking shell scripts.
7279 SHELL=$lt_SHELL
7280
7281 # Whether or not to build shared libraries.
7282 build_libtool_libs=$enable_shared
7283
7284 # Whether or not to build static libraries.
7285 build_old_libs=$enable_static
7286
7287 # Whether or not to add -lc for building shared libraries.
7288 build_libtool_need_lc=$need_lc
7289
7290 # Whether or not to optimize for fast installation.
7291 fast_install=$enable_fast_install
7292
7293 # The host system.
7294 host_alias=$host_alias
7295 host=$host
7296
7297 # An echo program that does not interpret backslashes.
7298 echo=$lt_echo
7299
7300 # The archiver.
7301 AR=$lt_AR
7302 AR_FLAGS=$lt_AR_FLAGS
7303
7304 # The default C compiler.
7305 CC=$lt_CC
7306
7307 # Is the compiler the GNU C compiler?
7308 with_gcc=$GCC
7309
7310 # The linker used to build libraries.
7311 LD=$lt_LD
7312
7313 # Whether we need hard or soft links.
7314 LN_S=$lt_LN_S
7315
7316 # A BSD-compatible nm program.
7317 NM=$lt_NM
7318
7319 # A symbol stripping program
7320 STRIP=$STRIP
7321
7322 # Used to examine libraries when file_magic_cmd begins "file"
7323 MAGIC_CMD=$MAGIC_CMD
7324
7325 # Used on cygwin: DLL creation program.
7326 DLLTOOL="$DLLTOOL"
7327
7328 # Used on cygwin: object dumper.
7329 OBJDUMP="$OBJDUMP"
7330
7331 # Used on cygwin: assembler.
7332 AS="$AS"
7333
7334 # The name of the directory that contains temporary libtool files.
7335 objdir=$objdir
7336
7337 # How to create reloadable object files.
7338 reload_flag=$lt_reload_flag
7339 reload_cmds=$lt_reload_cmds
7340
7341 # How to pass a linker flag through the compiler.
7342 wl=$lt_wl
7343
7344 # Object file suffix (normally "o").
7345 objext="$ac_objext"
7346
7347 # Old archive suffix (normally "a").
7348 libext="$libext"
7349
7350 # Executable file suffix (normally "").
7351 exeext="$exeext"
7352
7353 # Additional compiler flags for building library objects.
7354 pic_flag=$lt_pic_flag
7355 pic_mode=$pic_mode
7356
7357 # Does compiler simultaneously support -c and -o options?
7358 compiler_c_o=$lt_compiler_c_o
7359
7360 # Can we write directly to a .lo ?
7361 compiler_o_lo=$lt_compiler_o_lo
7362
7363 # Must we lock files when doing compilation ?
7364 need_locks=$lt_need_locks
7365
7366 # Do we need the lib prefix for modules?
7367 need_lib_prefix=$need_lib_prefix
7368
7369 # Do we need a version for libraries?
7370 need_version=$need_version
7371
7372 # Whether dlopen is supported.
7373 dlopen_support=$enable_dlopen
7374
7375 # Whether dlopen of programs is supported.
7376 dlopen_self=$enable_dlopen_self
7377
7378 # Whether dlopen of statically linked programs is supported.
7379 dlopen_self_static=$enable_dlopen_self_static
7380
7381 # Compiler flag to prevent dynamic linking.
7382 link_static_flag=$lt_link_static_flag
7383
7384 # Compiler flag to turn off builtin functions.
7385 no_builtin_flag=$lt_no_builtin_flag
7386
7387 # Compiler flag to allow reflexive dlopens.
7388 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7389
7390 # Compiler flag to generate shared objects directly from archives.
7391 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7392
7393 # Compiler flag to generate thread-safe objects.
7394 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7395
7396 # Library versioning type.
7397 version_type=$version_type
7398
7399 # Format of library name prefix.
7400 libname_spec=$lt_libname_spec
7401
7402 # List of archive names.  First name is the real one, the rest are links.
7403 # The last name is the one that the linker finds with -lNAME.
7404 library_names_spec=$lt_library_names_spec
7405
7406 # The coded name of the library, if different from the real name.
7407 soname_spec=$lt_soname_spec
7408
7409 # Commands used to build and install an old-style archive.
7410 RANLIB=$lt_RANLIB
7411 old_archive_cmds=$lt_old_archive_cmds
7412 old_postinstall_cmds=$lt_old_postinstall_cmds
7413 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7414
7415 # Create an old-style archive from a shared archive.
7416 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7417
7418 # Create a temporary old-style archive to link instead of a shared archive.
7419 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7420
7421 # Commands used to build and install a shared archive.
7422 archive_cmds=$lt_archive_cmds
7423 archive_expsym_cmds=$lt_archive_expsym_cmds
7424 postinstall_cmds=$lt_postinstall_cmds
7425 postuninstall_cmds=$lt_postuninstall_cmds
7426
7427 # Commands to strip libraries.
7428 old_striplib=$lt_old_striplib
7429 striplib=$lt_striplib
7430
7431 # Method to check whether dependent libraries are shared objects.
7432 deplibs_check_method=$lt_deplibs_check_method
7433
7434 # Command to use when deplibs_check_method == file_magic.
7435 file_magic_cmd=$lt_file_magic_cmd
7436
7437 # Flag that allows shared libraries with undefined symbols to be built.
7438 allow_undefined_flag=$lt_allow_undefined_flag
7439
7440 # Flag that forces no undefined symbols.
7441 no_undefined_flag=$lt_no_undefined_flag
7442
7443 # Commands used to finish a libtool library installation in a directory.
7444 finish_cmds=$lt_finish_cmds
7445
7446 # Same as above, but a single script fragment to be evaled but not shown.
7447 finish_eval=$lt_finish_eval
7448
7449 # Take the output of nm and produce a listing of raw symbols and C names.
7450 global_symbol_pipe=$lt_global_symbol_pipe
7451
7452 # Transform the output of nm in a proper C declaration
7453 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7454
7455 # Transform the output of nm in a C name address pair
7456 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7457
7458 # This is the shared library runtime path variable.
7459 runpath_var=$runpath_var
7460
7461 # This is the shared library path variable.
7462 shlibpath_var=$shlibpath_var
7463
7464 # Is shlibpath searched before the hard-coded library search path?
7465 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7466
7467 # How to hardcode a shared library path into an executable.
7468 hardcode_action=$hardcode_action
7469
7470 # Whether we should hardcode library paths into libraries.
7471 hardcode_into_libs=$hardcode_into_libs
7472
7473 # Flag to hardcode \$libdir into a binary during linking.
7474 # This must work even if \$libdir does not exist.
7475 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7476
7477 # Whether we need a single -rpath flag with a separated argument.
7478 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7479
7480 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7481 # resulting binary.
7482 hardcode_direct=$hardcode_direct
7483
7484 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7485 # resulting binary.
7486 hardcode_minus_L=$hardcode_minus_L
7487
7488 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7489 # the resulting binary.
7490 hardcode_shlibpath_var=$hardcode_shlibpath_var
7491
7492 # Variables whose values should be saved in libtool wrapper scripts and
7493 # restored at relink time.
7494 variables_saved_for_relink="$variables_saved_for_relink"
7495
7496 # Whether libtool must link a program against all its dependency libraries.
7497 link_all_deplibs=$link_all_deplibs
7498
7499 # Compile-time system search path for libraries
7500 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7501
7502 # Run-time system search path for libraries
7503 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7504
7505 # Fix the shell variable \$srcfile for the compiler.
7506 fix_srcfile_path="$fix_srcfile_path"
7507
7508 # Set to yes if exported symbols are required.
7509 always_export_symbols=$always_export_symbols
7510
7511 # The commands to list exported symbols.
7512 export_symbols_cmds=$lt_export_symbols_cmds
7513
7514 # The commands to extract the exported symbol list from a shared archive.
7515 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7516
7517 # Symbols that should not be listed in the preloaded symbols.
7518 exclude_expsyms=$lt_exclude_expsyms
7519
7520 # Symbols that must always be exported.
7521 include_expsyms=$lt_include_expsyms
7522
7523 # ### END LIBTOOL CONFIG
7524
7525 __EOF__
7526
7527   case $host_os in
7528   aix3*)
7529     cat <<\EOF >> "${ofile}T"
7530
7531 # AIX sometimes has problems with the GCC collect2 program.  For some
7532 # reason, if we set the COLLECT_NAMES environment variable, the problems
7533 # vanish in a puff of smoke.
7534 if test "X${COLLECT_NAMES+set}" != Xset; then
7535   COLLECT_NAMES=
7536   export COLLECT_NAMES
7537 fi
7538 EOF
7539     ;;
7540   esac
7541
7542   case $host_os in
7543   cygwin* | mingw* | pw32* | os2*)
7544     cat <<'EOF' >> "${ofile}T"
7545       # This is a source program that is used to create dlls on Windows
7546       # Don't remove nor modify the starting and closing comments
7547 # /* ltdll.c starts here */
7548 # #define WIN32_LEAN_AND_MEAN
7549 # #include <windows.h>
7550 # #undef WIN32_LEAN_AND_MEAN
7551 # #include <stdio.h>
7552 #
7553 # #ifndef __CYGWIN__
7554 # #  ifdef __CYGWIN32__
7555 # #    define __CYGWIN__ __CYGWIN32__
7556 # #  endif
7557 # #endif
7558 #
7559 # #ifdef __cplusplus
7560 # extern "C" {
7561 # #endif
7562 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7563 # #ifdef __cplusplus
7564 # }
7565 # #endif
7566 #
7567 # #ifdef __CYGWIN__
7568 # #include <cygwin/cygwin_dll.h>
7569 # DECLARE_CYGWIN_DLL( DllMain );
7570 # #endif
7571 # HINSTANCE __hDllInstance_base;
7572 #
7573 # BOOL APIENTRY
7574 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7575 # {
7576 #   __hDllInstance_base = hInst;
7577 #   return TRUE;
7578 # }
7579 # /* ltdll.c ends here */
7580         # This is a source program that is used to create import libraries
7581         # on Windows for dlls which lack them. Don't remove nor modify the
7582         # starting and closing comments
7583 # /* impgen.c starts here */
7584 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7585 #
7586 #  This file is part of GNU libtool.
7587 #
7588 #  This program is free software; you can redistribute it and/or modify
7589 #  it under the terms of the GNU General Public License as published by
7590 #  the Free Software Foundation; either version 2 of the License, or
7591 #  (at your option) any later version.
7592 #
7593 #  This program is distributed in the hope that it will be useful,
7594 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7595 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7596 #  GNU General Public License for more details.
7597 #
7598 #  You should have received a copy of the GNU General Public License
7599 #  along with this program; if not, write to the Free Software
7600 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7601 #  */
7602 #
7603 # #include <stdio.h>            /* for printf() */
7604 # #include <unistd.h>           /* for open(), lseek(), read() */
7605 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7606 # #include <string.h>           /* for strdup() */
7607 #
7608 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7609 # #ifndef O_BINARY
7610 # #define O_BINARY 0
7611 # #endif
7612 #
7613 # static unsigned int
7614 # pe_get16 (fd, offset)
7615 #      int fd;
7616 #      int offset;
7617 # {
7618 #   unsigned char b[2];
7619 #   lseek (fd, offset, SEEK_SET);
7620 #   read (fd, b, 2);
7621 #   return b[0] + (b[1]<<8);
7622 # }
7623 #
7624 # static unsigned int
7625 # pe_get32 (fd, offset)
7626 #     int fd;
7627 #     int offset;
7628 # {
7629 #   unsigned char b[4];
7630 #   lseek (fd, offset, SEEK_SET);
7631 #   read (fd, b, 4);
7632 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7633 # }
7634 #
7635 # static unsigned int
7636 # pe_as32 (ptr)
7637 #      void *ptr;
7638 # {
7639 #   unsigned char *b = ptr;
7640 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7641 # }
7642 #
7643 # int
7644 # main (argc, argv)
7645 #     int argc;
7646 #     char *argv[];
7647 # {
7648 #     int dll;
7649 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7650 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7651 #     unsigned long name_rvas, nexp;
7652 #     unsigned char *expdata, *erva;
7653 #     char *filename, *dll_name;
7654 #
7655 #     filename = argv[1];
7656 #
7657 #     dll = open(filename, O_RDONLY|O_BINARY);
7658 #     if (dll < 1)
7659 #       return 1;
7660 #
7661 #     dll_name = filename;
7662 #
7663 #     for (i=0; filename[i]; i++)
7664 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7665 #           dll_name = filename + i +1;
7666 #
7667 #     pe_header_offset = pe_get32 (dll, 0x3c);
7668 #     opthdr_ofs = pe_header_offset + 4 + 20;
7669 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7670 #
7671 #     if (num_entries < 1) /* no exports */
7672 #       return 1;
7673 #
7674 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7675 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7676 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7677 #     secptr = (pe_header_offset + 4 + 20 +
7678 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7679 #
7680 #     expptr = 0;
7681 #     for (i = 0; i < nsections; i++)
7682 #     {
7683 #       char sname[8];
7684 #       unsigned long secptr1 = secptr + 40 * i;
7685 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7686 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7687 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7688 #       lseek(dll, secptr1, SEEK_SET);
7689 #       read(dll, sname, 8);
7690 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7691 #       {
7692 #           expptr = fptr + (export_rva - vaddr);
7693 #           if (export_rva + export_size > vaddr + vsize)
7694 #               export_size = vsize - (export_rva - vaddr);
7695 #           break;
7696 #       }
7697 #     }
7698 #
7699 #     expdata = (unsigned char*)malloc(export_size);
7700 #     lseek (dll, expptr, SEEK_SET);
7701 #     read (dll, expdata, export_size);
7702 #     erva = expdata - export_rva;
7703 #
7704 #     nexp = pe_as32 (expdata+24);
7705 #     name_rvas = pe_as32 (expdata+32);
7706 #
7707 #     printf ("EXPORTS\n");
7708 #     for (i = 0; i<nexp; i++)
7709 #     {
7710 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7711 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7712 #     }
7713 #
7714 #     return 0;
7715 # }
7716 # /* impgen.c ends here */
7717
7718 EOF
7719     ;;
7720   esac
7721
7722   # We use sed instead of cat because bash on DJGPP gets confused if
7723   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7724   # text mode, it properly converts lines to CR/LF.  This bash problem
7725   # is reportedly fixed, but why not run on old versions too?
7726   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7727
7728   mv -f "${ofile}T" "$ofile" || \
7729     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7730   chmod +x "$ofile"
7731 fi
7732
7733
7734
7735
7736
7737 # This can be used to rebuild libtool when needed
7738 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7739
7740 # Always use our own libtool.
7741 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7742
7743 # Prevent multiple expansion
7744
7745
7746
7747 ol_link_perl=no
7748 if test $ol_enable_perl != no ; then
7749         # Extract the first word of "perl", so it can be a program name with args.
7750 set dummy perl; ac_word=$2
7751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7752 echo "configure:7753: checking for $ac_word" >&5
7753 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7754   echo $ac_n "(cached) $ac_c" 1>&6
7755 else
7756   case "$PERLBIN" in
7757   /*)
7758   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7759   ;;
7760   ?:/*)
7761   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7762   ;;
7763   *)
7764   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7765   ac_dummy="$PATH"
7766   for ac_dir in $ac_dummy; do 
7767     test -z "$ac_dir" && ac_dir=.
7768     if test -f $ac_dir/$ac_word; then
7769       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7770       break
7771     fi
7772   done
7773   IFS="$ac_save_ifs"
7774   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7775   ;;
7776 esac
7777 fi
7778 PERLBIN="$ac_cv_path_PERLBIN"
7779 if test -n "$PERLBIN"; then
7780   echo "$ac_t""$PERLBIN" 1>&6
7781 else
7782   echo "$ac_t""no" 1>&6
7783 fi
7784
7785
7786         if test "no$PERLBIN" = "no" ; then
7787                 if test $ol_enable_perl = yes ; then
7788                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7789                 fi
7790
7791         else
7792                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7793                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7794
7795                 if test x"$ol_enable_perl" = "xyes" ; then
7796                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7797                 else
7798                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7799                 fi
7800                                 ol_link_perl=yes
7801         fi
7802 fi
7803
7804 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7805 echo "configure:7806: checking how to run the C preprocessor" >&5
7806 # On Suns, sometimes $CPP names a directory.
7807 if test -n "$CPP" && test -d "$CPP"; then
7808   CPP=
7809 fi
7810 if test -z "$CPP"; then
7811 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7812   echo $ac_n "(cached) $ac_c" 1>&6
7813 else
7814     # This must be in double quotes, not single quotes, because CPP may get
7815   # substituted into the Makefile and "${CC-cc}" will confuse make.
7816   CPP="${CC-cc} -E"
7817   # On the NeXT, cc -E runs the code through the compiler's parser,
7818   # not just through cpp.
7819   cat > conftest.$ac_ext <<EOF
7820 #line 7821 "configure"
7821 #include "confdefs.h"
7822 #include <assert.h>
7823 Syntax Error
7824 EOF
7825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7826 { (eval echo configure:7827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7828 if test -z "$ac_err"; then
7829   :
7830 else
7831   echo "$ac_err" >&5
7832   echo "configure: failed program was:" >&5
7833   cat conftest.$ac_ext >&5
7834   rm -rf conftest*
7835   CPP="${CC-cc} -E -traditional-cpp"
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 #include <assert.h>
7840 Syntax Error
7841 EOF
7842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7843 { (eval echo configure:7844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7845 if test -z "$ac_err"; then
7846   :
7847 else
7848   echo "$ac_err" >&5
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851   rm -rf conftest*
7852   CPP="${CC-cc} -nologo -E"
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 #include <assert.h>
7857 Syntax Error
7858 EOF
7859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7860 { (eval echo configure:7861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7862 if test -z "$ac_err"; then
7863   :
7864 else
7865   echo "$ac_err" >&5
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   CPP=/lib/cpp
7870 fi
7871 rm -f conftest*
7872 fi
7873 rm -f conftest*
7874 fi
7875 rm -f conftest*
7876   ac_cv_prog_CPP="$CPP"
7877 fi
7878   CPP="$ac_cv_prog_CPP"
7879 else
7880   ac_cv_prog_CPP="$CPP"
7881 fi
7882 echo "$ac_t""$CPP" 1>&6
7883
7884
7885
7886 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7887 echo "configure:7888: checking for Cygwin environment" >&5
7888 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7889   echo $ac_n "(cached) $ac_c" 1>&6
7890 else
7891   cat > conftest.$ac_ext <<EOF
7892 #line 7893 "configure"
7893 #include "confdefs.h"
7894
7895 int main() {
7896
7897 #ifndef __CYGWIN__
7898 #define __CYGWIN__ __CYGWIN32__
7899 #endif
7900 return __CYGWIN__;
7901 ; return 0; }
7902 EOF
7903 if { (eval echo configure:7904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7904   rm -rf conftest*
7905   ac_cv_cygwin=yes
7906 else
7907   echo "configure: failed program was:" >&5
7908   cat conftest.$ac_ext >&5
7909   rm -rf conftest*
7910   ac_cv_cygwin=no
7911 fi
7912 rm -f conftest*
7913 fi
7914
7915 echo "$ac_t""$ac_cv_cygwin" 1>&6
7916 CYGWIN=
7917 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7918 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7919 echo "configure:7920: checking for mingw32 environment" >&5
7920 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7921   echo $ac_n "(cached) $ac_c" 1>&6
7922 else
7923   cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926
7927 int main() {
7928 return __MINGW32__;
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7932   rm -rf conftest*
7933   ac_cv_mingw32=yes
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   ac_cv_mingw32=no
7939 fi
7940 rm -f conftest*
7941 fi
7942
7943 echo "$ac_t""$ac_cv_mingw32" 1>&6
7944 MINGW32=
7945 test "$ac_cv_mingw32" = yes && MINGW32=yes
7946
7947
7948
7949 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7950 echo "configure:7951: checking for executable suffix" >&5
7951 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7952   echo $ac_n "(cached) $ac_c" 1>&6
7953 else
7954   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7955   ac_cv_exeext=.exe
7956 else
7957   rm -f conftest*
7958   echo 'int main () { return 0; }' > conftest.$ac_ext
7959   ac_cv_exeext=
7960   if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7961     for file in conftest.*; do
7962       case $file in
7963       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7964       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7965       esac
7966     done
7967   else
7968     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7969   fi
7970   rm -f conftest*
7971   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7972 fi
7973 fi
7974
7975 EXEEXT=""
7976 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7977 echo "$ac_t""${ac_cv_exeext}" 1>&6
7978 ac_exeext=$EXEEXT
7979
7980 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7981 echo "configure:7982: checking for object suffix" >&5
7982 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7983   echo $ac_n "(cached) $ac_c" 1>&6
7984 else
7985   rm -f conftest*
7986 echo 'int i = 1;' > conftest.$ac_ext
7987 if { (eval echo configure:7988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7988   for ac_file in conftest.*; do
7989     case $ac_file in
7990     *.c) ;;
7991     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7992     esac
7993   done
7994 else
7995   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7996 fi
7997 rm -f conftest*
7998 fi
7999
8000 echo "$ac_t""$ac_cv_objext" 1>&6
8001 OBJEXT=$ac_cv_objext
8002 ac_objext=$ac_cv_objext
8003
8004
8005 cat >> confdefs.h <<EOF
8006 #define EXEEXT "${EXEEXT}"
8007 EOF
8008
8009
8010 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8011 echo "configure:8012: checking for be_app in -lbe" >&5
8012 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8014   echo $ac_n "(cached) $ac_c" 1>&6
8015 else
8016   ac_save_LIBS="$LIBS"
8017 LIBS="-lbe -lroot -lnet $LIBS"
8018 cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 /* Override any gcc2 internal prototype to avoid an error.  */
8022 /* We use char because int might match the return type of a gcc2
8023     builtin and then its argument prototype would still apply.  */
8024 char be_app();
8025
8026 int main() {
8027 be_app()
8028 ; return 0; }
8029 EOF
8030 if { (eval echo configure:8031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8031   rm -rf conftest*
8032   eval "ac_cv_lib_$ac_lib_var=yes"
8033 else
8034   echo "configure: failed program was:" >&5
8035   cat conftest.$ac_ext >&5
8036   rm -rf conftest*
8037   eval "ac_cv_lib_$ac_lib_var=no"
8038 fi
8039 rm -f conftest*
8040 LIBS="$ac_save_LIBS"
8041
8042 fi
8043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8044   echo "$ac_t""yes" 1>&6
8045   LIBS="$LIBS -lbe -lroot -lnet"
8046 else
8047   echo "$ac_t""no" 1>&6
8048 :
8049 fi
8050
8051
8052
8053
8054
8055 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8056 echo "configure:8057: checking for ${CC-cc} option to accept ANSI C" >&5
8057 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8058   echo $ac_n "(cached) $ac_c" 1>&6
8059 else
8060   am_cv_prog_cc_stdc=no
8061 ac_save_CC="$CC"
8062 # Don't try gcc -ansi; that turns off useful extensions and
8063 # breaks some systems' header files.
8064 # AIX                   -qlanglvl=ansi
8065 # Ultrix and OSF/1      -std1
8066 # HP-UX 10.20 and later -Ae
8067 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8068 # SVR4                  -Xc -D__EXTENSIONS__
8069 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8070 do
8071   CC="$ac_save_CC $ac_arg"
8072   cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075 #include <stdarg.h>
8076 #include <stdio.h>
8077 #include <sys/types.h>
8078 #include <sys/stat.h>
8079 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8080 struct buf { int x; };
8081 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8082 static char *e (p, i)
8083      char **p;
8084      int i;
8085 {
8086   return p[i];
8087 }
8088 static char *f (char * (*g) (char **, int), char **p, ...)
8089 {
8090   char *s;
8091   va_list v;
8092   va_start (v,p);
8093   s = g (p, va_arg (v,int));
8094   va_end (v);
8095   return s;
8096 }
8097 int test (int i, double x);
8098 struct s1 {int (*f) (int a);};
8099 struct s2 {int (*f) (double a);};
8100 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8101 int argc;
8102 char **argv;
8103
8104 int main() {
8105
8106 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8107
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8111   rm -rf conftest*
8112   am_cv_prog_cc_stdc="$ac_arg"; break
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116 fi
8117 rm -f conftest*
8118 done
8119 CC="$ac_save_CC"
8120
8121 fi
8122
8123 if test -z "$am_cv_prog_cc_stdc"; then
8124   echo "$ac_t""none needed" 1>&6
8125 else
8126   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8127 fi
8128 case "x$am_cv_prog_cc_stdc" in
8129   x|xno) ;;
8130   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8131 esac
8132
8133 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8134         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8135 fi
8136
8137 # test for make depend flag
8138 OL_MKDEP=
8139 OL_MKDEP_FLAGS=
8140 if test -z "${MKDEP}"; then
8141         OL_MKDEP="${CC-cc}"
8142         if test -z "${MKDEP_FLAGS}"; then
8143                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8144 echo "configure:8145: checking for ${OL_MKDEP} depend flag" >&5
8145 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8146   echo $ac_n "(cached) $ac_c" 1>&6
8147 else
8148   
8149                         ol_cv_mkdep=no
8150                         for flag in "-M" "-xM"; do
8151                                 cat > conftest.c <<EOF
8152  noCode;
8153 EOF
8154                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8155                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8156                                 then
8157                                         if test ! -f conftest."${ac_object}" ; then
8158                                                 ol_cv_mkdep=$flag
8159                                                 OL_MKDEP_FLAGS="$flag"
8160                                                 break
8161                                         fi
8162                                 fi
8163                         done
8164                         rm -f conftest*
8165                 
8166 fi
8167
8168 echo "$ac_t""$ol_cv_mkdep" 1>&6
8169         else
8170                 cc_cv_mkdep=yes
8171                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8172         fi
8173 else
8174         cc_cv_mkdep=yes
8175         OL_MKDEP="${MKDEP}"
8176         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8177 fi
8178
8179
8180
8181 if test "${ol_cv_mkdep}" = no ; then
8182         # this will soon become an error
8183         echo "configure: warning: do not know how to generate dependencies" 1>&2
8184 fi
8185
8186 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8187 echo "configure:8188: checking for afopen in -ls" >&5
8188 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8190   echo $ac_n "(cached) $ac_c" 1>&6
8191 else
8192   ac_save_LIBS="$LIBS"
8193 LIBS="-ls  $LIBS"
8194 cat > conftest.$ac_ext <<EOF
8195 #line 8196 "configure"
8196 #include "confdefs.h"
8197 /* Override any gcc2 internal prototype to avoid an error.  */
8198 /* We use char because int might match the return type of a gcc2
8199     builtin and then its argument prototype would still apply.  */
8200 char afopen();
8201
8202 int main() {
8203 afopen()
8204 ; return 0; }
8205 EOF
8206 if { (eval echo configure:8207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8207   rm -rf conftest*
8208   eval "ac_cv_lib_$ac_lib_var=yes"
8209 else
8210   echo "configure: failed program was:" >&5
8211   cat conftest.$ac_ext >&5
8212   rm -rf conftest*
8213   eval "ac_cv_lib_$ac_lib_var=no"
8214 fi
8215 rm -f conftest*
8216 LIBS="$ac_save_LIBS"
8217
8218 fi
8219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8220   echo "$ac_t""yes" 1>&6
8221   
8222         AUTH_LIBS=-ls
8223         cat >> confdefs.h <<\EOF
8224 #define HAVE_AIX_SECURITY 1
8225 EOF
8226
8227
8228 else
8229   echo "$ac_t""no" 1>&6
8230 fi
8231
8232
8233 case "$target" in
8234 *-ibm-openedition)
8235         ac_cv_func_getopt=no
8236         cat >> confdefs.h <<\EOF
8237 #define BOTH_STRINGS_H 1
8238 EOF
8239
8240         ;;
8241 esac
8242
8243 ol_link_modules=no
8244 WITH_MODULES_ENABLED=no
8245 if test $ol_enable_modules != no ; then
8246         for ac_hdr in ltdl.h
8247 do
8248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8250 echo "configure:8251: checking for $ac_hdr" >&5
8251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8252   echo $ac_n "(cached) $ac_c" 1>&6
8253 else
8254   cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 #include <$ac_hdr>
8258 EOF
8259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8260 { (eval echo configure:8261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8262 if test -z "$ac_err"; then
8263   rm -rf conftest*
8264   eval "ac_cv_header_$ac_safe=yes"
8265 else
8266   echo "$ac_err" >&5
8267   echo "configure: failed program was:" >&5
8268   cat conftest.$ac_ext >&5
8269   rm -rf conftest*
8270   eval "ac_cv_header_$ac_safe=no"
8271 fi
8272 rm -f conftest*
8273 fi
8274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8277   cat >> confdefs.h <<EOF
8278 #define $ac_tr_hdr 1
8279 EOF
8280  
8281 else
8282   echo "$ac_t""no" 1>&6
8283 fi
8284 done
8285
8286
8287         if test $ac_cv_header_ltdl_h = no ; then
8288                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8289         fi
8290
8291         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8292 echo "configure:8293: checking for lt_dlinit in -lltdl" >&5
8293 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8295   echo $ac_n "(cached) $ac_c" 1>&6
8296 else
8297   ac_save_LIBS="$LIBS"
8298 LIBS="-lltdl  $LIBS"
8299 cat > conftest.$ac_ext <<EOF
8300 #line 8301 "configure"
8301 #include "confdefs.h"
8302 /* Override any gcc2 internal prototype to avoid an error.  */
8303 /* We use char because int might match the return type of a gcc2
8304     builtin and then its argument prototype would still apply.  */
8305 char lt_dlinit();
8306
8307 int main() {
8308 lt_dlinit()
8309 ; return 0; }
8310 EOF
8311 if { (eval echo configure:8312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=yes"
8314 else
8315   echo "configure: failed program was:" >&5
8316   cat conftest.$ac_ext >&5
8317   rm -rf conftest*
8318   eval "ac_cv_lib_$ac_lib_var=no"
8319 fi
8320 rm -f conftest*
8321 LIBS="$ac_save_LIBS"
8322
8323 fi
8324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8325   echo "$ac_t""yes" 1>&6
8326   
8327                 MODULES_LIBS=-lltdl
8328                 cat >> confdefs.h <<\EOF
8329 #define HAVE_LIBLTDL 1
8330 EOF
8331
8332         
8333 else
8334   echo "$ac_t""no" 1>&6
8335 fi
8336
8337
8338         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8339                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8340         fi
8341         ol_link_modules=yes
8342         WITH_MODULES_ENABLED=yes
8343
8344 else
8345         for i in $Backends; do
8346                 eval "ol_tmp=\$ol_enable_$i"
8347                 if test $ol_tmp = mod ; then
8348                         echo "configure: warning: building static $i backend" 1>&2
8349                         eval "ol_enable_$i=yes"
8350                 fi
8351         done
8352         for i in $Overlays; do
8353                 eval "ol_tmp=\$ol_enable_$i"
8354                 if test $ol_tmp = mod ; then
8355                         echo "configure: warning: building static $i overlay" 1>&2
8356                         eval "ol_enable_$i=yes"
8357                 fi
8358         done
8359 fi
8360
8361 # test for EBCDIC
8362 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8363 echo "configure:8364: checking for EBCDIC" >&5
8364 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   
8368         cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371
8372 #if !('M' == 0xd4)
8373 #include <__ASCII__/generate_error.h>
8374 #endif
8375
8376 EOF
8377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8378 { (eval echo configure:8379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8380 if test -z "$ac_err"; then
8381   rm -rf conftest*
8382   ol_cv_cpp_ebcdic=yes
8383 else
8384   echo "$ac_err" >&5
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   ol_cv_cpp_ebcdic=no
8389 fi
8390 rm -f conftest*
8391 fi
8392
8393 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8394 if test $ol_cv_cpp_ebcdic = yes ; then
8395         cat >> confdefs.h <<\EOF
8396 #define HAVE_EBCDIC 1
8397 EOF
8398
8399 fi
8400
8401 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8402 echo "configure:8403: checking for ANSI C header files" >&5
8403 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8404   echo $ac_n "(cached) $ac_c" 1>&6
8405 else
8406   cat > conftest.$ac_ext <<EOF
8407 #line 8408 "configure"
8408 #include "confdefs.h"
8409 #include <stdlib.h>
8410 #include <stdarg.h>
8411 #include <string.h>
8412 #include <float.h>
8413 EOF
8414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8415 { (eval echo configure:8416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8417 if test -z "$ac_err"; then
8418   rm -rf conftest*
8419   ol_cv_header_stdc=yes
8420 else
8421   echo "$ac_err" >&5
8422   echo "configure: failed program was:" >&5
8423   cat conftest.$ac_ext >&5
8424   rm -rf conftest*
8425   ol_cv_header_stdc=no
8426 fi
8427 rm -f conftest*
8428
8429 if test $ol_cv_header_stdc = yes; then
8430   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8431 cat > conftest.$ac_ext <<EOF
8432 #line 8433 "configure"
8433 #include "confdefs.h"
8434 #include <string.h>
8435 EOF
8436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8437   egrep "memchr" >/dev/null 2>&1; then
8438   :
8439 else
8440   rm -rf conftest*
8441   ol_cv_header_stdc=no
8442 fi
8443 rm -f conftest*
8444
8445 fi
8446
8447 if test $ol_cv_header_stdc = yes; then
8448   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8449 cat > conftest.$ac_ext <<EOF
8450 #line 8451 "configure"
8451 #include "confdefs.h"
8452 #include <stdlib.h>
8453 EOF
8454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8455   egrep "free" >/dev/null 2>&1; then
8456   :
8457 else
8458   rm -rf conftest*
8459   ol_cv_header_stdc=no
8460 fi
8461 rm -f conftest*
8462
8463 fi
8464
8465 if test $ol_cv_header_stdc = yes; then
8466   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8467 if test "$cross_compiling" = yes; then
8468   :
8469 else
8470   cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 #include <ctype.h>
8474 #ifndef HAVE_EBCDIC
8475 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8476 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8477 #else
8478 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8479                 || ('j' <= (c) && (c) <= 'r') \
8480                 || ('s' <= (c) && (c) <= 'z'))
8481 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8482 #endif
8483 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8484 int main () { int i; for (i = 0; i < 256; i++)
8485 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8486 exit (0); }
8487
8488 EOF
8489 if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8490 then
8491   :
8492 else
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -fr conftest*
8496   ol_cv_header_stdc=no
8497 fi
8498 rm -fr conftest*
8499 fi
8500
8501 fi
8502 fi
8503
8504 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8505 if test $ol_cv_header_stdc = yes; then
8506   cat >> confdefs.h <<\EOF
8507 #define STDC_HEADERS 1
8508 EOF
8509
8510 fi
8511 ac_cv_header_stdc=disable
8512
8513
8514 if test $ol_cv_header_stdc != yes; then
8515         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8516 fi
8517
8518 ac_header_dirent=no
8519 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8520 do
8521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8522 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8523 echo "configure:8524: checking for $ac_hdr that defines DIR" >&5
8524 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8525   echo $ac_n "(cached) $ac_c" 1>&6
8526 else
8527   cat > conftest.$ac_ext <<EOF
8528 #line 8529 "configure"
8529 #include "confdefs.h"
8530 #include <sys/types.h>
8531 #include <$ac_hdr>
8532 int main() {
8533 DIR *dirp = 0;
8534 ; return 0; }
8535 EOF
8536 if { (eval echo configure:8537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8537   rm -rf conftest*
8538   eval "ac_cv_header_dirent_$ac_safe=yes"
8539 else
8540   echo "configure: failed program was:" >&5
8541   cat conftest.$ac_ext >&5
8542   rm -rf conftest*
8543   eval "ac_cv_header_dirent_$ac_safe=no"
8544 fi
8545 rm -f conftest*
8546 fi
8547 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8548   echo "$ac_t""yes" 1>&6
8549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8550   cat >> confdefs.h <<EOF
8551 #define $ac_tr_hdr 1
8552 EOF
8553  ac_header_dirent=$ac_hdr; break
8554 else
8555   echo "$ac_t""no" 1>&6
8556 fi
8557 done
8558 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8559 if test $ac_header_dirent = dirent.h; then
8560 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8561 echo "configure:8562: checking for opendir in -ldir" >&5
8562 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8563 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8564   echo $ac_n "(cached) $ac_c" 1>&6
8565 else
8566   ac_save_LIBS="$LIBS"
8567 LIBS="-ldir  $LIBS"
8568 cat > conftest.$ac_ext <<EOF
8569 #line 8570 "configure"
8570 #include "confdefs.h"
8571 /* Override any gcc2 internal prototype to avoid an error.  */
8572 /* We use char because int might match the return type of a gcc2
8573     builtin and then its argument prototype would still apply.  */
8574 char opendir();
8575
8576 int main() {
8577 opendir()
8578 ; return 0; }
8579 EOF
8580 if { (eval echo configure:8581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8581   rm -rf conftest*
8582   eval "ac_cv_lib_$ac_lib_var=yes"
8583 else
8584   echo "configure: failed program was:" >&5
8585   cat conftest.$ac_ext >&5
8586   rm -rf conftest*
8587   eval "ac_cv_lib_$ac_lib_var=no"
8588 fi
8589 rm -f conftest*
8590 LIBS="$ac_save_LIBS"
8591
8592 fi
8593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8594   echo "$ac_t""yes" 1>&6
8595   LIBS="$LIBS -ldir"
8596 else
8597   echo "$ac_t""no" 1>&6
8598 fi
8599
8600 else
8601 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8602 echo "configure:8603: checking for opendir in -lx" >&5
8603 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8605   echo $ac_n "(cached) $ac_c" 1>&6
8606 else
8607   ac_save_LIBS="$LIBS"
8608 LIBS="-lx  $LIBS"
8609 cat > conftest.$ac_ext <<EOF
8610 #line 8611 "configure"
8611 #include "confdefs.h"
8612 /* Override any gcc2 internal prototype to avoid an error.  */
8613 /* We use char because int might match the return type of a gcc2
8614     builtin and then its argument prototype would still apply.  */
8615 char opendir();
8616
8617 int main() {
8618 opendir()
8619 ; return 0; }
8620 EOF
8621 if { (eval echo configure:8622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8622   rm -rf conftest*
8623   eval "ac_cv_lib_$ac_lib_var=yes"
8624 else
8625   echo "configure: failed program was:" >&5
8626   cat conftest.$ac_ext >&5
8627   rm -rf conftest*
8628   eval "ac_cv_lib_$ac_lib_var=no"
8629 fi
8630 rm -f conftest*
8631 LIBS="$ac_save_LIBS"
8632
8633 fi
8634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8635   echo "$ac_t""yes" 1>&6
8636   LIBS="$LIBS -lx"
8637 else
8638   echo "$ac_t""no" 1>&6
8639 fi
8640
8641 fi
8642
8643 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8644 echo "configure:8645: checking for sys/wait.h that is POSIX.1 compatible" >&5
8645 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8646   echo $ac_n "(cached) $ac_c" 1>&6
8647 else
8648   cat > conftest.$ac_ext <<EOF
8649 #line 8650 "configure"
8650 #include "confdefs.h"
8651 #include <sys/types.h>
8652 #include <sys/wait.h>
8653 #ifndef WEXITSTATUS
8654 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8655 #endif
8656 #ifndef WIFEXITED
8657 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8658 #endif
8659 int main() {
8660 int s;
8661 wait (&s);
8662 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8663 ; return 0; }
8664 EOF
8665 if { (eval echo configure:8666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8666   rm -rf conftest*
8667   ac_cv_header_sys_wait_h=yes
8668 else
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   ac_cv_header_sys_wait_h=no
8673 fi
8674 rm -f conftest*
8675 fi
8676
8677 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8678 if test $ac_cv_header_sys_wait_h = yes; then
8679   cat >> confdefs.h <<\EOF
8680 #define HAVE_SYS_WAIT_H 1
8681 EOF
8682
8683 fi
8684
8685 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8686 echo "configure:8687: checking POSIX termios" >&5
8687 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8688   echo $ac_n "(cached) $ac_c" 1>&6
8689 else
8690   cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693 #include <sys/types.h>
8694 #include <unistd.h>
8695 #include <termios.h>
8696 int main() {
8697 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8698    tcgetattr(0, 0);
8699 ; return 0; }
8700 EOF
8701 if { (eval echo configure:8702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8702   rm -rf conftest*
8703   am_cv_sys_posix_termios=yes
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   am_cv_sys_posix_termios=no
8709 fi
8710 rm -f conftest*
8711 fi
8712
8713 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8714
8715
8716  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8717 echo "configure:8718: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8718 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8719   echo $ac_n "(cached) $ac_c" 1>&6
8720 else
8721   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8722
8723   gwinsz_in_termios_h=no
8724   if test $am_cv_sys_posix_termios = yes; then
8725     cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 #include <sys/types.h>
8729 #     include <termios.h>
8730 #     ifdef TIOCGWINSZ
8731         yes
8732 #     endif
8733     
8734 EOF
8735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8736   egrep "yes" >/dev/null 2>&1; then
8737   rm -rf conftest*
8738   gwinsz_in_termios_h=yes
8739 fi
8740 rm -f conftest*
8741
8742   fi
8743
8744   if test $gwinsz_in_termios_h = no; then
8745     cat > conftest.$ac_ext <<EOF
8746 #line 8747 "configure"
8747 #include "confdefs.h"
8748 #include <sys/types.h>
8749 #     include <sys/ioctl.h>
8750 #     ifdef TIOCGWINSZ
8751         yes
8752 #     endif
8753     
8754 EOF
8755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8756   egrep "yes" >/dev/null 2>&1; then
8757   rm -rf conftest*
8758   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8759 fi
8760 rm -f conftest*
8761
8762   fi
8763   
8764 fi
8765
8766 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8767   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8768     cat >> confdefs.h <<\EOF
8769 #define GWINSZ_IN_SYS_IOCTL 1
8770 EOF
8771
8772   fi
8773
8774 if test $am_cv_sys_posix_termios = yes ; then
8775         cat >> confdefs.h <<\EOF
8776 #define HAVE_POSIX_TERMIOS 1
8777 EOF
8778
8779 fi
8780
8781 for ac_hdr in \
8782         arpa/inet.h             \
8783         arpa/nameser.h  \
8784         assert.h                \
8785         bits/types.h    \
8786         conio.h                 \
8787         crypt.h                 \
8788         direct.h                \
8789         errno.h                 \
8790         fcntl.h                 \
8791         filio.h                 \
8792         getopt.h                \
8793         grp.h                   \
8794         io.h                    \
8795         libutil.h               \
8796         limits.h                \
8797         locale.h                \
8798         netinet/tcp.h   \
8799         malloc.h                \
8800         memory.h                \
8801         psap.h                  \
8802         pwd.h                   \
8803         process.h               \
8804         resolv.h                \
8805         sgtty.h                 \
8806         shadow.h                \
8807         stddef.h                \
8808         string.h                \
8809         strings.h               \
8810         sysexits.h              \
8811         sys/file.h              \
8812         sys/filio.h             \
8813         sys/errno.h             \
8814         sys/ioctl.h             \
8815         sys/param.h             \
8816         sys/resource.h  \
8817         sys/select.h    \
8818         sys/socket.h    \
8819         sys/stat.h              \
8820         sys/syslog.h    \
8821         sys/time.h              \
8822         sys/types.h             \
8823         sys/ucred.h             \
8824         sys/uio.h               \
8825         syslog.h                \
8826         termios.h               \
8827         unistd.h                \
8828         winsock.h               \
8829         winsock2.h              \
8830
8831 do
8832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8834 echo "configure:8835: checking for $ac_hdr" >&5
8835 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 #include <$ac_hdr>
8842 EOF
8843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8844 { (eval echo configure:8845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8846 if test -z "$ac_err"; then
8847   rm -rf conftest*
8848   eval "ac_cv_header_$ac_safe=yes"
8849 else
8850   echo "$ac_err" >&5
8851   echo "configure: failed program was:" >&5
8852   cat conftest.$ac_ext >&5
8853   rm -rf conftest*
8854   eval "ac_cv_header_$ac_safe=no"
8855 fi
8856 rm -f conftest*
8857 fi
8858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8859   echo "$ac_t""yes" 1>&6
8860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8861   cat >> confdefs.h <<EOF
8862 #define $ac_tr_hdr 1
8863 EOF
8864  
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868 done
8869
8870
8871
8872 for ac_func in sigaction sigset 
8873 do
8874 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8875 echo "configure:8876: checking for $ac_func" >&5
8876 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8877   echo $ac_n "(cached) $ac_c" 1>&6
8878 else
8879   cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882 /* System header to define __stub macros and hopefully few prototypes,
8883     which can conflict with char $ac_func(); below.  */
8884 #include <assert.h>
8885 /* Override any gcc2 internal prototype to avoid an error.  */
8886 /* We use char because int might match the return type of a gcc2
8887     builtin and then its argument prototype would still apply.  */
8888 char $ac_func();
8889 char (*f)();
8890
8891 int main() {
8892
8893 /* The GNU C library defines this for functions which it implements
8894     to always fail with ENOSYS.  Some functions are actually named
8895     something starting with __ and the normal name is an alias.  */
8896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8897 choke me
8898 #else
8899 f = $ac_func;
8900 #endif
8901
8902 ; return 0; }
8903 EOF
8904 if { (eval echo configure:8905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8905   rm -rf conftest*
8906   eval "ac_cv_func_$ac_func=yes"
8907 else
8908   echo "configure: failed program was:" >&5
8909   cat conftest.$ac_ext >&5
8910   rm -rf conftest*
8911   eval "ac_cv_func_$ac_func=no"
8912 fi
8913 rm -f conftest*
8914 fi
8915
8916 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8917   echo "$ac_t""yes" 1>&6
8918     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8919   cat >> confdefs.h <<EOF
8920 #define $ac_tr_func 1
8921 EOF
8922  
8923 else
8924   echo "$ac_t""no" 1>&6
8925 fi
8926 done
8927
8928
8929 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8930         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8931 echo "configure:8932: checking for sigset in -lV3" >&5
8932 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8933 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8934   echo $ac_n "(cached) $ac_c" 1>&6
8935 else
8936   ac_save_LIBS="$LIBS"
8937 LIBS="-lV3  $LIBS"
8938 cat > conftest.$ac_ext <<EOF
8939 #line 8940 "configure"
8940 #include "confdefs.h"
8941 /* Override any gcc2 internal prototype to avoid an error.  */
8942 /* We use char because int might match the return type of a gcc2
8943     builtin and then its argument prototype would still apply.  */
8944 char sigset();
8945
8946 int main() {
8947 sigset()
8948 ; return 0; }
8949 EOF
8950 if { (eval echo configure:8951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8951   rm -rf conftest*
8952   eval "ac_cv_lib_$ac_lib_var=yes"
8953 else
8954   echo "configure: failed program was:" >&5
8955   cat conftest.$ac_ext >&5
8956   rm -rf conftest*
8957   eval "ac_cv_lib_$ac_lib_var=no"
8958 fi
8959 rm -f conftest*
8960 LIBS="$ac_save_LIBS"
8961
8962 fi
8963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8964   echo "$ac_t""yes" 1>&6
8965     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8966     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8967   cat >> confdefs.h <<EOF
8968 #define $ac_tr_lib 1
8969 EOF
8970
8971   LIBS="-lV3 $LIBS"
8972
8973 else
8974   echo "$ac_t""no" 1>&6
8975 fi
8976
8977 fi
8978
8979 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
8980 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8981 echo "configure:8982: checking for winsock" >&5
8982 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8983   echo $ac_n "(cached) $ac_c" 1>&6
8984 else
8985   save_LIBS="$LIBS"
8986 for curlib in ws2_32 wsock32; do
8987         LIBS="$LIBS -l$curlib"
8988         cat > conftest.$ac_ext <<EOF
8989 #line 8990 "configure"
8990 #include "confdefs.h"
8991 #include <winsock.h>
8992                         
8993 int main() {
8994
8995                         socket(0,0,0);
8996                         select(0,NULL,NULL,NULL,NULL);
8997                         closesocket(0);
8998                         gethostname(NULL,0);
8999                         
9000 ; return 0; }
9001 EOF
9002 if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9003   rm -rf conftest*
9004   ol_cv_winsock=yes
9005 else
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -rf conftest*
9009   ol_cv_winsock=no
9010 fi
9011 rm -f conftest*
9012
9013         if test $ol_cv_winsock = yes; then
9014                 cat >> confdefs.h <<\EOF
9015 #define HAVE_WINSOCK 1
9016 EOF
9017
9018                 ac_cv_func_socket=yes
9019                 ac_cv_func_select=yes
9020                 ac_cv_func_closesocket=yes
9021                 ac_cv_func_gethostname=yes
9022                 if test $curlib = ws2_32; then
9023                         ol_cv_winsock=winsock2
9024                         cat >> confdefs.h <<\EOF
9025 #define HAVE_WINSOCK2 1
9026 EOF
9027
9028                 fi
9029                 break
9030         fi
9031         LIBS="$save_LIBS"
9032 done
9033 fi
9034
9035 echo "$ac_t""$ol_cv_winsock" 1>&6
9036 fi
9037
9038
9039 echo $ac_n "checking for socket""... $ac_c" 1>&6
9040 echo "configure:9041: checking for socket" >&5
9041 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 /* System header to define __stub macros and hopefully few prototypes,
9048     which can conflict with char socket(); below.  */
9049 #include <assert.h>
9050 /* Override any gcc2 internal prototype to avoid an error.  */
9051 /* We use char because int might match the return type of a gcc2
9052     builtin and then its argument prototype would still apply.  */
9053 char socket();
9054 char (*f)();
9055
9056 int main() {
9057
9058 /* The GNU C library defines this for functions which it implements
9059     to always fail with ENOSYS.  Some functions are actually named
9060     something starting with __ and the normal name is an alias.  */
9061 #if defined (__stub_socket) || defined (__stub___socket)
9062 choke me
9063 #else
9064 f = socket;
9065 #endif
9066
9067 ; return 0; }
9068 EOF
9069 if { (eval echo configure:9070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9070   rm -rf conftest*
9071   eval "ac_cv_func_socket=yes"
9072 else
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   eval "ac_cv_func_socket=no"
9077 fi
9078 rm -f conftest*
9079 fi
9080
9081 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9082   echo "$ac_t""yes" 1>&6
9083   :
9084 else
9085   echo "$ac_t""no" 1>&6
9086         
9087         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9088 echo "configure:9089: checking for main in -lsocket" >&5
9089 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9091   echo $ac_n "(cached) $ac_c" 1>&6
9092 else
9093   ac_save_LIBS="$LIBS"
9094 LIBS="-lsocket  $LIBS"
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098
9099 int main() {
9100 main()
9101 ; return 0; }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9104   rm -rf conftest*
9105   eval "ac_cv_lib_$ac_lib_var=yes"
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -rf conftest*
9110   eval "ac_cv_lib_$ac_lib_var=no"
9111 fi
9112 rm -f conftest*
9113 LIBS="$ac_save_LIBS"
9114
9115 fi
9116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9117   echo "$ac_t""yes" 1>&6
9118     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9119     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9120   cat >> confdefs.h <<EOF
9121 #define $ac_tr_lib 1
9122 EOF
9123
9124   LIBS="-lsocket $LIBS"
9125
9126 else
9127   echo "$ac_t""no" 1>&6
9128 fi
9129
9130         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9131 echo "configure:9132: checking for main in -lnet" >&5
9132 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9134   echo $ac_n "(cached) $ac_c" 1>&6
9135 else
9136   ac_save_LIBS="$LIBS"
9137 LIBS="-lnet  $LIBS"
9138 cat > conftest.$ac_ext <<EOF
9139 #line 9140 "configure"
9140 #include "confdefs.h"
9141
9142 int main() {
9143 main()
9144 ; return 0; }
9145 EOF
9146 if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9147   rm -rf conftest*
9148   eval "ac_cv_lib_$ac_lib_var=yes"
9149 else
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -rf conftest*
9153   eval "ac_cv_lib_$ac_lib_var=no"
9154 fi
9155 rm -f conftest*
9156 LIBS="$ac_save_LIBS"
9157
9158 fi
9159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9160   echo "$ac_t""yes" 1>&6
9161     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9162     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9163   cat >> confdefs.h <<EOF
9164 #define $ac_tr_lib 1
9165 EOF
9166
9167   LIBS="-lnet $LIBS"
9168
9169 else
9170   echo "$ac_t""no" 1>&6
9171 fi
9172
9173         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9174 echo "configure:9175: checking for main in -lnsl_s" >&5
9175 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9177   echo $ac_n "(cached) $ac_c" 1>&6
9178 else
9179   ac_save_LIBS="$LIBS"
9180 LIBS="-lnsl_s  $LIBS"
9181 cat > conftest.$ac_ext <<EOF
9182 #line 9183 "configure"
9183 #include "confdefs.h"
9184
9185 int main() {
9186 main()
9187 ; return 0; }
9188 EOF
9189 if { (eval echo configure:9190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9190   rm -rf conftest*
9191   eval "ac_cv_lib_$ac_lib_var=yes"
9192 else
9193   echo "configure: failed program was:" >&5
9194   cat conftest.$ac_ext >&5
9195   rm -rf conftest*
9196   eval "ac_cv_lib_$ac_lib_var=no"
9197 fi
9198 rm -f conftest*
9199 LIBS="$ac_save_LIBS"
9200
9201 fi
9202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9203   echo "$ac_t""yes" 1>&6
9204     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9205     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9206   cat >> confdefs.h <<EOF
9207 #define $ac_tr_lib 1
9208 EOF
9209
9210   LIBS="-lnsl_s $LIBS"
9211
9212 else
9213   echo "$ac_t""no" 1>&6
9214 fi
9215
9216         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9217 echo "configure:9218: checking for main in -lnsl" >&5
9218 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9220   echo $ac_n "(cached) $ac_c" 1>&6
9221 else
9222   ac_save_LIBS="$LIBS"
9223 LIBS="-lnsl  $LIBS"
9224 cat > conftest.$ac_ext <<EOF
9225 #line 9226 "configure"
9226 #include "confdefs.h"
9227
9228 int main() {
9229 main()
9230 ; return 0; }
9231 EOF
9232 if { (eval echo configure:9233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9233   rm -rf conftest*
9234   eval "ac_cv_lib_$ac_lib_var=yes"
9235 else
9236   echo "configure: failed program was:" >&5
9237   cat conftest.$ac_ext >&5
9238   rm -rf conftest*
9239   eval "ac_cv_lib_$ac_lib_var=no"
9240 fi
9241 rm -f conftest*
9242 LIBS="$ac_save_LIBS"
9243
9244 fi
9245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9246   echo "$ac_t""yes" 1>&6
9247     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9248     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9249   cat >> confdefs.h <<EOF
9250 #define $ac_tr_lib 1
9251 EOF
9252
9253   LIBS="-lnsl $LIBS"
9254
9255 else
9256   echo "$ac_t""no" 1>&6
9257 fi
9258
9259         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9260 echo "configure:9261: checking for socket in -linet" >&5
9261 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9263   echo $ac_n "(cached) $ac_c" 1>&6
9264 else
9265   ac_save_LIBS="$LIBS"
9266 LIBS="-linet  $LIBS"
9267 cat > conftest.$ac_ext <<EOF
9268 #line 9269 "configure"
9269 #include "confdefs.h"
9270 /* Override any gcc2 internal prototype to avoid an error.  */
9271 /* We use char because int might match the return type of a gcc2
9272     builtin and then its argument prototype would still apply.  */
9273 char socket();
9274
9275 int main() {
9276 socket()
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9280   rm -rf conftest*
9281   eval "ac_cv_lib_$ac_lib_var=yes"
9282 else
9283   echo "configure: failed program was:" >&5
9284   cat conftest.$ac_ext >&5
9285   rm -rf conftest*
9286   eval "ac_cv_lib_$ac_lib_var=no"
9287 fi
9288 rm -f conftest*
9289 LIBS="$ac_save_LIBS"
9290
9291 fi
9292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9293   echo "$ac_t""yes" 1>&6
9294     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9295     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9296   cat >> confdefs.h <<EOF
9297 #define $ac_tr_lib 1
9298 EOF
9299
9300   LIBS="-linet $LIBS"
9301
9302 else
9303   echo "$ac_t""no" 1>&6
9304 fi
9305
9306         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9307 echo "configure:9308: checking for main in -lgen" >&5
9308 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9310   echo $ac_n "(cached) $ac_c" 1>&6
9311 else
9312   ac_save_LIBS="$LIBS"
9313 LIBS="-lgen  $LIBS"
9314 cat > conftest.$ac_ext <<EOF
9315 #line 9316 "configure"
9316 #include "confdefs.h"
9317
9318 int main() {
9319 main()
9320 ; return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9323   rm -rf conftest*
9324   eval "ac_cv_lib_$ac_lib_var=yes"
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   eval "ac_cv_lib_$ac_lib_var=no"
9330 fi
9331 rm -f conftest*
9332 LIBS="$ac_save_LIBS"
9333
9334 fi
9335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9336   echo "$ac_t""yes" 1>&6
9337     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9338     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9339   cat >> confdefs.h <<EOF
9340 #define $ac_tr_lib 1
9341 EOF
9342
9343   LIBS="-lgen $LIBS"
9344
9345 else
9346   echo "$ac_t""no" 1>&6
9347 fi
9348
9349
9350 fi
9351
9352
9353 echo $ac_n "checking for select""... $ac_c" 1>&6
9354 echo "configure:9355: checking for select" >&5
9355 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9356   echo $ac_n "(cached) $ac_c" 1>&6
9357 else
9358   cat > conftest.$ac_ext <<EOF
9359 #line 9360 "configure"
9360 #include "confdefs.h"
9361 /* System header to define __stub macros and hopefully few prototypes,
9362     which can conflict with char select(); below.  */
9363 #include <assert.h>
9364 /* Override any gcc2 internal prototype to avoid an error.  */
9365 /* We use char because int might match the return type of a gcc2
9366     builtin and then its argument prototype would still apply.  */
9367 char select();
9368 char (*f)();
9369
9370 int main() {
9371
9372 /* The GNU C library defines this for functions which it implements
9373     to always fail with ENOSYS.  Some functions are actually named
9374     something starting with __ and the normal name is an alias.  */
9375 #if defined (__stub_select) || defined (__stub___select)
9376 choke me
9377 #else
9378 f = select;
9379 #endif
9380
9381 ; return 0; }
9382 EOF
9383 if { (eval echo configure:9384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9384   rm -rf conftest*
9385   eval "ac_cv_func_select=yes"
9386 else
9387   echo "configure: failed program was:" >&5
9388   cat conftest.$ac_ext >&5
9389   rm -rf conftest*
9390   eval "ac_cv_func_select=no"
9391 fi
9392 rm -f conftest*
9393 fi
9394
9395 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9396   echo "$ac_t""yes" 1>&6
9397   :
9398 else
9399   echo "$ac_t""no" 1>&6
9400 { echo "configure: error: select() required." 1>&2; exit 1; }
9401 fi
9402
9403
9404 if test "${ac_cv_header_winsock_h}" != yes; then
9405                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9406 echo "configure:9407: checking types of arguments for select()" >&5
9407  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9411   echo $ac_n "(cached) $ac_c" 1>&6
9412 else
9413     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9417      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9418       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9419        cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 #ifdef HAVE_SYS_TYPES_H
9423 #include <sys/types.h>
9424 #endif
9425 #ifdef HAVE_SYS_TIME_H
9426 #include <sys/time.h>
9427 #endif
9428 #ifdef HAVE_SYS_SELECT_H
9429 #include <sys/select.h>
9430 #endif
9431 #ifdef HAVE_SYS_SOCKET_H
9432 #include <sys/socket.h>
9433 #endif
9434 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
9435 int main() {
9436
9437 ; return 0; }
9438 EOF
9439 if { (eval echo configure:9440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9440   rm -rf conftest*
9441           ac_not_found=no ; break 3
9442 else
9443   echo "configure: failed program was:" >&5
9444   cat conftest.$ac_ext >&5
9445   rm -rf conftest*
9446   ac_not_found=yes
9447 fi
9448 rm -f conftest*
9449       done
9450      done
9451     done
9452    
9453 fi
9454   
9455 fi
9456  
9457 fi
9458  if test "$ac_not_found" = yes; then
9459   ac_cv_func_select_arg1=int 
9460   ac_cv_func_select_arg234='int *' 
9461   ac_cv_func_select_arg5='struct timeval *'
9462  fi
9463  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9464  cat >> confdefs.h <<EOF
9465 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9466 EOF
9467
9468  cat >> confdefs.h <<EOF
9469 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9470 EOF
9471
9472  cat >> confdefs.h <<EOF
9473 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9474 EOF
9475
9476
9477 fi
9478
9479
9480 for ac_func in poll 
9481 do
9482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9483 echo "configure:9484: checking for $ac_func" >&5
9484 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9485   echo $ac_n "(cached) $ac_c" 1>&6
9486 else
9487   cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490 /* System header to define __stub macros and hopefully few prototypes,
9491     which can conflict with char $ac_func(); below.  */
9492 #include <assert.h>
9493 /* Override any gcc2 internal prototype to avoid an error.  */
9494 /* We use char because int might match the return type of a gcc2
9495     builtin and then its argument prototype would still apply.  */
9496 char $ac_func();
9497 char (*f)();
9498
9499 int main() {
9500
9501 /* The GNU C library defines this for functions which it implements
9502     to always fail with ENOSYS.  Some functions are actually named
9503     something starting with __ and the normal name is an alias.  */
9504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9505 choke me
9506 #else
9507 f = $ac_func;
9508 #endif
9509
9510 ; return 0; }
9511 EOF
9512 if { (eval echo configure:9513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9513   rm -rf conftest*
9514   eval "ac_cv_func_$ac_func=yes"
9515 else
9516   echo "configure: failed program was:" >&5
9517   cat conftest.$ac_ext >&5
9518   rm -rf conftest*
9519   eval "ac_cv_func_$ac_func=no"
9520 fi
9521 rm -f conftest*
9522 fi
9523
9524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9525   echo "$ac_t""yes" 1>&6
9526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9527   cat >> confdefs.h <<EOF
9528 #define $ac_tr_func 1
9529 EOF
9530  
9531 else
9532   echo "$ac_t""no" 1>&6
9533 fi
9534 done
9535
9536 for ac_hdr in poll.h 
9537 do
9538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9540 echo "configure:9541: checking for $ac_hdr" >&5
9541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 #include <$ac_hdr>
9548 EOF
9549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9550 { (eval echo configure:9551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9552 if test -z "$ac_err"; then
9553   rm -rf conftest*
9554   eval "ac_cv_header_$ac_safe=yes"
9555 else
9556   echo "$ac_err" >&5
9557   echo "configure: failed program was:" >&5
9558   cat conftest.$ac_ext >&5
9559   rm -rf conftest*
9560   eval "ac_cv_header_$ac_safe=no"
9561 fi
9562 rm -f conftest*
9563 fi
9564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9565   echo "$ac_t""yes" 1>&6
9566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9567   cat >> confdefs.h <<EOF
9568 #define $ac_tr_hdr 1
9569 EOF
9570  
9571 else
9572   echo "$ac_t""no" 1>&6
9573 fi
9574 done
9575
9576
9577 for ac_hdr in sys/epoll.h 
9578 do
9579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9581 echo "configure:9582: checking for $ac_hdr" >&5
9582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9583   echo $ac_n "(cached) $ac_c" 1>&6
9584 else
9585   cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 #include <$ac_hdr>
9589 EOF
9590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9591 { (eval echo configure:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9593 if test -z "$ac_err"; then
9594   rm -rf conftest*
9595   eval "ac_cv_header_$ac_safe=yes"
9596 else
9597   echo "$ac_err" >&5
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=no"
9602 fi
9603 rm -f conftest*
9604 fi
9605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9606   echo "$ac_t""yes" 1>&6
9607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9608   cat >> confdefs.h <<EOF
9609 #define $ac_tr_hdr 1
9610 EOF
9611  
9612 else
9613   echo "$ac_t""no" 1>&6
9614 fi
9615 done
9616
9617 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9618 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9619 echo "configure:9620: checking for epoll system call" >&5
9620 if test "$cross_compiling" = yes; then
9621   echo "$ac_t""no" 1>&6
9622 else
9623   cat > conftest.$ac_ext <<EOF
9624 #line 9625 "configure"
9625 #include "confdefs.h"
9626 int main(int argc, char *argv)
9627 {
9628         int epfd = epoll_create(256);
9629         exit (epfd == -1 ? 1 : 0);
9630 }
9631 EOF
9632 if { (eval echo configure:9633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9633 then
9634   echo "$ac_t""yes" 1>&6
9635 cat >> confdefs.h <<\EOF
9636 #define HAVE_EPOLL 1
9637 EOF
9638
9639 else
9640   echo "configure: failed program was:" >&5
9641   cat conftest.$ac_ext >&5
9642   rm -fr conftest*
9643   echo "$ac_t""no" 1>&6
9644 fi
9645 rm -fr conftest*
9646 fi
9647
9648 fi
9649
9650 # strerror checks
9651 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9652 echo "configure:9653: checking declaration of sys_errlist" >&5
9653 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   
9657         cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660
9661 #include <stdio.h>
9662 #include <sys/types.h>
9663 #include <errno.h>
9664 #ifdef WINNT
9665 #include <stdlib.h>
9666 #endif 
9667 int main() {
9668 char *c = (char *) *sys_errlist
9669 ; return 0; }
9670 EOF
9671 if { (eval echo configure:9672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9672   rm -rf conftest*
9673   ol_cv_dcl_sys_errlist=yes
9674         ol_cv_have_sys_errlist=yes
9675 else
9676   echo "configure: failed program was:" >&5
9677   cat conftest.$ac_ext >&5
9678   rm -rf conftest*
9679   ol_cv_dcl_sys_errlist=no
9680 fi
9681 rm -f conftest*
9682 fi
9683
9684 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9685 #
9686 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9687 if test $ol_cv_dcl_sys_errlist = no ; then
9688         cat >> confdefs.h <<\EOF
9689 #define DECL_SYS_ERRLIST 1
9690 EOF
9691
9692
9693         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9694 echo "configure:9695: checking existence of sys_errlist" >&5
9695 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9696   echo $ac_n "(cached) $ac_c" 1>&6
9697 else
9698   
9699                 cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 #include <errno.h>
9703 int main() {
9704 char *c = (char *) *sys_errlist
9705 ; return 0; }
9706 EOF
9707 if { (eval echo configure:9708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9708   rm -rf conftest*
9709   ol_cv_have_sys_errlist=yes
9710 else
9711   echo "configure: failed program was:" >&5
9712   cat conftest.$ac_ext >&5
9713   rm -rf conftest*
9714   ol_cv_have_sys_errlist=no
9715 fi
9716 rm -f conftest*
9717 fi
9718
9719 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9720 fi
9721 if test $ol_cv_have_sys_errlist = yes ; then
9722         cat >> confdefs.h <<\EOF
9723 #define HAVE_SYS_ERRLIST 1
9724 EOF
9725
9726 fi
9727  for ac_func in strerror strerror_r
9728 do
9729 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9730 echo "configure:9731: checking for $ac_func" >&5
9731 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737 /* System header to define __stub macros and hopefully few prototypes,
9738     which can conflict with char $ac_func(); below.  */
9739 #include <assert.h>
9740 /* Override any gcc2 internal prototype to avoid an error.  */
9741 /* We use char because int might match the return type of a gcc2
9742     builtin and then its argument prototype would still apply.  */
9743 char $ac_func();
9744 char (*f)();
9745
9746 int main() {
9747
9748 /* The GNU C library defines this for functions which it implements
9749     to always fail with ENOSYS.  Some functions are actually named
9750     something starting with __ and the normal name is an alias.  */
9751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9752 choke me
9753 #else
9754 f = $ac_func;
9755 #endif
9756
9757 ; return 0; }
9758 EOF
9759 if { (eval echo configure:9760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9760   rm -rf conftest*
9761   eval "ac_cv_func_$ac_func=yes"
9762 else
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -rf conftest*
9766   eval "ac_cv_func_$ac_func=no"
9767 fi
9768 rm -f conftest*
9769 fi
9770
9771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9772   echo "$ac_t""yes" 1>&6
9773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9774   cat >> confdefs.h <<EOF
9775 #define $ac_tr_func 1
9776 EOF
9777  
9778 else
9779   echo "$ac_t""no" 1>&6
9780 fi
9781 done
9782
9783 ol_cv_func_strerror_r=no
9784 if test "${ac_cv_func_strerror_r}" = yes ; then
9785         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9786 echo "configure:9787: checking non-posix strerror_r" >&5
9787 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9788   echo $ac_n "(cached) $ac_c" 1>&6
9789 else
9790   
9791         cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 #include <string.h>
9795 EOF
9796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9797   egrep "strerror_r" >/dev/null 2>&1; then
9798   rm -rf conftest*
9799   ol_decl_strerror_r=yes
9800 else
9801   rm -rf conftest*
9802   ol_decl_strerror_r=no
9803 fi
9804 rm -f conftest*
9805
9806         if test $ol_decl_strerror_r = yes ; then
9807                 cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <string.h>
9811 int main() {
9812    /* from autoconf 2.59 */
9813                                 char buf[100];
9814                                 char x = *strerror_r (0, buf, sizeof buf);
9815                                 char *p = strerror_r (0, buf, sizeof buf);
9816                         
9817 ; return 0; }
9818 EOF
9819 if { (eval echo configure:9820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9820   rm -rf conftest*
9821   ol_cv_nonposix_strerror_r=yes
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -rf conftest*
9826   ol_cv_nonposix_strerror_r=no
9827 fi
9828 rm -f conftest*
9829         else
9830                 if test "$cross_compiling" = yes; then
9831   ol_cv_nonposix_strerror=no
9832 else
9833   cat > conftest.$ac_ext <<EOF
9834 #line 9835 "configure"
9835 #include "confdefs.h"
9836
9837                         main() {
9838                                 char buf[100];
9839                                 buf[0] = 0;
9840                                 strerror_r( 1, buf, sizeof buf );
9841                                 exit( buf[0] == 0 );
9842                         }
9843                         
9844 EOF
9845 if { (eval echo configure:9846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9846 then
9847   ol_cv_nonposix_strerror_r=yes
9848 else
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -fr conftest*
9852   ol_cv_nonposix_strerror=no
9853 fi
9854 rm -fr conftest*
9855 fi
9856
9857         fi
9858         
9859 fi
9860
9861 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9862 if test $ol_cv_nonposix_strerror_r = yes ; then
9863         cat >> confdefs.h <<\EOF
9864 #define HAVE_NONPOSIX_STRERROR_R 1
9865 EOF
9866
9867 fi
9868
9869 elif test "${ac_cv_func_strerror}" = no ; then
9870         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9871 echo "configure:9872: checking declaration of sys_errlist" >&5
9872 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9873   echo $ac_n "(cached) $ac_c" 1>&6
9874 else
9875   
9876         cat > conftest.$ac_ext <<EOF
9877 #line 9878 "configure"
9878 #include "confdefs.h"
9879
9880 #include <stdio.h>
9881 #include <sys/types.h>
9882 #include <errno.h>
9883 #ifdef WINNT
9884 #include <stdlib.h>
9885 #endif 
9886 int main() {
9887 char *c = (char *) *sys_errlist
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9891   rm -rf conftest*
9892   ol_cv_dcl_sys_errlist=yes
9893         ol_cv_have_sys_errlist=yes
9894 else
9895   echo "configure: failed program was:" >&5
9896   cat conftest.$ac_ext >&5
9897   rm -rf conftest*
9898   ol_cv_dcl_sys_errlist=no
9899 fi
9900 rm -f conftest*
9901 fi
9902
9903 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9904 #
9905 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9906 if test $ol_cv_dcl_sys_errlist = no ; then
9907         cat >> confdefs.h <<\EOF
9908 #define DECL_SYS_ERRLIST 1
9909 EOF
9910
9911
9912         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9913 echo "configure:9914: checking existence of sys_errlist" >&5
9914 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9915   echo $ac_n "(cached) $ac_c" 1>&6
9916 else
9917   
9918                 cat > conftest.$ac_ext <<EOF
9919 #line 9920 "configure"
9920 #include "confdefs.h"
9921 #include <errno.h>
9922 int main() {
9923 char *c = (char *) *sys_errlist
9924 ; return 0; }
9925 EOF
9926 if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9927   rm -rf conftest*
9928   ol_cv_have_sys_errlist=yes
9929 else
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   ol_cv_have_sys_errlist=no
9934 fi
9935 rm -f conftest*
9936 fi
9937
9938 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9939 fi
9940 if test $ol_cv_have_sys_errlist = yes ; then
9941         cat >> confdefs.h <<\EOF
9942 #define HAVE_SYS_ERRLIST 1
9943 EOF
9944
9945 fi
9946
9947 fi
9948
9949
9950 for ac_hdr in regex.h 
9951 do
9952 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9953 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9954 echo "configure:9955: checking for $ac_hdr" >&5
9955 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9956   echo $ac_n "(cached) $ac_c" 1>&6
9957 else
9958   cat > conftest.$ac_ext <<EOF
9959 #line 9960 "configure"
9960 #include "confdefs.h"
9961 #include <$ac_hdr>
9962 EOF
9963 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9964 { (eval echo configure:9965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9965 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9966 if test -z "$ac_err"; then
9967   rm -rf conftest*
9968   eval "ac_cv_header_$ac_safe=yes"
9969 else
9970   echo "$ac_err" >&5
9971   echo "configure: failed program was:" >&5
9972   cat conftest.$ac_ext >&5
9973   rm -rf conftest*
9974   eval "ac_cv_header_$ac_safe=no"
9975 fi
9976 rm -f conftest*
9977 fi
9978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9979   echo "$ac_t""yes" 1>&6
9980     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9981   cat >> confdefs.h <<EOF
9982 #define $ac_tr_hdr 1
9983 EOF
9984  
9985 else
9986   echo "$ac_t""no" 1>&6
9987 fi
9988 done
9989
9990 if test "$ac_cv_header_regex_h" != yes ; then
9991         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9992 fi
9993
9994 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9995 echo "configure:9996: checking for library containing regfree" >&5
9996 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9997   echo $ac_n "(cached) $ac_c" 1>&6
9998 else
9999   ac_func_search_save_LIBS="$LIBS"
10000 ac_cv_search_regfree="no"
10001 cat > conftest.$ac_ext <<EOF
10002 #line 10003 "configure"
10003 #include "confdefs.h"
10004 /* Override any gcc2 internal prototype to avoid an error.  */
10005 /* We use char because int might match the return type of a gcc2
10006     builtin and then its argument prototype would still apply.  */
10007 char regfree();
10008
10009 int main() {
10010 regfree()
10011 ; return 0; }
10012 EOF
10013 if { (eval echo configure:10014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10014   rm -rf conftest*
10015   ac_cv_search_regfree="none required"
10016 else
10017   echo "configure: failed program was:" >&5
10018   cat conftest.$ac_ext >&5
10019 fi
10020 rm -f conftest*
10021 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10022 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10023 cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 /* Override any gcc2 internal prototype to avoid an error.  */
10027 /* We use char because int might match the return type of a gcc2
10028     builtin and then its argument prototype would still apply.  */
10029 char regfree();
10030
10031 int main() {
10032 regfree()
10033 ; return 0; }
10034 EOF
10035 if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10036   rm -rf conftest*
10037   ac_cv_search_regfree="-l$ac_lib"
10038 break
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042 fi
10043 rm -f conftest*
10044 done
10045 LIBS="$ac_func_search_save_LIBS"
10046 fi
10047
10048 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10049 if test "$ac_cv_search_regfree" != "no"; then
10050   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10051   :
10052 else :
10053   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10054 fi
10055
10056
10057 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10058 echo "configure:10059: checking for compatible POSIX regex" >&5
10059 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   
10063         if test "$cross_compiling" = yes; then
10064   ol_cv_c_posix_regex=cross
10065 else
10066   cat > conftest.$ac_ext <<EOF
10067 #line 10068 "configure"
10068 #include "confdefs.h"
10069
10070 #include <sys/types.h>
10071 #include <regex.h>
10072 static char *pattern, *string;
10073 main()
10074 {
10075         int rc;
10076         regex_t re;
10077
10078         pattern = "^A";
10079
10080         if(regcomp(&re, pattern, 0)) {
10081                 return -1;
10082         }
10083         
10084         string = "ALL MATCH";
10085         
10086         rc = regexec(&re, string, 0, (void*)0, 0);
10087
10088         regfree(&re);
10089
10090         return rc;
10091 }
10092 EOF
10093 if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10094 then
10095   ol_cv_c_posix_regex=yes
10096 else
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -fr conftest*
10100   ol_cv_c_posix_regex=no
10101 fi
10102 rm -fr conftest*
10103 fi
10104
10105 fi
10106
10107 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10108
10109 if test "$ol_cv_c_posix_regex" = no ; then
10110         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10111 fi
10112
10113
10114 have_uuid=no
10115 for ac_hdr in sys/uuid.h
10116 do
10117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10119 echo "configure:10120: checking for $ac_hdr" >&5
10120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126 #include <$ac_hdr>
10127 EOF
10128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10129 { (eval echo configure:10130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10131 if test -z "$ac_err"; then
10132   rm -rf conftest*
10133   eval "ac_cv_header_$ac_safe=yes"
10134 else
10135   echo "$ac_err" >&5
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_header_$ac_safe=no"
10140 fi
10141 rm -f conftest*
10142 fi
10143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10144   echo "$ac_t""yes" 1>&6
10145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10146   cat >> confdefs.h <<EOF
10147 #define $ac_tr_hdr 1
10148 EOF
10149  
10150 else
10151   echo "$ac_t""no" 1>&6
10152 fi
10153 done
10154
10155 if test $ac_cv_header_sys_uuid_h = yes ; then
10156         save_LIBS="$LIBS"
10157         
10158 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10159 echo "configure:10160: checking for library containing uuid_to_str" >&5
10160 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10161   echo $ac_n "(cached) $ac_c" 1>&6
10162 else
10163   ac_func_search_save_LIBS="$LIBS"
10164 ac_cv_search_uuid_to_str="no"
10165 cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 /* Override any gcc2 internal prototype to avoid an error.  */
10169 /* We use char because int might match the return type of a gcc2
10170     builtin and then its argument prototype would still apply.  */
10171 char uuid_to_str();
10172
10173 int main() {
10174 uuid_to_str()
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   ac_cv_search_uuid_to_str="none required"
10180 else
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183 fi
10184 rm -f conftest*
10185 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10186 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10187 cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190 /* Override any gcc2 internal prototype to avoid an error.  */
10191 /* We use char because int might match the return type of a gcc2
10192     builtin and then its argument prototype would still apply.  */
10193 char uuid_to_str();
10194
10195 int main() {
10196 uuid_to_str()
10197 ; return 0; }
10198 EOF
10199 if { (eval echo configure:10200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10200   rm -rf conftest*
10201   ac_cv_search_uuid_to_str="-l$ac_lib"
10202 break
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206 fi
10207 rm -f conftest*
10208 done
10209 LIBS="$ac_func_search_save_LIBS"
10210 fi
10211
10212 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10213 if test "$ac_cv_search_uuid_to_str" != "no"; then
10214   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10215   have_uuid=yes
10216 else :
10217   :
10218 fi
10219         LIBS="$save_LIBS"
10220
10221         if test have_uuid = yes ; then
10222                 cat >> confdefs.h <<\EOF
10223 #define HAVE_UUID_TO_STR 1
10224 EOF
10225
10226
10227                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10228                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10229         fi
10230 fi
10231
10232 if test $have_uuid = no ; then
10233         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10234 echo "configure:10235: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10235         save_LIBS="$LIBS"
10236         LIBS="$LIBS -lrpcrt4"
10237         cat > conftest.$ac_ext <<EOF
10238 #line 10239 "configure"
10239 #include "confdefs.h"
10240
10241                 int __stdcall UuidCreate(void *);
10242                 int __stdcall UuidToStringA(void *,void **);
10243                 
10244 int main() {
10245
10246                 UuidCreate(0);
10247                 UuidToStringA(0,0);
10248                 
10249 ; return 0; }
10250 EOF
10251 if { (eval echo configure:10252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10252   rm -rf conftest*
10253   need_rpcrt=yes
10254 else
10255   echo "configure: failed program was:" >&5
10256   cat conftest.$ac_ext >&5
10257   rm -rf conftest*
10258   need_rpcrt=no
10259 fi
10260 rm -f conftest*
10261         if test $need_rpcrt = yes; then
10262                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10263         fi
10264         LIBS="$save_LIBS"
10265         echo "$ac_t""$need_rpcrt" 1>&6
10266 fi
10267
10268 ol_cv_lib_resolver=no
10269 if test $ol_cv_lib_resolver = no ; then
10270         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10271 echo "configure:10272: checking for resolver link (default)" >&5
10272 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10273   echo $ac_n "(cached) $ac_c" 1>&6
10274 else
10275   
10276         ol_RESOLVER_LIB=
10277         ol_LIBS=$LIBS
10278         LIBS="$ol_RESOLVER_LIB $LIBS"
10279
10280         cat > conftest.$ac_ext <<EOF
10281 #line 10282 "configure"
10282 #include "confdefs.h"
10283
10284 #ifdef HAVE_SYS_TYPES_H
10285 #       include <sys/types.h>
10286 #endif
10287 #include <netinet/in.h>
10288 #ifdef HAVE_ARPA_NAMESER_H
10289 #       include <arpa/nameser.h>
10290 #endif
10291 #ifdef HAVE_RESOLV_H
10292 #       include <resolv.h>
10293 #endif
10294
10295 int main() {
10296 {
10297         int len, status;
10298         char *request = NULL;
10299         unsigned char reply[64*1024];
10300         unsigned char host[64*1024];
10301         unsigned char *p;
10302
10303 #ifdef NS_HFIXEDSZ
10304         /* Bind 8/9 interface */
10305         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10306 #else
10307         /* Bind 4 interface */
10308 # ifndef T_SRV
10309 #  define T_SRV 33
10310 # endif
10311         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10312 #endif
10313         p = reply;
10314 #ifdef NS_HFIXEDSZ
10315         /* Bind 8/9 interface */
10316         p += NS_HFIXEDSZ;
10317 #elif defined(HFIXEDSZ)
10318         /* Bind 4 interface w/ HFIXEDSZ */
10319         p += HFIXEDSZ;
10320 #else
10321         /* Bind 4 interface w/o HFIXEDSZ */
10322         p += sizeof(HEADER);
10323 #endif
10324         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10325 }
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10329   rm -rf conftest*
10330   ol_cv_resolver_none=yes
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   ol_cv_resolver_none=no
10336 fi
10337 rm -f conftest*
10338
10339         LIBS="$ol_LIBS"
10340
10341 fi
10342
10343 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10344
10345         if test $ol_cv_resolver_none = yes ; then
10346                 ol_cv_lib_resolver=yes
10347         fi
10348 fi
10349
10350 if test $ol_cv_lib_resolver = no ; then
10351         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10352 echo "configure:10353: checking for resolver link (-lresolv)" >&5
10353 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10354   echo $ac_n "(cached) $ac_c" 1>&6
10355 else
10356   
10357         ol_RESOLVER_LIB=-lresolv
10358         ol_LIBS=$LIBS
10359         LIBS="$ol_RESOLVER_LIB $LIBS"
10360
10361         cat > conftest.$ac_ext <<EOF
10362 #line 10363 "configure"
10363 #include "confdefs.h"
10364
10365 #ifdef HAVE_SYS_TYPES_H
10366 #       include <sys/types.h>
10367 #endif
10368 #include <netinet/in.h>
10369 #ifdef HAVE_ARPA_NAMESER_H
10370 #       include <arpa/nameser.h>
10371 #endif
10372 #ifdef HAVE_RESOLV_H
10373 #       include <resolv.h>
10374 #endif
10375
10376 int main() {
10377 {
10378         int len, status;
10379         char *request = NULL;
10380         unsigned char reply[64*1024];
10381         unsigned char host[64*1024];
10382         unsigned char *p;
10383
10384 #ifdef NS_HFIXEDSZ
10385         /* Bind 8/9 interface */
10386         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10387 #else
10388         /* Bind 4 interface */
10389 # ifndef T_SRV
10390 #  define T_SRV 33
10391 # endif
10392         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10393 #endif
10394         p = reply;
10395 #ifdef NS_HFIXEDSZ
10396         /* Bind 8/9 interface */
10397         p += NS_HFIXEDSZ;
10398 #elif defined(HFIXEDSZ)
10399         /* Bind 4 interface w/ HFIXEDSZ */
10400         p += HFIXEDSZ;
10401 #else
10402         /* Bind 4 interface w/o HFIXEDSZ */
10403         p += sizeof(HEADER);
10404 #endif
10405         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10406 }
10407 ; return 0; }
10408 EOF
10409 if { (eval echo configure:10410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10410   rm -rf conftest*
10411   ol_cv_resolver_resolv=yes
10412 else
10413   echo "configure: failed program was:" >&5
10414   cat conftest.$ac_ext >&5
10415   rm -rf conftest*
10416   ol_cv_resolver_resolv=no
10417 fi
10418 rm -f conftest*
10419
10420         LIBS="$ol_LIBS"
10421
10422 fi
10423
10424 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10425
10426         if test $ol_cv_resolver_resolv = yes ; then
10427                 ol_cv_lib_resolver=-lresolv
10428         fi
10429 fi
10430
10431 if test $ol_cv_lib_resolver = no ; then
10432         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10433 echo "configure:10434: checking for resolver link (-lbind)" >&5
10434 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   
10438         ol_RESOLVER_LIB=-lbind
10439         ol_LIBS=$LIBS
10440         LIBS="$ol_RESOLVER_LIB $LIBS"
10441
10442         cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445
10446 #ifdef HAVE_SYS_TYPES_H
10447 #       include <sys/types.h>
10448 #endif
10449 #include <netinet/in.h>
10450 #ifdef HAVE_ARPA_NAMESER_H
10451 #       include <arpa/nameser.h>
10452 #endif
10453 #ifdef HAVE_RESOLV_H
10454 #       include <resolv.h>
10455 #endif
10456
10457 int main() {
10458 {
10459         int len, status;
10460         char *request = NULL;
10461         unsigned char reply[64*1024];
10462         unsigned char host[64*1024];
10463         unsigned char *p;
10464
10465 #ifdef NS_HFIXEDSZ
10466         /* Bind 8/9 interface */
10467         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10468 #else
10469         /* Bind 4 interface */
10470 # ifndef T_SRV
10471 #  define T_SRV 33
10472 # endif
10473         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10474 #endif
10475         p = reply;
10476 #ifdef NS_HFIXEDSZ
10477         /* Bind 8/9 interface */
10478         p += NS_HFIXEDSZ;
10479 #elif defined(HFIXEDSZ)
10480         /* Bind 4 interface w/ HFIXEDSZ */
10481         p += HFIXEDSZ;
10482 #else
10483         /* Bind 4 interface w/o HFIXEDSZ */
10484         p += sizeof(HEADER);
10485 #endif
10486         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10487 }
10488 ; return 0; }
10489 EOF
10490 if { (eval echo configure:10491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10491   rm -rf conftest*
10492   ol_cv_resolver_bind=yes
10493 else
10494   echo "configure: failed program was:" >&5
10495   cat conftest.$ac_ext >&5
10496   rm -rf conftest*
10497   ol_cv_resolver_bind=no
10498 fi
10499 rm -f conftest*
10500
10501         LIBS="$ol_LIBS"
10502
10503 fi
10504
10505 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10506
10507         if test $ol_cv_resolver_bind = yes ; then
10508                 ol_cv_lib_resolver=-lbind
10509         fi
10510 fi
10511
10512
10513
10514 ol_link_dnssrv=no
10515 if test "$ol_cv_lib_resolver" != no ; then
10516         cat >> confdefs.h <<\EOF
10517 #define HAVE_RES_QUERY 1
10518 EOF
10519
10520
10521         if test "$ol_enable_dnssrv" != no ; then
10522                 ol_link_dnssrv=yes
10523         fi
10524
10525         if test "$ol_cv_lib_resolver" != yes ; then
10526                 LIBS="$ol_cv_lib_resolver $LIBS"
10527         fi
10528 fi
10529
10530 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10531         if test "$ol_link_dnssrv" = no ; then
10532                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10533         fi
10534 else
10535         ol_enable_dnssrv=no
10536 fi
10537
10538 for ac_func in hstrerror 
10539 do
10540 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10541 echo "configure:10542: checking for $ac_func" >&5
10542 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10543   echo $ac_n "(cached) $ac_c" 1>&6
10544 else
10545   cat > conftest.$ac_ext <<EOF
10546 #line 10547 "configure"
10547 #include "confdefs.h"
10548 /* System header to define __stub macros and hopefully few prototypes,
10549     which can conflict with char $ac_func(); below.  */
10550 #include <assert.h>
10551 /* Override any gcc2 internal prototype to avoid an error.  */
10552 /* We use char because int might match the return type of a gcc2
10553     builtin and then its argument prototype would still apply.  */
10554 char $ac_func();
10555 char (*f)();
10556
10557 int main() {
10558
10559 /* The GNU C library defines this for functions which it implements
10560     to always fail with ENOSYS.  Some functions are actually named
10561     something starting with __ and the normal name is an alias.  */
10562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10563 choke me
10564 #else
10565 f = $ac_func;
10566 #endif
10567
10568 ; return 0; }
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10571   rm -rf conftest*
10572   eval "ac_cv_func_$ac_func=yes"
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_func_$ac_func=no"
10578 fi
10579 rm -f conftest*
10580 fi
10581
10582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10583   echo "$ac_t""yes" 1>&6
10584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10585   cat >> confdefs.h <<EOF
10586 #define $ac_tr_func 1
10587 EOF
10588  
10589 else
10590   echo "$ac_t""no" 1>&6
10591 fi
10592 done
10593
10594
10595 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10596 do
10597 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10598 echo "configure:10599: checking for $ac_func" >&5
10599 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605 /* System header to define __stub macros and hopefully few prototypes,
10606     which can conflict with char $ac_func(); below.  */
10607 #include <assert.h>
10608 /* Override any gcc2 internal prototype to avoid an error.  */
10609 /* We use char because int might match the return type of a gcc2
10610     builtin and then its argument prototype would still apply.  */
10611 char $ac_func();
10612 char (*f)();
10613
10614 int main() {
10615
10616 /* The GNU C library defines this for functions which it implements
10617     to always fail with ENOSYS.  Some functions are actually named
10618     something starting with __ and the normal name is an alias.  */
10619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10620 choke me
10621 #else
10622 f = $ac_func;
10623 #endif
10624
10625 ; return 0; }
10626 EOF
10627 if { (eval echo configure:10628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10628   rm -rf conftest*
10629   eval "ac_cv_func_$ac_func=yes"
10630 else
10631   echo "configure: failed program was:" >&5
10632   cat conftest.$ac_ext >&5
10633   rm -rf conftest*
10634   eval "ac_cv_func_$ac_func=no"
10635 fi
10636 rm -f conftest*
10637 fi
10638
10639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10642   cat >> confdefs.h <<EOF
10643 #define $ac_tr_func 1
10644 EOF
10645  
10646 else
10647   echo "$ac_t""no" 1>&6
10648 fi
10649 done
10650
10651
10652 ol_link_ipv6=no
10653 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10654         if test $ol_enable_ipv6 = yes ; then
10655                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10656         fi
10657 elif test $ol_enable_ipv6 != no ; then
10658         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10659 echo "configure:10660: checking INET6_ADDRSTRLEN" >&5
10660 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10661   echo $ac_n "(cached) $ac_c" 1>&6
10662 else
10663   
10664                 cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667
10668 #                       include <netinet/in.h>
10669 #                       ifdef INET6_ADDRSTRLEN
10670                                 __has_inet6_addrstrlen__;
10671 #                       endif
10672                 
10673 EOF
10674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10675   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10676   rm -rf conftest*
10677   ol_cv_inet6_addrstrlen=yes
10678 else
10679   rm -rf conftest*
10680   ol_cv_inet6_addrstrlen=no
10681 fi
10682 rm -f conftest*
10683
10684 fi
10685
10686 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10687
10688
10689         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10690 echo "configure:10691: checking struct sockaddr_storage" >&5
10691 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10692   echo $ac_n "(cached) $ac_c" 1>&6
10693 else
10694   
10695                 cat > conftest.$ac_ext <<EOF
10696 #line 10697 "configure"
10697 #include "confdefs.h"
10698
10699 #include <sys/types.h>
10700 #include <sys/socket.h>
10701
10702 int main() {
10703
10704                         struct sockaddr_storage ss;
10705
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10709   rm -rf conftest*
10710   ol_cv_struct_sockaddr_storage=yes
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   ol_cv_struct_sockaddr_storage=no
10716 fi
10717 rm -f conftest*
10718 fi
10719
10720 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10721
10722         if test $ol_cv_inet6_addrstrlen = yes \
10723                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10724                 ol_link_ipv6=yes
10725         elif test $ol_enable_ipv6 = yes \
10726                         -a $ol_cv_inet6_addrstrlen = no ; then
10727                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10728         elif test $ol_enable_ipv6 = yes \
10729                         -a $ol_cv_struct_sockaddr_storage = no ; then
10730                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10731         fi
10732 fi
10733
10734 if test $ol_enable_local != no ; then
10735         for ac_hdr in sys/un.h 
10736 do
10737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10739 echo "configure:10740: checking for $ac_hdr" >&5
10740 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <$ac_hdr>
10747 EOF
10748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10749 { (eval echo configure:10750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10751 if test -z "$ac_err"; then
10752   rm -rf conftest*
10753   eval "ac_cv_header_$ac_safe=yes"
10754 else
10755   echo "$ac_err" >&5
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_header_$ac_safe=no"
10760 fi
10761 rm -f conftest*
10762 fi
10763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10764   echo "$ac_t""yes" 1>&6
10765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10766   cat >> confdefs.h <<EOF
10767 #define $ac_tr_hdr 1
10768 EOF
10769  
10770 else
10771   echo "$ac_t""no" 1>&6
10772 fi
10773 done
10774
10775
10776         if test $ol_enable_local = auto ; then
10777                 ol_enable_local=$ac_cv_header_sys_un_h
10778         elif test $ac_cv_header_sys_un_h = no ; then
10779                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10780         fi
10781 fi
10782
10783 ol_link_kbind=no
10784 ol_link_krb5=no
10785 ol_link_krb4=no
10786
10787 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10788         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10789         -o $ol_with_kerberos = k425 ; then
10790
10791         for ac_hdr in krb5.h
10792 do
10793 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10794 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10795 echo "configure:10796: checking for $ac_hdr" >&5
10796 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10797   echo $ac_n "(cached) $ac_c" 1>&6
10798 else
10799   cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802 #include <$ac_hdr>
10803 EOF
10804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10805 { (eval echo configure:10806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10807 if test -z "$ac_err"; then
10808   rm -rf conftest*
10809   eval "ac_cv_header_$ac_safe=yes"
10810 else
10811   echo "$ac_err" >&5
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   eval "ac_cv_header_$ac_safe=no"
10816 fi
10817 rm -f conftest*
10818 fi
10819 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10820   echo "$ac_t""yes" 1>&6
10821     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10822   cat >> confdefs.h <<EOF
10823 #define $ac_tr_hdr 1
10824 EOF
10825  
10826 else
10827   echo "$ac_t""no" 1>&6
10828 fi
10829 done
10830
10831
10832         if test $ac_cv_header_krb5_h = yes ; then
10833                                 for ac_hdr in heim_err.h
10834 do
10835 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10836 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10837 echo "configure:10838: checking for $ac_hdr" >&5
10838 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10839   echo $ac_n "(cached) $ac_c" 1>&6
10840 else
10841   cat > conftest.$ac_ext <<EOF
10842 #line 10843 "configure"
10843 #include "confdefs.h"
10844 #include <$ac_hdr>
10845 EOF
10846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10847 { (eval echo configure:10848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10849 if test -z "$ac_err"; then
10850   rm -rf conftest*
10851   eval "ac_cv_header_$ac_safe=yes"
10852 else
10853   echo "$ac_err" >&5
10854   echo "configure: failed program was:" >&5
10855   cat conftest.$ac_ext >&5
10856   rm -rf conftest*
10857   eval "ac_cv_header_$ac_safe=no"
10858 fi
10859 rm -f conftest*
10860 fi
10861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10862   echo "$ac_t""yes" 1>&6
10863     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10864   cat >> confdefs.h <<EOF
10865 #define $ac_tr_hdr 1
10866 EOF
10867  
10868 else
10869   echo "$ac_t""no" 1>&6
10870 fi
10871 done
10872
10873                 if test $ac_cv_header_heim_err_h = yes ; then
10874                         krb5_impl=heimdal
10875                 else
10876                         krb5_impl=mit
10877                 fi
10878
10879                 if test $krb5_impl = mit; then
10880                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10881 echo "configure:10882: checking for main in -lk5crypto" >&5
10882 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10884   echo $ac_n "(cached) $ac_c" 1>&6
10885 else
10886   ac_save_LIBS="$LIBS"
10887 LIBS="-lk5crypto  $LIBS"
10888 cat > conftest.$ac_ext <<EOF
10889 #line 10890 "configure"
10890 #include "confdefs.h"
10891
10892 int main() {
10893 main()
10894 ; return 0; }
10895 EOF
10896 if { (eval echo configure:10897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10897   rm -rf conftest*
10898   eval "ac_cv_lib_$ac_lib_var=yes"
10899 else
10900   echo "configure: failed program was:" >&5
10901   cat conftest.$ac_ext >&5
10902   rm -rf conftest*
10903   eval "ac_cv_lib_$ac_lib_var=no"
10904 fi
10905 rm -f conftest*
10906 LIBS="$ac_save_LIBS"
10907
10908 fi
10909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10910   echo "$ac_t""yes" 1>&6
10911   krb5crypto=k5crypto
10912 else
10913   echo "$ac_t""no" 1>&6
10914 krb5crypto=crypto
10915 fi
10916
10917
10918                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10919 echo "configure:10920: checking for main in -lkrb5" >&5
10920 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10922   echo $ac_n "(cached) $ac_c" 1>&6
10923 else
10924   ac_save_LIBS="$LIBS"
10925 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10926 cat > conftest.$ac_ext <<EOF
10927 #line 10928 "configure"
10928 #include "confdefs.h"
10929
10930 int main() {
10931 main()
10932 ; return 0; }
10933 EOF
10934 if { (eval echo configure:10935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10935   rm -rf conftest*
10936   eval "ac_cv_lib_$ac_lib_var=yes"
10937 else
10938   echo "configure: failed program was:" >&5
10939   cat conftest.$ac_ext >&5
10940   rm -rf conftest*
10941   eval "ac_cv_lib_$ac_lib_var=no"
10942 fi
10943 rm -f conftest*
10944 LIBS="$ac_save_LIBS"
10945
10946 fi
10947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10948   echo "$ac_t""yes" 1>&6
10949   have_krb5=yes
10950                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10951 else
10952   echo "$ac_t""no" 1>&6
10953 have_krb5=no
10954 fi
10955
10956
10957                 elif test $krb5_impl = heimdal; then
10958                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10959 echo "configure:10960: checking for main in -ldes" >&5
10960 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10962   echo $ac_n "(cached) $ac_c" 1>&6
10963 else
10964   ac_save_LIBS="$LIBS"
10965 LIBS="-ldes  $LIBS"
10966 cat > conftest.$ac_ext <<EOF
10967 #line 10968 "configure"
10968 #include "confdefs.h"
10969
10970 int main() {
10971 main()
10972 ; return 0; }
10973 EOF
10974 if { (eval echo configure:10975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10975   rm -rf conftest*
10976   eval "ac_cv_lib_$ac_lib_var=yes"
10977 else
10978   echo "configure: failed program was:" >&5
10979   cat conftest.$ac_ext >&5
10980   rm -rf conftest*
10981   eval "ac_cv_lib_$ac_lib_var=no"
10982 fi
10983 rm -f conftest*
10984 LIBS="$ac_save_LIBS"
10985
10986 fi
10987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10988   echo "$ac_t""yes" 1>&6
10989   krb5crypto=des
10990 else
10991   echo "$ac_t""no" 1>&6
10992 krb5crypto=crypto
10993 fi
10994
10995
10996                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10997 echo "configure:10998: checking for main in -lkrb5" >&5
10998 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11000   echo $ac_n "(cached) $ac_c" 1>&6
11001 else
11002   ac_save_LIBS="$LIBS"
11003 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11004 cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007
11008 int main() {
11009 main()
11010 ; return 0; }
11011 EOF
11012 if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11013   rm -rf conftest*
11014   eval "ac_cv_lib_$ac_lib_var=yes"
11015 else
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -rf conftest*
11019   eval "ac_cv_lib_$ac_lib_var=no"
11020 fi
11021 rm -f conftest*
11022 LIBS="$ac_save_LIBS"
11023
11024 fi
11025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11026   echo "$ac_t""yes" 1>&6
11027   have_krb5=yes
11028                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11029 else
11030   echo "$ac_t""no" 1>&6
11031 have_krb5=no
11032 fi
11033
11034
11035                         cat >> confdefs.h <<\EOF
11036 #define HAVE_HEIMDAL_KERBEROS 1
11037 EOF
11038
11039
11040                 else
11041                         have_krb5=no
11042                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11043                 fi
11044
11045                 if test $have_krb5 = yes ; then
11046                         ol_link_krb5=yes
11047
11048                         cat >> confdefs.h <<\EOF
11049 #define HAVE_KRB5 1
11050 EOF
11051
11052
11053                         if test $ol_with_kerberos = k5only ; then
11054                                 ol_with_kerberos=found
11055                         fi
11056
11057                 elif test $ol_with_kerberos != auto ; then
11058                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11059                 fi
11060
11061         fi
11062 fi
11063
11064 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11065         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11066
11067         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11068 do
11069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11071 echo "configure:11072: checking for $ac_hdr" >&5
11072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11073   echo $ac_n "(cached) $ac_c" 1>&6
11074 else
11075   cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 #include <$ac_hdr>
11079 EOF
11080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11081 { (eval echo configure:11082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11083 if test -z "$ac_err"; then
11084   rm -rf conftest*
11085   eval "ac_cv_header_$ac_safe=yes"
11086 else
11087   echo "$ac_err" >&5
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_header_$ac_safe=no"
11092 fi
11093 rm -f conftest*
11094 fi
11095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11096   echo "$ac_t""yes" 1>&6
11097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11098   cat >> confdefs.h <<EOF
11099 #define $ac_tr_hdr 1
11100 EOF
11101  
11102 else
11103   echo "$ac_t""no" 1>&6
11104 fi
11105 done
11106
11107
11108         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11109                 if test $krb5_impl = mit; then
11110                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11111 echo "configure:11112: checking for main in -lkrb4" >&5
11112 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11114   echo $ac_n "(cached) $ac_c" 1>&6
11115 else
11116   ac_save_LIBS="$LIBS"
11117 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11118 cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121
11122 int main() {
11123 main()
11124 ; return 0; }
11125 EOF
11126 if { (eval echo configure:11127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11127   rm -rf conftest*
11128   eval "ac_cv_lib_$ac_lib_var=yes"
11129 else
11130   echo "configure: failed program was:" >&5
11131   cat conftest.$ac_ext >&5
11132   rm -rf conftest*
11133   eval "ac_cv_lib_$ac_lib_var=no"
11134 fi
11135 rm -f conftest*
11136 LIBS="$ac_save_LIBS"
11137
11138 fi
11139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141   have_k425=yes
11142                                 KRB4_LIBS="-lkrb4 -ldes425"
11143 else
11144   echo "$ac_t""no" 1>&6
11145 have_k425=no
11146 fi
11147
11148
11149                 elif test $krb5_impl = heimdal; then
11150                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11151 echo "configure:11152: checking for main in -lkrb4" >&5
11152 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11154   echo $ac_n "(cached) $ac_c" 1>&6
11155 else
11156   ac_save_LIBS="$LIBS"
11157 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11158 cat > conftest.$ac_ext <<EOF
11159 #line 11160 "configure"
11160 #include "confdefs.h"
11161
11162 int main() {
11163 main()
11164 ; return 0; }
11165 EOF
11166 if { (eval echo configure:11167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11167   rm -rf conftest*
11168   eval "ac_cv_lib_$ac_lib_var=yes"
11169 else
11170   echo "configure: failed program was:" >&5
11171   cat conftest.$ac_ext >&5
11172   rm -rf conftest*
11173   eval "ac_cv_lib_$ac_lib_var=no"
11174 fi
11175 rm -f conftest*
11176 LIBS="$ac_save_LIBS"
11177
11178 fi
11179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11180   echo "$ac_t""yes" 1>&6
11181   have_k425=yes
11182                                 KRB4_LIBS="-lkrb4"
11183 else
11184   echo "$ac_t""no" 1>&6
11185 have_k425=no
11186 fi
11187
11188
11189                 else
11190                         have_425=no
11191                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11192                 fi
11193
11194                 if test $have_k425 = yes ; then
11195                         ol_with_kerberos=found
11196                         ol_link_krb4=yes
11197
11198                         cat >> confdefs.h <<\EOF
11199 #define HAVE_KRB425 1
11200 EOF
11201
11202                         cat >> confdefs.h <<\EOF
11203 #define HAVE_KRB4 1
11204 EOF
11205
11206
11207                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11208 echo "configure:11209: checking for des_debug in Kerberos libraries" >&5
11209 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11210   echo $ac_n "(cached) $ac_c" 1>&6
11211 else
11212   
11213                                                                 save_LIBS="$LIBS"
11214                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11215                                 cat > conftest.$ac_ext <<EOF
11216 #line 11217 "configure"
11217 #include "confdefs.h"
11218
11219 #include <kerberosIV/krb.h>
11220 #include <kerberosIV/des.h>
11221 extern int des_debug;
11222
11223 int main() {
11224
11225 des_debug = 1;
11226
11227 ; return 0; }
11228 EOF
11229 if { (eval echo configure:11230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11230   rm -rf conftest*
11231   ol_cv_var_des_debug=yes
11232 else
11233   echo "configure: failed program was:" >&5
11234   cat conftest.$ac_ext >&5
11235   rm -rf conftest*
11236   ol_cv_var_des_debug=no
11237 fi
11238 rm -f conftest*
11239                                                                 LIBS="$save_LIBS"
11240                         
11241 fi
11242
11243 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11244
11245                         if test $ol_cv_var_des_debug = yes ; then
11246                                 cat >> confdefs.h <<\EOF
11247 #define HAVE_DES_DEBUG 1
11248 EOF
11249
11250                         fi
11251
11252                         LIBS="$save_LIBS"
11253                 fi
11254         fi
11255 fi
11256
11257 if test $ol_link_krb5 = yes ; then
11258         ol_with_kerberos=found
11259 fi
11260
11261 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11262         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11263
11264         for ac_hdr in krb.h des.h krb-archaeology.h 
11265 do
11266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11268 echo "configure:11269: checking for $ac_hdr" >&5
11269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11270   echo $ac_n "(cached) $ac_c" 1>&6
11271 else
11272   cat > conftest.$ac_ext <<EOF
11273 #line 11274 "configure"
11274 #include "confdefs.h"
11275 #include <$ac_hdr>
11276 EOF
11277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11278 { (eval echo configure:11279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11280 if test -z "$ac_err"; then
11281   rm -rf conftest*
11282   eval "ac_cv_header_$ac_safe=yes"
11283 else
11284   echo "$ac_err" >&5
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -rf conftest*
11288   eval "ac_cv_header_$ac_safe=no"
11289 fi
11290 rm -f conftest*
11291 fi
11292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11295   cat >> confdefs.h <<EOF
11296 #define $ac_tr_hdr 1
11297 EOF
11298  
11299 else
11300   echo "$ac_t""no" 1>&6
11301 fi
11302 done
11303
11304
11305         if test $ac_cv_header_krb_h = yes ; then
11306                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11307 echo "configure:11308: checking for main in -lkrb" >&5
11308 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11310   echo $ac_n "(cached) $ac_c" 1>&6
11311 else
11312   ac_save_LIBS="$LIBS"
11313 LIBS="-lkrb -ldes $LIBS"
11314 cat > conftest.$ac_ext <<EOF
11315 #line 11316 "configure"
11316 #include "confdefs.h"
11317
11318 int main() {
11319 main()
11320 ; return 0; }
11321 EOF
11322 if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11323   rm -rf conftest*
11324   eval "ac_cv_lib_$ac_lib_var=yes"
11325 else
11326   echo "configure: failed program was:" >&5
11327   cat conftest.$ac_ext >&5
11328   rm -rf conftest*
11329   eval "ac_cv_lib_$ac_lib_var=no"
11330 fi
11331 rm -f conftest*
11332 LIBS="$ac_save_LIBS"
11333
11334 fi
11335 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11336   echo "$ac_t""yes" 1>&6
11337   have_k4=yes
11338 else
11339   echo "$ac_t""no" 1>&6
11340 have_k4=no
11341 fi
11342
11343
11344                 if test $have_k4 = yes ; then
11345                         ol_with_kerberos=found
11346                         ol_link_krb4=yes
11347
11348                         cat >> confdefs.h <<\EOF
11349 #define HAVE_KRB4 1
11350 EOF
11351
11352
11353                         KRB4_LIBS="-lkrb -ldes"
11354
11355                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11356                                 cat >> confdefs.h <<\EOF
11357 #define HAVE_KTH_KERBEROS 1
11358 EOF
11359
11360                         fi
11361                 fi
11362         fi
11363 fi
11364
11365 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11366         ol_link_kbind=yes
11367
11368 elif test $ol_enable_kbind = yes ; then
11369         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11370 fi
11371
11372 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11373         cat >> confdefs.h <<\EOF
11374 #define HAVE_KERBEROS 1
11375 EOF
11376
11377
11378 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11379         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11380 fi
11381
11382         
11383 ol_link_tls=no
11384 if test $ol_with_tls != no ; then
11385         for ac_hdr in openssl/ssl.h ssl.h
11386 do
11387 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11388 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11389 echo "configure:11390: checking for $ac_hdr" >&5
11390 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11391   echo $ac_n "(cached) $ac_c" 1>&6
11392 else
11393   cat > conftest.$ac_ext <<EOF
11394 #line 11395 "configure"
11395 #include "confdefs.h"
11396 #include <$ac_hdr>
11397 EOF
11398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11399 { (eval echo configure:11400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11401 if test -z "$ac_err"; then
11402   rm -rf conftest*
11403   eval "ac_cv_header_$ac_safe=yes"
11404 else
11405   echo "$ac_err" >&5
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -rf conftest*
11409   eval "ac_cv_header_$ac_safe=no"
11410 fi
11411 rm -f conftest*
11412 fi
11413 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11414   echo "$ac_t""yes" 1>&6
11415     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11416   cat >> confdefs.h <<EOF
11417 #define $ac_tr_hdr 1
11418 EOF
11419  
11420 else
11421   echo "$ac_t""no" 1>&6
11422 fi
11423 done
11424
11425
11426         if test $ac_cv_header_openssl_ssl_h = yes \
11427                 -o $ac_cv_header_ssl_h = yes ; then
11428                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11429 echo "configure:11430: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11430 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11432   echo $ac_n "(cached) $ac_c" 1>&6
11433 else
11434   ac_save_LIBS="$LIBS"
11435 LIBS="-lssl -lcrypto $LIBS"
11436 cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 /* Override any gcc2 internal prototype to avoid an error.  */
11440 /* We use char because int might match the return type of a gcc2
11441     builtin and then its argument prototype would still apply.  */
11442 char SSLeay_add_ssl_algorithms();
11443
11444 int main() {
11445 SSLeay_add_ssl_algorithms()
11446 ; return 0; }
11447 EOF
11448 if { (eval echo configure:11449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11449   rm -rf conftest*
11450   eval "ac_cv_lib_$ac_lib_var=yes"
11451 else
11452   echo "configure: failed program was:" >&5
11453   cat conftest.$ac_ext >&5
11454   rm -rf conftest*
11455   eval "ac_cv_lib_$ac_lib_var=no"
11456 fi
11457 rm -f conftest*
11458 LIBS="$ac_save_LIBS"
11459
11460 fi
11461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11462   echo "$ac_t""yes" 1>&6
11463   have_ssleay=yes
11464                         need_rsaref=no
11465 else
11466   echo "$ac_t""no" 1>&6
11467 have_ssleay=no
11468 fi
11469
11470                         
11471                 if test $have_ssleay = no ; then
11472                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11473 echo "configure:11474: checking for SSL_library_init in -lssl" >&5
11474 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11475 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   ac_save_LIBS="$LIBS"
11479 LIBS="-lssl -lcrypto $LIBS"
11480 cat > conftest.$ac_ext <<EOF
11481 #line 11482 "configure"
11482 #include "confdefs.h"
11483 /* Override any gcc2 internal prototype to avoid an error.  */
11484 /* We use char because int might match the return type of a gcc2
11485     builtin and then its argument prototype would still apply.  */
11486 char SSL_library_init();
11487
11488 int main() {
11489 SSL_library_init()
11490 ; return 0; }
11491 EOF
11492 if { (eval echo configure:11493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11493   rm -rf conftest*
11494   eval "ac_cv_lib_$ac_lib_var=yes"
11495 else
11496   echo "configure: failed program was:" >&5
11497   cat conftest.$ac_ext >&5
11498   rm -rf conftest*
11499   eval "ac_cv_lib_$ac_lib_var=no"
11500 fi
11501 rm -f conftest*
11502 LIBS="$ac_save_LIBS"
11503
11504 fi
11505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11506   echo "$ac_t""yes" 1>&6
11507   have_ssleay=yes
11508                                 need_rsaref=no
11509 else
11510   echo "$ac_t""no" 1>&6
11511 have_ssleay=no
11512 fi
11513
11514                 fi
11515
11516                 if test $have_ssleay = no ; then
11517                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11518 echo "configure:11519: checking for ssl3_accept in -lssl" >&5
11519 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11521   echo $ac_n "(cached) $ac_c" 1>&6
11522 else
11523   ac_save_LIBS="$LIBS"
11524 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11525 cat > conftest.$ac_ext <<EOF
11526 #line 11527 "configure"
11527 #include "confdefs.h"
11528 /* Override any gcc2 internal prototype to avoid an error.  */
11529 /* We use char because int might match the return type of a gcc2
11530     builtin and then its argument prototype would still apply.  */
11531 char ssl3_accept();
11532
11533 int main() {
11534 ssl3_accept()
11535 ; return 0; }
11536 EOF
11537 if { (eval echo configure:11538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11538   rm -rf conftest*
11539   eval "ac_cv_lib_$ac_lib_var=yes"
11540 else
11541   echo "configure: failed program was:" >&5
11542   cat conftest.$ac_ext >&5
11543   rm -rf conftest*
11544   eval "ac_cv_lib_$ac_lib_var=no"
11545 fi
11546 rm -f conftest*
11547 LIBS="$ac_save_LIBS"
11548
11549 fi
11550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11551   echo "$ac_t""yes" 1>&6
11552   have_ssleay=yes
11553                                 need_rsaref=yes
11554 else
11555   echo "$ac_t""no" 1>&6
11556 have_ssleay=no
11557 fi
11558
11559                 fi
11560
11561                 if test $have_ssleay = yes ; then
11562                         ol_with_tls=found
11563                         ol_link_tls=yes
11564
11565                         cat >> confdefs.h <<\EOF
11566 #define HAVE_SSLEAY 1
11567 EOF
11568
11569
11570                         if test $need_rsaref = yes; then
11571                                 cat >> confdefs.h <<\EOF
11572 #define HAVE_RSAREF 1
11573 EOF
11574
11575
11576                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11577                         else
11578                                 TLS_LIBS="-lssl -lcrypto"
11579                         fi
11580                 fi
11581                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11582 echo "configure:11583: checking OpenSSL library version (CRL checking capability)" >&5
11583 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11584   echo $ac_n "(cached) $ac_c" 1>&6
11585 else
11586   
11587         cat > conftest.$ac_ext <<EOF
11588 #line 11589 "configure"
11589 #include "confdefs.h"
11590
11591 #ifdef HAVE_OPENSSL_SSL_H
11592 #include <openssl/ssl.h>
11593 #else
11594 #include <ssl.h>
11595 #endif
11596
11597 /* Require 0.9.7d+ */
11598 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11599         char *__ssl_compat = "0.9.7d";
11600 #endif
11601         
11602 EOF
11603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11604   egrep "__ssl_compat" >/dev/null 2>&1; then
11605   rm -rf conftest*
11606   ol_cv_ssl_crl_compat=yes
11607 else
11608   rm -rf conftest*
11609   ol_cv_ssl_crl_compat=no
11610 fi
11611 rm -f conftest*
11612
11613 fi
11614
11615 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11616
11617                 if test $ol_cv_ssl_crl_compat = no ; then
11618                         ol_link_ssl=no
11619                 else 
11620                         cat >> confdefs.h <<\EOF
11621 #define HAVE_OPENSSL_CRL 1
11622 EOF
11623
11624                 fi
11625         fi
11626
11627 else
11628         echo "configure: warning: TLS data protection not supported!" 1>&2
11629 fi
11630
11631 WITH_TLS=no
11632 if test $ol_link_tls = yes ; then
11633         cat >> confdefs.h <<\EOF
11634 #define HAVE_TLS 1
11635 EOF
11636
11637         WITH_TLS=yes
11638
11639 elif test $ol_with_tls = auto ; then
11640         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11641         echo "configure: warning: TLS data protection not supported!" 1>&2
11642
11643 elif test $ol_with_tls != no ; then
11644         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11645 fi
11646
11647 if test $ol_enable_lmpasswd != no; then
11648         if test $ol_link_tls != yes ; then
11649                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11650         fi
11651
11652         cat >> confdefs.h <<\EOF
11653 #define SLAPD_LMHASH 1
11654 EOF
11655
11656 fi
11657
11658 ol_link_threads=no
11659
11660 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11661         -o $ol_with_threads = nt ; then
11662
11663         
11664         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11665 echo "configure:11666: checking for _beginthread" >&5
11666 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11667   echo $ac_n "(cached) $ac_c" 1>&6
11668 else
11669   cat > conftest.$ac_ext <<EOF
11670 #line 11671 "configure"
11671 #include "confdefs.h"
11672 /* System header to define __stub macros and hopefully few prototypes,
11673     which can conflict with char _beginthread(); below.  */
11674 #include <assert.h>
11675 /* Override any gcc2 internal prototype to avoid an error.  */
11676 /* We use char because int might match the return type of a gcc2
11677     builtin and then its argument prototype would still apply.  */
11678 char _beginthread();
11679 char (*f)();
11680
11681 int main() {
11682
11683 /* The GNU C library defines this for functions which it implements
11684     to always fail with ENOSYS.  Some functions are actually named
11685     something starting with __ and the normal name is an alias.  */
11686 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11687 choke me
11688 #else
11689 f = _beginthread;
11690 #endif
11691
11692 ; return 0; }
11693 EOF
11694 if { (eval echo configure:11695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11695   rm -rf conftest*
11696   eval "ac_cv_func__beginthread=yes"
11697 else
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700   rm -rf conftest*
11701   eval "ac_cv_func__beginthread=no"
11702 fi
11703 rm -f conftest*
11704 fi
11705
11706 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11707   echo "$ac_t""yes" 1>&6
11708   :
11709 else
11710   echo "$ac_t""no" 1>&6
11711 fi
11712
11713
11714         if test $ac_cv_func__beginthread = yes ; then
11715                 cat >> confdefs.h <<\EOF
11716 #define HAVE_NT_THREADS 1
11717 EOF
11718
11719                 ol_cv_nt_threads=yes
11720         fi
11721
11722
11723         if test "$ol_cv_nt_threads" = yes ; then
11724                 ol_link_threads=nt
11725                 ol_with_threads=found
11726                 ol_with_yielding_select=yes
11727
11728                 cat >> confdefs.h <<\EOF
11729 #define HAVE_NT_SERVICE_MANAGER 1
11730 EOF
11731
11732                 cat >> confdefs.h <<\EOF
11733 #define HAVE_NT_EVENT_LOG 1
11734 EOF
11735
11736         fi
11737
11738         if test $ol_with_threads = nt ; then
11739                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11740         fi
11741 fi
11742
11743 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11744         -o $ol_with_threads = posix ; then
11745
11746         for ac_hdr in pthread.h
11747 do
11748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11750 echo "configure:11751: checking for $ac_hdr" >&5
11751 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11752   echo $ac_n "(cached) $ac_c" 1>&6
11753 else
11754   cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757 #include <$ac_hdr>
11758 EOF
11759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11760 { (eval echo configure:11761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11762 if test -z "$ac_err"; then
11763   rm -rf conftest*
11764   eval "ac_cv_header_$ac_safe=yes"
11765 else
11766   echo "$ac_err" >&5
11767   echo "configure: failed program was:" >&5
11768   cat conftest.$ac_ext >&5
11769   rm -rf conftest*
11770   eval "ac_cv_header_$ac_safe=no"
11771 fi
11772 rm -f conftest*
11773 fi
11774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11775   echo "$ac_t""yes" 1>&6
11776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11777   cat >> confdefs.h <<EOF
11778 #define $ac_tr_hdr 1
11779 EOF
11780  
11781 else
11782   echo "$ac_t""no" 1>&6
11783 fi
11784 done
11785
11786
11787         if test $ac_cv_header_pthread_h = yes ; then
11788                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11789 echo "configure:11790: checking POSIX thread version" >&5
11790 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11791   echo $ac_n "(cached) $ac_c" 1>&6
11792 else
11793   
11794         cat > conftest.$ac_ext <<EOF
11795 #line 11796 "configure"
11796 #include "confdefs.h"
11797
11798 #               include <pthread.h>
11799         
11800 int main() {
11801
11802                 int i = PTHREAD_CREATE_JOINABLE;
11803         
11804 ; return 0; }
11805 EOF
11806 if { (eval echo configure:11807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11807   rm -rf conftest*
11808   
11809         cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 #include <pthread.h>
11813 EOF
11814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11815   egrep "pthread_detach" >/dev/null 2>&1; then
11816   rm -rf conftest*
11817   ol_cv_pthread_version=10
11818 else
11819   rm -rf conftest*
11820   ol_cv_pthread_version=8
11821 fi
11822 rm -f conftest*
11823
11824 else
11825   echo "configure: failed program was:" >&5
11826   cat conftest.$ac_ext >&5
11827   rm -rf conftest*
11828   
11829         cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832
11833 #               include <pthread.h>
11834 #               ifdef PTHREAD_CREATE_UNDETACHED
11835                 draft7
11836 #               endif
11837         
11838 EOF
11839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11840   egrep "draft7" >/dev/null 2>&1; then
11841   rm -rf conftest*
11842   ol_cv_pthread_version=7
11843 else
11844   rm -rf conftest*
11845   
11846         cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849 #include <pthread.h>
11850 EOF
11851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11852   egrep "pthread_attr_init" >/dev/null 2>&1; then
11853   rm -rf conftest*
11854   ol_cv_pthread_version=6
11855 else
11856   rm -rf conftest*
11857   
11858         cat > conftest.$ac_ext <<EOF
11859 #line 11860 "configure"
11860 #include "confdefs.h"
11861
11862 #               include <pthread.h>
11863 #ifdef          PTHREAD_MUTEX_INITIALIZER
11864                 draft5
11865 #endif
11866         
11867 EOF
11868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11869   egrep "draft5" >/dev/null 2>&1; then
11870   rm -rf conftest*
11871   ol_cv_pthread_version=5
11872 else
11873   rm -rf conftest*
11874   ol_cv_pthread_version=4
11875 fi
11876 rm -f conftest*
11877  
11878 fi
11879 rm -f conftest*
11880  
11881 fi
11882 rm -f conftest*
11883  
11884 fi
11885 rm -f conftest*
11886
11887 fi
11888
11889 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11890
11891
11892                 if test $ol_cv_pthread_version != 0 ; then
11893                         cat >> confdefs.h <<EOF
11894 #define HAVE_PTHREADS $ol_cv_pthread_version
11895 EOF
11896
11897                 else
11898                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11899                 fi
11900
11901                 # consider threads found
11902                 ol_with_threads=found
11903
11904                 
11905         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11906 echo "configure:11907: checking for LinuxThreads pthread.h" >&5
11907 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11908   echo $ac_n "(cached) $ac_c" 1>&6
11909 else
11910   cat > conftest.$ac_ext <<EOF
11911 #line 11912 "configure"
11912 #include "confdefs.h"
11913 #include <pthread.h>
11914 EOF
11915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11916   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11917   rm -rf conftest*
11918   ol_cv_header_linux_threads=yes
11919 else
11920   rm -rf conftest*
11921   ol_cv_header_linux_threads=no
11922 fi
11923 rm -f conftest*
11924
11925                 
11926 fi
11927
11928 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11929         if test $ol_cv_header_linux_threads = yes; then
11930                 cat >> confdefs.h <<\EOF
11931 #define HAVE_LINUX_THREADS 1
11932 EOF
11933
11934         fi
11935
11936                 
11937         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11938 echo "configure:11939: checking for GNU Pth pthread.h" >&5
11939 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11940   echo $ac_n "(cached) $ac_c" 1>&6
11941 else
11942   cat > conftest.$ac_ext <<EOF
11943 #line 11944 "configure"
11944 #include "confdefs.h"
11945 #include <pthread.h>
11946 #ifdef _POSIX_THREAD_IS_GNU_PTH
11947         __gnu_pth__;
11948 #endif
11949
11950 EOF
11951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11952   egrep "__gnu_pth__" >/dev/null 2>&1; then
11953   rm -rf conftest*
11954   ol_cv_header_gnu_pth_pthread_h=yes
11955 else
11956   rm -rf conftest*
11957   ol_cv_header_gnu_pth_pthread_h=no
11958 fi
11959 rm -f conftest*
11960
11961                 
11962 fi
11963
11964 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11965
11966
11967                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11968                         for ac_hdr in sched.h
11969 do
11970 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11971 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11972 echo "configure:11973: checking for $ac_hdr" >&5
11973 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11974   echo $ac_n "(cached) $ac_c" 1>&6
11975 else
11976   cat > conftest.$ac_ext <<EOF
11977 #line 11978 "configure"
11978 #include "confdefs.h"
11979 #include <$ac_hdr>
11980 EOF
11981 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11982 { (eval echo configure:11983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11983 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11984 if test -z "$ac_err"; then
11985   rm -rf conftest*
11986   eval "ac_cv_header_$ac_safe=yes"
11987 else
11988   echo "$ac_err" >&5
11989   echo "configure: failed program was:" >&5
11990   cat conftest.$ac_ext >&5
11991   rm -rf conftest*
11992   eval "ac_cv_header_$ac_safe=no"
11993 fi
11994 rm -f conftest*
11995 fi
11996 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11997   echo "$ac_t""yes" 1>&6
11998     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11999   cat >> confdefs.h <<EOF
12000 #define $ac_tr_hdr 1
12001 EOF
12002  
12003 else
12004   echo "$ac_t""no" 1>&6
12005 fi
12006 done
12007
12008                 fi
12009
12010                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12011                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12012 echo "configure:12013: checking for pthread_create in default libraries" >&5
12013 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12014   echo $ac_n "(cached) $ac_c" 1>&6
12015 else
12016   
12017                 if test "$cross_compiling" = yes; then
12018   cat > conftest.$ac_ext <<EOF
12019 #line 12020 "configure"
12020 #include "confdefs.h"
12021 /* pthread test headers */
12022 #include <pthread.h>
12023 #if HAVE_PTHREADS < 7
12024 #include <errno.h>
12025 #endif
12026 #ifndef NULL
12027 #define NULL (void*)0
12028 #endif
12029
12030 static void *task(p)
12031         void *p;
12032 {
12033         return (void *) (p == NULL);
12034 }
12035
12036 int main() {
12037
12038         /* pthread test function */
12039 #ifndef PTHREAD_CREATE_DETACHED
12040 #define PTHREAD_CREATE_DETACHED 1
12041 #endif
12042         pthread_t t;
12043         int status;
12044         int detach = PTHREAD_CREATE_DETACHED;
12045
12046 #if HAVE_PTHREADS > 4
12047         /* Final pthreads */
12048         pthread_attr_t attr;
12049
12050         status = pthread_attr_init(&attr);
12051         if( status ) return status;
12052
12053 #if HAVE_PTHREADS < 7
12054         status = pthread_attr_setdetachstate(&attr, &detach);
12055         if( status < 0 ) status = errno;
12056 #else
12057         status = pthread_attr_setdetachstate(&attr, detach);
12058 #endif
12059         if( status ) return status;
12060         status = pthread_create( &t, &attr, task, NULL );
12061 #if HAVE_PTHREADS < 7
12062         if( status < 0 ) status = errno;
12063 #endif
12064         if( status ) return status;
12065 #else
12066         /* Draft 4 pthreads */
12067         status = pthread_create( &t, pthread_attr_default, task, NULL );
12068         if( status ) return errno;
12069
12070         /* give thread a chance to complete */
12071         /* it should remain joinable and hence detachable */
12072         sleep( 1 );
12073
12074         status = pthread_detach( &t );
12075         if( status ) return errno;
12076 #endif
12077
12078 #ifdef HAVE_LINUX_THREADS
12079         pthread_kill_other_threads_np();
12080 #endif
12081
12082         return 0;
12083
12084 ; return 0; }
12085 EOF
12086 if { (eval echo configure:12087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12087   rm -rf conftest*
12088   ol_cv_pthread_create=yes
12089 else
12090   echo "configure: failed program was:" >&5
12091   cat conftest.$ac_ext >&5
12092   rm -rf conftest*
12093   ol_cv_pthread_create=no
12094 fi
12095 rm -f conftest*
12096 else
12097   cat > conftest.$ac_ext <<EOF
12098 #line 12099 "configure"
12099 #include "confdefs.h"
12100 /* pthread test headers */
12101 #include <pthread.h>
12102 #if HAVE_PTHREADS < 7
12103 #include <errno.h>
12104 #endif
12105 #ifndef NULL
12106 #define NULL (void*)0
12107 #endif
12108
12109 static void *task(p)
12110         void *p;
12111 {
12112         return (void *) (p == NULL);
12113 }
12114
12115
12116 int main(argc, argv)
12117         int argc;
12118         char **argv;
12119 {
12120
12121         /* pthread test function */
12122 #ifndef PTHREAD_CREATE_DETACHED
12123 #define PTHREAD_CREATE_DETACHED 1
12124 #endif
12125         pthread_t t;
12126         int status;
12127         int detach = PTHREAD_CREATE_DETACHED;
12128
12129 #if HAVE_PTHREADS > 4
12130         /* Final pthreads */
12131         pthread_attr_t attr;
12132
12133         status = pthread_attr_init(&attr);
12134         if( status ) return status;
12135
12136 #if HAVE_PTHREADS < 7
12137         status = pthread_attr_setdetachstate(&attr, &detach);
12138         if( status < 0 ) status = errno;
12139 #else
12140         status = pthread_attr_setdetachstate(&attr, detach);
12141 #endif
12142         if( status ) return status;
12143         status = pthread_create( &t, &attr, task, NULL );
12144 #if HAVE_PTHREADS < 7
12145         if( status < 0 ) status = errno;
12146 #endif
12147         if( status ) return status;
12148 #else
12149         /* Draft 4 pthreads */
12150         status = pthread_create( &t, pthread_attr_default, task, NULL );
12151         if( status ) return errno;
12152
12153         /* give thread a chance to complete */
12154         /* it should remain joinable and hence detachable */
12155         sleep( 1 );
12156
12157         status = pthread_detach( &t );
12158         if( status ) return errno;
12159 #endif
12160
12161 #ifdef HAVE_LINUX_THREADS
12162         pthread_kill_other_threads_np();
12163 #endif
12164
12165         return 0;
12166
12167 }
12168
12169 EOF
12170 if { (eval echo configure:12171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12171 then
12172   ol_cv_pthread_create=yes
12173 else
12174   echo "configure: failed program was:" >&5
12175   cat conftest.$ac_ext >&5
12176   rm -fr conftest*
12177   ol_cv_pthread_create=no
12178 fi
12179 rm -fr conftest*
12180 fi
12181
12182 fi
12183
12184 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12185
12186                 if test $ol_cv_pthread_create != no ; then
12187                         ol_link_threads=posix
12188                         ol_link_pthreads=""
12189                 fi
12190                 
12191                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12192 if test "$ol_link_threads" = no ; then
12193         # try -kthread
12194         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12195 echo "configure:12196: checking for pthread link with -kthread" >&5
12196 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12197   echo $ac_n "(cached) $ac_c" 1>&6
12198 else
12199   
12200                 # save the flags
12201                 ol_LIBS="$LIBS"
12202                 LIBS="-kthread $LIBS"
12203
12204                 if test "$cross_compiling" = yes; then
12205   cat > conftest.$ac_ext <<EOF
12206 #line 12207 "configure"
12207 #include "confdefs.h"
12208 /* pthread test headers */
12209 #include <pthread.h>
12210 #if HAVE_PTHREADS < 7
12211 #include <errno.h>
12212 #endif
12213 #ifndef NULL
12214 #define NULL (void*)0
12215 #endif
12216
12217 static void *task(p)
12218         void *p;
12219 {
12220         return (void *) (p == NULL);
12221 }
12222
12223 int main() {
12224
12225         /* pthread test function */
12226 #ifndef PTHREAD_CREATE_DETACHED
12227 #define PTHREAD_CREATE_DETACHED 1
12228 #endif
12229         pthread_t t;
12230         int status;
12231         int detach = PTHREAD_CREATE_DETACHED;
12232
12233 #if HAVE_PTHREADS > 4
12234         /* Final pthreads */
12235         pthread_attr_t attr;
12236
12237         status = pthread_attr_init(&attr);
12238         if( status ) return status;
12239
12240 #if HAVE_PTHREADS < 7
12241         status = pthread_attr_setdetachstate(&attr, &detach);
12242         if( status < 0 ) status = errno;
12243 #else
12244         status = pthread_attr_setdetachstate(&attr, detach);
12245 #endif
12246         if( status ) return status;
12247         status = pthread_create( &t, &attr, task, NULL );
12248 #if HAVE_PTHREADS < 7
12249         if( status < 0 ) status = errno;
12250 #endif
12251         if( status ) return status;
12252 #else
12253         /* Draft 4 pthreads */
12254         status = pthread_create( &t, pthread_attr_default, task, NULL );
12255         if( status ) return errno;
12256
12257         /* give thread a chance to complete */
12258         /* it should remain joinable and hence detachable */
12259         sleep( 1 );
12260
12261         status = pthread_detach( &t );
12262         if( status ) return errno;
12263 #endif
12264
12265 #ifdef HAVE_LINUX_THREADS
12266         pthread_kill_other_threads_np();
12267 #endif
12268
12269         return 0;
12270
12271 ; return 0; }
12272 EOF
12273 if { (eval echo configure:12274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12274   rm -rf conftest*
12275   ol_cv_pthread_kthread=yes
12276 else
12277   echo "configure: failed program was:" >&5
12278   cat conftest.$ac_ext >&5
12279   rm -rf conftest*
12280   ol_cv_pthread_kthread=no
12281 fi
12282 rm -f conftest*
12283 else
12284   cat > conftest.$ac_ext <<EOF
12285 #line 12286 "configure"
12286 #include "confdefs.h"
12287 /* pthread test headers */
12288 #include <pthread.h>
12289 #if HAVE_PTHREADS < 7
12290 #include <errno.h>
12291 #endif
12292 #ifndef NULL
12293 #define NULL (void*)0
12294 #endif
12295
12296 static void *task(p)
12297         void *p;
12298 {
12299         return (void *) (p == NULL);
12300 }
12301
12302
12303 int main(argc, argv)
12304         int argc;
12305         char **argv;
12306 {
12307
12308         /* pthread test function */
12309 #ifndef PTHREAD_CREATE_DETACHED
12310 #define PTHREAD_CREATE_DETACHED 1
12311 #endif
12312         pthread_t t;
12313         int status;
12314         int detach = PTHREAD_CREATE_DETACHED;
12315
12316 #if HAVE_PTHREADS > 4
12317         /* Final pthreads */
12318         pthread_attr_t attr;
12319
12320         status = pthread_attr_init(&attr);
12321         if( status ) return status;
12322
12323 #if HAVE_PTHREADS < 7
12324         status = pthread_attr_setdetachstate(&attr, &detach);
12325         if( status < 0 ) status = errno;
12326 #else
12327         status = pthread_attr_setdetachstate(&attr, detach);
12328 #endif
12329         if( status ) return status;
12330         status = pthread_create( &t, &attr, task, NULL );
12331 #if HAVE_PTHREADS < 7
12332         if( status < 0 ) status = errno;
12333 #endif
12334         if( status ) return status;
12335 #else
12336         /* Draft 4 pthreads */
12337         status = pthread_create( &t, pthread_attr_default, task, NULL );
12338         if( status ) return errno;
12339
12340         /* give thread a chance to complete */
12341         /* it should remain joinable and hence detachable */
12342         sleep( 1 );
12343
12344         status = pthread_detach( &t );
12345         if( status ) return errno;
12346 #endif
12347
12348 #ifdef HAVE_LINUX_THREADS
12349         pthread_kill_other_threads_np();
12350 #endif
12351
12352         return 0;
12353
12354 }
12355
12356 EOF
12357 if { (eval echo configure:12358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12358 then
12359   ol_cv_pthread_kthread=yes
12360 else
12361   echo "configure: failed program was:" >&5
12362   cat conftest.$ac_ext >&5
12363   rm -fr conftest*
12364   ol_cv_pthread_kthread=no
12365 fi
12366 rm -fr conftest*
12367 fi
12368
12369
12370                 # restore the LIBS
12371                 LIBS="$ol_LIBS"
12372         
12373 fi
12374
12375 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12376
12377         if test $ol_cv_pthread_kthread = yes ; then
12378                 ol_link_pthreads="-kthread"
12379                 ol_link_threads=posix
12380         fi
12381 fi
12382
12383                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12384 if test "$ol_link_threads" = no ; then
12385         # try -pthread
12386         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12387 echo "configure:12388: checking for pthread link with -pthread" >&5
12388 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12389   echo $ac_n "(cached) $ac_c" 1>&6
12390 else
12391   
12392                 # save the flags
12393                 ol_LIBS="$LIBS"
12394                 LIBS="-pthread $LIBS"
12395
12396                 if test "$cross_compiling" = yes; then
12397   cat > conftest.$ac_ext <<EOF
12398 #line 12399 "configure"
12399 #include "confdefs.h"
12400 /* pthread test headers */
12401 #include <pthread.h>
12402 #if HAVE_PTHREADS < 7
12403 #include <errno.h>
12404 #endif
12405 #ifndef NULL
12406 #define NULL (void*)0
12407 #endif
12408
12409 static void *task(p)
12410         void *p;
12411 {
12412         return (void *) (p == NULL);
12413 }
12414
12415 int main() {
12416
12417         /* pthread test function */
12418 #ifndef PTHREAD_CREATE_DETACHED
12419 #define PTHREAD_CREATE_DETACHED 1
12420 #endif
12421         pthread_t t;
12422         int status;
12423         int detach = PTHREAD_CREATE_DETACHED;
12424
12425 #if HAVE_PTHREADS > 4
12426         /* Final pthreads */
12427         pthread_attr_t attr;
12428
12429         status = pthread_attr_init(&attr);
12430         if( status ) return status;
12431
12432 #if HAVE_PTHREADS < 7
12433         status = pthread_attr_setdetachstate(&attr, &detach);
12434         if( status < 0 ) status = errno;
12435 #else
12436         status = pthread_attr_setdetachstate(&attr, detach);
12437 #endif
12438         if( status ) return status;
12439         status = pthread_create( &t, &attr, task, NULL );
12440 #if HAVE_PTHREADS < 7
12441         if( status < 0 ) status = errno;
12442 #endif
12443         if( status ) return status;
12444 #else
12445         /* Draft 4 pthreads */
12446         status = pthread_create( &t, pthread_attr_default, task, NULL );
12447         if( status ) return errno;
12448
12449         /* give thread a chance to complete */
12450         /* it should remain joinable and hence detachable */
12451         sleep( 1 );
12452
12453         status = pthread_detach( &t );
12454         if( status ) return errno;
12455 #endif
12456
12457 #ifdef HAVE_LINUX_THREADS
12458         pthread_kill_other_threads_np();
12459 #endif
12460
12461         return 0;
12462
12463 ; return 0; }
12464 EOF
12465 if { (eval echo configure:12466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12466   rm -rf conftest*
12467   ol_cv_pthread_pthread=yes
12468 else
12469   echo "configure: failed program was:" >&5
12470   cat conftest.$ac_ext >&5
12471   rm -rf conftest*
12472   ol_cv_pthread_pthread=no
12473 fi
12474 rm -f conftest*
12475 else
12476   cat > conftest.$ac_ext <<EOF
12477 #line 12478 "configure"
12478 #include "confdefs.h"
12479 /* pthread test headers */
12480 #include <pthread.h>
12481 #if HAVE_PTHREADS < 7
12482 #include <errno.h>
12483 #endif
12484 #ifndef NULL
12485 #define NULL (void*)0
12486 #endif
12487
12488 static void *task(p)
12489         void *p;
12490 {
12491         return (void *) (p == NULL);
12492 }
12493
12494
12495 int main(argc, argv)
12496         int argc;
12497         char **argv;
12498 {
12499
12500         /* pthread test function */
12501 #ifndef PTHREAD_CREATE_DETACHED
12502 #define PTHREAD_CREATE_DETACHED 1
12503 #endif
12504         pthread_t t;
12505         int status;
12506         int detach = PTHREAD_CREATE_DETACHED;
12507
12508 #if HAVE_PTHREADS > 4
12509         /* Final pthreads */
12510         pthread_attr_t attr;
12511
12512         status = pthread_attr_init(&attr);
12513         if( status ) return status;
12514
12515 #if HAVE_PTHREADS < 7
12516         status = pthread_attr_setdetachstate(&attr, &detach);
12517         if( status < 0 ) status = errno;
12518 #else
12519         status = pthread_attr_setdetachstate(&attr, detach);
12520 #endif
12521         if( status ) return status;
12522         status = pthread_create( &t, &attr, task, NULL );
12523 #if HAVE_PTHREADS < 7
12524         if( status < 0 ) status = errno;
12525 #endif
12526         if( status ) return status;
12527 #else
12528         /* Draft 4 pthreads */
12529         status = pthread_create( &t, pthread_attr_default, task, NULL );
12530         if( status ) return errno;
12531
12532         /* give thread a chance to complete */
12533         /* it should remain joinable and hence detachable */
12534         sleep( 1 );
12535
12536         status = pthread_detach( &t );
12537         if( status ) return errno;
12538 #endif
12539
12540 #ifdef HAVE_LINUX_THREADS
12541         pthread_kill_other_threads_np();
12542 #endif
12543
12544         return 0;
12545
12546 }
12547
12548 EOF
12549 if { (eval echo configure:12550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12550 then
12551   ol_cv_pthread_pthread=yes
12552 else
12553   echo "configure: failed program was:" >&5
12554   cat conftest.$ac_ext >&5
12555   rm -fr conftest*
12556   ol_cv_pthread_pthread=no
12557 fi
12558 rm -fr conftest*
12559 fi
12560
12561
12562                 # restore the LIBS
12563                 LIBS="$ol_LIBS"
12564         
12565 fi
12566
12567 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12568
12569         if test $ol_cv_pthread_pthread = yes ; then
12570                 ol_link_pthreads="-pthread"
12571                 ol_link_threads=posix
12572         fi
12573 fi
12574
12575                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12576 if test "$ol_link_threads" = no ; then
12577         # try -pthreads
12578         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12579 echo "configure:12580: checking for pthread link with -pthreads" >&5
12580 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12581   echo $ac_n "(cached) $ac_c" 1>&6
12582 else
12583   
12584                 # save the flags
12585                 ol_LIBS="$LIBS"
12586                 LIBS="-pthreads $LIBS"
12587
12588                 if test "$cross_compiling" = yes; then
12589   cat > conftest.$ac_ext <<EOF
12590 #line 12591 "configure"
12591 #include "confdefs.h"
12592 /* pthread test headers */
12593 #include <pthread.h>
12594 #if HAVE_PTHREADS < 7
12595 #include <errno.h>
12596 #endif
12597 #ifndef NULL
12598 #define NULL (void*)0
12599 #endif
12600
12601 static void *task(p)
12602         void *p;
12603 {
12604         return (void *) (p == NULL);
12605 }
12606
12607 int main() {
12608
12609         /* pthread test function */
12610 #ifndef PTHREAD_CREATE_DETACHED
12611 #define PTHREAD_CREATE_DETACHED 1
12612 #endif
12613         pthread_t t;
12614         int status;
12615         int detach = PTHREAD_CREATE_DETACHED;
12616
12617 #if HAVE_PTHREADS > 4
12618         /* Final pthreads */
12619         pthread_attr_t attr;
12620
12621         status = pthread_attr_init(&attr);
12622         if( status ) return status;
12623
12624 #if HAVE_PTHREADS < 7
12625         status = pthread_attr_setdetachstate(&attr, &detach);
12626         if( status < 0 ) status = errno;
12627 #else
12628         status = pthread_attr_setdetachstate(&attr, detach);
12629 #endif
12630         if( status ) return status;
12631         status = pthread_create( &t, &attr, task, NULL );
12632 #if HAVE_PTHREADS < 7
12633         if( status < 0 ) status = errno;
12634 #endif
12635         if( status ) return status;
12636 #else
12637         /* Draft 4 pthreads */
12638         status = pthread_create( &t, pthread_attr_default, task, NULL );
12639         if( status ) return errno;
12640
12641         /* give thread a chance to complete */
12642         /* it should remain joinable and hence detachable */
12643         sleep( 1 );
12644
12645         status = pthread_detach( &t );
12646         if( status ) return errno;
12647 #endif
12648
12649 #ifdef HAVE_LINUX_THREADS
12650         pthread_kill_other_threads_np();
12651 #endif
12652
12653         return 0;
12654
12655 ; return 0; }
12656 EOF
12657 if { (eval echo configure:12658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12658   rm -rf conftest*
12659   ol_cv_pthread_pthreads=yes
12660 else
12661   echo "configure: failed program was:" >&5
12662   cat conftest.$ac_ext >&5
12663   rm -rf conftest*
12664   ol_cv_pthread_pthreads=no
12665 fi
12666 rm -f conftest*
12667 else
12668   cat > conftest.$ac_ext <<EOF
12669 #line 12670 "configure"
12670 #include "confdefs.h"
12671 /* pthread test headers */
12672 #include <pthread.h>
12673 #if HAVE_PTHREADS < 7
12674 #include <errno.h>
12675 #endif
12676 #ifndef NULL
12677 #define NULL (void*)0
12678 #endif
12679
12680 static void *task(p)
12681         void *p;
12682 {
12683         return (void *) (p == NULL);
12684 }
12685
12686
12687 int main(argc, argv)
12688         int argc;
12689         char **argv;
12690 {
12691
12692         /* pthread test function */
12693 #ifndef PTHREAD_CREATE_DETACHED
12694 #define PTHREAD_CREATE_DETACHED 1
12695 #endif
12696         pthread_t t;
12697         int status;
12698         int detach = PTHREAD_CREATE_DETACHED;
12699
12700 #if HAVE_PTHREADS > 4
12701         /* Final pthreads */
12702         pthread_attr_t attr;
12703
12704         status = pthread_attr_init(&attr);
12705         if( status ) return status;
12706
12707 #if HAVE_PTHREADS < 7
12708         status = pthread_attr_setdetachstate(&attr, &detach);
12709         if( status < 0 ) status = errno;
12710 #else
12711         status = pthread_attr_setdetachstate(&attr, detach);
12712 #endif
12713         if( status ) return status;
12714         status = pthread_create( &t, &attr, task, NULL );
12715 #if HAVE_PTHREADS < 7
12716         if( status < 0 ) status = errno;
12717 #endif
12718         if( status ) return status;
12719 #else
12720         /* Draft 4 pthreads */
12721         status = pthread_create( &t, pthread_attr_default, task, NULL );
12722         if( status ) return errno;
12723
12724         /* give thread a chance to complete */
12725         /* it should remain joinable and hence detachable */
12726         sleep( 1 );
12727
12728         status = pthread_detach( &t );
12729         if( status ) return errno;
12730 #endif
12731
12732 #ifdef HAVE_LINUX_THREADS
12733         pthread_kill_other_threads_np();
12734 #endif
12735
12736         return 0;
12737
12738 }
12739
12740 EOF
12741 if { (eval echo configure:12742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12742 then
12743   ol_cv_pthread_pthreads=yes
12744 else
12745   echo "configure: failed program was:" >&5
12746   cat conftest.$ac_ext >&5
12747   rm -fr conftest*
12748   ol_cv_pthread_pthreads=no
12749 fi
12750 rm -fr conftest*
12751 fi
12752
12753
12754                 # restore the LIBS
12755                 LIBS="$ol_LIBS"
12756         
12757 fi
12758
12759 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12760
12761         if test $ol_cv_pthread_pthreads = yes ; then
12762                 ol_link_pthreads="-pthreads"
12763                 ol_link_threads=posix
12764         fi
12765 fi
12766
12767                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12768 if test "$ol_link_threads" = no ; then
12769         # try -mthreads
12770         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12771 echo "configure:12772: checking for pthread link with -mthreads" >&5
12772 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12773   echo $ac_n "(cached) $ac_c" 1>&6
12774 else
12775   
12776                 # save the flags
12777                 ol_LIBS="$LIBS"
12778                 LIBS="-mthreads $LIBS"
12779
12780                 if test "$cross_compiling" = yes; then
12781   cat > conftest.$ac_ext <<EOF
12782 #line 12783 "configure"
12783 #include "confdefs.h"
12784 /* pthread test headers */
12785 #include <pthread.h>
12786 #if HAVE_PTHREADS < 7
12787 #include <errno.h>
12788 #endif
12789 #ifndef NULL
12790 #define NULL (void*)0
12791 #endif
12792
12793 static void *task(p)
12794         void *p;
12795 {
12796         return (void *) (p == NULL);
12797 }
12798
12799 int main() {
12800
12801         /* pthread test function */
12802 #ifndef PTHREAD_CREATE_DETACHED
12803 #define PTHREAD_CREATE_DETACHED 1
12804 #endif
12805         pthread_t t;
12806         int status;
12807         int detach = PTHREAD_CREATE_DETACHED;
12808
12809 #if HAVE_PTHREADS > 4
12810         /* Final pthreads */
12811         pthread_attr_t attr;
12812
12813         status = pthread_attr_init(&attr);
12814         if( status ) return status;
12815
12816 #if HAVE_PTHREADS < 7
12817         status = pthread_attr_setdetachstate(&attr, &detach);
12818         if( status < 0 ) status = errno;
12819 #else
12820         status = pthread_attr_setdetachstate(&attr, detach);
12821 #endif
12822         if( status ) return status;
12823         status = pthread_create( &t, &attr, task, NULL );
12824 #if HAVE_PTHREADS < 7
12825         if( status < 0 ) status = errno;
12826 #endif
12827         if( status ) return status;
12828 #else
12829         /* Draft 4 pthreads */
12830         status = pthread_create( &t, pthread_attr_default, task, NULL );
12831         if( status ) return errno;
12832
12833         /* give thread a chance to complete */
12834         /* it should remain joinable and hence detachable */
12835         sleep( 1 );
12836
12837         status = pthread_detach( &t );
12838         if( status ) return errno;
12839 #endif
12840
12841 #ifdef HAVE_LINUX_THREADS
12842         pthread_kill_other_threads_np();
12843 #endif
12844
12845         return 0;
12846
12847 ; return 0; }
12848 EOF
12849 if { (eval echo configure:12850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12850   rm -rf conftest*
12851   ol_cv_pthread_mthreads=yes
12852 else
12853   echo "configure: failed program was:" >&5
12854   cat conftest.$ac_ext >&5
12855   rm -rf conftest*
12856   ol_cv_pthread_mthreads=no
12857 fi
12858 rm -f conftest*
12859 else
12860   cat > conftest.$ac_ext <<EOF
12861 #line 12862 "configure"
12862 #include "confdefs.h"
12863 /* pthread test headers */
12864 #include <pthread.h>
12865 #if HAVE_PTHREADS < 7
12866 #include <errno.h>
12867 #endif
12868 #ifndef NULL
12869 #define NULL (void*)0
12870 #endif
12871
12872 static void *task(p)
12873         void *p;
12874 {
12875         return (void *) (p == NULL);
12876 }
12877
12878
12879 int main(argc, argv)
12880         int argc;
12881         char **argv;
12882 {
12883
12884         /* pthread test function */
12885 #ifndef PTHREAD_CREATE_DETACHED
12886 #define PTHREAD_CREATE_DETACHED 1
12887 #endif
12888         pthread_t t;
12889         int status;
12890         int detach = PTHREAD_CREATE_DETACHED;
12891
12892 #if HAVE_PTHREADS > 4
12893         /* Final pthreads */
12894         pthread_attr_t attr;
12895
12896         status = pthread_attr_init(&attr);
12897         if( status ) return status;
12898
12899 #if HAVE_PTHREADS < 7
12900         status = pthread_attr_setdetachstate(&attr, &detach);
12901         if( status < 0 ) status = errno;
12902 #else
12903         status = pthread_attr_setdetachstate(&attr, detach);
12904 #endif
12905         if( status ) return status;
12906         status = pthread_create( &t, &attr, task, NULL );
12907 #if HAVE_PTHREADS < 7
12908         if( status < 0 ) status = errno;
12909 #endif
12910         if( status ) return status;
12911 #else
12912         /* Draft 4 pthreads */
12913         status = pthread_create( &t, pthread_attr_default, task, NULL );
12914         if( status ) return errno;
12915
12916         /* give thread a chance to complete */
12917         /* it should remain joinable and hence detachable */
12918         sleep( 1 );
12919
12920         status = pthread_detach( &t );
12921         if( status ) return errno;
12922 #endif
12923
12924 #ifdef HAVE_LINUX_THREADS
12925         pthread_kill_other_threads_np();
12926 #endif
12927
12928         return 0;
12929
12930 }
12931
12932 EOF
12933 if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12934 then
12935   ol_cv_pthread_mthreads=yes
12936 else
12937   echo "configure: failed program was:" >&5
12938   cat conftest.$ac_ext >&5
12939   rm -fr conftest*
12940   ol_cv_pthread_mthreads=no
12941 fi
12942 rm -fr conftest*
12943 fi
12944
12945
12946                 # restore the LIBS
12947                 LIBS="$ol_LIBS"
12948         
12949 fi
12950
12951 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12952
12953         if test $ol_cv_pthread_mthreads = yes ; then
12954                 ol_link_pthreads="-mthreads"
12955                 ol_link_threads=posix
12956         fi
12957 fi
12958
12959                 # Pthread try link: -thread (ol_cv_pthread_thread)
12960 if test "$ol_link_threads" = no ; then
12961         # try -thread
12962         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12963 echo "configure:12964: checking for pthread link with -thread" >&5
12964 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12965   echo $ac_n "(cached) $ac_c" 1>&6
12966 else
12967   
12968                 # save the flags
12969                 ol_LIBS="$LIBS"
12970                 LIBS="-thread $LIBS"
12971
12972                 if test "$cross_compiling" = yes; then
12973   cat > conftest.$ac_ext <<EOF
12974 #line 12975 "configure"
12975 #include "confdefs.h"
12976 /* pthread test headers */
12977 #include <pthread.h>
12978 #if HAVE_PTHREADS < 7
12979 #include <errno.h>
12980 #endif
12981 #ifndef NULL
12982 #define NULL (void*)0
12983 #endif
12984
12985 static void *task(p)
12986         void *p;
12987 {
12988         return (void *) (p == NULL);
12989 }
12990
12991 int main() {
12992
12993         /* pthread test function */
12994 #ifndef PTHREAD_CREATE_DETACHED
12995 #define PTHREAD_CREATE_DETACHED 1
12996 #endif
12997         pthread_t t;
12998         int status;
12999         int detach = PTHREAD_CREATE_DETACHED;
13000
13001 #if HAVE_PTHREADS > 4
13002         /* Final pthreads */
13003         pthread_attr_t attr;
13004
13005         status = pthread_attr_init(&attr);
13006         if( status ) return status;
13007
13008 #if HAVE_PTHREADS < 7
13009         status = pthread_attr_setdetachstate(&attr, &detach);
13010         if( status < 0 ) status = errno;
13011 #else
13012         status = pthread_attr_setdetachstate(&attr, detach);
13013 #endif
13014         if( status ) return status;
13015         status = pthread_create( &t, &attr, task, NULL );
13016 #if HAVE_PTHREADS < 7
13017         if( status < 0 ) status = errno;
13018 #endif
13019         if( status ) return status;
13020 #else
13021         /* Draft 4 pthreads */
13022         status = pthread_create( &t, pthread_attr_default, task, NULL );
13023         if( status ) return errno;
13024
13025         /* give thread a chance to complete */
13026         /* it should remain joinable and hence detachable */
13027         sleep( 1 );
13028
13029         status = pthread_detach( &t );
13030         if( status ) return errno;
13031 #endif
13032
13033 #ifdef HAVE_LINUX_THREADS
13034         pthread_kill_other_threads_np();
13035 #endif
13036
13037         return 0;
13038
13039 ; return 0; }
13040 EOF
13041 if { (eval echo configure:13042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13042   rm -rf conftest*
13043   ol_cv_pthread_thread=yes
13044 else
13045   echo "configure: failed program was:" >&5
13046   cat conftest.$ac_ext >&5
13047   rm -rf conftest*
13048   ol_cv_pthread_thread=no
13049 fi
13050 rm -f conftest*
13051 else
13052   cat > conftest.$ac_ext <<EOF
13053 #line 13054 "configure"
13054 #include "confdefs.h"
13055 /* pthread test headers */
13056 #include <pthread.h>
13057 #if HAVE_PTHREADS < 7
13058 #include <errno.h>
13059 #endif
13060 #ifndef NULL
13061 #define NULL (void*)0
13062 #endif
13063
13064 static void *task(p)
13065         void *p;
13066 {
13067         return (void *) (p == NULL);
13068 }
13069
13070
13071 int main(argc, argv)
13072         int argc;
13073         char **argv;
13074 {
13075
13076         /* pthread test function */
13077 #ifndef PTHREAD_CREATE_DETACHED
13078 #define PTHREAD_CREATE_DETACHED 1
13079 #endif
13080         pthread_t t;
13081         int status;
13082         int detach = PTHREAD_CREATE_DETACHED;
13083
13084 #if HAVE_PTHREADS > 4
13085         /* Final pthreads */
13086         pthread_attr_t attr;
13087
13088         status = pthread_attr_init(&attr);
13089         if( status ) return status;
13090
13091 #if HAVE_PTHREADS < 7
13092         status = pthread_attr_setdetachstate(&attr, &detach);
13093         if( status < 0 ) status = errno;
13094 #else
13095         status = pthread_attr_setdetachstate(&attr, detach);
13096 #endif
13097         if( status ) return status;
13098         status = pthread_create( &t, &attr, task, NULL );
13099 #if HAVE_PTHREADS < 7
13100         if( status < 0 ) status = errno;
13101 #endif
13102         if( status ) return status;
13103 #else
13104         /* Draft 4 pthreads */
13105         status = pthread_create( &t, pthread_attr_default, task, NULL );
13106         if( status ) return errno;
13107
13108         /* give thread a chance to complete */
13109         /* it should remain joinable and hence detachable */
13110         sleep( 1 );
13111
13112         status = pthread_detach( &t );
13113         if( status ) return errno;
13114 #endif
13115
13116 #ifdef HAVE_LINUX_THREADS
13117         pthread_kill_other_threads_np();
13118 #endif
13119
13120         return 0;
13121
13122 }
13123
13124 EOF
13125 if { (eval echo configure:13126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13126 then
13127   ol_cv_pthread_thread=yes
13128 else
13129   echo "configure: failed program was:" >&5
13130   cat conftest.$ac_ext >&5
13131   rm -fr conftest*
13132   ol_cv_pthread_thread=no
13133 fi
13134 rm -fr conftest*
13135 fi
13136
13137
13138                 # restore the LIBS
13139                 LIBS="$ol_LIBS"
13140         
13141 fi
13142
13143 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13144
13145         if test $ol_cv_pthread_thread = yes ; then
13146                 ol_link_pthreads="-thread"
13147                 ol_link_threads=posix
13148         fi
13149 fi
13150
13151
13152                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13153 if test "$ol_link_threads" = no ; then
13154         # try -lpthread -lmach -lexc -lc_r
13155         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13156 echo "configure:13157: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13157 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13158   echo $ac_n "(cached) $ac_c" 1>&6
13159 else
13160   
13161                 # save the flags
13162                 ol_LIBS="$LIBS"
13163                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13164
13165                 if test "$cross_compiling" = yes; then
13166   cat > conftest.$ac_ext <<EOF
13167 #line 13168 "configure"
13168 #include "confdefs.h"
13169 /* pthread test headers */
13170 #include <pthread.h>
13171 #if HAVE_PTHREADS < 7
13172 #include <errno.h>
13173 #endif
13174 #ifndef NULL
13175 #define NULL (void*)0
13176 #endif
13177
13178 static void *task(p)
13179         void *p;
13180 {
13181         return (void *) (p == NULL);
13182 }
13183
13184 int main() {
13185
13186         /* pthread test function */
13187 #ifndef PTHREAD_CREATE_DETACHED
13188 #define PTHREAD_CREATE_DETACHED 1
13189 #endif
13190         pthread_t t;
13191         int status;
13192         int detach = PTHREAD_CREATE_DETACHED;
13193
13194 #if HAVE_PTHREADS > 4
13195         /* Final pthreads */
13196         pthread_attr_t attr;
13197
13198         status = pthread_attr_init(&attr);
13199         if( status ) return status;
13200
13201 #if HAVE_PTHREADS < 7
13202         status = pthread_attr_setdetachstate(&attr, &detach);
13203         if( status < 0 ) status = errno;
13204 #else
13205         status = pthread_attr_setdetachstate(&attr, detach);
13206 #endif
13207         if( status ) return status;
13208         status = pthread_create( &t, &attr, task, NULL );
13209 #if HAVE_PTHREADS < 7
13210         if( status < 0 ) status = errno;
13211 #endif
13212         if( status ) return status;
13213 #else
13214         /* Draft 4 pthreads */
13215         status = pthread_create( &t, pthread_attr_default, task, NULL );
13216         if( status ) return errno;
13217
13218         /* give thread a chance to complete */
13219         /* it should remain joinable and hence detachable */
13220         sleep( 1 );
13221
13222         status = pthread_detach( &t );
13223         if( status ) return errno;
13224 #endif
13225
13226 #ifdef HAVE_LINUX_THREADS
13227         pthread_kill_other_threads_np();
13228 #endif
13229
13230         return 0;
13231
13232 ; return 0; }
13233 EOF
13234 if { (eval echo configure:13235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13235   rm -rf conftest*
13236   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13237 else
13238   echo "configure: failed program was:" >&5
13239   cat conftest.$ac_ext >&5
13240   rm -rf conftest*
13241   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13242 fi
13243 rm -f conftest*
13244 else
13245   cat > conftest.$ac_ext <<EOF
13246 #line 13247 "configure"
13247 #include "confdefs.h"
13248 /* pthread test headers */
13249 #include <pthread.h>
13250 #if HAVE_PTHREADS < 7
13251 #include <errno.h>
13252 #endif
13253 #ifndef NULL
13254 #define NULL (void*)0
13255 #endif
13256
13257 static void *task(p)
13258         void *p;
13259 {
13260         return (void *) (p == NULL);
13261 }
13262
13263
13264 int main(argc, argv)
13265         int argc;
13266         char **argv;
13267 {
13268
13269         /* pthread test function */
13270 #ifndef PTHREAD_CREATE_DETACHED
13271 #define PTHREAD_CREATE_DETACHED 1
13272 #endif
13273         pthread_t t;
13274         int status;
13275         int detach = PTHREAD_CREATE_DETACHED;
13276
13277 #if HAVE_PTHREADS > 4
13278         /* Final pthreads */
13279         pthread_attr_t attr;
13280
13281         status = pthread_attr_init(&attr);
13282         if( status ) return status;
13283
13284 #if HAVE_PTHREADS < 7
13285         status = pthread_attr_setdetachstate(&attr, &detach);
13286         if( status < 0 ) status = errno;
13287 #else
13288         status = pthread_attr_setdetachstate(&attr, detach);
13289 #endif
13290         if( status ) return status;
13291         status = pthread_create( &t, &attr, task, NULL );
13292 #if HAVE_PTHREADS < 7
13293         if( status < 0 ) status = errno;
13294 #endif
13295         if( status ) return status;
13296 #else
13297         /* Draft 4 pthreads */
13298         status = pthread_create( &t, pthread_attr_default, task, NULL );
13299         if( status ) return errno;
13300
13301         /* give thread a chance to complete */
13302         /* it should remain joinable and hence detachable */
13303         sleep( 1 );
13304
13305         status = pthread_detach( &t );
13306         if( status ) return errno;
13307 #endif
13308
13309 #ifdef HAVE_LINUX_THREADS
13310         pthread_kill_other_threads_np();
13311 #endif
13312
13313         return 0;
13314
13315 }
13316
13317 EOF
13318 if { (eval echo configure:13319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13319 then
13320   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13321 else
13322   echo "configure: failed program was:" >&5
13323   cat conftest.$ac_ext >&5
13324   rm -fr conftest*
13325   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13326 fi
13327 rm -fr conftest*
13328 fi
13329
13330
13331                 # restore the LIBS
13332                 LIBS="$ol_LIBS"
13333         
13334 fi
13335
13336 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13337
13338         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13339                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13340                 ol_link_threads=posix
13341         fi
13342 fi
13343
13344                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13345 if test "$ol_link_threads" = no ; then
13346         # try -lpthread -lmach -lexc
13347         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13348 echo "configure:13349: checking for pthread link with -lpthread -lmach -lexc" >&5
13349 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13350   echo $ac_n "(cached) $ac_c" 1>&6
13351 else
13352   
13353                 # save the flags
13354                 ol_LIBS="$LIBS"
13355                 LIBS="-lpthread -lmach -lexc $LIBS"
13356
13357                 if test "$cross_compiling" = yes; then
13358   cat > conftest.$ac_ext <<EOF
13359 #line 13360 "configure"
13360 #include "confdefs.h"
13361 /* pthread test headers */
13362 #include <pthread.h>
13363 #if HAVE_PTHREADS < 7
13364 #include <errno.h>
13365 #endif
13366 #ifndef NULL
13367 #define NULL (void*)0
13368 #endif
13369
13370 static void *task(p)
13371         void *p;
13372 {
13373         return (void *) (p == NULL);
13374 }
13375
13376 int main() {
13377
13378         /* pthread test function */
13379 #ifndef PTHREAD_CREATE_DETACHED
13380 #define PTHREAD_CREATE_DETACHED 1
13381 #endif
13382         pthread_t t;
13383         int status;
13384         int detach = PTHREAD_CREATE_DETACHED;
13385
13386 #if HAVE_PTHREADS > 4
13387         /* Final pthreads */
13388         pthread_attr_t attr;
13389
13390         status = pthread_attr_init(&attr);
13391         if( status ) return status;
13392
13393 #if HAVE_PTHREADS < 7
13394         status = pthread_attr_setdetachstate(&attr, &detach);
13395         if( status < 0 ) status = errno;
13396 #else
13397         status = pthread_attr_setdetachstate(&attr, detach);
13398 #endif
13399         if( status ) return status;
13400         status = pthread_create( &t, &attr, task, NULL );
13401 #if HAVE_PTHREADS < 7
13402         if( status < 0 ) status = errno;
13403 #endif
13404         if( status ) return status;
13405 #else
13406         /* Draft 4 pthreads */
13407         status = pthread_create( &t, pthread_attr_default, task, NULL );
13408         if( status ) return errno;
13409
13410         /* give thread a chance to complete */
13411         /* it should remain joinable and hence detachable */
13412         sleep( 1 );
13413
13414         status = pthread_detach( &t );
13415         if( status ) return errno;
13416 #endif
13417
13418 #ifdef HAVE_LINUX_THREADS
13419         pthread_kill_other_threads_np();
13420 #endif
13421
13422         return 0;
13423
13424 ; return 0; }
13425 EOF
13426 if { (eval echo configure:13427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13427   rm -rf conftest*
13428   ol_cv_pthread_lpthread_lmach_lexc=yes
13429 else
13430   echo "configure: failed program was:" >&5
13431   cat conftest.$ac_ext >&5
13432   rm -rf conftest*
13433   ol_cv_pthread_lpthread_lmach_lexc=no
13434 fi
13435 rm -f conftest*
13436 else
13437   cat > conftest.$ac_ext <<EOF
13438 #line 13439 "configure"
13439 #include "confdefs.h"
13440 /* pthread test headers */
13441 #include <pthread.h>
13442 #if HAVE_PTHREADS < 7
13443 #include <errno.h>
13444 #endif
13445 #ifndef NULL
13446 #define NULL (void*)0
13447 #endif
13448
13449 static void *task(p)
13450         void *p;
13451 {
13452         return (void *) (p == NULL);
13453 }
13454
13455
13456 int main(argc, argv)
13457         int argc;
13458         char **argv;
13459 {
13460
13461         /* pthread test function */
13462 #ifndef PTHREAD_CREATE_DETACHED
13463 #define PTHREAD_CREATE_DETACHED 1
13464 #endif
13465         pthread_t t;
13466         int status;
13467         int detach = PTHREAD_CREATE_DETACHED;
13468
13469 #if HAVE_PTHREADS > 4
13470         /* Final pthreads */
13471         pthread_attr_t attr;
13472
13473         status = pthread_attr_init(&attr);
13474         if( status ) return status;
13475
13476 #if HAVE_PTHREADS < 7
13477         status = pthread_attr_setdetachstate(&attr, &detach);
13478         if( status < 0 ) status = errno;
13479 #else
13480         status = pthread_attr_setdetachstate(&attr, detach);
13481 #endif
13482         if( status ) return status;
13483         status = pthread_create( &t, &attr, task, NULL );
13484 #if HAVE_PTHREADS < 7
13485         if( status < 0 ) status = errno;
13486 #endif
13487         if( status ) return status;
13488 #else
13489         /* Draft 4 pthreads */
13490         status = pthread_create( &t, pthread_attr_default, task, NULL );
13491         if( status ) return errno;
13492
13493         /* give thread a chance to complete */
13494         /* it should remain joinable and hence detachable */
13495         sleep( 1 );
13496
13497         status = pthread_detach( &t );
13498         if( status ) return errno;
13499 #endif
13500
13501 #ifdef HAVE_LINUX_THREADS
13502         pthread_kill_other_threads_np();
13503 #endif
13504
13505         return 0;
13506
13507 }
13508
13509 EOF
13510 if { (eval echo configure:13511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13511 then
13512   ol_cv_pthread_lpthread_lmach_lexc=yes
13513 else
13514   echo "configure: failed program was:" >&5
13515   cat conftest.$ac_ext >&5
13516   rm -fr conftest*
13517   ol_cv_pthread_lpthread_lmach_lexc=no
13518 fi
13519 rm -fr conftest*
13520 fi
13521
13522
13523                 # restore the LIBS
13524                 LIBS="$ol_LIBS"
13525         
13526 fi
13527
13528 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13529
13530         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13531                 ol_link_pthreads="-lpthread -lmach -lexc"
13532                 ol_link_threads=posix
13533         fi
13534 fi
13535
13536
13537                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13538 if test "$ol_link_threads" = no ; then
13539         # try -lpthread -Wl,-woff,85
13540         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13541 echo "configure:13542: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13542 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13543   echo $ac_n "(cached) $ac_c" 1>&6
13544 else
13545   
13546                 # save the flags
13547                 ol_LIBS="$LIBS"
13548                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13549
13550                 if test "$cross_compiling" = yes; then
13551   cat > conftest.$ac_ext <<EOF
13552 #line 13553 "configure"
13553 #include "confdefs.h"
13554 /* pthread test headers */
13555 #include <pthread.h>
13556 #if HAVE_PTHREADS < 7
13557 #include <errno.h>
13558 #endif
13559 #ifndef NULL
13560 #define NULL (void*)0
13561 #endif
13562
13563 static void *task(p)
13564         void *p;
13565 {
13566         return (void *) (p == NULL);
13567 }
13568
13569 int main() {
13570
13571         /* pthread test function */
13572 #ifndef PTHREAD_CREATE_DETACHED
13573 #define PTHREAD_CREATE_DETACHED 1
13574 #endif
13575         pthread_t t;
13576         int status;
13577         int detach = PTHREAD_CREATE_DETACHED;
13578
13579 #if HAVE_PTHREADS > 4
13580         /* Final pthreads */
13581         pthread_attr_t attr;
13582
13583         status = pthread_attr_init(&attr);
13584         if( status ) return status;
13585
13586 #if HAVE_PTHREADS < 7
13587         status = pthread_attr_setdetachstate(&attr, &detach);
13588         if( status < 0 ) status = errno;
13589 #else
13590         status = pthread_attr_setdetachstate(&attr, detach);
13591 #endif
13592         if( status ) return status;
13593         status = pthread_create( &t, &attr, task, NULL );
13594 #if HAVE_PTHREADS < 7
13595         if( status < 0 ) status = errno;
13596 #endif
13597         if( status ) return status;
13598 #else
13599         /* Draft 4 pthreads */
13600         status = pthread_create( &t, pthread_attr_default, task, NULL );
13601         if( status ) return errno;
13602
13603         /* give thread a chance to complete */
13604         /* it should remain joinable and hence detachable */
13605         sleep( 1 );
13606
13607         status = pthread_detach( &t );
13608         if( status ) return errno;
13609 #endif
13610
13611 #ifdef HAVE_LINUX_THREADS
13612         pthread_kill_other_threads_np();
13613 #endif
13614
13615         return 0;
13616
13617 ; return 0; }
13618 EOF
13619 if { (eval echo configure:13620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13620   rm -rf conftest*
13621   ol_cv_pthread_lib_lpthread_woff=yes
13622 else
13623   echo "configure: failed program was:" >&5
13624   cat conftest.$ac_ext >&5
13625   rm -rf conftest*
13626   ol_cv_pthread_lib_lpthread_woff=no
13627 fi
13628 rm -f conftest*
13629 else
13630   cat > conftest.$ac_ext <<EOF
13631 #line 13632 "configure"
13632 #include "confdefs.h"
13633 /* pthread test headers */
13634 #include <pthread.h>
13635 #if HAVE_PTHREADS < 7
13636 #include <errno.h>
13637 #endif
13638 #ifndef NULL
13639 #define NULL (void*)0
13640 #endif
13641
13642 static void *task(p)
13643         void *p;
13644 {
13645         return (void *) (p == NULL);
13646 }
13647
13648
13649 int main(argc, argv)
13650         int argc;
13651         char **argv;
13652 {
13653
13654         /* pthread test function */
13655 #ifndef PTHREAD_CREATE_DETACHED
13656 #define PTHREAD_CREATE_DETACHED 1
13657 #endif
13658         pthread_t t;
13659         int status;
13660         int detach = PTHREAD_CREATE_DETACHED;
13661
13662 #if HAVE_PTHREADS > 4
13663         /* Final pthreads */
13664         pthread_attr_t attr;
13665
13666         status = pthread_attr_init(&attr);
13667         if( status ) return status;
13668
13669 #if HAVE_PTHREADS < 7
13670         status = pthread_attr_setdetachstate(&attr, &detach);
13671         if( status < 0 ) status = errno;
13672 #else
13673         status = pthread_attr_setdetachstate(&attr, detach);
13674 #endif
13675         if( status ) return status;
13676         status = pthread_create( &t, &attr, task, NULL );
13677 #if HAVE_PTHREADS < 7
13678         if( status < 0 ) status = errno;
13679 #endif
13680         if( status ) return status;
13681 #else
13682         /* Draft 4 pthreads */
13683         status = pthread_create( &t, pthread_attr_default, task, NULL );
13684         if( status ) return errno;
13685
13686         /* give thread a chance to complete */
13687         /* it should remain joinable and hence detachable */
13688         sleep( 1 );
13689
13690         status = pthread_detach( &t );
13691         if( status ) return errno;
13692 #endif
13693
13694 #ifdef HAVE_LINUX_THREADS
13695         pthread_kill_other_threads_np();
13696 #endif
13697
13698         return 0;
13699
13700 }
13701
13702 EOF
13703 if { (eval echo configure:13704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13704 then
13705   ol_cv_pthread_lib_lpthread_woff=yes
13706 else
13707   echo "configure: failed program was:" >&5
13708   cat conftest.$ac_ext >&5
13709   rm -fr conftest*
13710   ol_cv_pthread_lib_lpthread_woff=no
13711 fi
13712 rm -fr conftest*
13713 fi
13714
13715
13716                 # restore the LIBS
13717                 LIBS="$ol_LIBS"
13718         
13719 fi
13720
13721 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13722
13723         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13724                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13725                 ol_link_threads=posix
13726         fi
13727 fi
13728
13729
13730                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13731 if test "$ol_link_threads" = no ; then
13732         # try -lpthread
13733         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13734 echo "configure:13735: checking for pthread link with -lpthread" >&5
13735 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13736   echo $ac_n "(cached) $ac_c" 1>&6
13737 else
13738   
13739                 # save the flags
13740                 ol_LIBS="$LIBS"
13741                 LIBS="-lpthread $LIBS"
13742
13743                 if test "$cross_compiling" = yes; then
13744   cat > conftest.$ac_ext <<EOF
13745 #line 13746 "configure"
13746 #include "confdefs.h"
13747 /* pthread test headers */
13748 #include <pthread.h>
13749 #if HAVE_PTHREADS < 7
13750 #include <errno.h>
13751 #endif
13752 #ifndef NULL
13753 #define NULL (void*)0
13754 #endif
13755
13756 static void *task(p)
13757         void *p;
13758 {
13759         return (void *) (p == NULL);
13760 }
13761
13762 int main() {
13763
13764         /* pthread test function */
13765 #ifndef PTHREAD_CREATE_DETACHED
13766 #define PTHREAD_CREATE_DETACHED 1
13767 #endif
13768         pthread_t t;
13769         int status;
13770         int detach = PTHREAD_CREATE_DETACHED;
13771
13772 #if HAVE_PTHREADS > 4
13773         /* Final pthreads */
13774         pthread_attr_t attr;
13775
13776         status = pthread_attr_init(&attr);
13777         if( status ) return status;
13778
13779 #if HAVE_PTHREADS < 7
13780         status = pthread_attr_setdetachstate(&attr, &detach);
13781         if( status < 0 ) status = errno;
13782 #else
13783         status = pthread_attr_setdetachstate(&attr, detach);
13784 #endif
13785         if( status ) return status;
13786         status = pthread_create( &t, &attr, task, NULL );
13787 #if HAVE_PTHREADS < 7
13788         if( status < 0 ) status = errno;
13789 #endif
13790         if( status ) return status;
13791 #else
13792         /* Draft 4 pthreads */
13793         status = pthread_create( &t, pthread_attr_default, task, NULL );
13794         if( status ) return errno;
13795
13796         /* give thread a chance to complete */
13797         /* it should remain joinable and hence detachable */
13798         sleep( 1 );
13799
13800         status = pthread_detach( &t );
13801         if( status ) return errno;
13802 #endif
13803
13804 #ifdef HAVE_LINUX_THREADS
13805         pthread_kill_other_threads_np();
13806 #endif
13807
13808         return 0;
13809
13810 ; return 0; }
13811 EOF
13812 if { (eval echo configure:13813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13813   rm -rf conftest*
13814   ol_cv_pthread_lpthread=yes
13815 else
13816   echo "configure: failed program was:" >&5
13817   cat conftest.$ac_ext >&5
13818   rm -rf conftest*
13819   ol_cv_pthread_lpthread=no
13820 fi
13821 rm -f conftest*
13822 else
13823   cat > conftest.$ac_ext <<EOF
13824 #line 13825 "configure"
13825 #include "confdefs.h"
13826 /* pthread test headers */
13827 #include <pthread.h>
13828 #if HAVE_PTHREADS < 7
13829 #include <errno.h>
13830 #endif
13831 #ifndef NULL
13832 #define NULL (void*)0
13833 #endif
13834
13835 static void *task(p)
13836         void *p;
13837 {
13838         return (void *) (p == NULL);
13839 }
13840
13841
13842 int main(argc, argv)
13843         int argc;
13844         char **argv;
13845 {
13846
13847         /* pthread test function */
13848 #ifndef PTHREAD_CREATE_DETACHED
13849 #define PTHREAD_CREATE_DETACHED 1
13850 #endif
13851         pthread_t t;
13852         int status;
13853         int detach = PTHREAD_CREATE_DETACHED;
13854
13855 #if HAVE_PTHREADS > 4
13856         /* Final pthreads */
13857         pthread_attr_t attr;
13858
13859         status = pthread_attr_init(&attr);
13860         if( status ) return status;
13861
13862 #if HAVE_PTHREADS < 7
13863         status = pthread_attr_setdetachstate(&attr, &detach);
13864         if( status < 0 ) status = errno;
13865 #else
13866         status = pthread_attr_setdetachstate(&attr, detach);
13867 #endif
13868         if( status ) return status;
13869         status = pthread_create( &t, &attr, task, NULL );
13870 #if HAVE_PTHREADS < 7
13871         if( status < 0 ) status = errno;
13872 #endif
13873         if( status ) return status;
13874 #else
13875         /* Draft 4 pthreads */
13876         status = pthread_create( &t, pthread_attr_default, task, NULL );
13877         if( status ) return errno;
13878
13879         /* give thread a chance to complete */
13880         /* it should remain joinable and hence detachable */
13881         sleep( 1 );
13882
13883         status = pthread_detach( &t );
13884         if( status ) return errno;
13885 #endif
13886
13887 #ifdef HAVE_LINUX_THREADS
13888         pthread_kill_other_threads_np();
13889 #endif
13890
13891         return 0;
13892
13893 }
13894
13895 EOF
13896 if { (eval echo configure:13897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13897 then
13898   ol_cv_pthread_lpthread=yes
13899 else
13900   echo "configure: failed program was:" >&5
13901   cat conftest.$ac_ext >&5
13902   rm -fr conftest*
13903   ol_cv_pthread_lpthread=no
13904 fi
13905 rm -fr conftest*
13906 fi
13907
13908
13909                 # restore the LIBS
13910                 LIBS="$ol_LIBS"
13911         
13912 fi
13913
13914 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13915
13916         if test $ol_cv_pthread_lpthread = yes ; then
13917                 ol_link_pthreads="-lpthread"
13918                 ol_link_threads=posix
13919         fi
13920 fi
13921
13922                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13923 if test "$ol_link_threads" = no ; then
13924         # try -lc_r
13925         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13926 echo "configure:13927: checking for pthread link with -lc_r" >&5
13927 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13928   echo $ac_n "(cached) $ac_c" 1>&6
13929 else
13930   
13931                 # save the flags
13932                 ol_LIBS="$LIBS"
13933                 LIBS="-lc_r $LIBS"
13934
13935                 if test "$cross_compiling" = yes; then
13936   cat > conftest.$ac_ext <<EOF
13937 #line 13938 "configure"
13938 #include "confdefs.h"
13939 /* pthread test headers */
13940 #include <pthread.h>
13941 #if HAVE_PTHREADS < 7
13942 #include <errno.h>
13943 #endif
13944 #ifndef NULL
13945 #define NULL (void*)0
13946 #endif
13947
13948 static void *task(p)
13949         void *p;
13950 {
13951         return (void *) (p == NULL);
13952 }
13953
13954 int main() {
13955
13956         /* pthread test function */
13957 #ifndef PTHREAD_CREATE_DETACHED
13958 #define PTHREAD_CREATE_DETACHED 1
13959 #endif
13960         pthread_t t;
13961         int status;
13962         int detach = PTHREAD_CREATE_DETACHED;
13963
13964 #if HAVE_PTHREADS > 4
13965         /* Final pthreads */
13966         pthread_attr_t attr;
13967
13968         status = pthread_attr_init(&attr);
13969         if( status ) return status;
13970
13971 #if HAVE_PTHREADS < 7
13972         status = pthread_attr_setdetachstate(&attr, &detach);
13973         if( status < 0 ) status = errno;
13974 #else
13975         status = pthread_attr_setdetachstate(&attr, detach);
13976 #endif
13977         if( status ) return status;
13978         status = pthread_create( &t, &attr, task, NULL );
13979 #if HAVE_PTHREADS < 7
13980         if( status < 0 ) status = errno;
13981 #endif
13982         if( status ) return status;
13983 #else
13984         /* Draft 4 pthreads */
13985         status = pthread_create( &t, pthread_attr_default, task, NULL );
13986         if( status ) return errno;
13987
13988         /* give thread a chance to complete */
13989         /* it should remain joinable and hence detachable */
13990         sleep( 1 );
13991
13992         status = pthread_detach( &t );
13993         if( status ) return errno;
13994 #endif
13995
13996 #ifdef HAVE_LINUX_THREADS
13997         pthread_kill_other_threads_np();
13998 #endif
13999
14000         return 0;
14001
14002 ; return 0; }
14003 EOF
14004 if { (eval echo configure:14005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14005   rm -rf conftest*
14006   ol_cv_pthread_lc_r=yes
14007 else
14008   echo "configure: failed program was:" >&5
14009   cat conftest.$ac_ext >&5
14010   rm -rf conftest*
14011   ol_cv_pthread_lc_r=no
14012 fi
14013 rm -f conftest*
14014 else
14015   cat > conftest.$ac_ext <<EOF
14016 #line 14017 "configure"
14017 #include "confdefs.h"
14018 /* pthread test headers */
14019 #include <pthread.h>
14020 #if HAVE_PTHREADS < 7
14021 #include <errno.h>
14022 #endif
14023 #ifndef NULL
14024 #define NULL (void*)0
14025 #endif
14026
14027 static void *task(p)
14028         void *p;
14029 {
14030         return (void *) (p == NULL);
14031 }
14032
14033
14034 int main(argc, argv)
14035         int argc;
14036         char **argv;
14037 {
14038
14039         /* pthread test function */
14040 #ifndef PTHREAD_CREATE_DETACHED
14041 #define PTHREAD_CREATE_DETACHED 1
14042 #endif
14043         pthread_t t;
14044         int status;
14045         int detach = PTHREAD_CREATE_DETACHED;
14046
14047 #if HAVE_PTHREADS > 4
14048         /* Final pthreads */
14049         pthread_attr_t attr;
14050
14051         status = pthread_attr_init(&attr);
14052         if( status ) return status;
14053
14054 #if HAVE_PTHREADS < 7
14055         status = pthread_attr_setdetachstate(&attr, &detach);
14056         if( status < 0 ) status = errno;
14057 #else
14058         status = pthread_attr_setdetachstate(&attr, detach);
14059 #endif
14060         if( status ) return status;
14061         status = pthread_create( &t, &attr, task, NULL );
14062 #if HAVE_PTHREADS < 7
14063         if( status < 0 ) status = errno;
14064 #endif
14065         if( status ) return status;
14066 #else
14067         /* Draft 4 pthreads */
14068         status = pthread_create( &t, pthread_attr_default, task, NULL );
14069         if( status ) return errno;
14070
14071         /* give thread a chance to complete */
14072         /* it should remain joinable and hence detachable */
14073         sleep( 1 );
14074
14075         status = pthread_detach( &t );
14076         if( status ) return errno;
14077 #endif
14078
14079 #ifdef HAVE_LINUX_THREADS
14080         pthread_kill_other_threads_np();
14081 #endif
14082
14083         return 0;
14084
14085 }
14086
14087 EOF
14088 if { (eval echo configure:14089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14089 then
14090   ol_cv_pthread_lc_r=yes
14091 else
14092   echo "configure: failed program was:" >&5
14093   cat conftest.$ac_ext >&5
14094   rm -fr conftest*
14095   ol_cv_pthread_lc_r=no
14096 fi
14097 rm -fr conftest*
14098 fi
14099
14100
14101                 # restore the LIBS
14102                 LIBS="$ol_LIBS"
14103         
14104 fi
14105
14106 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14107
14108         if test $ol_cv_pthread_lc_r = yes ; then
14109                 ol_link_pthreads="-lc_r"
14110                 ol_link_threads=posix
14111         fi
14112 fi
14113
14114
14115                 # Pthread try link: -threads (ol_cv_pthread_threads)
14116 if test "$ol_link_threads" = no ; then
14117         # try -threads
14118         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14119 echo "configure:14120: checking for pthread link with -threads" >&5
14120 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14121   echo $ac_n "(cached) $ac_c" 1>&6
14122 else
14123   
14124                 # save the flags
14125                 ol_LIBS="$LIBS"
14126                 LIBS="-threads $LIBS"
14127
14128                 if test "$cross_compiling" = yes; then
14129   cat > conftest.$ac_ext <<EOF
14130 #line 14131 "configure"
14131 #include "confdefs.h"
14132 /* pthread test headers */
14133 #include <pthread.h>
14134 #if HAVE_PTHREADS < 7
14135 #include <errno.h>
14136 #endif
14137 #ifndef NULL
14138 #define NULL (void*)0
14139 #endif
14140
14141 static void *task(p)
14142         void *p;
14143 {
14144         return (void *) (p == NULL);
14145 }
14146
14147 int main() {
14148
14149         /* pthread test function */
14150 #ifndef PTHREAD_CREATE_DETACHED
14151 #define PTHREAD_CREATE_DETACHED 1
14152 #endif
14153         pthread_t t;
14154         int status;
14155         int detach = PTHREAD_CREATE_DETACHED;
14156
14157 #if HAVE_PTHREADS > 4
14158         /* Final pthreads */
14159         pthread_attr_t attr;
14160
14161         status = pthread_attr_init(&attr);
14162         if( status ) return status;
14163
14164 #if HAVE_PTHREADS < 7
14165         status = pthread_attr_setdetachstate(&attr, &detach);
14166         if( status < 0 ) status = errno;
14167 #else
14168         status = pthread_attr_setdetachstate(&attr, detach);
14169 #endif
14170         if( status ) return status;
14171         status = pthread_create( &t, &attr, task, NULL );
14172 #if HAVE_PTHREADS < 7
14173         if( status < 0 ) status = errno;
14174 #endif
14175         if( status ) return status;
14176 #else
14177         /* Draft 4 pthreads */
14178         status = pthread_create( &t, pthread_attr_default, task, NULL );
14179         if( status ) return errno;
14180
14181         /* give thread a chance to complete */
14182         /* it should remain joinable and hence detachable */
14183         sleep( 1 );
14184
14185         status = pthread_detach( &t );
14186         if( status ) return errno;
14187 #endif
14188
14189 #ifdef HAVE_LINUX_THREADS
14190         pthread_kill_other_threads_np();
14191 #endif
14192
14193         return 0;
14194
14195 ; return 0; }
14196 EOF
14197 if { (eval echo configure:14198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14198   rm -rf conftest*
14199   ol_cv_pthread_threads=yes
14200 else
14201   echo "configure: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203   rm -rf conftest*
14204   ol_cv_pthread_threads=no
14205 fi
14206 rm -f conftest*
14207 else
14208   cat > conftest.$ac_ext <<EOF
14209 #line 14210 "configure"
14210 #include "confdefs.h"
14211 /* pthread test headers */
14212 #include <pthread.h>
14213 #if HAVE_PTHREADS < 7
14214 #include <errno.h>
14215 #endif
14216 #ifndef NULL
14217 #define NULL (void*)0
14218 #endif
14219
14220 static void *task(p)
14221         void *p;
14222 {
14223         return (void *) (p == NULL);
14224 }
14225
14226
14227 int main(argc, argv)
14228         int argc;
14229         char **argv;
14230 {
14231
14232         /* pthread test function */
14233 #ifndef PTHREAD_CREATE_DETACHED
14234 #define PTHREAD_CREATE_DETACHED 1
14235 #endif
14236         pthread_t t;
14237         int status;
14238         int detach = PTHREAD_CREATE_DETACHED;
14239
14240 #if HAVE_PTHREADS > 4
14241         /* Final pthreads */
14242         pthread_attr_t attr;
14243
14244         status = pthread_attr_init(&attr);
14245         if( status ) return status;
14246
14247 #if HAVE_PTHREADS < 7
14248         status = pthread_attr_setdetachstate(&attr, &detach);
14249         if( status < 0 ) status = errno;
14250 #else
14251         status = pthread_attr_setdetachstate(&attr, detach);
14252 #endif
14253         if( status ) return status;
14254         status = pthread_create( &t, &attr, task, NULL );
14255 #if HAVE_PTHREADS < 7
14256         if( status < 0 ) status = errno;
14257 #endif
14258         if( status ) return status;
14259 #else
14260         /* Draft 4 pthreads */
14261         status = pthread_create( &t, pthread_attr_default, task, NULL );
14262         if( status ) return errno;
14263
14264         /* give thread a chance to complete */
14265         /* it should remain joinable and hence detachable */
14266         sleep( 1 );
14267
14268         status = pthread_detach( &t );
14269         if( status ) return errno;
14270 #endif
14271
14272 #ifdef HAVE_LINUX_THREADS
14273         pthread_kill_other_threads_np();
14274 #endif
14275
14276         return 0;
14277
14278 }
14279
14280 EOF
14281 if { (eval echo configure:14282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14282 then
14283   ol_cv_pthread_threads=yes
14284 else
14285   echo "configure: failed program was:" >&5
14286   cat conftest.$ac_ext >&5
14287   rm -fr conftest*
14288   ol_cv_pthread_threads=no
14289 fi
14290 rm -fr conftest*
14291 fi
14292
14293
14294                 # restore the LIBS
14295                 LIBS="$ol_LIBS"
14296         
14297 fi
14298
14299 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14300
14301         if test $ol_cv_pthread_threads = yes ; then
14302                 ol_link_pthreads="-threads"
14303                 ol_link_threads=posix
14304         fi
14305 fi
14306
14307
14308                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14309 if test "$ol_link_threads" = no ; then
14310         # try -lpthreads -lmach -lexc -lc_r
14311         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14312 echo "configure:14313: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14313 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14314   echo $ac_n "(cached) $ac_c" 1>&6
14315 else
14316   
14317                 # save the flags
14318                 ol_LIBS="$LIBS"
14319                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14320
14321                 if test "$cross_compiling" = yes; then
14322   cat > conftest.$ac_ext <<EOF
14323 #line 14324 "configure"
14324 #include "confdefs.h"
14325 /* pthread test headers */
14326 #include <pthread.h>
14327 #if HAVE_PTHREADS < 7
14328 #include <errno.h>
14329 #endif
14330 #ifndef NULL
14331 #define NULL (void*)0
14332 #endif
14333
14334 static void *task(p)
14335         void *p;
14336 {
14337         return (void *) (p == NULL);
14338 }
14339
14340 int main() {
14341
14342         /* pthread test function */
14343 #ifndef PTHREAD_CREATE_DETACHED
14344 #define PTHREAD_CREATE_DETACHED 1
14345 #endif
14346         pthread_t t;
14347         int status;
14348         int detach = PTHREAD_CREATE_DETACHED;
14349
14350 #if HAVE_PTHREADS > 4
14351         /* Final pthreads */
14352         pthread_attr_t attr;
14353
14354         status = pthread_attr_init(&attr);
14355         if( status ) return status;
14356
14357 #if HAVE_PTHREADS < 7
14358         status = pthread_attr_setdetachstate(&attr, &detach);
14359         if( status < 0 ) status = errno;
14360 #else
14361         status = pthread_attr_setdetachstate(&attr, detach);
14362 #endif
14363         if( status ) return status;
14364         status = pthread_create( &t, &attr, task, NULL );
14365 #if HAVE_PTHREADS < 7
14366         if( status < 0 ) status = errno;
14367 #endif
14368         if( status ) return status;
14369 #else
14370         /* Draft 4 pthreads */
14371         status = pthread_create( &t, pthread_attr_default, task, NULL );
14372         if( status ) return errno;
14373
14374         /* give thread a chance to complete */
14375         /* it should remain joinable and hence detachable */
14376         sleep( 1 );
14377
14378         status = pthread_detach( &t );
14379         if( status ) return errno;
14380 #endif
14381
14382 #ifdef HAVE_LINUX_THREADS
14383         pthread_kill_other_threads_np();
14384 #endif
14385
14386         return 0;
14387
14388 ; return 0; }
14389 EOF
14390 if { (eval echo configure:14391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14391   rm -rf conftest*
14392   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14393 else
14394   echo "configure: failed program was:" >&5
14395   cat conftest.$ac_ext >&5
14396   rm -rf conftest*
14397   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14398 fi
14399 rm -f conftest*
14400 else
14401   cat > conftest.$ac_ext <<EOF
14402 #line 14403 "configure"
14403 #include "confdefs.h"
14404 /* pthread test headers */
14405 #include <pthread.h>
14406 #if HAVE_PTHREADS < 7
14407 #include <errno.h>
14408 #endif
14409 #ifndef NULL
14410 #define NULL (void*)0
14411 #endif
14412
14413 static void *task(p)
14414         void *p;
14415 {
14416         return (void *) (p == NULL);
14417 }
14418
14419
14420 int main(argc, argv)
14421         int argc;
14422         char **argv;
14423 {
14424
14425         /* pthread test function */
14426 #ifndef PTHREAD_CREATE_DETACHED
14427 #define PTHREAD_CREATE_DETACHED 1
14428 #endif
14429         pthread_t t;
14430         int status;
14431         int detach = PTHREAD_CREATE_DETACHED;
14432
14433 #if HAVE_PTHREADS > 4
14434         /* Final pthreads */
14435         pthread_attr_t attr;
14436
14437         status = pthread_attr_init(&attr);
14438         if( status ) return status;
14439
14440 #if HAVE_PTHREADS < 7
14441         status = pthread_attr_setdetachstate(&attr, &detach);
14442         if( status < 0 ) status = errno;
14443 #else
14444         status = pthread_attr_setdetachstate(&attr, detach);
14445 #endif
14446         if( status ) return status;
14447         status = pthread_create( &t, &attr, task, NULL );
14448 #if HAVE_PTHREADS < 7
14449         if( status < 0 ) status = errno;
14450 #endif
14451         if( status ) return status;
14452 #else
14453         /* Draft 4 pthreads */
14454         status = pthread_create( &t, pthread_attr_default, task, NULL );
14455         if( status ) return errno;
14456
14457         /* give thread a chance to complete */
14458         /* it should remain joinable and hence detachable */
14459         sleep( 1 );
14460
14461         status = pthread_detach( &t );
14462         if( status ) return errno;
14463 #endif
14464
14465 #ifdef HAVE_LINUX_THREADS
14466         pthread_kill_other_threads_np();
14467 #endif
14468
14469         return 0;
14470
14471 }
14472
14473 EOF
14474 if { (eval echo configure:14475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14475 then
14476   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14477 else
14478   echo "configure: failed program was:" >&5
14479   cat conftest.$ac_ext >&5
14480   rm -fr conftest*
14481   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14482 fi
14483 rm -fr conftest*
14484 fi
14485
14486
14487                 # restore the LIBS
14488                 LIBS="$ol_LIBS"
14489         
14490 fi
14491
14492 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14493
14494         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14495                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14496                 ol_link_threads=posix
14497         fi
14498 fi
14499
14500                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14501 if test "$ol_link_threads" = no ; then
14502         # try -lpthreads -lmach -lexc
14503         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14504 echo "configure:14505: checking for pthread link with -lpthreads -lmach -lexc" >&5
14505 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14506   echo $ac_n "(cached) $ac_c" 1>&6
14507 else
14508   
14509                 # save the flags
14510                 ol_LIBS="$LIBS"
14511                 LIBS="-lpthreads -lmach -lexc $LIBS"
14512
14513                 if test "$cross_compiling" = yes; then
14514   cat > conftest.$ac_ext <<EOF
14515 #line 14516 "configure"
14516 #include "confdefs.h"
14517 /* pthread test headers */
14518 #include <pthread.h>
14519 #if HAVE_PTHREADS < 7
14520 #include <errno.h>
14521 #endif
14522 #ifndef NULL
14523 #define NULL (void*)0
14524 #endif
14525
14526 static void *task(p)
14527         void *p;
14528 {
14529         return (void *) (p == NULL);
14530 }
14531
14532 int main() {
14533
14534         /* pthread test function */
14535 #ifndef PTHREAD_CREATE_DETACHED
14536 #define PTHREAD_CREATE_DETACHED 1
14537 #endif
14538         pthread_t t;
14539         int status;
14540         int detach = PTHREAD_CREATE_DETACHED;
14541
14542 #if HAVE_PTHREADS > 4
14543         /* Final pthreads */
14544         pthread_attr_t attr;
14545
14546         status = pthread_attr_init(&attr);
14547         if( status ) return status;
14548
14549 #if HAVE_PTHREADS < 7
14550         status = pthread_attr_setdetachstate(&attr, &detach);
14551         if( status < 0 ) status = errno;
14552 #else
14553         status = pthread_attr_setdetachstate(&attr, detach);
14554 #endif
14555         if( status ) return status;
14556         status = pthread_create( &t, &attr, task, NULL );
14557 #if HAVE_PTHREADS < 7
14558         if( status < 0 ) status = errno;
14559 #endif
14560         if( status ) return status;
14561 #else
14562         /* Draft 4 pthreads */
14563         status = pthread_create( &t, pthread_attr_default, task, NULL );
14564         if( status ) return errno;
14565
14566         /* give thread a chance to complete */
14567         /* it should remain joinable and hence detachable */
14568         sleep( 1 );
14569
14570         status = pthread_detach( &t );
14571         if( status ) return errno;
14572 #endif
14573
14574 #ifdef HAVE_LINUX_THREADS
14575         pthread_kill_other_threads_np();
14576 #endif
14577
14578         return 0;
14579
14580 ; return 0; }
14581 EOF
14582 if { (eval echo configure:14583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14583   rm -rf conftest*
14584   ol_cv_pthread_lpthreads_lmach_lexc=yes
14585 else
14586   echo "configure: failed program was:" >&5
14587   cat conftest.$ac_ext >&5
14588   rm -rf conftest*
14589   ol_cv_pthread_lpthreads_lmach_lexc=no
14590 fi
14591 rm -f conftest*
14592 else
14593   cat > conftest.$ac_ext <<EOF
14594 #line 14595 "configure"
14595 #include "confdefs.h"
14596 /* pthread test headers */
14597 #include <pthread.h>
14598 #if HAVE_PTHREADS < 7
14599 #include <errno.h>
14600 #endif
14601 #ifndef NULL
14602 #define NULL (void*)0
14603 #endif
14604
14605 static void *task(p)
14606         void *p;
14607 {
14608         return (void *) (p == NULL);
14609 }
14610
14611
14612 int main(argc, argv)
14613         int argc;
14614         char **argv;
14615 {
14616
14617         /* pthread test function */
14618 #ifndef PTHREAD_CREATE_DETACHED
14619 #define PTHREAD_CREATE_DETACHED 1
14620 #endif
14621         pthread_t t;
14622         int status;
14623         int detach = PTHREAD_CREATE_DETACHED;
14624
14625 #if HAVE_PTHREADS > 4
14626         /* Final pthreads */
14627         pthread_attr_t attr;
14628
14629         status = pthread_attr_init(&attr);
14630         if( status ) return status;
14631
14632 #if HAVE_PTHREADS < 7
14633         status = pthread_attr_setdetachstate(&attr, &detach);
14634         if( status < 0 ) status = errno;
14635 #else
14636         status = pthread_attr_setdetachstate(&attr, detach);
14637 #endif
14638         if( status ) return status;
14639         status = pthread_create( &t, &attr, task, NULL );
14640 #if HAVE_PTHREADS < 7
14641         if( status < 0 ) status = errno;
14642 #endif
14643         if( status ) return status;
14644 #else
14645         /* Draft 4 pthreads */
14646         status = pthread_create( &t, pthread_attr_default, task, NULL );
14647         if( status ) return errno;
14648
14649         /* give thread a chance to complete */
14650         /* it should remain joinable and hence detachable */
14651         sleep( 1 );
14652
14653         status = pthread_detach( &t );
14654         if( status ) return errno;
14655 #endif
14656
14657 #ifdef HAVE_LINUX_THREADS
14658         pthread_kill_other_threads_np();
14659 #endif
14660
14661         return 0;
14662
14663 }
14664
14665 EOF
14666 if { (eval echo configure:14667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14667 then
14668   ol_cv_pthread_lpthreads_lmach_lexc=yes
14669 else
14670   echo "configure: failed program was:" >&5
14671   cat conftest.$ac_ext >&5
14672   rm -fr conftest*
14673   ol_cv_pthread_lpthreads_lmach_lexc=no
14674 fi
14675 rm -fr conftest*
14676 fi
14677
14678
14679                 # restore the LIBS
14680                 LIBS="$ol_LIBS"
14681         
14682 fi
14683
14684 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14685
14686         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14687                 ol_link_pthreads="-lpthreads -lmach -lexc"
14688                 ol_link_threads=posix
14689         fi
14690 fi
14691
14692                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14693 if test "$ol_link_threads" = no ; then
14694         # try -lpthreads -lexc
14695         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14696 echo "configure:14697: checking for pthread link with -lpthreads -lexc" >&5
14697 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14698   echo $ac_n "(cached) $ac_c" 1>&6
14699 else
14700   
14701                 # save the flags
14702                 ol_LIBS="$LIBS"
14703                 LIBS="-lpthreads -lexc $LIBS"
14704
14705                 if test "$cross_compiling" = yes; then
14706   cat > conftest.$ac_ext <<EOF
14707 #line 14708 "configure"
14708 #include "confdefs.h"
14709 /* pthread test headers */
14710 #include <pthread.h>
14711 #if HAVE_PTHREADS < 7
14712 #include <errno.h>
14713 #endif
14714 #ifndef NULL
14715 #define NULL (void*)0
14716 #endif
14717
14718 static void *task(p)
14719         void *p;
14720 {
14721         return (void *) (p == NULL);
14722 }
14723
14724 int main() {
14725
14726         /* pthread test function */
14727 #ifndef PTHREAD_CREATE_DETACHED
14728 #define PTHREAD_CREATE_DETACHED 1
14729 #endif
14730         pthread_t t;
14731         int status;
14732         int detach = PTHREAD_CREATE_DETACHED;
14733
14734 #if HAVE_PTHREADS > 4
14735         /* Final pthreads */
14736         pthread_attr_t attr;
14737
14738         status = pthread_attr_init(&attr);
14739         if( status ) return status;
14740
14741 #if HAVE_PTHREADS < 7
14742         status = pthread_attr_setdetachstate(&attr, &detach);
14743         if( status < 0 ) status = errno;
14744 #else
14745         status = pthread_attr_setdetachstate(&attr, detach);
14746 #endif
14747         if( status ) return status;
14748         status = pthread_create( &t, &attr, task, NULL );
14749 #if HAVE_PTHREADS < 7
14750         if( status < 0 ) status = errno;
14751 #endif
14752         if( status ) return status;
14753 #else
14754         /* Draft 4 pthreads */
14755         status = pthread_create( &t, pthread_attr_default, task, NULL );
14756         if( status ) return errno;
14757
14758         /* give thread a chance to complete */
14759         /* it should remain joinable and hence detachable */
14760         sleep( 1 );
14761
14762         status = pthread_detach( &t );
14763         if( status ) return errno;
14764 #endif
14765
14766 #ifdef HAVE_LINUX_THREADS
14767         pthread_kill_other_threads_np();
14768 #endif
14769
14770         return 0;
14771
14772 ; return 0; }
14773 EOF
14774 if { (eval echo configure:14775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14775   rm -rf conftest*
14776   ol_cv_pthread_lpthreads_lexc=yes
14777 else
14778   echo "configure: failed program was:" >&5
14779   cat conftest.$ac_ext >&5
14780   rm -rf conftest*
14781   ol_cv_pthread_lpthreads_lexc=no
14782 fi
14783 rm -f conftest*
14784 else
14785   cat > conftest.$ac_ext <<EOF
14786 #line 14787 "configure"
14787 #include "confdefs.h"
14788 /* pthread test headers */
14789 #include <pthread.h>
14790 #if HAVE_PTHREADS < 7
14791 #include <errno.h>
14792 #endif
14793 #ifndef NULL
14794 #define NULL (void*)0
14795 #endif
14796
14797 static void *task(p)
14798         void *p;
14799 {
14800         return (void *) (p == NULL);
14801 }
14802
14803
14804 int main(argc, argv)
14805         int argc;
14806         char **argv;
14807 {
14808
14809         /* pthread test function */
14810 #ifndef PTHREAD_CREATE_DETACHED
14811 #define PTHREAD_CREATE_DETACHED 1
14812 #endif
14813         pthread_t t;
14814         int status;
14815         int detach = PTHREAD_CREATE_DETACHED;
14816
14817 #if HAVE_PTHREADS > 4
14818         /* Final pthreads */
14819         pthread_attr_t attr;
14820
14821         status = pthread_attr_init(&attr);
14822         if( status ) return status;
14823
14824 #if HAVE_PTHREADS < 7
14825         status = pthread_attr_setdetachstate(&attr, &detach);
14826         if( status < 0 ) status = errno;
14827 #else
14828         status = pthread_attr_setdetachstate(&attr, detach);
14829 #endif
14830         if( status ) return status;
14831         status = pthread_create( &t, &attr, task, NULL );
14832 #if HAVE_PTHREADS < 7
14833         if( status < 0 ) status = errno;
14834 #endif
14835         if( status ) return status;
14836 #else
14837         /* Draft 4 pthreads */
14838         status = pthread_create( &t, pthread_attr_default, task, NULL );
14839         if( status ) return errno;
14840
14841         /* give thread a chance to complete */
14842         /* it should remain joinable and hence detachable */
14843         sleep( 1 );
14844
14845         status = pthread_detach( &t );
14846         if( status ) return errno;
14847 #endif
14848
14849 #ifdef HAVE_LINUX_THREADS
14850         pthread_kill_other_threads_np();
14851 #endif
14852
14853         return 0;
14854
14855 }
14856
14857 EOF
14858 if { (eval echo configure:14859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14859 then
14860   ol_cv_pthread_lpthreads_lexc=yes
14861 else
14862   echo "configure: failed program was:" >&5
14863   cat conftest.$ac_ext >&5
14864   rm -fr conftest*
14865   ol_cv_pthread_lpthreads_lexc=no
14866 fi
14867 rm -fr conftest*
14868 fi
14869
14870
14871                 # restore the LIBS
14872                 LIBS="$ol_LIBS"
14873         
14874 fi
14875
14876 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14877
14878         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14879                 ol_link_pthreads="-lpthreads -lexc"
14880                 ol_link_threads=posix
14881         fi
14882 fi
14883
14884
14885                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14886 if test "$ol_link_threads" = no ; then
14887         # try -lpthreads
14888         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14889 echo "configure:14890: checking for pthread link with -lpthreads" >&5
14890 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14891   echo $ac_n "(cached) $ac_c" 1>&6
14892 else
14893   
14894                 # save the flags
14895                 ol_LIBS="$LIBS"
14896                 LIBS="-lpthreads $LIBS"
14897
14898                 if test "$cross_compiling" = yes; then
14899   cat > conftest.$ac_ext <<EOF
14900 #line 14901 "configure"
14901 #include "confdefs.h"
14902 /* pthread test headers */
14903 #include <pthread.h>
14904 #if HAVE_PTHREADS < 7
14905 #include <errno.h>
14906 #endif
14907 #ifndef NULL
14908 #define NULL (void*)0
14909 #endif
14910
14911 static void *task(p)
14912         void *p;
14913 {
14914         return (void *) (p == NULL);
14915 }
14916
14917 int main() {
14918
14919         /* pthread test function */
14920 #ifndef PTHREAD_CREATE_DETACHED
14921 #define PTHREAD_CREATE_DETACHED 1
14922 #endif
14923         pthread_t t;
14924         int status;
14925         int detach = PTHREAD_CREATE_DETACHED;
14926
14927 #if HAVE_PTHREADS > 4
14928         /* Final pthreads */
14929         pthread_attr_t attr;
14930
14931         status = pthread_attr_init(&attr);
14932         if( status ) return status;
14933
14934 #if HAVE_PTHREADS < 7
14935         status = pthread_attr_setdetachstate(&attr, &detach);
14936         if( status < 0 ) status = errno;
14937 #else
14938         status = pthread_attr_setdetachstate(&attr, detach);
14939 #endif
14940         if( status ) return status;
14941         status = pthread_create( &t, &attr, task, NULL );
14942 #if HAVE_PTHREADS < 7
14943         if( status < 0 ) status = errno;
14944 #endif
14945         if( status ) return status;
14946 #else
14947         /* Draft 4 pthreads */
14948         status = pthread_create( &t, pthread_attr_default, task, NULL );
14949         if( status ) return errno;
14950
14951         /* give thread a chance to complete */
14952         /* it should remain joinable and hence detachable */
14953         sleep( 1 );
14954
14955         status = pthread_detach( &t );
14956         if( status ) return errno;
14957 #endif
14958
14959 #ifdef HAVE_LINUX_THREADS
14960         pthread_kill_other_threads_np();
14961 #endif
14962
14963         return 0;
14964
14965 ; return 0; }
14966 EOF
14967 if { (eval echo configure:14968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14968   rm -rf conftest*
14969   ol_cv_pthread_lib_lpthreads=yes
14970 else
14971   echo "configure: failed program was:" >&5
14972   cat conftest.$ac_ext >&5
14973   rm -rf conftest*
14974   ol_cv_pthread_lib_lpthreads=no
14975 fi
14976 rm -f conftest*
14977 else
14978   cat > conftest.$ac_ext <<EOF
14979 #line 14980 "configure"
14980 #include "confdefs.h"
14981 /* pthread test headers */
14982 #include <pthread.h>
14983 #if HAVE_PTHREADS < 7
14984 #include <errno.h>
14985 #endif
14986 #ifndef NULL
14987 #define NULL (void*)0
14988 #endif
14989
14990 static void *task(p)
14991         void *p;
14992 {
14993         return (void *) (p == NULL);
14994 }
14995
14996
14997 int main(argc, argv)
14998         int argc;
14999         char **argv;
15000 {
15001
15002         /* pthread test function */
15003 #ifndef PTHREAD_CREATE_DETACHED
15004 #define PTHREAD_CREATE_DETACHED 1
15005 #endif
15006         pthread_t t;
15007         int status;
15008         int detach = PTHREAD_CREATE_DETACHED;
15009
15010 #if HAVE_PTHREADS > 4
15011         /* Final pthreads */
15012         pthread_attr_t attr;
15013
15014         status = pthread_attr_init(&attr);
15015         if( status ) return status;
15016
15017 #if HAVE_PTHREADS < 7
15018         status = pthread_attr_setdetachstate(&attr, &detach);
15019         if( status < 0 ) status = errno;
15020 #else
15021         status = pthread_attr_setdetachstate(&attr, detach);
15022 #endif
15023         if( status ) return status;
15024         status = pthread_create( &t, &attr, task, NULL );
15025 #if HAVE_PTHREADS < 7
15026         if( status < 0 ) status = errno;
15027 #endif
15028         if( status ) return status;
15029 #else
15030         /* Draft 4 pthreads */
15031         status = pthread_create( &t, pthread_attr_default, task, NULL );
15032         if( status ) return errno;
15033
15034         /* give thread a chance to complete */
15035         /* it should remain joinable and hence detachable */
15036         sleep( 1 );
15037
15038         status = pthread_detach( &t );
15039         if( status ) return errno;
15040 #endif
15041
15042 #ifdef HAVE_LINUX_THREADS
15043         pthread_kill_other_threads_np();
15044 #endif
15045
15046         return 0;
15047
15048 }
15049
15050 EOF
15051 if { (eval echo configure:15052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15052 then
15053   ol_cv_pthread_lib_lpthreads=yes
15054 else
15055   echo "configure: failed program was:" >&5
15056   cat conftest.$ac_ext >&5
15057   rm -fr conftest*
15058   ol_cv_pthread_lib_lpthreads=no
15059 fi
15060 rm -fr conftest*
15061 fi
15062
15063
15064                 # restore the LIBS
15065                 LIBS="$ol_LIBS"
15066         
15067 fi
15068
15069 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15070
15071         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15072                 ol_link_pthreads="-lpthreads"
15073                 ol_link_threads=posix
15074         fi
15075 fi
15076
15077
15078                 if test $ol_link_threads != no ; then
15079                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15080
15081                                                 save_CPPFLAGS="$CPPFLAGS"
15082                         save_LIBS="$LIBS"
15083                         LIBS="$LTHREAD_LIBS $LIBS"
15084
15085                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15086 do
15087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15088 echo "configure:15089: checking for $ac_func" >&5
15089 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15090   echo $ac_n "(cached) $ac_c" 1>&6
15091 else
15092   cat > conftest.$ac_ext <<EOF
15093 #line 15094 "configure"
15094 #include "confdefs.h"
15095 /* System header to define __stub macros and hopefully few prototypes,
15096     which can conflict with char $ac_func(); below.  */
15097 #include <assert.h>
15098 /* Override any gcc2 internal prototype to avoid an error.  */
15099 /* We use char because int might match the return type of a gcc2
15100     builtin and then its argument prototype would still apply.  */
15101 char $ac_func();
15102 char (*f)();
15103
15104 int main() {
15105
15106 /* The GNU C library defines this for functions which it implements
15107     to always fail with ENOSYS.  Some functions are actually named
15108     something starting with __ and the normal name is an alias.  */
15109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15110 choke me
15111 #else
15112 f = $ac_func;
15113 #endif
15114
15115 ; return 0; }
15116 EOF
15117 if { (eval echo configure:15118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15118   rm -rf conftest*
15119   eval "ac_cv_func_$ac_func=yes"
15120 else
15121   echo "configure: failed program was:" >&5
15122   cat conftest.$ac_ext >&5
15123   rm -rf conftest*
15124   eval "ac_cv_func_$ac_func=no"
15125 fi
15126 rm -f conftest*
15127 fi
15128
15129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15130   echo "$ac_t""yes" 1>&6
15131     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15132   cat >> confdefs.h <<EOF
15133 #define $ac_tr_func 1
15134 EOF
15135  
15136 else
15137   echo "$ac_t""no" 1>&6
15138 fi
15139 done
15140
15141
15142                         if test $ac_cv_func_sched_yield = no -a \
15143                                 $ac_cv_func_pthread_yield = no -a \
15144                                 $ac_cv_func_thr_yield = no ; then
15145                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15146 echo "configure:15147: checking for sched_yield in -lrt" >&5
15147 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15148 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15149   echo $ac_n "(cached) $ac_c" 1>&6
15150 else
15151   ac_save_LIBS="$LIBS"
15152 LIBS="-lrt  $LIBS"
15153 cat > conftest.$ac_ext <<EOF
15154 #line 15155 "configure"
15155 #include "confdefs.h"
15156 /* Override any gcc2 internal prototype to avoid an error.  */
15157 /* We use char because int might match the return type of a gcc2
15158     builtin and then its argument prototype would still apply.  */
15159 char sched_yield();
15160
15161 int main() {
15162 sched_yield()
15163 ; return 0; }
15164 EOF
15165 if { (eval echo configure:15166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15166   rm -rf conftest*
15167   eval "ac_cv_lib_$ac_lib_var=yes"
15168 else
15169   echo "configure: failed program was:" >&5
15170   cat conftest.$ac_ext >&5
15171   rm -rf conftest*
15172   eval "ac_cv_lib_$ac_lib_var=no"
15173 fi
15174 rm -f conftest*
15175 LIBS="$ac_save_LIBS"
15176
15177 fi
15178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15179   echo "$ac_t""yes" 1>&6
15180   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15181                                         cat >> confdefs.h <<\EOF
15182 #define HAVE_SCHED_YIELD 1
15183 EOF
15184
15185                                         ac_cv_func_sched_yield=yes
15186 else
15187   echo "$ac_t""no" 1>&6
15188 ac_cv_func_sched_yield=no
15189 fi
15190
15191                         fi
15192                         if test $ac_cv_func_sched_yield = no -a \
15193                                 $ac_cv_func_pthread_yield = no -a \
15194                                 "$ac_cv_func_thr_yield" = no ; then
15195                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15196                         fi
15197
15198                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15199 do
15200 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15201 echo "configure:15202: checking for $ac_func" >&5
15202 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15203   echo $ac_n "(cached) $ac_c" 1>&6
15204 else
15205   cat > conftest.$ac_ext <<EOF
15206 #line 15207 "configure"
15207 #include "confdefs.h"
15208 /* System header to define __stub macros and hopefully few prototypes,
15209     which can conflict with char $ac_func(); below.  */
15210 #include <assert.h>
15211 /* Override any gcc2 internal prototype to avoid an error.  */
15212 /* We use char because int might match the return type of a gcc2
15213     builtin and then its argument prototype would still apply.  */
15214 char $ac_func();
15215 char (*f)();
15216
15217 int main() {
15218
15219 /* The GNU C library defines this for functions which it implements
15220     to always fail with ENOSYS.  Some functions are actually named
15221     something starting with __ and the normal name is an alias.  */
15222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15223 choke me
15224 #else
15225 f = $ac_func;
15226 #endif
15227
15228 ; return 0; }
15229 EOF
15230 if { (eval echo configure:15231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15231   rm -rf conftest*
15232   eval "ac_cv_func_$ac_func=yes"
15233 else
15234   echo "configure: failed program was:" >&5
15235   cat conftest.$ac_ext >&5
15236   rm -rf conftest*
15237   eval "ac_cv_func_$ac_func=no"
15238 fi
15239 rm -f conftest*
15240 fi
15241
15242 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15243   echo "$ac_t""yes" 1>&6
15244     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15245   cat >> confdefs.h <<EOF
15246 #define $ac_tr_func 1
15247 EOF
15248  
15249 else
15250   echo "$ac_t""no" 1>&6
15251 fi
15252 done
15253
15254
15255                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15256 echo "configure:15257: checking for pthread_detach with <pthread.h>" >&5
15257 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15258   echo $ac_n "(cached) $ac_c" 1>&6
15259 else
15260   
15261                                                                 cat > conftest.$ac_ext <<EOF
15262 #line 15263 "configure"
15263 #include "confdefs.h"
15264
15265 #include <pthread.h>
15266 #ifndef NULL
15267 #define NULL (void*)0
15268 #endif
15269
15270 int main() {
15271 pthread_detach(NULL);
15272 ; return 0; }
15273 EOF
15274 if { (eval echo configure:15275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15275   rm -rf conftest*
15276   ol_cv_func_pthread_detach=yes
15277 else
15278   echo "configure: failed program was:" >&5
15279   cat conftest.$ac_ext >&5
15280   rm -rf conftest*
15281   ol_cv_func_pthread_detach=no
15282 fi
15283 rm -f conftest*
15284                         
15285 fi
15286
15287 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15288
15289                         if test $ol_cv_func_pthread_detach = no ; then
15290                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15291                         fi
15292
15293                         cat >> confdefs.h <<\EOF
15294 #define HAVE_PTHREAD_DETACH 1
15295 EOF
15296
15297
15298                                                 for ac_func in \
15299                                 pthread_setconcurrency \
15300                                 pthread_getconcurrency \
15301                                 thr_setconcurrency \
15302                                 thr_getconcurrency \
15303                         
15304 do
15305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15306 echo "configure:15307: checking for $ac_func" >&5
15307 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15308   echo $ac_n "(cached) $ac_c" 1>&6
15309 else
15310   cat > conftest.$ac_ext <<EOF
15311 #line 15312 "configure"
15312 #include "confdefs.h"
15313 /* System header to define __stub macros and hopefully few prototypes,
15314     which can conflict with char $ac_func(); below.  */
15315 #include <assert.h>
15316 /* Override any gcc2 internal prototype to avoid an error.  */
15317 /* We use char because int might match the return type of a gcc2
15318     builtin and then its argument prototype would still apply.  */
15319 char $ac_func();
15320 char (*f)();
15321
15322 int main() {
15323
15324 /* The GNU C library defines this for functions which it implements
15325     to always fail with ENOSYS.  Some functions are actually named
15326     something starting with __ and the normal name is an alias.  */
15327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15328 choke me
15329 #else
15330 f = $ac_func;
15331 #endif
15332
15333 ; return 0; }
15334 EOF
15335 if { (eval echo configure:15336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15336   rm -rf conftest*
15337   eval "ac_cv_func_$ac_func=yes"
15338 else
15339   echo "configure: failed program was:" >&5
15340   cat conftest.$ac_ext >&5
15341   rm -rf conftest*
15342   eval "ac_cv_func_$ac_func=no"
15343 fi
15344 rm -f conftest*
15345 fi
15346
15347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15348   echo "$ac_t""yes" 1>&6
15349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15350   cat >> confdefs.h <<EOF
15351 #define $ac_tr_func 1
15352 EOF
15353  
15354 else
15355   echo "$ac_t""no" 1>&6
15356 fi
15357 done
15358
15359
15360                         
15361         for ac_func in pthread_kill_other_threads_np
15362 do
15363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15364 echo "configure:15365: checking for $ac_func" >&5
15365 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15366   echo $ac_n "(cached) $ac_c" 1>&6
15367 else
15368   cat > conftest.$ac_ext <<EOF
15369 #line 15370 "configure"
15370 #include "confdefs.h"
15371 /* System header to define __stub macros and hopefully few prototypes,
15372     which can conflict with char $ac_func(); below.  */
15373 #include <assert.h>
15374 /* Override any gcc2 internal prototype to avoid an error.  */
15375 /* We use char because int might match the return type of a gcc2
15376     builtin and then its argument prototype would still apply.  */
15377 char $ac_func();
15378 char (*f)();
15379
15380 int main() {
15381
15382 /* The GNU C library defines this for functions which it implements
15383     to always fail with ENOSYS.  Some functions are actually named
15384     something starting with __ and the normal name is an alias.  */
15385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15386 choke me
15387 #else
15388 f = $ac_func;
15389 #endif
15390
15391 ; return 0; }
15392 EOF
15393 if { (eval echo configure:15394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15394   rm -rf conftest*
15395   eval "ac_cv_func_$ac_func=yes"
15396 else
15397   echo "configure: failed program was:" >&5
15398   cat conftest.$ac_ext >&5
15399   rm -rf conftest*
15400   eval "ac_cv_func_$ac_func=no"
15401 fi
15402 rm -f conftest*
15403 fi
15404
15405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15406   echo "$ac_t""yes" 1>&6
15407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15408   cat >> confdefs.h <<EOF
15409 #define $ac_tr_func 1
15410 EOF
15411  
15412 else
15413   echo "$ac_t""no" 1>&6
15414 fi
15415 done
15416
15417         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15418 echo "configure:15419: checking for LinuxThreads implementation" >&5
15419 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15420   echo $ac_n "(cached) $ac_c" 1>&6
15421 else
15422   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15423 fi
15424
15425 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15426
15427                         
15428         
15429         
15430         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15431 echo "configure:15432: checking for LinuxThreads consistency" >&5
15432 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15433   echo $ac_n "(cached) $ac_c" 1>&6
15434 else
15435   
15436                 if test $ol_cv_header_linux_threads = yes -a \
15437                         $ol_cv_sys_linux_threads = yes; then
15438                         ol_cv_linux_threads=yes
15439                 elif test $ol_cv_header_linux_threads = no -a \
15440                         $ol_cv_sys_linux_threads = no; then
15441                         ol_cv_linux_threads=no
15442                 else
15443                         ol_cv_linux_threads=error
15444                 fi
15445         
15446 fi
15447
15448 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15449
15450
15451                         if test $ol_cv_linux_threads = error; then
15452                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15453                         fi
15454
15455                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15456 echo "configure:15457: checking if pthread_create() works" >&5
15457 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15458   echo $ac_n "(cached) $ac_c" 1>&6
15459 else
15460   
15461                         if test "$cross_compiling" = yes; then
15462                                 ol_cv_pthread_create_works=yes
15463 else
15464   cat > conftest.$ac_ext <<EOF
15465 #line 15466 "configure"
15466 #include "confdefs.h"
15467 /* pthread test headers */
15468 #include <pthread.h>
15469 #if HAVE_PTHREADS < 7
15470 #include <errno.h>
15471 #endif
15472 #ifndef NULL
15473 #define NULL (void*)0
15474 #endif
15475
15476 static void *task(p)
15477         void *p;
15478 {
15479         return (void *) (p == NULL);
15480 }
15481
15482
15483 int main(argc, argv)
15484         int argc;
15485         char **argv;
15486 {
15487
15488         /* pthread test function */
15489 #ifndef PTHREAD_CREATE_DETACHED
15490 #define PTHREAD_CREATE_DETACHED 1
15491 #endif
15492         pthread_t t;
15493         int status;
15494         int detach = PTHREAD_CREATE_DETACHED;
15495
15496 #if HAVE_PTHREADS > 4
15497         /* Final pthreads */
15498         pthread_attr_t attr;
15499
15500         status = pthread_attr_init(&attr);
15501         if( status ) return status;
15502
15503 #if HAVE_PTHREADS < 7
15504         status = pthread_attr_setdetachstate(&attr, &detach);
15505         if( status < 0 ) status = errno;
15506 #else
15507         status = pthread_attr_setdetachstate(&attr, detach);
15508 #endif
15509         if( status ) return status;
15510         status = pthread_create( &t, &attr, task, NULL );
15511 #if HAVE_PTHREADS < 7
15512         if( status < 0 ) status = errno;
15513 #endif
15514         if( status ) return status;
15515 #else
15516         /* Draft 4 pthreads */
15517         status = pthread_create( &t, pthread_attr_default, task, NULL );
15518         if( status ) return errno;
15519
15520         /* give thread a chance to complete */
15521         /* it should remain joinable and hence detachable */
15522         sleep( 1 );
15523
15524         status = pthread_detach( &t );
15525         if( status ) return errno;
15526 #endif
15527
15528 #ifdef HAVE_LINUX_THREADS
15529         pthread_kill_other_threads_np();
15530 #endif
15531
15532         return 0;
15533
15534 }
15535
15536 EOF
15537 if { (eval echo configure:15538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15538 then
15539   ol_cv_pthread_create_works=yes
15540 else
15541   echo "configure: failed program was:" >&5
15542   cat conftest.$ac_ext >&5
15543   rm -fr conftest*
15544   ol_cv_pthread_create_works=no
15545 fi
15546 rm -fr conftest*
15547 fi
15548
15549 fi
15550
15551 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15552
15553                         if test $ol_cv_pthread_create_works = no ; then
15554                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15555                         fi
15556
15557                                                 if test $ol_with_yielding_select = auto ; then
15558                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15559 echo "configure:15560: checking if select yields when using pthreads" >&5
15560 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15561   echo $ac_n "(cached) $ac_c" 1>&6
15562 else
15563   
15564                                 if test "$cross_compiling" = yes; then
15565   ol_cv_pthread_select_yields=cross
15566 else
15567   cat > conftest.$ac_ext <<EOF
15568 #line 15569 "configure"
15569 #include "confdefs.h"
15570
15571 #include <sys/types.h>
15572 #include <sys/time.h>
15573 #include <unistd.h>
15574 #include <pthread.h>
15575 #ifndef NULL
15576 #define NULL (void*) 0
15577 #endif
15578
15579 static int fildes[2];
15580
15581 static void *task(p)
15582         void *p;
15583 {
15584         int i;
15585         struct timeval tv;
15586
15587         fd_set rfds;
15588
15589         tv.tv_sec=10;
15590         tv.tv_usec=0;
15591
15592         FD_ZERO(&rfds);
15593         FD_SET(fildes[0], &rfds);
15594
15595         /* we're not interested in any fds */
15596         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15597
15598         if(i < 0) {
15599                 perror("select");
15600                 exit(10);
15601         }
15602
15603         exit(0); /* if we exit here, the select blocked the whole process */
15604 }
15605
15606 int main(argc, argv)
15607         int argc;
15608         char **argv;
15609 {
15610         pthread_t t;
15611
15612         /* create a pipe to select */
15613         if(pipe(&fildes[0])) {
15614                 perror("select");
15615                 exit(1);
15616         }
15617
15618 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15619         (void) pthread_setconcurrency(2);
15620 #else
15621 #ifdef HAVE_THR_SETCONCURRENCY
15622         /* Set Solaris LWP concurrency to 2 */
15623         thr_setconcurrency(2);
15624 #endif
15625 #endif
15626
15627 #if HAVE_PTHREADS < 6
15628         pthread_create(&t, pthread_attr_default, task, NULL);
15629 #else
15630         pthread_create(&t, NULL, task, NULL);
15631 #endif
15632
15633         /* make sure task runs first */
15634 #if HAVE_THR_YIELD
15635         thr_yield();
15636 #elif defined( HAVE_SCHED_YIELD )
15637         sched_yield();
15638 #elif defined( HAVE_PTHREAD_YIELD )
15639         pthread_yield();
15640 #endif
15641
15642         exit(2);
15643 }
15644 EOF
15645 if { (eval echo configure:15646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15646 then
15647   ol_cv_pthread_select_yields=no
15648 else
15649   echo "configure: failed program was:" >&5
15650   cat conftest.$ac_ext >&5
15651   rm -fr conftest*
15652   ol_cv_pthread_select_yields=yes
15653 fi
15654 rm -fr conftest*
15655 fi
15656
15657 fi
15658
15659 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15660
15661                                 if test $ol_cv_pthread_select_yields = cross ; then
15662                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15663                                 fi
15664
15665                                 if test $ol_cv_pthread_select_yields = yes ; then
15666                                         ol_with_yielding_select=yes
15667                                 fi
15668                         fi
15669
15670                                                 CPPFLAGS="$save_CPPFLAGS"
15671                         LIBS="$save_LIBS"
15672                 else
15673                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15674                 fi
15675         fi
15676
15677         if test $ol_with_threads = posix ; then
15678                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15679         fi
15680 fi
15681
15682 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15683         -o $ol_with_threads = mach ; then
15684
15685                 for ac_hdr in mach/cthreads.h cthreads.h
15686 do
15687 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15688 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15689 echo "configure:15690: checking for $ac_hdr" >&5
15690 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15691   echo $ac_n "(cached) $ac_c" 1>&6
15692 else
15693   cat > conftest.$ac_ext <<EOF
15694 #line 15695 "configure"
15695 #include "confdefs.h"
15696 #include <$ac_hdr>
15697 EOF
15698 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15699 { (eval echo configure:15700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15700 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15701 if test -z "$ac_err"; then
15702   rm -rf conftest*
15703   eval "ac_cv_header_$ac_safe=yes"
15704 else
15705   echo "$ac_err" >&5
15706   echo "configure: failed program was:" >&5
15707   cat conftest.$ac_ext >&5
15708   rm -rf conftest*
15709   eval "ac_cv_header_$ac_safe=no"
15710 fi
15711 rm -f conftest*
15712 fi
15713 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15714   echo "$ac_t""yes" 1>&6
15715     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15716   cat >> confdefs.h <<EOF
15717 #define $ac_tr_hdr 1
15718 EOF
15719  
15720 else
15721   echo "$ac_t""no" 1>&6
15722 fi
15723 done
15724
15725         if test $ac_cv_header_mach_cthreads_h = yes ; then
15726                 ol_with_threads=found
15727
15728                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15729 echo "configure:15730: checking for cthread_fork" >&5
15730 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15731   echo $ac_n "(cached) $ac_c" 1>&6
15732 else
15733   cat > conftest.$ac_ext <<EOF
15734 #line 15735 "configure"
15735 #include "confdefs.h"
15736 /* System header to define __stub macros and hopefully few prototypes,
15737     which can conflict with char cthread_fork(); below.  */
15738 #include <assert.h>
15739 /* Override any gcc2 internal prototype to avoid an error.  */
15740 /* We use char because int might match the return type of a gcc2
15741     builtin and then its argument prototype would still apply.  */
15742 char cthread_fork();
15743 char (*f)();
15744
15745 int main() {
15746
15747 /* The GNU C library defines this for functions which it implements
15748     to always fail with ENOSYS.  Some functions are actually named
15749     something starting with __ and the normal name is an alias.  */
15750 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15751 choke me
15752 #else
15753 f = cthread_fork;
15754 #endif
15755
15756 ; return 0; }
15757 EOF
15758 if { (eval echo configure:15759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15759   rm -rf conftest*
15760   eval "ac_cv_func_cthread_fork=yes"
15761 else
15762   echo "configure: failed program was:" >&5
15763   cat conftest.$ac_ext >&5
15764   rm -rf conftest*
15765   eval "ac_cv_func_cthread_fork=no"
15766 fi
15767 rm -f conftest*
15768 fi
15769
15770 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15771   echo "$ac_t""yes" 1>&6
15772   ol_link_threads=yes
15773 else
15774   echo "$ac_t""no" 1>&6
15775 fi
15776
15777
15778                 if test $ol_link_threads = no ; then
15779                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15780 echo "configure:15781: checking for cthread_fork with -all_load" >&5
15781 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15782   echo $ac_n "(cached) $ac_c" 1>&6
15783 else
15784   
15785                                                                 save_LIBS="$LIBS"
15786                                 LIBS="-all_load $LIBS"
15787                                 cat > conftest.$ac_ext <<EOF
15788 #line 15789 "configure"
15789 #include "confdefs.h"
15790 #include <mach/cthreads.h>
15791 int main() {
15792
15793                                         cthread_fork((void *)0, (void *)0);
15794                                         
15795 ; return 0; }
15796 EOF
15797 if { (eval echo configure:15798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15798   rm -rf conftest*
15799   ol_cv_cthread_all_load=yes
15800 else
15801   echo "configure: failed program was:" >&5
15802   cat conftest.$ac_ext >&5
15803   rm -rf conftest*
15804   ol_cv_cthread_all_load=no
15805 fi
15806 rm -f conftest*
15807                                                                 LIBS="$save_LIBS"
15808                         
15809 fi
15810
15811 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15812
15813                         if test $ol_cv_cthread_all_load = yes ; then
15814                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15815                                 ol_link_threads=mach
15816                                 ol_with_threads=found
15817                         fi
15818                 fi
15819
15820         elif test $ac_cv_header_cthreads_h = yes ; then
15821                                 
15822                 ol_with_threads=found
15823  
15824                                 save_LIBS="$LIBS"
15825                 LIBS="$LIBS -lthreads"
15826                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15827 echo "configure:15828: checking for cthread_fork" >&5
15828 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15829   echo $ac_n "(cached) $ac_c" 1>&6
15830 else
15831   cat > conftest.$ac_ext <<EOF
15832 #line 15833 "configure"
15833 #include "confdefs.h"
15834 /* System header to define __stub macros and hopefully few prototypes,
15835     which can conflict with char cthread_fork(); below.  */
15836 #include <assert.h>
15837 /* Override any gcc2 internal prototype to avoid an error.  */
15838 /* We use char because int might match the return type of a gcc2
15839     builtin and then its argument prototype would still apply.  */
15840 char cthread_fork();
15841 char (*f)();
15842
15843 int main() {
15844
15845 /* The GNU C library defines this for functions which it implements
15846     to always fail with ENOSYS.  Some functions are actually named
15847     something starting with __ and the normal name is an alias.  */
15848 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15849 choke me
15850 #else
15851 f = cthread_fork;
15852 #endif
15853
15854 ; return 0; }
15855 EOF
15856 if { (eval echo configure:15857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15857   rm -rf conftest*
15858   eval "ac_cv_func_cthread_fork=yes"
15859 else
15860   echo "configure: failed program was:" >&5
15861   cat conftest.$ac_ext >&5
15862   rm -rf conftest*
15863   eval "ac_cv_func_cthread_fork=no"
15864 fi
15865 rm -f conftest*
15866 fi
15867
15868 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15869   echo "$ac_t""yes" 1>&6
15870   ol_link_threads=yes
15871 else
15872   echo "$ac_t""no" 1>&6
15873 fi
15874
15875                 LIBS="$save_LIBS"
15876
15877                 if test $ol_link_threads = yes ; then
15878                         LTHREAD_LIBS="-lthreads"
15879                         ol_link_threads=mach
15880                         ol_with_threads=found
15881                 else
15882                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15883                 fi
15884
15885         elif test $ol_with_threads = mach ; then
15886                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15887         fi
15888
15889         if test $ol_link_threads = mach ; then
15890                 cat >> confdefs.h <<\EOF
15891 #define HAVE_MACH_CTHREADS 1
15892 EOF
15893
15894         elif test $ol_with_threads = found ; then
15895                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15896         fi
15897 fi
15898
15899 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15900         -o $ol_with_threads = pth ; then
15901
15902         for ac_hdr in pth.h
15903 do
15904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15906 echo "configure:15907: checking for $ac_hdr" >&5
15907 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15908   echo $ac_n "(cached) $ac_c" 1>&6
15909 else
15910   cat > conftest.$ac_ext <<EOF
15911 #line 15912 "configure"
15912 #include "confdefs.h"
15913 #include <$ac_hdr>
15914 EOF
15915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15916 { (eval echo configure:15917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15918 if test -z "$ac_err"; then
15919   rm -rf conftest*
15920   eval "ac_cv_header_$ac_safe=yes"
15921 else
15922   echo "$ac_err" >&5
15923   echo "configure: failed program was:" >&5
15924   cat conftest.$ac_ext >&5
15925   rm -rf conftest*
15926   eval "ac_cv_header_$ac_safe=no"
15927 fi
15928 rm -f conftest*
15929 fi
15930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15931   echo "$ac_t""yes" 1>&6
15932     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15933   cat >> confdefs.h <<EOF
15934 #define $ac_tr_hdr 1
15935 EOF
15936  
15937 else
15938   echo "$ac_t""no" 1>&6
15939 fi
15940 done
15941
15942
15943         if test $ac_cv_header_pth_h = yes ; then
15944                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15945 echo "configure:15946: checking for pth_version in -lpth" >&5
15946 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15947 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15948   echo $ac_n "(cached) $ac_c" 1>&6
15949 else
15950   ac_save_LIBS="$LIBS"
15951 LIBS="-lpth  $LIBS"
15952 cat > conftest.$ac_ext <<EOF
15953 #line 15954 "configure"
15954 #include "confdefs.h"
15955 /* Override any gcc2 internal prototype to avoid an error.  */
15956 /* We use char because int might match the return type of a gcc2
15957     builtin and then its argument prototype would still apply.  */
15958 char pth_version();
15959
15960 int main() {
15961 pth_version()
15962 ; return 0; }
15963 EOF
15964 if { (eval echo configure:15965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15965   rm -rf conftest*
15966   eval "ac_cv_lib_$ac_lib_var=yes"
15967 else
15968   echo "configure: failed program was:" >&5
15969   cat conftest.$ac_ext >&5
15970   rm -rf conftest*
15971   eval "ac_cv_lib_$ac_lib_var=no"
15972 fi
15973 rm -f conftest*
15974 LIBS="$ac_save_LIBS"
15975
15976 fi
15977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15978   echo "$ac_t""yes" 1>&6
15979   have_pth=yes
15980 else
15981   echo "$ac_t""no" 1>&6
15982 have_pth=no
15983 fi
15984
15985
15986                 if test $have_pth = yes ; then
15987                         cat >> confdefs.h <<\EOF
15988 #define HAVE_GNU_PTH 1
15989 EOF
15990
15991                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15992                         ol_link_threads=pth
15993                         ol_with_threads=found
15994
15995                         if test $ol_with_yielding_select = auto ; then
15996                                 ol_with_yielding_select=yes
15997                         fi
15998                 fi
15999         fi
16000 fi
16001
16002 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16003         -o $ol_with_threads = lwp ; then
16004
16005                 for ac_hdr in thread.h synch.h
16006 do
16007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16008 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16009 echo "configure:16010: checking for $ac_hdr" >&5
16010 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16011   echo $ac_n "(cached) $ac_c" 1>&6
16012 else
16013   cat > conftest.$ac_ext <<EOF
16014 #line 16015 "configure"
16015 #include "confdefs.h"
16016 #include <$ac_hdr>
16017 EOF
16018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16019 { (eval echo configure:16020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16021 if test -z "$ac_err"; then
16022   rm -rf conftest*
16023   eval "ac_cv_header_$ac_safe=yes"
16024 else
16025   echo "$ac_err" >&5
16026   echo "configure: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   rm -rf conftest*
16029   eval "ac_cv_header_$ac_safe=no"
16030 fi
16031 rm -f conftest*
16032 fi
16033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16034   echo "$ac_t""yes" 1>&6
16035     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16036   cat >> confdefs.h <<EOF
16037 #define $ac_tr_hdr 1
16038 EOF
16039  
16040 else
16041   echo "$ac_t""no" 1>&6
16042 fi
16043 done
16044
16045         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16046                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16047 echo "configure:16048: checking for thr_create in -lthread" >&5
16048 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16050   echo $ac_n "(cached) $ac_c" 1>&6
16051 else
16052   ac_save_LIBS="$LIBS"
16053 LIBS="-lthread  $LIBS"
16054 cat > conftest.$ac_ext <<EOF
16055 #line 16056 "configure"
16056 #include "confdefs.h"
16057 /* Override any gcc2 internal prototype to avoid an error.  */
16058 /* We use char because int might match the return type of a gcc2
16059     builtin and then its argument prototype would still apply.  */
16060 char thr_create();
16061
16062 int main() {
16063 thr_create()
16064 ; return 0; }
16065 EOF
16066 if { (eval echo configure:16067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16067   rm -rf conftest*
16068   eval "ac_cv_lib_$ac_lib_var=yes"
16069 else
16070   echo "configure: failed program was:" >&5
16071   cat conftest.$ac_ext >&5
16072   rm -rf conftest*
16073   eval "ac_cv_lib_$ac_lib_var=no"
16074 fi
16075 rm -f conftest*
16076 LIBS="$ac_save_LIBS"
16077
16078 fi
16079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16080   echo "$ac_t""yes" 1>&6
16081   have_thr=yes
16082 else
16083   echo "$ac_t""no" 1>&6
16084 have_thr=no
16085 fi
16086
16087
16088                 if test $have_thr = yes ; then
16089                         cat >> confdefs.h <<\EOF
16090 #define HAVE_THR 1
16091 EOF
16092
16093                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16094                         ol_link_threads=thr
16095
16096                         if test $ol_with_yielding_select = auto ; then
16097                                 ol_with_yielding_select=yes
16098                         fi
16099
16100                                                 for ac_func in \
16101                                 thr_setconcurrency \
16102                                 thr_getconcurrency \
16103                         
16104 do
16105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16106 echo "configure:16107: checking for $ac_func" >&5
16107 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16108   echo $ac_n "(cached) $ac_c" 1>&6
16109 else
16110   cat > conftest.$ac_ext <<EOF
16111 #line 16112 "configure"
16112 #include "confdefs.h"
16113 /* System header to define __stub macros and hopefully few prototypes,
16114     which can conflict with char $ac_func(); below.  */
16115 #include <assert.h>
16116 /* Override any gcc2 internal prototype to avoid an error.  */
16117 /* We use char because int might match the return type of a gcc2
16118     builtin and then its argument prototype would still apply.  */
16119 char $ac_func();
16120 char (*f)();
16121
16122 int main() {
16123
16124 /* The GNU C library defines this for functions which it implements
16125     to always fail with ENOSYS.  Some functions are actually named
16126     something starting with __ and the normal name is an alias.  */
16127 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16128 choke me
16129 #else
16130 f = $ac_func;
16131 #endif
16132
16133 ; return 0; }
16134 EOF
16135 if { (eval echo configure:16136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16136   rm -rf conftest*
16137   eval "ac_cv_func_$ac_func=yes"
16138 else
16139   echo "configure: failed program was:" >&5
16140   cat conftest.$ac_ext >&5
16141   rm -rf conftest*
16142   eval "ac_cv_func_$ac_func=no"
16143 fi
16144 rm -f conftest*
16145 fi
16146
16147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16148   echo "$ac_t""yes" 1>&6
16149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16150   cat >> confdefs.h <<EOF
16151 #define $ac_tr_func 1
16152 EOF
16153  
16154 else
16155   echo "$ac_t""no" 1>&6
16156 fi
16157 done
16158
16159                 fi
16160         fi
16161
16162                 for ac_hdr in lwp/lwp.h
16163 do
16164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16166 echo "configure:16167: checking for $ac_hdr" >&5
16167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16168   echo $ac_n "(cached) $ac_c" 1>&6
16169 else
16170   cat > conftest.$ac_ext <<EOF
16171 #line 16172 "configure"
16172 #include "confdefs.h"
16173 #include <$ac_hdr>
16174 EOF
16175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16176 { (eval echo configure:16177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16178 if test -z "$ac_err"; then
16179   rm -rf conftest*
16180   eval "ac_cv_header_$ac_safe=yes"
16181 else
16182   echo "$ac_err" >&5
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   eval "ac_cv_header_$ac_safe=no"
16187 fi
16188 rm -f conftest*
16189 fi
16190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16191   echo "$ac_t""yes" 1>&6
16192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16193   cat >> confdefs.h <<EOF
16194 #define $ac_tr_hdr 1
16195 EOF
16196  
16197 else
16198   echo "$ac_t""no" 1>&6
16199 fi
16200 done
16201
16202         if test $ac_cv_header_lwp_lwp_h = yes ; then
16203                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16204 echo "configure:16205: checking for lwp_create in -llwp" >&5
16205 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16206 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16207   echo $ac_n "(cached) $ac_c" 1>&6
16208 else
16209   ac_save_LIBS="$LIBS"
16210 LIBS="-llwp  $LIBS"
16211 cat > conftest.$ac_ext <<EOF
16212 #line 16213 "configure"
16213 #include "confdefs.h"
16214 /* Override any gcc2 internal prototype to avoid an error.  */
16215 /* We use char because int might match the return type of a gcc2
16216     builtin and then its argument prototype would still apply.  */
16217 char lwp_create();
16218
16219 int main() {
16220 lwp_create()
16221 ; return 0; }
16222 EOF
16223 if { (eval echo configure:16224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16224   rm -rf conftest*
16225   eval "ac_cv_lib_$ac_lib_var=yes"
16226 else
16227   echo "configure: failed program was:" >&5
16228   cat conftest.$ac_ext >&5
16229   rm -rf conftest*
16230   eval "ac_cv_lib_$ac_lib_var=no"
16231 fi
16232 rm -f conftest*
16233 LIBS="$ac_save_LIBS"
16234
16235 fi
16236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16237   echo "$ac_t""yes" 1>&6
16238   have_lwp=yes
16239 else
16240   echo "$ac_t""no" 1>&6
16241 have_lwp=no
16242 fi
16243
16244
16245                 if test $have_lwp = yes ; then
16246                         cat >> confdefs.h <<\EOF
16247 #define HAVE_LWP 1
16248 EOF
16249
16250                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16251                         ol_link_threads=lwp
16252
16253                         if test $ol_with_yielding_select = auto ; then
16254                                 ol_with_yielding_select=no
16255                         fi
16256                 fi
16257         fi
16258 fi
16259
16260 if test $ol_with_yielding_select = yes ; then
16261         cat >> confdefs.h <<\EOF
16262 #define HAVE_YIELDING_SELECT 1
16263 EOF
16264
16265 fi
16266
16267 if test $ol_with_threads = manual ; then
16268                 ol_link_threads=yes
16269
16270         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16271
16272         for ac_hdr in pthread.h sched.h
16273 do
16274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16276 echo "configure:16277: checking for $ac_hdr" >&5
16277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16278   echo $ac_n "(cached) $ac_c" 1>&6
16279 else
16280   cat > conftest.$ac_ext <<EOF
16281 #line 16282 "configure"
16282 #include "confdefs.h"
16283 #include <$ac_hdr>
16284 EOF
16285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16286 { (eval echo configure:16287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16288 if test -z "$ac_err"; then
16289   rm -rf conftest*
16290   eval "ac_cv_header_$ac_safe=yes"
16291 else
16292   echo "$ac_err" >&5
16293   echo "configure: failed program was:" >&5
16294   cat conftest.$ac_ext >&5
16295   rm -rf conftest*
16296   eval "ac_cv_header_$ac_safe=no"
16297 fi
16298 rm -f conftest*
16299 fi
16300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16301   echo "$ac_t""yes" 1>&6
16302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16303   cat >> confdefs.h <<EOF
16304 #define $ac_tr_hdr 1
16305 EOF
16306  
16307 else
16308   echo "$ac_t""no" 1>&6
16309 fi
16310 done
16311
16312         for ac_func in sched_yield pthread_yield
16313 do
16314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16315 echo "configure:16316: checking for $ac_func" >&5
16316 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16317   echo $ac_n "(cached) $ac_c" 1>&6
16318 else
16319   cat > conftest.$ac_ext <<EOF
16320 #line 16321 "configure"
16321 #include "confdefs.h"
16322 /* System header to define __stub macros and hopefully few prototypes,
16323     which can conflict with char $ac_func(); below.  */
16324 #include <assert.h>
16325 /* Override any gcc2 internal prototype to avoid an error.  */
16326 /* We use char because int might match the return type of a gcc2
16327     builtin and then its argument prototype would still apply.  */
16328 char $ac_func();
16329 char (*f)();
16330
16331 int main() {
16332
16333 /* The GNU C library defines this for functions which it implements
16334     to always fail with ENOSYS.  Some functions are actually named
16335     something starting with __ and the normal name is an alias.  */
16336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16337 choke me
16338 #else
16339 f = $ac_func;
16340 #endif
16341
16342 ; return 0; }
16343 EOF
16344 if { (eval echo configure:16345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16345   rm -rf conftest*
16346   eval "ac_cv_func_$ac_func=yes"
16347 else
16348   echo "configure: failed program was:" >&5
16349   cat conftest.$ac_ext >&5
16350   rm -rf conftest*
16351   eval "ac_cv_func_$ac_func=no"
16352 fi
16353 rm -f conftest*
16354 fi
16355
16356 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16357   echo "$ac_t""yes" 1>&6
16358     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16359   cat >> confdefs.h <<EOF
16360 #define $ac_tr_func 1
16361 EOF
16362  
16363 else
16364   echo "$ac_t""no" 1>&6
16365 fi
16366 done
16367
16368         
16369         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16370 echo "configure:16371: checking for LinuxThreads pthread.h" >&5
16371 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16372   echo $ac_n "(cached) $ac_c" 1>&6
16373 else
16374   cat > conftest.$ac_ext <<EOF
16375 #line 16376 "configure"
16376 #include "confdefs.h"
16377 #include <pthread.h>
16378 EOF
16379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16380   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16381   rm -rf conftest*
16382   ol_cv_header_linux_threads=yes
16383 else
16384   rm -rf conftest*
16385   ol_cv_header_linux_threads=no
16386 fi
16387 rm -f conftest*
16388
16389                 
16390 fi
16391
16392 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16393         if test $ol_cv_header_linux_threads = yes; then
16394                 cat >> confdefs.h <<\EOF
16395 #define HAVE_LINUX_THREADS 1
16396 EOF
16397
16398         fi
16399
16400
16401         for ac_hdr in mach/cthreads.h
16402 do
16403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16405 echo "configure:16406: checking for $ac_hdr" >&5
16406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16407   echo $ac_n "(cached) $ac_c" 1>&6
16408 else
16409   cat > conftest.$ac_ext <<EOF
16410 #line 16411 "configure"
16411 #include "confdefs.h"
16412 #include <$ac_hdr>
16413 EOF
16414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16415 { (eval echo configure:16416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16417 if test -z "$ac_err"; then
16418   rm -rf conftest*
16419   eval "ac_cv_header_$ac_safe=yes"
16420 else
16421   echo "$ac_err" >&5
16422   echo "configure: failed program was:" >&5
16423   cat conftest.$ac_ext >&5
16424   rm -rf conftest*
16425   eval "ac_cv_header_$ac_safe=no"
16426 fi
16427 rm -f conftest*
16428 fi
16429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16430   echo "$ac_t""yes" 1>&6
16431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16432   cat >> confdefs.h <<EOF
16433 #define $ac_tr_hdr 1
16434 EOF
16435  
16436 else
16437   echo "$ac_t""no" 1>&6
16438 fi
16439 done
16440
16441         for ac_hdr in lwp/lwp.h
16442 do
16443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16445 echo "configure:16446: checking for $ac_hdr" >&5
16446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16447   echo $ac_n "(cached) $ac_c" 1>&6
16448 else
16449   cat > conftest.$ac_ext <<EOF
16450 #line 16451 "configure"
16451 #include "confdefs.h"
16452 #include <$ac_hdr>
16453 EOF
16454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16455 { (eval echo configure:16456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16457 if test -z "$ac_err"; then
16458   rm -rf conftest*
16459   eval "ac_cv_header_$ac_safe=yes"
16460 else
16461   echo "$ac_err" >&5
16462   echo "configure: failed program was:" >&5
16463   cat conftest.$ac_ext >&5
16464   rm -rf conftest*
16465   eval "ac_cv_header_$ac_safe=no"
16466 fi
16467 rm -f conftest*
16468 fi
16469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16470   echo "$ac_t""yes" 1>&6
16471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16472   cat >> confdefs.h <<EOF
16473 #define $ac_tr_hdr 1
16474 EOF
16475  
16476 else
16477   echo "$ac_t""no" 1>&6
16478 fi
16479 done
16480
16481         for ac_hdr in thread.h synch.h
16482 do
16483 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16484 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16485 echo "configure:16486: checking for $ac_hdr" >&5
16486 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16487   echo $ac_n "(cached) $ac_c" 1>&6
16488 else
16489   cat > conftest.$ac_ext <<EOF
16490 #line 16491 "configure"
16491 #include "confdefs.h"
16492 #include <$ac_hdr>
16493 EOF
16494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16495 { (eval echo configure:16496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16497 if test -z "$ac_err"; then
16498   rm -rf conftest*
16499   eval "ac_cv_header_$ac_safe=yes"
16500 else
16501   echo "$ac_err" >&5
16502   echo "configure: failed program was:" >&5
16503   cat conftest.$ac_ext >&5
16504   rm -rf conftest*
16505   eval "ac_cv_header_$ac_safe=no"
16506 fi
16507 rm -f conftest*
16508 fi
16509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16510   echo "$ac_t""yes" 1>&6
16511     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16512   cat >> confdefs.h <<EOF
16513 #define $ac_tr_hdr 1
16514 EOF
16515  
16516 else
16517   echo "$ac_t""no" 1>&6
16518 fi
16519 done
16520
16521 fi
16522
16523 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16524                         cat >> confdefs.h <<\EOF
16525 #define REENTRANT 1
16526 EOF
16527
16528         cat >> confdefs.h <<\EOF
16529 #define _REENTRANT 1
16530 EOF
16531
16532         cat >> confdefs.h <<\EOF
16533 #define THREAD_SAFE 1
16534 EOF
16535
16536         cat >> confdefs.h <<\EOF
16537 #define _THREAD_SAFE 1
16538 EOF
16539
16540         cat >> confdefs.h <<\EOF
16541 #define THREADSAFE 1
16542 EOF
16543
16544         cat >> confdefs.h <<\EOF
16545 #define _THREADSAFE 1
16546 EOF
16547
16548         cat >> confdefs.h <<\EOF
16549 #define _SGI_MP_SOURCE 1
16550 EOF
16551
16552
16553                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16554 echo "configure:16555: checking for thread specific errno" >&5
16555 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16556   echo $ac_n "(cached) $ac_c" 1>&6
16557 else
16558   
16559                 cat > conftest.$ac_ext <<EOF
16560 #line 16561 "configure"
16561 #include "confdefs.h"
16562 #include <errno.h>
16563 int main() {
16564 errno = 0;
16565 ; return 0; }
16566 EOF
16567 if { (eval echo configure:16568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16568   rm -rf conftest*
16569   ol_cv_errno_thread_specific=yes
16570 else
16571   echo "configure: failed program was:" >&5
16572   cat conftest.$ac_ext >&5
16573   rm -rf conftest*
16574   ol_cv_errno_thread_specific=no
16575 fi
16576 rm -f conftest*
16577         
16578 fi
16579
16580 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16581
16582                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16583 echo "configure:16584: checking for thread specific h_errno" >&5
16584 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16585   echo $ac_n "(cached) $ac_c" 1>&6
16586 else
16587   
16588                 cat > conftest.$ac_ext <<EOF
16589 #line 16590 "configure"
16590 #include "confdefs.h"
16591 #include <netdb.h>
16592 int main() {
16593 h_errno = 0;
16594 ; return 0; }
16595 EOF
16596 if { (eval echo configure:16597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16597   rm -rf conftest*
16598   ol_cv_h_errno_thread_specific=yes
16599 else
16600   echo "configure: failed program was:" >&5
16601   cat conftest.$ac_ext >&5
16602   rm -rf conftest*
16603   ol_cv_h_errno_thread_specific=no
16604 fi
16605 rm -f conftest*
16606         
16607 fi
16608
16609 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16610
16611         if test $ol_cv_errno_thread_specific != yes \
16612                 -o $ol_cv_h_errno_thread_specific != yes ; then
16613                 LIBS="$LTHREAD_LIBS $LIBS"
16614                 LTHREAD_LIBS=""
16615         fi
16616
16617 fi  
16618
16619 if test $ol_link_threads = no ; then
16620         if test $ol_with_threads = yes ; then
16621                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16622         fi
16623
16624         if test $ol_with_threads = auto ; then
16625                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16626                 ol_with_threads=no
16627         fi
16628
16629         cat >> confdefs.h <<\EOF
16630 #define NO_THREADS 1
16631 EOF
16632
16633         LTHREAD_LIBS=""
16634 fi
16635
16636 if test $ol_link_threads != no ; then
16637         cat >> confdefs.h <<\EOF
16638 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16639 EOF
16640
16641 fi
16642
16643 for ac_func in \
16644         ctime_r                 \
16645         gethostbyname_r gethostbyaddr_r \
16646
16647 do
16648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16649 echo "configure:16650: checking for $ac_func" >&5
16650 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16651   echo $ac_n "(cached) $ac_c" 1>&6
16652 else
16653   cat > conftest.$ac_ext <<EOF
16654 #line 16655 "configure"
16655 #include "confdefs.h"
16656 /* System header to define __stub macros and hopefully few prototypes,
16657     which can conflict with char $ac_func(); below.  */
16658 #include <assert.h>
16659 /* Override any gcc2 internal prototype to avoid an error.  */
16660 /* We use char because int might match the return type of a gcc2
16661     builtin and then its argument prototype would still apply.  */
16662 char $ac_func();
16663 char (*f)();
16664
16665 int main() {
16666
16667 /* The GNU C library defines this for functions which it implements
16668     to always fail with ENOSYS.  Some functions are actually named
16669     something starting with __ and the normal name is an alias.  */
16670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16671 choke me
16672 #else
16673 f = $ac_func;
16674 #endif
16675
16676 ; return 0; }
16677 EOF
16678 if { (eval echo configure:16679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16679   rm -rf conftest*
16680   eval "ac_cv_func_$ac_func=yes"
16681 else
16682   echo "configure: failed program was:" >&5
16683   cat conftest.$ac_ext >&5
16684   rm -rf conftest*
16685   eval "ac_cv_func_$ac_func=no"
16686 fi
16687 rm -f conftest*
16688 fi
16689
16690 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16691   echo "$ac_t""yes" 1>&6
16692     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16693   cat >> confdefs.h <<EOF
16694 #define $ac_tr_func 1
16695 EOF
16696  
16697 else
16698   echo "$ac_t""no" 1>&6
16699 fi
16700 done
16701
16702
16703 if test "$ac_cv_func_ctime_r" = no ; then
16704         ol_cv_func_ctime_r_nargs=0
16705 else
16706         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16707 echo "configure:16708: checking number of arguments of ctime_r" >&5
16708 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16709   echo $ac_n "(cached) $ac_c" 1>&6
16710 else
16711   cat > conftest.$ac_ext <<EOF
16712 #line 16713 "configure"
16713 #include "confdefs.h"
16714 #include <time.h>
16715 int main() {
16716 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16717 ; return 0; }
16718 EOF
16719 if { (eval echo configure:16720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16720   rm -rf conftest*
16721   ol_cv_func_ctime_r_nargs3=yes
16722 else
16723   echo "configure: failed program was:" >&5
16724   cat conftest.$ac_ext >&5
16725   rm -rf conftest*
16726   ol_cv_func_ctime_r_nargs3=no
16727 fi
16728 rm -f conftest*
16729
16730         cat > conftest.$ac_ext <<EOF
16731 #line 16732 "configure"
16732 #include "confdefs.h"
16733 #include <time.h>
16734 int main() {
16735 time_t ti; char *buffer; ctime_r(&ti,buffer);
16736 ; return 0; }
16737 EOF
16738 if { (eval echo configure:16739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16739   rm -rf conftest*
16740   ol_cv_func_ctime_r_nargs2=yes
16741 else
16742   echo "configure: failed program was:" >&5
16743   cat conftest.$ac_ext >&5
16744   rm -rf conftest*
16745   ol_cv_func_ctime_r_nargs2=no
16746 fi
16747 rm -f conftest*
16748
16749         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16750                 $ol_cv_func_ctime_r_nargs2 = no ; then
16751
16752                 ol_cv_func_ctime_r_nargs=3
16753
16754         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16755                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16756
16757                 ol_cv_func_ctime_r_nargs=2
16758
16759         else
16760                 ol_cv_func_ctime_r_nargs=0
16761         fi
16762   
16763 fi
16764
16765 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16766
16767   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16768         cat >> confdefs.h <<EOF
16769 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16770 EOF
16771
16772   fi
16773
16774 fi
16775
16776 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16777         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16778 echo "configure:16779: checking number of arguments of gethostbyname_r" >&5
16779 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16780   echo $ac_n "(cached) $ac_c" 1>&6
16781 else
16782   cat > conftest.$ac_ext <<EOF
16783 #line 16784 "configure"
16784 #include "confdefs.h"
16785 #include <sys/types.h>
16786 #include <sys/socket.h>
16787 #include <netinet/in.h>
16788 #include <netdb.h>
16789 #define BUFSIZE (sizeof(struct hostent)+10)
16790 int main() {
16791 struct hostent hent; char buffer[BUFSIZE];
16792                 int bufsize=BUFSIZE;int h_errno;
16793                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16794                         buffer, bufsize, &h_errno);
16795 ; return 0; }
16796 EOF
16797 if { (eval echo configure:16798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16798   rm -rf conftest*
16799   ol_cv_func_gethostbyname_r_nargs5=yes
16800 else
16801   echo "configure: failed program was:" >&5
16802   cat conftest.$ac_ext >&5
16803   rm -rf conftest*
16804   ol_cv_func_gethostbyname_r_nargs5=no
16805 fi
16806 rm -f conftest*
16807
16808         cat > conftest.$ac_ext <<EOF
16809 #line 16810 "configure"
16810 #include "confdefs.h"
16811 #include <sys/types.h>
16812 #include <sys/socket.h>
16813 #include <netinet/in.h>
16814 #include <netdb.h>
16815 #define BUFSIZE (sizeof(struct hostent)+10)
16816 int main() {
16817 struct hostent hent;struct hostent *rhent;
16818                 char buffer[BUFSIZE];
16819                 int bufsize=BUFSIZE;int h_errno;
16820                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16821                         &rhent, &h_errno);
16822 ; return 0; }
16823 EOF
16824 if { (eval echo configure:16825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16825   rm -rf conftest*
16826   ol_cv_func_gethostbyname_r_nargs6=yes
16827 else
16828   echo "configure: failed program was:" >&5
16829   cat conftest.$ac_ext >&5
16830   rm -rf conftest*
16831   ol_cv_func_gethostbyname_r_nargs6=no
16832 fi
16833 rm -f conftest*
16834
16835         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16836                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16837
16838                 ol_cv_func_gethostbyname_r_nargs=5
16839
16840         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16841                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16842
16843                 ol_cv_func_gethostbyname_r_nargs=6
16844
16845         else
16846                 ol_cv_func_gethostbyname_r_nargs=0
16847         fi
16848   
16849 fi
16850
16851 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16852   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16853         cat >> confdefs.h <<EOF
16854 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16855 EOF
16856
16857   fi
16858
16859 else
16860         ol_cv_func_gethostbyname_r_nargs=0
16861 fi
16862  
16863 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16864         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16865 echo "configure:16866: checking number of arguments of gethostbyaddr_r" >&5
16866 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16867   echo $ac_n "(cached) $ac_c" 1>&6
16868 else
16869   cat > conftest.$ac_ext <<EOF
16870 #line 16871 "configure"
16871 #include "confdefs.h"
16872 #include <sys/types.h>
16873 #include <sys/socket.h>
16874 #include <netinet/in.h>
16875 #include <netdb.h>
16876 #define BUFSIZE (sizeof(struct hostent)+10)
16877 int main() {
16878 struct hostent hent; char buffer[BUFSIZE]; 
16879             struct in_addr add;
16880             size_t alen=sizeof(struct in_addr);
16881             int bufsize=BUFSIZE;int h_errno;
16882                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16883                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16884 ; return 0; }
16885 EOF
16886 if { (eval echo configure:16887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16887   rm -rf conftest*
16888   ol_cv_func_gethostbyaddr_r_nargs7=yes
16889 else
16890   echo "configure: failed program was:" >&5
16891   cat conftest.$ac_ext >&5
16892   rm -rf conftest*
16893   ol_cv_func_gethostbyaddr_r_nargs7=no
16894 fi
16895 rm -f conftest*
16896
16897         cat > conftest.$ac_ext <<EOF
16898 #line 16899 "configure"
16899 #include "confdefs.h"
16900 #include <sys/types.h>
16901 #include <sys/socket.h>
16902 #include <netinet/in.h>
16903 #include <netdb.h>
16904 #define BUFSIZE (sizeof(struct hostent)+10)
16905 int main() {
16906 struct hostent hent;
16907                 struct hostent *rhent; char buffer[BUFSIZE]; 
16908                 struct in_addr add;
16909                 size_t alen=sizeof(struct in_addr);
16910                 int bufsize=BUFSIZE;int h_errno;
16911                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16912                         alen, AF_INET, &hent, buffer, bufsize, 
16913                         &rhent, &h_errno);
16914 ; return 0; }
16915 EOF
16916 if { (eval echo configure:16917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16917   rm -rf conftest*
16918   ol_cv_func_gethostbyaddr_r_nargs8=yes
16919 else
16920   echo "configure: failed program was:" >&5
16921   cat conftest.$ac_ext >&5
16922   rm -rf conftest*
16923   ol_cv_func_gethostbyaddr_r_nargs8=no
16924 fi
16925 rm -f conftest*
16926
16927         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16928                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16929
16930                 ol_cv_func_gethostbyaddr_r_nargs=7
16931
16932         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16933                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16934
16935                 ol_cv_func_gethostbyaddr_r_nargs=8
16936
16937         else
16938                 ol_cv_func_gethostbyaddr_r_nargs=0
16939         fi
16940   
16941 fi
16942
16943 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16944   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16945     cat >> confdefs.h <<EOF
16946 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16947 EOF
16948
16949   fi
16950
16951 else
16952         ol_cv_func_gethostbyaddr_r_nargs=0
16953 fi
16954
16955 ol_link_ldbm=no 
16956
16957 if test $ol_with_ldbm_api = auto \
16958         -o $ol_with_ldbm_api = berkeley \
16959         -o $ol_with_ldbm_api = bcompat ; then
16960
16961         if test $ol_with_ldbm_api = bcompat; then \
16962                 for ac_hdr in db_185.h db.h
16963 do
16964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16966 echo "configure:16967: checking for $ac_hdr" >&5
16967 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16968   echo $ac_n "(cached) $ac_c" 1>&6
16969 else
16970   cat > conftest.$ac_ext <<EOF
16971 #line 16972 "configure"
16972 #include "confdefs.h"
16973 #include <$ac_hdr>
16974 EOF
16975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16976 { (eval echo configure:16977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16978 if test -z "$ac_err"; then
16979   rm -rf conftest*
16980   eval "ac_cv_header_$ac_safe=yes"
16981 else
16982   echo "$ac_err" >&5
16983   echo "configure: failed program was:" >&5
16984   cat conftest.$ac_ext >&5
16985   rm -rf conftest*
16986   eval "ac_cv_header_$ac_safe=no"
16987 fi
16988 rm -f conftest*
16989 fi
16990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16991   echo "$ac_t""yes" 1>&6
16992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16993   cat >> confdefs.h <<EOF
16994 #define $ac_tr_hdr 1
16995 EOF
16996  
16997 else
16998   echo "$ac_t""no" 1>&6
16999 fi
17000 done
17001
17002 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17003         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17004 echo "configure:17005: checking if Berkeley DB header compatibility" >&5
17005 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17006   echo $ac_n "(cached) $ac_c" 1>&6
17007 else
17008   
17009                 cat > conftest.$ac_ext <<EOF
17010 #line 17011 "configure"
17011 #include "confdefs.h"
17012
17013 #if HAVE_DB_185_H
17014 #       include <db_185.h>
17015 #else
17016 #       include <db.h>
17017 #endif
17018
17019  /* this check could be improved */
17020 #ifndef DB_VERSION_MAJOR
17021 #       define DB_VERSION_MAJOR 1
17022 #endif
17023
17024 #if DB_VERSION_MAJOR == 1 
17025         __db_version_1
17026 #endif
17027
17028 EOF
17029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17030   egrep "__db_version_1" >/dev/null 2>&1; then
17031   rm -rf conftest*
17032   ol_cv_header_db1=yes
17033 else
17034   rm -rf conftest*
17035   ol_cv_header_db1=no
17036 fi
17037 rm -f conftest*
17038
17039 fi
17040
17041 echo "$ac_t""$ol_cv_header_db1" 1>&6
17042
17043         if test $ol_cv_header_db1 = yes ; then
17044                 ol_cv_lib_db=no
17045 if test $ol_cv_lib_db = no ; then
17046         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17047 echo "configure:17048: checking for Berkeley DB link (default)" >&5
17048 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17049   echo $ac_n "(cached) $ac_c" 1>&6
17050 else
17051   
17052         ol_DB_LIB=
17053         ol_LIBS=$LIBS
17054         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17055
17056         cat > conftest.$ac_ext <<EOF
17057 #line 17058 "configure"
17058 #include "confdefs.h"
17059
17060 #ifdef HAVE_DB_185_H
17061 # include <db_185.h>
17062 #else
17063 # include <db.h>
17064 #endif
17065
17066 #ifndef DB_VERSION_MAJOR
17067 # define DB_VERSION_MAJOR 1
17068 #endif
17069
17070 #ifndef NULL
17071 #define NULL ((void*)0)
17072 #endif
17073
17074 int main() {
17075
17076 #if DB_VERSION_MAJOR > 1
17077         {
17078                 char *version;
17079                 int major, minor, patch;
17080
17081                 version = db_version( &major, &minor, &patch );
17082
17083                 if( major != DB_VERSION_MAJOR ||
17084                         minor < DB_VERSION_MINOR )
17085                 {
17086                         printf("Berkeley DB version mismatch\n"
17087                                 "\theader: %s\n\tlibrary: %s\n",
17088                                 DB_VERSION_STRING, version);
17089                         return 1;
17090                 }
17091         }
17092 #endif
17093
17094 #if DB_VERSION_MAJOR > 2
17095         db_env_create( NULL, 0 );
17096 #elif DB_VERSION_MAJOR > 1
17097         db_appexit( NULL );
17098 #else
17099         (void) dbopen( NULL, 0, 0, 0, NULL);
17100 #endif
17101
17102 ; return 0; }
17103 EOF
17104 if { (eval echo configure:17105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17105   rm -rf conftest*
17106   ol_cv_db_none=yes
17107 else
17108   echo "configure: failed program was:" >&5
17109   cat conftest.$ac_ext >&5
17110   rm -rf conftest*
17111   ol_cv_db_none=no
17112 fi
17113 rm -f conftest*
17114
17115         LIBS="$ol_LIBS"
17116
17117 fi
17118
17119 echo "$ac_t""$ol_cv_db_none" 1>&6
17120
17121         if test $ol_cv_db_none = yes ; then
17122                 ol_cv_lib_db=yes
17123         fi
17124 fi
17125
17126 if test $ol_cv_lib_db = no ; then
17127         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17128 echo "configure:17129: checking for Berkeley DB link (-ldb43)" >&5
17129 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17130   echo $ac_n "(cached) $ac_c" 1>&6
17131 else
17132   
17133         ol_DB_LIB=-ldb43
17134         ol_LIBS=$LIBS
17135         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17136
17137         cat > conftest.$ac_ext <<EOF
17138 #line 17139 "configure"
17139 #include "confdefs.h"
17140
17141 #ifdef HAVE_DB_185_H
17142 # include <db_185.h>
17143 #else
17144 # include <db.h>
17145 #endif
17146
17147 #ifndef DB_VERSION_MAJOR
17148 # define DB_VERSION_MAJOR 1
17149 #endif
17150
17151 #ifndef NULL
17152 #define NULL ((void*)0)
17153 #endif
17154
17155 int main() {
17156
17157 #if DB_VERSION_MAJOR > 1
17158         {
17159                 char *version;
17160                 int major, minor, patch;
17161
17162                 version = db_version( &major, &minor, &patch );
17163
17164                 if( major != DB_VERSION_MAJOR ||
17165                         minor < DB_VERSION_MINOR )
17166                 {
17167                         printf("Berkeley DB version mismatch\n"
17168                                 "\theader: %s\n\tlibrary: %s\n",
17169                                 DB_VERSION_STRING, version);
17170                         return 1;
17171                 }
17172         }
17173 #endif
17174
17175 #if DB_VERSION_MAJOR > 2
17176         db_env_create( NULL, 0 );
17177 #elif DB_VERSION_MAJOR > 1
17178         db_appexit( NULL );
17179 #else
17180         (void) dbopen( NULL, 0, 0, 0, NULL);
17181 #endif
17182
17183 ; return 0; }
17184 EOF
17185 if { (eval echo configure:17186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17186   rm -rf conftest*
17187   ol_cv_db_db43=yes
17188 else
17189   echo "configure: failed program was:" >&5
17190   cat conftest.$ac_ext >&5
17191   rm -rf conftest*
17192   ol_cv_db_db43=no
17193 fi
17194 rm -f conftest*
17195
17196         LIBS="$ol_LIBS"
17197
17198 fi
17199
17200 echo "$ac_t""$ol_cv_db_db43" 1>&6
17201
17202         if test $ol_cv_db_db43 = yes ; then
17203                 ol_cv_lib_db=-ldb43
17204         fi
17205 fi
17206
17207 if test $ol_cv_lib_db = no ; then
17208         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17209 echo "configure:17210: checking for Berkeley DB link (-ldb-43)" >&5
17210 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17211   echo $ac_n "(cached) $ac_c" 1>&6
17212 else
17213   
17214         ol_DB_LIB=-ldb-43
17215         ol_LIBS=$LIBS
17216         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17217
17218         cat > conftest.$ac_ext <<EOF
17219 #line 17220 "configure"
17220 #include "confdefs.h"
17221
17222 #ifdef HAVE_DB_185_H
17223 # include <db_185.h>
17224 #else
17225 # include <db.h>
17226 #endif
17227
17228 #ifndef DB_VERSION_MAJOR
17229 # define DB_VERSION_MAJOR 1
17230 #endif
17231
17232 #ifndef NULL
17233 #define NULL ((void*)0)
17234 #endif
17235
17236 int main() {
17237
17238 #if DB_VERSION_MAJOR > 1
17239         {
17240                 char *version;
17241                 int major, minor, patch;
17242
17243                 version = db_version( &major, &minor, &patch );
17244
17245                 if( major != DB_VERSION_MAJOR ||
17246                         minor < DB_VERSION_MINOR )
17247                 {
17248                         printf("Berkeley DB version mismatch\n"
17249                                 "\theader: %s\n\tlibrary: %s\n",
17250                                 DB_VERSION_STRING, version);
17251                         return 1;
17252                 }
17253         }
17254 #endif
17255
17256 #if DB_VERSION_MAJOR > 2
17257         db_env_create( NULL, 0 );
17258 #elif DB_VERSION_MAJOR > 1
17259         db_appexit( NULL );
17260 #else
17261         (void) dbopen( NULL, 0, 0, 0, NULL);
17262 #endif
17263
17264 ; return 0; }
17265 EOF
17266 if { (eval echo configure:17267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17267   rm -rf conftest*
17268   ol_cv_db_db_43=yes
17269 else
17270   echo "configure: failed program was:" >&5
17271   cat conftest.$ac_ext >&5
17272   rm -rf conftest*
17273   ol_cv_db_db_43=no
17274 fi
17275 rm -f conftest*
17276
17277         LIBS="$ol_LIBS"
17278
17279 fi
17280
17281 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17282
17283         if test $ol_cv_db_db_43 = yes ; then
17284                 ol_cv_lib_db=-ldb-43
17285         fi
17286 fi
17287
17288 if test $ol_cv_lib_db = no ; then
17289         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17290 echo "configure:17291: checking for Berkeley DB link (-ldb-4.3)" >&5
17291 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17292   echo $ac_n "(cached) $ac_c" 1>&6
17293 else
17294   
17295         ol_DB_LIB=-ldb-4.3
17296         ol_LIBS=$LIBS
17297         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17298
17299         cat > conftest.$ac_ext <<EOF
17300 #line 17301 "configure"
17301 #include "confdefs.h"
17302
17303 #ifdef HAVE_DB_185_H
17304 # include <db_185.h>
17305 #else
17306 # include <db.h>
17307 #endif
17308
17309 #ifndef DB_VERSION_MAJOR
17310 # define DB_VERSION_MAJOR 1
17311 #endif
17312
17313 #ifndef NULL
17314 #define NULL ((void*)0)
17315 #endif
17316
17317 int main() {
17318
17319 #if DB_VERSION_MAJOR > 1
17320         {
17321                 char *version;
17322                 int major, minor, patch;
17323
17324                 version = db_version( &major, &minor, &patch );
17325
17326                 if( major != DB_VERSION_MAJOR ||
17327                         minor < DB_VERSION_MINOR )
17328                 {
17329                         printf("Berkeley DB version mismatch\n"
17330                                 "\theader: %s\n\tlibrary: %s\n",
17331                                 DB_VERSION_STRING, version);
17332                         return 1;
17333                 }
17334         }
17335 #endif
17336
17337 #if DB_VERSION_MAJOR > 2
17338         db_env_create( NULL, 0 );
17339 #elif DB_VERSION_MAJOR > 1
17340         db_appexit( NULL );
17341 #else
17342         (void) dbopen( NULL, 0, 0, 0, NULL);
17343 #endif
17344
17345 ; return 0; }
17346 EOF
17347 if { (eval echo configure:17348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17348   rm -rf conftest*
17349   ol_cv_db_db_4_dot_3=yes
17350 else
17351   echo "configure: failed program was:" >&5
17352   cat conftest.$ac_ext >&5
17353   rm -rf conftest*
17354   ol_cv_db_db_4_dot_3=no
17355 fi
17356 rm -f conftest*
17357
17358         LIBS="$ol_LIBS"
17359
17360 fi
17361
17362 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17363
17364         if test $ol_cv_db_db_4_dot_3 = yes ; then
17365                 ol_cv_lib_db=-ldb-4.3
17366         fi
17367 fi
17368
17369 if test $ol_cv_lib_db = no ; then
17370         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17371 echo "configure:17372: checking for Berkeley DB link (-ldb-4-3)" >&5
17372 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17373   echo $ac_n "(cached) $ac_c" 1>&6
17374 else
17375   
17376         ol_DB_LIB=-ldb-4-3
17377         ol_LIBS=$LIBS
17378         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17379
17380         cat > conftest.$ac_ext <<EOF
17381 #line 17382 "configure"
17382 #include "confdefs.h"
17383
17384 #ifdef HAVE_DB_185_H
17385 # include <db_185.h>
17386 #else
17387 # include <db.h>
17388 #endif
17389
17390 #ifndef DB_VERSION_MAJOR
17391 # define DB_VERSION_MAJOR 1
17392 #endif
17393
17394 #ifndef NULL
17395 #define NULL ((void*)0)
17396 #endif
17397
17398 int main() {
17399
17400 #if DB_VERSION_MAJOR > 1
17401         {
17402                 char *version;
17403                 int major, minor, patch;
17404
17405                 version = db_version( &major, &minor, &patch );
17406
17407                 if( major != DB_VERSION_MAJOR ||
17408                         minor < DB_VERSION_MINOR )
17409                 {
17410                         printf("Berkeley DB version mismatch\n"
17411                                 "\theader: %s\n\tlibrary: %s\n",
17412                                 DB_VERSION_STRING, version);
17413                         return 1;
17414                 }
17415         }
17416 #endif
17417
17418 #if DB_VERSION_MAJOR > 2
17419         db_env_create( NULL, 0 );
17420 #elif DB_VERSION_MAJOR > 1
17421         db_appexit( NULL );
17422 #else
17423         (void) dbopen( NULL, 0, 0, 0, NULL);
17424 #endif
17425
17426 ; return 0; }
17427 EOF
17428 if { (eval echo configure:17429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17429   rm -rf conftest*
17430   ol_cv_db_db_4_3=yes
17431 else
17432   echo "configure: failed program was:" >&5
17433   cat conftest.$ac_ext >&5
17434   rm -rf conftest*
17435   ol_cv_db_db_4_3=no
17436 fi
17437 rm -f conftest*
17438
17439         LIBS="$ol_LIBS"
17440
17441 fi
17442
17443 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17444
17445         if test $ol_cv_db_db_4_3 = yes ; then
17446                 ol_cv_lib_db=-ldb-4-3
17447         fi
17448 fi
17449
17450 if test $ol_cv_lib_db = no ; then
17451         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17452 echo "configure:17453: checking for Berkeley DB link (-ldb42)" >&5
17453 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17454   echo $ac_n "(cached) $ac_c" 1>&6
17455 else
17456   
17457         ol_DB_LIB=-ldb42
17458         ol_LIBS=$LIBS
17459         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17460
17461         cat > conftest.$ac_ext <<EOF
17462 #line 17463 "configure"
17463 #include "confdefs.h"
17464
17465 #ifdef HAVE_DB_185_H
17466 # include <db_185.h>
17467 #else
17468 # include <db.h>
17469 #endif
17470
17471 #ifndef DB_VERSION_MAJOR
17472 # define DB_VERSION_MAJOR 1
17473 #endif
17474
17475 #ifndef NULL
17476 #define NULL ((void*)0)
17477 #endif
17478
17479 int main() {
17480
17481 #if DB_VERSION_MAJOR > 1
17482         {
17483                 char *version;
17484                 int major, minor, patch;
17485
17486                 version = db_version( &major, &minor, &patch );
17487
17488                 if( major != DB_VERSION_MAJOR ||
17489                         minor < DB_VERSION_MINOR )
17490                 {
17491                         printf("Berkeley DB version mismatch\n"
17492                                 "\theader: %s\n\tlibrary: %s\n",
17493                                 DB_VERSION_STRING, version);
17494                         return 1;
17495                 }
17496         }
17497 #endif
17498
17499 #if DB_VERSION_MAJOR > 2
17500         db_env_create( NULL, 0 );
17501 #elif DB_VERSION_MAJOR > 1
17502         db_appexit( NULL );
17503 #else
17504         (void) dbopen( NULL, 0, 0, 0, NULL);
17505 #endif
17506
17507 ; return 0; }
17508 EOF
17509 if { (eval echo configure:17510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17510   rm -rf conftest*
17511   ol_cv_db_db42=yes
17512 else
17513   echo "configure: failed program was:" >&5
17514   cat conftest.$ac_ext >&5
17515   rm -rf conftest*
17516   ol_cv_db_db42=no
17517 fi
17518 rm -f conftest*
17519
17520         LIBS="$ol_LIBS"
17521
17522 fi
17523
17524 echo "$ac_t""$ol_cv_db_db42" 1>&6
17525
17526         if test $ol_cv_db_db42 = yes ; then
17527                 ol_cv_lib_db=-ldb42
17528         fi
17529 fi
17530
17531 if test $ol_cv_lib_db = no ; then
17532         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17533 echo "configure:17534: checking for Berkeley DB link (-ldb-42)" >&5
17534 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17535   echo $ac_n "(cached) $ac_c" 1>&6
17536 else
17537   
17538         ol_DB_LIB=-ldb-42
17539         ol_LIBS=$LIBS
17540         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17541
17542         cat > conftest.$ac_ext <<EOF
17543 #line 17544 "configure"
17544 #include "confdefs.h"
17545
17546 #ifdef HAVE_DB_185_H
17547 # include <db_185.h>
17548 #else
17549 # include <db.h>
17550 #endif
17551
17552 #ifndef DB_VERSION_MAJOR
17553 # define DB_VERSION_MAJOR 1
17554 #endif
17555
17556 #ifndef NULL
17557 #define NULL ((void*)0)
17558 #endif
17559
17560 int main() {
17561
17562 #if DB_VERSION_MAJOR > 1
17563         {
17564                 char *version;
17565                 int major, minor, patch;
17566
17567                 version = db_version( &major, &minor, &patch );
17568
17569                 if( major != DB_VERSION_MAJOR ||
17570                         minor < DB_VERSION_MINOR )
17571                 {
17572                         printf("Berkeley DB version mismatch\n"
17573                                 "\theader: %s\n\tlibrary: %s\n",
17574                                 DB_VERSION_STRING, version);
17575                         return 1;
17576                 }
17577         }
17578 #endif
17579
17580 #if DB_VERSION_MAJOR > 2
17581         db_env_create( NULL, 0 );
17582 #elif DB_VERSION_MAJOR > 1
17583         db_appexit( NULL );
17584 #else
17585         (void) dbopen( NULL, 0, 0, 0, NULL);
17586 #endif
17587
17588 ; return 0; }
17589 EOF
17590 if { (eval echo configure:17591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17591   rm -rf conftest*
17592   ol_cv_db_db_42=yes
17593 else
17594   echo "configure: failed program was:" >&5
17595   cat conftest.$ac_ext >&5
17596   rm -rf conftest*
17597   ol_cv_db_db_42=no
17598 fi
17599 rm -f conftest*
17600
17601         LIBS="$ol_LIBS"
17602
17603 fi
17604
17605 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17606
17607         if test $ol_cv_db_db_42 = yes ; then
17608                 ol_cv_lib_db=-ldb-42
17609         fi
17610 fi
17611
17612 if test $ol_cv_lib_db = no ; then
17613         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17614 echo "configure:17615: checking for Berkeley DB link (-ldb-4.2)" >&5
17615 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17616   echo $ac_n "(cached) $ac_c" 1>&6
17617 else
17618   
17619         ol_DB_LIB=-ldb-4.2
17620         ol_LIBS=$LIBS
17621         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17622
17623         cat > conftest.$ac_ext <<EOF
17624 #line 17625 "configure"
17625 #include "confdefs.h"
17626
17627 #ifdef HAVE_DB_185_H
17628 # include <db_185.h>
17629 #else
17630 # include <db.h>
17631 #endif
17632
17633 #ifndef DB_VERSION_MAJOR
17634 # define DB_VERSION_MAJOR 1
17635 #endif
17636
17637 #ifndef NULL
17638 #define NULL ((void*)0)
17639 #endif
17640
17641 int main() {
17642
17643 #if DB_VERSION_MAJOR > 1
17644         {
17645                 char *version;
17646                 int major, minor, patch;
17647
17648                 version = db_version( &major, &minor, &patch );
17649
17650                 if( major != DB_VERSION_MAJOR ||
17651                         minor < DB_VERSION_MINOR )
17652                 {
17653                         printf("Berkeley DB version mismatch\n"
17654                                 "\theader: %s\n\tlibrary: %s\n",
17655                                 DB_VERSION_STRING, version);
17656                         return 1;
17657                 }
17658         }
17659 #endif
17660
17661 #if DB_VERSION_MAJOR > 2
17662         db_env_create( NULL, 0 );
17663 #elif DB_VERSION_MAJOR > 1
17664         db_appexit( NULL );
17665 #else
17666         (void) dbopen( NULL, 0, 0, 0, NULL);
17667 #endif
17668
17669 ; return 0; }
17670 EOF
17671 if { (eval echo configure:17672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17672   rm -rf conftest*
17673   ol_cv_db_db_4_dot_2=yes
17674 else
17675   echo "configure: failed program was:" >&5
17676   cat conftest.$ac_ext >&5
17677   rm -rf conftest*
17678   ol_cv_db_db_4_dot_2=no
17679 fi
17680 rm -f conftest*
17681
17682         LIBS="$ol_LIBS"
17683
17684 fi
17685
17686 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17687
17688         if test $ol_cv_db_db_4_dot_2 = yes ; then
17689                 ol_cv_lib_db=-ldb-4.2
17690         fi
17691 fi
17692
17693 if test $ol_cv_lib_db = no ; then
17694         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17695 echo "configure:17696: checking for Berkeley DB link (-ldb-4-2)" >&5
17696 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17697   echo $ac_n "(cached) $ac_c" 1>&6
17698 else
17699   
17700         ol_DB_LIB=-ldb-4-2
17701         ol_LIBS=$LIBS
17702         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17703
17704         cat > conftest.$ac_ext <<EOF
17705 #line 17706 "configure"
17706 #include "confdefs.h"
17707
17708 #ifdef HAVE_DB_185_H
17709 # include <db_185.h>
17710 #else
17711 # include <db.h>
17712 #endif
17713
17714 #ifndef DB_VERSION_MAJOR
17715 # define DB_VERSION_MAJOR 1
17716 #endif
17717
17718 #ifndef NULL
17719 #define NULL ((void*)0)
17720 #endif
17721
17722 int main() {
17723
17724 #if DB_VERSION_MAJOR > 1
17725         {
17726                 char *version;
17727                 int major, minor, patch;
17728
17729                 version = db_version( &major, &minor, &patch );
17730
17731                 if( major != DB_VERSION_MAJOR ||
17732                         minor < DB_VERSION_MINOR )
17733                 {
17734                         printf("Berkeley DB version mismatch\n"
17735                                 "\theader: %s\n\tlibrary: %s\n",
17736                                 DB_VERSION_STRING, version);
17737                         return 1;
17738                 }
17739         }
17740 #endif
17741
17742 #if DB_VERSION_MAJOR > 2
17743         db_env_create( NULL, 0 );
17744 #elif DB_VERSION_MAJOR > 1
17745         db_appexit( NULL );
17746 #else
17747         (void) dbopen( NULL, 0, 0, 0, NULL);
17748 #endif
17749
17750 ; return 0; }
17751 EOF
17752 if { (eval echo configure:17753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17753   rm -rf conftest*
17754   ol_cv_db_db_4_2=yes
17755 else
17756   echo "configure: failed program was:" >&5
17757   cat conftest.$ac_ext >&5
17758   rm -rf conftest*
17759   ol_cv_db_db_4_2=no
17760 fi
17761 rm -f conftest*
17762
17763         LIBS="$ol_LIBS"
17764
17765 fi
17766
17767 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17768
17769         if test $ol_cv_db_db_4_2 = yes ; then
17770                 ol_cv_lib_db=-ldb-4-2
17771         fi
17772 fi
17773
17774 if test $ol_cv_lib_db = no ; then
17775         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17776 echo "configure:17777: checking for Berkeley DB link (-ldb-4)" >&5
17777 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17778   echo $ac_n "(cached) $ac_c" 1>&6
17779 else
17780   
17781         ol_DB_LIB=-ldb-4
17782         ol_LIBS=$LIBS
17783         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17784
17785         cat > conftest.$ac_ext <<EOF
17786 #line 17787 "configure"
17787 #include "confdefs.h"
17788
17789 #ifdef HAVE_DB_185_H
17790 # include <db_185.h>
17791 #else
17792 # include <db.h>
17793 #endif
17794
17795 #ifndef DB_VERSION_MAJOR
17796 # define DB_VERSION_MAJOR 1
17797 #endif
17798
17799 #ifndef NULL
17800 #define NULL ((void*)0)
17801 #endif
17802
17803 int main() {
17804
17805 #if DB_VERSION_MAJOR > 1
17806         {
17807                 char *version;
17808                 int major, minor, patch;
17809
17810                 version = db_version( &major, &minor, &patch );
17811
17812                 if( major != DB_VERSION_MAJOR ||
17813                         minor < DB_VERSION_MINOR )
17814                 {
17815                         printf("Berkeley DB version mismatch\n"
17816                                 "\theader: %s\n\tlibrary: %s\n",
17817                                 DB_VERSION_STRING, version);
17818                         return 1;
17819                 }
17820         }
17821 #endif
17822
17823 #if DB_VERSION_MAJOR > 2
17824         db_env_create( NULL, 0 );
17825 #elif DB_VERSION_MAJOR > 1
17826         db_appexit( NULL );
17827 #else
17828         (void) dbopen( NULL, 0, 0, 0, NULL);
17829 #endif
17830
17831 ; return 0; }
17832 EOF
17833 if { (eval echo configure:17834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17834   rm -rf conftest*
17835   ol_cv_db_db_4=yes
17836 else
17837   echo "configure: failed program was:" >&5
17838   cat conftest.$ac_ext >&5
17839   rm -rf conftest*
17840   ol_cv_db_db_4=no
17841 fi
17842 rm -f conftest*
17843
17844         LIBS="$ol_LIBS"
17845
17846 fi
17847
17848 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17849
17850         if test $ol_cv_db_db_4 = yes ; then
17851                 ol_cv_lib_db=-ldb-4
17852         fi
17853 fi
17854
17855 if test $ol_cv_lib_db = no ; then
17856         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17857 echo "configure:17858: checking for Berkeley DB link (-ldb4)" >&5
17858 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17859   echo $ac_n "(cached) $ac_c" 1>&6
17860 else
17861   
17862         ol_DB_LIB=-ldb4
17863         ol_LIBS=$LIBS
17864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17865
17866         cat > conftest.$ac_ext <<EOF
17867 #line 17868 "configure"
17868 #include "confdefs.h"
17869
17870 #ifdef HAVE_DB_185_H
17871 # include <db_185.h>
17872 #else
17873 # include <db.h>
17874 #endif
17875
17876 #ifndef DB_VERSION_MAJOR
17877 # define DB_VERSION_MAJOR 1
17878 #endif
17879
17880 #ifndef NULL
17881 #define NULL ((void*)0)
17882 #endif
17883
17884 int main() {
17885
17886 #if DB_VERSION_MAJOR > 1
17887         {
17888                 char *version;
17889                 int major, minor, patch;
17890
17891                 version = db_version( &major, &minor, &patch );
17892
17893                 if( major != DB_VERSION_MAJOR ||
17894                         minor < DB_VERSION_MINOR )
17895                 {
17896                         printf("Berkeley DB version mismatch\n"
17897                                 "\theader: %s\n\tlibrary: %s\n",
17898                                 DB_VERSION_STRING, version);
17899                         return 1;
17900                 }
17901         }
17902 #endif
17903
17904 #if DB_VERSION_MAJOR > 2
17905         db_env_create( NULL, 0 );
17906 #elif DB_VERSION_MAJOR > 1
17907         db_appexit( NULL );
17908 #else
17909         (void) dbopen( NULL, 0, 0, 0, NULL);
17910 #endif
17911
17912 ; return 0; }
17913 EOF
17914 if { (eval echo configure:17915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17915   rm -rf conftest*
17916   ol_cv_db_db4=yes
17917 else
17918   echo "configure: failed program was:" >&5
17919   cat conftest.$ac_ext >&5
17920   rm -rf conftest*
17921   ol_cv_db_db4=no
17922 fi
17923 rm -f conftest*
17924
17925         LIBS="$ol_LIBS"
17926
17927 fi
17928
17929 echo "$ac_t""$ol_cv_db_db4" 1>&6
17930
17931         if test $ol_cv_db_db4 = yes ; then
17932                 ol_cv_lib_db=-ldb4
17933         fi
17934 fi
17935
17936 if test $ol_cv_lib_db = no ; then
17937         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17938 echo "configure:17939: checking for Berkeley DB link (-ldb)" >&5
17939 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17940   echo $ac_n "(cached) $ac_c" 1>&6
17941 else
17942   
17943         ol_DB_LIB=-ldb
17944         ol_LIBS=$LIBS
17945         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17946
17947         cat > conftest.$ac_ext <<EOF
17948 #line 17949 "configure"
17949 #include "confdefs.h"
17950
17951 #ifdef HAVE_DB_185_H
17952 # include <db_185.h>
17953 #else
17954 # include <db.h>
17955 #endif
17956
17957 #ifndef DB_VERSION_MAJOR
17958 # define DB_VERSION_MAJOR 1
17959 #endif
17960
17961 #ifndef NULL
17962 #define NULL ((void*)0)
17963 #endif
17964
17965 int main() {
17966
17967 #if DB_VERSION_MAJOR > 1
17968         {
17969                 char *version;
17970                 int major, minor, patch;
17971
17972                 version = db_version( &major, &minor, &patch );
17973
17974                 if( major != DB_VERSION_MAJOR ||
17975                         minor < DB_VERSION_MINOR )
17976                 {
17977                         printf("Berkeley DB version mismatch\n"
17978                                 "\theader: %s\n\tlibrary: %s\n",
17979                                 DB_VERSION_STRING, version);
17980                         return 1;
17981                 }
17982         }
17983 #endif
17984
17985 #if DB_VERSION_MAJOR > 2
17986         db_env_create( NULL, 0 );
17987 #elif DB_VERSION_MAJOR > 1
17988         db_appexit( NULL );
17989 #else
17990         (void) dbopen( NULL, 0, 0, 0, NULL);
17991 #endif
17992
17993 ; return 0; }
17994 EOF
17995 if { (eval echo configure:17996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17996   rm -rf conftest*
17997   ol_cv_db_db=yes
17998 else
17999   echo "configure: failed program was:" >&5
18000   cat conftest.$ac_ext >&5
18001   rm -rf conftest*
18002   ol_cv_db_db=no
18003 fi
18004 rm -f conftest*
18005
18006         LIBS="$ol_LIBS"
18007
18008 fi
18009
18010 echo "$ac_t""$ol_cv_db_db" 1>&6
18011
18012         if test $ol_cv_db_db = yes ; then
18013                 ol_cv_lib_db=-ldb
18014         fi
18015 fi
18016
18017 if test $ol_cv_lib_db = no ; then
18018         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18019 echo "configure:18020: checking for Berkeley DB link (-ldb41)" >&5
18020 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18021   echo $ac_n "(cached) $ac_c" 1>&6
18022 else
18023   
18024         ol_DB_LIB=-ldb41
18025         ol_LIBS=$LIBS
18026         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18027
18028         cat > conftest.$ac_ext <<EOF
18029 #line 18030 "configure"
18030 #include "confdefs.h"
18031
18032 #ifdef HAVE_DB_185_H
18033 # include <db_185.h>
18034 #else
18035 # include <db.h>
18036 #endif
18037
18038 #ifndef DB_VERSION_MAJOR
18039 # define DB_VERSION_MAJOR 1
18040 #endif
18041
18042 #ifndef NULL
18043 #define NULL ((void*)0)
18044 #endif
18045
18046 int main() {
18047
18048 #if DB_VERSION_MAJOR > 1
18049         {
18050                 char *version;
18051                 int major, minor, patch;
18052
18053                 version = db_version( &major, &minor, &patch );
18054
18055                 if( major != DB_VERSION_MAJOR ||
18056                         minor < DB_VERSION_MINOR )
18057                 {
18058                         printf("Berkeley DB version mismatch\n"
18059                                 "\theader: %s\n\tlibrary: %s\n",
18060                                 DB_VERSION_STRING, version);
18061                         return 1;
18062                 }
18063         }
18064 #endif
18065
18066 #if DB_VERSION_MAJOR > 2
18067         db_env_create( NULL, 0 );
18068 #elif DB_VERSION_MAJOR > 1
18069         db_appexit( NULL );
18070 #else
18071         (void) dbopen( NULL, 0, 0, 0, NULL);
18072 #endif
18073
18074 ; return 0; }
18075 EOF
18076 if { (eval echo configure:18077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18077   rm -rf conftest*
18078   ol_cv_db_db41=yes
18079 else
18080   echo "configure: failed program was:" >&5
18081   cat conftest.$ac_ext >&5
18082   rm -rf conftest*
18083   ol_cv_db_db41=no
18084 fi
18085 rm -f conftest*
18086
18087         LIBS="$ol_LIBS"
18088
18089 fi
18090
18091 echo "$ac_t""$ol_cv_db_db41" 1>&6
18092
18093         if test $ol_cv_db_db41 = yes ; then
18094                 ol_cv_lib_db=-ldb41
18095         fi
18096 fi
18097
18098 if test $ol_cv_lib_db = no ; then
18099         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18100 echo "configure:18101: checking for Berkeley DB link (-ldb-41)" >&5
18101 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18102   echo $ac_n "(cached) $ac_c" 1>&6
18103 else
18104   
18105         ol_DB_LIB=-ldb-41
18106         ol_LIBS=$LIBS
18107         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18108
18109         cat > conftest.$ac_ext <<EOF
18110 #line 18111 "configure"
18111 #include "confdefs.h"
18112
18113 #ifdef HAVE_DB_185_H
18114 # include <db_185.h>
18115 #else
18116 # include <db.h>
18117 #endif
18118
18119 #ifndef DB_VERSION_MAJOR
18120 # define DB_VERSION_MAJOR 1
18121 #endif
18122
18123 #ifndef NULL
18124 #define NULL ((void*)0)
18125 #endif
18126
18127 int main() {
18128
18129 #if DB_VERSION_MAJOR > 1
18130         {
18131                 char *version;
18132                 int major, minor, patch;
18133
18134                 version = db_version( &major, &minor, &patch );
18135
18136                 if( major != DB_VERSION_MAJOR ||
18137                         minor < DB_VERSION_MINOR )
18138                 {
18139                         printf("Berkeley DB version mismatch\n"
18140                                 "\theader: %s\n\tlibrary: %s\n",
18141                                 DB_VERSION_STRING, version);
18142                         return 1;
18143                 }
18144         }
18145 #endif
18146
18147 #if DB_VERSION_MAJOR > 2
18148         db_env_create( NULL, 0 );
18149 #elif DB_VERSION_MAJOR > 1
18150         db_appexit( NULL );
18151 #else
18152         (void) dbopen( NULL, 0, 0, 0, NULL);
18153 #endif
18154
18155 ; return 0; }
18156 EOF
18157 if { (eval echo configure:18158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18158   rm -rf conftest*
18159   ol_cv_db_db_41=yes
18160 else
18161   echo "configure: failed program was:" >&5
18162   cat conftest.$ac_ext >&5
18163   rm -rf conftest*
18164   ol_cv_db_db_41=no
18165 fi
18166 rm -f conftest*
18167
18168         LIBS="$ol_LIBS"
18169
18170 fi
18171
18172 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18173
18174         if test $ol_cv_db_db_41 = yes ; then
18175                 ol_cv_lib_db=-ldb-41
18176         fi
18177 fi
18178
18179 if test $ol_cv_lib_db = no ; then
18180         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18181 echo "configure:18182: checking for Berkeley DB link (-ldb-4.1)" >&5
18182 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18183   echo $ac_n "(cached) $ac_c" 1>&6
18184 else
18185   
18186         ol_DB_LIB=-ldb-4.1
18187         ol_LIBS=$LIBS
18188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18189
18190         cat > conftest.$ac_ext <<EOF
18191 #line 18192 "configure"
18192 #include "confdefs.h"
18193
18194 #ifdef HAVE_DB_185_H
18195 # include <db_185.h>
18196 #else
18197 # include <db.h>
18198 #endif
18199
18200 #ifndef DB_VERSION_MAJOR
18201 # define DB_VERSION_MAJOR 1
18202 #endif
18203
18204 #ifndef NULL
18205 #define NULL ((void*)0)
18206 #endif
18207
18208 int main() {
18209
18210 #if DB_VERSION_MAJOR > 1
18211         {
18212                 char *version;
18213                 int major, minor, patch;
18214
18215                 version = db_version( &major, &minor, &patch );
18216
18217                 if( major != DB_VERSION_MAJOR ||
18218                         minor < DB_VERSION_MINOR )
18219                 {
18220                         printf("Berkeley DB version mismatch\n"
18221                                 "\theader: %s\n\tlibrary: %s\n",
18222                                 DB_VERSION_STRING, version);
18223                         return 1;
18224                 }
18225         }
18226 #endif
18227
18228 #if DB_VERSION_MAJOR > 2
18229         db_env_create( NULL, 0 );
18230 #elif DB_VERSION_MAJOR > 1
18231         db_appexit( NULL );
18232 #else
18233         (void) dbopen( NULL, 0, 0, 0, NULL);
18234 #endif
18235
18236 ; return 0; }
18237 EOF
18238 if { (eval echo configure:18239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18239   rm -rf conftest*
18240   ol_cv_db_db_4_dot_1=yes
18241 else
18242   echo "configure: failed program was:" >&5
18243   cat conftest.$ac_ext >&5
18244   rm -rf conftest*
18245   ol_cv_db_db_4_dot_1=no
18246 fi
18247 rm -f conftest*
18248
18249         LIBS="$ol_LIBS"
18250
18251 fi
18252
18253 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18254
18255         if test $ol_cv_db_db_4_dot_1 = yes ; then
18256                 ol_cv_lib_db=-ldb-4.1
18257         fi
18258 fi
18259
18260 if test $ol_cv_lib_db = no ; then
18261         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18262 echo "configure:18263: checking for Berkeley DB link (-ldb-4-1)" >&5
18263 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18264   echo $ac_n "(cached) $ac_c" 1>&6
18265 else
18266   
18267         ol_DB_LIB=-ldb-4-1
18268         ol_LIBS=$LIBS
18269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18270
18271         cat > conftest.$ac_ext <<EOF
18272 #line 18273 "configure"
18273 #include "confdefs.h"
18274
18275 #ifdef HAVE_DB_185_H
18276 # include <db_185.h>
18277 #else
18278 # include <db.h>
18279 #endif
18280
18281 #ifndef DB_VERSION_MAJOR
18282 # define DB_VERSION_MAJOR 1
18283 #endif
18284
18285 #ifndef NULL
18286 #define NULL ((void*)0)
18287 #endif
18288
18289 int main() {
18290
18291 #if DB_VERSION_MAJOR > 1
18292         {
18293                 char *version;
18294                 int major, minor, patch;
18295
18296                 version = db_version( &major, &minor, &patch );
18297
18298                 if( major != DB_VERSION_MAJOR ||
18299                         minor < DB_VERSION_MINOR )
18300                 {
18301                         printf("Berkeley DB version mismatch\n"
18302                                 "\theader: %s\n\tlibrary: %s\n",
18303                                 DB_VERSION_STRING, version);
18304                         return 1;
18305                 }
18306         }
18307 #endif
18308
18309 #if DB_VERSION_MAJOR > 2
18310         db_env_create( NULL, 0 );
18311 #elif DB_VERSION_MAJOR > 1
18312         db_appexit( NULL );
18313 #else
18314         (void) dbopen( NULL, 0, 0, 0, NULL);
18315 #endif
18316
18317 ; return 0; }
18318 EOF
18319 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18320   rm -rf conftest*
18321   ol_cv_db_db_4_1=yes
18322 else
18323   echo "configure: failed program was:" >&5
18324   cat conftest.$ac_ext >&5
18325   rm -rf conftest*
18326   ol_cv_db_db_4_1=no
18327 fi
18328 rm -f conftest*
18329
18330         LIBS="$ol_LIBS"
18331
18332 fi
18333
18334 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18335
18336         if test $ol_cv_db_db_4_1 = yes ; then
18337                 ol_cv_lib_db=-ldb-4-1
18338         fi
18339 fi
18340
18341 if test $ol_cv_lib_db = no ; then
18342         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18343 echo "configure:18344: checking for Berkeley DB link (-ldb3)" >&5
18344 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18345   echo $ac_n "(cached) $ac_c" 1>&6
18346 else
18347   
18348         ol_DB_LIB=-ldb3
18349         ol_LIBS=$LIBS
18350         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18351
18352         cat > conftest.$ac_ext <<EOF
18353 #line 18354 "configure"
18354 #include "confdefs.h"
18355
18356 #ifdef HAVE_DB_185_H
18357 # include <db_185.h>
18358 #else
18359 # include <db.h>
18360 #endif
18361
18362 #ifndef DB_VERSION_MAJOR
18363 # define DB_VERSION_MAJOR 1
18364 #endif
18365
18366 #ifndef NULL
18367 #define NULL ((void*)0)
18368 #endif
18369
18370 int main() {
18371
18372 #if DB_VERSION_MAJOR > 1
18373         {
18374                 char *version;
18375                 int major, minor, patch;
18376
18377                 version = db_version( &major, &minor, &patch );
18378
18379                 if( major != DB_VERSION_MAJOR ||
18380                         minor < DB_VERSION_MINOR )
18381                 {
18382                         printf("Berkeley DB version mismatch\n"
18383                                 "\theader: %s\n\tlibrary: %s\n",
18384                                 DB_VERSION_STRING, version);
18385                         return 1;
18386                 }
18387         }
18388 #endif
18389
18390 #if DB_VERSION_MAJOR > 2
18391         db_env_create( NULL, 0 );
18392 #elif DB_VERSION_MAJOR > 1
18393         db_appexit( NULL );
18394 #else
18395         (void) dbopen( NULL, 0, 0, 0, NULL);
18396 #endif
18397
18398 ; return 0; }
18399 EOF
18400 if { (eval echo configure:18401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18401   rm -rf conftest*
18402   ol_cv_db_db3=yes
18403 else
18404   echo "configure: failed program was:" >&5
18405   cat conftest.$ac_ext >&5
18406   rm -rf conftest*
18407   ol_cv_db_db3=no
18408 fi
18409 rm -f conftest*
18410
18411         LIBS="$ol_LIBS"
18412
18413 fi
18414
18415 echo "$ac_t""$ol_cv_db_db3" 1>&6
18416
18417         if test $ol_cv_db_db3 = yes ; then
18418                 ol_cv_lib_db=-ldb3
18419         fi
18420 fi
18421
18422 if test $ol_cv_lib_db = no ; then
18423         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18424 echo "configure:18425: checking for Berkeley DB link (-ldb-3)" >&5
18425 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18426   echo $ac_n "(cached) $ac_c" 1>&6
18427 else
18428   
18429         ol_DB_LIB=-ldb-3
18430         ol_LIBS=$LIBS
18431         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18432
18433         cat > conftest.$ac_ext <<EOF
18434 #line 18435 "configure"
18435 #include "confdefs.h"
18436
18437 #ifdef HAVE_DB_185_H
18438 # include <db_185.h>
18439 #else
18440 # include <db.h>
18441 #endif
18442
18443 #ifndef DB_VERSION_MAJOR
18444 # define DB_VERSION_MAJOR 1
18445 #endif
18446
18447 #ifndef NULL
18448 #define NULL ((void*)0)
18449 #endif
18450
18451 int main() {
18452
18453 #if DB_VERSION_MAJOR > 1
18454         {
18455                 char *version;
18456                 int major, minor, patch;
18457
18458                 version = db_version( &major, &minor, &patch );
18459
18460                 if( major != DB_VERSION_MAJOR ||
18461                         minor < DB_VERSION_MINOR )
18462                 {
18463                         printf("Berkeley DB version mismatch\n"
18464                                 "\theader: %s\n\tlibrary: %s\n",
18465                                 DB_VERSION_STRING, version);
18466                         return 1;
18467                 }
18468         }
18469 #endif
18470
18471 #if DB_VERSION_MAJOR > 2
18472         db_env_create( NULL, 0 );
18473 #elif DB_VERSION_MAJOR > 1
18474         db_appexit( NULL );
18475 #else
18476         (void) dbopen( NULL, 0, 0, 0, NULL);
18477 #endif
18478
18479 ; return 0; }
18480 EOF
18481 if { (eval echo configure:18482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18482   rm -rf conftest*
18483   ol_cv_db_db_3=yes
18484 else
18485   echo "configure: failed program was:" >&5
18486   cat conftest.$ac_ext >&5
18487   rm -rf conftest*
18488   ol_cv_db_db_3=no
18489 fi
18490 rm -f conftest*
18491
18492         LIBS="$ol_LIBS"
18493
18494 fi
18495
18496 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18497
18498         if test $ol_cv_db_db_3 = yes ; then
18499                 ol_cv_lib_db=-ldb-3
18500         fi
18501 fi
18502
18503 if test $ol_cv_lib_db = no ; then
18504         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18505 echo "configure:18506: checking for Berkeley DB link (-ldb2)" >&5
18506 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18507   echo $ac_n "(cached) $ac_c" 1>&6
18508 else
18509   
18510         ol_DB_LIB=-ldb2
18511         ol_LIBS=$LIBS
18512         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18513
18514         cat > conftest.$ac_ext <<EOF
18515 #line 18516 "configure"
18516 #include "confdefs.h"
18517
18518 #ifdef HAVE_DB_185_H
18519 # include <db_185.h>
18520 #else
18521 # include <db.h>
18522 #endif
18523
18524 #ifndef DB_VERSION_MAJOR
18525 # define DB_VERSION_MAJOR 1
18526 #endif
18527
18528 #ifndef NULL
18529 #define NULL ((void*)0)
18530 #endif
18531
18532 int main() {
18533
18534 #if DB_VERSION_MAJOR > 1
18535         {
18536                 char *version;
18537                 int major, minor, patch;
18538
18539                 version = db_version( &major, &minor, &patch );
18540
18541                 if( major != DB_VERSION_MAJOR ||
18542                         minor < DB_VERSION_MINOR )
18543                 {
18544                         printf("Berkeley DB version mismatch\n"
18545                                 "\theader: %s\n\tlibrary: %s\n",
18546                                 DB_VERSION_STRING, version);
18547                         return 1;
18548                 }
18549         }
18550 #endif
18551
18552 #if DB_VERSION_MAJOR > 2
18553         db_env_create( NULL, 0 );
18554 #elif DB_VERSION_MAJOR > 1
18555         db_appexit( NULL );
18556 #else
18557         (void) dbopen( NULL, 0, 0, 0, NULL);
18558 #endif
18559
18560 ; return 0; }
18561 EOF
18562 if { (eval echo configure:18563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18563   rm -rf conftest*
18564   ol_cv_db_db2=yes
18565 else
18566   echo "configure: failed program was:" >&5
18567   cat conftest.$ac_ext >&5
18568   rm -rf conftest*
18569   ol_cv_db_db2=no
18570 fi
18571 rm -f conftest*
18572
18573         LIBS="$ol_LIBS"
18574
18575 fi
18576
18577 echo "$ac_t""$ol_cv_db_db2" 1>&6
18578
18579         if test $ol_cv_db_db2 = yes ; then
18580                 ol_cv_lib_db=-ldb2
18581         fi
18582 fi
18583
18584 if test $ol_cv_lib_db = no ; then
18585         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18586 echo "configure:18587: checking for Berkeley DB link (-ldb-2)" >&5
18587 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18588   echo $ac_n "(cached) $ac_c" 1>&6
18589 else
18590   
18591         ol_DB_LIB=-ldb-2
18592         ol_LIBS=$LIBS
18593         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18594
18595         cat > conftest.$ac_ext <<EOF
18596 #line 18597 "configure"
18597 #include "confdefs.h"
18598
18599 #ifdef HAVE_DB_185_H
18600 # include <db_185.h>
18601 #else
18602 # include <db.h>
18603 #endif
18604
18605 #ifndef DB_VERSION_MAJOR
18606 # define DB_VERSION_MAJOR 1
18607 #endif
18608
18609 #ifndef NULL
18610 #define NULL ((void*)0)
18611 #endif
18612
18613 int main() {
18614
18615 #if DB_VERSION_MAJOR > 1
18616         {
18617                 char *version;
18618                 int major, minor, patch;
18619
18620                 version = db_version( &major, &minor, &patch );
18621
18622                 if( major != DB_VERSION_MAJOR ||
18623                         minor < DB_VERSION_MINOR )
18624                 {
18625                         printf("Berkeley DB version mismatch\n"
18626                                 "\theader: %s\n\tlibrary: %s\n",
18627                                 DB_VERSION_STRING, version);
18628                         return 1;
18629                 }
18630         }
18631 #endif
18632
18633 #if DB_VERSION_MAJOR > 2
18634         db_env_create( NULL, 0 );
18635 #elif DB_VERSION_MAJOR > 1
18636         db_appexit( NULL );
18637 #else
18638         (void) dbopen( NULL, 0, 0, 0, NULL);
18639 #endif
18640
18641 ; return 0; }
18642 EOF
18643 if { (eval echo configure:18644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18644   rm -rf conftest*
18645   ol_cv_db_db_2=yes
18646 else
18647   echo "configure: failed program was:" >&5
18648   cat conftest.$ac_ext >&5
18649   rm -rf conftest*
18650   ol_cv_db_db_2=no
18651 fi
18652 rm -f conftest*
18653
18654         LIBS="$ol_LIBS"
18655
18656 fi
18657
18658 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18659
18660         if test $ol_cv_db_db_2 = yes ; then
18661                 ol_cv_lib_db=-ldb-2
18662         fi
18663 fi
18664
18665 if test $ol_cv_lib_db = no ; then
18666         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18667 echo "configure:18668: checking for Berkeley DB link (-ldb1)" >&5
18668 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18669   echo $ac_n "(cached) $ac_c" 1>&6
18670 else
18671   
18672         ol_DB_LIB=-ldb1
18673         ol_LIBS=$LIBS
18674         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18675
18676         cat > conftest.$ac_ext <<EOF
18677 #line 18678 "configure"
18678 #include "confdefs.h"
18679
18680 #ifdef HAVE_DB_185_H
18681 # include <db_185.h>
18682 #else
18683 # include <db.h>
18684 #endif
18685
18686 #ifndef DB_VERSION_MAJOR
18687 # define DB_VERSION_MAJOR 1
18688 #endif
18689
18690 #ifndef NULL
18691 #define NULL ((void*)0)
18692 #endif
18693
18694 int main() {
18695
18696 #if DB_VERSION_MAJOR > 1
18697         {
18698                 char *version;
18699                 int major, minor, patch;
18700
18701                 version = db_version( &major, &minor, &patch );
18702
18703                 if( major != DB_VERSION_MAJOR ||
18704                         minor < DB_VERSION_MINOR )
18705                 {
18706                         printf("Berkeley DB version mismatch\n"
18707                                 "\theader: %s\n\tlibrary: %s\n",
18708                                 DB_VERSION_STRING, version);
18709                         return 1;
18710                 }
18711         }
18712 #endif
18713
18714 #if DB_VERSION_MAJOR > 2
18715         db_env_create( NULL, 0 );
18716 #elif DB_VERSION_MAJOR > 1
18717         db_appexit( NULL );
18718 #else
18719         (void) dbopen( NULL, 0, 0, 0, NULL);
18720 #endif
18721
18722 ; return 0; }
18723 EOF
18724 if { (eval echo configure:18725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18725   rm -rf conftest*
18726   ol_cv_db_db1=yes
18727 else
18728   echo "configure: failed program was:" >&5
18729   cat conftest.$ac_ext >&5
18730   rm -rf conftest*
18731   ol_cv_db_db1=no
18732 fi
18733 rm -f conftest*
18734
18735         LIBS="$ol_LIBS"
18736
18737 fi
18738
18739 echo "$ac_t""$ol_cv_db_db1" 1>&6
18740
18741         if test $ol_cv_db_db1 = yes ; then
18742                 ol_cv_lib_db=-ldb1
18743         fi
18744 fi
18745
18746 if test $ol_cv_lib_db = no ; then
18747         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18748 echo "configure:18749: checking for Berkeley DB link (-ldb-1)" >&5
18749 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18750   echo $ac_n "(cached) $ac_c" 1>&6
18751 else
18752   
18753         ol_DB_LIB=-ldb-1
18754         ol_LIBS=$LIBS
18755         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18756
18757         cat > conftest.$ac_ext <<EOF
18758 #line 18759 "configure"
18759 #include "confdefs.h"
18760
18761 #ifdef HAVE_DB_185_H
18762 # include <db_185.h>
18763 #else
18764 # include <db.h>
18765 #endif
18766
18767 #ifndef DB_VERSION_MAJOR
18768 # define DB_VERSION_MAJOR 1
18769 #endif
18770
18771 #ifndef NULL
18772 #define NULL ((void*)0)
18773 #endif
18774
18775 int main() {
18776
18777 #if DB_VERSION_MAJOR > 1
18778         {
18779                 char *version;
18780                 int major, minor, patch;
18781
18782                 version = db_version( &major, &minor, &patch );
18783
18784                 if( major != DB_VERSION_MAJOR ||
18785                         minor < DB_VERSION_MINOR )
18786                 {
18787                         printf("Berkeley DB version mismatch\n"
18788                                 "\theader: %s\n\tlibrary: %s\n",
18789                                 DB_VERSION_STRING, version);
18790                         return 1;
18791                 }
18792         }
18793 #endif
18794
18795 #if DB_VERSION_MAJOR > 2
18796         db_env_create( NULL, 0 );
18797 #elif DB_VERSION_MAJOR > 1
18798         db_appexit( NULL );
18799 #else
18800         (void) dbopen( NULL, 0, 0, 0, NULL);
18801 #endif
18802
18803 ; return 0; }
18804 EOF
18805 if { (eval echo configure:18806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18806   rm -rf conftest*
18807   ol_cv_db_db_1=yes
18808 else
18809   echo "configure: failed program was:" >&5
18810   cat conftest.$ac_ext >&5
18811   rm -rf conftest*
18812   ol_cv_db_db_1=no
18813 fi
18814 rm -f conftest*
18815
18816         LIBS="$ol_LIBS"
18817
18818 fi
18819
18820 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18821
18822         if test $ol_cv_db_db_1 = yes ; then
18823                 ol_cv_lib_db=-ldb-1
18824         fi
18825 fi
18826
18827
18828                 if test "$ol_cv_lib_db" != no ; then
18829                         ol_cv_berkeley_db=yes
18830                 fi
18831         fi
18832 fi
18833
18834         else
18835                 ol_cv_berkeley_db=no
18836 for ac_hdr in db.h
18837 do
18838 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18839 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18840 echo "configure:18841: checking for $ac_hdr" >&5
18841 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18842   echo $ac_n "(cached) $ac_c" 1>&6
18843 else
18844   cat > conftest.$ac_ext <<EOF
18845 #line 18846 "configure"
18846 #include "confdefs.h"
18847 #include <$ac_hdr>
18848 EOF
18849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18850 { (eval echo configure:18851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18852 if test -z "$ac_err"; then
18853   rm -rf conftest*
18854   eval "ac_cv_header_$ac_safe=yes"
18855 else
18856   echo "$ac_err" >&5
18857   echo "configure: failed program was:" >&5
18858   cat conftest.$ac_ext >&5
18859   rm -rf conftest*
18860   eval "ac_cv_header_$ac_safe=no"
18861 fi
18862 rm -f conftest*
18863 fi
18864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18865   echo "$ac_t""yes" 1>&6
18866     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18867   cat >> confdefs.h <<EOF
18868 #define $ac_tr_hdr 1
18869 EOF
18870  
18871 else
18872   echo "$ac_t""no" 1>&6
18873 fi
18874 done
18875
18876 if test $ac_cv_header_db_h = yes; then
18877         ol_cv_lib_db=no
18878 if test $ol_cv_lib_db = no ; then
18879         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18880 echo "configure:18881: checking for Berkeley DB link (default)" >&5
18881 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18882   echo $ac_n "(cached) $ac_c" 1>&6
18883 else
18884   
18885         ol_DB_LIB=
18886         ol_LIBS=$LIBS
18887         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18888
18889         cat > conftest.$ac_ext <<EOF
18890 #line 18891 "configure"
18891 #include "confdefs.h"
18892
18893 #ifdef HAVE_DB_185_H
18894 # include <db_185.h>
18895 #else
18896 # include <db.h>
18897 #endif
18898
18899 #ifndef DB_VERSION_MAJOR
18900 # define DB_VERSION_MAJOR 1
18901 #endif
18902
18903 #ifndef NULL
18904 #define NULL ((void*)0)
18905 #endif
18906
18907 int main() {
18908
18909 #if DB_VERSION_MAJOR > 1
18910         {
18911                 char *version;
18912                 int major, minor, patch;
18913
18914                 version = db_version( &major, &minor, &patch );
18915
18916                 if( major != DB_VERSION_MAJOR ||
18917                         minor < DB_VERSION_MINOR )
18918                 {
18919                         printf("Berkeley DB version mismatch\n"
18920                                 "\theader: %s\n\tlibrary: %s\n",
18921                                 DB_VERSION_STRING, version);
18922                         return 1;
18923                 }
18924         }
18925 #endif
18926
18927 #if DB_VERSION_MAJOR > 2
18928         db_env_create( NULL, 0 );
18929 #elif DB_VERSION_MAJOR > 1
18930         db_appexit( NULL );
18931 #else
18932         (void) dbopen( NULL, 0, 0, 0, NULL);
18933 #endif
18934
18935 ; return 0; }
18936 EOF
18937 if { (eval echo configure:18938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18938   rm -rf conftest*
18939   ol_cv_db_none=yes
18940 else
18941   echo "configure: failed program was:" >&5
18942   cat conftest.$ac_ext >&5
18943   rm -rf conftest*
18944   ol_cv_db_none=no
18945 fi
18946 rm -f conftest*
18947
18948         LIBS="$ol_LIBS"
18949
18950 fi
18951
18952 echo "$ac_t""$ol_cv_db_none" 1>&6
18953
18954         if test $ol_cv_db_none = yes ; then
18955                 ol_cv_lib_db=yes
18956         fi
18957 fi
18958
18959 if test $ol_cv_lib_db = no ; then
18960         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18961 echo "configure:18962: checking for Berkeley DB link (-ldb43)" >&5
18962 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18963   echo $ac_n "(cached) $ac_c" 1>&6
18964 else
18965   
18966         ol_DB_LIB=-ldb43
18967         ol_LIBS=$LIBS
18968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18969
18970         cat > conftest.$ac_ext <<EOF
18971 #line 18972 "configure"
18972 #include "confdefs.h"
18973
18974 #ifdef HAVE_DB_185_H
18975 # include <db_185.h>
18976 #else
18977 # include <db.h>
18978 #endif
18979
18980 #ifndef DB_VERSION_MAJOR
18981 # define DB_VERSION_MAJOR 1
18982 #endif
18983
18984 #ifndef NULL
18985 #define NULL ((void*)0)
18986 #endif
18987
18988 int main() {
18989
18990 #if DB_VERSION_MAJOR > 1
18991         {
18992                 char *version;
18993                 int major, minor, patch;
18994
18995                 version = db_version( &major, &minor, &patch );
18996
18997                 if( major != DB_VERSION_MAJOR ||
18998                         minor < DB_VERSION_MINOR )
18999                 {
19000                         printf("Berkeley DB version mismatch\n"
19001                                 "\theader: %s\n\tlibrary: %s\n",
19002                                 DB_VERSION_STRING, version);
19003                         return 1;
19004                 }
19005         }
19006 #endif
19007
19008 #if DB_VERSION_MAJOR > 2
19009         db_env_create( NULL, 0 );
19010 #elif DB_VERSION_MAJOR > 1
19011         db_appexit( NULL );
19012 #else
19013         (void) dbopen( NULL, 0, 0, 0, NULL);
19014 #endif
19015
19016 ; return 0; }
19017 EOF
19018 if { (eval echo configure:19019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19019   rm -rf conftest*
19020   ol_cv_db_db43=yes
19021 else
19022   echo "configure: failed program was:" >&5
19023   cat conftest.$ac_ext >&5
19024   rm -rf conftest*
19025   ol_cv_db_db43=no
19026 fi
19027 rm -f conftest*
19028
19029         LIBS="$ol_LIBS"
19030
19031 fi
19032
19033 echo "$ac_t""$ol_cv_db_db43" 1>&6
19034
19035         if test $ol_cv_db_db43 = yes ; then
19036                 ol_cv_lib_db=-ldb43
19037         fi
19038 fi
19039
19040 if test $ol_cv_lib_db = no ; then
19041         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19042 echo "configure:19043: checking for Berkeley DB link (-ldb-43)" >&5
19043 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19044   echo $ac_n "(cached) $ac_c" 1>&6
19045 else
19046   
19047         ol_DB_LIB=-ldb-43
19048         ol_LIBS=$LIBS
19049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19050
19051         cat > conftest.$ac_ext <<EOF
19052 #line 19053 "configure"
19053 #include "confdefs.h"
19054
19055 #ifdef HAVE_DB_185_H
19056 # include <db_185.h>
19057 #else
19058 # include <db.h>
19059 #endif
19060
19061 #ifndef DB_VERSION_MAJOR
19062 # define DB_VERSION_MAJOR 1
19063 #endif
19064
19065 #ifndef NULL
19066 #define NULL ((void*)0)
19067 #endif
19068
19069 int main() {
19070
19071 #if DB_VERSION_MAJOR > 1
19072         {
19073                 char *version;
19074                 int major, minor, patch;
19075
19076                 version = db_version( &major, &minor, &patch );
19077
19078                 if( major != DB_VERSION_MAJOR ||
19079                         minor < DB_VERSION_MINOR )
19080                 {
19081                         printf("Berkeley DB version mismatch\n"
19082                                 "\theader: %s\n\tlibrary: %s\n",
19083                                 DB_VERSION_STRING, version);
19084                         return 1;
19085                 }
19086         }
19087 #endif
19088
19089 #if DB_VERSION_MAJOR > 2
19090         db_env_create( NULL, 0 );
19091 #elif DB_VERSION_MAJOR > 1
19092         db_appexit( NULL );
19093 #else
19094         (void) dbopen( NULL, 0, 0, 0, NULL);
19095 #endif
19096
19097 ; return 0; }
19098 EOF
19099 if { (eval echo configure:19100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19100   rm -rf conftest*
19101   ol_cv_db_db_43=yes
19102 else
19103   echo "configure: failed program was:" >&5
19104   cat conftest.$ac_ext >&5
19105   rm -rf conftest*
19106   ol_cv_db_db_43=no
19107 fi
19108 rm -f conftest*
19109
19110         LIBS="$ol_LIBS"
19111
19112 fi
19113
19114 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19115
19116         if test $ol_cv_db_db_43 = yes ; then
19117                 ol_cv_lib_db=-ldb-43
19118         fi
19119 fi
19120
19121 if test $ol_cv_lib_db = no ; then
19122         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19123 echo "configure:19124: checking for Berkeley DB link (-ldb-4.3)" >&5
19124 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19125   echo $ac_n "(cached) $ac_c" 1>&6
19126 else
19127   
19128         ol_DB_LIB=-ldb-4.3
19129         ol_LIBS=$LIBS
19130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19131
19132         cat > conftest.$ac_ext <<EOF
19133 #line 19134 "configure"
19134 #include "confdefs.h"
19135
19136 #ifdef HAVE_DB_185_H
19137 # include <db_185.h>
19138 #else
19139 # include <db.h>
19140 #endif
19141
19142 #ifndef DB_VERSION_MAJOR
19143 # define DB_VERSION_MAJOR 1
19144 #endif
19145
19146 #ifndef NULL
19147 #define NULL ((void*)0)
19148 #endif
19149
19150 int main() {
19151
19152 #if DB_VERSION_MAJOR > 1
19153         {
19154                 char *version;
19155                 int major, minor, patch;
19156
19157                 version = db_version( &major, &minor, &patch );
19158
19159                 if( major != DB_VERSION_MAJOR ||
19160                         minor < DB_VERSION_MINOR )
19161                 {
19162                         printf("Berkeley DB version mismatch\n"
19163                                 "\theader: %s\n\tlibrary: %s\n",
19164                                 DB_VERSION_STRING, version);
19165                         return 1;
19166                 }
19167         }
19168 #endif
19169
19170 #if DB_VERSION_MAJOR > 2
19171         db_env_create( NULL, 0 );
19172 #elif DB_VERSION_MAJOR > 1
19173         db_appexit( NULL );
19174 #else
19175         (void) dbopen( NULL, 0, 0, 0, NULL);
19176 #endif
19177
19178 ; return 0; }
19179 EOF
19180 if { (eval echo configure:19181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19181   rm -rf conftest*
19182   ol_cv_db_db_4_dot_3=yes
19183 else
19184   echo "configure: failed program was:" >&5
19185   cat conftest.$ac_ext >&5
19186   rm -rf conftest*
19187   ol_cv_db_db_4_dot_3=no
19188 fi
19189 rm -f conftest*
19190
19191         LIBS="$ol_LIBS"
19192
19193 fi
19194
19195 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19196
19197         if test $ol_cv_db_db_4_dot_3 = yes ; then
19198                 ol_cv_lib_db=-ldb-4.3
19199         fi
19200 fi
19201
19202 if test $ol_cv_lib_db = no ; then
19203         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19204 echo "configure:19205: checking for Berkeley DB link (-ldb-4-3)" >&5
19205 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19206   echo $ac_n "(cached) $ac_c" 1>&6
19207 else
19208   
19209         ol_DB_LIB=-ldb-4-3
19210         ol_LIBS=$LIBS
19211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19212
19213         cat > conftest.$ac_ext <<EOF
19214 #line 19215 "configure"
19215 #include "confdefs.h"
19216
19217 #ifdef HAVE_DB_185_H
19218 # include <db_185.h>
19219 #else
19220 # include <db.h>
19221 #endif
19222
19223 #ifndef DB_VERSION_MAJOR
19224 # define DB_VERSION_MAJOR 1
19225 #endif
19226
19227 #ifndef NULL
19228 #define NULL ((void*)0)
19229 #endif
19230
19231 int main() {
19232
19233 #if DB_VERSION_MAJOR > 1
19234         {
19235                 char *version;
19236                 int major, minor, patch;
19237
19238                 version = db_version( &major, &minor, &patch );
19239
19240                 if( major != DB_VERSION_MAJOR ||
19241                         minor < DB_VERSION_MINOR )
19242                 {
19243                         printf("Berkeley DB version mismatch\n"
19244                                 "\theader: %s\n\tlibrary: %s\n",
19245                                 DB_VERSION_STRING, version);
19246                         return 1;
19247                 }
19248         }
19249 #endif
19250
19251 #if DB_VERSION_MAJOR > 2
19252         db_env_create( NULL, 0 );
19253 #elif DB_VERSION_MAJOR > 1
19254         db_appexit( NULL );
19255 #else
19256         (void) dbopen( NULL, 0, 0, 0, NULL);
19257 #endif
19258
19259 ; return 0; }
19260 EOF
19261 if { (eval echo configure:19262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19262   rm -rf conftest*
19263   ol_cv_db_db_4_3=yes
19264 else
19265   echo "configure: failed program was:" >&5
19266   cat conftest.$ac_ext >&5
19267   rm -rf conftest*
19268   ol_cv_db_db_4_3=no
19269 fi
19270 rm -f conftest*
19271
19272         LIBS="$ol_LIBS"
19273
19274 fi
19275
19276 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19277
19278         if test $ol_cv_db_db_4_3 = yes ; then
19279                 ol_cv_lib_db=-ldb-4-3
19280         fi
19281 fi
19282
19283 if test $ol_cv_lib_db = no ; then
19284         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19285 echo "configure:19286: checking for Berkeley DB link (-ldb42)" >&5
19286 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19287   echo $ac_n "(cached) $ac_c" 1>&6
19288 else
19289   
19290         ol_DB_LIB=-ldb42
19291         ol_LIBS=$LIBS
19292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19293
19294         cat > conftest.$ac_ext <<EOF
19295 #line 19296 "configure"
19296 #include "confdefs.h"
19297
19298 #ifdef HAVE_DB_185_H
19299 # include <db_185.h>
19300 #else
19301 # include <db.h>
19302 #endif
19303
19304 #ifndef DB_VERSION_MAJOR
19305 # define DB_VERSION_MAJOR 1
19306 #endif
19307
19308 #ifndef NULL
19309 #define NULL ((void*)0)
19310 #endif
19311
19312 int main() {
19313
19314 #if DB_VERSION_MAJOR > 1
19315         {
19316                 char *version;
19317                 int major, minor, patch;
19318
19319                 version = db_version( &major, &minor, &patch );
19320
19321                 if( major != DB_VERSION_MAJOR ||
19322                         minor < DB_VERSION_MINOR )
19323                 {
19324                         printf("Berkeley DB version mismatch\n"
19325                                 "\theader: %s\n\tlibrary: %s\n",
19326                                 DB_VERSION_STRING, version);
19327                         return 1;
19328                 }
19329         }
19330 #endif
19331
19332 #if DB_VERSION_MAJOR > 2
19333         db_env_create( NULL, 0 );
19334 #elif DB_VERSION_MAJOR > 1
19335         db_appexit( NULL );
19336 #else
19337         (void) dbopen( NULL, 0, 0, 0, NULL);
19338 #endif
19339
19340 ; return 0; }
19341 EOF
19342 if { (eval echo configure:19343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19343   rm -rf conftest*
19344   ol_cv_db_db42=yes
19345 else
19346   echo "configure: failed program was:" >&5
19347   cat conftest.$ac_ext >&5
19348   rm -rf conftest*
19349   ol_cv_db_db42=no
19350 fi
19351 rm -f conftest*
19352
19353         LIBS="$ol_LIBS"
19354
19355 fi
19356
19357 echo "$ac_t""$ol_cv_db_db42" 1>&6
19358
19359         if test $ol_cv_db_db42 = yes ; then
19360                 ol_cv_lib_db=-ldb42
19361         fi
19362 fi
19363
19364 if test $ol_cv_lib_db = no ; then
19365         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19366 echo "configure:19367: checking for Berkeley DB link (-ldb-42)" >&5
19367 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19368   echo $ac_n "(cached) $ac_c" 1>&6
19369 else
19370   
19371         ol_DB_LIB=-ldb-42
19372         ol_LIBS=$LIBS
19373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19374
19375         cat > conftest.$ac_ext <<EOF
19376 #line 19377 "configure"
19377 #include "confdefs.h"
19378
19379 #ifdef HAVE_DB_185_H
19380 # include <db_185.h>
19381 #else
19382 # include <db.h>
19383 #endif
19384
19385 #ifndef DB_VERSION_MAJOR
19386 # define DB_VERSION_MAJOR 1
19387 #endif
19388
19389 #ifndef NULL
19390 #define NULL ((void*)0)
19391 #endif
19392
19393 int main() {
19394
19395 #if DB_VERSION_MAJOR > 1
19396         {
19397                 char *version;
19398                 int major, minor, patch;
19399
19400                 version = db_version( &major, &minor, &patch );
19401
19402                 if( major != DB_VERSION_MAJOR ||
19403                         minor < DB_VERSION_MINOR )
19404                 {
19405                         printf("Berkeley DB version mismatch\n"
19406                                 "\theader: %s\n\tlibrary: %s\n",
19407                                 DB_VERSION_STRING, version);
19408                         return 1;
19409                 }
19410         }
19411 #endif
19412
19413 #if DB_VERSION_MAJOR > 2
19414         db_env_create( NULL, 0 );
19415 #elif DB_VERSION_MAJOR > 1
19416         db_appexit( NULL );
19417 #else
19418         (void) dbopen( NULL, 0, 0, 0, NULL);
19419 #endif
19420
19421 ; return 0; }
19422 EOF
19423 if { (eval echo configure:19424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19424   rm -rf conftest*
19425   ol_cv_db_db_42=yes
19426 else
19427   echo "configure: failed program was:" >&5
19428   cat conftest.$ac_ext >&5
19429   rm -rf conftest*
19430   ol_cv_db_db_42=no
19431 fi
19432 rm -f conftest*
19433
19434         LIBS="$ol_LIBS"
19435
19436 fi
19437
19438 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19439
19440         if test $ol_cv_db_db_42 = yes ; then
19441                 ol_cv_lib_db=-ldb-42
19442         fi
19443 fi
19444
19445 if test $ol_cv_lib_db = no ; then
19446         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19447 echo "configure:19448: checking for Berkeley DB link (-ldb-4.2)" >&5
19448 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19449   echo $ac_n "(cached) $ac_c" 1>&6
19450 else
19451   
19452         ol_DB_LIB=-ldb-4.2
19453         ol_LIBS=$LIBS
19454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19455
19456         cat > conftest.$ac_ext <<EOF
19457 #line 19458 "configure"
19458 #include "confdefs.h"
19459
19460 #ifdef HAVE_DB_185_H
19461 # include <db_185.h>
19462 #else
19463 # include <db.h>
19464 #endif
19465
19466 #ifndef DB_VERSION_MAJOR
19467 # define DB_VERSION_MAJOR 1
19468 #endif
19469
19470 #ifndef NULL
19471 #define NULL ((void*)0)
19472 #endif
19473
19474 int main() {
19475
19476 #if DB_VERSION_MAJOR > 1
19477         {
19478                 char *version;
19479                 int major, minor, patch;
19480
19481                 version = db_version( &major, &minor, &patch );
19482
19483                 if( major != DB_VERSION_MAJOR ||
19484                         minor < DB_VERSION_MINOR )
19485                 {
19486                         printf("Berkeley DB version mismatch\n"
19487                                 "\theader: %s\n\tlibrary: %s\n",
19488                                 DB_VERSION_STRING, version);
19489                         return 1;
19490                 }
19491         }
19492 #endif
19493
19494 #if DB_VERSION_MAJOR > 2
19495         db_env_create( NULL, 0 );
19496 #elif DB_VERSION_MAJOR > 1
19497         db_appexit( NULL );
19498 #else
19499         (void) dbopen( NULL, 0, 0, 0, NULL);
19500 #endif
19501
19502 ; return 0; }
19503 EOF
19504 if { (eval echo configure:19505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19505   rm -rf conftest*
19506   ol_cv_db_db_4_dot_2=yes
19507 else
19508   echo "configure: failed program was:" >&5
19509   cat conftest.$ac_ext >&5
19510   rm -rf conftest*
19511   ol_cv_db_db_4_dot_2=no
19512 fi
19513 rm -f conftest*
19514
19515         LIBS="$ol_LIBS"
19516
19517 fi
19518
19519 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19520
19521         if test $ol_cv_db_db_4_dot_2 = yes ; then
19522                 ol_cv_lib_db=-ldb-4.2
19523         fi
19524 fi
19525
19526 if test $ol_cv_lib_db = no ; then
19527         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19528 echo "configure:19529: checking for Berkeley DB link (-ldb-4-2)" >&5
19529 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19530   echo $ac_n "(cached) $ac_c" 1>&6
19531 else
19532   
19533         ol_DB_LIB=-ldb-4-2
19534         ol_LIBS=$LIBS
19535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19536
19537         cat > conftest.$ac_ext <<EOF
19538 #line 19539 "configure"
19539 #include "confdefs.h"
19540
19541 #ifdef HAVE_DB_185_H
19542 # include <db_185.h>
19543 #else
19544 # include <db.h>
19545 #endif
19546
19547 #ifndef DB_VERSION_MAJOR
19548 # define DB_VERSION_MAJOR 1
19549 #endif
19550
19551 #ifndef NULL
19552 #define NULL ((void*)0)
19553 #endif
19554
19555 int main() {
19556
19557 #if DB_VERSION_MAJOR > 1
19558         {
19559                 char *version;
19560                 int major, minor, patch;
19561
19562                 version = db_version( &major, &minor, &patch );
19563
19564                 if( major != DB_VERSION_MAJOR ||
19565                         minor < DB_VERSION_MINOR )
19566                 {
19567                         printf("Berkeley DB version mismatch\n"
19568                                 "\theader: %s\n\tlibrary: %s\n",
19569                                 DB_VERSION_STRING, version);
19570                         return 1;
19571                 }
19572         }
19573 #endif
19574
19575 #if DB_VERSION_MAJOR > 2
19576         db_env_create( NULL, 0 );
19577 #elif DB_VERSION_MAJOR > 1
19578         db_appexit( NULL );
19579 #else
19580         (void) dbopen( NULL, 0, 0, 0, NULL);
19581 #endif
19582
19583 ; return 0; }
19584 EOF
19585 if { (eval echo configure:19586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19586   rm -rf conftest*
19587   ol_cv_db_db_4_2=yes
19588 else
19589   echo "configure: failed program was:" >&5
19590   cat conftest.$ac_ext >&5
19591   rm -rf conftest*
19592   ol_cv_db_db_4_2=no
19593 fi
19594 rm -f conftest*
19595
19596         LIBS="$ol_LIBS"
19597
19598 fi
19599
19600 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19601
19602         if test $ol_cv_db_db_4_2 = yes ; then
19603                 ol_cv_lib_db=-ldb-4-2
19604         fi
19605 fi
19606
19607 if test $ol_cv_lib_db = no ; then
19608         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19609 echo "configure:19610: checking for Berkeley DB link (-ldb-4)" >&5
19610 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19611   echo $ac_n "(cached) $ac_c" 1>&6
19612 else
19613   
19614         ol_DB_LIB=-ldb-4
19615         ol_LIBS=$LIBS
19616         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19617
19618         cat > conftest.$ac_ext <<EOF
19619 #line 19620 "configure"
19620 #include "confdefs.h"
19621
19622 #ifdef HAVE_DB_185_H
19623 # include <db_185.h>
19624 #else
19625 # include <db.h>
19626 #endif
19627
19628 #ifndef DB_VERSION_MAJOR
19629 # define DB_VERSION_MAJOR 1
19630 #endif
19631
19632 #ifndef NULL
19633 #define NULL ((void*)0)
19634 #endif
19635
19636 int main() {
19637
19638 #if DB_VERSION_MAJOR > 1
19639         {
19640                 char *version;
19641                 int major, minor, patch;
19642
19643                 version = db_version( &major, &minor, &patch );
19644
19645                 if( major != DB_VERSION_MAJOR ||
19646                         minor < DB_VERSION_MINOR )
19647                 {
19648                         printf("Berkeley DB version mismatch\n"
19649                                 "\theader: %s\n\tlibrary: %s\n",
19650                                 DB_VERSION_STRING, version);
19651                         return 1;
19652                 }
19653         }
19654 #endif
19655
19656 #if DB_VERSION_MAJOR > 2
19657         db_env_create( NULL, 0 );
19658 #elif DB_VERSION_MAJOR > 1
19659         db_appexit( NULL );
19660 #else
19661         (void) dbopen( NULL, 0, 0, 0, NULL);
19662 #endif
19663
19664 ; return 0; }
19665 EOF
19666 if { (eval echo configure:19667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19667   rm -rf conftest*
19668   ol_cv_db_db_4=yes
19669 else
19670   echo "configure: failed program was:" >&5
19671   cat conftest.$ac_ext >&5
19672   rm -rf conftest*
19673   ol_cv_db_db_4=no
19674 fi
19675 rm -f conftest*
19676
19677         LIBS="$ol_LIBS"
19678
19679 fi
19680
19681 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19682
19683         if test $ol_cv_db_db_4 = yes ; then
19684                 ol_cv_lib_db=-ldb-4
19685         fi
19686 fi
19687
19688 if test $ol_cv_lib_db = no ; then
19689         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19690 echo "configure:19691: checking for Berkeley DB link (-ldb4)" >&5
19691 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19692   echo $ac_n "(cached) $ac_c" 1>&6
19693 else
19694   
19695         ol_DB_LIB=-ldb4
19696         ol_LIBS=$LIBS
19697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19698
19699         cat > conftest.$ac_ext <<EOF
19700 #line 19701 "configure"
19701 #include "confdefs.h"
19702
19703 #ifdef HAVE_DB_185_H
19704 # include <db_185.h>
19705 #else
19706 # include <db.h>
19707 #endif
19708
19709 #ifndef DB_VERSION_MAJOR
19710 # define DB_VERSION_MAJOR 1
19711 #endif
19712
19713 #ifndef NULL
19714 #define NULL ((void*)0)
19715 #endif
19716
19717 int main() {
19718
19719 #if DB_VERSION_MAJOR > 1
19720         {
19721                 char *version;
19722                 int major, minor, patch;
19723
19724                 version = db_version( &major, &minor, &patch );
19725
19726                 if( major != DB_VERSION_MAJOR ||
19727                         minor < DB_VERSION_MINOR )
19728                 {
19729                         printf("Berkeley DB version mismatch\n"
19730                                 "\theader: %s\n\tlibrary: %s\n",
19731                                 DB_VERSION_STRING, version);
19732                         return 1;
19733                 }
19734         }
19735 #endif
19736
19737 #if DB_VERSION_MAJOR > 2
19738         db_env_create( NULL, 0 );
19739 #elif DB_VERSION_MAJOR > 1
19740         db_appexit( NULL );
19741 #else
19742         (void) dbopen( NULL, 0, 0, 0, NULL);
19743 #endif
19744
19745 ; return 0; }
19746 EOF
19747 if { (eval echo configure:19748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19748   rm -rf conftest*
19749   ol_cv_db_db4=yes
19750 else
19751   echo "configure: failed program was:" >&5
19752   cat conftest.$ac_ext >&5
19753   rm -rf conftest*
19754   ol_cv_db_db4=no
19755 fi
19756 rm -f conftest*
19757
19758         LIBS="$ol_LIBS"
19759
19760 fi
19761
19762 echo "$ac_t""$ol_cv_db_db4" 1>&6
19763
19764         if test $ol_cv_db_db4 = yes ; then
19765                 ol_cv_lib_db=-ldb4
19766         fi
19767 fi
19768
19769 if test $ol_cv_lib_db = no ; then
19770         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19771 echo "configure:19772: checking for Berkeley DB link (-ldb)" >&5
19772 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19773   echo $ac_n "(cached) $ac_c" 1>&6
19774 else
19775   
19776         ol_DB_LIB=-ldb
19777         ol_LIBS=$LIBS
19778         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19779
19780         cat > conftest.$ac_ext <<EOF
19781 #line 19782 "configure"
19782 #include "confdefs.h"
19783
19784 #ifdef HAVE_DB_185_H
19785 # include <db_185.h>
19786 #else
19787 # include <db.h>
19788 #endif
19789
19790 #ifndef DB_VERSION_MAJOR
19791 # define DB_VERSION_MAJOR 1
19792 #endif
19793
19794 #ifndef NULL
19795 #define NULL ((void*)0)
19796 #endif
19797
19798 int main() {
19799
19800 #if DB_VERSION_MAJOR > 1
19801         {
19802                 char *version;
19803                 int major, minor, patch;
19804
19805                 version = db_version( &major, &minor, &patch );
19806
19807                 if( major != DB_VERSION_MAJOR ||
19808                         minor < DB_VERSION_MINOR )
19809                 {
19810                         printf("Berkeley DB version mismatch\n"
19811                                 "\theader: %s\n\tlibrary: %s\n",
19812                                 DB_VERSION_STRING, version);
19813                         return 1;
19814                 }
19815         }
19816 #endif
19817
19818 #if DB_VERSION_MAJOR > 2
19819         db_env_create( NULL, 0 );
19820 #elif DB_VERSION_MAJOR > 1
19821         db_appexit( NULL );
19822 #else
19823         (void) dbopen( NULL, 0, 0, 0, NULL);
19824 #endif
19825
19826 ; return 0; }
19827 EOF
19828 if { (eval echo configure:19829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19829   rm -rf conftest*
19830   ol_cv_db_db=yes
19831 else
19832   echo "configure: failed program was:" >&5
19833   cat conftest.$ac_ext >&5
19834   rm -rf conftest*
19835   ol_cv_db_db=no
19836 fi
19837 rm -f conftest*
19838
19839         LIBS="$ol_LIBS"
19840
19841 fi
19842
19843 echo "$ac_t""$ol_cv_db_db" 1>&6
19844
19845         if test $ol_cv_db_db = yes ; then
19846                 ol_cv_lib_db=-ldb
19847         fi
19848 fi
19849
19850 if test $ol_cv_lib_db = no ; then
19851         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19852 echo "configure:19853: checking for Berkeley DB link (-ldb41)" >&5
19853 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19854   echo $ac_n "(cached) $ac_c" 1>&6
19855 else
19856   
19857         ol_DB_LIB=-ldb41
19858         ol_LIBS=$LIBS
19859         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19860
19861         cat > conftest.$ac_ext <<EOF
19862 #line 19863 "configure"
19863 #include "confdefs.h"
19864
19865 #ifdef HAVE_DB_185_H
19866 # include <db_185.h>
19867 #else
19868 # include <db.h>
19869 #endif
19870
19871 #ifndef DB_VERSION_MAJOR
19872 # define DB_VERSION_MAJOR 1
19873 #endif
19874
19875 #ifndef NULL
19876 #define NULL ((void*)0)
19877 #endif
19878
19879 int main() {
19880
19881 #if DB_VERSION_MAJOR > 1
19882         {
19883                 char *version;
19884                 int major, minor, patch;
19885
19886                 version = db_version( &major, &minor, &patch );
19887
19888                 if( major != DB_VERSION_MAJOR ||
19889                         minor < DB_VERSION_MINOR )
19890                 {
19891                         printf("Berkeley DB version mismatch\n"
19892                                 "\theader: %s\n\tlibrary: %s\n",
19893                                 DB_VERSION_STRING, version);
19894                         return 1;
19895                 }
19896         }
19897 #endif
19898
19899 #if DB_VERSION_MAJOR > 2
19900         db_env_create( NULL, 0 );
19901 #elif DB_VERSION_MAJOR > 1
19902         db_appexit( NULL );
19903 #else
19904         (void) dbopen( NULL, 0, 0, 0, NULL);
19905 #endif
19906
19907 ; return 0; }
19908 EOF
19909 if { (eval echo configure:19910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19910   rm -rf conftest*
19911   ol_cv_db_db41=yes
19912 else
19913   echo "configure: failed program was:" >&5
19914   cat conftest.$ac_ext >&5
19915   rm -rf conftest*
19916   ol_cv_db_db41=no
19917 fi
19918 rm -f conftest*
19919
19920         LIBS="$ol_LIBS"
19921
19922 fi
19923
19924 echo "$ac_t""$ol_cv_db_db41" 1>&6
19925
19926         if test $ol_cv_db_db41 = yes ; then
19927                 ol_cv_lib_db=-ldb41
19928         fi
19929 fi
19930
19931 if test $ol_cv_lib_db = no ; then
19932         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19933 echo "configure:19934: checking for Berkeley DB link (-ldb-41)" >&5
19934 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19935   echo $ac_n "(cached) $ac_c" 1>&6
19936 else
19937   
19938         ol_DB_LIB=-ldb-41
19939         ol_LIBS=$LIBS
19940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19941
19942         cat > conftest.$ac_ext <<EOF
19943 #line 19944 "configure"
19944 #include "confdefs.h"
19945
19946 #ifdef HAVE_DB_185_H
19947 # include <db_185.h>
19948 #else
19949 # include <db.h>
19950 #endif
19951
19952 #ifndef DB_VERSION_MAJOR
19953 # define DB_VERSION_MAJOR 1
19954 #endif
19955
19956 #ifndef NULL
19957 #define NULL ((void*)0)
19958 #endif
19959
19960 int main() {
19961
19962 #if DB_VERSION_MAJOR > 1
19963         {
19964                 char *version;
19965                 int major, minor, patch;
19966
19967                 version = db_version( &major, &minor, &patch );
19968
19969                 if( major != DB_VERSION_MAJOR ||
19970                         minor < DB_VERSION_MINOR )
19971                 {
19972                         printf("Berkeley DB version mismatch\n"
19973                                 "\theader: %s\n\tlibrary: %s\n",
19974                                 DB_VERSION_STRING, version);
19975                         return 1;
19976                 }
19977         }
19978 #endif
19979
19980 #if DB_VERSION_MAJOR > 2
19981         db_env_create( NULL, 0 );
19982 #elif DB_VERSION_MAJOR > 1
19983         db_appexit( NULL );
19984 #else
19985         (void) dbopen( NULL, 0, 0, 0, NULL);
19986 #endif
19987
19988 ; return 0; }
19989 EOF
19990 if { (eval echo configure:19991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19991   rm -rf conftest*
19992   ol_cv_db_db_41=yes
19993 else
19994   echo "configure: failed program was:" >&5
19995   cat conftest.$ac_ext >&5
19996   rm -rf conftest*
19997   ol_cv_db_db_41=no
19998 fi
19999 rm -f conftest*
20000
20001         LIBS="$ol_LIBS"
20002
20003 fi
20004
20005 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20006
20007         if test $ol_cv_db_db_41 = yes ; then
20008                 ol_cv_lib_db=-ldb-41
20009         fi
20010 fi
20011
20012 if test $ol_cv_lib_db = no ; then
20013         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20014 echo "configure:20015: checking for Berkeley DB link (-ldb-4.1)" >&5
20015 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20016   echo $ac_n "(cached) $ac_c" 1>&6
20017 else
20018   
20019         ol_DB_LIB=-ldb-4.1
20020         ol_LIBS=$LIBS
20021         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20022
20023         cat > conftest.$ac_ext <<EOF
20024 #line 20025 "configure"
20025 #include "confdefs.h"
20026
20027 #ifdef HAVE_DB_185_H
20028 # include <db_185.h>
20029 #else
20030 # include <db.h>
20031 #endif
20032
20033 #ifndef DB_VERSION_MAJOR
20034 # define DB_VERSION_MAJOR 1
20035 #endif
20036
20037 #ifndef NULL
20038 #define NULL ((void*)0)
20039 #endif
20040
20041 int main() {
20042
20043 #if DB_VERSION_MAJOR > 1
20044         {
20045                 char *version;
20046                 int major, minor, patch;
20047
20048                 version = db_version( &major, &minor, &patch );
20049
20050                 if( major != DB_VERSION_MAJOR ||
20051                         minor < DB_VERSION_MINOR )
20052                 {
20053                         printf("Berkeley DB version mismatch\n"
20054                                 "\theader: %s\n\tlibrary: %s\n",
20055                                 DB_VERSION_STRING, version);
20056                         return 1;
20057                 }
20058         }
20059 #endif
20060
20061 #if DB_VERSION_MAJOR > 2
20062         db_env_create( NULL, 0 );
20063 #elif DB_VERSION_MAJOR > 1
20064         db_appexit( NULL );
20065 #else
20066         (void) dbopen( NULL, 0, 0, 0, NULL);
20067 #endif
20068
20069 ; return 0; }
20070 EOF
20071 if { (eval echo configure:20072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20072   rm -rf conftest*
20073   ol_cv_db_db_4_dot_1=yes
20074 else
20075   echo "configure: failed program was:" >&5
20076   cat conftest.$ac_ext >&5
20077   rm -rf conftest*
20078   ol_cv_db_db_4_dot_1=no
20079 fi
20080 rm -f conftest*
20081
20082         LIBS="$ol_LIBS"
20083
20084 fi
20085
20086 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20087
20088         if test $ol_cv_db_db_4_dot_1 = yes ; then
20089                 ol_cv_lib_db=-ldb-4.1
20090         fi
20091 fi
20092
20093 if test $ol_cv_lib_db = no ; then
20094         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20095 echo "configure:20096: checking for Berkeley DB link (-ldb-4-1)" >&5
20096 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20097   echo $ac_n "(cached) $ac_c" 1>&6
20098 else
20099   
20100         ol_DB_LIB=-ldb-4-1
20101         ol_LIBS=$LIBS
20102         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20103
20104         cat > conftest.$ac_ext <<EOF
20105 #line 20106 "configure"
20106 #include "confdefs.h"
20107
20108 #ifdef HAVE_DB_185_H
20109 # include <db_185.h>
20110 #else
20111 # include <db.h>
20112 #endif
20113
20114 #ifndef DB_VERSION_MAJOR
20115 # define DB_VERSION_MAJOR 1
20116 #endif
20117
20118 #ifndef NULL
20119 #define NULL ((void*)0)
20120 #endif
20121
20122 int main() {
20123
20124 #if DB_VERSION_MAJOR > 1
20125         {
20126                 char *version;
20127                 int major, minor, patch;
20128
20129                 version = db_version( &major, &minor, &patch );
20130
20131                 if( major != DB_VERSION_MAJOR ||
20132                         minor < DB_VERSION_MINOR )
20133                 {
20134                         printf("Berkeley DB version mismatch\n"
20135                                 "\theader: %s\n\tlibrary: %s\n",
20136                                 DB_VERSION_STRING, version);
20137                         return 1;
20138                 }
20139         }
20140 #endif
20141
20142 #if DB_VERSION_MAJOR > 2
20143         db_env_create( NULL, 0 );
20144 #elif DB_VERSION_MAJOR > 1
20145         db_appexit( NULL );
20146 #else
20147         (void) dbopen( NULL, 0, 0, 0, NULL);
20148 #endif
20149
20150 ; return 0; }
20151 EOF
20152 if { (eval echo configure:20153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20153   rm -rf conftest*
20154   ol_cv_db_db_4_1=yes
20155 else
20156   echo "configure: failed program was:" >&5
20157   cat conftest.$ac_ext >&5
20158   rm -rf conftest*
20159   ol_cv_db_db_4_1=no
20160 fi
20161 rm -f conftest*
20162
20163         LIBS="$ol_LIBS"
20164
20165 fi
20166
20167 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20168
20169         if test $ol_cv_db_db_4_1 = yes ; then
20170                 ol_cv_lib_db=-ldb-4-1
20171         fi
20172 fi
20173
20174 if test $ol_cv_lib_db = no ; then
20175         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20176 echo "configure:20177: checking for Berkeley DB link (-ldb3)" >&5
20177 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20178   echo $ac_n "(cached) $ac_c" 1>&6
20179 else
20180   
20181         ol_DB_LIB=-ldb3
20182         ol_LIBS=$LIBS
20183         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20184
20185         cat > conftest.$ac_ext <<EOF
20186 #line 20187 "configure"
20187 #include "confdefs.h"
20188
20189 #ifdef HAVE_DB_185_H
20190 # include <db_185.h>
20191 #else
20192 # include <db.h>
20193 #endif
20194
20195 #ifndef DB_VERSION_MAJOR
20196 # define DB_VERSION_MAJOR 1
20197 #endif
20198
20199 #ifndef NULL
20200 #define NULL ((void*)0)
20201 #endif
20202
20203 int main() {
20204
20205 #if DB_VERSION_MAJOR > 1
20206         {
20207                 char *version;
20208                 int major, minor, patch;
20209
20210                 version = db_version( &major, &minor, &patch );
20211
20212                 if( major != DB_VERSION_MAJOR ||
20213                         minor < DB_VERSION_MINOR )
20214                 {
20215                         printf("Berkeley DB version mismatch\n"
20216                                 "\theader: %s\n\tlibrary: %s\n",
20217                                 DB_VERSION_STRING, version);
20218                         return 1;
20219                 }
20220         }
20221 #endif
20222
20223 #if DB_VERSION_MAJOR > 2
20224         db_env_create( NULL, 0 );
20225 #elif DB_VERSION_MAJOR > 1
20226         db_appexit( NULL );
20227 #else
20228         (void) dbopen( NULL, 0, 0, 0, NULL);
20229 #endif
20230
20231 ; return 0; }
20232 EOF
20233 if { (eval echo configure:20234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20234   rm -rf conftest*
20235   ol_cv_db_db3=yes
20236 else
20237   echo "configure: failed program was:" >&5
20238   cat conftest.$ac_ext >&5
20239   rm -rf conftest*
20240   ol_cv_db_db3=no
20241 fi
20242 rm -f conftest*
20243
20244         LIBS="$ol_LIBS"
20245
20246 fi
20247
20248 echo "$ac_t""$ol_cv_db_db3" 1>&6
20249
20250         if test $ol_cv_db_db3 = yes ; then
20251                 ol_cv_lib_db=-ldb3
20252         fi
20253 fi
20254
20255 if test $ol_cv_lib_db = no ; then
20256         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20257 echo "configure:20258: checking for Berkeley DB link (-ldb-3)" >&5
20258 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20259   echo $ac_n "(cached) $ac_c" 1>&6
20260 else
20261   
20262         ol_DB_LIB=-ldb-3
20263         ol_LIBS=$LIBS
20264         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20265
20266         cat > conftest.$ac_ext <<EOF
20267 #line 20268 "configure"
20268 #include "confdefs.h"
20269
20270 #ifdef HAVE_DB_185_H
20271 # include <db_185.h>
20272 #else
20273 # include <db.h>
20274 #endif
20275
20276 #ifndef DB_VERSION_MAJOR
20277 # define DB_VERSION_MAJOR 1
20278 #endif
20279
20280 #ifndef NULL
20281 #define NULL ((void*)0)
20282 #endif
20283
20284 int main() {
20285
20286 #if DB_VERSION_MAJOR > 1
20287         {
20288                 char *version;
20289                 int major, minor, patch;
20290
20291                 version = db_version( &major, &minor, &patch );
20292
20293                 if( major != DB_VERSION_MAJOR ||
20294                         minor < DB_VERSION_MINOR )
20295                 {
20296                         printf("Berkeley DB version mismatch\n"
20297                                 "\theader: %s\n\tlibrary: %s\n",
20298                                 DB_VERSION_STRING, version);
20299                         return 1;
20300                 }
20301         }
20302 #endif
20303
20304 #if DB_VERSION_MAJOR > 2
20305         db_env_create( NULL, 0 );
20306 #elif DB_VERSION_MAJOR > 1
20307         db_appexit( NULL );
20308 #else
20309         (void) dbopen( NULL, 0, 0, 0, NULL);
20310 #endif
20311
20312 ; return 0; }
20313 EOF
20314 if { (eval echo configure:20315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20315   rm -rf conftest*
20316   ol_cv_db_db_3=yes
20317 else
20318   echo "configure: failed program was:" >&5
20319   cat conftest.$ac_ext >&5
20320   rm -rf conftest*
20321   ol_cv_db_db_3=no
20322 fi
20323 rm -f conftest*
20324
20325         LIBS="$ol_LIBS"
20326
20327 fi
20328
20329 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20330
20331         if test $ol_cv_db_db_3 = yes ; then
20332                 ol_cv_lib_db=-ldb-3
20333         fi
20334 fi
20335
20336 if test $ol_cv_lib_db = no ; then
20337         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20338 echo "configure:20339: checking for Berkeley DB link (-ldb2)" >&5
20339 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20340   echo $ac_n "(cached) $ac_c" 1>&6
20341 else
20342   
20343         ol_DB_LIB=-ldb2
20344         ol_LIBS=$LIBS
20345         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20346
20347         cat > conftest.$ac_ext <<EOF
20348 #line 20349 "configure"
20349 #include "confdefs.h"
20350
20351 #ifdef HAVE_DB_185_H
20352 # include <db_185.h>
20353 #else
20354 # include <db.h>
20355 #endif
20356
20357 #ifndef DB_VERSION_MAJOR
20358 # define DB_VERSION_MAJOR 1
20359 #endif
20360
20361 #ifndef NULL
20362 #define NULL ((void*)0)
20363 #endif
20364
20365 int main() {
20366
20367 #if DB_VERSION_MAJOR > 1
20368         {
20369                 char *version;
20370                 int major, minor, patch;
20371
20372                 version = db_version( &major, &minor, &patch );
20373
20374                 if( major != DB_VERSION_MAJOR ||
20375                         minor < DB_VERSION_MINOR )
20376                 {
20377                         printf("Berkeley DB version mismatch\n"
20378                                 "\theader: %s\n\tlibrary: %s\n",
20379                                 DB_VERSION_STRING, version);
20380                         return 1;
20381                 }
20382         }
20383 #endif
20384
20385 #if DB_VERSION_MAJOR > 2
20386         db_env_create( NULL, 0 );
20387 #elif DB_VERSION_MAJOR > 1
20388         db_appexit( NULL );
20389 #else
20390         (void) dbopen( NULL, 0, 0, 0, NULL);
20391 #endif
20392
20393 ; return 0; }
20394 EOF
20395 if { (eval echo configure:20396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20396   rm -rf conftest*
20397   ol_cv_db_db2=yes
20398 else
20399   echo "configure: failed program was:" >&5
20400   cat conftest.$ac_ext >&5
20401   rm -rf conftest*
20402   ol_cv_db_db2=no
20403 fi
20404 rm -f conftest*
20405
20406         LIBS="$ol_LIBS"
20407
20408 fi
20409
20410 echo "$ac_t""$ol_cv_db_db2" 1>&6
20411
20412         if test $ol_cv_db_db2 = yes ; then
20413                 ol_cv_lib_db=-ldb2
20414         fi
20415 fi
20416
20417 if test $ol_cv_lib_db = no ; then
20418         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20419 echo "configure:20420: checking for Berkeley DB link (-ldb-2)" >&5
20420 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20421   echo $ac_n "(cached) $ac_c" 1>&6
20422 else
20423   
20424         ol_DB_LIB=-ldb-2
20425         ol_LIBS=$LIBS
20426         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20427
20428         cat > conftest.$ac_ext <<EOF
20429 #line 20430 "configure"
20430 #include "confdefs.h"
20431
20432 #ifdef HAVE_DB_185_H
20433 # include <db_185.h>
20434 #else
20435 # include <db.h>
20436 #endif
20437
20438 #ifndef DB_VERSION_MAJOR
20439 # define DB_VERSION_MAJOR 1
20440 #endif
20441
20442 #ifndef NULL
20443 #define NULL ((void*)0)
20444 #endif
20445
20446 int main() {
20447
20448 #if DB_VERSION_MAJOR > 1
20449         {
20450                 char *version;
20451                 int major, minor, patch;
20452
20453                 version = db_version( &major, &minor, &patch );
20454
20455                 if( major != DB_VERSION_MAJOR ||
20456                         minor < DB_VERSION_MINOR )
20457                 {
20458                         printf("Berkeley DB version mismatch\n"
20459                                 "\theader: %s\n\tlibrary: %s\n",
20460                                 DB_VERSION_STRING, version);
20461                         return 1;
20462                 }
20463         }
20464 #endif
20465
20466 #if DB_VERSION_MAJOR > 2
20467         db_env_create( NULL, 0 );
20468 #elif DB_VERSION_MAJOR > 1
20469         db_appexit( NULL );
20470 #else
20471         (void) dbopen( NULL, 0, 0, 0, NULL);
20472 #endif
20473
20474 ; return 0; }
20475 EOF
20476 if { (eval echo configure:20477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20477   rm -rf conftest*
20478   ol_cv_db_db_2=yes
20479 else
20480   echo "configure: failed program was:" >&5
20481   cat conftest.$ac_ext >&5
20482   rm -rf conftest*
20483   ol_cv_db_db_2=no
20484 fi
20485 rm -f conftest*
20486
20487         LIBS="$ol_LIBS"
20488
20489 fi
20490
20491 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20492
20493         if test $ol_cv_db_db_2 = yes ; then
20494                 ol_cv_lib_db=-ldb-2
20495         fi
20496 fi
20497
20498 if test $ol_cv_lib_db = no ; then
20499         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20500 echo "configure:20501: checking for Berkeley DB link (-ldb1)" >&5
20501 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20502   echo $ac_n "(cached) $ac_c" 1>&6
20503 else
20504   
20505         ol_DB_LIB=-ldb1
20506         ol_LIBS=$LIBS
20507         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20508
20509         cat > conftest.$ac_ext <<EOF
20510 #line 20511 "configure"
20511 #include "confdefs.h"
20512
20513 #ifdef HAVE_DB_185_H
20514 # include <db_185.h>
20515 #else
20516 # include <db.h>
20517 #endif
20518
20519 #ifndef DB_VERSION_MAJOR
20520 # define DB_VERSION_MAJOR 1
20521 #endif
20522
20523 #ifndef NULL
20524 #define NULL ((void*)0)
20525 #endif
20526
20527 int main() {
20528
20529 #if DB_VERSION_MAJOR > 1
20530         {
20531                 char *version;
20532                 int major, minor, patch;
20533
20534                 version = db_version( &major, &minor, &patch );
20535
20536                 if( major != DB_VERSION_MAJOR ||
20537                         minor < DB_VERSION_MINOR )
20538                 {
20539                         printf("Berkeley DB version mismatch\n"
20540                                 "\theader: %s\n\tlibrary: %s\n",
20541                                 DB_VERSION_STRING, version);
20542                         return 1;
20543                 }
20544         }
20545 #endif
20546
20547 #if DB_VERSION_MAJOR > 2
20548         db_env_create( NULL, 0 );
20549 #elif DB_VERSION_MAJOR > 1
20550         db_appexit( NULL );
20551 #else
20552         (void) dbopen( NULL, 0, 0, 0, NULL);
20553 #endif
20554
20555 ; return 0; }
20556 EOF
20557 if { (eval echo configure:20558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20558   rm -rf conftest*
20559   ol_cv_db_db1=yes
20560 else
20561   echo "configure: failed program was:" >&5
20562   cat conftest.$ac_ext >&5
20563   rm -rf conftest*
20564   ol_cv_db_db1=no
20565 fi
20566 rm -f conftest*
20567
20568         LIBS="$ol_LIBS"
20569
20570 fi
20571
20572 echo "$ac_t""$ol_cv_db_db1" 1>&6
20573
20574         if test $ol_cv_db_db1 = yes ; then
20575                 ol_cv_lib_db=-ldb1
20576         fi
20577 fi
20578
20579 if test $ol_cv_lib_db = no ; then
20580         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20581 echo "configure:20582: checking for Berkeley DB link (-ldb-1)" >&5
20582 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20583   echo $ac_n "(cached) $ac_c" 1>&6
20584 else
20585   
20586         ol_DB_LIB=-ldb-1
20587         ol_LIBS=$LIBS
20588         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20589
20590         cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593
20594 #ifdef HAVE_DB_185_H
20595 # include <db_185.h>
20596 #else
20597 # include <db.h>
20598 #endif
20599
20600 #ifndef DB_VERSION_MAJOR
20601 # define DB_VERSION_MAJOR 1
20602 #endif
20603
20604 #ifndef NULL
20605 #define NULL ((void*)0)
20606 #endif
20607
20608 int main() {
20609
20610 #if DB_VERSION_MAJOR > 1
20611         {
20612                 char *version;
20613                 int major, minor, patch;
20614
20615                 version = db_version( &major, &minor, &patch );
20616
20617                 if( major != DB_VERSION_MAJOR ||
20618                         minor < DB_VERSION_MINOR )
20619                 {
20620                         printf("Berkeley DB version mismatch\n"
20621                                 "\theader: %s\n\tlibrary: %s\n",
20622                                 DB_VERSION_STRING, version);
20623                         return 1;
20624                 }
20625         }
20626 #endif
20627
20628 #if DB_VERSION_MAJOR > 2
20629         db_env_create( NULL, 0 );
20630 #elif DB_VERSION_MAJOR > 1
20631         db_appexit( NULL );
20632 #else
20633         (void) dbopen( NULL, 0, 0, 0, NULL);
20634 #endif
20635
20636 ; return 0; }
20637 EOF
20638 if { (eval echo configure:20639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20639   rm -rf conftest*
20640   ol_cv_db_db_1=yes
20641 else
20642   echo "configure: failed program was:" >&5
20643   cat conftest.$ac_ext >&5
20644   rm -rf conftest*
20645   ol_cv_db_db_1=no
20646 fi
20647 rm -f conftest*
20648
20649         LIBS="$ol_LIBS"
20650
20651 fi
20652
20653 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20654
20655         if test $ol_cv_db_db_1 = yes ; then
20656                 ol_cv_lib_db=-ldb-1
20657         fi
20658 fi
20659
20660
20661         if test "$ol_cv_lib_db" != no ; then
20662                 ol_cv_berkeley_db=yes
20663                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20664 echo "configure:20665: checking for Berkeley DB version match" >&5
20665 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20666   echo $ac_n "(cached) $ac_c" 1>&6
20667 else
20668   
20669         ol_LIBS="$LIBS"
20670         LIBS="$LTHREAD_LIBS $LIBS"
20671         if test $ol_cv_lib_db != yes ; then
20672                 LIBS="$ol_cv_lib_db $LIBS"
20673         fi
20674
20675         if test "$cross_compiling" = yes; then
20676   ol_cv_berkeley_db_version=cross
20677 else
20678   cat > conftest.$ac_ext <<EOF
20679 #line 20680 "configure"
20680 #include "confdefs.h"
20681
20682 #ifdef HAVE_DB_185_H
20683         choke me;
20684 #else
20685 #include <db.h>
20686 #endif
20687 #ifndef DB_VERSION_MAJOR
20688 # define DB_VERSION_MAJOR 1
20689 #endif
20690 #ifndef NULL
20691 #define NULL ((void *)0)
20692 #endif
20693 main()
20694 {
20695 #if DB_VERSION_MAJOR > 1
20696         char *version;
20697         int major, minor, patch;
20698
20699         version = db_version( &major, &minor, &patch );
20700
20701         if( major != DB_VERSION_MAJOR ||
20702                 minor != DB_VERSION_MINOR ||
20703                 patch != DB_VERSION_PATCH )
20704         {
20705                 printf("Berkeley DB version mismatch\n"
20706                         "\theader: %s\n\tlibrary: %s\n",
20707                         DB_VERSION_STRING, version);
20708                 return 1;
20709         }
20710 #endif
20711
20712         return 0;
20713 }
20714 EOF
20715 if { (eval echo configure:20716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20716 then
20717   ol_cv_berkeley_db_version=yes
20718 else
20719   echo "configure: failed program was:" >&5
20720   cat conftest.$ac_ext >&5
20721   rm -fr conftest*
20722   ol_cv_berkeley_db_version=no
20723 fi
20724 rm -fr conftest*
20725 fi
20726
20727
20728         LIBS="$ol_LIBS"
20729
20730 fi
20731
20732 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20733
20734         if test $ol_cv_berkeley_db_version = no ; then
20735                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20736         fi
20737
20738                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20739 echo "configure:20740: checking for Berkeley DB thread support" >&5
20740 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20741   echo $ac_n "(cached) $ac_c" 1>&6
20742 else
20743   
20744         ol_LIBS="$LIBS"
20745         LIBS="$LTHREAD_LIBS $LIBS"
20746         if test $ol_cv_lib_db != yes ; then
20747                 LIBS="$ol_cv_lib_db $LIBS"
20748         fi
20749
20750         if test "$cross_compiling" = yes; then
20751   ol_cv_berkeley_db_thread=cross
20752 else
20753   cat > conftest.$ac_ext <<EOF
20754 #line 20755 "configure"
20755 #include "confdefs.h"
20756
20757 #ifdef HAVE_DB_185_H
20758         choke me;
20759 #else
20760 #include <db.h>
20761 #endif
20762 #ifndef NULL
20763 #define NULL ((void *)0)
20764 #endif
20765 main()
20766 {
20767         int rc;
20768         u_int32_t flags = DB_CREATE |
20769 #ifdef DB_PRIVATE
20770                 DB_PRIVATE |
20771 #endif
20772                 DB_THREAD;
20773
20774 #if DB_VERSION_MAJOR > 2
20775         DB_ENV *env = NULL;
20776
20777         rc = db_env_create( &env, 0 );
20778
20779         flags |= DB_INIT_MPOOL;
20780 #ifdef DB_MPOOL_PRIVATE
20781         flags |= DB_MPOOL_PRIVATE;
20782 #endif
20783
20784         if( rc ) {
20785                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20786                 return rc;
20787         }
20788
20789 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20790         rc = env->open( env, NULL, flags, 0 );
20791 #else
20792         rc = env->open( env, NULL, NULL, flags, 0 );
20793 #endif
20794
20795         if ( rc == 0 ) {
20796                 rc = env->close( env, 0 );
20797         }
20798
20799         if( rc ) {
20800                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20801                 return rc;
20802         }
20803
20804 #else
20805         DB_ENV env;
20806         memset( &env, '\0', sizeof(env) );
20807
20808         rc = db_appinit( NULL, NULL, &env, flags );
20809
20810         if( rc == 0 ) {
20811                 db_appexit( &env );
20812         }
20813
20814         unlink("__db_mpool.share");
20815         unlink("__db_lock.share");
20816 #endif
20817
20818         return rc;
20819 }
20820 EOF
20821 if { (eval echo configure:20822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20822 then
20823   ol_cv_berkeley_db_thread=yes
20824 else
20825   echo "configure: failed program was:" >&5
20826   cat conftest.$ac_ext >&5
20827   rm -fr conftest*
20828   ol_cv_berkeley_db_thread=no
20829 fi
20830 rm -fr conftest*
20831 fi
20832
20833
20834         LIBS="$ol_LIBS"
20835
20836 fi
20837
20838 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20839
20840         if test $ol_cv_berkeley_db_thread != no ; then
20841                 cat >> confdefs.h <<\EOF
20842 #define HAVE_BERKELEY_DB_THREAD 1
20843 EOF
20844
20845         fi
20846
20847         fi
20848 fi
20849
20850         fi
20851
20852         if test $ol_cv_berkeley_db != no ; then
20853                 cat >> confdefs.h <<\EOF
20854 #define HAVE_BERKELEY_DB 1
20855 EOF
20856
20857
20858                 ol_link_ldbm=berkeley
20859                 ol_with_ldbm_api=berkeley
20860
20861                 if test $ol_with_ldbm_type = hash ; then
20862                         cat >> confdefs.h <<\EOF
20863 #define LDBM_USE_DBHASH 1
20864 EOF
20865
20866                 else
20867                         cat >> confdefs.h <<\EOF
20868 #define LDBM_USE_DBBTREE 1
20869 EOF
20870
20871                 fi
20872
20873                                                 if test $ol_cv_lib_db != yes ; then
20874                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20875                 fi
20876         fi
20877 fi
20878
20879 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20880         if test $ol_link_ldbm != berkeley ; then
20881                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20882         else
20883                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20884 echo "configure:20885: checking Berkeley DB version for BDB backend" >&5
20885 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20886   echo $ac_n "(cached) $ac_c" 1>&6
20887 else
20888   
20889         cat > conftest.$ac_ext <<EOF
20890 #line 20891 "configure"
20891 #include "confdefs.h"
20892
20893 #include <db.h>
20894
20895  /* this check could be improved */
20896 #ifndef DB_VERSION_MAJOR
20897 #       define DB_VERSION_MAJOR 1
20898 #endif
20899 #ifndef DB_VERSION_MINOR
20900 #       define DB_VERSION_MINOR 0
20901 #endif
20902
20903 /* require 4.2 or later */
20904 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20905         __db_version_compat
20906 #endif
20907         
20908 EOF
20909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20910   egrep "__db_version_compat" >/dev/null 2>&1; then
20911   rm -rf conftest*
20912   ol_cv_bdb_compat=yes
20913 else
20914   rm -rf conftest*
20915   ol_cv_bdb_compat=no
20916 fi
20917 rm -f conftest*
20918
20919 fi
20920
20921 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20922
20923
20924                 if test $ol_cv_bdb_compat != yes ; then
20925                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20926                 fi
20927         fi
20928 fi
20929
20930 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20931         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20932         ol_with_ldbm_api=none
20933 fi
20934
20935 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20936         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20937 echo "configure:20938: checking for MDBM library" >&5
20938 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20939   echo $ac_n "(cached) $ac_c" 1>&6
20940 else
20941         ol_LIBS="$LIBS"
20942         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20943 echo "configure:20944: checking for mdbm_set_chain" >&5
20944 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20945   echo $ac_n "(cached) $ac_c" 1>&6
20946 else
20947   cat > conftest.$ac_ext <<EOF
20948 #line 20949 "configure"
20949 #include "confdefs.h"
20950 /* System header to define __stub macros and hopefully few prototypes,
20951     which can conflict with char mdbm_set_chain(); below.  */
20952 #include <assert.h>
20953 /* Override any gcc2 internal prototype to avoid an error.  */
20954 /* We use char because int might match the return type of a gcc2
20955     builtin and then its argument prototype would still apply.  */
20956 char mdbm_set_chain();
20957 char (*f)();
20958
20959 int main() {
20960
20961 /* The GNU C library defines this for functions which it implements
20962     to always fail with ENOSYS.  Some functions are actually named
20963     something starting with __ and the normal name is an alias.  */
20964 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20965 choke me
20966 #else
20967 f = mdbm_set_chain;
20968 #endif
20969
20970 ; return 0; }
20971 EOF
20972 if { (eval echo configure:20973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20973   rm -rf conftest*
20974   eval "ac_cv_func_mdbm_set_chain=yes"
20975 else
20976   echo "configure: failed program was:" >&5
20977   cat conftest.$ac_ext >&5
20978   rm -rf conftest*
20979   eval "ac_cv_func_mdbm_set_chain=no"
20980 fi
20981 rm -f conftest*
20982 fi
20983
20984 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20985   echo "$ac_t""yes" 1>&6
20986   ol_cv_lib_mdbm=yes
20987 else
20988   echo "$ac_t""no" 1>&6
20989
20990                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20991 echo "configure:20992: checking for mdbm_set_chain in -lmdbm" >&5
20992 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20994   echo $ac_n "(cached) $ac_c" 1>&6
20995 else
20996   ac_save_LIBS="$LIBS"
20997 LIBS="-lmdbm  $LIBS"
20998 cat > conftest.$ac_ext <<EOF
20999 #line 21000 "configure"
21000 #include "confdefs.h"
21001 /* Override any gcc2 internal prototype to avoid an error.  */
21002 /* We use char because int might match the return type of a gcc2
21003     builtin and then its argument prototype would still apply.  */
21004 char mdbm_set_chain();
21005
21006 int main() {
21007 mdbm_set_chain()
21008 ; return 0; }
21009 EOF
21010 if { (eval echo configure:21011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21011   rm -rf conftest*
21012   eval "ac_cv_lib_$ac_lib_var=yes"
21013 else
21014   echo "configure: failed program was:" >&5
21015   cat conftest.$ac_ext >&5
21016   rm -rf conftest*
21017   eval "ac_cv_lib_$ac_lib_var=no"
21018 fi
21019 rm -f conftest*
21020 LIBS="$ac_save_LIBS"
21021
21022 fi
21023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21024   echo "$ac_t""yes" 1>&6
21025   ol_cv_lib_mdbm=-lmdbm
21026 else
21027   echo "$ac_t""no" 1>&6
21028 ol_cv_lib_mdbm=no
21029 fi
21030
21031         
21032 fi
21033
21034         LIBS="$ol_LIBS"
21035
21036 fi
21037
21038 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21039
21040
21041  for ac_hdr in mdbm.h
21042 do
21043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21045 echo "configure:21046: checking for $ac_hdr" >&5
21046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21047   echo $ac_n "(cached) $ac_c" 1>&6
21048 else
21049   cat > conftest.$ac_ext <<EOF
21050 #line 21051 "configure"
21051 #include "confdefs.h"
21052 #include <$ac_hdr>
21053 EOF
21054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21055 { (eval echo configure:21056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21057 if test -z "$ac_err"; then
21058   rm -rf conftest*
21059   eval "ac_cv_header_$ac_safe=yes"
21060 else
21061   echo "$ac_err" >&5
21062   echo "configure: failed program was:" >&5
21063   cat conftest.$ac_ext >&5
21064   rm -rf conftest*
21065   eval "ac_cv_header_$ac_safe=no"
21066 fi
21067 rm -f conftest*
21068 fi
21069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21070   echo "$ac_t""yes" 1>&6
21071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21072   cat >> confdefs.h <<EOF
21073 #define $ac_tr_hdr 1
21074 EOF
21075  
21076 else
21077   echo "$ac_t""no" 1>&6
21078 fi
21079 done
21080
21081  echo $ac_n "checking for db""... $ac_c" 1>&6
21082 echo "configure:21083: checking for db" >&5
21083 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21084   echo $ac_n "(cached) $ac_c" 1>&6
21085 else
21086   
21087         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21088                 ol_cv_mdbm=no
21089         else
21090                 ol_cv_mdbm=yes
21091         fi
21092
21093 fi
21094
21095 echo "$ac_t""$ol_cv_mdbm" 1>&6
21096  if test $ol_cv_mdbm = yes ; then
21097         cat >> confdefs.h <<\EOF
21098 #define HAVE_MDBM 1
21099 EOF
21100
21101  fi
21102
21103
21104         if test $ol_cv_mdbm = yes ; then
21105                 ol_link_ldbm=mdbm
21106                 ol_with_ldbm_api=mdbm
21107                 if test $ol_cv_lib_mdbm != yes ; then
21108                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21109                 fi
21110         fi
21111 fi
21112
21113 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21114         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21115 echo "configure:21116: checking for GDBM library" >&5
21116 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21117   echo $ac_n "(cached) $ac_c" 1>&6
21118 else
21119         ol_LIBS="$LIBS"
21120         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21121 echo "configure:21122: checking for gdbm_open" >&5
21122 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21123   echo $ac_n "(cached) $ac_c" 1>&6
21124 else
21125   cat > conftest.$ac_ext <<EOF
21126 #line 21127 "configure"
21127 #include "confdefs.h"
21128 /* System header to define __stub macros and hopefully few prototypes,
21129     which can conflict with char gdbm_open(); below.  */
21130 #include <assert.h>
21131 /* Override any gcc2 internal prototype to avoid an error.  */
21132 /* We use char because int might match the return type of a gcc2
21133     builtin and then its argument prototype would still apply.  */
21134 char gdbm_open();
21135 char (*f)();
21136
21137 int main() {
21138
21139 /* The GNU C library defines this for functions which it implements
21140     to always fail with ENOSYS.  Some functions are actually named
21141     something starting with __ and the normal name is an alias.  */
21142 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21143 choke me
21144 #else
21145 f = gdbm_open;
21146 #endif
21147
21148 ; return 0; }
21149 EOF
21150 if { (eval echo configure:21151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21151   rm -rf conftest*
21152   eval "ac_cv_func_gdbm_open=yes"
21153 else
21154   echo "configure: failed program was:" >&5
21155   cat conftest.$ac_ext >&5
21156   rm -rf conftest*
21157   eval "ac_cv_func_gdbm_open=no"
21158 fi
21159 rm -f conftest*
21160 fi
21161
21162 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21163   echo "$ac_t""yes" 1>&6
21164   ol_cv_lib_gdbm=yes
21165 else
21166   echo "$ac_t""no" 1>&6
21167
21168                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21169 echo "configure:21170: checking for gdbm_open in -lgdbm" >&5
21170 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21172   echo $ac_n "(cached) $ac_c" 1>&6
21173 else
21174   ac_save_LIBS="$LIBS"
21175 LIBS="-lgdbm  $LIBS"
21176 cat > conftest.$ac_ext <<EOF
21177 #line 21178 "configure"
21178 #include "confdefs.h"
21179 /* Override any gcc2 internal prototype to avoid an error.  */
21180 /* We use char because int might match the return type of a gcc2
21181     builtin and then its argument prototype would still apply.  */
21182 char gdbm_open();
21183
21184 int main() {
21185 gdbm_open()
21186 ; return 0; }
21187 EOF
21188 if { (eval echo configure:21189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21189   rm -rf conftest*
21190   eval "ac_cv_lib_$ac_lib_var=yes"
21191 else
21192   echo "configure: failed program was:" >&5
21193   cat conftest.$ac_ext >&5
21194   rm -rf conftest*
21195   eval "ac_cv_lib_$ac_lib_var=no"
21196 fi
21197 rm -f conftest*
21198 LIBS="$ac_save_LIBS"
21199
21200 fi
21201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21202   echo "$ac_t""yes" 1>&6
21203   ol_cv_lib_gdbm=-lgdbm
21204 else
21205   echo "$ac_t""no" 1>&6
21206 ol_cv_lib_gdbm=no
21207 fi
21208
21209         
21210 fi
21211
21212         LIBS="$ol_LIBS"
21213
21214 fi
21215
21216 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21217
21218
21219  for ac_hdr in gdbm.h
21220 do
21221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21223 echo "configure:21224: checking for $ac_hdr" >&5
21224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21225   echo $ac_n "(cached) $ac_c" 1>&6
21226 else
21227   cat > conftest.$ac_ext <<EOF
21228 #line 21229 "configure"
21229 #include "confdefs.h"
21230 #include <$ac_hdr>
21231 EOF
21232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21233 { (eval echo configure:21234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21235 if test -z "$ac_err"; then
21236   rm -rf conftest*
21237   eval "ac_cv_header_$ac_safe=yes"
21238 else
21239   echo "$ac_err" >&5
21240   echo "configure: failed program was:" >&5
21241   cat conftest.$ac_ext >&5
21242   rm -rf conftest*
21243   eval "ac_cv_header_$ac_safe=no"
21244 fi
21245 rm -f conftest*
21246 fi
21247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21248   echo "$ac_t""yes" 1>&6
21249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21250   cat >> confdefs.h <<EOF
21251 #define $ac_tr_hdr 1
21252 EOF
21253  
21254 else
21255   echo "$ac_t""no" 1>&6
21256 fi
21257 done
21258
21259  echo $ac_n "checking for db""... $ac_c" 1>&6
21260 echo "configure:21261: checking for db" >&5
21261 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21262   echo $ac_n "(cached) $ac_c" 1>&6
21263 else
21264   
21265         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21266                 ol_cv_gdbm=no
21267         else
21268                 ol_cv_gdbm=yes
21269         fi
21270
21271 fi
21272
21273 echo "$ac_t""$ol_cv_gdbm" 1>&6
21274  if test $ol_cv_gdbm = yes ; then
21275         cat >> confdefs.h <<\EOF
21276 #define HAVE_GDBM 1
21277 EOF
21278
21279  fi
21280
21281
21282         if test $ol_cv_gdbm = yes ; then
21283                 ol_link_ldbm=gdbm
21284                 ol_with_ldbm_api=gdbm
21285
21286                 if test $ol_cv_lib_gdbm != yes ; then
21287                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21288                 fi
21289         fi
21290 fi
21291
21292 if test $ol_with_ldbm_api = ndbm ; then
21293         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21294 echo "configure:21295: checking for NDBM library" >&5
21295 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21296   echo $ac_n "(cached) $ac_c" 1>&6
21297 else
21298         ol_LIBS="$LIBS"
21299         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21300 echo "configure:21301: checking for dbm_open" >&5
21301 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21302   echo $ac_n "(cached) $ac_c" 1>&6
21303 else
21304   cat > conftest.$ac_ext <<EOF
21305 #line 21306 "configure"
21306 #include "confdefs.h"
21307 /* System header to define __stub macros and hopefully few prototypes,
21308     which can conflict with char dbm_open(); below.  */
21309 #include <assert.h>
21310 /* Override any gcc2 internal prototype to avoid an error.  */
21311 /* We use char because int might match the return type of a gcc2
21312     builtin and then its argument prototype would still apply.  */
21313 char dbm_open();
21314 char (*f)();
21315
21316 int main() {
21317
21318 /* The GNU C library defines this for functions which it implements
21319     to always fail with ENOSYS.  Some functions are actually named
21320     something starting with __ and the normal name is an alias.  */
21321 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21322 choke me
21323 #else
21324 f = dbm_open;
21325 #endif
21326
21327 ; return 0; }
21328 EOF
21329 if { (eval echo configure:21330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21330   rm -rf conftest*
21331   eval "ac_cv_func_dbm_open=yes"
21332 else
21333   echo "configure: failed program was:" >&5
21334   cat conftest.$ac_ext >&5
21335   rm -rf conftest*
21336   eval "ac_cv_func_dbm_open=no"
21337 fi
21338 rm -f conftest*
21339 fi
21340
21341 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21342   echo "$ac_t""yes" 1>&6
21343   ol_cv_lib_ndbm=yes
21344 else
21345   echo "$ac_t""no" 1>&6
21346
21347                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21348 echo "configure:21349: checking for dbm_open in -lndbm" >&5
21349 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21351   echo $ac_n "(cached) $ac_c" 1>&6
21352 else
21353   ac_save_LIBS="$LIBS"
21354 LIBS="-lndbm  $LIBS"
21355 cat > conftest.$ac_ext <<EOF
21356 #line 21357 "configure"
21357 #include "confdefs.h"
21358 /* Override any gcc2 internal prototype to avoid an error.  */
21359 /* We use char because int might match the return type of a gcc2
21360     builtin and then its argument prototype would still apply.  */
21361 char dbm_open();
21362
21363 int main() {
21364 dbm_open()
21365 ; return 0; }
21366 EOF
21367 if { (eval echo configure:21368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21368   rm -rf conftest*
21369   eval "ac_cv_lib_$ac_lib_var=yes"
21370 else
21371   echo "configure: failed program was:" >&5
21372   cat conftest.$ac_ext >&5
21373   rm -rf conftest*
21374   eval "ac_cv_lib_$ac_lib_var=no"
21375 fi
21376 rm -f conftest*
21377 LIBS="$ac_save_LIBS"
21378
21379 fi
21380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21381   echo "$ac_t""yes" 1>&6
21382   ol_cv_lib_ndbm=-lndbm
21383 else
21384   echo "$ac_t""no" 1>&6
21385
21386                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21387 echo "configure:21388: checking for dbm_open in -ldbm" >&5
21388 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21390   echo $ac_n "(cached) $ac_c" 1>&6
21391 else
21392   ac_save_LIBS="$LIBS"
21393 LIBS="-ldbm  $LIBS"
21394 cat > conftest.$ac_ext <<EOF
21395 #line 21396 "configure"
21396 #include "confdefs.h"
21397 /* Override any gcc2 internal prototype to avoid an error.  */
21398 /* We use char because int might match the return type of a gcc2
21399     builtin and then its argument prototype would still apply.  */
21400 char dbm_open();
21401
21402 int main() {
21403 dbm_open()
21404 ; return 0; }
21405 EOF
21406 if { (eval echo configure:21407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21407   rm -rf conftest*
21408   eval "ac_cv_lib_$ac_lib_var=yes"
21409 else
21410   echo "configure: failed program was:" >&5
21411   cat conftest.$ac_ext >&5
21412   rm -rf conftest*
21413   eval "ac_cv_lib_$ac_lib_var=no"
21414 fi
21415 rm -f conftest*
21416 LIBS="$ac_save_LIBS"
21417
21418 fi
21419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21420   echo "$ac_t""yes" 1>&6
21421   ol_cv_lib_ndbm=-ldbm
21422 else
21423   echo "$ac_t""no" 1>&6
21424 ol_cv_lib_ndbm=no
21425 fi
21426                 
21427 fi
21428
21429         
21430 fi
21431
21432         LIBS="$ol_LIBS"
21433
21434 fi
21435
21436 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21437
21438
21439  for ac_hdr in ndbm.h
21440 do
21441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21443 echo "configure:21444: checking for $ac_hdr" >&5
21444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21445   echo $ac_n "(cached) $ac_c" 1>&6
21446 else
21447   cat > conftest.$ac_ext <<EOF
21448 #line 21449 "configure"
21449 #include "confdefs.h"
21450 #include <$ac_hdr>
21451 EOF
21452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21453 { (eval echo configure:21454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21455 if test -z "$ac_err"; then
21456   rm -rf conftest*
21457   eval "ac_cv_header_$ac_safe=yes"
21458 else
21459   echo "$ac_err" >&5
21460   echo "configure: failed program was:" >&5
21461   cat conftest.$ac_ext >&5
21462   rm -rf conftest*
21463   eval "ac_cv_header_$ac_safe=no"
21464 fi
21465 rm -f conftest*
21466 fi
21467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21468   echo "$ac_t""yes" 1>&6
21469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21470   cat >> confdefs.h <<EOF
21471 #define $ac_tr_hdr 1
21472 EOF
21473  
21474 else
21475   echo "$ac_t""no" 1>&6
21476 fi
21477 done
21478
21479  echo $ac_n "checking for db""... $ac_c" 1>&6
21480 echo "configure:21481: checking for db" >&5
21481 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21482   echo $ac_n "(cached) $ac_c" 1>&6
21483 else
21484   
21485         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21486                 ol_cv_ndbm=no
21487         else
21488                 ol_cv_ndbm=yes
21489         fi
21490
21491 fi
21492
21493 echo "$ac_t""$ol_cv_ndbm" 1>&6
21494  if test $ol_cv_ndbm = yes ; then
21495         cat >> confdefs.h <<\EOF
21496 #define HAVE_NDBM 1
21497 EOF
21498
21499  fi
21500
21501
21502         if test $ol_cv_ndbm = yes ; then
21503                 ol_link_ldbm=ndbm
21504                 ol_with_ldbm_api=ndbm
21505
21506                 if test $ol_cv_lib_ndbm != yes ; then
21507                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21508                 fi
21509         fi
21510 fi
21511
21512 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21513         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21514 fi
21515
21516 if test $ol_enable_bdb = yes -o \
21517         $ol_enable_hdb = yes -o \
21518         $ol_enable_ldbm = yes ; then
21519         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21520 fi
21521
21522
21523 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21524         BUILD_LIBS_DYNAMIC=shared
21525         cat >> confdefs.h <<\EOF
21526 #define LDAP_LIBS_DYNAMIC 1
21527 EOF
21528
21529         LTSTATIC=""
21530 else
21531         BUILD_LIBS_DYNAMIC=static
21532         LTSTATIC="-static"
21533 fi
21534
21535 if test $ol_enable_wrappers != no ; then
21536         for ac_hdr in tcpd.h
21537 do
21538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21540 echo "configure:21541: checking for $ac_hdr" >&5
21541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21542   echo $ac_n "(cached) $ac_c" 1>&6
21543 else
21544   cat > conftest.$ac_ext <<EOF
21545 #line 21546 "configure"
21546 #include "confdefs.h"
21547 #include <$ac_hdr>
21548 EOF
21549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21550 { (eval echo configure:21551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21552 if test -z "$ac_err"; then
21553   rm -rf conftest*
21554   eval "ac_cv_header_$ac_safe=yes"
21555 else
21556   echo "$ac_err" >&5
21557   echo "configure: failed program was:" >&5
21558   cat conftest.$ac_ext >&5
21559   rm -rf conftest*
21560   eval "ac_cv_header_$ac_safe=no"
21561 fi
21562 rm -f conftest*
21563 fi
21564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21565   echo "$ac_t""yes" 1>&6
21566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21567   cat >> confdefs.h <<EOF
21568 #define $ac_tr_hdr 1
21569 EOF
21570  
21571                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21572 echo "configure:21573: checking for TCP wrappers library" >&5
21573                 save_LIBS="$LIBS"
21574                 LIBS="$LIBS -lwrap"
21575                 cat > conftest.$ac_ext <<EOF
21576 #line 21577 "configure"
21577 #include "confdefs.h"
21578
21579 #include <tcpd.h>
21580 int allow_severity = 0;
21581 int deny_severity  = 0;
21582
21583 struct request_info *req;
21584                 
21585 int main() {
21586
21587 hosts_access(req)
21588                 
21589 ; return 0; }
21590 EOF
21591 if { (eval echo configure:21592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21592   rm -rf conftest*
21593   echo "$ac_t""-lwrap" 1>&6
21594                 have_wrappers=yes
21595                 LIBS="$save_LIBS"
21596 else
21597   echo "configure: failed program was:" >&5
21598   cat conftest.$ac_ext >&5
21599   rm -rf conftest*
21600   
21601                                 LIBS="$LIBS -lnsl"
21602                 cat > conftest.$ac_ext <<EOF
21603 #line 21604 "configure"
21604 #include "confdefs.h"
21605
21606 #include <tcpd.h>
21607 int allow_severity = 0;
21608 int deny_severity  = 0;
21609
21610 struct request_info *req;
21611                 
21612 int main() {
21613
21614 hosts_access(req)
21615                 
21616 ; return 0; }
21617 EOF
21618 if { (eval echo configure:21619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21619   rm -rf conftest*
21620   echo "$ac_t""-lwrap -lnsl" 1>&6
21621                 have_wrappers=yes
21622                 LIBS="$save_LIBS -lnsl"
21623 else
21624   echo "configure: failed program was:" >&5
21625   cat conftest.$ac_ext >&5
21626   rm -rf conftest*
21627   
21628                 echo "$ac_t""no" 1>&6
21629                 have_wrappers=no
21630                 LIBS=$save_LIBS
21631 fi
21632 rm -f conftest*
21633 fi
21634 rm -f conftest*
21635 else
21636   echo "$ac_t""no" 1>&6
21637 have_wrappers=no
21638 fi
21639 done
21640
21641
21642         if test $have_wrappers = yes ; then
21643                 cat >> confdefs.h <<\EOF
21644 #define HAVE_TCPD 1
21645 EOF
21646
21647                 WRAP_LIBS="-lwrap"
21648         elif test $ol_enable_wrappers = yes ; then
21649                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21650         else
21651                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21652                 WRAP_LIBS=""
21653         fi
21654 fi
21655
21656 if test $ol_enable_syslog != no ; then
21657         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21658 echo "configure:21659: checking for openlog" >&5
21659 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21660   echo $ac_n "(cached) $ac_c" 1>&6
21661 else
21662   cat > conftest.$ac_ext <<EOF
21663 #line 21664 "configure"
21664 #include "confdefs.h"
21665 /* System header to define __stub macros and hopefully few prototypes,
21666     which can conflict with char openlog(); below.  */
21667 #include <assert.h>
21668 /* Override any gcc2 internal prototype to avoid an error.  */
21669 /* We use char because int might match the return type of a gcc2
21670     builtin and then its argument prototype would still apply.  */
21671 char openlog();
21672 char (*f)();
21673
21674 int main() {
21675
21676 /* The GNU C library defines this for functions which it implements
21677     to always fail with ENOSYS.  Some functions are actually named
21678     something starting with __ and the normal name is an alias.  */
21679 #if defined (__stub_openlog) || defined (__stub___openlog)
21680 choke me
21681 #else
21682 f = openlog;
21683 #endif
21684
21685 ; return 0; }
21686 EOF
21687 if { (eval echo configure:21688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21688   rm -rf conftest*
21689   eval "ac_cv_func_openlog=yes"
21690 else
21691   echo "configure: failed program was:" >&5
21692   cat conftest.$ac_ext >&5
21693   rm -rf conftest*
21694   eval "ac_cv_func_openlog=no"
21695 fi
21696 rm -f conftest*
21697 fi
21698
21699 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21700   echo "$ac_t""yes" 1>&6
21701   :
21702 else
21703   echo "$ac_t""no" 1>&6
21704 fi
21705
21706         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21707                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21708         fi
21709         ol_enable_syslog=$ac_cv_func_openlog
21710 fi
21711
21712
21713 ol_link_sql=no
21714 if test $ol_enable_sql != no ; then
21715         for ac_hdr in sql.h sqlext.h
21716 do
21717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21719 echo "configure:21720: checking for $ac_hdr" >&5
21720 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21721   echo $ac_n "(cached) $ac_c" 1>&6
21722 else
21723   cat > conftest.$ac_ext <<EOF
21724 #line 21725 "configure"
21725 #include "confdefs.h"
21726 #include <$ac_hdr>
21727 EOF
21728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21729 { (eval echo configure:21730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21731 if test -z "$ac_err"; then
21732   rm -rf conftest*
21733   eval "ac_cv_header_$ac_safe=yes"
21734 else
21735   echo "$ac_err" >&5
21736   echo "configure: failed program was:" >&5
21737   cat conftest.$ac_ext >&5
21738   rm -rf conftest*
21739   eval "ac_cv_header_$ac_safe=no"
21740 fi
21741 rm -f conftest*
21742 fi
21743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21744   echo "$ac_t""yes" 1>&6
21745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21746   cat >> confdefs.h <<EOF
21747 #define $ac_tr_hdr 1
21748 EOF
21749  
21750 else
21751   echo "$ac_t""no" 1>&6
21752 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21753         
21754 fi
21755 done
21756
21757
21758         sql_LIBS="$LIBS"
21759         LIBS="$LTHREAD_LIBS"
21760
21761         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21762 echo "configure:21763: checking for SQLDriverConnect in -liodbc" >&5
21763 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21764 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21765   echo $ac_n "(cached) $ac_c" 1>&6
21766 else
21767   ac_save_LIBS="$LIBS"
21768 LIBS="-liodbc  $LIBS"
21769 cat > conftest.$ac_ext <<EOF
21770 #line 21771 "configure"
21771 #include "confdefs.h"
21772 /* Override any gcc2 internal prototype to avoid an error.  */
21773 /* We use char because int might match the return type of a gcc2
21774     builtin and then its argument prototype would still apply.  */
21775 char SQLDriverConnect();
21776
21777 int main() {
21778 SQLDriverConnect()
21779 ; return 0; }
21780 EOF
21781 if { (eval echo configure:21782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21782   rm -rf conftest*
21783   eval "ac_cv_lib_$ac_lib_var=yes"
21784 else
21785   echo "configure: failed program was:" >&5
21786   cat conftest.$ac_ext >&5
21787   rm -rf conftest*
21788   eval "ac_cv_lib_$ac_lib_var=no"
21789 fi
21790 rm -f conftest*
21791 LIBS="$ac_save_LIBS"
21792
21793 fi
21794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21795   echo "$ac_t""yes" 1>&6
21796   have_iodbc=yes
21797 else
21798   echo "$ac_t""no" 1>&6
21799 have_iodbc=no
21800 fi
21801
21802         if test $have_iodbc = yes ; then
21803                 ol_link_sql="-liodbc"
21804         else
21805                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21806 echo "configure:21807: checking for SQLDriverConnect in -lodbc" >&5
21807 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21809   echo $ac_n "(cached) $ac_c" 1>&6
21810 else
21811   ac_save_LIBS="$LIBS"
21812 LIBS="-lodbc  $LIBS"
21813 cat > conftest.$ac_ext <<EOF
21814 #line 21815 "configure"
21815 #include "confdefs.h"
21816 /* Override any gcc2 internal prototype to avoid an error.  */
21817 /* We use char because int might match the return type of a gcc2
21818     builtin and then its argument prototype would still apply.  */
21819 char SQLDriverConnect();
21820
21821 int main() {
21822 SQLDriverConnect()
21823 ; return 0; }
21824 EOF
21825 if { (eval echo configure:21826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21826   rm -rf conftest*
21827   eval "ac_cv_lib_$ac_lib_var=yes"
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831   rm -rf conftest*
21832   eval "ac_cv_lib_$ac_lib_var=no"
21833 fi
21834 rm -f conftest*
21835 LIBS="$ac_save_LIBS"
21836
21837 fi
21838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21839   echo "$ac_t""yes" 1>&6
21840   have_odbc=yes
21841 else
21842   echo "$ac_t""no" 1>&6
21843 have_odbc=no
21844 fi
21845
21846                 if test $have_odbc = yes ; then
21847                         ol_link_sql="-lodbc"
21848                 fi
21849         fi
21850
21851         LIBS="$sql_LIBS"
21852
21853         if test $ol_link_sql != no ; then
21854                 SLAPD_SQL_LIBS="$ol_link_sql"
21855
21856         elif test $ol_enable_sql != auto ; then
21857                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21858         fi
21859 fi
21860
21861 WITH_SASL=no
21862 ol_link_sasl=no
21863 ol_link_spasswd=no
21864 if test $ol_with_cyrus_sasl != no ; then
21865         for ac_hdr in sasl/sasl.h sasl.h
21866 do
21867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21869 echo "configure:21870: checking for $ac_hdr" >&5
21870 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21871   echo $ac_n "(cached) $ac_c" 1>&6
21872 else
21873   cat > conftest.$ac_ext <<EOF
21874 #line 21875 "configure"
21875 #include "confdefs.h"
21876 #include <$ac_hdr>
21877 EOF
21878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21879 { (eval echo configure:21880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21881 if test -z "$ac_err"; then
21882   rm -rf conftest*
21883   eval "ac_cv_header_$ac_safe=yes"
21884 else
21885   echo "$ac_err" >&5
21886   echo "configure: failed program was:" >&5
21887   cat conftest.$ac_ext >&5
21888   rm -rf conftest*
21889   eval "ac_cv_header_$ac_safe=no"
21890 fi
21891 rm -f conftest*
21892 fi
21893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21894   echo "$ac_t""yes" 1>&6
21895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21896   cat >> confdefs.h <<EOF
21897 #define $ac_tr_hdr 1
21898 EOF
21899  
21900 else
21901   echo "$ac_t""no" 1>&6
21902 fi
21903 done
21904
21905
21906         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21907                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21908 echo "configure:21909: checking for sasl_client_init in -lsasl2" >&5
21909 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21911   echo $ac_n "(cached) $ac_c" 1>&6
21912 else
21913   ac_save_LIBS="$LIBS"
21914 LIBS="-lsasl2  $LIBS"
21915 cat > conftest.$ac_ext <<EOF
21916 #line 21917 "configure"
21917 #include "confdefs.h"
21918 /* Override any gcc2 internal prototype to avoid an error.  */
21919 /* We use char because int might match the return type of a gcc2
21920     builtin and then its argument prototype would still apply.  */
21921 char sasl_client_init();
21922
21923 int main() {
21924 sasl_client_init()
21925 ; return 0; }
21926 EOF
21927 if { (eval echo configure:21928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21928   rm -rf conftest*
21929   eval "ac_cv_lib_$ac_lib_var=yes"
21930 else
21931   echo "configure: failed program was:" >&5
21932   cat conftest.$ac_ext >&5
21933   rm -rf conftest*
21934   eval "ac_cv_lib_$ac_lib_var=no"
21935 fi
21936 rm -f conftest*
21937 LIBS="$ac_save_LIBS"
21938
21939 fi
21940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21941   echo "$ac_t""yes" 1>&6
21942   ol_link_sasl="-lsasl2"
21943 else
21944   echo "$ac_t""no" 1>&6
21945 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21946 echo "configure:21947: checking for sasl_client_init in -lsasl" >&5
21947 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21948 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21949   echo $ac_n "(cached) $ac_c" 1>&6
21950 else
21951   ac_save_LIBS="$LIBS"
21952 LIBS="-lsasl  $LIBS"
21953 cat > conftest.$ac_ext <<EOF
21954 #line 21955 "configure"
21955 #include "confdefs.h"
21956 /* Override any gcc2 internal prototype to avoid an error.  */
21957 /* We use char because int might match the return type of a gcc2
21958     builtin and then its argument prototype would still apply.  */
21959 char sasl_client_init();
21960
21961 int main() {
21962 sasl_client_init()
21963 ; return 0; }
21964 EOF
21965 if { (eval echo configure:21966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21966   rm -rf conftest*
21967   eval "ac_cv_lib_$ac_lib_var=yes"
21968 else
21969   echo "configure: failed program was:" >&5
21970   cat conftest.$ac_ext >&5
21971   rm -rf conftest*
21972   eval "ac_cv_lib_$ac_lib_var=no"
21973 fi
21974 rm -f conftest*
21975 LIBS="$ac_save_LIBS"
21976
21977 fi
21978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21979   echo "$ac_t""yes" 1>&6
21980   ol_link_sasl="-lsasl"
21981 else
21982   echo "$ac_t""no" 1>&6
21983 fi
21984
21985 fi
21986
21987         fi
21988
21989         if test $ol_link_sasl = no ; then
21990                 if test $ol_with_cyrus_sasl != auto ; then
21991                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21992                 else
21993                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21994                         echo "configure: warning: SASL authentication not supported!" 1>&2
21995                         if test $ol_link_tls = no ; then
21996                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21997                         fi
21998                 fi
21999         else
22000                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22001 echo "configure:22002: checking Cyrus SASL library version" >&5
22002 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22003   echo $ac_n "(cached) $ac_c" 1>&6
22004 else
22005   
22006         cat > conftest.$ac_ext <<EOF
22007 #line 22008 "configure"
22008 #include "confdefs.h"
22009
22010 #ifdef HAVE_SASL_SASL_H
22011 #include <sasl/sasl.h>
22012 #else
22013 #include <sasl.h>
22014 #endif
22015
22016 /* Require 2.1.15+ */
22017 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22018         char *__sasl_compat = "2.2+ or better okay (we guess)";
22019 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22020         && SASL_VERSION_STEP >=15
22021         char *__sasl_compat = "2.1.15+ or better okay";
22022 #endif
22023         
22024 EOF
22025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22026   egrep "__sasl_compat" >/dev/null 2>&1; then
22027   rm -rf conftest*
22028   ol_cv_sasl_compat=yes
22029 else
22030   rm -rf conftest*
22031   ol_cv_sasl_compat=no
22032 fi
22033 rm -f conftest*
22034
22035 fi
22036
22037 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22038
22039                 if test $ol_cv_sasl_compat = no ; then
22040                         ol_link_sasl=no
22041                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22042                 fi
22043
22044                 cat >> confdefs.h <<\EOF
22045 #define HAVE_CYRUS_SASL 1
22046 EOF
22047
22048                 SASL_LIBS="$ol_link_sasl"
22049                 if test $ol_enable_spasswd != no ; then
22050                         ol_link_spasswd=yes
22051                 fi
22052
22053                 ac_save_LIBS="$LIBS"
22054                 LIBS="$LIBS $ol_link_sasl"
22055                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22056 echo "configure:22057: checking for sasl_version" >&5
22057 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22058   echo $ac_n "(cached) $ac_c" 1>&6
22059 else
22060   cat > conftest.$ac_ext <<EOF
22061 #line 22062 "configure"
22062 #include "confdefs.h"
22063 /* System header to define __stub macros and hopefully few prototypes,
22064     which can conflict with char sasl_version(); below.  */
22065 #include <assert.h>
22066 /* Override any gcc2 internal prototype to avoid an error.  */
22067 /* We use char because int might match the return type of a gcc2
22068     builtin and then its argument prototype would still apply.  */
22069 char sasl_version();
22070 char (*f)();
22071
22072 int main() {
22073
22074 /* The GNU C library defines this for functions which it implements
22075     to always fail with ENOSYS.  Some functions are actually named
22076     something starting with __ and the normal name is an alias.  */
22077 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22078 choke me
22079 #else
22080 f = sasl_version;
22081 #endif
22082
22083 ; return 0; }
22084 EOF
22085 if { (eval echo configure:22086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22086   rm -rf conftest*
22087   eval "ac_cv_func_sasl_version=yes"
22088 else
22089   echo "configure: failed program was:" >&5
22090   cat conftest.$ac_ext >&5
22091   rm -rf conftest*
22092   eval "ac_cv_func_sasl_version=no"
22093 fi
22094 rm -f conftest*
22095 fi
22096
22097 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22098   echo "$ac_t""yes" 1>&6
22099   cat >> confdefs.h <<\EOF
22100 #define HAVE_SASL_VERSION 1
22101 EOF
22102
22103 else
22104   echo "$ac_t""no" 1>&6
22105 fi
22106
22107                 LIBS="$ac_save_LIBS"
22108
22109                 WITH_SASL=yes
22110         fi
22111
22112 else
22113         echo "configure: warning: SASL authentication not supported!" 1>&2
22114         if test $ol_link_tls = no ; then
22115                 echo "configure: warning: Strong authentication not supported!" 1>&2
22116         fi
22117 fi
22118
22119 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22120         dev=no
22121         if test -r /dev/urandom ; then
22122                 dev="/dev/urandom";
22123         elif test -r /idev/urandom ; then
22124                 dev="/idev/urandom";
22125         elif test -r /dev/srandom ; then
22126                 dev="/dev/srandom";
22127         elif test -r /dev/random ; then
22128                 dev="/dev/random";
22129         elif test -r /idev/random ; then
22130                 dev="/idev/random";
22131         fi
22132
22133         if test $dev != no ; then
22134                 cat >> confdefs.h <<EOF
22135 #define URANDOM_DEVICE "$dev"
22136 EOF
22137
22138         fi
22139 fi
22140
22141 ol_link_fetch=no
22142 if test $ol_with_fetch != no ; then
22143         ol_LIBS=$LIBS
22144 LIBS="-lfetch -lcom_err $LIBS"
22145 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22146 echo "configure:22147: checking fetch(3) library" >&5
22147 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22148   echo $ac_n "(cached) $ac_c" 1>&6
22149 else
22150   
22151         cat > conftest.$ac_ext <<EOF
22152 #line 22153 "configure"
22153 #include "confdefs.h"
22154
22155 #include <sys/param.h>
22156 #include <stdio.h>
22157 #include <fetch.h>
22158 int main() {
22159 struct url *u = fetchParseURL("file:///"); 
22160 ; return 0; }
22161 EOF
22162 if { (eval echo configure:22163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22163   rm -rf conftest*
22164   ol_cv_lib_fetch=yes
22165 else
22166   echo "configure: failed program was:" >&5
22167   cat conftest.$ac_ext >&5
22168   rm -rf conftest*
22169   ol_cv_lib_fetch=no
22170 fi
22171 rm -f conftest*
22172 fi
22173
22174 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22175 LIBS=$ol_LIBS
22176 if test $ol_cv_lib_fetch != no ; then
22177         ol_link_fetch="-lfetch -lcom_err"
22178         cat >> confdefs.h <<\EOF
22179 #define HAVE_FETCH 1
22180 EOF
22181
22182 fi
22183
22184
22185         if test $ol_cv_lib_fetch != no ; then
22186                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22187                 ol_link_fetch=freebsd
22188
22189         elif test $ol_with_fetch != auto ; then
22190                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22191         fi 
22192 fi
22193
22194 if test $ol_enable_crypt != no ; then
22195         save_LIBS="$LIBS"
22196         LIBS="$TLS_LIBS $LIBS"
22197
22198         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22199 echo "configure:22200: checking for crypt" >&5
22200 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22201   echo $ac_n "(cached) $ac_c" 1>&6
22202 else
22203   cat > conftest.$ac_ext <<EOF
22204 #line 22205 "configure"
22205 #include "confdefs.h"
22206 /* System header to define __stub macros and hopefully few prototypes,
22207     which can conflict with char crypt(); below.  */
22208 #include <assert.h>
22209 /* Override any gcc2 internal prototype to avoid an error.  */
22210 /* We use char because int might match the return type of a gcc2
22211     builtin and then its argument prototype would still apply.  */
22212 char crypt();
22213 char (*f)();
22214
22215 int main() {
22216
22217 /* The GNU C library defines this for functions which it implements
22218     to always fail with ENOSYS.  Some functions are actually named
22219     something starting with __ and the normal name is an alias.  */
22220 #if defined (__stub_crypt) || defined (__stub___crypt)
22221 choke me
22222 #else
22223 f = crypt;
22224 #endif
22225
22226 ; return 0; }
22227 EOF
22228 if { (eval echo configure:22229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22229   rm -rf conftest*
22230   eval "ac_cv_func_crypt=yes"
22231 else
22232   echo "configure: failed program was:" >&5
22233   cat conftest.$ac_ext >&5
22234   rm -rf conftest*
22235   eval "ac_cv_func_crypt=no"
22236 fi
22237 rm -f conftest*
22238 fi
22239
22240 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22241   echo "$ac_t""yes" 1>&6
22242   have_crypt=yes
22243 else
22244   echo "$ac_t""no" 1>&6
22245
22246                 LIBS="$save_LIBS"
22247                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22248 echo "configure:22249: checking for crypt in -lcrypt" >&5
22249 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22251   echo $ac_n "(cached) $ac_c" 1>&6
22252 else
22253   ac_save_LIBS="$LIBS"
22254 LIBS="-lcrypt  $LIBS"
22255 cat > conftest.$ac_ext <<EOF
22256 #line 22257 "configure"
22257 #include "confdefs.h"
22258 /* Override any gcc2 internal prototype to avoid an error.  */
22259 /* We use char because int might match the return type of a gcc2
22260     builtin and then its argument prototype would still apply.  */
22261 char crypt();
22262
22263 int main() {
22264 crypt()
22265 ; return 0; }
22266 EOF
22267 if { (eval echo configure:22268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22268   rm -rf conftest*
22269   eval "ac_cv_lib_$ac_lib_var=yes"
22270 else
22271   echo "configure: failed program was:" >&5
22272   cat conftest.$ac_ext >&5
22273   rm -rf conftest*
22274   eval "ac_cv_lib_$ac_lib_var=no"
22275 fi
22276 rm -f conftest*
22277 LIBS="$ac_save_LIBS"
22278
22279 fi
22280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22281   echo "$ac_t""yes" 1>&6
22282   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22283                         have_crypt=yes
22284 else
22285   echo "$ac_t""no" 1>&6
22286 have_crypt=no
22287 fi
22288
22289 fi
22290
22291
22292         LIBS="$save_LIBS"
22293
22294         if test $have_crypt = yes ; then
22295                 cat >> confdefs.h <<\EOF
22296 #define HAVE_CRYPT 1
22297 EOF
22298
22299         else
22300                 echo "configure: warning: could not find crypt" 1>&2
22301                 if test $ol_enable_crypt = yes ; then
22302                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22303                 fi
22304
22305                 echo "configure: warning: disabling crypt support" 1>&2
22306                 ol_enable_crypt=no
22307         fi
22308 fi
22309
22310 if test $ol_enable_proctitle != no ; then
22311         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22312 echo "configure:22313: checking for setproctitle" >&5
22313 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22314   echo $ac_n "(cached) $ac_c" 1>&6
22315 else
22316   cat > conftest.$ac_ext <<EOF
22317 #line 22318 "configure"
22318 #include "confdefs.h"
22319 /* System header to define __stub macros and hopefully few prototypes,
22320     which can conflict with char setproctitle(); below.  */
22321 #include <assert.h>
22322 /* Override any gcc2 internal prototype to avoid an error.  */
22323 /* We use char because int might match the return type of a gcc2
22324     builtin and then its argument prototype would still apply.  */
22325 char setproctitle();
22326 char (*f)();
22327
22328 int main() {
22329
22330 /* The GNU C library defines this for functions which it implements
22331     to always fail with ENOSYS.  Some functions are actually named
22332     something starting with __ and the normal name is an alias.  */
22333 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22334 choke me
22335 #else
22336 f = setproctitle;
22337 #endif
22338
22339 ; return 0; }
22340 EOF
22341 if { (eval echo configure:22342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22342   rm -rf conftest*
22343   eval "ac_cv_func_setproctitle=yes"
22344 else
22345   echo "configure: failed program was:" >&5
22346   cat conftest.$ac_ext >&5
22347   rm -rf conftest*
22348   eval "ac_cv_func_setproctitle=no"
22349 fi
22350 rm -f conftest*
22351 fi
22352
22353 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22354   echo "$ac_t""yes" 1>&6
22355   have_setproctitle=yes
22356 else
22357   echo "$ac_t""no" 1>&6
22358
22359                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22360 echo "configure:22361: checking for setproctitle in -lutil" >&5
22361 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22363   echo $ac_n "(cached) $ac_c" 1>&6
22364 else
22365   ac_save_LIBS="$LIBS"
22366 LIBS="-lutil  $LIBS"
22367 cat > conftest.$ac_ext <<EOF
22368 #line 22369 "configure"
22369 #include "confdefs.h"
22370 /* Override any gcc2 internal prototype to avoid an error.  */
22371 /* We use char because int might match the return type of a gcc2
22372     builtin and then its argument prototype would still apply.  */
22373 char setproctitle();
22374
22375 int main() {
22376 setproctitle()
22377 ; return 0; }
22378 EOF
22379 if { (eval echo configure:22380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22380   rm -rf conftest*
22381   eval "ac_cv_lib_$ac_lib_var=yes"
22382 else
22383   echo "configure: failed program was:" >&5
22384   cat conftest.$ac_ext >&5
22385   rm -rf conftest*
22386   eval "ac_cv_lib_$ac_lib_var=no"
22387 fi
22388 rm -f conftest*
22389 LIBS="$ac_save_LIBS"
22390
22391 fi
22392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22393   echo "$ac_t""yes" 1>&6
22394   have_setproctitle=yes
22395                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22396 else
22397   echo "$ac_t""no" 1>&6
22398 have_setproctitle=no
22399                         LIBOBJS="$LIBOBJS setproctitle.o"
22400                         LIBSRCS="$LIBSRCS setproctitle.c"
22401 fi
22402
22403 fi
22404
22405
22406         if test $have_setproctitle = yes ; then
22407                 cat >> confdefs.h <<\EOF
22408 #define HAVE_SETPROCTITLE 1
22409 EOF
22410
22411         fi
22412 fi
22413
22414 if test $ol_enable_slp != no ; then
22415         for ac_hdr in slp.h 
22416 do
22417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22419 echo "configure:22420: checking for $ac_hdr" >&5
22420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22421   echo $ac_n "(cached) $ac_c" 1>&6
22422 else
22423   cat > conftest.$ac_ext <<EOF
22424 #line 22425 "configure"
22425 #include "confdefs.h"
22426 #include <$ac_hdr>
22427 EOF
22428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22429 { (eval echo configure:22430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22431 if test -z "$ac_err"; then
22432   rm -rf conftest*
22433   eval "ac_cv_header_$ac_safe=yes"
22434 else
22435   echo "$ac_err" >&5
22436   echo "configure: failed program was:" >&5
22437   cat conftest.$ac_ext >&5
22438   rm -rf conftest*
22439   eval "ac_cv_header_$ac_safe=no"
22440 fi
22441 rm -f conftest*
22442 fi
22443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22444   echo "$ac_t""yes" 1>&6
22445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22446   cat >> confdefs.h <<EOF
22447 #define $ac_tr_hdr 1
22448 EOF
22449  
22450 else
22451   echo "$ac_t""no" 1>&6
22452 fi
22453 done
22454
22455
22456         if test $ac_cv_header_slp_h = yes ; then
22457                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22458 echo "configure:22459: checking for SLPOpen in -lslp" >&5
22459 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22460 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22461   echo $ac_n "(cached) $ac_c" 1>&6
22462 else
22463   ac_save_LIBS="$LIBS"
22464 LIBS="-lslp  $LIBS"
22465 cat > conftest.$ac_ext <<EOF
22466 #line 22467 "configure"
22467 #include "confdefs.h"
22468 /* Override any gcc2 internal prototype to avoid an error.  */
22469 /* We use char because int might match the return type of a gcc2
22470     builtin and then its argument prototype would still apply.  */
22471 char SLPOpen();
22472
22473 int main() {
22474 SLPOpen()
22475 ; return 0; }
22476 EOF
22477 if { (eval echo configure:22478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22478   rm -rf conftest*
22479   eval "ac_cv_lib_$ac_lib_var=yes"
22480 else
22481   echo "configure: failed program was:" >&5
22482   cat conftest.$ac_ext >&5
22483   rm -rf conftest*
22484   eval "ac_cv_lib_$ac_lib_var=no"
22485 fi
22486 rm -f conftest*
22487 LIBS="$ac_save_LIBS"
22488
22489 fi
22490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22491   echo "$ac_t""yes" 1>&6
22492   have_slp=yes
22493 else
22494   echo "$ac_t""no" 1>&6
22495 have_slp=no
22496 fi
22497
22498                 if test $have_slp = yes ; then
22499                         cat >> confdefs.h <<\EOF
22500 #define HAVE_SLP 1
22501 EOF
22502
22503                         SLAPD_SLP_LIBS=-lslp
22504                 fi
22505
22506         elif test $ol_enable_slp = yes ; then
22507                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22508         fi
22509 fi
22510
22511 if test "$ol_with_multiple_precision" != "no" ; then
22512         ol_have_bignum=no
22513         ol_have_gmp=no
22514
22515         for ac_hdr in openssl/bn.h bn.h
22516 do
22517 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22518 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22519 echo "configure:22520: checking for $ac_hdr" >&5
22520 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22521   echo $ac_n "(cached) $ac_c" 1>&6
22522 else
22523   cat > conftest.$ac_ext <<EOF
22524 #line 22525 "configure"
22525 #include "confdefs.h"
22526 #include <$ac_hdr>
22527 EOF
22528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22529 { (eval echo configure:22530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22531 if test -z "$ac_err"; then
22532   rm -rf conftest*
22533   eval "ac_cv_header_$ac_safe=yes"
22534 else
22535   echo "$ac_err" >&5
22536   echo "configure: failed program was:" >&5
22537   cat conftest.$ac_ext >&5
22538   rm -rf conftest*
22539   eval "ac_cv_header_$ac_safe=no"
22540 fi
22541 rm -f conftest*
22542 fi
22543 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22544   echo "$ac_t""yes" 1>&6
22545     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22546   cat >> confdefs.h <<EOF
22547 #define $ac_tr_hdr 1
22548 EOF
22549  
22550 else
22551   echo "$ac_t""no" 1>&6
22552 fi
22553 done
22554
22555         for ac_hdr in openssl/crypto.h crypto.h
22556 do
22557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22559 echo "configure:22560: checking for $ac_hdr" >&5
22560 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22561   echo $ac_n "(cached) $ac_c" 1>&6
22562 else
22563   cat > conftest.$ac_ext <<EOF
22564 #line 22565 "configure"
22565 #include "confdefs.h"
22566 #include <$ac_hdr>
22567 EOF
22568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22569 { (eval echo configure:22570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22571 if test -z "$ac_err"; then
22572   rm -rf conftest*
22573   eval "ac_cv_header_$ac_safe=yes"
22574 else
22575   echo "$ac_err" >&5
22576   echo "configure: failed program was:" >&5
22577   cat conftest.$ac_ext >&5
22578   rm -rf conftest*
22579   eval "ac_cv_header_$ac_safe=no"
22580 fi
22581 rm -f conftest*
22582 fi
22583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22584   echo "$ac_t""yes" 1>&6
22585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22586   cat >> confdefs.h <<EOF
22587 #define $ac_tr_hdr 1
22588 EOF
22589  
22590 else
22591   echo "$ac_t""no" 1>&6
22592 fi
22593 done
22594
22595         for ac_hdr in gmp.h 
22596 do
22597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22599 echo "configure:22600: checking for $ac_hdr" >&5
22600 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22601   echo $ac_n "(cached) $ac_c" 1>&6
22602 else
22603   cat > conftest.$ac_ext <<EOF
22604 #line 22605 "configure"
22605 #include "confdefs.h"
22606 #include <$ac_hdr>
22607 EOF
22608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22609 { (eval echo configure:22610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22611 if test -z "$ac_err"; then
22612   rm -rf conftest*
22613   eval "ac_cv_header_$ac_safe=yes"
22614 else
22615   echo "$ac_err" >&5
22616   echo "configure: failed program was:" >&5
22617   cat conftest.$ac_ext >&5
22618   rm -rf conftest*
22619   eval "ac_cv_header_$ac_safe=no"
22620 fi
22621 rm -f conftest*
22622 fi
22623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22624   echo "$ac_t""yes" 1>&6
22625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22626   cat >> confdefs.h <<EOF
22627 #define $ac_tr_hdr 1
22628 EOF
22629  
22630 else
22631   echo "$ac_t""no" 1>&6
22632 fi
22633 done
22634
22635
22636         if test "$ol_with_tls" = "found" ; then
22637                 ol_have_bn_h=no
22638                 ol_have_crypto_h=no
22639
22640                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22641                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22642                         ol_have_bn_h=yes
22643                 fi
22644
22645                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22646                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22647                         ol_have_crypto_h=yes
22648                 fi
22649
22650                 if test "$ol_have_bn_h" = "yes" \
22651                                 -a "$ol_have_crypto_h" = "yes" ; then
22652                         ol_have_bignum=yes
22653                 fi
22654         fi
22655
22656         if test $ac_cv_header_gmp_h = yes ; then
22657                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22658 echo "configure:22659: checking for __gmpz_add_ui in -lgmp" >&5
22659 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22661   echo $ac_n "(cached) $ac_c" 1>&6
22662 else
22663   ac_save_LIBS="$LIBS"
22664 LIBS="-lgmp  $LIBS"
22665 cat > conftest.$ac_ext <<EOF
22666 #line 22667 "configure"
22667 #include "confdefs.h"
22668 /* Override any gcc2 internal prototype to avoid an error.  */
22669 /* We use char because int might match the return type of a gcc2
22670     builtin and then its argument prototype would still apply.  */
22671 char __gmpz_add_ui();
22672
22673 int main() {
22674 __gmpz_add_ui()
22675 ; return 0; }
22676 EOF
22677 if { (eval echo configure:22678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22678   rm -rf conftest*
22679   eval "ac_cv_lib_$ac_lib_var=yes"
22680 else
22681   echo "configure: failed program was:" >&5
22682   cat conftest.$ac_ext >&5
22683   rm -rf conftest*
22684   eval "ac_cv_lib_$ac_lib_var=no"
22685 fi
22686 rm -f conftest*
22687 LIBS="$ac_save_LIBS"
22688
22689 fi
22690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22691   echo "$ac_t""yes" 1>&6
22692   have_gmp=yes
22693 else
22694   echo "$ac_t""no" 1>&6
22695 have_gmp=no
22696 fi
22697
22698                 if test $have_gmp = yes ; then
22699                         ol_have_gmp=yes
22700                 fi
22701         fi
22702
22703         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22704 echo "configure:22705: checking for multiple precision support" >&5
22705
22706         ol_mp_support="none"
22707         case "$ol_with_multiple_precision" in
22708         auto)
22709                                                                                 if test "$ol_have_bignum" = "yes" ; then
22710                         ol_mp_support="bignum"
22711                 else
22712                         if test "$ol_have_gmp" = "yes" ; then
22713                                 ol_mp_support="gmp"
22714                         fi
22715                 fi
22716                 ;;
22717         bignum)
22718                 if test "$ol_have_bignum" != "yes" ; then
22719                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22720                 fi
22721                 ol_mp_support="bignum"
22722                 ;;
22723         gmp)
22724                 if test "$ol_have_gmp" != "yes" ; then
22725                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22726                 fi
22727                 ol_mp_support="gmp"
22728                 ;;
22729         yes)
22730                 if test "$ol_have_bignum" = "yes" ; then
22731                         ol_mp_support="bignum"
22732                 elif test "$ol_have_gmp" = "yes" ; then
22733                         ol_mp_support="gmp"
22734                 else
22735                         { echo "configure: error: not available" 1>&2; exit 1; }
22736                 fi
22737                 ;;
22738         esac
22739
22740         case "$ol_mp_support" in
22741         bignum)
22742                 cat >> confdefs.h <<\EOF
22743 #define HAVE_BIGNUM 1
22744 EOF
22745
22746                 ;;
22747         gmp)
22748                 cat >> confdefs.h <<\EOF
22749 #define HAVE_GMP 1
22750 EOF
22751
22752                 SLAPD_GMP_LIBS=-lgmp
22753                 ;;
22754         none)
22755                 ;;
22756         esac
22757
22758         echo "$ac_t""$ol_mp_support" 1>&6
22759 fi
22760
22761
22762 echo $ac_n "checking long long""... $ac_c" 1>&6
22763 echo "configure:22764: checking long long" >&5
22764 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22765   echo $ac_n "(cached) $ac_c" 1>&6
22766 else
22767   
22768         cat > conftest.$ac_ext <<EOF
22769 #line 22770 "configure"
22770 #include "confdefs.h"
22771
22772 int main() {
22773 long long x;
22774 ; return 0; }
22775 EOF
22776 if { (eval echo configure:22777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22777   rm -rf conftest*
22778   ol_cv_type_long_long=yes
22779 else
22780   echo "configure: failed program was:" >&5
22781   cat conftest.$ac_ext >&5
22782   rm -rf conftest*
22783   ol_cv_type_long_long=no
22784 fi
22785 rm -f conftest*
22786 fi
22787
22788 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22789 if test $ol_cv_type_long_long = yes; then
22790         cat >> confdefs.h <<\EOF
22791 #define HAVE_LONG_LONG 1
22792 EOF
22793
22794 fi
22795
22796 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22797 echo "configure:22798: checking for ANSI C header files" >&5
22798 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22799   echo $ac_n "(cached) $ac_c" 1>&6
22800 else
22801   cat > conftest.$ac_ext <<EOF
22802 #line 22803 "configure"
22803 #include "confdefs.h"
22804 #include <stdlib.h>
22805 #include <stdarg.h>
22806 #include <string.h>
22807 #include <float.h>
22808 EOF
22809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22810 { (eval echo configure:22811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22812 if test -z "$ac_err"; then
22813   rm -rf conftest*
22814   ac_cv_header_stdc=yes
22815 else
22816   echo "$ac_err" >&5
22817   echo "configure: failed program was:" >&5
22818   cat conftest.$ac_ext >&5
22819   rm -rf conftest*
22820   ac_cv_header_stdc=no
22821 fi
22822 rm -f conftest*
22823
22824 if test $ac_cv_header_stdc = yes; then
22825   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22826 cat > conftest.$ac_ext <<EOF
22827 #line 22828 "configure"
22828 #include "confdefs.h"
22829 #include <string.h>
22830 EOF
22831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22832   egrep "memchr" >/dev/null 2>&1; then
22833   :
22834 else
22835   rm -rf conftest*
22836   ac_cv_header_stdc=no
22837 fi
22838 rm -f conftest*
22839
22840 fi
22841
22842 if test $ac_cv_header_stdc = yes; then
22843   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22844 cat > conftest.$ac_ext <<EOF
22845 #line 22846 "configure"
22846 #include "confdefs.h"
22847 #include <stdlib.h>
22848 EOF
22849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22850   egrep "free" >/dev/null 2>&1; then
22851   :
22852 else
22853   rm -rf conftest*
22854   ac_cv_header_stdc=no
22855 fi
22856 rm -f conftest*
22857
22858 fi
22859
22860 if test $ac_cv_header_stdc = yes; then
22861   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22862 if test "$cross_compiling" = yes; then
22863   :
22864 else
22865   cat > conftest.$ac_ext <<EOF
22866 #line 22867 "configure"
22867 #include "confdefs.h"
22868 #include <ctype.h>
22869 #if ((' ' & 0x0FF) == 0x020)
22870 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22871 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22872 #else
22873 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22874  || ('j' <= (c) && (c) <= 'r') \
22875  || ('s' <= (c) && (c) <= 'z'))
22876 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22877 #endif
22878 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22879 int main () { int i; for (i = 0; i < 256; i++)
22880 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22881 exit (0); }
22882
22883 EOF
22884 if { (eval echo configure:22885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22885 then
22886   :
22887 else
22888   echo "configure: failed program was:" >&5
22889   cat conftest.$ac_ext >&5
22890   rm -fr conftest*
22891   ac_cv_header_stdc=no
22892 fi
22893 rm -fr conftest*
22894 fi
22895
22896 fi
22897 fi
22898
22899 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22900 if test $ac_cv_header_stdc = yes; then
22901   cat >> confdefs.h <<\EOF
22902 #define STDC_HEADERS 1
22903 EOF
22904
22905 fi
22906
22907 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22908 echo "configure:22909: checking for mode_t" >&5
22909 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22910   echo $ac_n "(cached) $ac_c" 1>&6
22911 else
22912   cat > conftest.$ac_ext <<EOF
22913 #line 22914 "configure"
22914 #include "confdefs.h"
22915 #include <sys/types.h>
22916 #if STDC_HEADERS
22917 #include <stdlib.h>
22918 #include <stddef.h>
22919 #endif
22920
22921 EOF
22922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22923   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22924   rm -rf conftest*
22925   eval "ac_cv_type_mode_t=yes"
22926 else
22927   rm -rf conftest*
22928   eval "ac_cv_type_mode_t=no"
22929 fi
22930 rm -f conftest*
22931
22932 fi
22933 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22934   echo "$ac_t""yes" 1>&6
22935 else
22936   echo "$ac_t""no" 1>&6
22937   cat >> confdefs.h <<EOF
22938 #define mode_t int
22939 EOF
22940
22941 fi
22942
22943 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22944 echo "configure:22945: checking for off_t" >&5
22945 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22946   echo $ac_n "(cached) $ac_c" 1>&6
22947 else
22948   cat > conftest.$ac_ext <<EOF
22949 #line 22950 "configure"
22950 #include "confdefs.h"
22951 #include <sys/types.h>
22952 #if STDC_HEADERS
22953 #include <stdlib.h>
22954 #include <stddef.h>
22955 #endif
22956
22957 EOF
22958 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22959   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22960   rm -rf conftest*
22961   eval "ac_cv_type_off_t=yes"
22962 else
22963   rm -rf conftest*
22964   eval "ac_cv_type_off_t=no"
22965 fi
22966 rm -f conftest*
22967
22968 fi
22969 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22970   echo "$ac_t""yes" 1>&6
22971 else
22972   echo "$ac_t""no" 1>&6
22973   cat >> confdefs.h <<EOF
22974 #define off_t long
22975 EOF
22976
22977 fi
22978
22979 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22980 echo "configure:22981: checking for pid_t" >&5
22981 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22982   echo $ac_n "(cached) $ac_c" 1>&6
22983 else
22984   cat > conftest.$ac_ext <<EOF
22985 #line 22986 "configure"
22986 #include "confdefs.h"
22987 #include <sys/types.h>
22988 #if STDC_HEADERS
22989 #include <stdlib.h>
22990 #include <stddef.h>
22991 #endif
22992
22993 EOF
22994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22995   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22996   rm -rf conftest*
22997   eval "ac_cv_type_pid_t=yes"
22998 else
22999   rm -rf conftest*
23000   eval "ac_cv_type_pid_t=no"
23001 fi
23002 rm -f conftest*
23003
23004 fi
23005 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23006   echo "$ac_t""yes" 1>&6
23007 else
23008   echo "$ac_t""no" 1>&6
23009   cat >> confdefs.h <<EOF
23010 #define pid_t int
23011 EOF
23012
23013 fi
23014
23015 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23016 echo "configure:23017: checking for ptrdiff_t" >&5
23017 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23018   echo $ac_n "(cached) $ac_c" 1>&6
23019 else
23020   cat > conftest.$ac_ext <<EOF
23021 #line 23022 "configure"
23022 #include "confdefs.h"
23023 #include <stddef.h>
23024 int main() {
23025 ptrdiff_t p
23026 ; return 0; }
23027 EOF
23028 if { (eval echo configure:23029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23029   rm -rf conftest*
23030   am_cv_type_ptrdiff_t=yes
23031 else
23032   echo "configure: failed program was:" >&5
23033   cat conftest.$ac_ext >&5
23034   rm -rf conftest*
23035   am_cv_type_ptrdiff_t=no
23036 fi
23037 rm -f conftest*
23038 fi
23039
23040 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23041    if test $am_cv_type_ptrdiff_t = yes; then
23042      cat >> confdefs.h <<\EOF
23043 #define HAVE_PTRDIFF_T 1
23044 EOF
23045
23046    fi
23047
23048 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23049 echo "configure:23050: checking return type of signal handlers" >&5
23050 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23051   echo $ac_n "(cached) $ac_c" 1>&6
23052 else
23053   cat > conftest.$ac_ext <<EOF
23054 #line 23055 "configure"
23055 #include "confdefs.h"
23056 #include <sys/types.h>
23057 #include <signal.h>
23058 #ifdef signal
23059 #undef signal
23060 #endif
23061 #ifdef __cplusplus
23062 extern "C" void (*signal (int, void (*)(int)))(int);
23063 #else
23064 void (*signal ()) ();
23065 #endif
23066
23067 int main() {
23068 int i;
23069 ; return 0; }
23070 EOF
23071 if { (eval echo configure:23072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23072   rm -rf conftest*
23073   ac_cv_type_signal=void
23074 else
23075   echo "configure: failed program was:" >&5
23076   cat conftest.$ac_ext >&5
23077   rm -rf conftest*
23078   ac_cv_type_signal=int
23079 fi
23080 rm -f conftest*
23081 fi
23082
23083 echo "$ac_t""$ac_cv_type_signal" 1>&6
23084 cat >> confdefs.h <<EOF
23085 #define RETSIGTYPE $ac_cv_type_signal
23086 EOF
23087
23088
23089 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23090 echo "configure:23091: checking for size_t" >&5
23091 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23092   echo $ac_n "(cached) $ac_c" 1>&6
23093 else
23094   cat > conftest.$ac_ext <<EOF
23095 #line 23096 "configure"
23096 #include "confdefs.h"
23097 #include <sys/types.h>
23098 #if STDC_HEADERS
23099 #include <stdlib.h>
23100 #include <stddef.h>
23101 #endif
23102
23103 EOF
23104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23105   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23106   rm -rf conftest*
23107   eval "ac_cv_type_size_t=yes"
23108 else
23109   rm -rf conftest*
23110   eval "ac_cv_type_size_t=no"
23111 fi
23112 rm -f conftest*
23113
23114 fi
23115 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23116   echo "$ac_t""yes" 1>&6
23117 else
23118   echo "$ac_t""no" 1>&6
23119   cat >> confdefs.h <<EOF
23120 #define size_t unsigned
23121 EOF
23122
23123 fi
23124
23125
23126 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23127 echo "configure:23128: checking for ssize_t" >&5
23128 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23129   echo $ac_n "(cached) $ac_c" 1>&6
23130 else
23131   cat > conftest.$ac_ext <<EOF
23132 #line 23133 "configure"
23133 #include "confdefs.h"
23134 #include <sys/types.h>
23135 #if STDC_HEADERS
23136 #include <stdlib.h>
23137 #include <stddef.h>
23138 #endif
23139
23140 EOF
23141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23142   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23143   rm -rf conftest*
23144   eval "ac_cv_type_ssize_t=yes"
23145 else
23146   rm -rf conftest*
23147   eval "ac_cv_type_ssize_t=no"
23148 fi
23149 rm -f conftest*
23150
23151 fi
23152 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23153   echo "$ac_t""yes" 1>&6
23154 else
23155   echo "$ac_t""no" 1>&6
23156   cat >> confdefs.h <<EOF
23157 #define ssize_t signed int
23158 EOF
23159
23160 fi
23161
23162 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23163 echo "configure:23164: checking for caddr_t" >&5
23164 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23165   echo $ac_n "(cached) $ac_c" 1>&6
23166 else
23167   cat > conftest.$ac_ext <<EOF
23168 #line 23169 "configure"
23169 #include "confdefs.h"
23170 #include <sys/types.h>
23171 #if STDC_HEADERS
23172 #include <stdlib.h>
23173 #include <stddef.h>
23174 #endif
23175
23176 EOF
23177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23178   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23179   rm -rf conftest*
23180   eval "ac_cv_type_caddr_t=yes"
23181 else
23182   rm -rf conftest*
23183   eval "ac_cv_type_caddr_t=no"
23184 fi
23185 rm -f conftest*
23186
23187 fi
23188 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23189   echo "$ac_t""yes" 1>&6
23190 else
23191   echo "$ac_t""no" 1>&6
23192   cat >> confdefs.h <<EOF
23193 #define caddr_t char *
23194 EOF
23195
23196 fi
23197
23198
23199 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23200 echo "configure:23201: checking for socklen_t" >&5
23201 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23202   echo $ac_n "(cached) $ac_c" 1>&6
23203 else
23204   cat > conftest.$ac_ext <<EOF
23205 #line 23206 "configure"
23206 #include "confdefs.h"
23207
23208 #ifdef HAVE_SYS_TYPES_H
23209 #include <sys/types.h>
23210 #endif
23211 #ifdef HAVE_SYS_SOCKET_H
23212 #include <sys/socket.h>
23213 #endif
23214
23215 int main() {
23216 socklen_t len;
23217 ; return 0; }
23218 EOF
23219 if { (eval echo configure:23220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23220   rm -rf conftest*
23221   ol_cv_type_socklen_t=yes
23222 else
23223   echo "configure: failed program was:" >&5
23224   cat conftest.$ac_ext >&5
23225   rm -rf conftest*
23226   ol_cv_type_socklen_t=no
23227 fi
23228 rm -f conftest*
23229 fi
23230
23231 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23232   if test $ol_cv_type_socklen_t = no; then
23233     cat >> confdefs.h <<\EOF
23234 #define socklen_t int
23235 EOF
23236
23237   fi
23238  
23239 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23240 echo "configure:23241: checking for member st_blksize in aggregate type struct stat" >&5
23241 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23242   echo $ac_n "(cached) $ac_c" 1>&6
23243 else
23244   cat > conftest.$ac_ext <<EOF
23245 #line 23246 "configure"
23246 #include "confdefs.h"
23247 #include <sys/types.h>
23248 #include <sys/stat.h>
23249 int main() {
23250 struct stat foo; foo.st_blksize;
23251 ; return 0; }
23252 EOF
23253 if { (eval echo configure:23254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23254   rm -rf conftest*
23255   ac_cv_c_struct_member_st_blksize=yes
23256 else
23257   echo "configure: failed program was:" >&5
23258   cat conftest.$ac_ext >&5
23259   rm -rf conftest*
23260   ac_cv_c_struct_member_st_blksize=no
23261 fi
23262 rm -f conftest*
23263 fi
23264
23265 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23266 st_blksize="$ac_cv_c_struct_member_st_blksize"
23267 if test $ac_cv_c_struct_member_st_blksize = yes; then
23268   cat >> confdefs.h <<\EOF
23269 #define HAVE_ST_BLKSIZE 1
23270 EOF
23271
23272 fi
23273
23274 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23275 echo "configure:23276: checking whether time.h and sys/time.h may both be included" >&5
23276 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23277   echo $ac_n "(cached) $ac_c" 1>&6
23278 else
23279   cat > conftest.$ac_ext <<EOF
23280 #line 23281 "configure"
23281 #include "confdefs.h"
23282 #include <sys/types.h>
23283 #include <sys/time.h>
23284 #include <time.h>
23285 int main() {
23286 struct tm *tp;
23287 ; return 0; }
23288 EOF
23289 if { (eval echo configure:23290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23290   rm -rf conftest*
23291   ac_cv_header_time=yes
23292 else
23293   echo "configure: failed program was:" >&5
23294   cat conftest.$ac_ext >&5
23295   rm -rf conftest*
23296   ac_cv_header_time=no
23297 fi
23298 rm -f conftest*
23299 fi
23300
23301 echo "$ac_t""$ac_cv_header_time" 1>&6
23302 if test $ac_cv_header_time = yes; then
23303   cat >> confdefs.h <<\EOF
23304 #define TIME_WITH_SYS_TIME 1
23305 EOF
23306
23307 fi
23308
23309 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23310 echo "configure:23311: checking whether struct tm is in sys/time.h or time.h" >&5
23311 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23312   echo $ac_n "(cached) $ac_c" 1>&6
23313 else
23314   cat > conftest.$ac_ext <<EOF
23315 #line 23316 "configure"
23316 #include "confdefs.h"
23317 #include <sys/types.h>
23318 #include <time.h>
23319 int main() {
23320 struct tm *tp; tp->tm_sec;
23321 ; return 0; }
23322 EOF
23323 if { (eval echo configure:23324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23324   rm -rf conftest*
23325   ac_cv_struct_tm=time.h
23326 else
23327   echo "configure: failed program was:" >&5
23328   cat conftest.$ac_ext >&5
23329   rm -rf conftest*
23330   ac_cv_struct_tm=sys/time.h
23331 fi
23332 rm -f conftest*
23333 fi
23334
23335 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23336 if test $ac_cv_struct_tm = sys/time.h; then
23337   cat >> confdefs.h <<\EOF
23338 #define TM_IN_SYS_TIME 1
23339 EOF
23340
23341 fi
23342
23343 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23344 echo "configure:23345: checking for uid_t in sys/types.h" >&5
23345 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23346   echo $ac_n "(cached) $ac_c" 1>&6
23347 else
23348   cat > conftest.$ac_ext <<EOF
23349 #line 23350 "configure"
23350 #include "confdefs.h"
23351 #include <sys/types.h>
23352 EOF
23353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23354   egrep "uid_t" >/dev/null 2>&1; then
23355   rm -rf conftest*
23356   ac_cv_type_uid_t=yes
23357 else
23358   rm -rf conftest*
23359   ac_cv_type_uid_t=no
23360 fi
23361 rm -f conftest*
23362
23363 fi
23364
23365 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23366 if test $ac_cv_type_uid_t = no; then
23367   cat >> confdefs.h <<\EOF
23368 #define uid_t int
23369 EOF
23370
23371   cat >> confdefs.h <<\EOF
23372 #define gid_t int
23373 EOF
23374
23375 fi
23376
23377 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23378 echo "configure:23379: checking for sig_atomic_t" >&5
23379 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23380   echo $ac_n "(cached) $ac_c" 1>&6
23381 else
23382   cat > conftest.$ac_ext <<EOF
23383 #line 23384 "configure"
23384 #include "confdefs.h"
23385 #include <signal.h>
23386 int main() {
23387 sig_atomic_t atomic;
23388 ; return 0; }
23389 EOF
23390 if { (eval echo configure:23391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23391   rm -rf conftest*
23392   ol_cv_type_sig_atomic_t=yes
23393 else
23394   echo "configure: failed program was:" >&5
23395   cat conftest.$ac_ext >&5
23396   rm -rf conftest*
23397   ol_cv_type_sig_atomic_t=no
23398 fi
23399 rm -f conftest*
23400 fi
23401
23402 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23403   if test $ol_cv_type_sig_atomic_t = no; then
23404     cat >> confdefs.h <<\EOF
23405 #define sig_atomic_t int
23406 EOF
23407
23408   fi
23409  
23410
23411
23412 # test for pw_gecos in struct passwd
23413 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23414 echo "configure:23415: checking struct passwd for pw_gecos" >&5
23415 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23416   echo $ac_n "(cached) $ac_c" 1>&6
23417 else
23418   
23419         cat > conftest.$ac_ext <<EOF
23420 #line 23421 "configure"
23421 #include "confdefs.h"
23422 #include <pwd.h>
23423 int main() {
23424
23425         struct passwd pwd;
23426         pwd.pw_gecos = pwd.pw_name;
23427
23428 ; return 0; }
23429 EOF
23430 if { (eval echo configure:23431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23431   rm -rf conftest*
23432   ol_cv_struct_passwd_pw_gecos=yes
23433 else
23434   echo "configure: failed program was:" >&5
23435   cat conftest.$ac_ext >&5
23436   rm -rf conftest*
23437   ol_cv_struct_passwd_pw_gecos=no
23438 fi
23439 rm -f conftest*
23440 fi
23441
23442 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23443 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23444         cat >> confdefs.h <<\EOF
23445 #define HAVE_PW_GECOS 1
23446 EOF
23447
23448 fi
23449
23450 # test for pw_passwd in struct passwd
23451 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23452 echo "configure:23453: checking struct passwd for pw_passwd" >&5
23453 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23454   echo $ac_n "(cached) $ac_c" 1>&6
23455 else
23456   
23457         cat > conftest.$ac_ext <<EOF
23458 #line 23459 "configure"
23459 #include "confdefs.h"
23460 #include <pwd.h>
23461 int main() {
23462
23463         struct passwd pwd;
23464         pwd.pw_passwd = pwd.pw_name;
23465
23466 ; return 0; }
23467 EOF
23468 if { (eval echo configure:23469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23469   rm -rf conftest*
23470   ol_cv_struct_passwd_pw_passwd=yes
23471 else
23472   echo "configure: failed program was:" >&5
23473   cat conftest.$ac_ext >&5
23474   rm -rf conftest*
23475   ol_cv_struct_passwd_pw_passwd=no
23476 fi
23477 rm -f conftest*
23478 fi
23479
23480 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23481 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23482         cat >> confdefs.h <<\EOF
23483 #define HAVE_PW_PASSWD 1
23484 EOF
23485
23486 fi
23487
23488
23489 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23490 echo "configure:23491: checking if toupper() requires islower()" >&5
23491 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23492   echo $ac_n "(cached) $ac_c" 1>&6
23493 else
23494   
23495         if test "$cross_compiling" = yes; then
23496   ol_cv_c_upper_lower=safe
23497 else
23498   cat > conftest.$ac_ext <<EOF
23499 #line 23500 "configure"
23500 #include "confdefs.h"
23501
23502 #include <ctype.h>
23503 main()
23504 {
23505         if ('C' == toupper('C'))
23506                 exit(0);
23507         else
23508                 exit(1);
23509 }
23510 EOF
23511 if { (eval echo configure:23512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23512 then
23513   ol_cv_c_upper_lower=no
23514 else
23515   echo "configure: failed program was:" >&5
23516   cat conftest.$ac_ext >&5
23517   rm -fr conftest*
23518   ol_cv_c_upper_lower=yes
23519 fi
23520 rm -fr conftest*
23521 fi
23522
23523 fi
23524
23525 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23526 if test $ol_cv_c_upper_lower != no ; then
23527         cat >> confdefs.h <<\EOF
23528 #define C_UPPER_LOWER 1
23529 EOF
23530
23531 fi
23532
23533 echo $ac_n "checking for working const""... $ac_c" 1>&6
23534 echo "configure:23535: checking for working const" >&5
23535 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23536   echo $ac_n "(cached) $ac_c" 1>&6
23537 else
23538   cat > conftest.$ac_ext <<EOF
23539 #line 23540 "configure"
23540 #include "confdefs.h"
23541
23542 int main() {
23543
23544 /* Ultrix mips cc rejects this.  */
23545 typedef int charset[2]; const charset x;
23546 /* SunOS 4.1.1 cc rejects this.  */
23547 char const *const *ccp;
23548 char **p;
23549 /* NEC SVR4.0.2 mips cc rejects this.  */
23550 struct point {int x, y;};
23551 static struct point const zero = {0,0};
23552 /* AIX XL C 1.02.0.0 rejects this.
23553    It does not let you subtract one const X* pointer from another in an arm
23554    of an if-expression whose if-part is not a constant expression */
23555 const char *g = "string";
23556 ccp = &g + (g ? g-g : 0);
23557 /* HPUX 7.0 cc rejects these. */
23558 ++ccp;
23559 p = (char**) ccp;
23560 ccp = (char const *const *) p;
23561 { /* SCO 3.2v4 cc rejects this.  */
23562   char *t;
23563   char const *s = 0 ? (char *) 0 : (char const *) 0;
23564
23565   *t++ = 0;
23566 }
23567 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23568   int x[] = {25, 17};
23569   const int *foo = &x[0];
23570   ++foo;
23571 }
23572 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23573   typedef const int *iptr;
23574   iptr p = 0;
23575   ++p;
23576 }
23577 { /* AIX XL C 1.02.0.0 rejects this saying
23578      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23579   struct s { int j; const int *ap[3]; };
23580   struct s *b; b->j = 5;
23581 }
23582 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23583   const int foo = 10;
23584 }
23585
23586 ; return 0; }
23587 EOF
23588 if { (eval echo configure:23589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23589   rm -rf conftest*
23590   ac_cv_c_const=yes
23591 else
23592   echo "configure: failed program was:" >&5
23593   cat conftest.$ac_ext >&5
23594   rm -rf conftest*
23595   ac_cv_c_const=no
23596 fi
23597 rm -f conftest*
23598 fi
23599
23600 echo "$ac_t""$ac_cv_c_const" 1>&6
23601 if test $ac_cv_c_const = no; then
23602   cat >> confdefs.h <<\EOF
23603 #define const 
23604 EOF
23605
23606 fi
23607
23608 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23609 echo "configure:23610: checking if compiler understands volatile" >&5
23610 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23611   echo $ac_n "(cached) $ac_c" 1>&6
23612 else
23613   cat > conftest.$ac_ext <<EOF
23614 #line 23615 "configure"
23615 #include "confdefs.h"
23616 int x, y, z;
23617 int main() {
23618 volatile int a; int * volatile b = x ? &y : &z;
23619       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23620       *b = 0;
23621 ; return 0; }
23622 EOF
23623 if { (eval echo configure:23624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23624   rm -rf conftest*
23625   ol_cv_c_volatile=yes
23626 else
23627   echo "configure: failed program was:" >&5
23628   cat conftest.$ac_ext >&5
23629   rm -rf conftest*
23630   ol_cv_c_volatile=no
23631 fi
23632 rm -f conftest*
23633 fi
23634
23635 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23636   if test $ol_cv_c_volatile = yes; then
23637     : 
23638   else
23639     cat >> confdefs.h <<\EOF
23640 #define volatile 
23641 EOF
23642
23643   fi
23644  
23645
23646 if test $cross_compiling = yes ; then
23647         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23648         cat >> confdefs.h <<\EOF
23649 #define CROSS_COMPILING 1
23650 EOF
23651
23652 else
23653         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23654 echo "configure:23655: checking whether byte ordering is bigendian" >&5
23655 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23656   echo $ac_n "(cached) $ac_c" 1>&6
23657 else
23658   ac_cv_c_bigendian=unknown
23659 # See if sys/param.h defines the BYTE_ORDER macro.
23660 cat > conftest.$ac_ext <<EOF
23661 #line 23662 "configure"
23662 #include "confdefs.h"
23663 #include <sys/types.h>
23664 #include <sys/param.h>
23665 int main() {
23666
23667 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23668  bogus endian macros
23669 #endif
23670 ; return 0; }
23671 EOF
23672 if { (eval echo configure:23673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23673   rm -rf conftest*
23674   # It does; now see whether it defined to BIG_ENDIAN or not.
23675 cat > conftest.$ac_ext <<EOF
23676 #line 23677 "configure"
23677 #include "confdefs.h"
23678 #include <sys/types.h>
23679 #include <sys/param.h>
23680 int main() {
23681
23682 #if BYTE_ORDER != BIG_ENDIAN
23683  not big endian
23684 #endif
23685 ; return 0; }
23686 EOF
23687 if { (eval echo configure:23688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23688   rm -rf conftest*
23689   ac_cv_c_bigendian=yes
23690 else
23691   echo "configure: failed program was:" >&5
23692   cat conftest.$ac_ext >&5
23693   rm -rf conftest*
23694   ac_cv_c_bigendian=no
23695 fi
23696 rm -f conftest*
23697 else
23698   echo "configure: failed program was:" >&5
23699   cat conftest.$ac_ext >&5
23700 fi
23701 rm -f conftest*
23702 if test $ac_cv_c_bigendian = unknown; then
23703 if test "$cross_compiling" = yes; then
23704     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23705 else
23706   cat > conftest.$ac_ext <<EOF
23707 #line 23708 "configure"
23708 #include "confdefs.h"
23709 main () {
23710   /* Are we little or big endian?  From Harbison&Steele.  */
23711   union
23712   {
23713     long l;
23714     char c[sizeof (long)];
23715   } u;
23716   u.l = 1;
23717   exit (u.c[sizeof (long) - 1] == 1);
23718 }
23719 EOF
23720 if { (eval echo configure:23721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23721 then
23722   ac_cv_c_bigendian=no
23723 else
23724   echo "configure: failed program was:" >&5
23725   cat conftest.$ac_ext >&5
23726   rm -fr conftest*
23727   ac_cv_c_bigendian=yes
23728 fi
23729 rm -fr conftest*
23730 fi
23731
23732 fi
23733 fi
23734
23735 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23736 if test $ac_cv_c_bigendian = yes; then
23737   cat >> confdefs.h <<\EOF
23738 #define WORDS_BIGENDIAN 1
23739 EOF
23740
23741 fi
23742
23743 fi
23744
23745 echo $ac_n "checking size of short""... $ac_c" 1>&6
23746 echo "configure:23747: checking size of short" >&5 
23747 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23748   echo $ac_n "(cached) $ac_c" 1>&6
23749 else
23750   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23751   cat > conftest.$ac_ext <<EOF
23752 #line 23753 "configure"
23753 #include "confdefs.h"
23754 #include "confdefs.h" 
23755 #include <stdlib.h>
23756 #include <sys/types.h> 
23757  
23758
23759 int main() {
23760 switch (0) case 0: case (sizeof (short) == $ac_size):;
23761 ; return 0; }
23762 EOF
23763 if { (eval echo configure:23764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23764   rm -rf conftest*
23765   ac_cv_sizeof_short=$ac_size
23766 else
23767   echo "configure: failed program was:" >&5
23768   cat conftest.$ac_ext >&5
23769 fi
23770 rm -f conftest* 
23771   if test x$ac_cv_sizeof_short != x ; then break; fi 
23772 done 
23773
23774 fi
23775  
23776 if test x$ac_cv_sizeof_short = x ; then 
23777   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23778 fi 
23779 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23780 cat >> confdefs.h <<EOF
23781 #define SIZEOF_SHORT $ac_cv_sizeof_short
23782 EOF
23783  
23784  
23785 echo $ac_n "checking size of int""... $ac_c" 1>&6
23786 echo "configure:23787: checking size of int" >&5 
23787 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23788   echo $ac_n "(cached) $ac_c" 1>&6
23789 else
23790   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23791   cat > conftest.$ac_ext <<EOF
23792 #line 23793 "configure"
23793 #include "confdefs.h"
23794 #include "confdefs.h" 
23795 #include <stdlib.h>
23796 #include <sys/types.h> 
23797  
23798
23799 int main() {
23800 switch (0) case 0: case (sizeof (int) == $ac_size):;
23801 ; return 0; }
23802 EOF
23803 if { (eval echo configure:23804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23804   rm -rf conftest*
23805   ac_cv_sizeof_int=$ac_size
23806 else
23807   echo "configure: failed program was:" >&5
23808   cat conftest.$ac_ext >&5
23809 fi
23810 rm -f conftest* 
23811   if test x$ac_cv_sizeof_int != x ; then break; fi 
23812 done 
23813
23814 fi
23815  
23816 if test x$ac_cv_sizeof_int = x ; then 
23817   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23818 fi 
23819 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23820 cat >> confdefs.h <<EOF
23821 #define SIZEOF_INT $ac_cv_sizeof_int
23822 EOF
23823  
23824  
23825 echo $ac_n "checking size of long""... $ac_c" 1>&6
23826 echo "configure:23827: checking size of long" >&5 
23827 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23828   echo $ac_n "(cached) $ac_c" 1>&6
23829 else
23830   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23831   cat > conftest.$ac_ext <<EOF
23832 #line 23833 "configure"
23833 #include "confdefs.h"
23834 #include "confdefs.h" 
23835 #include <stdlib.h>
23836 #include <sys/types.h> 
23837  
23838
23839 int main() {
23840 switch (0) case 0: case (sizeof (long) == $ac_size):;
23841 ; return 0; }
23842 EOF
23843 if { (eval echo configure:23844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23844   rm -rf conftest*
23845   ac_cv_sizeof_long=$ac_size
23846 else
23847   echo "configure: failed program was:" >&5
23848   cat conftest.$ac_ext >&5
23849 fi
23850 rm -f conftest* 
23851   if test x$ac_cv_sizeof_long != x ; then break; fi 
23852 done 
23853
23854 fi
23855  
23856 if test x$ac_cv_sizeof_long = x ; then 
23857   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23858 fi 
23859 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23860 cat >> confdefs.h <<EOF
23861 #define SIZEOF_LONG $ac_cv_sizeof_long
23862 EOF
23863  
23864
23865 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23866 echo "configure:23867: checking size of wchar_t" >&5 
23867 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23868   echo $ac_n "(cached) $ac_c" 1>&6
23869 else
23870   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23871   cat > conftest.$ac_ext <<EOF
23872 #line 23873 "configure"
23873 #include "confdefs.h"
23874 #include "confdefs.h" 
23875 #include <stdlib.h>
23876 #include <sys/types.h> 
23877  
23878
23879 int main() {
23880 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23881 ; return 0; }
23882 EOF
23883 if { (eval echo configure:23884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23884   rm -rf conftest*
23885   ac_cv_sizeof_wchar_t=$ac_size
23886 else
23887   echo "configure: failed program was:" >&5
23888   cat conftest.$ac_ext >&5
23889 fi
23890 rm -f conftest* 
23891   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23892 done 
23893
23894 fi
23895  
23896 if test x$ac_cv_sizeof_wchar_t = x ; then 
23897   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23898 fi 
23899 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23900 cat >> confdefs.h <<EOF
23901 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23902 EOF
23903  
23904
23905
23906 if test "$ac_cv_sizeof_int" -lt 4 ; then
23907         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23908
23909         cat >> confdefs.h <<\EOF
23910 #define LBER_INT_T long
23911 EOF
23912
23913 else
23914         cat >> confdefs.h <<\EOF
23915 #define LBER_INT_T int
23916 EOF
23917
23918 fi
23919
23920 cat >> confdefs.h <<\EOF
23921 #define LBER_LEN_T long
23922 EOF
23923
23924 cat >> confdefs.h <<\EOF
23925 #define LBER_SOCKET_T int
23926 EOF
23927
23928 cat >> confdefs.h <<\EOF
23929 #define LBER_TAG_T long
23930 EOF
23931
23932
23933 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23934 echo "configure:23935: checking for 8-bit clean memcmp" >&5
23935 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23936   echo $ac_n "(cached) $ac_c" 1>&6
23937 else
23938   if test "$cross_compiling" = yes; then
23939   ac_cv_func_memcmp_clean=no
23940 else
23941   cat > conftest.$ac_ext <<EOF
23942 #line 23943 "configure"
23943 #include "confdefs.h"
23944
23945 main()
23946 {
23947   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23948   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23949 }
23950
23951 EOF
23952 if { (eval echo configure:23953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23953 then
23954   ac_cv_func_memcmp_clean=yes
23955 else
23956   echo "configure: failed program was:" >&5
23957   cat conftest.$ac_ext >&5
23958   rm -fr conftest*
23959   ac_cv_func_memcmp_clean=no
23960 fi
23961 rm -fr conftest*
23962 fi
23963
23964 fi
23965
23966 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23967 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23968
23969
23970 if test $ac_cv_func_memcmp_clean = no ; then
23971         cat >> confdefs.h <<\EOF
23972 #define NEED_MEMCMP_REPLACEMENT 1
23973 EOF
23974
23975 fi
23976
23977 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23978 echo "configure:23979: checking for strftime" >&5
23979 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23980   echo $ac_n "(cached) $ac_c" 1>&6
23981 else
23982   cat > conftest.$ac_ext <<EOF
23983 #line 23984 "configure"
23984 #include "confdefs.h"
23985 /* System header to define __stub macros and hopefully few prototypes,
23986     which can conflict with char strftime(); below.  */
23987 #include <assert.h>
23988 /* Override any gcc2 internal prototype to avoid an error.  */
23989 /* We use char because int might match the return type of a gcc2
23990     builtin and then its argument prototype would still apply.  */
23991 char strftime();
23992 char (*f)();
23993
23994 int main() {
23995
23996 /* The GNU C library defines this for functions which it implements
23997     to always fail with ENOSYS.  Some functions are actually named
23998     something starting with __ and the normal name is an alias.  */
23999 #if defined (__stub_strftime) || defined (__stub___strftime)
24000 choke me
24001 #else
24002 f = strftime;
24003 #endif
24004
24005 ; return 0; }
24006 EOF
24007 if { (eval echo configure:24008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24008   rm -rf conftest*
24009   eval "ac_cv_func_strftime=yes"
24010 else
24011   echo "configure: failed program was:" >&5
24012   cat conftest.$ac_ext >&5
24013   rm -rf conftest*
24014   eval "ac_cv_func_strftime=no"
24015 fi
24016 rm -f conftest*
24017 fi
24018
24019 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24020   echo "$ac_t""yes" 1>&6
24021   cat >> confdefs.h <<\EOF
24022 #define HAVE_STRFTIME 1
24023 EOF
24024
24025 else
24026   echo "$ac_t""no" 1>&6
24027 # strftime is in -lintl on SCO UNIX.
24028 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24029 echo "configure:24030: checking for strftime in -lintl" >&5
24030 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24031 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24032   echo $ac_n "(cached) $ac_c" 1>&6
24033 else
24034   ac_save_LIBS="$LIBS"
24035 LIBS="-lintl  $LIBS"
24036 cat > conftest.$ac_ext <<EOF
24037 #line 24038 "configure"
24038 #include "confdefs.h"
24039 /* Override any gcc2 internal prototype to avoid an error.  */
24040 /* We use char because int might match the return type of a gcc2
24041     builtin and then its argument prototype would still apply.  */
24042 char strftime();
24043
24044 int main() {
24045 strftime()
24046 ; return 0; }
24047 EOF
24048 if { (eval echo configure:24049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24049   rm -rf conftest*
24050   eval "ac_cv_lib_$ac_lib_var=yes"
24051 else
24052   echo "configure: failed program was:" >&5
24053   cat conftest.$ac_ext >&5
24054   rm -rf conftest*
24055   eval "ac_cv_lib_$ac_lib_var=no"
24056 fi
24057 rm -f conftest*
24058 LIBS="$ac_save_LIBS"
24059
24060 fi
24061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24062   echo "$ac_t""yes" 1>&6
24063   cat >> confdefs.h <<\EOF
24064 #define HAVE_STRFTIME 1
24065 EOF
24066
24067 LIBS="-lintl $LIBS"
24068 else
24069   echo "$ac_t""no" 1>&6
24070 fi
24071
24072 fi
24073
24074
24075 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24076 echo "configure:24077: checking for inet_aton()" >&5
24077 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24078   echo $ac_n "(cached) $ac_c" 1>&6
24079 else
24080   cat > conftest.$ac_ext <<EOF
24081 #line 24082 "configure"
24082 #include "confdefs.h"
24083
24084 #ifdef HAVE_SYS_TYPES_H
24085 #       include <sys/types.h>
24086 #endif
24087 #ifdef HAVE_SYS_SOCKET_H
24088 #       include <sys/socket.h>
24089 #       ifdef HAVE_SYS_SELECT_H
24090 #               include <sys/select.h>
24091 #       endif
24092 #       include <netinet/in.h>
24093 #       ifdef HAVE_ARPA_INET_H
24094 #               include <arpa/inet.h>
24095 #       endif
24096 #endif
24097
24098 int main() {
24099 struct in_addr in;
24100 int rc = inet_aton( "255.255.255.255", &in );
24101 ; return 0; }
24102 EOF
24103 if { (eval echo configure:24104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24104   rm -rf conftest*
24105   ol_cv_func_inet_aton=yes
24106 else
24107   echo "configure: failed program was:" >&5
24108   cat conftest.$ac_ext >&5
24109   rm -rf conftest*
24110   ol_cv_func_inet_aton=no
24111 fi
24112 rm -f conftest*
24113 fi
24114
24115 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24116   if test $ol_cv_func_inet_aton != no; then
24117     cat >> confdefs.h <<\EOF
24118 #define HAVE_INET_ATON 1
24119 EOF
24120
24121   fi
24122  
24123
24124 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24125 echo "configure:24126: checking for _spawnlp" >&5
24126 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24127   echo $ac_n "(cached) $ac_c" 1>&6
24128 else
24129   cat > conftest.$ac_ext <<EOF
24130 #line 24131 "configure"
24131 #include "confdefs.h"
24132 /* System header to define __stub macros and hopefully few prototypes,
24133     which can conflict with char _spawnlp(); below.  */
24134 #include <assert.h>
24135 /* Override any gcc2 internal prototype to avoid an error.  */
24136 /* We use char because int might match the return type of a gcc2
24137     builtin and then its argument prototype would still apply.  */
24138 char _spawnlp();
24139 char (*f)();
24140
24141 int main() {
24142
24143 /* The GNU C library defines this for functions which it implements
24144     to always fail with ENOSYS.  Some functions are actually named
24145     something starting with __ and the normal name is an alias.  */
24146 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24147 choke me
24148 #else
24149 f = _spawnlp;
24150 #endif
24151
24152 ; return 0; }
24153 EOF
24154 if { (eval echo configure:24155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24155   rm -rf conftest*
24156   eval "ac_cv_func__spawnlp=yes"
24157 else
24158   echo "configure: failed program was:" >&5
24159   cat conftest.$ac_ext >&5
24160   rm -rf conftest*
24161   eval "ac_cv_func__spawnlp=no"
24162 fi
24163 rm -f conftest*
24164 fi
24165
24166 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24167   echo "$ac_t""yes" 1>&6
24168   cat >> confdefs.h <<\EOF
24169 #define HAVE_SPAWNLP 1
24170 EOF
24171
24172 else
24173   echo "$ac_t""no" 1>&6
24174 fi
24175
24176
24177 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24178 echo "configure:24179: checking for _snprintf" >&5
24179 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24180   echo $ac_n "(cached) $ac_c" 1>&6
24181 else
24182   cat > conftest.$ac_ext <<EOF
24183 #line 24184 "configure"
24184 #include "confdefs.h"
24185 /* System header to define __stub macros and hopefully few prototypes,
24186     which can conflict with char _snprintf(); below.  */
24187 #include <assert.h>
24188 /* Override any gcc2 internal prototype to avoid an error.  */
24189 /* We use char because int might match the return type of a gcc2
24190     builtin and then its argument prototype would still apply.  */
24191 char _snprintf();
24192 char (*f)();
24193
24194 int main() {
24195
24196 /* The GNU C library defines this for functions which it implements
24197     to always fail with ENOSYS.  Some functions are actually named
24198     something starting with __ and the normal name is an alias.  */
24199 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24200 choke me
24201 #else
24202 f = _snprintf;
24203 #endif
24204
24205 ; return 0; }
24206 EOF
24207 if { (eval echo configure:24208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24208   rm -rf conftest*
24209   eval "ac_cv_func__snprintf=yes"
24210 else
24211   echo "configure: failed program was:" >&5
24212   cat conftest.$ac_ext >&5
24213   rm -rf conftest*
24214   eval "ac_cv_func__snprintf=no"
24215 fi
24216 rm -f conftest*
24217 fi
24218
24219 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24220   echo "$ac_t""yes" 1>&6
24221   ac_cv_func_snprintf=yes
24222         cat >> confdefs.h <<\EOF
24223 #define snprintf _snprintf
24224 EOF
24225
24226
24227 else
24228   echo "$ac_t""no" 1>&6
24229 fi
24230
24231
24232 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24233 echo "configure:24234: checking for _vsnprintf" >&5
24234 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24235   echo $ac_n "(cached) $ac_c" 1>&6
24236 else
24237   cat > conftest.$ac_ext <<EOF
24238 #line 24239 "configure"
24239 #include "confdefs.h"
24240 /* System header to define __stub macros and hopefully few prototypes,
24241     which can conflict with char _vsnprintf(); below.  */
24242 #include <assert.h>
24243 /* Override any gcc2 internal prototype to avoid an error.  */
24244 /* We use char because int might match the return type of a gcc2
24245     builtin and then its argument prototype would still apply.  */
24246 char _vsnprintf();
24247 char (*f)();
24248
24249 int main() {
24250
24251 /* The GNU C library defines this for functions which it implements
24252     to always fail with ENOSYS.  Some functions are actually named
24253     something starting with __ and the normal name is an alias.  */
24254 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24255 choke me
24256 #else
24257 f = _vsnprintf;
24258 #endif
24259
24260 ; return 0; }
24261 EOF
24262 if { (eval echo configure:24263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24263   rm -rf conftest*
24264   eval "ac_cv_func__vsnprintf=yes"
24265 else
24266   echo "configure: failed program was:" >&5
24267   cat conftest.$ac_ext >&5
24268   rm -rf conftest*
24269   eval "ac_cv_func__vsnprintf=no"
24270 fi
24271 rm -f conftest*
24272 fi
24273
24274 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24275   echo "$ac_t""yes" 1>&6
24276   ac_cv_func_vsnprintf=yes
24277         cat >> confdefs.h <<\EOF
24278 #define vsnprintf _vsnprintf
24279 EOF
24280
24281
24282 else
24283   echo "$ac_t""no" 1>&6
24284 fi
24285
24286
24287 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24288 echo "configure:24289: checking for vprintf" >&5
24289 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24290   echo $ac_n "(cached) $ac_c" 1>&6
24291 else
24292   cat > conftest.$ac_ext <<EOF
24293 #line 24294 "configure"
24294 #include "confdefs.h"
24295 /* System header to define __stub macros and hopefully few prototypes,
24296     which can conflict with char vprintf(); below.  */
24297 #include <assert.h>
24298 /* Override any gcc2 internal prototype to avoid an error.  */
24299 /* We use char because int might match the return type of a gcc2
24300     builtin and then its argument prototype would still apply.  */
24301 char vprintf();
24302 char (*f)();
24303
24304 int main() {
24305
24306 /* The GNU C library defines this for functions which it implements
24307     to always fail with ENOSYS.  Some functions are actually named
24308     something starting with __ and the normal name is an alias.  */
24309 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24310 choke me
24311 #else
24312 f = vprintf;
24313 #endif
24314
24315 ; return 0; }
24316 EOF
24317 if { (eval echo configure:24318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24318   rm -rf conftest*
24319   eval "ac_cv_func_vprintf=yes"
24320 else
24321   echo "configure: failed program was:" >&5
24322   cat conftest.$ac_ext >&5
24323   rm -rf conftest*
24324   eval "ac_cv_func_vprintf=no"
24325 fi
24326 rm -f conftest*
24327 fi
24328
24329 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24330   echo "$ac_t""yes" 1>&6
24331   cat >> confdefs.h <<\EOF
24332 #define HAVE_VPRINTF 1
24333 EOF
24334
24335 else
24336   echo "$ac_t""no" 1>&6
24337 fi
24338
24339 if test "$ac_cv_func_vprintf" != yes; then
24340 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24341 echo "configure:24342: checking for _doprnt" >&5
24342 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24343   echo $ac_n "(cached) $ac_c" 1>&6
24344 else
24345   cat > conftest.$ac_ext <<EOF
24346 #line 24347 "configure"
24347 #include "confdefs.h"
24348 /* System header to define __stub macros and hopefully few prototypes,
24349     which can conflict with char _doprnt(); below.  */
24350 #include <assert.h>
24351 /* Override any gcc2 internal prototype to avoid an error.  */
24352 /* We use char because int might match the return type of a gcc2
24353     builtin and then its argument prototype would still apply.  */
24354 char _doprnt();
24355 char (*f)();
24356
24357 int main() {
24358
24359 /* The GNU C library defines this for functions which it implements
24360     to always fail with ENOSYS.  Some functions are actually named
24361     something starting with __ and the normal name is an alias.  */
24362 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24363 choke me
24364 #else
24365 f = _doprnt;
24366 #endif
24367
24368 ; return 0; }
24369 EOF
24370 if { (eval echo configure:24371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24371   rm -rf conftest*
24372   eval "ac_cv_func__doprnt=yes"
24373 else
24374   echo "configure: failed program was:" >&5
24375   cat conftest.$ac_ext >&5
24376   rm -rf conftest*
24377   eval "ac_cv_func__doprnt=no"
24378 fi
24379 rm -f conftest*
24380 fi
24381
24382 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24383   echo "$ac_t""yes" 1>&6
24384   cat >> confdefs.h <<\EOF
24385 #define HAVE_DOPRNT 1
24386 EOF
24387
24388 else
24389   echo "$ac_t""no" 1>&6
24390 fi
24391
24392 fi
24393
24394
24395 if test $ac_cv_func_vprintf = yes ; then
24396                 for ac_func in snprintf vsnprintf
24397 do
24398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24399 echo "configure:24400: checking for $ac_func" >&5
24400 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24401   echo $ac_n "(cached) $ac_c" 1>&6
24402 else
24403   cat > conftest.$ac_ext <<EOF
24404 #line 24405 "configure"
24405 #include "confdefs.h"
24406 /* System header to define __stub macros and hopefully few prototypes,
24407     which can conflict with char $ac_func(); below.  */
24408 #include <assert.h>
24409 /* Override any gcc2 internal prototype to avoid an error.  */
24410 /* We use char because int might match the return type of a gcc2
24411     builtin and then its argument prototype would still apply.  */
24412 char $ac_func();
24413 char (*f)();
24414
24415 int main() {
24416
24417 /* The GNU C library defines this for functions which it implements
24418     to always fail with ENOSYS.  Some functions are actually named
24419     something starting with __ and the normal name is an alias.  */
24420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24421 choke me
24422 #else
24423 f = $ac_func;
24424 #endif
24425
24426 ; return 0; }
24427 EOF
24428 if { (eval echo configure:24429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24429   rm -rf conftest*
24430   eval "ac_cv_func_$ac_func=yes"
24431 else
24432   echo "configure: failed program was:" >&5
24433   cat conftest.$ac_ext >&5
24434   rm -rf conftest*
24435   eval "ac_cv_func_$ac_func=no"
24436 fi
24437 rm -f conftest*
24438 fi
24439
24440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24441   echo "$ac_t""yes" 1>&6
24442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24443   cat >> confdefs.h <<EOF
24444 #define $ac_tr_func 1
24445 EOF
24446  
24447 else
24448   echo "$ac_t""no" 1>&6
24449 fi
24450 done
24451
24452 fi
24453
24454 for ac_func in \
24455         bcopy                   \
24456         closesocket             \
24457         chroot                  \
24458         endgrent                \
24459         endpwent                \
24460         fcntl                   \
24461         flock                   \
24462         fstat                   \
24463         getdtablesize   \
24464         getgrgid                \
24465         gethostname             \
24466         getpass                 \
24467         getpassphrase   \
24468         getpwuid                \
24469         getpwnam                \
24470         getspnam                \
24471         gettimeofday    \
24472         initgroups              \
24473         lockf                   \
24474         memcpy                  \
24475         memmove                 \
24476         mkstemp                 \
24477         mktemp                  \
24478         pipe                    \
24479         read                    \
24480         recv                    \
24481         recvfrom                \
24482         setpwfile               \
24483         setgid                  \
24484         setegid                 \
24485         setsid                  \
24486         setuid                  \
24487         seteuid                 \
24488         signal                  \
24489         strdup                  \
24490         strpbrk                 \
24491         strrchr                 \
24492         strsep                  \
24493         strstr                  \
24494         strtol                  \
24495         strtoul                 \
24496         strtoq                  \
24497         strtouq                 \
24498         strtoll                 \
24499         strspn                  \
24500         sysconf                 \
24501         usleep                  \
24502         waitpid                 \
24503         wait4                   \
24504         write                   \
24505         send                    \
24506         sendmsg                 \
24507         sendto                  \
24508
24509 do
24510 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24511 echo "configure:24512: checking for $ac_func" >&5
24512 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24513   echo $ac_n "(cached) $ac_c" 1>&6
24514 else
24515   cat > conftest.$ac_ext <<EOF
24516 #line 24517 "configure"
24517 #include "confdefs.h"
24518 /* System header to define __stub macros and hopefully few prototypes,
24519     which can conflict with char $ac_func(); below.  */
24520 #include <assert.h>
24521 /* Override any gcc2 internal prototype to avoid an error.  */
24522 /* We use char because int might match the return type of a gcc2
24523     builtin and then its argument prototype would still apply.  */
24524 char $ac_func();
24525 char (*f)();
24526
24527 int main() {
24528
24529 /* The GNU C library defines this for functions which it implements
24530     to always fail with ENOSYS.  Some functions are actually named
24531     something starting with __ and the normal name is an alias.  */
24532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24533 choke me
24534 #else
24535 f = $ac_func;
24536 #endif
24537
24538 ; return 0; }
24539 EOF
24540 if { (eval echo configure:24541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24541   rm -rf conftest*
24542   eval "ac_cv_func_$ac_func=yes"
24543 else
24544   echo "configure: failed program was:" >&5
24545   cat conftest.$ac_ext >&5
24546   rm -rf conftest*
24547   eval "ac_cv_func_$ac_func=no"
24548 fi
24549 rm -f conftest*
24550 fi
24551
24552 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24553   echo "$ac_t""yes" 1>&6
24554     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24555   cat >> confdefs.h <<EOF
24556 #define $ac_tr_func 1
24557 EOF
24558  
24559 else
24560   echo "$ac_t""no" 1>&6
24561 fi
24562 done
24563
24564
24565 for ac_func in getopt getpeereid
24566 do
24567 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24568 echo "configure:24569: checking for $ac_func" >&5
24569 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24570   echo $ac_n "(cached) $ac_c" 1>&6
24571 else
24572   cat > conftest.$ac_ext <<EOF
24573 #line 24574 "configure"
24574 #include "confdefs.h"
24575 /* System header to define __stub macros and hopefully few prototypes,
24576     which can conflict with char $ac_func(); below.  */
24577 #include <assert.h>
24578 /* Override any gcc2 internal prototype to avoid an error.  */
24579 /* We use char because int might match the return type of a gcc2
24580     builtin and then its argument prototype would still apply.  */
24581 char $ac_func();
24582 char (*f)();
24583
24584 int main() {
24585
24586 /* The GNU C library defines this for functions which it implements
24587     to always fail with ENOSYS.  Some functions are actually named
24588     something starting with __ and the normal name is an alias.  */
24589 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24590 choke me
24591 #else
24592 f = $ac_func;
24593 #endif
24594
24595 ; return 0; }
24596 EOF
24597 if { (eval echo configure:24598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24598   rm -rf conftest*
24599   eval "ac_cv_func_$ac_func=yes"
24600 else
24601   echo "configure: failed program was:" >&5
24602   cat conftest.$ac_ext >&5
24603   rm -rf conftest*
24604   eval "ac_cv_func_$ac_func=no"
24605 fi
24606 rm -f conftest*
24607 fi
24608
24609 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24610   echo "$ac_t""yes" 1>&6
24611     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24612   cat >> confdefs.h <<EOF
24613 #define $ac_tr_func 1
24614 EOF
24615  
24616 else
24617   echo "$ac_t""no" 1>&6
24618 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24619 fi
24620 done
24621
24622
24623
24624 if test "$ac_cv_func_getopt" != yes; then
24625         LIBSRCS="$LIBSRCS getopt.c"
24626 fi
24627 if test "$ac_cv_func_getpeereid" != yes; then
24628         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24629 echo "configure:24630: checking for msg_accrights in msghdr" >&5
24630 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24631   echo $ac_n "(cached) $ac_c" 1>&6
24632 else
24633   cat > conftest.$ac_ext <<EOF
24634 #line 24635 "configure"
24635 #include "confdefs.h"
24636 #include <sys/socket.h>
24637 int main() {
24638 struct msghdr m; m.msg_accrightslen=0
24639 ; return 0; }
24640 EOF
24641 if { (eval echo configure:24642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24642   rm -rf conftest*
24643   ol_cv_msghdr_msg_accrights=yes
24644 else
24645   echo "configure: failed program was:" >&5
24646   cat conftest.$ac_ext >&5
24647   rm -rf conftest*
24648   ol_cv_msghdr_msg_accrights=no
24649 fi
24650 rm -f conftest*
24651         
24652 fi
24653
24654 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24655   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24656         cat >> confdefs.h <<\EOF
24657 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24658 EOF
24659
24660   fi
24661
24662         if test "$ac_cv_func_getpeereid" != yes; then
24663                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24664 echo "configure:24665: checking for msg_control in msghdr" >&5
24665 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24666   echo $ac_n "(cached) $ac_c" 1>&6
24667 else
24668   cat > conftest.$ac_ext <<EOF
24669 #line 24670 "configure"
24670 #include "confdefs.h"
24671 #include <sys/socket.h>
24672 int main() {
24673 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24674 ; return 0; }
24675 EOF
24676 if { (eval echo configure:24677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24677   rm -rf conftest*
24678   ol_cv_msghdr_msg_control=yes
24679 else
24680   echo "configure: failed program was:" >&5
24681   cat conftest.$ac_ext >&5
24682   rm -rf conftest*
24683   ol_cv_msghdr_msg_control=no
24684 fi
24685 rm -f conftest*
24686         
24687 fi
24688
24689 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24690   if test $ol_cv_msghdr_msg_control = "yes" ; then
24691         cat >> confdefs.h <<\EOF
24692 #define HAVE_MSGHDR_MSG_CONTROL 1
24693 EOF
24694
24695   fi
24696
24697         fi
24698         LIBSRCS="$LIBSRCS getpeereid.c"
24699 fi
24700 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24701         if test "$ac_cv_func_snprintf" != yes; then
24702                 cat >> confdefs.h <<\EOF
24703 #define snprintf ber_pvt_snprintf
24704 EOF
24705
24706         fi
24707         if test "$ac_cv_func_vsnprintf" != yes; then
24708                 cat >> confdefs.h <<\EOF
24709 #define vsnprintf ber_pvt_vsnprintf
24710 EOF
24711
24712         fi
24713 fi
24714
24715
24716 if test "$ol_enable_slapi" != no ; then
24717                         for ac_hdr in ltdl.h
24718 do
24719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24721 echo "configure:24722: checking for $ac_hdr" >&5
24722 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24723   echo $ac_n "(cached) $ac_c" 1>&6
24724 else
24725   cat > conftest.$ac_ext <<EOF
24726 #line 24727 "configure"
24727 #include "confdefs.h"
24728 #include <$ac_hdr>
24729 EOF
24730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24731 { (eval echo configure:24732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24733 if test -z "$ac_err"; then
24734   rm -rf conftest*
24735   eval "ac_cv_header_$ac_safe=yes"
24736 else
24737   echo "$ac_err" >&5
24738   echo "configure: failed program was:" >&5
24739   cat conftest.$ac_ext >&5
24740   rm -rf conftest*
24741   eval "ac_cv_header_$ac_safe=no"
24742 fi
24743 rm -f conftest*
24744 fi
24745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24746   echo "$ac_t""yes" 1>&6
24747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24748   cat >> confdefs.h <<EOF
24749 #define $ac_tr_hdr 1
24750 EOF
24751  
24752 else
24753   echo "$ac_t""no" 1>&6
24754 fi
24755 done
24756
24757
24758         if test $ac_cv_header_ltdl_h != yes ; then
24759                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24760         fi
24761         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24762 echo "configure:24763: checking for lt_dlinit in -lltdl" >&5
24763 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24764 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24765   echo $ac_n "(cached) $ac_c" 1>&6
24766 else
24767   ac_save_LIBS="$LIBS"
24768 LIBS="-lltdl  $LIBS"
24769 cat > conftest.$ac_ext <<EOF
24770 #line 24771 "configure"
24771 #include "confdefs.h"
24772 /* Override any gcc2 internal prototype to avoid an error.  */
24773 /* We use char because int might match the return type of a gcc2
24774     builtin and then its argument prototype would still apply.  */
24775 char lt_dlinit();
24776
24777 int main() {
24778 lt_dlinit()
24779 ; return 0; }
24780 EOF
24781 if { (eval echo configure:24782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24782   rm -rf conftest*
24783   eval "ac_cv_lib_$ac_lib_var=yes"
24784 else
24785   echo "configure: failed program was:" >&5
24786   cat conftest.$ac_ext >&5
24787   rm -rf conftest*
24788   eval "ac_cv_lib_$ac_lib_var=no"
24789 fi
24790 rm -f conftest*
24791 LIBS="$ac_save_LIBS"
24792
24793 fi
24794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24795   echo "$ac_t""yes" 1>&6
24796   
24797                 SLAPI_LIBS=-lltdl
24798                 LIBSLAPI=libslapi.a
24799                 LIBSLAPITOOLS=../libslapi.a
24800                 cat >> confdefs.h <<\EOF
24801 #define HAVE_LIBLTDL 1
24802 EOF
24803
24804         
24805 else
24806   echo "$ac_t""no" 1>&6
24807 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24808 fi
24809
24810
24811         cat >> confdefs.h <<\EOF
24812 #define LDAP_SLAPI 1
24813 EOF
24814
24815 fi
24816
24817 if test "$ol_enable_debug" != no ; then
24818         cat >> confdefs.h <<\EOF
24819 #define LDAP_DEBUG 1
24820 EOF
24821
24822 fi
24823 if test "$ol_enable_syslog" = yes ; then
24824         cat >> confdefs.h <<\EOF
24825 #define LDAP_SYSLOG 1
24826 EOF
24827
24828 fi
24829 if test "$ol_link_kbind" != no ; then
24830         cat >> confdefs.h <<\EOF
24831 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24832 EOF
24833
24834 fi
24835 if test "$ol_enable_proctitle" != no ; then
24836         cat >> confdefs.h <<\EOF
24837 #define LDAP_PROCTITLE 1
24838 EOF
24839
24840 fi
24841 if test "$ol_enable_referrals" != no ; then
24842         cat >> confdefs.h <<\EOF
24843 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24844 EOF
24845
24846 fi
24847 if test "$ol_enable_local" != no; then
24848         cat >> confdefs.h <<\EOF
24849 #define LDAP_PF_LOCAL 1
24850 EOF
24851
24852 fi
24853 if test "$ol_link_ipv6" != no; then
24854         cat >> confdefs.h <<\EOF
24855 #define LDAP_PF_INET6 1
24856 EOF
24857
24858 fi
24859 if test "$ol_enable_cleartext" != no ; then
24860         cat >> confdefs.h <<\EOF
24861 #define SLAPD_CLEARTEXT 1
24862 EOF
24863
24864 fi
24865 if test "$ol_enable_crypt" != no ; then
24866         cat >> confdefs.h <<\EOF
24867 #define SLAPD_CRYPT 1
24868 EOF
24869
24870 fi
24871 if test "$ol_link_spasswd" != no ; then
24872         cat >> confdefs.h <<\EOF
24873 #define SLAPD_SPASSWD 1
24874 EOF
24875
24876 fi
24877 if test "$ol_enable_multimaster" != no ; then
24878         cat >> confdefs.h <<\EOF
24879 #define SLAPD_MULTIMASTER 1
24880 EOF
24881
24882 fi
24883 if test "$ol_enable_rlookups" != no ; then
24884         cat >> confdefs.h <<\EOF
24885 #define SLAPD_RLOOKUPS 1
24886 EOF
24887
24888 fi
24889 if test "$ol_enable_aci" != no ; then
24890         cat >> confdefs.h <<\EOF
24891 #define SLAPD_ACI_ENABLED 1
24892 EOF
24893
24894 fi
24895
24896 if test "$ol_link_modules" != no ; then
24897         cat >> confdefs.h <<\EOF
24898 #define SLAPD_MODULES 1
24899 EOF
24900
24901         BUILD_SLAPD=yes
24902         SLAPD_MODULES_LDFLAGS="-dlopen self"
24903 fi
24904
24905 cat >> confdefs.h <<\EOF
24906 #define SLAPD_MOD_STATIC 1
24907 EOF
24908
24909 cat >> confdefs.h <<\EOF
24910 #define SLAPD_MOD_DYNAMIC 2
24911 EOF
24912
24913
24914 if test "$ol_enable_bdb" != no ; then
24915         BUILD_SLAPD=yes
24916         BUILD_BDB=$ol_enable_bdb
24917         if test "$ol_enable_bdb" = mod ; then
24918                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24919                 MFLAG=SLAPD_MOD_DYNAMIC
24920         else
24921                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24922                 MFLAG=SLAPD_MOD_STATIC
24923         fi
24924         cat >> confdefs.h <<EOF
24925 #define SLAPD_BDB $MFLAG
24926 EOF
24927
24928 fi
24929
24930 if test "$ol_enable_dnssrv" != no ; then
24931         BUILD_SLAPD=yes
24932         BUILD_DNSSRV=$ol_enable_dnssrv
24933         if test "$ol_enable_dnssrv" = mod ; then
24934                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24935                 MFLAG=SLAPD_MOD_DYNAMIC
24936         else
24937                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24938                 MFLAG=SLAPD_MOD_STATIC
24939         fi
24940         cat >> confdefs.h <<EOF
24941 #define SLAPD_DNSSRV $MFLAG
24942 EOF
24943
24944 fi
24945
24946 if test "$ol_enable_hdb" != no ; then
24947         BUILD_SLAPD=yes
24948         BUILD_HDB=$ol_enable_hdb
24949         if test "$ol_enable_hdb" = mod ; then
24950                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24951                 MFLAG=SLAPD_MOD_DYNAMIC
24952         else
24953                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24954                 MFLAG=SLAPD_MOD_STATIC
24955         fi
24956         cat >> confdefs.h <<EOF
24957 #define SLAPD_HDB $MFLAG
24958 EOF
24959
24960 fi
24961
24962 if test "$ol_enable_ldap" != no ; then
24963         BUILD_SLAPD=yes
24964         BUILD_LDAP=$ol_enable_ldap
24965         if test "$ol_enable_ldap" = mod ; then
24966                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24967                 MFLAG=SLAPD_MOD_DYNAMIC
24968         else
24969                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24970                 MFLAG=SLAPD_MOD_STATIC
24971         fi
24972         cat >> confdefs.h <<EOF
24973 #define SLAPD_LDAP $MFLAG
24974 EOF
24975
24976 fi
24977
24978 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24979         BUILD_SLAPD=yes
24980         BUILD_LDBM=$ol_enable_ldbm
24981         if test "$ol_enable_ldbm" = mod ; then
24982                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24983                 MFLAG=SLAPD_MOD_DYNAMIC
24984         else
24985                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24986                 MFLAG=SLAPD_MOD_STATIC
24987         fi
24988         cat >> confdefs.h <<EOF
24989 #define SLAPD_LDBM $MFLAG
24990 EOF
24991
24992 fi
24993
24994 if test "$ol_enable_meta" != no ; then
24995         BUILD_SLAPD=yes
24996         BUILD_META=$ol_enable_meta
24997         BUILD_REWRITE=yes
24998         if test "$ol_enable_meta" = mod ; then
24999                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25000                 MFLAG=SLAPD_MOD_DYNAMIC
25001         else
25002                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25003                 MFLAG=SLAPD_MOD_STATIC
25004         fi
25005         cat >> confdefs.h <<EOF
25006 #define SLAPD_META $MFLAG
25007 EOF
25008
25009 fi
25010
25011 if test "$ol_enable_monitor" != no ; then
25012         BUILD_SLAPD=yes
25013         BUILD_MONITOR=$ol_enable_monitor
25014         if test "$ol_enable_monitor" = mod ; then
25015                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25016                 MFLAG=SLAPD_MOD_DYNAMIC
25017         else
25018                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25019                 MFLAG=SLAPD_MOD_STATIC
25020         fi
25021         cat >> confdefs.h <<EOF
25022 #define SLAPD_MONITOR $MFLAG
25023 EOF
25024
25025 fi
25026
25027 if test "$ol_enable_null" != no ; then
25028         BUILD_SLAPD=yes
25029         BUILD_NULL=$ol_enable_null
25030         if test "$ol_enable_null" = mod ; then
25031                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25032                 MFLAG=SLAPD_MOD_DYNAMIC
25033         else
25034                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25035                 MFLAG=SLAPD_MOD_STATIC
25036         fi
25037         cat >> confdefs.h <<EOF
25038 #define SLAPD_NULL $MFLAG
25039 EOF
25040
25041 fi
25042
25043 if test "$ol_enable_passwd" != no ; then
25044         BUILD_SLAPD=yes
25045         BUILD_PASSWD=$ol_enable_passwd
25046         if test "$ol_enable_passwd" = mod ; then
25047                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25048                 MFLAG=SLAPD_MOD_DYNAMIC
25049         else
25050                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25051                 MFLAG=SLAPD_MOD_STATIC
25052         fi
25053         cat >> confdefs.h <<EOF
25054 #define SLAPD_PASSWD $MFLAG
25055 EOF
25056
25057 fi
25058
25059 if test "$ol_link_perl" != no ; then
25060         BUILD_SLAPD=yes
25061         BUILD_PERL=$ol_enable_perl
25062         if test "$ol_enable_perl" = mod ; then
25063                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25064                 MFLAG=SLAPD_MOD_DYNAMIC
25065         else
25066                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25067                 MFLAG=SLAPD_MOD_STATIC
25068         fi
25069         cat >> confdefs.h <<EOF
25070 #define SLAPD_PERL $MFLAG
25071 EOF
25072
25073 fi
25074
25075 if test "$ol_enable_relay" != no ; then
25076         BUILD_SLAPD=yes
25077         BUILD_RELAY=$ol_enable_relay
25078         if test "$ol_enable_relay" = mod ; then
25079                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25080                 MFLAG=SLAPD_MOD_DYNAMIC
25081         else
25082                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25083                 MFLAG=SLAPD_MOD_STATIC
25084         fi
25085         cat >> confdefs.h <<EOF
25086 #define SLAPD_RELAY $MFLAG
25087 EOF
25088
25089 fi
25090
25091 if test "$ol_enable_shell" != no ; then
25092         if test "$ol_link_thread" != no ; then
25093                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25094         fi
25095         BUILD_SLAPD=yes
25096         BUILD_SHELL=$ol_enable_shell
25097         if test "$ol_enable_shell" = mod ; then
25098                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25099                 MFLAG=SLAPD_MOD_DYNAMIC
25100         else
25101                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25102                 MFLAG=SLAPD_MOD_STATIC
25103         fi
25104         cat >> confdefs.h <<EOF
25105 #define SLAPD_SHELL $MFLAG
25106 EOF
25107
25108 fi
25109
25110 if test "$ol_link_sql" != no ; then
25111         BUILD_SLAPD=yes
25112         BUILD_SQL=$ol_enable_sql
25113         if test "$ol_enable_sql" = mod; then
25114                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25115                 MFLAG=SLAPD_MOD_DYNAMIC
25116         else
25117                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25118                 MFLAG=SLAPD_MOD_STATIC
25119         fi
25120         cat >> confdefs.h <<EOF
25121 #define SLAPD_SQL $MFLAG
25122 EOF
25123
25124 fi
25125
25126 if test "$ol_enable_denyop" != no ; then
25127         BUILD_DENYOP=$ol_enable_denyop
25128         if test "$ol_enable_denyop" = mod ; then
25129                 MFLAG=SLAPD_MOD_DYNAMIC
25130                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25131         else
25132                 MFLAG=SLAPD_MOD_STATIC
25133                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25134         fi
25135         cat >> confdefs.h <<EOF
25136 #define SLAPD_OVER_DENYOP $MFLAG
25137 EOF
25138
25139 fi
25140
25141 if test "$ol_enable_dyngroup" != no ; then
25142         BUILD_DYNGROUP=$ol_enable_dyngroup
25143         if test "$ol_enable_dyngroup" = mod ; then
25144                 MFLAG=SLAPD_MOD_DYNAMIC
25145                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25146         else
25147                 MFLAG=SLAPD_MOD_STATIC
25148                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25149         fi
25150         cat >> confdefs.h <<EOF
25151 #define SLAPD_OVER_DYNGROUP $MFLAG
25152 EOF
25153
25154 fi
25155
25156 if test "$ol_enable_dynlist" != no ; then
25157         BUILD_DYNLIST=$ol_enable_dynlist
25158         if test "$ol_enable_dynlist" = mod ; then
25159                 MFLAG=SLAPD_MOD_DYNAMIC
25160                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25161         else
25162                 MFLAG=SLAPD_MOD_STATIC
25163                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25164         fi
25165         cat >> confdefs.h <<EOF
25166 #define SLAPD_OVER_DYNLIST $MFLAG
25167 EOF
25168
25169 fi
25170
25171 if test "$ol_enable_glue" != no ; then
25172         BUILD_GLUE=$ol_enable_glue
25173         if test "$ol_enable_glue" = mod ; then
25174                 MFLAG=SLAPD_MOD_DYNAMIC
25175                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25176         else
25177                 MFLAG=SLAPD_MOD_STATIC
25178                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25179         fi
25180         cat >> confdefs.h <<EOF
25181 #define SLAPD_OVER_GLUE $MFLAG
25182 EOF
25183
25184 fi
25185
25186 if test "$ol_enable_lastmod" != no ; then
25187         BUILD_LASTMOD=$ol_enable_lastmod
25188         if test "$ol_enable_lastmod" = mod ; then
25189                 MFLAG=SLAPD_MOD_DYNAMIC
25190                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25191         else
25192                 MFLAG=SLAPD_MOD_STATIC
25193                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25194         fi
25195         cat >> confdefs.h <<EOF
25196 #define SLAPD_OVER_LASTMOD $MFLAG
25197 EOF
25198
25199 fi
25200
25201 if test "$ol_enable_ppolicy" != no ; then
25202         BUILD_PPOLICY=$ol_enable_ppolicy
25203         if test "$ol_enable_ppolicy" = mod ; then
25204                 MFLAG=SLAPD_MOD_DYNAMIC
25205                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25206         else
25207                 MFLAG=SLAPD_MOD_STATIC
25208                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25209         fi
25210         cat >> confdefs.h <<EOF
25211 #define SLAPD_OVER_PPOLICY $MFLAG
25212 EOF
25213
25214 fi
25215
25216 if test "$ol_enable_proxycache" != no ; then
25217         BUILD_PROXYCACHE=$ol_enable_proxycache
25218         if test "$ol_enable_proxycache" = mod ; then
25219                 MFLAG=SLAPD_MOD_DYNAMIC
25220                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25221         else
25222                 MFLAG=SLAPD_MOD_STATIC
25223                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25224         fi
25225         cat >> confdefs.h <<EOF
25226 #define SLAPD_OVER_PROXYCACHE $MFLAG
25227 EOF
25228
25229 fi
25230
25231 if test "$ol_enable_refint" != no ; then
25232         BUILD_REFINT=$ol_enable_refint
25233         if test "$ol_enable_refint" = mod ; then
25234                 MFLAG=SLAPD_MOD_DYNAMIC
25235                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25236         else
25237                 MFLAG=SLAPD_MOD_STATIC
25238                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25239         fi
25240         cat >> confdefs.h <<EOF
25241 #define SLAPD_OVER_REFINT $MFLAG
25242 EOF
25243
25244 fi
25245
25246 if test "$ol_enable_rwm" != no ; then
25247         BUILD_REWRITE=yes
25248         BUILD_RWM=$ol_enable_rwm
25249         if test "$ol_enable_rwm" = mod ; then
25250                 MFLAG=SLAPD_MOD_DYNAMIC
25251                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25252         else
25253                 MFLAG=SLAPD_MOD_STATIC
25254                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25255         fi
25256         cat >> confdefs.h <<EOF
25257 #define SLAPD_OVER_RWM $MFLAG
25258 EOF
25259
25260 fi
25261
25262 if test "$ol_enable_syncprov" != no ; then
25263         BUILD_SYNCPROV=$ol_enable_syncprov
25264         if test "$ol_enable_syncprov" = mod ; then
25265                 MFLAG=SLAPD_MOD_DYNAMIC
25266                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25267         else
25268                 MFLAG=SLAPD_MOD_STATIC
25269                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25270         fi
25271         cat >> confdefs.h <<EOF
25272 #define SLAPD_OVER_SYNCPROV $MFLAG
25273 EOF
25274
25275 fi
25276
25277 if test "$ol_enable_translucent" != no ; then
25278         BUILD_TRANSLUCENT=$ol_enable_translucent
25279         if test "$ol_enable_translucent" = mod ; then
25280                 MFLAG=SLAPD_MOD_DYNAMIC
25281                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25282         else
25283                 MFLAG=SLAPD_MOD_STATIC
25284                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25285         fi
25286         cat >> confdefs.h <<EOF
25287 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25288 EOF
25289
25290 fi
25291
25292 if test "$ol_enable_unique" != no ; then
25293         BUILD_UNIQUE=$ol_enable_unique
25294         if test "$ol_enable_unique" = mod ; then
25295                 MFLAG=SLAPD_MOD_DYNAMIC
25296                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25297         else
25298                 MFLAG=SLAPD_MOD_STATIC
25299                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25300         fi
25301         cat >> confdefs.h <<EOF
25302 #define SLAPD_OVER_UNIQUE $MFLAG
25303 EOF
25304
25305 fi
25306
25307 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25308         $BUILD_SLAPD = yes ; then
25309         BUILD_SLURPD=yes
25310 fi
25311
25312 if test "$ol_enable_rewrite" != no ; then
25313         cat >> confdefs.h <<\EOF
25314 #define ENABLE_REWRITE 1
25315 EOF
25316
25317         BUILD_REWRITE=yes
25318 fi
25319
25320 if test "$ol_enable_slapi" != no ; then
25321         cat >> confdefs.h <<\EOF
25322 #define ENABLE_SLAPI 1
25323 EOF
25324
25325         BUILD_SLAPI=yes
25326         SLAPD_SLAPI_DEPEND=libslapi.a
25327 fi
25328
25329
25330
25331 if test "$ac_cv_mingw32" = yes ; then
25332         PLAT=NT
25333         SLAPD_MODULES_LDFLAGS=
25334 else
25335         PLAT=UNIX
25336 fi
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346   
25347   
25348   
25349   
25350   
25351   
25352   
25353   
25354   
25355   
25356   
25357   
25358   
25359   
25360   
25361   
25362   
25363   
25364   
25365   
25366   
25367   
25368   
25369   
25370   
25371   
25372   
25373   
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414 # Check whether --with-xxinstall or --without-xxinstall was given.
25415 if test "${with_xxinstall+set}" = set; then
25416   withval="$with_xxinstall"
25417   :
25418 fi
25419
25420
25421
25422 trap '' 1 2 15
25423
25424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25425
25426 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25427 # Let make expand exec_prefix.
25428 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25429
25430 # Any assignment to VPATH causes Sun make to only execute
25431 # the first set of double-colon rules, so remove it if not needed.
25432 # If there is a colon in the path, we need to keep it.
25433 if test "x$srcdir" = x.; then
25434   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25435 fi
25436
25437 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25438
25439 DEFS=-DHAVE_CONFIG_H
25440
25441 # Without the "./", some shells look in PATH for config.status.
25442 : ${CONFIG_STATUS=./config.status}
25443
25444 echo creating $CONFIG_STATUS
25445 rm -f $CONFIG_STATUS
25446 cat > $CONFIG_STATUS <<EOF
25447 #! /bin/sh
25448 # Generated automatically by configure.
25449 # Run this file to recreate the current configuration.
25450 # This directory was configured as follows,
25451 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25452 #
25453 # $0 $ac_configure_args
25454 #
25455 # Compiler output produced by configure, useful for debugging
25456 # configure, is in ./config.log if it exists.
25457
25458 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25459 for ac_option
25460 do
25461   case "\$ac_option" in
25462   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25463     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25464     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25465   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25466     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25467     exit 0 ;;
25468   -help | --help | --hel | --he | --h)
25469     echo "\$ac_cs_usage"; exit 0 ;;
25470   *) echo "\$ac_cs_usage"; exit 1 ;;
25471   esac
25472 done
25473
25474 ac_given_srcdir=$srcdir
25475 ac_given_INSTALL="$INSTALL"
25476
25477 trap 'rm -fr `echo "\
25478 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25479 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25480 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25481 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25482 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25483 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25484 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25485 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25486 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25487 include/Makefile:build/top.mk:include/Makefile.in \
25488 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25489 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25490 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25491 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25492 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25493 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25494 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25495 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25496 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25497 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25498 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25499 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25500 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25501 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25502 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25503 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25504 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25505 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25506 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25507 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25508 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25509 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25510 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25511 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25512 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25513 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25514 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25515 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25516 tests/run \
25517 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25518  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25519 EOF
25520 cat >> $CONFIG_STATUS <<EOF
25521
25522 # Protect against being on the right side of a sed subst in config.status.
25523 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25524  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25525 $ac_vpsub
25526 $extrasub
25527 s%@SHELL@%$SHELL%g
25528 s%@CFLAGS@%$CFLAGS%g
25529 s%@CPPFLAGS@%$CPPFLAGS%g
25530 s%@CXXFLAGS@%$CXXFLAGS%g
25531 s%@FFLAGS@%$FFLAGS%g
25532 s%@DEFS@%$DEFS%g
25533 s%@LDFLAGS@%$LDFLAGS%g
25534 s%@LIBS@%$LIBS%g
25535 s%@exec_prefix@%$exec_prefix%g
25536 s%@prefix@%$prefix%g
25537 s%@program_transform_name@%$program_transform_name%g
25538 s%@bindir@%$bindir%g
25539 s%@sbindir@%$sbindir%g
25540 s%@libexecdir@%$libexecdir%g
25541 s%@datadir@%$datadir%g
25542 s%@sysconfdir@%$sysconfdir%g
25543 s%@sharedstatedir@%$sharedstatedir%g
25544 s%@localstatedir@%$localstatedir%g
25545 s%@libdir@%$libdir%g
25546 s%@includedir@%$includedir%g
25547 s%@oldincludedir@%$oldincludedir%g
25548 s%@infodir@%$infodir%g
25549 s%@mandir@%$mandir%g
25550 s%@host@%$host%g
25551 s%@host_alias@%$host_alias%g
25552 s%@host_cpu@%$host_cpu%g
25553 s%@host_vendor@%$host_vendor%g
25554 s%@host_os@%$host_os%g
25555 s%@target@%$target%g
25556 s%@target_alias@%$target_alias%g
25557 s%@target_cpu@%$target_cpu%g
25558 s%@target_vendor@%$target_vendor%g
25559 s%@target_os@%$target_os%g
25560 s%@build@%$build%g
25561 s%@build_alias@%$build_alias%g
25562 s%@build_cpu@%$build_cpu%g
25563 s%@build_vendor@%$build_vendor%g
25564 s%@build_os@%$build_os%g
25565 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25566 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25567 s%@INSTALL_DATA@%$INSTALL_DATA%g
25568 s%@PACKAGE@%$PACKAGE%g
25569 s%@VERSION@%$VERSION%g
25570 s%@ACLOCAL@%$ACLOCAL%g
25571 s%@AUTOCONF@%$AUTOCONF%g
25572 s%@AUTOMAKE@%$AUTOMAKE%g
25573 s%@AUTOHEADER@%$AUTOHEADER%g
25574 s%@MAKEINFO@%$MAKEINFO%g
25575 s%@install_sh@%$install_sh%g
25576 s%@AMTAR@%$AMTAR%g
25577 s%@AWK@%$AWK%g
25578 s%@AMTARFLAGS@%$AMTARFLAGS%g
25579 s%@SET_MAKE@%$SET_MAKE%g
25580 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25581 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25582 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25583 s%@top_builddir@%$top_builddir%g
25584 s%@ldap_subdir@%$ldap_subdir%g
25585 s%@CC@%$CC%g
25586 s%@AR@%$AR%g
25587 s%@LN_S@%$LN_S%g
25588 s%@OBJEXT@%$OBJEXT%g
25589 s%@EXEEXT@%$EXEEXT%g
25590 s%@ECHO@%$ECHO%g
25591 s%@RANLIB@%$RANLIB%g
25592 s%@STRIP@%$STRIP%g
25593 s%@DLLTOOL@%$DLLTOOL%g
25594 s%@AS@%$AS%g
25595 s%@OBJDUMP@%$OBJDUMP%g
25596 s%@CPP@%$CPP%g
25597 s%@LIBTOOL@%$LIBTOOL%g
25598 s%@PERLBIN@%$PERLBIN%g
25599 s%@OL_MKDEP@%$OL_MKDEP%g
25600 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25601 s%@LTSTATIC@%$LTSTATIC%g
25602 s%@LIBOBJS@%$LIBOBJS%g
25603 s%@LIBSRCS@%$LIBSRCS%g
25604 s%@PLAT@%$PLAT%g
25605 s%@WITH_SASL@%$WITH_SASL%g
25606 s%@WITH_TLS@%$WITH_TLS%g
25607 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25608 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25609 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25610 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25611 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25612 s%@BUILD_BDB@%$BUILD_BDB%g
25613 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25614 s%@BUILD_HDB@%$BUILD_HDB%g
25615 s%@BUILD_LDAP@%$BUILD_LDAP%g
25616 s%@BUILD_LDBM@%$BUILD_LDBM%g
25617 s%@BUILD_META@%$BUILD_META%g
25618 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25619 s%@BUILD_NULL@%$BUILD_NULL%g
25620 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25621 s%@BUILD_RELAY@%$BUILD_RELAY%g
25622 s%@BUILD_PERL@%$BUILD_PERL%g
25623 s%@BUILD_SHELL@%$BUILD_SHELL%g
25624 s%@BUILD_SQL@%$BUILD_SQL%g
25625 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
25626 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25627 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25628 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25629 s%@BUILD_GLUE@%$BUILD_GLUE%g
25630 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25631 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25632 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25633 s%@BUILD_REFINT@%$BUILD_REFINT%g
25634 s%@BUILD_RWM@%$BUILD_RWM%g
25635 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25636 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25637 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25638 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25639 s%@LDAP_LIBS@%$LDAP_LIBS%g
25640 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25641 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25642 s%@LDBM_LIBS@%$LDBM_LIBS%g
25643 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25644 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25645 s%@WRAP_LIBS@%$WRAP_LIBS%g
25646 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25647 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25648 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25649 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25650 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25651 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25652 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25653 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25654 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25655 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25656 s%@KRB4_LIBS@%$KRB4_LIBS%g
25657 s%@KRB5_LIBS@%$KRB5_LIBS%g
25658 s%@SASL_LIBS@%$SASL_LIBS%g
25659 s%@TLS_LIBS@%$TLS_LIBS%g
25660 s%@MODULES_LIBS@%$MODULES_LIBS%g
25661 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25662 s%@LIBSLAPI@%$LIBSLAPI%g
25663 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25664 s%@AUTH_LIBS@%$AUTH_LIBS%g
25665 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25666 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25667 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25668 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25669 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25670
25671 CEOF
25672 EOF
25673
25674 cat >> $CONFIG_STATUS <<\EOF
25675
25676 # Split the substitutions into bite-sized pieces for seds with
25677 # small command number limits, like on Digital OSF/1 and HP-UX.
25678 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25679 ac_file=1 # Number of current file.
25680 ac_beg=1 # First line for current file.
25681 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25682 ac_more_lines=:
25683 ac_sed_cmds=""
25684 while $ac_more_lines; do
25685   if test $ac_beg -gt 1; then
25686     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25687   else
25688     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25689   fi
25690   if test ! -s conftest.s$ac_file; then
25691     ac_more_lines=false
25692     rm -f conftest.s$ac_file
25693   else
25694     if test -z "$ac_sed_cmds"; then
25695       ac_sed_cmds="sed -f conftest.s$ac_file"
25696     else
25697       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25698     fi
25699     ac_file=`expr $ac_file + 1`
25700     ac_beg=$ac_end
25701     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25702   fi
25703 done
25704 if test -z "$ac_sed_cmds"; then
25705   ac_sed_cmds=cat
25706 fi
25707 EOF
25708
25709 cat >> $CONFIG_STATUS <<EOF
25710
25711 CONFIG_FILES=\${CONFIG_FILES-"\
25712 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25713 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25714 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25715 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25716 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25717 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25718 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25719 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25720 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25721 include/Makefile:build/top.mk:include/Makefile.in \
25722 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25723 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25724 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25725 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25726 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25727 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25728 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25729 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25730 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25731 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25732 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25733 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25734 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25735 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25736 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25737 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25738 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25739 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25740 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25741 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25742 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25743 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25744 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25745 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25746 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25747 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25748 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25749 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25750 tests/run \
25751 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25752 "}
25753 EOF
25754 cat >> $CONFIG_STATUS <<\EOF
25755 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25756   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25757   case "$ac_file" in
25758   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25759        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25760   *) ac_file_in="${ac_file}.in" ;;
25761   esac
25762
25763   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25764
25765   # Remove last slash and all that follows it.  Not all systems have dirname.
25766   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25767   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25768     # The file is in a subdirectory.
25769     test ! -d "$ac_dir" && mkdir "$ac_dir"
25770     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25771     # A "../" for each directory in $ac_dir_suffix.
25772     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25773   else
25774     ac_dir_suffix= ac_dots=
25775   fi
25776
25777   case "$ac_given_srcdir" in
25778   .)  srcdir=.
25779       if test -z "$ac_dots"; then top_srcdir=.
25780       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25781   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25782   *) # Relative path.
25783     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25784     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25785   esac
25786
25787   case "$ac_given_INSTALL" in
25788   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25789   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25790   esac
25791
25792   echo creating "$ac_file"
25793   rm -f "$ac_file"
25794   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25795   case "$ac_file" in
25796   *[Mm]akefile*) ac_comsub="1i\\
25797 # $configure_input" ;;
25798   *) ac_comsub= ;;
25799   esac
25800
25801   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25802   sed -e "$ac_comsub
25803 s%@configure_input@%$configure_input%g
25804 s%@srcdir@%$srcdir%g
25805 s%@top_srcdir@%$top_srcdir%g
25806 s%@INSTALL@%$INSTALL%g
25807 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25808 fi; done
25809 rm -f conftest.s*
25810
25811 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25812 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25813 #
25814 # ac_d sets the value in "#define NAME VALUE" lines.
25815 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25816 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25817 ac_dC='\3'
25818 ac_dD='%g'
25819 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25820 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25821 ac_uB='\([      ]\)%\1#\2define\3'
25822 ac_uC=' '
25823 ac_uD='\4%g'
25824 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25825 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25826 ac_eB='$%\1#\2define\3'
25827 ac_eC=' '
25828 ac_eD='%g'
25829
25830 if test "${CONFIG_HEADERS+set}" != set; then
25831 EOF
25832 cat >> $CONFIG_STATUS <<EOF
25833   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25834 EOF
25835 cat >> $CONFIG_STATUS <<\EOF
25836 fi
25837 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25838   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25839   case "$ac_file" in
25840   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25841        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25842   *) ac_file_in="${ac_file}.in" ;;
25843   esac
25844
25845   echo creating $ac_file
25846
25847   rm -f conftest.frag conftest.in conftest.out
25848   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25849   cat $ac_file_inputs > conftest.in
25850
25851 EOF
25852
25853 # Transform confdefs.h into a sed script conftest.vals that substitutes
25854 # the proper values into config.h.in to produce config.h.  And first:
25855 # Protect against being on the right side of a sed subst in config.status.
25856 # Protect against being in an unquoted here document in config.status.
25857 rm -f conftest.vals
25858 cat > conftest.hdr <<\EOF
25859 s/[\\&%]/\\&/g
25860 s%[\\$`]%\\&%g
25861 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25862 s%ac_d%ac_u%gp
25863 s%ac_u%ac_e%gp
25864 EOF
25865 sed -n -f conftest.hdr confdefs.h > conftest.vals
25866 rm -f conftest.hdr
25867
25868 # This sed command replaces #undef with comments.  This is necessary, for
25869 # example, in the case of _POSIX_SOURCE, which is predefined and required
25870 # on some systems where configure will not decide to define it.
25871 cat >> conftest.vals <<\EOF
25872 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25873 EOF
25874
25875 # Break up conftest.vals because some shells have a limit on
25876 # the size of here documents, and old seds have small limits too.
25877
25878 rm -f conftest.tail
25879 while :
25880 do
25881   ac_lines=`grep -c . conftest.vals`
25882   # grep -c gives empty output for an empty file on some AIX systems.
25883   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25884   # Write a limited-size here document to conftest.frag.
25885   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25886   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25887   echo 'CEOF
25888   sed -f conftest.frag conftest.in > conftest.out
25889   rm -f conftest.in
25890   mv conftest.out conftest.in
25891 ' >> $CONFIG_STATUS
25892   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25893   rm -f conftest.vals
25894   mv conftest.tail conftest.vals
25895 done
25896 rm -f conftest.vals
25897
25898 cat >> $CONFIG_STATUS <<\EOF
25899   rm -f conftest.frag conftest.h
25900   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25901   cat conftest.in >> conftest.h
25902   rm -f conftest.in
25903   if cmp -s $ac_file conftest.h 2>/dev/null; then
25904     echo "$ac_file is unchanged"
25905     rm -f conftest.h
25906   else
25907     # Remove last slash and all that follows it.  Not all systems have dirname.
25908       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25909       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25910       # The file is in a subdirectory.
25911       test ! -d "$ac_dir" && mkdir "$ac_dir"
25912     fi
25913     rm -f $ac_file
25914     mv conftest.h $ac_file
25915   fi
25916 fi; done
25917
25918 EOF
25919 cat >> $CONFIG_STATUS <<EOF
25920 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25921 EOF
25922 cat >> $CONFIG_STATUS <<\EOF
25923
25924 chmod +x tests/run
25925 date > stamp-h
25926 BACKENDSC="servers/slapd/backends.c"
25927 echo "Making $BACKENDSC"
25928 rm -f $BACKENDSC
25929 cat > $BACKENDSC << ENDX
25930 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25931  *
25932  * Copyright 1998-2005 The OpenLDAP Foundation.
25933  * All rights reserved.
25934  *
25935  * Redistribution and use in source and binary forms, with or without
25936  * modification, are permitted only as authorized by the OpenLDAP
25937  * Public License.
25938  *
25939  * A copy of this license is available in the file LICENSE in the
25940  * top-level directory of the distribution or, alternatively, at
25941  * <http://www.OpenLDAP.org/license.html>.
25942  */
25943 /* This file is automatically generated by configure; please do not edit. */
25944
25945 #include "portable.h"
25946 #include "slap.h"
25947
25948 ENDX
25949 if test "${STATIC_BACKENDS}"; then
25950         for b in config ${STATIC_BACKENDS}; do
25951                 bb=`echo "${b}" | sed -e 's/back-//'`
25952                 cat >> $BACKENDSC << ENDX
25953 extern BI_init ${bb}_back_initialize;
25954 ENDX
25955         done
25956
25957         cat >> $BACKENDSC << ENDX
25958
25959 BackendInfo slap_binfo[] = {
25960 ENDX
25961
25962         for b in config ${STATIC_BACKENDS}; do
25963                 bb=`echo "${b}" | sed -e 's/back-//'`
25964                 echo "    Add ${bb} ..."
25965                 cat >> $BACKENDSC << ENDX
25966         { "${bb}", ${bb}_back_initialize },
25967 ENDX
25968         done
25969
25970         cat >> $BACKENDSC << ENDX
25971         { NULL, NULL },
25972 };
25973
25974 /* end of generated file */
25975 ENDX
25976 fi
25977
25978 echo Please run \"make depend\" to build dependencies
25979
25980 exit 0
25981 EOF
25982 chmod +x $CONFIG_STATUS
25983 rm -fr confdefs* $ac_clean_files
25984 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25985