]> git.sur5r.net Git - openldap/blob - configure
don't use -u: it's not portable (ITS#3969)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.590 2005/08/24 07:05:13 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 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"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [${ol_dflt_backends-yes}]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [${ol_dflt_backends-no}]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [${ol_dflt_backends-yes}]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [${ol_dflt_backends-no}]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [${ol_dflt_backends-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 [${ol_dflt_backends-no}]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [${ol_dflt_backends-yes}]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [${ol_dflt_backends-no}]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [${ol_dflt_backends-no}]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [${ol_dflt_backends-no}]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [${ol_dflt_backends-yes}]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [${ol_dflt_backends-no}]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [${ol_dflt_backends-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"
128 ac_help="$ac_help
129     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [${ol_dflt_overlays-no}]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [${ol_dflt_overlays-no}]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [${ol_dflt_overlays-no}]"
134 ac_help="$ac_help
135     --enable-dynlist      Dynamic List overlay no|yes|mod [${ol_dflt_overlays-no}]"
136 ac_help="$ac_help
137     --enable-glue         Backend Glue overlay no|yes|mod [${ol_dflt_overlays-yes}]"
138 ac_help="$ac_help
139     --enable-lastmod      Last Modification overlay no|yes|mod [${ol_dflt_overlays-no}]"
140 ac_help="$ac_help
141     --enable-ppolicy      Password Policy overlay no|yes|mod [${ol_dflt_overlays-no}]"
142 ac_help="$ac_help
143     --enable-proxycache   Proxy Cache overlay no|yes|mod [${ol_dflt_overlays-no}]"
144 ac_help="$ac_help
145     --enable-refint       Referential Integrity overlay no|yes|mod [${ol_dflt_overlays-no}]"
146 ac_help="$ac_help
147     --enable-retcode      Return Code testing overlay no|yes|mod [${ol_dflt_overlays-no}]"
148 ac_help="$ac_help
149     --enable-rwm          Rewrite/Remap overlay no|yes|mod [${ol_dflt_overlays-no}]"
150 ac_help="$ac_help
151     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [${ol_dflt_overlays-yes}]"
152 ac_help="$ac_help
153     --enable-translucent  Translucent Proxy overlay no|yes|mod [${ol_dflt_overlays-no}]"
154 ac_help="$ac_help
155     --enable-unique       Attribute Uniqueness overlay no|yes|mod [${ol_dflt_overlays-no}]"
156 ac_help="$ac_help
157     --enable-valsort      Value Sorting overlay no|yes|mod [${ol_dflt_overlays-no}]"
158 ac_help="$ac_help
159
160 SLURPD (Replication Daemon) Options:"
161 ac_help="$ac_help
162   --enable-slurpd         enable building slurpd [auto]"
163 ac_help="$ac_help
164
165 Library Generation & Linking Options"
166 ac_help="$ac_help
167   --enable-static[=PKGS]  build static libraries [default=yes]"
168 ac_help="$ac_help
169   --enable-shared[=PKGS]  build shared libraries [default=yes]"
170 ac_help="$ac_help
171   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
172 ac_help="$ac_help
173   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
174
175 # Find the correct PATH separator.  Usually this is `:', but
176 # DJGPP uses `;' like DOS.
177 if test "X${PATH_SEPARATOR+set}" != Xset; then
178   UNAME=${UNAME-`uname 2>/dev/null`}
179   case X$UNAME in
180     *-DOS) lt_cv_sys_path_separator=';' ;;
181     *)     lt_cv_sys_path_separator=':' ;;
182   esac
183   PATH_SEPARATOR=$lt_cv_sys_path_separator
184 fi
185
186
187 # Check that we are running under the correct shell.
188 SHELL=${CONFIG_SHELL-/bin/sh}
189
190 case X$ECHO in
191 X*--fallback-echo)
192   # Remove one level of quotation (which was required for Make).
193   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
194   ;;
195 esac
196
197 echo=${ECHO-echo}
198 if test "X$1" = X--no-reexec; then
199   # Discard the --no-reexec flag, and continue.
200   shift
201 elif test "X$1" = X--fallback-echo; then
202   # Avoid inline document here, it may be left over
203   :
204 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
205   # Yippee, $echo works!
206   :
207 else
208   # Restart under the correct shell.
209   exec $SHELL "$0" --no-reexec ${1+"$@"}
210 fi
211
212 if test "X$1" = X--fallback-echo; then
213   # used as fallback echo
214   shift
215   cat <<EOF
216
217 EOF
218   exit 0
219 fi
220
221 # The HP-UX ksh and POSIX shell print the target directory to stdout
222 # if CDPATH is set.
223 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
224
225 if test -z "$ECHO"; then
226 if test "X${echo_test_string+set}" != Xset; then
227 # find a string as large as possible, as long as the shell can cope with it
228   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
229     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
230     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
231        echo_test_string="`eval $cmd`" &&
232        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
233     then
234       break
235     fi
236   done
237 fi
238
239 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
240    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
241    test "X$echo_testing_string" = "X$echo_test_string"; then
242   :
243 else
244   # The Solaris, AIX, and Digital Unix default echo programs unquote
245   # backslashes.  This makes it impossible to quote backslashes using
246   #   echo "$something" | sed 's/\\/\\\\/g'
247   #
248   # So, first we look for a working echo in the user's PATH.
249
250   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
251   for dir in $PATH /usr/ucb; do
252     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
253        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
254        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
255        test "X$echo_testing_string" = "X$echo_test_string"; then
256       echo="$dir/echo"
257       break
258     fi
259   done
260   IFS="$save_ifs"
261
262   if test "X$echo" = Xecho; then
263     # We didn't find a better echo, so look for alternatives.
264     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
265        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
266        test "X$echo_testing_string" = "X$echo_test_string"; then
267       # This shell has a builtin print -r that does the trick.
268       echo='print -r'
269     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
270          test "X$CONFIG_SHELL" != X/bin/ksh; then
271       # If we have ksh, try running configure again with it.
272       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
273       export ORIGINAL_CONFIG_SHELL
274       CONFIG_SHELL=/bin/ksh
275       export CONFIG_SHELL
276       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
277     else
278       # Try using printf.
279       echo='printf %s\n'
280       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
281          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
282          test "X$echo_testing_string" = "X$echo_test_string"; then
283         # Cool, printf works
284         :
285       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
286            test "X$echo_testing_string" = 'X\t' &&
287            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
288            test "X$echo_testing_string" = "X$echo_test_string"; then
289         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
290         export CONFIG_SHELL
291         SHELL="$CONFIG_SHELL"
292         export SHELL
293         echo="$CONFIG_SHELL $0 --fallback-echo"
294       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
295            test "X$echo_testing_string" = 'X\t' &&
296            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
297            test "X$echo_testing_string" = "X$echo_test_string"; then
298         echo="$CONFIG_SHELL $0 --fallback-echo"
299       else
300         # maybe with a smaller string...
301         prev=:
302
303         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
304           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
305           then
306             break
307           fi
308           prev="$cmd"
309         done
310
311         if test "$prev" != 'sed 50q "$0"'; then
312           echo_test_string=`eval $prev`
313           export echo_test_string
314           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
315         else
316           # Oops.  We lost completely, so just stick with echo.
317           echo=echo
318         fi
319       fi
320     fi
321   fi
322 fi
323 fi
324
325 # Copy echo and quote the copy suitably for passing to libtool from
326 # the Makefile, instead of quoting the original, which is used later.
327 ECHO=$echo
328 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
329    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
330 fi
331
332
333 ac_help="$ac_help
334   --disable-libtool-lock  avoid locking (might break parallel builds)"
335 ac_help="$ac_help
336   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
337 ac_help="$ac_help
338
339 See INSTALL file for further details."
340
341 # Initialize some variables set by options.
342 # The variables have the same names as the options, with
343 # dashes changed to underlines.
344 build=NONE
345 cache_file=./config.cache
346 exec_prefix=NONE
347 host=NONE
348 no_create=
349 nonopt=NONE
350 no_recursion=
351 prefix=NONE
352 program_prefix=NONE
353 program_suffix=NONE
354 program_transform_name=s,x,x,
355 silent=
356 site=
357 srcdir=
358 target=NONE
359 verbose=
360 x_includes=NONE
361 x_libraries=NONE
362 bindir='${exec_prefix}/bin'
363 sbindir='${exec_prefix}/sbin'
364 libexecdir='${exec_prefix}/libexec'
365 datadir='${prefix}/share'
366 sysconfdir='${prefix}/etc'
367 sharedstatedir='${prefix}/com'
368 localstatedir='${prefix}/var'
369 libdir='${exec_prefix}/lib'
370 includedir='${prefix}/include'
371 oldincludedir='/usr/include'
372 infodir='${prefix}/info'
373 mandir='${prefix}/man'
374
375 # Initialize some other variables.
376 subdirs=
377 MFLAGS= MAKEFLAGS=
378 SHELL=${CONFIG_SHELL-/bin/sh}
379 # Maximum number of lines to put in a shell here document.
380 ac_max_here_lines=12
381
382 ac_prev=
383 for ac_option
384 do
385
386   # If the previous option needs an argument, assign it.
387   if test -n "$ac_prev"; then
388     eval "$ac_prev=\$ac_option"
389     ac_prev=
390     continue
391   fi
392
393   case "$ac_option" in
394   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
395   *) ac_optarg= ;;
396   esac
397
398   # Accept the important Cygnus configure options, so we can diagnose typos.
399
400   case "$ac_option" in
401
402   -bindir | --bindir | --bindi | --bind | --bin | --bi)
403     ac_prev=bindir ;;
404   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
405     bindir="$ac_optarg" ;;
406
407   -build | --build | --buil | --bui | --bu)
408     ac_prev=build ;;
409   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
410     build="$ac_optarg" ;;
411
412   -cache-file | --cache-file | --cache-fil | --cache-fi \
413   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
414     ac_prev=cache_file ;;
415   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
416   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
417     cache_file="$ac_optarg" ;;
418
419   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
420     ac_prev=datadir ;;
421   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
422   | --da=*)
423     datadir="$ac_optarg" ;;
424
425   -disable-* | --disable-*)
426     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
427     # Reject names that are not valid shell variable names.
428     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
429       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
430     fi
431     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
432     eval "enable_${ac_feature}=no" ;;
433
434   -enable-* | --enable-*)
435     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
436     # Reject names that are not valid shell variable names.
437     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
438       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
439     fi
440     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
441     case "$ac_option" in
442       *=*) ;;
443       *) ac_optarg=yes ;;
444     esac
445     eval "enable_${ac_feature}='$ac_optarg'" ;;
446
447   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
448   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
449   | --exec | --exe | --ex)
450     ac_prev=exec_prefix ;;
451   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
452   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
453   | --exec=* | --exe=* | --ex=*)
454     exec_prefix="$ac_optarg" ;;
455
456   -gas | --gas | --ga | --g)
457     # Obsolete; use --with-gas.
458     with_gas=yes ;;
459
460   -help | --help | --hel | --he)
461     # Omit some internal or obsolete options to make the list less imposing.
462     # This message is too long to be a string in the A/UX 3.1 sh.
463     cat << EOF
464 Usage: configure [options] [host]
465 Options: [defaults in brackets after descriptions]
466 Configuration:
467   --cache-file=FILE       cache test results in FILE
468   --help                  print this message
469   --no-create             do not create output files
470   --quiet, --silent       do not print \`checking...' messages
471   --version               print the version of autoconf that created configure
472 Directory and file names:
473   --prefix=PREFIX         install architecture-independent files in PREFIX
474                           [$ac_default_prefix]
475   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
476                           [same as prefix]
477   --bindir=DIR            user executables in DIR [EPREFIX/bin]
478   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
479   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
480   --datadir=DIR           read-only architecture-independent data in DIR
481                           [PREFIX/share]
482   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
483   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
484                           [PREFIX/com]
485   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
486   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
487   --includedir=DIR        C header files in DIR [PREFIX/include]
488   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
489   --infodir=DIR           info documentation in DIR [PREFIX/info]
490   --mandir=DIR            man documentation in DIR [PREFIX/man]
491   --srcdir=DIR            find the sources in DIR [configure dir or ..]
492   --program-prefix=PREFIX prepend PREFIX to installed program names
493   --program-suffix=SUFFIX append SUFFIX to installed program names
494   --program-transform-name=PROGRAM
495                           run sed PROGRAM on installed program names
496 EOF
497     cat << EOF
498 Host type:
499   --build=BUILD           configure for building on BUILD [BUILD=HOST]
500   --host=HOST             configure for HOST [guessed]
501   --target=TARGET         configure for TARGET [TARGET=HOST]
502 Features and packages:
503   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
504   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
505   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
506   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
507   --x-includes=DIR        X include files are in DIR
508   --x-libraries=DIR       X library files are in DIR
509 EOF
510     if test -n "$ac_help"; then
511       echo "--enable and --with options recognized:$ac_help"
512     fi
513     exit 0 ;;
514
515   -host | --host | --hos | --ho)
516     ac_prev=host ;;
517   -host=* | --host=* | --hos=* | --ho=*)
518     host="$ac_optarg" ;;
519
520   -includedir | --includedir | --includedi | --included | --include \
521   | --includ | --inclu | --incl | --inc)
522     ac_prev=includedir ;;
523   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
524   | --includ=* | --inclu=* | --incl=* | --inc=*)
525     includedir="$ac_optarg" ;;
526
527   -infodir | --infodir | --infodi | --infod | --info | --inf)
528     ac_prev=infodir ;;
529   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
530     infodir="$ac_optarg" ;;
531
532   -libdir | --libdir | --libdi | --libd)
533     ac_prev=libdir ;;
534   -libdir=* | --libdir=* | --libdi=* | --libd=*)
535     libdir="$ac_optarg" ;;
536
537   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
538   | --libexe | --libex | --libe)
539     ac_prev=libexecdir ;;
540   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
541   | --libexe=* | --libex=* | --libe=*)
542     libexecdir="$ac_optarg" ;;
543
544   -localstatedir | --localstatedir | --localstatedi | --localstated \
545   | --localstate | --localstat | --localsta | --localst \
546   | --locals | --local | --loca | --loc | --lo)
547     ac_prev=localstatedir ;;
548   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
549   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
550   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
551     localstatedir="$ac_optarg" ;;
552
553   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
554     ac_prev=mandir ;;
555   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
556     mandir="$ac_optarg" ;;
557
558   -nfp | --nfp | --nf)
559     # Obsolete; use --without-fp.
560     with_fp=no ;;
561
562   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
563   | --no-cr | --no-c)
564     no_create=yes ;;
565
566   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
567   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
568     no_recursion=yes ;;
569
570   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
571   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
572   | --oldin | --oldi | --old | --ol | --o)
573     ac_prev=oldincludedir ;;
574   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
575   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
576   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
577     oldincludedir="$ac_optarg" ;;
578
579   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
580     ac_prev=prefix ;;
581   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
582     prefix="$ac_optarg" ;;
583
584   -program-prefix | --program-prefix | --program-prefi | --program-pref \
585   | --program-pre | --program-pr | --program-p)
586     ac_prev=program_prefix ;;
587   -program-prefix=* | --program-prefix=* | --program-prefi=* \
588   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
589     program_prefix="$ac_optarg" ;;
590
591   -program-suffix | --program-suffix | --program-suffi | --program-suff \
592   | --program-suf | --program-su | --program-s)
593     ac_prev=program_suffix ;;
594   -program-suffix=* | --program-suffix=* | --program-suffi=* \
595   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
596     program_suffix="$ac_optarg" ;;
597
598   -program-transform-name | --program-transform-name \
599   | --program-transform-nam | --program-transform-na \
600   | --program-transform-n | --program-transform- \
601   | --program-transform | --program-transfor \
602   | --program-transfo | --program-transf \
603   | --program-trans | --program-tran \
604   | --progr-tra | --program-tr | --program-t)
605     ac_prev=program_transform_name ;;
606   -program-transform-name=* | --program-transform-name=* \
607   | --program-transform-nam=* | --program-transform-na=* \
608   | --program-transform-n=* | --program-transform-=* \
609   | --program-transform=* | --program-transfor=* \
610   | --program-transfo=* | --program-transf=* \
611   | --program-trans=* | --program-tran=* \
612   | --progr-tra=* | --program-tr=* | --program-t=*)
613     program_transform_name="$ac_optarg" ;;
614
615   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
616   | -silent | --silent | --silen | --sile | --sil)
617     silent=yes ;;
618
619   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
620     ac_prev=sbindir ;;
621   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
622   | --sbi=* | --sb=*)
623     sbindir="$ac_optarg" ;;
624
625   -sharedstatedir | --sharedstatedir | --sharedstatedi \
626   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
627   | --sharedst | --shareds | --shared | --share | --shar \
628   | --sha | --sh)
629     ac_prev=sharedstatedir ;;
630   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
631   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
632   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
633   | --sha=* | --sh=*)
634     sharedstatedir="$ac_optarg" ;;
635
636   -site | --site | --sit)
637     ac_prev=site ;;
638   -site=* | --site=* | --sit=*)
639     site="$ac_optarg" ;;
640
641   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
642     ac_prev=srcdir ;;
643   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
644     srcdir="$ac_optarg" ;;
645
646   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
647   | --syscon | --sysco | --sysc | --sys | --sy)
648     ac_prev=sysconfdir ;;
649   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
650   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
651     sysconfdir="$ac_optarg" ;;
652
653   -target | --target | --targe | --targ | --tar | --ta | --t)
654     ac_prev=target ;;
655   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
656     target="$ac_optarg" ;;
657
658   -v | -verbose | --verbose | --verbos | --verbo | --verb)
659     verbose=yes ;;
660
661   -version | --version | --versio | --versi | --vers)
662     echo "configure generated by autoconf version 2.13.1"
663     exit 0 ;;
664
665   -with-* | --with-*)
666     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     case "$ac_option" in
673       *=*) ;;
674       *) ac_optarg=yes ;;
675     esac
676     eval "with_${ac_package}='$ac_optarg'" ;;
677
678   -without-* | --without-*)
679     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
680     # Reject names that are not valid shell variable names.
681     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
682       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
683     fi
684     ac_package=`echo $ac_package| sed 's/-/_/g'`
685     eval "with_${ac_package}=no" ;;
686
687   --x)
688     # Obsolete; use --with-x.
689     with_x=yes ;;
690
691   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
692   | --x-incl | --x-inc | --x-in | --x-i)
693     ac_prev=x_includes ;;
694   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
695   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
696     x_includes="$ac_optarg" ;;
697
698   -x-libraries | --x-libraries | --x-librarie | --x-librari \
699   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
700     ac_prev=x_libraries ;;
701   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
702   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
703     x_libraries="$ac_optarg" ;;
704
705   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
706     ;;
707
708   *)
709     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
710       echo "configure: warning: $ac_option: invalid host type" 1>&2
711     fi
712     if test "x$nonopt" != xNONE; then
713       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
714     fi
715     nonopt="$ac_option"
716     ;;
717
718   esac
719 done
720
721 if test -n "$ac_prev"; then
722   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
723 fi
724
725 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
726
727 # File descriptor usage:
728 # 0 standard input
729 # 1 file creation
730 # 2 errors and warnings
731 # 3 some systems may open it to /dev/tty
732 # 4 used on the Kubota Titan
733 # 6 checking for... messages and results
734 # 5 compiler messages saved in config.log
735 if test "$silent" = yes; then
736   exec 6>/dev/null
737 else
738   exec 6>&1
739 fi
740 exec 5>./config.log
741
742 echo "\
743 This file contains any messages produced by compilers while
744 running configure, to aid debugging if configure makes a mistake.
745 " 1>&5
746
747 # Strip out --no-create and --no-recursion so they do not pile up.
748 # Also quote any args containing shell metacharacters.
749 ac_configure_args=
750 for ac_arg
751 do
752   case "$ac_arg" in
753   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
754   | --no-cr | --no-c) ;;
755   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
756   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
757   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
758   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
759   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
760   esac
761 done
762
763 # NLS nuisances.
764 # Only set these to C if already set.  These must not be set unconditionally
765 # because not all systems understand e.g. LANG=C (notably SCO).
766 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
767 # Non-C LC_CTYPE values break the ctype check.
768 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
769 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
770 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
771 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
772
773 # confdefs.h avoids OS command line length limits that DEFS can exceed.
774 rm -rf conftest* confdefs.h
775 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
776 echo > confdefs.h
777
778 # A filename unique to this package, relative to the directory that
779 # configure is in, which we can look for to find out if srcdir is correct.
780 ac_unique_file=build/version.sh
781
782 # Find the source files, if location was not specified.
783 if test -z "$srcdir"; then
784   ac_srcdir_defaulted=yes
785   # Try the directory containing this script, then its parent.
786   ac_prog=$0
787   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
788   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
789   srcdir=$ac_confdir
790   if test ! -r $srcdir/$ac_unique_file; then
791     srcdir=..
792   fi
793 else
794   ac_srcdir_defaulted=no
795 fi
796 if test ! -r $srcdir/$ac_unique_file; then
797   if test "$ac_srcdir_defaulted" = yes; then
798     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
799   else
800     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
801   fi
802 fi
803 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
804
805 # Prefer explicitly selected file to automatically selected ones.
806 if test -z "$CONFIG_SITE"; then
807   if test "x$prefix" != xNONE; then
808     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
809   else
810     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
811   fi
812 fi
813 for ac_site_file in $CONFIG_SITE; do
814   if test -r "$ac_site_file"; then
815     echo "loading site script $ac_site_file"
816     . "$ac_site_file"
817   fi
818 done
819
820
821 ac_ext=c
822 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
823 ac_cpp='$CPP $CPPFLAGS'
824 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
825 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
826 cross_compiling=$ac_cv_prog_cc_cross
827
828 ac_exeext=
829 ac_objext=o
830 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
831   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
832   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
833     ac_n= ac_c='
834 ' ac_t='        '
835   else
836     ac_n=-n ac_c= ac_t=
837   fi
838 else
839   ac_n= ac_c='\c' ac_t=
840 fi
841
842
843 # set unset (borrowed from autoconf 2.49c)
844 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
845   ol_unset=unset
846 else
847   ol_unset=false
848 fi
849 # unset CDPATH
850 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
851
852 ac_aux_dir=
853 for ac_dir in build $srcdir/build; do
854   if test -f $ac_dir/install-sh; then
855     ac_aux_dir=$ac_dir
856     ac_install_sh="$ac_aux_dir/install-sh -c"
857     break
858   elif test -f $ac_dir/install.sh; then
859     ac_aux_dir=$ac_dir
860     ac_install_sh="$ac_aux_dir/install.sh -c"
861     break
862   elif test -f $ac_dir/shtool; then
863     ac_aux_dir=$ac_dir
864     ac_install_sh="$ac_aux_dir/shtool install -c"
865     break
866   fi
867 done
868 if test -z "$ac_aux_dir"; then
869   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
870 fi
871 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
872 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
873 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
874
875 eval `$ac_aux_dir/version.sh`
876 if test -z "$OL_STRING"; then
877         { echo "configure: error: could not determine version" 1>&2; exit 1; }
878 fi
879
880 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
881         ac_cv_shtool="$ac_aux_dir/shtool"
882 else
883         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
884 fi
885
886 SHTOOL="$ac_cv_shtool"
887
888 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
889 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
890
891 OPENLDAP_CVS=""
892 if test -d $ac_aux_dir/CVS; then
893         OPENLDAP_CVS="(from CVS sources) "
894 fi
895
896 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
897
898
899 echo $ac_n "checking host system type""... $ac_c" 1>&6
900 echo "configure:901: checking host system type" >&5
901 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
902
903 # Make sure we can run config.sub.
904   if $ac_config_sub sun4 >/dev/null 2>&1; then :
905     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
906   fi
907
908   ac_cv_host_alias=$host
909   case "$ac_cv_host_alias" in
910   NONE)
911     case $nonopt in
912     NONE)
913       if ac_cv_host_alias=`$ac_config_guess`; then :
914       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
915       fi ;;
916     *) ac_cv_host_alias=$nonopt ;;
917     esac ;;
918   esac
919
920   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
921   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
922   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
923   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
924 else
925   echo $ac_n "(cached) $ac_c" 1>&6
926 fi
927
928 echo "$ac_t""$ac_cv_host" 1>&6
929
930 host=$ac_cv_host
931 host_alias=$ac_cv_host_alias
932 host_cpu=$ac_cv_host_cpu
933 host_vendor=$ac_cv_host_vendor
934 host_os=$ac_cv_host_os
935
936
937
938
939
940 echo $ac_n "checking target system type""... $ac_c" 1>&6
941 echo "configure:942: checking target system type" >&5
942 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
943
944 # Make sure we can run config.sub.
945   if $ac_config_sub sun4 >/dev/null 2>&1; then :
946     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
947   fi
948
949   ac_cv_target_alias=$target
950   case "$ac_cv_target_alias" in
951   NONE)
952     case $nonopt in
953     NONE)
954       ac_cv_target_alias=$host_alias ;;
955
956     *) ac_cv_target_alias=$nonopt ;;
957     esac ;;
958   esac
959
960   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
961   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
962   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
963   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
964 else
965   echo $ac_n "(cached) $ac_c" 1>&6
966 fi
967
968 echo "$ac_t""$ac_cv_target" 1>&6
969
970 target=$ac_cv_target
971 target_alias=$ac_cv_target_alias
972 target_cpu=$ac_cv_target_cpu
973 target_vendor=$ac_cv_target_vendor
974 target_os=$ac_cv_target_os
975
976
977
978
979
980 echo $ac_n "checking build system type""... $ac_c" 1>&6
981 echo "configure:982: checking build system type" >&5
982 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
983
984 # Make sure we can run config.sub.
985   if $ac_config_sub sun4 >/dev/null 2>&1; then :
986     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
987   fi
988
989   ac_cv_build_alias=$build
990   case "$ac_cv_build_alias" in
991   NONE)
992     case $nonopt in
993     NONE)
994       ac_cv_build_alias=$host_alias ;;
995
996     *) ac_cv_build_alias=$nonopt ;;
997     esac ;;
998   esac
999
1000   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
1001   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1002   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1003   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1004 else
1005   echo $ac_n "(cached) $ac_c" 1>&6
1006 fi
1007
1008 echo "$ac_t""$ac_cv_build" 1>&6
1009
1010 build=$ac_cv_build
1011 build_alias=$ac_cv_build_alias
1012 build_cpu=$ac_cv_build_cpu
1013 build_vendor=$ac_cv_build_vendor
1014 build_os=$ac_cv_build_os
1015
1016
1017
1018
1019
1020 # Do some error checking and defaulting for the host and target type.
1021 # The inputs are:
1022 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1023 #
1024 # The rules are:
1025 # 1. You are not allowed to specify --host, --target, and nonopt at the
1026 #    same time.
1027 # 2. Host defaults to nonopt.
1028 # 3. If nonopt is not specified, then host defaults to the current host,
1029 #    as determined by config.guess.
1030 # 4. Target and build default to nonopt.
1031 # 5. If nonopt is not specified, then target and build default to host.
1032
1033 # The aliases save the names the user supplied, while $host etc.
1034 # will get canonicalized.
1035 case $host---$target---$nonopt in
1036 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1037 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1038 esac
1039
1040 test "$host_alias" != "$target_alias" &&
1041   test "$program_prefix$program_suffix$program_transform_name" = \
1042     NONENONEs,x,x, &&
1043   program_prefix=${target_alias}-
1044
1045
1046 # Find a good install program.  We prefer a C program (faster),
1047 # so one script is as good as another.  But avoid the broken or
1048 # incompatible versions:
1049 # SysV /etc/install, /usr/sbin/install
1050 # SunOS /usr/etc/install
1051 # IRIX /sbin/install
1052 # AIX /bin/install
1053 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1054 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1055 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1056 # ./install, which can be erroneously created by make from ./install.sh.
1057 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1058 echo "configure:1059: checking for a BSD compatible install" >&5
1059 if test -z "$INSTALL"; then
1060 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1064   for ac_dir in $PATH; do
1065     # Account for people who put trailing slashes in PATH elements.
1066     case "$ac_dir/" in
1067     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1068     *)
1069       # OSF1 and SCO ODT 3.0 have their own names for install.
1070       # Don't use installbsd from OSF since it installs stuff as root
1071       # by default.
1072       for ac_prog in ginstall scoinst install; do
1073         if test -f $ac_dir/$ac_prog; then
1074           if test $ac_prog = install &&
1075             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1076             # AIX install.  It has an incompatible calling convention.
1077             :
1078           elif test $ac_prog = install &&
1079             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1080             # program-specific install script used by HP pwplus--don't use.
1081             :
1082           else
1083             ac_cv_path_install="$ac_dir/$ac_prog -c"
1084             break 2
1085           fi
1086         fi
1087       done
1088       ;;
1089     esac
1090   done
1091   IFS="$ac_save_IFS"
1092
1093 fi
1094   if test "${ac_cv_path_install+set}" = set; then
1095     INSTALL="$ac_cv_path_install"
1096   else
1097     # As a last resort, use the slow shell script.  We don't cache a
1098     # path for INSTALL within a source directory, because that will
1099     # break other packages using the cache if that directory is
1100     # removed, or if the path is relative.
1101     INSTALL="$ac_install_sh"
1102   fi
1103 fi
1104 echo "$ac_t""$INSTALL" 1>&6
1105
1106 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1107 # It thinks the first close brace ends the variable substitution.
1108 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1109
1110 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1111
1112 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1113
1114 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1115 echo "configure:1116: checking whether build environment is sane" >&5
1116 # Just in case
1117 sleep 1
1118 echo timestamp > conftestfile
1119 # Do `set' in a subshell so we don't clobber the current shell's
1120 # arguments.  Must try -L first in case configure is actually a
1121 # symlink; some systems play weird games with the mod time of symlinks
1122 # (eg FreeBSD returns the mod time of the symlink's containing
1123 # directory).
1124 if (
1125    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1126    if test "$*" = "X"; then
1127       # -L didn't work.
1128       set X `ls -t $srcdir/configure conftestfile`
1129    fi
1130    if test "$*" != "X $srcdir/configure conftestfile" \
1131       && test "$*" != "X conftestfile $srcdir/configure"; then
1132
1133       # If neither matched, then we have a broken ls.  This can happen
1134       # if, for instance, CONFIG_SHELL is bash and it inherits a
1135       # broken ls alias from the environment.  This has actually
1136       # happened.  Such a system could not be considered "sane".
1137       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1138 alias in your environment" 1>&2; exit 1; }
1139    fi
1140
1141    test "$2" = conftestfile
1142    )
1143 then
1144    # Ok.
1145    :
1146 else
1147    { echo "configure: error: newly created file is older than distributed files!
1148 Check your system clock" 1>&2; exit 1; }
1149 fi
1150 rm -f conftest*
1151 echo "$ac_t""yes" 1>&6
1152 if test "$program_transform_name" = s,x,x,; then
1153   program_transform_name=
1154 else
1155   # Double any \ or $.  echo might interpret backslashes.
1156   cat <<\EOF_SED > conftestsed
1157 s,\\,\\\\,g; s,\$,$$,g
1158 EOF_SED
1159   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1160   rm -f conftestsed
1161 fi
1162 test "$program_prefix" != NONE &&
1163   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1164 # Use a double $ so make ignores it.
1165 test "$program_suffix" != NONE &&
1166   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1167
1168 # sed with no file args requires a program.
1169 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1170
1171 for ac_prog in mawk gawk nawk awk
1172 do
1173 # Extract the first word of "$ac_prog", so it can be a program name with args.
1174 set dummy $ac_prog; ac_word=$2
1175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1176 echo "configure:1177: checking for $ac_word" >&5
1177 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1178   echo $ac_n "(cached) $ac_c" 1>&6
1179 else
1180   if test -n "$AWK"; then
1181   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1182 else
1183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1184   ac_dummy="$PATH"
1185   for ac_dir in $ac_dummy; do
1186     test -z "$ac_dir" && ac_dir=.
1187     if test -f $ac_dir/$ac_word; then
1188       ac_cv_prog_AWK="$ac_prog"
1189       break
1190     fi
1191   done
1192   IFS="$ac_save_ifs"
1193 fi
1194 fi
1195 AWK="$ac_cv_prog_AWK"
1196 if test -n "$AWK"; then
1197   echo "$ac_t""$AWK" 1>&6
1198 else
1199   echo "$ac_t""no" 1>&6
1200 fi
1201
1202 test -n "$AWK" && break
1203 done
1204
1205 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1206 echo "configure:1207: checking whether ${MAKE-make} sets \${MAKE}" >&5
1207 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1208 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1209   echo $ac_n "(cached) $ac_c" 1>&6
1210 else
1211   cat > conftestmake <<\EOF
1212 all:
1213         @echo 'ac_maketemp="${MAKE}"'
1214 EOF
1215 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1216 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1217 if test -n "$ac_maketemp"; then
1218   eval ac_cv_prog_make_${ac_make}_set=yes
1219 else
1220   eval ac_cv_prog_make_${ac_make}_set=no
1221 fi
1222 rm -f conftestmake
1223 fi
1224 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1225   echo "$ac_t""yes" 1>&6
1226   SET_MAKE=
1227 else
1228   echo "$ac_t""no" 1>&6
1229   SET_MAKE="MAKE=${MAKE-make}"
1230 fi
1231
1232
1233
1234 PACKAGE=$OL_PACKAGE
1235
1236 VERSION=$OL_VERSION
1237
1238 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1239   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1240 fi
1241
1242
1243
1244 missing_dir=`cd $ac_aux_dir && pwd`
1245 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1246 echo "configure:1247: checking for working aclocal" >&5
1247 # Run test in a subshell; some versions of sh will print an error if
1248 # an executable is not found, even if stderr is redirected.
1249 # Redirect stdin to placate older versions of autoconf.  Sigh.
1250 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1251    ACLOCAL=aclocal
1252    echo "$ac_t""found" 1>&6
1253 else
1254    ACLOCAL="$missing_dir/missing aclocal"
1255    echo "$ac_t""missing" 1>&6
1256 fi
1257
1258 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1259 echo "configure:1260: checking for working autoconf" >&5
1260 # Run test in a subshell; some versions of sh will print an error if
1261 # an executable is not found, even if stderr is redirected.
1262 # Redirect stdin to placate older versions of autoconf.  Sigh.
1263 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1264    AUTOCONF=autoconf
1265    echo "$ac_t""found" 1>&6
1266 else
1267    AUTOCONF="$missing_dir/missing autoconf"
1268    echo "$ac_t""missing" 1>&6
1269 fi
1270
1271 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1272 echo "configure:1273: checking for working automake" >&5
1273 # Run test in a subshell; some versions of sh will print an error if
1274 # an executable is not found, even if stderr is redirected.
1275 # Redirect stdin to placate older versions of autoconf.  Sigh.
1276 if (automake --version) < /dev/null > /dev/null 2>&1; then
1277    AUTOMAKE=automake
1278    echo "$ac_t""found" 1>&6
1279 else
1280    AUTOMAKE="$missing_dir/missing automake"
1281    echo "$ac_t""missing" 1>&6
1282 fi
1283
1284 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1285 echo "configure:1286: checking for working autoheader" >&5
1286 # Run test in a subshell; some versions of sh will print an error if
1287 # an executable is not found, even if stderr is redirected.
1288 # Redirect stdin to placate older versions of autoconf.  Sigh.
1289 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1290    AUTOHEADER=autoheader
1291    echo "$ac_t""found" 1>&6
1292 else
1293    AUTOHEADER="$missing_dir/missing autoheader"
1294    echo "$ac_t""missing" 1>&6
1295 fi
1296
1297 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1298 echo "configure:1299: checking for working makeinfo" >&5
1299 # Run test in a subshell; some versions of sh will print an error if
1300 # an executable is not found, even if stderr is redirected.
1301 # Redirect stdin to placate older versions of autoconf.  Sigh.
1302 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1303    MAKEINFO=makeinfo
1304    echo "$ac_t""found" 1>&6
1305 else
1306    MAKEINFO="$missing_dir/missing makeinfo"
1307    echo "$ac_t""missing" 1>&6
1308 fi
1309
1310 install_sh="$missing_dir/install-sh"
1311 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1312
1313 for ac_prog in gnutar gtar tar
1314 do
1315 # Extract the first word of "$ac_prog", so it can be a program name with args.
1316 set dummy $ac_prog; ac_word=$2
1317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1318 echo "configure:1319: checking for $ac_word" >&5
1319 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1320   echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322   if test -n "$AMTAR"; then
1323   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1324 else
1325   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1326   ac_dummy="$PATH"
1327   for ac_dir in $ac_dummy; do
1328     test -z "$ac_dir" && ac_dir=.
1329     if test -f $ac_dir/$ac_word; then
1330       ac_cv_prog_AMTAR="$ac_prog"
1331       break
1332     fi
1333   done
1334   IFS="$ac_save_ifs"
1335 fi
1336 fi
1337 AMTAR="$ac_cv_prog_AMTAR"
1338 if test -n "$AMTAR"; then
1339   echo "$ac_t""$AMTAR" 1>&6
1340 else
1341   echo "$ac_t""no" 1>&6
1342 fi
1343
1344 test -n "$AMTAR" && break
1345 done
1346
1347
1348 AMTARFLAGS=
1349 if test -n "$AMTAR"; then
1350   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1351         AMTARFLAGS=o
1352   fi
1353 fi
1354
1355 cat >> confdefs.h <<EOF
1356 #define OPENLDAP_PACKAGE "$PACKAGE"
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define OPENLDAP_VERSION "$VERSION"
1361 EOF
1362
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION $OL_API_INC
1366 EOF
1367
1368 cat >> confdefs.h <<EOF
1369 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1370 EOF
1371
1372 cat >> confdefs.h <<EOF
1373 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1374 EOF
1375
1376 cat >> confdefs.h <<EOF
1377 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1378 EOF
1379
1380
1381 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1382
1383 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1384
1385 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1386
1387
1388
1389 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1390 echo "configure:1391: checking configure arguments" >&5
1391
1392
1393 top_builddir=`pwd`
1394
1395 ldap_subdir="/openldap"
1396
1397 # Check whether --with-subdir or --without-subdir was given.
1398 if test "${with_subdir+set}" = set; then
1399   withval="$with_subdir"
1400   case "$withval" in
1401         no) ldap_subdir=""
1402                 ;;
1403         yes)
1404                 ;;
1405         /*|\\*)
1406                 ldap_subdir="$withval"
1407                 ;;
1408         *)
1409                 ldap_subdir="/$withval"
1410                 ;;
1411 esac
1412
1413 fi
1414
1415
1416 # OpenLDAP --enable-debug
1417         # Check whether --enable-debug or --disable-debug was given.
1418 if test "${enable_debug+set}" = set; then
1419   enableval="$enable_debug"
1420   
1421         ol_arg=invalid
1422         for ol_val in auto yes no ; do
1423                 if test "$enableval" = "$ol_val" ; then
1424                         ol_arg="$ol_val"
1425                 fi
1426         done
1427         if test "$ol_arg" = "invalid" ; then
1428                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1429         fi
1430         ol_enable_debug="$ol_arg"
1431
1432 else
1433         ol_enable_debug="yes"
1434 fi
1435 # end --enable-debug
1436 # OpenLDAP --enable-dynamic
1437         # Check whether --enable-dynamic or --disable-dynamic was given.
1438 if test "${enable_dynamic+set}" = set; then
1439   enableval="$enable_dynamic"
1440   
1441         ol_arg=invalid
1442         for ol_val in auto yes no ; do
1443                 if test "$enableval" = "$ol_val" ; then
1444                         ol_arg="$ol_val"
1445                 fi
1446         done
1447         if test "$ol_arg" = "invalid" ; then
1448                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1449         fi
1450         ol_enable_dynamic="$ol_arg"
1451
1452 else
1453         ol_enable_dynamic="no"
1454 fi
1455 # end --enable-dynamic
1456 # OpenLDAP --enable-syslog
1457         # Check whether --enable-syslog or --disable-syslog was given.
1458 if test "${enable_syslog+set}" = set; then
1459   enableval="$enable_syslog"
1460   
1461         ol_arg=invalid
1462         for ol_val in auto yes no ; do
1463                 if test "$enableval" = "$ol_val" ; then
1464                         ol_arg="$ol_val"
1465                 fi
1466         done
1467         if test "$ol_arg" = "invalid" ; then
1468                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1469         fi
1470         ol_enable_syslog="$ol_arg"
1471
1472 else
1473         ol_enable_syslog="auto"
1474 fi
1475 # end --enable-syslog
1476 # OpenLDAP --enable-proctitle
1477         # Check whether --enable-proctitle or --disable-proctitle was given.
1478 if test "${enable_proctitle+set}" = set; then
1479   enableval="$enable_proctitle"
1480   
1481         ol_arg=invalid
1482         for ol_val in auto yes no ; do
1483                 if test "$enableval" = "$ol_val" ; then
1484                         ol_arg="$ol_val"
1485                 fi
1486         done
1487         if test "$ol_arg" = "invalid" ; then
1488                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1489         fi
1490         ol_enable_proctitle="$ol_arg"
1491
1492 else
1493         ol_enable_proctitle="yes"
1494 fi
1495 # end --enable-proctitle
1496 ol_enable_referrals=${ol_enable_referrals-no}
1497 ol_enable_kbind=${ol_enable_kbind-no}
1498 # OpenLDAP --enable-ipv6
1499         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1500 if test "${enable_ipv6+set}" = set; then
1501   enableval="$enable_ipv6"
1502   
1503         ol_arg=invalid
1504         for ol_val in auto yes no ; do
1505                 if test "$enableval" = "$ol_val" ; then
1506                         ol_arg="$ol_val"
1507                 fi
1508         done
1509         if test "$ol_arg" = "invalid" ; then
1510                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1511         fi
1512         ol_enable_ipv6="$ol_arg"
1513
1514 else
1515         ol_enable_ipv6="auto"
1516 fi
1517 # end --enable-ipv6
1518 # OpenLDAP --enable-local
1519         # Check whether --enable-local or --disable-local was given.
1520 if test "${enable_local+set}" = set; then
1521   enableval="$enable_local"
1522   
1523         ol_arg=invalid
1524         for ol_val in auto yes no ; do
1525                 if test "$enableval" = "$ol_val" ; then
1526                         ol_arg="$ol_val"
1527                 fi
1528         done
1529         if test "$ol_arg" = "invalid" ; then
1530                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1531         fi
1532         ol_enable_local="$ol_arg"
1533
1534 else
1535         ol_enable_local="auto"
1536 fi
1537 # end --enable-local
1538
1539
1540 # OpenLDAP --with-cyrus_sasl
1541         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1542 if test "${with_cyrus_sasl+set}" = set; then
1543   withval="$with_cyrus_sasl"
1544   
1545         ol_arg=invalid
1546         for ol_val in auto yes no  ; do
1547                 if test "$withval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1553         fi
1554         ol_with_cyrus_sasl="$ol_arg"
1555
1556 else
1557         ol_with_cyrus_sasl="auto"
1558 fi
1559 # end --with-cyrus_sasl
1560
1561 # OpenLDAP --with-fetch
1562         # Check whether --with-fetch or --without-fetch was given.
1563 if test "${with_fetch+set}" = set; then
1564   withval="$with_fetch"
1565   
1566         ol_arg=invalid
1567         for ol_val in auto yes no  ; do
1568                 if test "$withval" = "$ol_val" ; then
1569                         ol_arg="$ol_val"
1570                 fi
1571         done
1572         if test "$ol_arg" = "invalid" ; then
1573                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1574         fi
1575         ol_with_fetch="$ol_arg"
1576
1577 else
1578         ol_with_fetch="auto"
1579 fi
1580 # end --with-fetch
1581
1582 ol_with_kerberos=${ol_with_kerberos-auto}
1583 # OpenLDAP --with-threads
1584         # Check whether --with-threads or --without-threads was given.
1585 if test "${with_threads+set}" = set; then
1586   withval="$with_threads"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1590                 if test "$withval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1596         fi
1597         ol_with_threads="$ol_arg"
1598
1599 else
1600         ol_with_threads="auto"
1601 fi
1602 # end --with-threads
1603
1604 # OpenLDAP --with-tls
1605         # Check whether --with-tls or --without-tls was given.
1606 if test "${with_tls+set}" = set; then
1607   withval="$with_tls"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto ssleay openssl yes no  ; do
1611                 if test "$withval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1617         fi
1618         ol_with_tls="$ol_arg"
1619
1620 else
1621         ol_with_tls="auto"
1622 fi
1623 # end --with-tls
1624
1625 # OpenLDAP --with-yielding_select
1626         # Check whether --with-yielding_select or --without-yielding_select was given.
1627 if test "${with_yielding_select+set}" = set; then
1628   withval="$with_yielding_select"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no manual  ; do
1632                 if test "$withval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1638         fi
1639         ol_with_yielding_select="$ol_arg"
1640
1641 else
1642         ol_with_yielding_select="auto"
1643 fi
1644 # end --with-yielding_select
1645
1646 # OpenLDAP --with-multiple_precision
1647         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1648 if test "${with_multiple_precision+set}" = set; then
1649   withval="$with_multiple_precision"
1650   
1651         ol_arg=invalid
1652         for ol_val in auto bignum gmp yes no  ; do
1653                 if test "$withval" = "$ol_val" ; then
1654                         ol_arg="$ol_val"
1655                 fi
1656         done
1657         if test "$ol_arg" = "invalid" ; then
1658                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1659         fi
1660         ol_with_multiple_precision="$ol_arg"
1661
1662 else
1663         ol_with_multiple_precision="auto"
1664 fi
1665 # end --with-multiple_precision
1666
1667
1668
1669 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1670 if test "${with_xxslapdoptions+set}" = set; then
1671   withval="$with_xxslapdoptions"
1672   :
1673 fi
1674
1675 # OpenLDAP --enable-slapd
1676         # Check whether --enable-slapd or --disable-slapd was given.
1677 if test "${enable_slapd+set}" = set; then
1678   enableval="$enable_slapd"
1679   
1680         ol_arg=invalid
1681         for ol_val in auto yes no ; do
1682                 if test "$enableval" = "$ol_val" ; then
1683                         ol_arg="$ol_val"
1684                 fi
1685         done
1686         if test "$ol_arg" = "invalid" ; then
1687                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1688         fi
1689         ol_enable_slapd="$ol_arg"
1690
1691 else
1692         ol_enable_slapd="yes"
1693 fi
1694 # end --enable-slapd
1695 # OpenLDAP --enable-aci
1696         # Check whether --enable-aci or --disable-aci was given.
1697 if test "${enable_aci+set}" = set; then
1698   enableval="$enable_aci"
1699   
1700         ol_arg=invalid
1701         for ol_val in auto yes no ; do
1702                 if test "$enableval" = "$ol_val" ; then
1703                         ol_arg="$ol_val"
1704                 fi
1705         done
1706         if test "$ol_arg" = "invalid" ; then
1707                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1708         fi
1709         ol_enable_aci="$ol_arg"
1710
1711 else
1712         ol_enable_aci="no"
1713 fi
1714 # end --enable-aci
1715 # OpenLDAP --enable-cleartext
1716         # Check whether --enable-cleartext or --disable-cleartext was given.
1717 if test "${enable_cleartext+set}" = set; then
1718   enableval="$enable_cleartext"
1719   
1720         ol_arg=invalid
1721         for ol_val in auto yes no ; do
1722                 if test "$enableval" = "$ol_val" ; then
1723                         ol_arg="$ol_val"
1724                 fi
1725         done
1726         if test "$ol_arg" = "invalid" ; then
1727                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1728         fi
1729         ol_enable_cleartext="$ol_arg"
1730
1731 else
1732         ol_enable_cleartext="yes"
1733 fi
1734 # end --enable-cleartext
1735 # OpenLDAP --enable-crypt
1736         # Check whether --enable-crypt or --disable-crypt was given.
1737 if test "${enable_crypt+set}" = set; then
1738   enableval="$enable_crypt"
1739   
1740         ol_arg=invalid
1741         for ol_val in auto yes no ; do
1742                 if test "$enableval" = "$ol_val" ; then
1743                         ol_arg="$ol_val"
1744                 fi
1745         done
1746         if test "$ol_arg" = "invalid" ; then
1747                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1748         fi
1749         ol_enable_crypt="$ol_arg"
1750
1751 else
1752         ol_enable_crypt="no"
1753 fi
1754 # end --enable-crypt
1755 # OpenLDAP --enable-lmpasswd
1756         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1757 if test "${enable_lmpasswd+set}" = set; then
1758   enableval="$enable_lmpasswd"
1759   
1760         ol_arg=invalid
1761         for ol_val in auto yes no ; do
1762                 if test "$enableval" = "$ol_val" ; then
1763                         ol_arg="$ol_val"
1764                 fi
1765         done
1766         if test "$ol_arg" = "invalid" ; then
1767                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1768         fi
1769         ol_enable_lmpasswd="$ol_arg"
1770
1771 else
1772         ol_enable_lmpasswd="no"
1773 fi
1774 # end --enable-lmpasswd
1775 # OpenLDAP --enable-spasswd
1776         # Check whether --enable-spasswd or --disable-spasswd was given.
1777 if test "${enable_spasswd+set}" = set; then
1778   enableval="$enable_spasswd"
1779   
1780         ol_arg=invalid
1781         for ol_val in auto yes no ; do
1782                 if test "$enableval" = "$ol_val" ; then
1783                         ol_arg="$ol_val"
1784                 fi
1785         done
1786         if test "$ol_arg" = "invalid" ; then
1787                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1788         fi
1789         ol_enable_spasswd="$ol_arg"
1790
1791 else
1792         ol_enable_spasswd="no"
1793 fi
1794 # end --enable-spasswd
1795 # OpenLDAP --enable-modules
1796         # Check whether --enable-modules or --disable-modules was given.
1797 if test "${enable_modules+set}" = set; then
1798   enableval="$enable_modules"
1799   
1800         ol_arg=invalid
1801         for ol_val in auto yes no ; do
1802                 if test "$enableval" = "$ol_val" ; then
1803                         ol_arg="$ol_val"
1804                 fi
1805         done
1806         if test "$ol_arg" = "invalid" ; then
1807                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1808         fi
1809         ol_enable_modules="$ol_arg"
1810
1811 else
1812         ol_enable_modules="no"
1813 fi
1814 # end --enable-modules
1815 ol_enable_multimaster=${ol_enable_multimaster-no}
1816 # OpenLDAP --enable-rewrite
1817         # Check whether --enable-rewrite or --disable-rewrite was given.
1818 if test "${enable_rewrite+set}" = set; then
1819   enableval="$enable_rewrite"
1820   
1821         ol_arg=invalid
1822         for ol_val in auto yes no ; do
1823                 if test "$enableval" = "$ol_val" ; then
1824                         ol_arg="$ol_val"
1825                 fi
1826         done
1827         if test "$ol_arg" = "invalid" ; then
1828                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1829         fi
1830         ol_enable_rewrite="$ol_arg"
1831
1832 else
1833         ol_enable_rewrite="auto"
1834 fi
1835 # end --enable-rewrite
1836 # OpenLDAP --enable-rlookups
1837         # Check whether --enable-rlookups or --disable-rlookups was given.
1838 if test "${enable_rlookups+set}" = set; then
1839   enableval="$enable_rlookups"
1840   
1841         ol_arg=invalid
1842         for ol_val in auto yes no ; do
1843                 if test "$enableval" = "$ol_val" ; then
1844                         ol_arg="$ol_val"
1845                 fi
1846         done
1847         if test "$ol_arg" = "invalid" ; then
1848                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1849         fi
1850         ol_enable_rlookups="$ol_arg"
1851
1852 else
1853         ol_enable_rlookups="no"
1854 fi
1855 # end --enable-rlookups
1856 # OpenLDAP --enable-slapi
1857         # Check whether --enable-slapi or --disable-slapi was given.
1858 if test "${enable_slapi+set}" = set; then
1859   enableval="$enable_slapi"
1860   
1861         ol_arg=invalid
1862         for ol_val in auto yes no ; do
1863                 if test "$enableval" = "$ol_val" ; then
1864                         ol_arg="$ol_val"
1865                 fi
1866         done
1867         if test "$ol_arg" = "invalid" ; then
1868                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1869         fi
1870         ol_enable_slapi="$ol_arg"
1871
1872 else
1873         ol_enable_slapi="no"
1874 fi
1875 # end --enable-slapi
1876 # OpenLDAP --enable-slp
1877         # Check whether --enable-slp or --disable-slp was given.
1878 if test "${enable_slp+set}" = set; then
1879   enableval="$enable_slp"
1880   
1881         ol_arg=invalid
1882         for ol_val in auto yes no ; do
1883                 if test "$enableval" = "$ol_val" ; then
1884                         ol_arg="$ol_val"
1885                 fi
1886         done
1887         if test "$ol_arg" = "invalid" ; then
1888                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1889         fi
1890         ol_enable_slp="$ol_arg"
1891
1892 else
1893         ol_enable_slp="no"
1894 fi
1895 # end --enable-slp
1896 # OpenLDAP --enable-wrappers
1897         # Check whether --enable-wrappers or --disable-wrappers was given.
1898 if test "${enable_wrappers+set}" = set; then
1899   enableval="$enable_wrappers"
1900   
1901         ol_arg=invalid
1902         for ol_val in auto yes no ; do
1903                 if test "$enableval" = "$ol_val" ; then
1904                         ol_arg="$ol_val"
1905                 fi
1906         done
1907         if test "$ol_arg" = "invalid" ; then
1908                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1909         fi
1910         ol_enable_wrappers="$ol_arg"
1911
1912 else
1913         ol_enable_wrappers="no"
1914 fi
1915 # end --enable-wrappers
1916
1917 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1918         passwd perl relay shell sql"
1919
1920 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1921 if test "${with_xxslapbackends+set}" = set; then
1922   withval="$with_xxslapbackends"
1923   :
1924 fi
1925
1926
1927 # OpenLDAP --enable-backends
1928         # Check whether --enable-backends or --disable-backends was given.
1929 if test "${enable_backends+set}" = set; then
1930   enableval="$enable_backends"
1931   
1932         ol_arg=invalid
1933         for ol_val in no yes mod ; do
1934                 if test "$enableval" = "$ol_val" ; then
1935                         ol_arg="$ol_val"
1936                 fi
1937         done
1938         if test "$ol_arg" = "invalid" ; then
1939                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1940         fi
1941         ol_enable_backends="$ol_arg"
1942
1943 fi
1944 # end --enable-backends
1945 test -n "$ol_enable_backends" && ol_dflt_backends="$ol_enable_backends"
1946 # OpenLDAP --enable-bdb
1947         # Check whether --enable-bdb or --disable-bdb was given.
1948 if test "${enable_bdb+set}" = set; then
1949   enableval="$enable_bdb"
1950   
1951         ol_arg=invalid
1952         for ol_val in no yes mod ; do
1953                 if test "$enableval" = "$ol_val" ; then
1954                         ol_arg="$ol_val"
1955                 fi
1956         done
1957         if test "$ol_arg" = "invalid" ; then
1958                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1959         fi
1960         ol_enable_bdb="$ol_arg"
1961
1962 else
1963         ol_enable_bdb="${ol_dflt_backends-yes}"
1964 fi
1965 # end --enable-bdb
1966 # OpenLDAP --enable-dnssrv
1967         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1968 if test "${enable_dnssrv+set}" = set; then
1969   enableval="$enable_dnssrv"
1970   
1971         ol_arg=invalid
1972         for ol_val in no yes mod ; do
1973                 if test "$enableval" = "$ol_val" ; then
1974                         ol_arg="$ol_val"
1975                 fi
1976         done
1977         if test "$ol_arg" = "invalid" ; then
1978                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1979         fi
1980         ol_enable_dnssrv="$ol_arg"
1981
1982 else
1983         ol_enable_dnssrv="${ol_dflt_backends-no}"
1984 fi
1985 # end --enable-dnssrv
1986 # OpenLDAP --enable-hdb
1987         # Check whether --enable-hdb or --disable-hdb was given.
1988 if test "${enable_hdb+set}" = set; then
1989   enableval="$enable_hdb"
1990   
1991         ol_arg=invalid
1992         for ol_val in no yes mod ; do
1993                 if test "$enableval" = "$ol_val" ; then
1994                         ol_arg="$ol_val"
1995                 fi
1996         done
1997         if test "$ol_arg" = "invalid" ; then
1998                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1999         fi
2000         ol_enable_hdb="$ol_arg"
2001
2002 else
2003         ol_enable_hdb="${ol_dflt_backends-yes}"
2004 fi
2005 # end --enable-hdb
2006 # OpenLDAP --enable-ldap
2007         # Check whether --enable-ldap or --disable-ldap was given.
2008 if test "${enable_ldap+set}" = set; then
2009   enableval="$enable_ldap"
2010   
2011         ol_arg=invalid
2012         for ol_val in no yes mod ; do
2013                 if test "$enableval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2019         fi
2020         ol_enable_ldap="$ol_arg"
2021
2022 else
2023         ol_enable_ldap="${ol_dflt_backends-no}"
2024 fi
2025 # end --enable-ldap
2026 # OpenLDAP --enable-ldbm
2027         # Check whether --enable-ldbm or --disable-ldbm was given.
2028 if test "${enable_ldbm+set}" = set; then
2029   enableval="$enable_ldbm"
2030   
2031         ol_arg=invalid
2032         for ol_val in no yes mod ; do
2033                 if test "$enableval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2039         fi
2040         ol_enable_ldbm="$ol_arg"
2041
2042 else
2043         ol_enable_ldbm="${ol_dflt_backends-no}"
2044 fi
2045 # end --enable-ldbm
2046 # OpenLDAP --with-ldbm_api
2047         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2048 if test "${with_ldbm_api+set}" = set; then
2049   withval="$with_ldbm_api"
2050   
2051         ol_arg=invalid
2052         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2053                 if test "$withval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2059         fi
2060         ol_with_ldbm_api="$ol_arg"
2061
2062 else
2063         ol_with_ldbm_api="auto"
2064 fi
2065 # end --with-ldbm_api
2066
2067 # OpenLDAP --with-ldbm_type
2068         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2069 if test "${with_ldbm_type+set}" = set; then
2070   withval="$with_ldbm_type"
2071   
2072         ol_arg=invalid
2073         for ol_val in auto btree hash ; do
2074                 if test "$withval" = "$ol_val" ; then
2075                         ol_arg="$ol_val"
2076                 fi
2077         done
2078         if test "$ol_arg" = "invalid" ; then
2079                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2080         fi
2081         ol_with_ldbm_type="$ol_arg"
2082
2083 else
2084         ol_with_ldbm_type="auto"
2085 fi
2086 # end --with-ldbm_type
2087
2088 # OpenLDAP --enable-meta
2089         # Check whether --enable-meta or --disable-meta was given.
2090 if test "${enable_meta+set}" = set; then
2091   enableval="$enable_meta"
2092   
2093         ol_arg=invalid
2094         for ol_val in no yes mod ; do
2095                 if test "$enableval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2101         fi
2102         ol_enable_meta="$ol_arg"
2103
2104 else
2105         ol_enable_meta="${ol_dflt_backends-no}"
2106 fi
2107 # end --enable-meta
2108 # OpenLDAP --enable-monitor
2109         # Check whether --enable-monitor or --disable-monitor was given.
2110 if test "${enable_monitor+set}" = set; then
2111   enableval="$enable_monitor"
2112   
2113         ol_arg=invalid
2114         for ol_val in no yes mod ; do
2115                 if test "$enableval" = "$ol_val" ; then
2116                         ol_arg="$ol_val"
2117                 fi
2118         done
2119         if test "$ol_arg" = "invalid" ; then
2120                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2121         fi
2122         ol_enable_monitor="$ol_arg"
2123
2124 else
2125         ol_enable_monitor="${ol_dflt_backends-yes}"
2126 fi
2127 # end --enable-monitor
2128 # OpenLDAP --enable-null
2129         # Check whether --enable-null or --disable-null was given.
2130 if test "${enable_null+set}" = set; then
2131   enableval="$enable_null"
2132   
2133         ol_arg=invalid
2134         for ol_val in no yes mod ; do
2135                 if test "$enableval" = "$ol_val" ; then
2136                         ol_arg="$ol_val"
2137                 fi
2138         done
2139         if test "$ol_arg" = "invalid" ; then
2140                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2141         fi
2142         ol_enable_null="$ol_arg"
2143
2144 else
2145         ol_enable_null="${ol_dflt_backends-no}"
2146 fi
2147 # end --enable-null
2148 # OpenLDAP --enable-passwd
2149         # Check whether --enable-passwd or --disable-passwd was given.
2150 if test "${enable_passwd+set}" = set; then
2151   enableval="$enable_passwd"
2152   
2153         ol_arg=invalid
2154         for ol_val in no yes mod ; do
2155                 if test "$enableval" = "$ol_val" ; then
2156                         ol_arg="$ol_val"
2157                 fi
2158         done
2159         if test "$ol_arg" = "invalid" ; then
2160                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2161         fi
2162         ol_enable_passwd="$ol_arg"
2163
2164 else
2165         ol_enable_passwd="${ol_dflt_backends-no}"
2166 fi
2167 # end --enable-passwd
2168 # OpenLDAP --enable-perl
2169         # Check whether --enable-perl or --disable-perl was given.
2170 if test "${enable_perl+set}" = set; then
2171   enableval="$enable_perl"
2172   
2173         ol_arg=invalid
2174         for ol_val in no yes mod ; do
2175                 if test "$enableval" = "$ol_val" ; then
2176                         ol_arg="$ol_val"
2177                 fi
2178         done
2179         if test "$ol_arg" = "invalid" ; then
2180                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2181         fi
2182         ol_enable_perl="$ol_arg"
2183
2184 else
2185         ol_enable_perl="${ol_dflt_backends-no}"
2186 fi
2187 # end --enable-perl
2188 # OpenLDAP --enable-relay
2189         # Check whether --enable-relay or --disable-relay was given.
2190 if test "${enable_relay+set}" = set; then
2191   enableval="$enable_relay"
2192   
2193         ol_arg=invalid
2194         for ol_val in no yes mod ; do
2195                 if test "$enableval" = "$ol_val" ; then
2196                         ol_arg="$ol_val"
2197                 fi
2198         done
2199         if test "$ol_arg" = "invalid" ; then
2200                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2201         fi
2202         ol_enable_relay="$ol_arg"
2203
2204 else
2205         ol_enable_relay="${ol_dflt_backends-yes}"
2206 fi
2207 # end --enable-relay
2208 # OpenLDAP --enable-shell
2209         # Check whether --enable-shell or --disable-shell was given.
2210 if test "${enable_shell+set}" = set; then
2211   enableval="$enable_shell"
2212   
2213         ol_arg=invalid
2214         for ol_val in no yes mod ; do
2215                 if test "$enableval" = "$ol_val" ; then
2216                         ol_arg="$ol_val"
2217                 fi
2218         done
2219         if test "$ol_arg" = "invalid" ; then
2220                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2221         fi
2222         ol_enable_shell="$ol_arg"
2223
2224 else
2225         ol_enable_shell="${ol_dflt_backends-no}"
2226 fi
2227 # end --enable-shell
2228 # OpenLDAP --enable-sql
2229         # Check whether --enable-sql or --disable-sql was given.
2230 if test "${enable_sql+set}" = set; then
2231   enableval="$enable_sql"
2232   
2233         ol_arg=invalid
2234         for ol_val in no yes mod ; do
2235                 if test "$enableval" = "$ol_val" ; then
2236                         ol_arg="$ol_val"
2237                 fi
2238         done
2239         if test "$ol_arg" = "invalid" ; then
2240                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2241         fi
2242         ol_enable_sql="$ol_arg"
2243
2244 else
2245         ol_enable_sql="${ol_dflt_backends-no}"
2246 fi
2247 # end --enable-sql
2248
2249 Overlays="accesslog \
2250         denyop \
2251         dyngroup \
2252         dynlist \
2253         glue \
2254         lastmod \
2255         ppolicy \
2256         proxycache \
2257         refint \
2258         retcode \
2259         rwm \
2260         syncprov \
2261         translucent \
2262         unique \
2263         valsort"
2264
2265 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2266 if test "${with_xxslapoverlays+set}" = set; then
2267   withval="$with_xxslapoverlays"
2268   :
2269 fi
2270
2271
2272 # OpenLDAP --enable-overlays
2273         # Check whether --enable-overlays or --disable-overlays was given.
2274 if test "${enable_overlays+set}" = set; then
2275   enableval="$enable_overlays"
2276   
2277         ol_arg=invalid
2278         for ol_val in no yes mod ; do
2279                 if test "$enableval" = "$ol_val" ; then
2280                         ol_arg="$ol_val"
2281                 fi
2282         done
2283         if test "$ol_arg" = "invalid" ; then
2284                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2285         fi
2286         ol_enable_overlays="$ol_arg"
2287
2288 fi
2289 # end --enable-overlays
2290 test -n "$ol_enable_overlays" && ol_dflt_overlays="$ol_enable_overlays"
2291 # OpenLDAP --enable-accesslog
2292         # Check whether --enable-accesslog or --disable-accesslog was given.
2293 if test "${enable_accesslog+set}" = set; then
2294   enableval="$enable_accesslog"
2295   
2296         ol_arg=invalid
2297         for ol_val in no yes mod ; do
2298                 if test "$enableval" = "$ol_val" ; then
2299                         ol_arg="$ol_val"
2300                 fi
2301         done
2302         if test "$ol_arg" = "invalid" ; then
2303                 { echo "configure: error: bad value $enableval for --enable-accesslog" 1>&2; exit 1; }
2304         fi
2305         ol_enable_accesslog="$ol_arg"
2306
2307 else
2308         ol_enable_accesslog="${ol_dflt_overlays-no}"
2309 fi
2310 # end --enable-accesslog
2311
2312 # OpenLDAP --enable-denyop
2313         # Check whether --enable-denyop or --disable-denyop was given.
2314 if test "${enable_denyop+set}" = set; then
2315   enableval="$enable_denyop"
2316   
2317         ol_arg=invalid
2318         for ol_val in no yes mod ; do
2319                 if test "$enableval" = "$ol_val" ; then
2320                         ol_arg="$ol_val"
2321                 fi
2322         done
2323         if test "$ol_arg" = "invalid" ; then
2324                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2325         fi
2326         ol_enable_denyop="$ol_arg"
2327
2328 else
2329         ol_enable_denyop="${ol_dflt_overlays-no}"
2330 fi
2331 # end --enable-denyop
2332
2333 # OpenLDAP --enable-dyngroup
2334         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2335 if test "${enable_dyngroup+set}" = set; then
2336   enableval="$enable_dyngroup"
2337   
2338         ol_arg=invalid
2339         for ol_val in no yes mod ; do
2340                 if test "$enableval" = "$ol_val" ; then
2341                         ol_arg="$ol_val"
2342                 fi
2343         done
2344         if test "$ol_arg" = "invalid" ; then
2345                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2346         fi
2347         ol_enable_dyngroup="$ol_arg"
2348
2349 else
2350         ol_enable_dyngroup="${ol_dflt_overlays-no}"
2351 fi
2352 # end --enable-dyngroup
2353
2354 # OpenLDAP --enable-dynlist
2355         # Check whether --enable-dynlist or --disable-dynlist was given.
2356 if test "${enable_dynlist+set}" = set; then
2357   enableval="$enable_dynlist"
2358   
2359         ol_arg=invalid
2360         for ol_val in no yes mod ; do
2361                 if test "$enableval" = "$ol_val" ; then
2362                         ol_arg="$ol_val"
2363                 fi
2364         done
2365         if test "$ol_arg" = "invalid" ; then
2366                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2367         fi
2368         ol_enable_dynlist="$ol_arg"
2369
2370 else
2371         ol_enable_dynlist="${ol_dflt_overlays-no}"
2372 fi
2373 # end --enable-dynlist
2374
2375 # OpenLDAP --enable-glue
2376         # Check whether --enable-glue or --disable-glue was given.
2377 if test "${enable_glue+set}" = set; then
2378   enableval="$enable_glue"
2379   
2380         ol_arg=invalid
2381         for ol_val in no yes mod ; do
2382                 if test "$enableval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2388         fi
2389         ol_enable_glue="$ol_arg"
2390
2391 else
2392         ol_enable_glue="${ol_dflt_overlays-yes}"
2393 fi
2394 # end --enable-glue
2395
2396 # OpenLDAP --enable-lastmod
2397         # Check whether --enable-lastmod or --disable-lastmod was given.
2398 if test "${enable_lastmod+set}" = set; then
2399   enableval="$enable_lastmod"
2400   
2401         ol_arg=invalid
2402         for ol_val in no yes mod ; do
2403                 if test "$enableval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2409         fi
2410         ol_enable_lastmod="$ol_arg"
2411
2412 else
2413         ol_enable_lastmod="${ol_dflt_overlays-no}"
2414 fi
2415 # end --enable-lastmod
2416
2417 # OpenLDAP --enable-ppolicy
2418         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2419 if test "${enable_ppolicy+set}" = set; then
2420   enableval="$enable_ppolicy"
2421   
2422         ol_arg=invalid
2423         for ol_val in no yes mod ; do
2424                 if test "$enableval" = "$ol_val" ; then
2425                         ol_arg="$ol_val"
2426                 fi
2427         done
2428         if test "$ol_arg" = "invalid" ; then
2429                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2430         fi
2431         ol_enable_ppolicy="$ol_arg"
2432
2433 else
2434         ol_enable_ppolicy="${ol_dflt_overlays-no}"
2435 fi
2436 # end --enable-ppolicy
2437
2438 # OpenLDAP --enable-proxycache
2439         # Check whether --enable-proxycache or --disable-proxycache was given.
2440 if test "${enable_proxycache+set}" = set; then
2441   enableval="$enable_proxycache"
2442   
2443         ol_arg=invalid
2444         for ol_val in no yes mod ; do
2445                 if test "$enableval" = "$ol_val" ; then
2446                         ol_arg="$ol_val"
2447                 fi
2448         done
2449         if test "$ol_arg" = "invalid" ; then
2450                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2451         fi
2452         ol_enable_proxycache="$ol_arg"
2453
2454 else
2455         ol_enable_proxycache="${ol_dflt_overlays-no}"
2456 fi
2457 # end --enable-proxycache
2458
2459 # OpenLDAP --enable-refint
2460         # Check whether --enable-refint or --disable-refint was given.
2461 if test "${enable_refint+set}" = set; then
2462   enableval="$enable_refint"
2463   
2464         ol_arg=invalid
2465         for ol_val in no yes mod ; do
2466                 if test "$enableval" = "$ol_val" ; then
2467                         ol_arg="$ol_val"
2468                 fi
2469         done
2470         if test "$ol_arg" = "invalid" ; then
2471                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2472         fi
2473         ol_enable_refint="$ol_arg"
2474
2475 else
2476         ol_enable_refint="${ol_dflt_overlays-no}"
2477 fi
2478 # end --enable-refint
2479
2480 # OpenLDAP --enable-retcode
2481         # Check whether --enable-retcode or --disable-retcode was given.
2482 if test "${enable_retcode+set}" = set; then
2483   enableval="$enable_retcode"
2484   
2485         ol_arg=invalid
2486         for ol_val in no yes mod ; do
2487                 if test "$enableval" = "$ol_val" ; then
2488                         ol_arg="$ol_val"
2489                 fi
2490         done
2491         if test "$ol_arg" = "invalid" ; then
2492                 { echo "configure: error: bad value $enableval for --enable-retcode" 1>&2; exit 1; }
2493         fi
2494         ol_enable_retcode="$ol_arg"
2495
2496 else
2497         ol_enable_retcode="${ol_dflt_overlays-no}"
2498 fi
2499 # end --enable-retcode
2500
2501 # OpenLDAP --enable-rwm
2502         # Check whether --enable-rwm or --disable-rwm was given.
2503 if test "${enable_rwm+set}" = set; then
2504   enableval="$enable_rwm"
2505   
2506         ol_arg=invalid
2507         for ol_val in no yes mod ; do
2508                 if test "$enableval" = "$ol_val" ; then
2509                         ol_arg="$ol_val"
2510                 fi
2511         done
2512         if test "$ol_arg" = "invalid" ; then
2513                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2514         fi
2515         ol_enable_rwm="$ol_arg"
2516
2517 else
2518         ol_enable_rwm="${ol_dflt_overlays-no}"
2519 fi
2520 # end --enable-rwm
2521
2522 # OpenLDAP --enable-syncprov
2523         # Check whether --enable-syncprov or --disable-syncprov was given.
2524 if test "${enable_syncprov+set}" = set; then
2525   enableval="$enable_syncprov"
2526   
2527         ol_arg=invalid
2528         for ol_val in no yes mod ; do
2529                 if test "$enableval" = "$ol_val" ; then
2530                         ol_arg="$ol_val"
2531                 fi
2532         done
2533         if test "$ol_arg" = "invalid" ; then
2534                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2535         fi
2536         ol_enable_syncprov="$ol_arg"
2537
2538 else
2539         ol_enable_syncprov="${ol_dflt_overlays-yes}"
2540 fi
2541 # end --enable-syncprov
2542
2543 # OpenLDAP --enable-translucent
2544         # Check whether --enable-translucent or --disable-translucent was given.
2545 if test "${enable_translucent+set}" = set; then
2546   enableval="$enable_translucent"
2547   
2548         ol_arg=invalid
2549         for ol_val in no yes mod ; do
2550                 if test "$enableval" = "$ol_val" ; then
2551                         ol_arg="$ol_val"
2552                 fi
2553         done
2554         if test "$ol_arg" = "invalid" ; then
2555                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2556         fi
2557         ol_enable_translucent="$ol_arg"
2558
2559 else
2560         ol_enable_translucent="${ol_dflt_overlays-no}"
2561 fi
2562 # end --enable-translucent
2563
2564 # OpenLDAP --enable-unique
2565         # Check whether --enable-unique or --disable-unique was given.
2566 if test "${enable_unique+set}" = set; then
2567   enableval="$enable_unique"
2568   
2569         ol_arg=invalid
2570         for ol_val in no yes mod ; do
2571                 if test "$enableval" = "$ol_val" ; then
2572                         ol_arg="$ol_val"
2573                 fi
2574         done
2575         if test "$ol_arg" = "invalid" ; then
2576                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2577         fi
2578         ol_enable_unique="$ol_arg"
2579
2580 else
2581         ol_enable_unique="${ol_dflt_overlays-no}"
2582 fi
2583 # end --enable-unique
2584
2585 # OpenLDAP --enable-valsort
2586         # Check whether --enable-valsort or --disable-valsort was given.
2587 if test "${enable_valsort+set}" = set; then
2588   enableval="$enable_valsort"
2589   
2590         ol_arg=invalid
2591         for ol_val in no yes mod ; do
2592                 if test "$enableval" = "$ol_val" ; then
2593                         ol_arg="$ol_val"
2594                 fi
2595         done
2596         if test "$ol_arg" = "invalid" ; then
2597                 { echo "configure: error: bad value $enableval for --enable-valsort" 1>&2; exit 1; }
2598         fi
2599         ol_enable_valsort="$ol_arg"
2600
2601 else
2602         ol_enable_valsort="${ol_dflt_overlays-no}"
2603 fi
2604 # end --enable-valsort
2605
2606
2607
2608 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2609 if test "${with_xxslurpdoptions+set}" = set; then
2610   withval="$with_xxslurpdoptions"
2611   :
2612 fi
2613
2614 # OpenLDAP --enable-slurpd
2615         # Check whether --enable-slurpd or --disable-slurpd was given.
2616 if test "${enable_slurpd+set}" = set; then
2617   enableval="$enable_slurpd"
2618   
2619         ol_arg=invalid
2620         for ol_val in auto yes no ; do
2621                 if test "$enableval" = "$ol_val" ; then
2622                         ol_arg="$ol_val"
2623                 fi
2624         done
2625         if test "$ol_arg" = "invalid" ; then
2626                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2627         fi
2628         ol_enable_slurpd="$ol_arg"
2629
2630 else
2631         ol_enable_slurpd="auto"
2632 fi
2633 # end --enable-slurpd
2634
2635 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2636 if test "${with_xxliboptions+set}" = set; then
2637   withval="$with_xxliboptions"
2638   :
2639 fi
2640
2641 # Check whether --enable-static or --disable-static was given.
2642 if test "${enable_static+set}" = set; then
2643   enableval="$enable_static"
2644   p=${PACKAGE-default}
2645 case $enableval in
2646 yes) enable_static=yes ;;
2647 no) enable_static=no ;;
2648 *)
2649   enable_static=no
2650   # Look at the argument we got.  We use all the common list separators.
2651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2652   for pkg in $enableval; do
2653     if test "X$pkg" = "X$p"; then
2654       enable_static=yes
2655     fi
2656   done
2657   IFS="$ac_save_ifs"
2658   ;;
2659 esac
2660 else
2661   enable_static=yes
2662 fi
2663
2664 # Check whether --enable-shared or --disable-shared was given.
2665 if test "${enable_shared+set}" = set; then
2666   enableval="$enable_shared"
2667   p=${PACKAGE-default}
2668 case $enableval in
2669 yes) enable_shared=yes ;;
2670 no) enable_shared=no ;;
2671 *)
2672   enable_shared=no
2673   # Look at the argument we got.  We use all the common list separators.
2674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2675   for pkg in $enableval; do
2676     if test "X$pkg" = "X$p"; then
2677       enable_shared=yes
2678     fi
2679   done
2680   IFS="$ac_save_ifs"
2681   ;;
2682 esac
2683 else
2684   enable_shared=yes
2685 fi
2686
2687
2688
2689 # validate options
2690 if test $ol_enable_slapd = no ; then
2691                 if test $ol_enable_slapi = yes ; then
2692                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2693         fi
2694         case "$ol_enable_backends" in yes | mod)
2695                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2696         esac
2697         for i in $Backends; do
2698                 eval "ol_tmp=\$ol_enable_$i"
2699                 if test $ol_tmp != no ; then
2700                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2701                         eval "ol_enable_$i=no"
2702                 fi
2703         done
2704         if test $ol_enable_modules = yes ; then
2705                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2706         fi
2707         if test $ol_enable_multimaster = yes ; then
2708                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2709         fi
2710         if test $ol_enable_wrappers = yes ; then
2711                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2712         fi
2713         if test $ol_enable_rlookups = yes ; then
2714                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2715         fi
2716         if test $ol_enable_aci = yes ; then
2717                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2718         fi
2719         if test $ol_with_ldbm_api != auto ; then
2720                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2721         fi
2722         if test $ol_with_ldbm_type != auto ; then
2723                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2724         fi
2725         if test $ol_enable_slurpd = yes ; then
2726                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2727         fi
2728         if test $ol_enable_rewrite = yes ; then
2729                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2730         fi
2731                 case "$ol_enable_overlays" in yes | mod)
2732                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2733         esac
2734         for i in $Overlays; do
2735                 eval "ol_tmp=\$ol_enable_$i"
2736                 if test $ol_tmp != no ; then
2737                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2738                         eval "ol_enable_$i=no"
2739                 fi
2740         done
2741
2742         # force settings to no
2743         ol_enable_slapi=no
2744
2745         ol_enable_backends=
2746         ol_enable_overlays=
2747         ol_enable_modules=no
2748         ol_enable_multimaster=no
2749         ol_enable_rlookups=no
2750         ol_enable_aci=no
2751         ol_enable_wrappers=no
2752
2753         ol_with_ldbm_api=no
2754         ol_with_ldbm_type=no
2755
2756         ol_enable_slurpd=no
2757
2758         ol_enable_rewrite=no
2759
2760 elif test $ol_enable_ldbm = no ; then
2761         
2762         if test $ol_with_ldbm_api != auto ; then
2763                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2764         fi
2765
2766         if test $ol_with_ldbm_type != auto ; then
2767                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2768         fi
2769
2770         if test $ol_enable_modules != yes -a \
2771                 $ol_enable_bdb = no -a \
2772                 $ol_enable_dnssrv = no -a \
2773                 $ol_enable_hdb = no -a \
2774                 $ol_enable_ldap = no -a \
2775                 $ol_enable_meta = no -a \
2776                 $ol_enable_monitor = no -a \
2777                 $ol_enable_null = no -a \
2778                 $ol_enable_passwd = no -a \
2779                 $ol_enable_perl = no -a \
2780                 $ol_enable_relay = no -a \
2781                 $ol_enable_shell = no -a \
2782                 $ol_enable_sql = no ; then
2783
2784                 if test $ol_enable_slapd = yes ; then
2785                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2786                 else
2787                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2788                         ol_enable_slapd=no
2789                 fi
2790         fi
2791
2792         ol_with_ldbm_api=no
2793         ol_with_ldbm_type=no
2794
2795         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2796                 ol_with_ldbm_api=berkeley
2797         fi
2798
2799 else
2800                 if test $ol_with_ldbm_api = gdbm -a \
2801                 $ol_with_ldbm_type = btree ; then
2802                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2803         fi
2804         if test $ol_with_ldbm_api = mdbm -a \
2805                 $ol_with_ldbm_type = btree ; then
2806                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2807         fi
2808         if test $ol_with_ldbm_api = ndbm -a \
2809                 $ol_with_ldbm_type = btree ; then
2810                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2811         fi
2812
2813         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2814                 if test $ol_with_ldbm_api = auto ; then
2815                         ol_with_ldbm_api=berkeley
2816                 elif test $ol_with_ldbm_api != berkeley ; then
2817                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2818                 fi
2819         fi
2820 fi
2821
2822 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2823         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2824 fi
2825
2826 if test $ol_enable_slurpd = yes ; then
2827                 if test $ol_with_threads = no ; then
2828                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2829         fi
2830 fi
2831
2832 if test $ol_enable_lmpasswd = yes ; then
2833         if test $ol_with_tls = no ; then
2834                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2835         fi
2836 fi
2837
2838 if test $ol_enable_kbind = yes ; then
2839         if test $ol_with_kerberos = no ; then
2840                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2841         elif test $ol_with_kerberos = auto ; then
2842                 ol_with_kerberos=yes
2843         fi
2844
2845 elif test $ol_enable_kbind = no ; then
2846         if test $ol_with_kerberos = auto ; then
2847                 ol_with_kerberos=no
2848         elif test $ol_with_kerberos != no ; then
2849                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2850                 ol_with_kerberos=no
2851         fi
2852 fi
2853
2854 if test $ol_enable_spasswd = yes ; then
2855         if test $ol_with_cyrus_sasl = no ; then
2856                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2857         fi
2858         ol_with_cyrus_sasl=yes
2859 fi
2860
2861 echo "$ac_t""done" 1>&6
2862
2863 LDAP_LIBS=
2864 LDBM_LIBS=
2865 LTHREAD_LIBS=
2866 LUTIL_LIBS=
2867
2868 SLAPD_LIBS=
2869 SLURPD_LIBS=
2870
2871 BUILD_SLAPD=no
2872 BUILD_SLURPD=no
2873
2874 BUILD_THREAD=no
2875
2876 BUILD_SLAPI=no
2877 SLAPD_SLAPI_DEPEND=
2878
2879 BUILD_BDB=no
2880 BUILD_DNSSRV=no
2881 BUILD_HDB=no
2882 BUILD_LDAP=no
2883 BUILD_LDBM=no
2884 BUILD_META=no
2885 BUILD_MONITOR=no
2886 BUILD_NULL=no
2887 BUILD_PASSWD=no
2888 BUILD_PERL=no
2889 BUILD_RELAY=no
2890 BUILD_SHELL=no
2891 BUILD_SQL=no
2892
2893 BUILD_ACCESSLOG=no
2894 BUILD_DENYOP=no
2895 BUILD_DYNGROUP=no
2896 BUILD_DYNLIST=no
2897 BUILD_GLUE=no
2898 BUILD_LASTMOD=no
2899 BUILD_PPOLICY=no
2900 BUILD_PROXYCACHE=no
2901 BUILD_REFINT=no
2902 BUILD_RETCODE=no
2903 BUILD_RWM=no
2904 BUILD_SYNCPROV=no
2905 BUILD_TRANSLUCENT=no
2906 BUILD_UNIQUE=no
2907 BUILD_VALSORT=no
2908
2909 SLAPD_STATIC_OVERLAYS=
2910 SLAPD_DYNAMIC_OVERLAYS=
2911
2912 SLAPD_MODULES_LDFLAGS=
2913 SLAPD_MODULES_CPPFLAGS=
2914
2915 SLAPD_STATIC_BACKENDS=back-ldif
2916 SLAPD_DYNAMIC_BACKENDS=
2917
2918 SLAPD_PERL_LDFLAGS=
2919 MOD_PERL_LDFLAGS=
2920 PERL_CPPFLAGS=
2921
2922 SLAPD_SQL_LDFLAGS=
2923 SLAPD_SQL_LIBS=
2924 SLAPD_SQL_INCLUDES=
2925
2926 KRB4_LIBS=
2927 KRB5_LIBS=
2928 SASL_LIBS=
2929 TLS_LIBS=
2930 MODULES_LIBS=
2931 SLAPI_LIBS=
2932 LIBSLAPI=
2933 LIBSLAPITOOLS=
2934 AUTH_LIBS=
2935
2936 SLAPD_SLP_LIBS=
2937 SLAPD_GMP_LIBS=
2938
2939
2940 cat >> confdefs.h <<\EOF
2941 #define HAVE_MKVERSION 1
2942 EOF
2943
2944
2945
2946
2947 ol_aix_threads=no
2948 case "$target" in
2949 *-*-aix*)       if test -z "$CC" ; then
2950                 case "$ol_with_threads" in
2951                 auto | yes |  posix) ol_aix_threads=yes ;;
2952                 esac
2953         fi
2954 ;;
2955 esac
2956
2957 if test $ol_aix_threads = yes ; then
2958         if test -z "${CC}" ; then
2959                 for ac_prog in cc_r xlc_r cc
2960 do
2961 # Extract the first word of "$ac_prog", so it can be a program name with args.
2962 set dummy $ac_prog; ac_word=$2
2963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2964 echo "configure:2965: checking for $ac_word" >&5
2965 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2966   echo $ac_n "(cached) $ac_c" 1>&6
2967 else
2968   if test -n "$CC"; then
2969   ac_cv_prog_CC="$CC" # Let the user override the test.
2970 else
2971   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2972   ac_dummy="$PATH"
2973   for ac_dir in $ac_dummy; do
2974     test -z "$ac_dir" && ac_dir=.
2975     if test -f $ac_dir/$ac_word; then
2976       ac_cv_prog_CC="$ac_prog"
2977       break
2978     fi
2979   done
2980   IFS="$ac_save_ifs"
2981 fi
2982 fi
2983 CC="$ac_cv_prog_CC"
2984 if test -n "$CC"; then
2985   echo "$ac_t""$CC" 1>&6
2986 else
2987   echo "$ac_t""no" 1>&6
2988 fi
2989
2990 test -n "$CC" && break
2991 done
2992
2993
2994                 if test "$CC" = cc ; then
2995                                                 if test $ol_with_threads != auto ; then
2996                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2997                         else
2998                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2999                         fi
3000                         ol_with_threads=no
3001                 fi
3002         fi
3003
3004         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3005                 ol_with_threads=posix
3006                 ol_cv_pthread_create=yes
3007         fi
3008 fi
3009
3010 if test -z "${CC}"; then
3011         for ac_prog in cc gcc
3012 do
3013 # Extract the first word of "$ac_prog", so it can be a program name with args.
3014 set dummy $ac_prog; ac_word=$2
3015 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3016 echo "configure:3017: checking for $ac_word" >&5
3017 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3018   echo $ac_n "(cached) $ac_c" 1>&6
3019 else
3020   if test -n "$CC"; then
3021   ac_cv_prog_CC="$CC" # Let the user override the test.
3022 else
3023   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3024   ac_dummy="$PATH"
3025   for ac_dir in $ac_dummy; do
3026     test -z "$ac_dir" && ac_dir=.
3027     if test -f $ac_dir/$ac_word; then
3028       ac_cv_prog_CC="$ac_prog"
3029       break
3030     fi
3031   done
3032   IFS="$ac_save_ifs"
3033 fi
3034 fi
3035 CC="$ac_cv_prog_CC"
3036 if test -n "$CC"; then
3037   echo "$ac_t""$CC" 1>&6
3038 else
3039   echo "$ac_t""no" 1>&6
3040 fi
3041
3042 test -n "$CC" && break
3043 done
3044 test -n "$CC" || CC="missing"
3045
3046
3047         if test "${CC}" = "missing" ; then
3048                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3049         fi
3050 fi
3051
3052 if test -z "${AR}"; then
3053         for ac_prog in ar gar
3054 do
3055 # Extract the first word of "$ac_prog", so it can be a program name with args.
3056 set dummy $ac_prog; ac_word=$2
3057 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3058 echo "configure:3059: checking for $ac_word" >&5
3059 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   if test -n "$AR"; then
3063   ac_cv_prog_AR="$AR" # Let the user override the test.
3064 else
3065   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3066   ac_dummy="$PATH"
3067   for ac_dir in $ac_dummy; do
3068     test -z "$ac_dir" && ac_dir=.
3069     if test -f $ac_dir/$ac_word; then
3070       ac_cv_prog_AR="$ac_prog"
3071       break
3072     fi
3073   done
3074   IFS="$ac_save_ifs"
3075 fi
3076 fi
3077 AR="$ac_cv_prog_AR"
3078 if test -n "$AR"; then
3079   echo "$ac_t""$AR" 1>&6
3080 else
3081   echo "$ac_t""no" 1>&6
3082 fi
3083
3084 test -n "$AR" && break
3085 done
3086 test -n "$AR" || AR="missing"
3087
3088
3089         if test "${AR}" = "missing" ; then
3090                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3091         fi
3092 fi
3093
3094
3095
3096 # Find the correct PATH separator.  Usually this is `:', but
3097 # DJGPP uses `;' like DOS.
3098 if test "X${PATH_SEPARATOR+set}" != Xset; then
3099   UNAME=${UNAME-`uname 2>/dev/null`}
3100   case X$UNAME in
3101     *-DOS) lt_cv_sys_path_separator=';' ;;
3102     *)     lt_cv_sys_path_separator=':' ;;
3103   esac
3104   PATH_SEPARATOR=$lt_cv_sys_path_separator
3105 fi
3106
3107 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3108 echo "configure:3109: checking for Cygwin environment" >&5
3109 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115
3116 int main() {
3117
3118 #ifndef __CYGWIN__
3119 #define __CYGWIN__ __CYGWIN32__
3120 #endif
3121 return __CYGWIN__;
3122 ; return 0; }
3123 EOF
3124 if { (eval echo configure:3125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3125   rm -rf conftest*
3126   ac_cv_cygwin=yes
3127 else
3128   echo "configure: failed program was:" >&5
3129   cat conftest.$ac_ext >&5
3130   rm -rf conftest*
3131   ac_cv_cygwin=no
3132 fi
3133 rm -f conftest*
3134 fi
3135
3136 echo "$ac_t""$ac_cv_cygwin" 1>&6
3137 CYGWIN=
3138 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3139 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3140 echo "configure:3141: checking for mingw32 environment" >&5
3141 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3142   echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144   cat > conftest.$ac_ext <<EOF
3145 #line 3146 "configure"
3146 #include "confdefs.h"
3147
3148 int main() {
3149 return __MINGW32__;
3150 ; return 0; }
3151 EOF
3152 if { (eval echo configure:3153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3153   rm -rf conftest*
3154   ac_cv_mingw32=yes
3155 else
3156   echo "configure: failed program was:" >&5
3157   cat conftest.$ac_ext >&5
3158   rm -rf conftest*
3159   ac_cv_mingw32=no
3160 fi
3161 rm -f conftest*
3162 fi
3163
3164 echo "$ac_t""$ac_cv_mingw32" 1>&6
3165 MINGW32=
3166 test "$ac_cv_mingw32" = yes && MINGW32=yes
3167 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3168 echo "configure:3169: checking for EMX OS/2 environment" >&5
3169 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3170   echo $ac_n "(cached) $ac_c" 1>&6
3171 else
3172   cat > conftest.$ac_ext <<EOF
3173 #line 3174 "configure"
3174 #include "confdefs.h"
3175
3176 int main() {
3177 return __EMX__;
3178 ; return 0; }
3179 EOF
3180 if { (eval echo configure:3181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3181   rm -rf conftest*
3182   ac_cv_emxos2=yes
3183 else
3184   echo "configure: failed program was:" >&5
3185   cat conftest.$ac_ext >&5
3186   rm -rf conftest*
3187   ac_cv_emxos2=no
3188 fi
3189 rm -f conftest*
3190 fi
3191
3192 echo "$ac_t""$ac_cv_emxos2" 1>&6
3193 EMXOS2=
3194 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3195 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3196 echo "configure:3197: checking how to run the C preprocessor" >&5
3197 # On Suns, sometimes $CPP names a directory.
3198 if test -n "$CPP" && test -d "$CPP"; then
3199   CPP=
3200 fi
3201 if test -z "$CPP"; then
3202 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3203   echo $ac_n "(cached) $ac_c" 1>&6
3204 else
3205     # This must be in double quotes, not single quotes, because CPP may get
3206   # substituted into the Makefile and "${CC-cc}" will confuse make.
3207   CPP="${CC-cc} -E"
3208   # On the NeXT, cc -E runs the code through the compiler's parser,
3209   # not just through cpp.
3210   cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213 #include <assert.h>
3214 Syntax Error
3215 EOF
3216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3217 { (eval echo configure:3218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3219 if test -z "$ac_err"; then
3220   :
3221 else
3222   echo "$ac_err" >&5
3223   echo "configure: failed program was:" >&5
3224   cat conftest.$ac_ext >&5
3225   rm -rf conftest*
3226   CPP="${CC-cc} -E -traditional-cpp"
3227   cat > conftest.$ac_ext <<EOF
3228 #line 3229 "configure"
3229 #include "confdefs.h"
3230 #include <assert.h>
3231 Syntax Error
3232 EOF
3233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3234 { (eval echo configure:3235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3236 if test -z "$ac_err"; then
3237   :
3238 else
3239   echo "$ac_err" >&5
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -rf conftest*
3243   CPP="${CC-cc} -nologo -E"
3244   cat > conftest.$ac_ext <<EOF
3245 #line 3246 "configure"
3246 #include "confdefs.h"
3247 #include <assert.h>
3248 Syntax Error
3249 EOF
3250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3251 { (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253 if test -z "$ac_err"; then
3254   :
3255 else
3256   echo "$ac_err" >&5
3257   echo "configure: failed program was:" >&5
3258   cat conftest.$ac_ext >&5
3259   rm -rf conftest*
3260   CPP=/lib/cpp
3261 fi
3262 rm -f conftest*
3263 fi
3264 rm -f conftest*
3265 fi
3266 rm -f conftest*
3267   ac_cv_prog_CPP="$CPP"
3268 fi
3269   CPP="$ac_cv_prog_CPP"
3270 else
3271   ac_cv_prog_CPP="$CPP"
3272 fi
3273 echo "$ac_t""$CPP" 1>&6
3274
3275 # Check whether --enable-fast-install or --disable-fast-install was given.
3276 if test "${enable_fast_install+set}" = set; then
3277   enableval="$enable_fast_install"
3278   p=${PACKAGE-default}
3279 case $enableval in
3280 yes) enable_fast_install=yes ;;
3281 no) enable_fast_install=no ;;
3282 *)
3283   enable_fast_install=no
3284   # Look at the argument we got.  We use all the common list separators.
3285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3286   for pkg in $enableval; do
3287     if test "X$pkg" = "X$p"; then
3288       enable_fast_install=yes
3289     fi
3290   done
3291   IFS="$ac_save_ifs"
3292   ;;
3293 esac
3294 else
3295   enable_fast_install=yes
3296 fi
3297
3298 # Extract the first word of "gcc", so it can be a program name with args.
3299 set dummy gcc; ac_word=$2
3300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_word" >&5
3302 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   if test -n "$CC"; then
3306   ac_cv_prog_CC="$CC" # Let the user override the test.
3307 else
3308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3309   ac_dummy="$PATH"
3310   for ac_dir in $ac_dummy; do
3311     test -z "$ac_dir" && ac_dir=.
3312     if test -f $ac_dir/$ac_word; then
3313       ac_cv_prog_CC="gcc"
3314       break
3315     fi
3316   done
3317   IFS="$ac_save_ifs"
3318 fi
3319 fi
3320 CC="$ac_cv_prog_CC"
3321 if test -n "$CC"; then
3322   echo "$ac_t""$CC" 1>&6
3323 else
3324   echo "$ac_t""no" 1>&6
3325 fi
3326
3327 if test -z "$CC"; then
3328   # Extract the first word of "cc", so it can be a program name with args.
3329 set dummy cc; ac_word=$2
3330 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3331 echo "configure:3332: checking for $ac_word" >&5
3332 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3333   echo $ac_n "(cached) $ac_c" 1>&6
3334 else
3335   if test -n "$CC"; then
3336   ac_cv_prog_CC="$CC" # Let the user override the test.
3337 else
3338   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3339   ac_prog_rejected=no
3340   ac_dummy="$PATH"
3341   for ac_dir in $ac_dummy; do
3342     test -z "$ac_dir" && ac_dir=.
3343     if test -f $ac_dir/$ac_word; then
3344       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3345         ac_prog_rejected=yes
3346         continue
3347       fi
3348       ac_cv_prog_CC="cc"
3349       break
3350     fi
3351   done
3352   IFS="$ac_save_ifs"
3353 if test $ac_prog_rejected = yes; then
3354   # We found a bogon in the path, so make sure we never use it.
3355   set dummy $ac_cv_prog_CC
3356   shift
3357   if test $# -gt 0; then
3358     # We chose a different compiler from the bogus one.
3359     # However, it has the same basename, so the bogon will be chosen
3360     # first if we set CC to just the basename; use the full file name.
3361     shift
3362     set dummy "$ac_dir/$ac_word" "$@"
3363     shift
3364     ac_cv_prog_CC="$@"
3365   fi
3366 fi
3367 fi
3368 fi
3369 CC="$ac_cv_prog_CC"
3370 if test -n "$CC"; then
3371   echo "$ac_t""$CC" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375
3376   if test -z "$CC"; then
3377     case "`uname -s`" in
3378     *win32* | *WIN32* | *CYGWIN*)
3379       # Extract the first word of "cl", so it can be a program name with args.
3380 set dummy cl; ac_word=$2
3381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3382 echo "configure:3383: checking for $ac_word" >&5
3383 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3384   echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386   if test -n "$CC"; then
3387   ac_cv_prog_CC="$CC" # Let the user override the test.
3388 else
3389   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3390   ac_dummy="$PATH"
3391   for ac_dir in $ac_dummy; do
3392     test -z "$ac_dir" && ac_dir=.
3393     if test -f $ac_dir/$ac_word; then
3394       ac_cv_prog_CC="cl"
3395       break
3396     fi
3397   done
3398   IFS="$ac_save_ifs"
3399 fi
3400 fi
3401 CC="$ac_cv_prog_CC"
3402 if test -n "$CC"; then
3403   echo "$ac_t""$CC" 1>&6
3404 else
3405   echo "$ac_t""no" 1>&6
3406 fi
3407  ;;
3408     esac
3409   fi
3410   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3411 fi
3412
3413 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3414 echo "configure:3415: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3415
3416 ac_ext=c
3417 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3418 ac_cpp='$CPP $CPPFLAGS'
3419 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3420 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3421 cross_compiling=$ac_cv_prog_cc_cross
3422
3423 cat > conftest.$ac_ext << EOF
3424
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427
3428 main(){return(0);}
3429 EOF
3430 if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3431   ac_cv_prog_cc_works=yes
3432   # If we can't run a trivial program, we are probably using a cross compiler.
3433   if (./conftest; exit) 2>/dev/null; then
3434     ac_cv_prog_cc_cross=no
3435   else
3436     ac_cv_prog_cc_cross=yes
3437   fi
3438 else
3439   echo "configure: failed program was:" >&5
3440   cat conftest.$ac_ext >&5
3441   ac_cv_prog_cc_works=no
3442 fi
3443 rm -fr conftest*
3444 ac_ext=c
3445 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3446 ac_cpp='$CPP $CPPFLAGS'
3447 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3448 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3449 cross_compiling=$ac_cv_prog_cc_cross
3450
3451 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3452 if test $ac_cv_prog_cc_works = no; then
3453   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3454 fi
3455 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3456 echo "configure:3457: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3457 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3458 cross_compiling=$ac_cv_prog_cc_cross
3459
3460 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3461 echo "configure:3462: checking whether we are using GNU C" >&5
3462 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.c <<EOF
3466 #ifdef __GNUC__
3467   yes;
3468 #endif
3469 EOF
3470 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3471   ac_cv_prog_gcc=yes
3472 else
3473   ac_cv_prog_gcc=no
3474 fi
3475 fi
3476
3477 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3478
3479 if test $ac_cv_prog_gcc = yes; then
3480   GCC=yes
3481 else
3482   GCC=
3483 fi
3484
3485 ac_test_CFLAGS="${CFLAGS+set}"
3486 ac_save_CFLAGS="$CFLAGS"
3487 CFLAGS=
3488 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3489 echo "configure:3490: checking whether ${CC-cc} accepts -g" >&5
3490 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3491   echo $ac_n "(cached) $ac_c" 1>&6
3492 else
3493   echo 'void f(){}' > conftest.c
3494 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3495   ac_cv_prog_cc_g=yes
3496 else
3497   ac_cv_prog_cc_g=no
3498 fi
3499 rm -f conftest*
3500
3501 fi
3502
3503 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3504 if test "$ac_test_CFLAGS" = set; then
3505   CFLAGS="$ac_save_CFLAGS"
3506 elif test $ac_cv_prog_cc_g = yes; then
3507   if test "$GCC" = yes; then
3508     CFLAGS="-g -O2"
3509   else
3510     CFLAGS="-g"
3511   fi
3512 else
3513   if test "$GCC" = yes; then
3514     CFLAGS="-O2"
3515   else
3516     CFLAGS=
3517   fi
3518 fi
3519
3520 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3521 if test "${with_gnu_ld+set}" = set; then
3522   withval="$with_gnu_ld"
3523   test "$withval" = no || with_gnu_ld=yes
3524 else
3525   with_gnu_ld=no
3526 fi
3527
3528 ac_prog=ld
3529 if test "$GCC" = yes; then
3530   # Check if gcc -print-prog-name=ld gives a path.
3531   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3532 echo "configure:3533: checking for ld used by GCC" >&5
3533   case $host in
3534   *-*-mingw*)
3535     # gcc leaves a trailing carriage return which upsets mingw
3536     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3537   *)
3538     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3539   esac
3540   case $ac_prog in
3541     # Accept absolute paths.
3542     [\\/]* | [A-Za-z]:[\\/]*)
3543       re_direlt='/[^/][^/]*/\.\./'
3544       # Canonicalize the path of ld
3545       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3546       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3547         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3548       done
3549       test -z "$LD" && LD="$ac_prog"
3550       ;;
3551   "")
3552     # If it fails, then pretend we aren't using GCC.
3553     ac_prog=ld
3554     ;;
3555   *)
3556     # If it is relative, then search for the first ld in PATH.
3557     with_gnu_ld=unknown
3558     ;;
3559   esac
3560 elif test "$with_gnu_ld" = yes; then
3561   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3562 echo "configure:3563: checking for GNU ld" >&5
3563 else
3564   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3565 echo "configure:3566: checking for non-GNU ld" >&5
3566 fi
3567 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3568   echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570   if test -z "$LD"; then
3571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3572   for ac_dir in $PATH; do
3573     test -z "$ac_dir" && ac_dir=.
3574     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3575       lt_cv_path_LD="$ac_dir/$ac_prog"
3576       # Check to see if the program is GNU ld.  I'd rather use --version,
3577       # but apparently some GNU ld's only accept -v.
3578       # Break only if it was the GNU/non-GNU ld that we prefer.
3579       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3580         test "$with_gnu_ld" != no && break
3581       else
3582         test "$with_gnu_ld" != yes && break
3583       fi
3584     fi
3585   done
3586   IFS="$ac_save_ifs"
3587 else
3588   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3589 fi
3590 fi
3591
3592 LD="$lt_cv_path_LD"
3593 if test -n "$LD"; then
3594   echo "$ac_t""$LD" 1>&6
3595 else
3596   echo "$ac_t""no" 1>&6
3597 fi
3598 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3599 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3600 echo "configure:3601: checking if the linker ($LD) is GNU ld" >&5
3601 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3602   echo $ac_n "(cached) $ac_c" 1>&6
3603 else
3604   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3605 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3606   lt_cv_prog_gnu_ld=yes
3607 else
3608   lt_cv_prog_gnu_ld=no
3609 fi
3610 fi
3611
3612 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3613 with_gnu_ld=$lt_cv_prog_gnu_ld
3614
3615
3616 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3617 echo "configure:3618: checking for $LD option to reload object files" >&5
3618 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3619   echo $ac_n "(cached) $ac_c" 1>&6
3620 else
3621   lt_cv_ld_reload_flag='-r'
3622 fi
3623
3624 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3625 reload_flag=$lt_cv_ld_reload_flag
3626 test -n "$reload_flag" && reload_flag=" $reload_flag"
3627
3628 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3629 echo "configure:3630: checking for BSD-compatible nm" >&5
3630 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   if test -n "$NM"; then
3634   # Let the user override the test.
3635   lt_cv_path_NM="$NM"
3636 else
3637   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3638   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3639     test -z "$ac_dir" && ac_dir=.
3640     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3641     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3642       # Check to see if the nm accepts a BSD-compat flag.
3643       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3644       #   nm: unknown option "B" ignored
3645       # Tru64's nm complains that /dev/null is an invalid object file
3646       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3647         lt_cv_path_NM="$tmp_nm -B"
3648         break
3649       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3650         lt_cv_path_NM="$tmp_nm -p"
3651         break
3652       else
3653         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3654         continue # so that we can try to find one that supports BSD flags
3655       fi
3656     fi
3657   done
3658   IFS="$ac_save_ifs"
3659   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3660 fi
3661 fi
3662
3663 NM="$lt_cv_path_NM"
3664 echo "$ac_t""$NM" 1>&6
3665
3666 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3667 echo "configure:3668: checking for a sed that does not truncate output" >&5
3668 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   # Loop through the user's path and test for sed and gsed.
3672 # Then use that list of sed's as ones to test for truncation.
3673 as_executable_p="test -f"
3674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3675 for as_dir in $PATH
3676 do
3677   IFS=$as_save_IFS
3678   test -z "$as_dir" && as_dir=.
3679   for ac_prog in sed gsed; do
3680     for ac_exec_ext in '' $ac_executable_extensions; do
3681       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3682         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3683       fi
3684     done
3685   done
3686 done
3687
3688   # Create a temporary directory, and hook for its removal unless debugging.
3689 $debug ||
3690 {
3691   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3692   trap '{ (exit 1); exit 1; }' 1 2 13 15
3693 }
3694
3695 # Create a (secure) tmp directory for tmp files.
3696 : ${TMPDIR=/tmp}
3697 {
3698   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3699   test -n "$tmp" && test -d "$tmp"
3700 }  ||
3701 {
3702   tmp=$TMPDIR/sed$$-$RANDOM
3703   (umask 077 && mkdir $tmp)
3704 } ||
3705 {
3706    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3707    { (exit 1); exit 1; }
3708 }
3709   _max=0
3710   _count=0
3711   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3712   # along with /bin/sed that truncates output.
3713   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3714     test ! -f ${_sed} && break
3715     cat /dev/null > "$tmp/sed.in"
3716     _count=0
3717     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3718     # Check for GNU sed and select it if it is found.
3719     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3720       lt_cv_path_SED=${_sed}
3721       break
3722     fi
3723     while true; do
3724       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3725       mv "$tmp/sed.tmp" "$tmp/sed.in"
3726       cp "$tmp/sed.in" "$tmp/sed.nl"
3727       echo >>"$tmp/sed.nl"
3728       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3729       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3730       # 40000 chars as input seems more than enough
3731       test $_count -gt 10 && break
3732       _count=`expr $_count + 1`
3733       if test $_count -gt $_max; then
3734         _max=$_count
3735         lt_cv_path_SED=$_sed
3736       fi
3737     done
3738   done
3739   rm -rf "$tmp"
3740
3741 fi
3742
3743 if test "X$SED" != "X"; then
3744   lt_cv_path_SED=$SED
3745 else
3746   SED=$lt_cv_path_SED
3747 fi
3748 echo "$ac_t""$SED" 1>&6
3749
3750 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3751 echo "configure:3752: checking whether ln -s works" >&5
3752 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   rm -f conftestdata
3756 if ln -s X conftestdata 2>/dev/null
3757 then
3758   rm -f conftestdata
3759   ac_cv_prog_LN_S="ln -s"
3760 else
3761   ac_cv_prog_LN_S=ln
3762 fi
3763 fi
3764 LN_S="$ac_cv_prog_LN_S"
3765 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3766   echo "$ac_t""yes" 1>&6
3767 else
3768   echo "$ac_t""no" 1>&6
3769 fi
3770
3771 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3772 echo "configure:3773: checking how to recognise dependent libraries" >&5
3773 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3774   echo $ac_n "(cached) $ac_c" 1>&6
3775 else
3776   lt_cv_file_magic_cmd='$MAGIC_CMD'
3777 lt_cv_file_magic_test_file=
3778 lt_cv_deplibs_check_method='unknown'
3779 # Need to set the preceding variable on all platforms that support
3780 # interlibrary dependencies.
3781 # 'none' -- dependencies not supported.
3782 # `unknown' -- same as none, but documents that we really don't know.
3783 # 'pass_all' -- all dependencies passed with no checks.
3784 # 'test_compile' -- check by making test program.
3785 # 'file_magic [[regex]]' -- check by looking for files in library path
3786 # which responds to the $file_magic_cmd with a given egrep regex.
3787 # If you have `file' or equivalent on your system and you're not sure
3788 # whether `pass_all' will *always* work, you probably want this one.
3789
3790 case $host_os in
3791 aix4* | aix5*)
3792   lt_cv_deplibs_check_method=pass_all
3793   ;;
3794
3795 beos*)
3796   lt_cv_deplibs_check_method=pass_all
3797   ;;
3798
3799 bsdi4*)
3800   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3801   lt_cv_file_magic_cmd='/usr/bin/file -L'
3802   lt_cv_file_magic_test_file=/shlib/libc.so
3803   ;;
3804
3805 cygwin* | mingw* | pw32*)
3806   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3807   lt_cv_file_magic_cmd='$OBJDUMP -f'
3808   ;;
3809
3810 darwin* | rhapsody*)
3811   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3812   lt_cv_file_magic_cmd='/usr/bin/file -L'
3813   case "$host_os" in
3814   rhapsody* | darwin1.[012])
3815     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3816     ;;
3817   *) # Darwin 1.3 on
3818     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3819     ;;
3820   esac
3821   ;;
3822
3823 freebsd*)
3824   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3825     case $host_cpu in
3826     i*86 )
3827       # Not sure whether the presence of OpenBSD here was a mistake.
3828       # Let's accept both of them until this is cleared up.
3829       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3830       lt_cv_file_magic_cmd=/usr/bin/file
3831       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3832       ;;
3833     esac
3834   else
3835     lt_cv_deplibs_check_method=pass_all
3836   fi
3837   ;;
3838
3839 gnu*)
3840   lt_cv_deplibs_check_method=pass_all
3841   ;;
3842
3843 hpux10.20*|hpux11*)
3844   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3845   lt_cv_file_magic_cmd=/usr/bin/file
3846   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3847   ;;
3848
3849 irix5* | irix6* | nonstopux*)
3850   case $host_os in
3851   irix5* | nonstopux*)
3852     # this will be overridden with pass_all, but let us keep it just in case
3853     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3854     ;;
3855   *)
3856     case $LD in
3857     *-32|*"-32 ") libmagic=32-bit;;
3858     *-n32|*"-n32 ") libmagic=N32;;
3859     *-64|*"-64 ") libmagic=64-bit;;
3860     *) libmagic=never-match;;
3861     esac
3862     # this will be overridden with pass_all, but let us keep it just in case
3863     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3864     ;;
3865   esac
3866   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3867   lt_cv_deplibs_check_method=pass_all
3868   ;;
3869
3870 # This must be Linux ELF.
3871 linux-gnu*)
3872   case $host_cpu in
3873   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3874     lt_cv_deplibs_check_method=pass_all ;;
3875   *)
3876     # glibc up to 2.1.1 does not perform some relocations on ARM
3877     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3878   esac
3879   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3880   ;;
3881
3882 netbsd*)
3883   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3884     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3885   else
3886     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3887   fi
3888   ;;
3889
3890 newos6*)
3891   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3892   lt_cv_file_magic_cmd=/usr/bin/file
3893   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3894   ;;
3895
3896 openbsd*)
3897   lt_cv_file_magic_cmd=/usr/bin/file
3898   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3899   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3900     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3901   else
3902     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3903   fi
3904   ;;
3905
3906 osf3* | osf4* | osf5*)
3907   # this will be overridden with pass_all, but let us keep it just in case
3908   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3909   lt_cv_file_magic_test_file=/shlib/libc.so
3910   lt_cv_deplibs_check_method=pass_all
3911   ;;
3912
3913 sco3.2v5*)
3914   lt_cv_deplibs_check_method=pass_all
3915   ;;
3916
3917 solaris*)
3918   lt_cv_deplibs_check_method=pass_all
3919   lt_cv_file_magic_test_file=/lib/libc.so
3920   ;;
3921
3922 sysv5uw[78]* | sysv4*uw2*)
3923   lt_cv_deplibs_check_method=pass_all
3924   ;;
3925
3926 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3927   case $host_vendor in
3928   motorola)
3929     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]'
3930     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3931     ;;
3932   ncr)
3933     lt_cv_deplibs_check_method=pass_all
3934     ;;
3935   sequent)
3936     lt_cv_file_magic_cmd='/bin/file'
3937     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3938     ;;
3939   sni)
3940     lt_cv_file_magic_cmd='/bin/file'
3941     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3942     lt_cv_file_magic_test_file=/lib/libc.so
3943     ;;
3944   siemens)
3945     lt_cv_deplibs_check_method=pass_all
3946     ;;
3947   esac
3948   ;;
3949 esac
3950
3951 fi
3952
3953 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3954 file_magic_cmd=$lt_cv_file_magic_cmd
3955 deplibs_check_method=$lt_cv_deplibs_check_method
3956
3957 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3958 echo "configure:3959: checking for object suffix" >&5
3959 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   rm -f conftest*
3963 echo 'int i = 1;' > conftest.$ac_ext
3964 if { (eval echo configure:3965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3965   for ac_file in conftest.*; do
3966     case $ac_file in
3967     *.c) ;;
3968     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3969     esac
3970   done
3971 else
3972   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3973 fi
3974 rm -f conftest*
3975 fi
3976
3977 echo "$ac_t""$ac_cv_objext" 1>&6
3978 OBJEXT=$ac_cv_objext
3979 ac_objext=$ac_cv_objext
3980
3981
3982
3983
3984 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3985 echo "configure:3986: checking for executable suffix" >&5
3986 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3987   echo $ac_n "(cached) $ac_c" 1>&6
3988 else
3989   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3990   ac_cv_exeext=.exe
3991 else
3992   rm -f conftest*
3993   echo 'int main () { return 0; }' > conftest.$ac_ext
3994   ac_cv_exeext=
3995   if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3996     for file in conftest.*; do
3997       case $file in
3998       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3999       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4000       esac
4001     done
4002   else
4003     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4004   fi
4005   rm -f conftest*
4006   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4007 fi
4008 fi
4009
4010 EXEEXT=""
4011 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4012 echo "$ac_t""${ac_cv_exeext}" 1>&6
4013 ac_exeext=$EXEEXT
4014
4015 if test $host != $build; then
4016   ac_tool_prefix=${host_alias}-
4017 else
4018   ac_tool_prefix=
4019 fi
4020
4021
4022
4023
4024 # Check for command to grab the raw symbol name followed by C symbol from nm.
4025 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4026 echo "configure:4027: checking command to parse $NM output" >&5
4027 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4028   echo $ac_n "(cached) $ac_c" 1>&6
4029 else
4030   
4031 # These are sane defaults that work on at least a few old systems.
4032 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4033
4034 # Character class describing NM global symbol codes.
4035 symcode='[BCDEGRST]'
4036
4037 # Regexp to match symbols that can be accessed directly from C.
4038 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4039
4040 # Transform the above into a raw symbol and a C symbol.
4041 symxfrm='\1 \2\3 \3'
4042
4043 # Transform an extracted symbol line into a proper C declaration
4044 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4045
4046 # Transform an extracted symbol line into symbol name and symbol address
4047 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'"
4048
4049 # Define system-specific variables.
4050 case $host_os in
4051 aix*)
4052   symcode='[BCDT]'
4053   ;;
4054 cygwin* | mingw* | pw32*)
4055   symcode='[ABCDGISTW]'
4056   ;;
4057 hpux*) # Its linker distinguishes data from code symbols
4058   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4059   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'"
4060   ;;
4061 irix* | nonstopux*)
4062   symcode='[BCDEGRST]'
4063   ;;
4064 osf*)
4065   symcode='[BCDEGQRST]'
4066   ;;
4067 solaris* | sysv5*)
4068   symcode='[BDT]'
4069   ;;
4070 sysv4)
4071   symcode='[DFNSTU]'
4072   ;;
4073 esac
4074
4075 # Handle CRLF in mingw tool chain
4076 opt_cr=
4077 case $host_os in
4078 mingw*)
4079   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4080   ;;
4081 esac
4082
4083 # If we're using GNU nm, then use its standard symbol codes.
4084 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4085   symcode='[ABCDGISTW]'
4086 fi
4087
4088 # Try without a prefix undercore, then with it.
4089 for ac_symprfx in "" "_"; do
4090
4091   # Write the raw and C identifiers.
4092 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4093
4094   # Check to see that the pipe works correctly.
4095   pipe_works=no
4096   rm -f conftest*
4097   cat > conftest.$ac_ext <<EOF
4098 #ifdef __cplusplus
4099 extern "C" {
4100 #endif
4101 char nm_test_var;
4102 void nm_test_func(){}
4103 #ifdef __cplusplus
4104 }
4105 #endif
4106 int main(){nm_test_var='a';nm_test_func();return(0);}
4107 EOF
4108
4109   if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4110     # Now try to grab the symbols.
4111     nlist=conftest.nm
4112     if { (eval echo configure:4113: \"$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
4113       # Try sorting and uniquifying the output.
4114       if sort "$nlist" | uniq > "$nlist"T; then
4115         mv -f "$nlist"T "$nlist"
4116       else
4117         rm -f "$nlist"T
4118       fi
4119
4120       # Make sure that we snagged all the symbols we need.
4121       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4122         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4123           cat <<EOF > conftest.$ac_ext
4124 #ifdef __cplusplus
4125 extern "C" {
4126 #endif
4127
4128 EOF
4129           # Now generate the symbol file.
4130           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4131
4132           cat <<EOF >> conftest.$ac_ext
4133 #if defined (__STDC__) && __STDC__
4134 # define lt_ptr void *
4135 #else
4136 # define lt_ptr char *
4137 # define const
4138 #endif
4139
4140 /* The mapping between symbol names and symbols. */
4141 const struct {
4142   const char *name;
4143   lt_ptr address;
4144 }
4145 lt_preloaded_symbols[] =
4146 {
4147 EOF
4148           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4149           cat <<\EOF >> conftest.$ac_ext
4150   {0, (lt_ptr) 0}
4151 };
4152
4153 #ifdef __cplusplus
4154 }
4155 #endif
4156 EOF
4157           # Now try linking the two files.
4158           mv conftest.$ac_objext conftstm.$ac_objext
4159           save_LIBS="$LIBS"
4160           save_CFLAGS="$CFLAGS"
4161           LIBS="conftstm.$ac_objext"
4162           CFLAGS="$CFLAGS$no_builtin_flag"
4163           if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4164             pipe_works=yes
4165           fi
4166           LIBS="$save_LIBS"
4167           CFLAGS="$save_CFLAGS"
4168         else
4169           echo "cannot find nm_test_func in $nlist" >&5
4170         fi
4171       else
4172         echo "cannot find nm_test_var in $nlist" >&5
4173       fi
4174     else
4175       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4176     fi
4177   else
4178     echo "$progname: failed program was:" >&5
4179     cat conftest.$ac_ext >&5
4180   fi
4181   rm -f conftest* conftst*
4182
4183   # Do not use the global_symbol_pipe unless it works.
4184   if test "$pipe_works" = yes; then
4185     break
4186   else
4187     lt_cv_sys_global_symbol_pipe=
4188   fi
4189 done
4190
4191 fi
4192
4193 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4194 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4195   global_symbol_to_cdecl=
4196   global_symbol_to_c_name_address=
4197 else
4198   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4199   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4200 fi
4201 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4202 then
4203   echo "$ac_t""failed" 1>&6
4204 else
4205   echo "$ac_t""ok" 1>&6
4206 fi
4207
4208 for ac_hdr in dlfcn.h
4209 do
4210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4212 echo "configure:4213: checking for $ac_hdr" >&5
4213 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4214   echo $ac_n "(cached) $ac_c" 1>&6
4215 else
4216   cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 #include <$ac_hdr>
4220 EOF
4221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4222 { (eval echo configure:4223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4224 if test -z "$ac_err"; then
4225   rm -rf conftest*
4226   eval "ac_cv_header_$ac_safe=yes"
4227 else
4228   echo "$ac_err" >&5
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -rf conftest*
4232   eval "ac_cv_header_$ac_safe=no"
4233 fi
4234 rm -f conftest*
4235 fi
4236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4237   echo "$ac_t""yes" 1>&6
4238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4239   cat >> confdefs.h <<EOF
4240 #define $ac_tr_hdr 1
4241 EOF
4242  
4243 else
4244   echo "$ac_t""no" 1>&6
4245 fi
4246 done
4247
4248
4249
4250
4251
4252
4253 # Only perform the check for file, if the check method requires it
4254 case $deplibs_check_method in
4255 file_magic*)
4256   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4257     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4258 echo "configure:4259: checking for ${ac_tool_prefix}file" >&5
4259 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   case $MAGIC_CMD in
4263   /*)
4264   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4265   ;;
4266   ?:/*)
4267   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4268   ;;
4269   *)
4270   ac_save_MAGIC_CMD="$MAGIC_CMD"
4271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4272   ac_dummy="/usr/bin:$PATH"
4273   for ac_dir in $ac_dummy; do
4274     test -z "$ac_dir" && ac_dir=.
4275     if test -f $ac_dir/${ac_tool_prefix}file; then
4276       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4277       if test -n "$file_magic_test_file"; then
4278         case $deplibs_check_method in
4279         "file_magic "*)
4280           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4281           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4282           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4283             egrep "$file_magic_regex" > /dev/null; then
4284             :
4285           else
4286             cat <<EOF 1>&2
4287
4288 *** Warning: the command libtool uses to detect shared libraries,
4289 *** $file_magic_cmd, produces output that libtool cannot recognize.
4290 *** The result is that libtool may fail to recognize shared libraries
4291 *** as such.  This will affect the creation of libtool libraries that
4292 *** depend on shared libraries, but programs linked with such libtool
4293 *** libraries will work regardless of this problem.  Nevertheless, you
4294 *** may want to report the problem to your system manager and/or to
4295 *** bug-libtool@gnu.org
4296
4297 EOF
4298           fi ;;
4299         esac
4300       fi
4301       break
4302     fi
4303   done
4304   IFS="$ac_save_ifs"
4305   MAGIC_CMD="$ac_save_MAGIC_CMD"
4306   ;;
4307 esac
4308 fi
4309
4310 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4311 if test -n "$MAGIC_CMD"; then
4312   echo "$ac_t""$MAGIC_CMD" 1>&6
4313 else
4314   echo "$ac_t""no" 1>&6
4315 fi
4316
4317 if test -z "$lt_cv_path_MAGIC_CMD"; then
4318   if test -n "$ac_tool_prefix"; then
4319     echo $ac_n "checking for file""... $ac_c" 1>&6
4320 echo "configure:4321: checking for file" >&5
4321 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4322   echo $ac_n "(cached) $ac_c" 1>&6
4323 else
4324   case $MAGIC_CMD in
4325   /*)
4326   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4327   ;;
4328   ?:/*)
4329   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4330   ;;
4331   *)
4332   ac_save_MAGIC_CMD="$MAGIC_CMD"
4333   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4334   ac_dummy="/usr/bin:$PATH"
4335   for ac_dir in $ac_dummy; do
4336     test -z "$ac_dir" && ac_dir=.
4337     if test -f $ac_dir/file; then
4338       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4339       if test -n "$file_magic_test_file"; then
4340         case $deplibs_check_method in
4341         "file_magic "*)
4342           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4343           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4344           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4345             egrep "$file_magic_regex" > /dev/null; then
4346             :
4347           else
4348             cat <<EOF 1>&2
4349
4350 *** Warning: the command libtool uses to detect shared libraries,
4351 *** $file_magic_cmd, produces output that libtool cannot recognize.
4352 *** The result is that libtool may fail to recognize shared libraries
4353 *** as such.  This will affect the creation of libtool libraries that
4354 *** depend on shared libraries, but programs linked with such libtool
4355 *** libraries will work regardless of this problem.  Nevertheless, you
4356 *** may want to report the problem to your system manager and/or to
4357 *** bug-libtool@gnu.org
4358
4359 EOF
4360           fi ;;
4361         esac
4362       fi
4363       break
4364     fi
4365   done
4366   IFS="$ac_save_ifs"
4367   MAGIC_CMD="$ac_save_MAGIC_CMD"
4368   ;;
4369 esac
4370 fi
4371
4372 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4373 if test -n "$MAGIC_CMD"; then
4374   echo "$ac_t""$MAGIC_CMD" 1>&6
4375 else
4376   echo "$ac_t""no" 1>&6
4377 fi
4378
4379   else
4380     MAGIC_CMD=:
4381   fi
4382 fi
4383
4384   fi
4385   ;;
4386 esac
4387
4388 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4389 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_word" >&5
4392 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   if test -n "$RANLIB"; then
4396   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4397 else
4398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4399   ac_dummy="$PATH"
4400   for ac_dir in $ac_dummy; do
4401     test -z "$ac_dir" && ac_dir=.
4402     if test -f $ac_dir/$ac_word; then
4403       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4404       break
4405     fi
4406   done
4407   IFS="$ac_save_ifs"
4408 fi
4409 fi
4410 RANLIB="$ac_cv_prog_RANLIB"
4411 if test -n "$RANLIB"; then
4412   echo "$ac_t""$RANLIB" 1>&6
4413 else
4414   echo "$ac_t""no" 1>&6
4415 fi
4416
4417
4418 if test -z "$ac_cv_prog_RANLIB"; then
4419 if test -n "$ac_tool_prefix"; then
4420   # Extract the first word of "ranlib", so it can be a program name with args.
4421 set dummy ranlib; ac_word=$2
4422 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4423 echo "configure:4424: checking for $ac_word" >&5
4424 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   if test -n "$RANLIB"; then
4428   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4429 else
4430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4431   ac_dummy="$PATH"
4432   for ac_dir in $ac_dummy; do
4433     test -z "$ac_dir" && ac_dir=.
4434     if test -f $ac_dir/$ac_word; then
4435       ac_cv_prog_RANLIB="ranlib"
4436       break
4437     fi
4438   done
4439   IFS="$ac_save_ifs"
4440   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4441 fi
4442 fi
4443 RANLIB="$ac_cv_prog_RANLIB"
4444 if test -n "$RANLIB"; then
4445   echo "$ac_t""$RANLIB" 1>&6
4446 else
4447   echo "$ac_t""no" 1>&6
4448 fi
4449
4450 else
4451   RANLIB=":"
4452 fi
4453 fi
4454
4455 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4456 set dummy ${ac_tool_prefix}strip; ac_word=$2
4457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_word" >&5
4459 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   if test -n "$STRIP"; then
4463   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4464 else
4465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4466   ac_dummy="$PATH"
4467   for ac_dir in $ac_dummy; do
4468     test -z "$ac_dir" && ac_dir=.
4469     if test -f $ac_dir/$ac_word; then
4470       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4471       break
4472     fi
4473   done
4474   IFS="$ac_save_ifs"
4475 fi
4476 fi
4477 STRIP="$ac_cv_prog_STRIP"
4478 if test -n "$STRIP"; then
4479   echo "$ac_t""$STRIP" 1>&6
4480 else
4481   echo "$ac_t""no" 1>&6
4482 fi
4483
4484
4485 if test -z "$ac_cv_prog_STRIP"; then
4486 if test -n "$ac_tool_prefix"; then
4487   # Extract the first word of "strip", so it can be a program name with args.
4488 set dummy strip; ac_word=$2
4489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4490 echo "configure:4491: checking for $ac_word" >&5
4491 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4492   echo $ac_n "(cached) $ac_c" 1>&6
4493 else
4494   if test -n "$STRIP"; then
4495   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4496 else
4497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4498   ac_dummy="$PATH"
4499   for ac_dir in $ac_dummy; do
4500     test -z "$ac_dir" && ac_dir=.
4501     if test -f $ac_dir/$ac_word; then
4502       ac_cv_prog_STRIP="strip"
4503       break
4504     fi
4505   done
4506   IFS="$ac_save_ifs"
4507   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4508 fi
4509 fi
4510 STRIP="$ac_cv_prog_STRIP"
4511 if test -n "$STRIP"; then
4512   echo "$ac_t""$STRIP" 1>&6
4513 else
4514   echo "$ac_t""no" 1>&6
4515 fi
4516
4517 else
4518   STRIP=":"
4519 fi
4520 fi
4521
4522
4523 enable_dlopen=yes
4524 enable_win32_dll=yes
4525
4526 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4527 if test "${enable_libtool_lock+set}" = set; then
4528   enableval="$enable_libtool_lock"
4529   :
4530 fi
4531
4532 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4533
4534 # Some flags need to be propagated to the compiler or linker for good
4535 # libtool support.
4536 case $host in
4537 *-*-irix6*)
4538   # Find out which ABI we are using.
4539   echo '#line 4540 "configure"' > conftest.$ac_ext
4540   if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4541     case `/usr/bin/file conftest.$ac_objext` in
4542     *32-bit*)
4543       LD="${LD-ld} -32"
4544       ;;
4545     *N32*)
4546       LD="${LD-ld} -n32"
4547       ;;
4548     *64-bit*)
4549       LD="${LD-ld} -64"
4550       ;;
4551     esac
4552   fi
4553   rm -rf conftest*
4554   ;;
4555
4556 *-*-sco3.2v5*)
4557   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4558   SAVE_CFLAGS="$CFLAGS"
4559   CFLAGS="$CFLAGS -belf"
4560   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4561 echo "configure:4562: checking whether the C compiler needs -belf" >&5
4562 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4563   echo $ac_n "(cached) $ac_c" 1>&6
4564 else
4565   
4566      ac_ext=c
4567 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4568 ac_cpp='$CPP $CPPFLAGS'
4569 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4570 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4571 cross_compiling=$ac_cv_prog_cc_cross
4572
4573      cat > conftest.$ac_ext <<EOF
4574 #line 4575 "configure"
4575 #include "confdefs.h"
4576
4577 int main() {
4578
4579 ; return 0; }
4580 EOF
4581 if { (eval echo configure:4582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4582   rm -rf conftest*
4583   lt_cv_cc_needs_belf=yes
4584 else
4585   echo "configure: failed program was:" >&5
4586   cat conftest.$ac_ext >&5
4587   rm -rf conftest*
4588   lt_cv_cc_needs_belf=no
4589 fi
4590 rm -f conftest*
4591      ac_ext=c
4592 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4593 ac_cpp='$CPP $CPPFLAGS'
4594 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4595 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4596 cross_compiling=$ac_cv_prog_cc_cross
4597
4598 fi
4599
4600 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4601   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4602     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4603     CFLAGS="$SAVE_CFLAGS"
4604   fi
4605   ;;
4606
4607 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4608   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4609 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4611 echo "configure:4612: checking for $ac_word" >&5
4612 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   if test -n "$DLLTOOL"; then
4616   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4617 else
4618   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4619   ac_dummy="$PATH"
4620   for ac_dir in $ac_dummy; do
4621     test -z "$ac_dir" && ac_dir=.
4622     if test -f $ac_dir/$ac_word; then
4623       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4624       break
4625     fi
4626   done
4627   IFS="$ac_save_ifs"
4628 fi
4629 fi
4630 DLLTOOL="$ac_cv_prog_DLLTOOL"
4631 if test -n "$DLLTOOL"; then
4632   echo "$ac_t""$DLLTOOL" 1>&6
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637
4638 if test -z "$ac_cv_prog_DLLTOOL"; then
4639 if test -n "$ac_tool_prefix"; then
4640   # Extract the first word of "dlltool", so it can be a program name with args.
4641 set dummy dlltool; ac_word=$2
4642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4643 echo "configure:4644: checking for $ac_word" >&5
4644 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   if test -n "$DLLTOOL"; then
4648   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4649 else
4650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4651   ac_dummy="$PATH"
4652   for ac_dir in $ac_dummy; do
4653     test -z "$ac_dir" && ac_dir=.
4654     if test -f $ac_dir/$ac_word; then
4655       ac_cv_prog_DLLTOOL="dlltool"
4656       break
4657     fi
4658   done
4659   IFS="$ac_save_ifs"
4660   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4661 fi
4662 fi
4663 DLLTOOL="$ac_cv_prog_DLLTOOL"
4664 if test -n "$DLLTOOL"; then
4665   echo "$ac_t""$DLLTOOL" 1>&6
4666 else
4667   echo "$ac_t""no" 1>&6
4668 fi
4669
4670 else
4671   DLLTOOL="false"
4672 fi
4673 fi
4674
4675   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4676 set dummy ${ac_tool_prefix}as; ac_word=$2
4677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4678 echo "configure:4679: checking for $ac_word" >&5
4679 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   if test -n "$AS"; then
4683   ac_cv_prog_AS="$AS" # Let the user override the test.
4684 else
4685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4686   ac_dummy="$PATH"
4687   for ac_dir in $ac_dummy; do
4688     test -z "$ac_dir" && ac_dir=.
4689     if test -f $ac_dir/$ac_word; then
4690       ac_cv_prog_AS="${ac_tool_prefix}as"
4691       break
4692     fi
4693   done
4694   IFS="$ac_save_ifs"
4695 fi
4696 fi
4697 AS="$ac_cv_prog_AS"
4698 if test -n "$AS"; then
4699   echo "$ac_t""$AS" 1>&6
4700 else
4701   echo "$ac_t""no" 1>&6
4702 fi
4703
4704
4705 if test -z "$ac_cv_prog_AS"; then
4706 if test -n "$ac_tool_prefix"; then
4707   # Extract the first word of "as", so it can be a program name with args.
4708 set dummy as; ac_word=$2
4709 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4710 echo "configure:4711: checking for $ac_word" >&5
4711 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4712   echo $ac_n "(cached) $ac_c" 1>&6
4713 else
4714   if test -n "$AS"; then
4715   ac_cv_prog_AS="$AS" # Let the user override the test.
4716 else
4717   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4718   ac_dummy="$PATH"
4719   for ac_dir in $ac_dummy; do
4720     test -z "$ac_dir" && ac_dir=.
4721     if test -f $ac_dir/$ac_word; then
4722       ac_cv_prog_AS="as"
4723       break
4724     fi
4725   done
4726   IFS="$ac_save_ifs"
4727   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4728 fi
4729 fi
4730 AS="$ac_cv_prog_AS"
4731 if test -n "$AS"; then
4732   echo "$ac_t""$AS" 1>&6
4733 else
4734   echo "$ac_t""no" 1>&6
4735 fi
4736
4737 else
4738   AS="false"
4739 fi
4740 fi
4741
4742   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4743 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4745 echo "configure:4746: checking for $ac_word" >&5
4746 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   if test -n "$OBJDUMP"; then
4750   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4751 else
4752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4753   ac_dummy="$PATH"
4754   for ac_dir in $ac_dummy; do
4755     test -z "$ac_dir" && ac_dir=.
4756     if test -f $ac_dir/$ac_word; then
4757       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4758       break
4759     fi
4760   done
4761   IFS="$ac_save_ifs"
4762 fi
4763 fi
4764 OBJDUMP="$ac_cv_prog_OBJDUMP"
4765 if test -n "$OBJDUMP"; then
4766   echo "$ac_t""$OBJDUMP" 1>&6
4767 else
4768   echo "$ac_t""no" 1>&6
4769 fi
4770
4771
4772 if test -z "$ac_cv_prog_OBJDUMP"; then
4773 if test -n "$ac_tool_prefix"; then
4774   # Extract the first word of "objdump", so it can be a program name with args.
4775 set dummy objdump; ac_word=$2
4776 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4777 echo "configure:4778: checking for $ac_word" >&5
4778 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4779   echo $ac_n "(cached) $ac_c" 1>&6
4780 else
4781   if test -n "$OBJDUMP"; then
4782   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4783 else
4784   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4785   ac_dummy="$PATH"
4786   for ac_dir in $ac_dummy; do
4787     test -z "$ac_dir" && ac_dir=.
4788     if test -f $ac_dir/$ac_word; then
4789       ac_cv_prog_OBJDUMP="objdump"
4790       break
4791     fi
4792   done
4793   IFS="$ac_save_ifs"
4794   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4795 fi
4796 fi
4797 OBJDUMP="$ac_cv_prog_OBJDUMP"
4798 if test -n "$OBJDUMP"; then
4799   echo "$ac_t""$OBJDUMP" 1>&6
4800 else
4801   echo "$ac_t""no" 1>&6
4802 fi
4803
4804 else
4805   OBJDUMP="false"
4806 fi
4807 fi
4808
4809
4810   # recent cygwin and mingw systems supply a stub DllMain which the user
4811   # can override, but on older systems we have to supply one
4812   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4813 echo "configure:4814: checking if libtool should supply DllMain function" >&5
4814 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4815   echo $ac_n "(cached) $ac_c" 1>&6
4816 else
4817   cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4820
4821 int main() {
4822 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4823       DllMain (0, 0, 0);
4824 ; return 0; }
4825 EOF
4826 if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827   rm -rf conftest*
4828   lt_cv_need_dllmain=no
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   lt_cv_need_dllmain=yes
4834 fi
4835 rm -f conftest*
4836 fi
4837
4838 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4839
4840   case $host/$CC in
4841   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4842     # old mingw systems require "-dll" to link a DLL, while more recent ones
4843     # require "-mdll"
4844     SAVE_CFLAGS="$CFLAGS"
4845     CFLAGS="$CFLAGS -mdll"
4846     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4847 echo "configure:4848: checking how to link DLLs" >&5
4848 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851   cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4854
4855 int main() {
4856
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4860   rm -rf conftest*
4861   lt_cv_cc_dll_switch=-mdll
4862 else
4863   echo "configure: failed program was:" >&5
4864   cat conftest.$ac_ext >&5
4865   rm -rf conftest*
4866   lt_cv_cc_dll_switch=-dll
4867 fi
4868 rm -f conftest*
4869 fi
4870
4871 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4872     CFLAGS="$SAVE_CFLAGS" ;;
4873   *-*-cygwin* | *-*-pw32*)
4874     # cygwin systems need to pass --dll to the linker, and not link
4875     # crt.o which will require a WinMain@16 definition.
4876     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4877   esac
4878   ;;
4879   
4880 esac
4881
4882 # Sed substitution that helps us do robust quoting.  It backslashifies
4883 # metacharacters that are still active within double-quoted strings.
4884 Xsed='sed -e s/^X//'
4885 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4886
4887 # Same as above, but do not quote variable references.
4888 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4889
4890 # Sed substitution to delay expansion of an escaped shell variable in a
4891 # double_quote_subst'ed string.
4892 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4893
4894 # Constants:
4895 rm="rm -f"
4896
4897 # Global variables:
4898 default_ofile=libtool
4899 can_build_shared=yes
4900
4901 # All known linkers require a `.a' archive for static linking (except M$VC,
4902 # which needs '.lib').
4903 libext=a
4904 ltmain="$ac_aux_dir/ltmain.sh"
4905 ofile="$default_ofile"
4906 with_gnu_ld="$lt_cv_prog_gnu_ld"
4907 need_locks="$enable_libtool_lock"
4908
4909 old_CC="$CC"
4910 old_CFLAGS="$CFLAGS"
4911
4912 # Set sane defaults for various variables
4913 test -z "$AR" && AR=ar
4914 test -z "$AR_FLAGS" && AR_FLAGS=cru
4915 test -z "$AS" && AS=as
4916 test -z "$CC" && CC=cc
4917 test -z "$DLLTOOL" && DLLTOOL=dlltool
4918 test -z "$LD" && LD=ld
4919 test -z "$LN_S" && LN_S="ln -s"
4920 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4921 test -z "$NM" && NM=nm
4922 test -z "$OBJDUMP" && OBJDUMP=objdump
4923 test -z "$RANLIB" && RANLIB=:
4924 test -z "$STRIP" && STRIP=:
4925 test -z "$ac_objext" && ac_objext=o
4926
4927 if test x"$host" != x"$build"; then
4928   ac_tool_prefix=${host_alias}-
4929 else
4930   ac_tool_prefix=
4931 fi
4932
4933 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4934 case $host_os in
4935 linux-gnu*) ;;
4936 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4937 esac
4938
4939 case $host_os in
4940 aix3*)
4941   # AIX sometimes has problems with the GCC collect2 program.  For some
4942   # reason, if we set the COLLECT_NAMES environment variable, the problems
4943   # vanish in a puff of smoke.
4944   if test "X${COLLECT_NAMES+set}" != Xset; then
4945     COLLECT_NAMES=
4946     export COLLECT_NAMES
4947   fi
4948   ;;
4949 esac
4950
4951 # Determine commands to create old-style static archives.
4952 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4953 old_postinstall_cmds='chmod 644 $oldlib'
4954 old_postuninstall_cmds=
4955
4956 if test -n "$RANLIB"; then
4957   case $host_os in
4958   openbsd*)
4959     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4960     ;;
4961   *)
4962     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4963     ;;
4964   esac
4965   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4966 fi
4967
4968 # Allow CC to be a program name with arguments.
4969 set dummy $CC
4970 compiler="$2"
4971
4972 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4973 echo "configure:4974: checking for objdir" >&5
4974 rm -f .libs 2>/dev/null
4975 mkdir .libs 2>/dev/null
4976 if test -d .libs; then
4977   objdir=.libs
4978 else
4979   # MS-DOS does not allow filenames that begin with a dot.
4980   objdir=_libs
4981 fi
4982 rmdir .libs 2>/dev/null
4983 echo "$ac_t""$objdir" 1>&6
4984
4985
4986 # Check whether --with-pic or --without-pic was given.
4987 if test "${with_pic+set}" = set; then
4988   withval="$with_pic"
4989   pic_mode="$withval"
4990 else
4991   pic_mode=default
4992 fi
4993
4994 test -z "$pic_mode" && pic_mode=default
4995
4996 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4997 # in isolation, and that seeing it set (from the cache) indicates that
4998 # the associated values are set (in the cache) correctly too.
4999 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5000 echo "configure:5001: checking for $compiler option to produce PIC" >&5
5001 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004    lt_cv_prog_cc_pic=
5005   lt_cv_prog_cc_shlib=
5006   lt_cv_prog_cc_wl=
5007   lt_cv_prog_cc_static=
5008   lt_cv_prog_cc_no_builtin=
5009   lt_cv_prog_cc_can_build_shared=$can_build_shared
5010
5011   if test "$GCC" = yes; then
5012     lt_cv_prog_cc_wl='-Wl,'
5013     lt_cv_prog_cc_static='-static'
5014
5015     case $host_os in
5016     aix*)
5017       # Below there is a dirty hack to force normal static linking with -ldl
5018       # The problem is because libdl dynamically linked with both libc and
5019       # libC (AIX C++ library), which obviously doesn't included in libraries
5020       # list by gcc. This cause undefined symbols with -static flags.
5021       # This hack allows C programs to be linked with "-static -ldl", but
5022       # not sure about C++ programs.
5023       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5024       ;;
5025     amigaos*)
5026       # FIXME: we need at least 68020 code to build shared libraries, but
5027       # adding the `-m68020' flag to GCC prevents building anything better,
5028       # like `-m68040'.
5029       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5030       ;;
5031     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5032       # PIC is the default for these OSes.
5033       ;;
5034     darwin* | rhapsody*)
5035       # PIC is the default on this platform
5036       # Common symbols not allowed in MH_DYLIB files
5037       lt_cv_prog_cc_pic='-fno-common'
5038       ;;
5039     cygwin* | mingw* | pw32* | os2*)
5040       # This hack is so that the source file can tell whether it is being
5041       # built for inclusion in a dll (and should export symbols for example).
5042       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5043       ;;
5044     sysv4*MP*)
5045       if test -d /usr/nec; then
5046          lt_cv_prog_cc_pic=-Kconform_pic
5047       fi
5048       ;;
5049     *)
5050       lt_cv_prog_cc_pic='-fPIC'
5051       ;;
5052     esac
5053   else
5054     # PORTME Check for PIC flags for the system compiler.
5055     case $host_os in
5056     aix3* | aix4* | aix5*)
5057       lt_cv_prog_cc_wl='-Wl,'
5058       # All AIX code is PIC.
5059       if test "$host_cpu" = ia64; then
5060         # AIX 5 now supports IA64 processor
5061         lt_cv_prog_cc_static='-Bstatic'
5062       else
5063         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5064       fi
5065       ;;
5066
5067     hpux9* | hpux10* | hpux11*)
5068       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5069       lt_cv_prog_cc_wl='-Wl,'
5070       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5071       lt_cv_prog_cc_pic='+Z'
5072       ;;
5073
5074     irix5* | irix6* | nonstopux*)
5075       lt_cv_prog_cc_wl='-Wl,'
5076       lt_cv_prog_cc_static='-non_shared'
5077       # PIC (with -KPIC) is the default.
5078       ;;
5079
5080     cygwin* | mingw* | pw32* | os2*)
5081       # This hack is so that the source file can tell whether it is being
5082       # built for inclusion in a dll (and should export symbols for example).
5083       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5084       ;;
5085
5086     newsos6)
5087       lt_cv_prog_cc_pic='-KPIC'
5088       lt_cv_prog_cc_static='-Bstatic'
5089       ;;
5090
5091     osf3* | osf4* | osf5*)
5092       # All OSF/1 code is PIC.
5093       lt_cv_prog_cc_wl='-Wl,'
5094       lt_cv_prog_cc_static='-non_shared'
5095       ;;
5096
5097     sco3.2v5*)
5098       lt_cv_prog_cc_pic='-Kpic'
5099       lt_cv_prog_cc_static='-dn'
5100       lt_cv_prog_cc_shlib='-belf'
5101       ;;
5102
5103     solaris*)
5104       lt_cv_prog_cc_pic='-KPIC'
5105       lt_cv_prog_cc_static='-Bstatic'
5106       lt_cv_prog_cc_wl='-Wl,'
5107       ;;
5108
5109     sunos4*)
5110       lt_cv_prog_cc_pic='-PIC'
5111       lt_cv_prog_cc_static='-Bstatic'
5112       lt_cv_prog_cc_wl='-Qoption ld '
5113       ;;
5114
5115     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5116       lt_cv_prog_cc_pic='-KPIC'
5117       lt_cv_prog_cc_static='-Bstatic'
5118       lt_cv_prog_cc_wl='-Wl,'
5119       ;;
5120
5121     uts4*)
5122       lt_cv_prog_cc_pic='-pic'
5123       lt_cv_prog_cc_static='-Bstatic'
5124       ;;
5125
5126     sysv4*MP*)
5127       if test -d /usr/nec ;then
5128         lt_cv_prog_cc_pic='-Kconform_pic'
5129         lt_cv_prog_cc_static='-Bstatic'
5130       fi
5131       ;;
5132
5133     *)
5134       lt_cv_prog_cc_can_build_shared=no
5135       ;;
5136     esac
5137   fi
5138
5139 fi
5140
5141 if test -z "$lt_cv_prog_cc_pic"; then
5142   echo "$ac_t""none" 1>&6
5143 else
5144   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5145
5146   # Check to make sure the pic_flag actually works.
5147   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5148 echo "configure:5149: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5149   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5150   echo $ac_n "(cached) $ac_c" 1>&6
5151 else
5152       save_CFLAGS="$CFLAGS"
5153     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5154     cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157
5158 int main() {
5159
5160 ; return 0; }
5161 EOF
5162 if { (eval echo configure:5163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5163   rm -rf conftest*
5164         case $host_os in
5165       hpux9* | hpux10* | hpux11*)
5166         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5167         # they create non-PIC objects.  So, if there were any warnings, we
5168         # assume that PIC is not supported.
5169         if test -s conftest.err; then
5170           lt_cv_prog_cc_pic_works=no
5171         else
5172           lt_cv_prog_cc_pic_works=yes
5173         fi
5174         ;;
5175       *)
5176         lt_cv_prog_cc_pic_works=yes
5177         ;;
5178       esac
5179     
5180 else
5181   echo "configure: failed program was:" >&5
5182   cat conftest.$ac_ext >&5
5183   rm -rf conftest*
5184         lt_cv_prog_cc_pic_works=no
5185     
5186 fi
5187 rm -f conftest*
5188     CFLAGS="$save_CFLAGS"
5189   
5190 fi
5191
5192
5193   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5194     lt_cv_prog_cc_pic=
5195     lt_cv_prog_cc_can_build_shared=no
5196   else
5197     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5198   fi
5199
5200   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5201 fi
5202
5203 # Check for any special shared library compilation flags.
5204 if test -n "$lt_cv_prog_cc_shlib"; then
5205   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5206   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5207   else
5208    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5209     lt_cv_prog_cc_can_build_shared=no
5210   fi
5211 fi
5212
5213 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5214 echo "configure:5215: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5215 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5216   echo $ac_n "(cached) $ac_c" 1>&6
5217 else
5218     lt_cv_prog_cc_static_works=no
5219   save_LDFLAGS="$LDFLAGS"
5220   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5221   cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224
5225 int main() {
5226
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5230   rm -rf conftest*
5231   lt_cv_prog_cc_static_works=yes
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235 fi
5236 rm -f conftest*
5237   LDFLAGS="$save_LDFLAGS"
5238
5239 fi
5240
5241
5242 # Belt *and* braces to stop my trousers falling down:
5243 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5244 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5245
5246 pic_flag="$lt_cv_prog_cc_pic"
5247 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5248 wl="$lt_cv_prog_cc_wl"
5249 link_static_flag="$lt_cv_prog_cc_static"
5250 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5251 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5252
5253
5254 # Check to see if options -o and -c are simultaneously supported by compiler
5255 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5256 echo "configure:5257: checking if $compiler supports -c -o file.$ac_objext" >&5
5257 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5258   echo $ac_n "(cached) $ac_c" 1>&6
5259 else
5260   
5261 $rm -r conftest 2>/dev/null
5262 mkdir conftest
5263 cd conftest
5264 echo "int some_variable = 0;" > conftest.$ac_ext
5265 mkdir out
5266 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5267 # that will create temporary files in the current directory regardless of
5268 # the output directory.  Thus, making CWD read-only will cause this test
5269 # to fail, enabling locking or at least warning the user not to do parallel
5270 # builds.
5271 chmod -w .
5272 save_CFLAGS="$CFLAGS"
5273 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5274 compiler_c_o=no
5275 if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5276   # The compiler can only warn and ignore the option if not recognized
5277   # So say no if there are warnings
5278   if test -s out/conftest.err; then
5279     lt_cv_compiler_c_o=no
5280   else
5281     lt_cv_compiler_c_o=yes
5282   fi
5283 else
5284   # Append any errors to the config.log.
5285   cat out/conftest.err 1>&5
5286   lt_cv_compiler_c_o=no
5287 fi
5288 CFLAGS="$save_CFLAGS"
5289 chmod u+w .
5290 $rm conftest* out/*
5291 rmdir out
5292 cd ..
5293 rmdir conftest
5294 $rm -r conftest 2>/dev/null
5295
5296 fi
5297
5298 compiler_c_o=$lt_cv_compiler_c_o
5299 echo "$ac_t""$compiler_c_o" 1>&6
5300
5301 if test x"$compiler_c_o" = x"yes"; then
5302   # Check to see if we can write to a .lo
5303   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5304 echo "configure:5305: checking if $compiler supports -c -o file.lo" >&5
5305   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5306   echo $ac_n "(cached) $ac_c" 1>&6
5307 else
5308   
5309   lt_cv_compiler_o_lo=no
5310   save_CFLAGS="$CFLAGS"
5311   CFLAGS="$CFLAGS -c -o conftest.lo"
5312   save_objext="$ac_objext"
5313   ac_objext=lo
5314   cat > conftest.$ac_ext <<EOF
5315 #line 5316 "configure"
5316 #include "confdefs.h"
5317
5318 int main() {
5319 int some_variable = 0;
5320 ; return 0; }
5321 EOF
5322 if { (eval echo configure:5323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5323   rm -rf conftest*
5324       # The compiler can only warn and ignore the option if not recognized
5325     # So say no if there are warnings
5326     if test -s conftest.err; then
5327       lt_cv_compiler_o_lo=no
5328     else
5329       lt_cv_compiler_o_lo=yes
5330     fi
5331   
5332 else
5333   echo "configure: failed program was:" >&5
5334   cat conftest.$ac_ext >&5
5335 fi
5336 rm -f conftest*
5337   ac_objext="$save_objext"
5338   CFLAGS="$save_CFLAGS"
5339   
5340 fi
5341
5342   compiler_o_lo=$lt_cv_compiler_o_lo
5343   echo "$ac_t""$compiler_o_lo" 1>&6
5344 else
5345   compiler_o_lo=no
5346 fi
5347
5348 # Check to see if we can do hard links to lock some files if needed
5349 hard_links="nottested"
5350 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5351   # do not overwrite the value of need_locks provided by the user
5352   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5353 echo "configure:5354: checking if we can lock with hard links" >&5
5354   hard_links=yes
5355   $rm conftest*
5356   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5357   touch conftest.a
5358   ln conftest.a conftest.b 2>&5 || hard_links=no
5359   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5360   echo "$ac_t""$hard_links" 1>&6
5361   if test "$hard_links" = no; then
5362     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5363     need_locks=warn
5364   fi
5365 else
5366   need_locks=no
5367 fi
5368
5369 if test "$GCC" = yes; then
5370   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5371   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5372 echo "configure:5373: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5373   echo "int some_variable = 0;" > conftest.$ac_ext
5374   save_CFLAGS="$CFLAGS"
5375   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5376   compiler_rtti_exceptions=no
5377   cat > conftest.$ac_ext <<EOF
5378 #line 5379 "configure"
5379 #include "confdefs.h"
5380
5381 int main() {
5382 int some_variable = 0;
5383 ; return 0; }
5384 EOF
5385 if { (eval echo configure:5386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5386   rm -rf conftest*
5387       # The compiler can only warn and ignore the option if not recognized
5388     # So say no if there are warnings
5389     if test -s conftest.err; then
5390       compiler_rtti_exceptions=no
5391     else
5392       compiler_rtti_exceptions=yes
5393     fi
5394   
5395 else
5396   echo "configure: failed program was:" >&5
5397   cat conftest.$ac_ext >&5
5398 fi
5399 rm -f conftest*
5400   CFLAGS="$save_CFLAGS"
5401   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5402
5403   if test "$compiler_rtti_exceptions" = "yes"; then
5404     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5405   else
5406     no_builtin_flag=' -fno-builtin'
5407   fi
5408 fi
5409
5410 # See if the linker supports building shared libraries.
5411 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5412 echo "configure:5413: checking whether the linker ($LD) supports shared libraries" >&5
5413
5414 allow_undefined_flag=
5415 no_undefined_flag=
5416 need_lib_prefix=unknown
5417 need_version=unknown
5418 # when you set need_version to no, make sure it does not cause -set_version
5419 # flags to be left without arguments
5420 archive_cmds=
5421 archive_expsym_cmds=
5422 old_archive_from_new_cmds=
5423 old_archive_from_expsyms_cmds=
5424 export_dynamic_flag_spec=
5425 whole_archive_flag_spec=
5426 thread_safe_flag_spec=
5427 hardcode_into_libs=no
5428 hardcode_libdir_flag_spec=
5429 hardcode_libdir_separator=
5430 hardcode_direct=no
5431 hardcode_minus_L=no
5432 hardcode_shlibpath_var=unsupported
5433 runpath_var=
5434 link_all_deplibs=unknown
5435 always_export_symbols=no
5436 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5437 # include_expsyms should be a list of space-separated symbols to be *always*
5438 # included in the symbol list
5439 include_expsyms=
5440 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5441 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5442 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5443 # as well as any symbol that contains `d'.
5444 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5445 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5446 # platforms (ab)use it in PIC code, but their linkers get confused if
5447 # the symbol is explicitly referenced.  Since portable code cannot
5448 # rely on this symbol name, it's probably fine to never include it in
5449 # preloaded symbol tables.
5450 extract_expsyms_cmds=
5451
5452 case $host_os in
5453 cygwin* | mingw* | pw32*)
5454   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5455   # When not using gcc, we currently assume that we are using
5456   # Microsoft Visual C++.
5457   if test "$GCC" != yes; then
5458     with_gnu_ld=no
5459   fi
5460   ;;
5461 openbsd*)
5462   with_gnu_ld=no
5463   ;;
5464 esac
5465
5466 ld_shlibs=yes
5467 if test "$with_gnu_ld" = yes; then
5468   # If archive_cmds runs LD, not CC, wlarc should be empty
5469   wlarc='${wl}'
5470
5471   # See if GNU ld supports shared libraries.
5472   case $host_os in
5473   aix3* | aix4* | aix5*)
5474     # On AIX, the GNU linker is very broken
5475     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5476     ld_shlibs=no
5477     cat <<EOF 1>&2
5478
5479 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5480 *** to be unable to reliably create shared libraries on AIX.
5481 *** Therefore, libtool is disabling shared libraries support.  If you
5482 *** really care for shared libraries, you may want to modify your PATH
5483 *** so that a non-GNU linker is found, and then restart.
5484
5485 EOF
5486     ;;
5487
5488   amigaos*)
5489     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)'
5490     hardcode_libdir_flag_spec='-L$libdir'
5491     hardcode_minus_L=yes
5492
5493     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5494     # that the semantics of dynamic libraries on AmigaOS, at least up
5495     # to version 4, is to share data among multiple programs linked
5496     # with the same dynamic library.  Since this doesn't match the
5497     # behavior of shared libraries on other platforms, we can use
5498     # them.
5499     ld_shlibs=no
5500     ;;
5501
5502   beos*)
5503     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5504       allow_undefined_flag=unsupported
5505       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5506       # support --undefined.  This deserves some investigation.  FIXME
5507       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5508     else
5509       ld_shlibs=no
5510     fi
5511     ;;
5512
5513   cygwin* | mingw* | pw32*)
5514     # hardcode_libdir_flag_spec is actually meaningless, as there is
5515     # no search path for DLLs.
5516     hardcode_libdir_flag_spec='-L$libdir'
5517     allow_undefined_flag=unsupported
5518     always_export_symbols=yes
5519
5520     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5521       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5522       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5523       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5524       else $CC -o impgen impgen.c ; fi)~
5525       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5526
5527     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5528
5529     # cygwin and mingw dlls have different entry points and sets of symbols
5530     # to exclude.
5531     # FIXME: what about values for MSVC?
5532     dll_entry=__cygwin_dll_entry@12
5533     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5534     case $host_os in
5535     mingw*)
5536       # mingw values
5537       dll_entry=_DllMainCRTStartup@12
5538       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5539       ;;
5540     esac
5541
5542     # mingw and cygwin differ, and it's simplest to just exclude the union
5543     # of the two symbol sets.
5544     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5545
5546     # recent cygwin and mingw systems supply a stub DllMain which the user
5547     # can override, but on older systems we have to supply one (in ltdll.c)
5548     if test "x$lt_cv_need_dllmain" = "xyes"; then
5549       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5550       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~
5551         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5552     else
5553       ltdll_obj=
5554       ltdll_cmds=
5555     fi
5556
5557     # Extract the symbol export list from an `--export-all' def file,
5558     # then regenerate the def file from the symbol export list, so that
5559     # the compiled dll only exports the symbol export list.
5560     # Be careful not to strip the DATA tag left be newer dlltools.
5561     export_symbols_cmds="$ltdll_cmds"'
5562       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5563       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5564
5565     # If the export-symbols file already is a .def file (1st line
5566     # is EXPORTS), use it as is.
5567     # If DATA tags from a recent dlltool are present, honour them!
5568     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5569         cp $export_symbols $output_objdir/$soname-def;
5570       else
5571         echo EXPORTS > $output_objdir/$soname-def;
5572         _lt_hint=1;
5573         cat $export_symbols | while read symbol; do
5574          set dummy \$symbol;
5575          case \$# in
5576            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5577            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5578            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5579          esac;
5580          _lt_hint=`expr 1 + \$_lt_hint`;
5581         done;
5582       fi~
5583       '"$ltdll_cmds"'
5584       $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~
5585       $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~
5586       $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~
5587       $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~
5588       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5589     ;;
5590
5591   netbsd*)
5592     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5593       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5594       wlarc=
5595     else
5596       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5597       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5598     fi
5599     ;;
5600
5601   solaris* | sysv5*)
5602     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5603       ld_shlibs=no
5604       cat <<EOF 1>&2
5605
5606 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5607 *** create shared libraries on Solaris systems.  Therefore, libtool
5608 *** is disabling shared libraries support.  We urge you to upgrade GNU
5609 *** binutils to release 2.9.1 or newer.  Another option is to modify
5610 *** your PATH or compiler configuration so that the native linker is
5611 *** used, and then restart.
5612
5613 EOF
5614     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5615       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5616       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5617     else
5618       ld_shlibs=no
5619     fi
5620     ;;
5621
5622   sunos4*)
5623     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5624     wlarc=
5625     hardcode_direct=yes
5626     hardcode_shlibpath_var=no
5627     ;;
5628
5629   *)
5630     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5631       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5632       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5633     else
5634       ld_shlibs=no
5635     fi
5636     ;;
5637   esac
5638
5639   if test "$ld_shlibs" = yes; then
5640     runpath_var=LD_RUN_PATH
5641     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5642     export_dynamic_flag_spec='${wl}--export-dynamic'
5643     case $host_os in
5644     cygwin* | mingw* | pw32*)
5645       # dlltool doesn't understand --whole-archive et. al.
5646       whole_archive_flag_spec=
5647       ;;
5648     *)
5649       # ancient GNU ld didn't support --whole-archive et. al.
5650       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5651         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5652       else
5653         whole_archive_flag_spec=
5654       fi
5655       ;;
5656     esac
5657   fi
5658 else
5659   # PORTME fill in a description of your system's linker (not GNU ld)
5660   case $host_os in
5661   aix3*)
5662     allow_undefined_flag=unsupported
5663     always_export_symbols=yes
5664     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'
5665     # Note: this linker hardcodes the directories in LIBPATH if there
5666     # are no directories specified by -L.
5667     hardcode_minus_L=yes
5668     if test "$GCC" = yes && test -z "$link_static_flag"; then
5669       # Neither direct hardcoding nor static linking is supported with a
5670       # broken collect2.
5671       hardcode_direct=unsupported
5672     fi
5673     ;;
5674
5675   aix4* | aix5*)
5676     if test "$host_cpu" = ia64; then
5677       # On IA64, the linker does run time linking by default, so we don't
5678       # have to do anything special.
5679       aix_use_runtimelinking=no
5680       exp_sym_flag='-Bexport'
5681       no_entry_flag=""
5682     else
5683       aix_use_runtimelinking=no
5684
5685       # Test if we are trying to use run time linking or normal
5686       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5687       # need to do runtime linking.
5688       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5689         for ld_flag in $LDFLAGS; do
5690           case $ld_flag in
5691           *-brtl*)
5692             aix_use_runtimelinking=yes
5693             break
5694           ;;
5695           esac
5696         done
5697       esac
5698
5699       exp_sym_flag='-bexport'
5700       no_entry_flag='-bnoentry'
5701     fi
5702
5703     # When large executables or shared objects are built, AIX ld can
5704     # have problems creating the table of contents.  If linking a library
5705     # or program results in "error TOC overflow" add -mminimal-toc to
5706     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5707     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5708
5709     hardcode_direct=yes
5710     archive_cmds=''
5711     hardcode_libdir_separator=':'
5712     if test "$GCC" = yes; then
5713       case $host_os in aix4.[012]|aix4.[012].*)
5714         collect2name=`${CC} -print-prog-name=collect2`
5715         if test -f "$collect2name" && \
5716           strings "$collect2name" | grep resolve_lib_name >/dev/null
5717         then
5718           # We have reworked collect2
5719           hardcode_direct=yes
5720         else
5721           # We have old collect2
5722           hardcode_direct=unsupported
5723           # It fails to find uninstalled libraries when the uninstalled
5724           # path is not listed in the libpath.  Setting hardcode_minus_L
5725           # to unsupported forces relinking
5726           hardcode_minus_L=yes
5727           hardcode_libdir_flag_spec='-L$libdir'
5728           hardcode_libdir_separator=
5729         fi
5730       esac
5731
5732       shared_flag='-shared'
5733     else
5734       # not using gcc
5735       if test "$host_cpu" = ia64; then
5736         shared_flag='${wl}-G'
5737       else
5738         if test "$aix_use_runtimelinking" = yes; then
5739           shared_flag='${wl}-G'
5740         else
5741           shared_flag='${wl}-bM:SRE'
5742         fi
5743       fi
5744     fi
5745
5746     # It seems that -bexpall can do strange things, so it is better to
5747     # generate a list of symbols to export.
5748     always_export_symbols=yes
5749     if test "$aix_use_runtimelinking" = yes; then
5750       # Warning - without using the other runtime loading flags (-brtl),
5751       # -berok will link without error, but may produce a broken library.
5752       allow_undefined_flag='-berok'
5753       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5754       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"
5755     else
5756       if test "$host_cpu" = ia64; then
5757         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5758         allow_undefined_flag="-z nodefs"
5759         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"
5760       else
5761         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5762         # Warning - without using the other run time loading flags,
5763         # -berok will link without error, but may produce a broken library.
5764         allow_undefined_flag='${wl}-berok'
5765         # This is a bit strange, but is similar to how AIX traditionally builds
5766         # it's shared libraries.
5767         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'
5768       fi
5769     fi
5770     ;;
5771
5772   amigaos*)
5773     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)'
5774     hardcode_libdir_flag_spec='-L$libdir'
5775     hardcode_minus_L=yes
5776     # see comment about different semantics on the GNU ld section
5777     ld_shlibs=no
5778     ;;
5779
5780   cygwin* | mingw* | pw32*)
5781     # When not using gcc, we currently assume that we are using
5782     # Microsoft Visual C++.
5783     # hardcode_libdir_flag_spec is actually meaningless, as there is
5784     # no search path for DLLs.
5785     hardcode_libdir_flag_spec=' '
5786     allow_undefined_flag=unsupported
5787     # Tell ltmain to make .lib files, not .a files.
5788     libext=lib
5789     # FIXME: Setting linknames here is a bad hack.
5790     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5791     # The linker will automatically build a .lib file if we build a DLL.
5792     old_archive_from_new_cmds='true'
5793     # FIXME: Should let the user specify the lib program.
5794     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5795     fix_srcfile_path='`cygpath -w "$srcfile"`'
5796     ;;
5797
5798   darwin* | rhapsody*)
5799     case "$host_os" in
5800     rhapsody* | darwin1.[012])
5801       allow_undefined_flag='-undefined suppress'
5802       ;;
5803     *) # Darwin 1.3 on
5804       allow_undefined_flag='-flat_namespace -undefined suppress'
5805       ;;
5806     esac
5807     # FIXME: Relying on posixy $() will cause problems for
5808     #        cross-compilation, but unfortunately the echo tests do not
5809     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5810     #        `"' quotes if we put them in here... so don't!
5811     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)'
5812     # We need to add '_' to the symbols in $export_symbols first
5813     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5814     hardcode_direct=yes
5815     hardcode_shlibpath_var=no
5816     whole_archive_flag_spec='-all_load $convenience'
5817     ;;
5818
5819   freebsd1*)
5820     ld_shlibs=no
5821     ;;
5822
5823   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5824   # support.  Future versions do this automatically, but an explicit c++rt0.o
5825   # does not break anything, and helps significantly (at the cost of a little
5826   # extra space).
5827   freebsd2.2*)
5828     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5829     hardcode_libdir_flag_spec='-R$libdir'
5830     hardcode_direct=yes
5831     hardcode_shlibpath_var=no
5832     ;;
5833
5834   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5835   freebsd2*)
5836     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5837     hardcode_direct=yes
5838     hardcode_minus_L=yes
5839     hardcode_shlibpath_var=no
5840     ;;
5841
5842   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5843   freebsd*)
5844     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5845     hardcode_libdir_flag_spec='-R$libdir'
5846     hardcode_direct=yes
5847     hardcode_shlibpath_var=no
5848     ;;
5849
5850   hpux9* | hpux10* | hpux11*)
5851     case $host_os in
5852     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' ;;
5853     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5854     esac
5855     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5856     hardcode_libdir_separator=:
5857     hardcode_direct=yes
5858     hardcode_minus_L=yes # Not in the search PATH, but as the default
5859                          # location of the library.
5860     export_dynamic_flag_spec='${wl}-E'
5861     ;;
5862
5863   irix5* | irix6* | nonstopux*)
5864     if test "$GCC" = yes; then
5865       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'
5866       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5867     else
5868       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'
5869       hardcode_libdir_flag_spec='-rpath $libdir'
5870     fi
5871     hardcode_libdir_separator=:
5872     link_all_deplibs=yes
5873     ;;
5874
5875   netbsd*)
5876     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5877       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5878     else
5879       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5880     fi
5881     hardcode_libdir_flag_spec='-R$libdir'
5882     hardcode_direct=yes
5883     hardcode_shlibpath_var=no
5884     ;;
5885
5886   newsos6)
5887     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5888     hardcode_direct=yes
5889     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5890     hardcode_libdir_separator=:
5891     hardcode_shlibpath_var=no
5892     ;;
5893
5894   openbsd*)
5895     hardcode_direct=yes
5896     hardcode_shlibpath_var=no
5897     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5898       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5899       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5900       export_dynamic_flag_spec='${wl}-E'
5901     else
5902       case "$host_os" in
5903       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5904         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5905         hardcode_libdir_flag_spec='-R$libdir'
5906         ;;
5907       *)
5908         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5909         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5910         ;;
5911       esac
5912     fi
5913     ;;
5914
5915   os2*)
5916     hardcode_libdir_flag_spec='-L$libdir'
5917     hardcode_minus_L=yes
5918     allow_undefined_flag=unsupported
5919     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'
5920     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5921     ;;
5922
5923   osf3*)
5924     if test "$GCC" = yes; then
5925       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5926       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'
5927     else
5928       allow_undefined_flag=' -expect_unresolved \*'
5929       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'
5930     fi
5931     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5932     hardcode_libdir_separator=:
5933     ;;
5934
5935   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5936     if test "$GCC" = yes; then
5937       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5938       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'
5939       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5940     else
5941       allow_undefined_flag=' -expect_unresolved \*'
5942       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'
5943       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5944       $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'
5945
5946       #Both c and cxx compiler support -rpath directly
5947       hardcode_libdir_flag_spec='-rpath $libdir'
5948     fi
5949     hardcode_libdir_separator=:
5950     ;;
5951
5952   sco3.2v5*)
5953     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5954     hardcode_shlibpath_var=no
5955     runpath_var=LD_RUN_PATH
5956     hardcode_runpath_var=yes
5957     export_dynamic_flag_spec='${wl}-Bexport'
5958     ;;
5959
5960   solaris*)
5961     # gcc --version < 3.0 without binutils cannot create self contained
5962     # shared libraries reliably, requiring libgcc.a to resolve some of
5963     # the object symbols generated in some cases.  Libraries that use
5964     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5965     # a copy of libgcc.a into every shared library to guarantee resolving
5966     # such symbols causes other problems:  According to Tim Van Holder
5967     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5968     # (to the application) exception stack for one thing.
5969     no_undefined_flag=' -z defs'
5970     if test "$GCC" = yes; then
5971       case `$CC --version 2>/dev/null` in
5972       [12].*)
5973         cat <<EOF 1>&2
5974
5975 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5976 *** create self contained shared libraries on Solaris systems, without
5977 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5978 *** -no-undefined support, which will at least allow you to build shared
5979 *** libraries.  However, you may find that when you link such libraries
5980 *** into an application without using GCC, you have to manually add
5981 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5982 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5983 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5984
5985 EOF
5986         no_undefined_flag=
5987         ;;
5988       esac
5989     fi
5990     # $CC -shared without GNU ld will not create a library from C++
5991     # object files and a static libstdc++, better avoid it by now
5992     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5993     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5994                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5995     hardcode_libdir_flag_spec='-R$libdir'
5996     hardcode_shlibpath_var=no
5997     case $host_os in
5998     solaris2.[0-5] | solaris2.[0-5].*) ;;
5999     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6000       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6001     esac
6002     link_all_deplibs=yes
6003     ;;
6004
6005   sunos4*)
6006     if test "x$host_vendor" = xsequent; then
6007       # Use $CC to link under sequent, because it throws in some extra .o
6008       # files that make .init and .fini sections work.
6009       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6010     else
6011       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6012     fi
6013     hardcode_libdir_flag_spec='-L$libdir'
6014     hardcode_direct=yes
6015     hardcode_minus_L=yes
6016     hardcode_shlibpath_var=no
6017     ;;
6018
6019   sysv4)
6020     case $host_vendor in
6021       sni)
6022         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6023         hardcode_direct=yes # is this really true???
6024         ;;
6025       siemens)
6026         ## LD is ld it makes a PLAMLIB
6027         ## CC just makes a GrossModule.
6028         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6029         reload_cmds='$CC -r -o $output$reload_objs'
6030         hardcode_direct=no
6031         ;;
6032       motorola)
6033         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6035         ;;
6036     esac
6037     runpath_var='LD_RUN_PATH'
6038     hardcode_shlibpath_var=no
6039     ;;
6040
6041   sysv4.3*)
6042     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6043     hardcode_shlibpath_var=no
6044     export_dynamic_flag_spec='-Bexport'
6045     ;;
6046
6047   sysv5*)
6048     no_undefined_flag=' -z text'
6049     # $CC -shared without GNU ld will not create a library from C++
6050     # object files and a static libstdc++, better avoid it by now
6051     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6052     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6053                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6054     hardcode_libdir_flag_spec=
6055     hardcode_shlibpath_var=no
6056     runpath_var='LD_RUN_PATH'
6057     ;;
6058
6059   uts4*)
6060     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6061     hardcode_libdir_flag_spec='-L$libdir'
6062     hardcode_shlibpath_var=no
6063     ;;
6064
6065   dgux*)
6066     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6067     hardcode_libdir_flag_spec='-L$libdir'
6068     hardcode_shlibpath_var=no
6069     ;;
6070
6071   sysv4*MP*)
6072     if test -d /usr/nec; then
6073       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074       hardcode_shlibpath_var=no
6075       runpath_var=LD_RUN_PATH
6076       hardcode_runpath_var=yes
6077       ld_shlibs=yes
6078     fi
6079     ;;
6080
6081   sysv4.2uw2*)
6082     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6083     hardcode_direct=yes
6084     hardcode_minus_L=no
6085     hardcode_shlibpath_var=no
6086     hardcode_runpath_var=yes
6087     runpath_var=LD_RUN_PATH
6088     ;;
6089
6090   sysv5uw7* | unixware7*)
6091     no_undefined_flag='${wl}-z ${wl}text'
6092     if test "$GCC" = yes; then
6093       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6094     else
6095       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6096     fi
6097     runpath_var='LD_RUN_PATH'
6098     hardcode_shlibpath_var=no
6099     ;;
6100
6101   *)
6102     ld_shlibs=no
6103     ;;
6104   esac
6105 fi
6106 echo "$ac_t""$ld_shlibs" 1>&6
6107 test "$ld_shlibs" = no && can_build_shared=no
6108
6109 # Check hardcoding attributes.
6110 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6111 echo "configure:6112: checking how to hardcode library paths into programs" >&5
6112 hardcode_action=
6113 if test -n "$hardcode_libdir_flag_spec" || \
6114    test -n "$runpath_var"; then
6115
6116   # We can hardcode non-existant directories.
6117   if test "$hardcode_direct" != no &&
6118      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6119      # have to relink, otherwise we might link with an installed library
6120      # when we should be linking with a yet-to-be-installed one
6121      ## test "$hardcode_shlibpath_var" != no &&
6122      test "$hardcode_minus_L" != no; then
6123     # Linking always hardcodes the temporary library directory.
6124     hardcode_action=relink
6125   else
6126     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6127     hardcode_action=immediate
6128   fi
6129 else
6130   # We cannot hardcode anything, or else we can only hardcode existing
6131   # directories.
6132   hardcode_action=unsupported
6133 fi
6134 echo "$ac_t""$hardcode_action" 1>&6
6135
6136 striplib=
6137 old_striplib=
6138 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6139 echo "configure:6140: checking whether stripping libraries is possible" >&5
6140 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6141   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6142   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6143   echo "$ac_t""yes" 1>&6
6144 else
6145   echo "$ac_t""no" 1>&6
6146 fi
6147
6148 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6149 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6150
6151 # PORTME Fill in your ld.so characteristics
6152 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6153 echo "configure:6154: checking dynamic linker characteristics" >&5
6154 library_names_spec=
6155 libname_spec='lib$name'
6156 soname_spec=
6157 postinstall_cmds=
6158 postuninstall_cmds=
6159 finish_cmds=
6160 finish_eval=
6161 shlibpath_var=
6162 shlibpath_overrides_runpath=unknown
6163 version_type=none
6164 dynamic_linker="$host_os ld.so"
6165 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6166 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6167
6168 case $host_os in
6169 aix3*)
6170   version_type=linux
6171   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6172   shlibpath_var=LIBPATH
6173
6174   # AIX has no versioning support, so we append a major version to the name.
6175   soname_spec='${libname}${release}.so$major'
6176   ;;
6177
6178 aix4* | aix5*)
6179   version_type=linux
6180   need_lib_prefix=no
6181   need_version=no
6182   hardcode_into_libs=yes
6183   if test "$host_cpu" = ia64; then
6184     # AIX 5 supports IA64
6185     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6186     shlibpath_var=LD_LIBRARY_PATH
6187   else
6188     # With GCC up to 2.95.x, collect2 would create an import file
6189     # for dependence libraries.  The import file would start with
6190     # the line `#! .'.  This would cause the generated library to
6191     # depend on `.', always an invalid library.  This was fixed in
6192     # development snapshots of GCC prior to 3.0.
6193     case $host_os in
6194       aix4 | aix4.[01] | aix4.[01].*)
6195         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6196              echo ' yes '
6197              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6198           :
6199         else
6200           can_build_shared=no
6201         fi
6202         ;;
6203     esac
6204     # AIX (on Power*) has no versioning support, so currently we can
6205     # not hardcode correct soname into executable. Probably we can
6206     # add versioning support to collect2, so additional links can
6207     # be useful in future.
6208     if test "$aix_use_runtimelinking" = yes; then
6209       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6210       # instead of lib<name>.a to let people know that these are not
6211       # typical AIX shared libraries.
6212       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6213     else
6214       # We preserve .a as extension for shared libraries through AIX4.2
6215       # and later when we are not doing run time linking.
6216       library_names_spec='${libname}${release}.a $libname.a'
6217       soname_spec='${libname}${release}.so$major'
6218     fi
6219     shlibpath_var=LIBPATH
6220   fi
6221   hardcode_into_libs=yes
6222   ;;
6223
6224 amigaos*)
6225   library_names_spec='$libname.ixlibrary $libname.a'
6226   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6227   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'
6228   ;;
6229
6230 beos*)
6231   library_names_spec='${libname}.so'
6232   dynamic_linker="$host_os ld.so"
6233   shlibpath_var=LIBRARY_PATH
6234   ;;
6235
6236 bsdi4*)
6237   version_type=linux
6238   need_version=no
6239   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6240   soname_spec='${libname}${release}.so$major'
6241   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6242   shlibpath_var=LD_LIBRARY_PATH
6243   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6244   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6245   export_dynamic_flag_spec=-rdynamic
6246   # the default ld.so.conf also contains /usr/contrib/lib and
6247   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6248   # libtool to hard-code these into programs
6249   ;;
6250
6251 cygwin* | mingw* | pw32*)
6252   version_type=windows
6253   need_version=no
6254   need_lib_prefix=no
6255   case $GCC,$host_os in
6256   yes,cygwin*)
6257     library_names_spec='$libname.dll.a'
6258     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6259     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6260       dldir=$destdir/`dirname \$dlpath`~
6261       test -d \$dldir || mkdir -p \$dldir~
6262       $install_prog .libs/$dlname \$dldir/$dlname'
6263     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6264       dlpath=$dir/\$dldll~
6265        $rm \$dlpath'
6266     ;;
6267   yes,mingw*)
6268     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6269     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6270     ;;
6271   yes,pw32*)
6272     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6273     ;;
6274   *)
6275     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6276     ;;
6277   esac
6278   dynamic_linker='Win32 ld.exe'
6279   # FIXME: first we should search . and the directory the executable is in
6280   shlibpath_var=PATH
6281   ;;
6282
6283 darwin* | rhapsody*)
6284   dynamic_linker="$host_os dyld"
6285   version_type=darwin
6286   need_lib_prefix=no
6287   need_version=no
6288   # FIXME: Relying on posixy $() will cause problems for
6289   #        cross-compilation, but unfortunately the echo tests do not
6290   #        yet detect zsh echo's removal of \ escapes.
6291   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)'
6292   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6293   shlibpath_overrides_runpath=yes
6294   shlibpath_var=DYLD_LIBRARY_PATH
6295   ;;
6296
6297 freebsd1*)
6298   dynamic_linker=no
6299   ;;
6300
6301 freebsd*)
6302   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6303   version_type=freebsd-$objformat
6304   case $version_type in
6305     freebsd-elf*)
6306       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6307       need_version=no
6308       need_lib_prefix=no
6309       ;;
6310     freebsd-*)
6311       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6312       need_version=yes
6313       ;;
6314   esac
6315   shlibpath_var=LD_LIBRARY_PATH
6316   case $host_os in
6317   freebsd2*)
6318     shlibpath_overrides_runpath=yes
6319     ;;
6320   *)
6321     shlibpath_overrides_runpath=no
6322     hardcode_into_libs=yes
6323     ;;
6324   esac
6325   ;;
6326
6327 gnu*)
6328   version_type=linux
6329   need_lib_prefix=no
6330   need_version=no
6331   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6332   soname_spec='${libname}${release}.so$major'
6333   shlibpath_var=LD_LIBRARY_PATH
6334   hardcode_into_libs=yes
6335   ;;
6336
6337 hpux9* | hpux10* | hpux11*)
6338   # Give a soname corresponding to the major version so that dld.sl refuses to
6339   # link against other versions.
6340   dynamic_linker="$host_os dld.sl"
6341   version_type=sunos
6342   need_lib_prefix=no
6343   need_version=no
6344   shlibpath_var=SHLIB_PATH
6345   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6346   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6347   soname_spec='${libname}${release}.sl$major'
6348   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6349   postinstall_cmds='chmod 555 $lib'
6350   ;;
6351
6352 irix5* | irix6* | nonstopux*)
6353   case $host_os in
6354     nonstopux*) version_type=nonstopux ;;
6355     *)          version_type=irix ;;
6356   esac
6357   need_lib_prefix=no
6358   need_version=no
6359   soname_spec='${libname}${release}.so$major'
6360   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6361   case $host_os in
6362   irix5* | nonstopux*)
6363     libsuff= shlibsuff=
6364     ;;
6365   *)
6366     case $LD in # libtool.m4 will add one of these switches to LD
6367     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6368     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6369     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6370     *) libsuff= shlibsuff= libmagic=never-match;;
6371     esac
6372     ;;
6373   esac
6374   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6375   shlibpath_overrides_runpath=no
6376   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6377   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6378   ;;
6379
6380 # No shared lib support for Linux oldld, aout, or coff.
6381 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6382   dynamic_linker=no
6383   ;;
6384
6385 # This must be Linux ELF.
6386 linux-gnu*)
6387   version_type=linux
6388   need_lib_prefix=no
6389   need_version=no
6390   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6391   soname_spec='${libname}${release}.so$major'
6392   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6393   shlibpath_var=LD_LIBRARY_PATH
6394   shlibpath_overrides_runpath=no
6395   # This implies no fast_install, which is unacceptable.
6396   # Some rework will be needed to allow for fast_install
6397   # before this can be enabled.
6398   hardcode_into_libs=yes
6399
6400   # We used to test for /lib/ld.so.1 and disable shared libraries on
6401   # powerpc, because MkLinux only supported shared libraries with the
6402   # GNU dynamic linker.  Since this was broken with cross compilers,
6403   # most powerpc-linux boxes support dynamic linking these days and
6404   # people can always --disable-shared, the test was removed, and we
6405   # assume the GNU/Linux dynamic linker is in use.
6406   dynamic_linker='GNU/Linux ld.so'
6407   ;;
6408
6409 netbsd*)
6410   version_type=sunos
6411   need_lib_prefix=no
6412   need_version=no
6413   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6414     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6415     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6416     dynamic_linker='NetBSD (a.out) ld.so'
6417   else
6418     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6419     soname_spec='${libname}${release}.so$major'
6420     dynamic_linker='NetBSD ld.elf_so'
6421   fi
6422   shlibpath_var=LD_LIBRARY_PATH
6423   shlibpath_overrides_runpath=yes
6424   hardcode_into_libs=yes
6425   ;;
6426
6427 newsos6)
6428   version_type=linux
6429   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6430   shlibpath_var=LD_LIBRARY_PATH
6431   shlibpath_overrides_runpath=yes
6432   ;;
6433
6434 openbsd*)
6435   version_type=sunos
6436   need_lib_prefix=no
6437   need_version=no
6438   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6439     case "$host_os" in
6440     openbsd2.[89] | openbsd2.[89].*)
6441       shlibpath_overrides_runpath=no
6442       ;;
6443     *)
6444       shlibpath_overrides_runpath=yes
6445       ;;
6446     esac
6447   else
6448     shlibpath_overrides_runpath=yes
6449   fi
6450   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6451   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   ;;
6454
6455 os2*)
6456   libname_spec='$name'
6457   need_lib_prefix=no
6458   library_names_spec='$libname.dll $libname.a'
6459   dynamic_linker='OS/2 ld.exe'
6460   shlibpath_var=LIBPATH
6461   ;;
6462
6463 osf3* | osf4* | osf5*)
6464   version_type=osf
6465   need_version=no
6466   soname_spec='${libname}${release}.so$major'
6467   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6468   shlibpath_var=LD_LIBRARY_PATH
6469   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6470   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6471   hardcode_into_libs=yes
6472   ;;
6473
6474 sco3.2v5*)
6475   version_type=osf
6476   soname_spec='${libname}${release}.so$major'
6477   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6478   shlibpath_var=LD_LIBRARY_PATH
6479   ;;
6480
6481 solaris*)
6482   version_type=linux
6483   need_lib_prefix=no
6484   need_version=no
6485   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6486   soname_spec='${libname}${release}.so$major'
6487   shlibpath_var=LD_LIBRARY_PATH
6488   shlibpath_overrides_runpath=yes
6489   hardcode_into_libs=yes
6490   # ldd complains unless libraries are executable
6491   postinstall_cmds='chmod +x $lib'
6492   ;;
6493
6494 sunos4*)
6495   version_type=sunos
6496   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6497   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6498   shlibpath_var=LD_LIBRARY_PATH
6499   shlibpath_overrides_runpath=yes
6500   if test "$with_gnu_ld" = yes; then
6501     need_lib_prefix=no
6502   fi
6503   need_version=yes
6504   ;;
6505
6506 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6507   version_type=linux
6508   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6509   soname_spec='${libname}${release}.so$major'
6510   shlibpath_var=LD_LIBRARY_PATH
6511   case $host_vendor in
6512     sni)
6513       shlibpath_overrides_runpath=no
6514       need_lib_prefix=no
6515       export_dynamic_flag_spec='${wl}-Blargedynsym'
6516       runpath_var=LD_RUN_PATH
6517       ;;
6518     siemens)
6519       need_lib_prefix=no
6520       ;;
6521     motorola)
6522       need_lib_prefix=no
6523       need_version=no
6524       shlibpath_overrides_runpath=no
6525       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6526       ;;
6527   esac
6528   ;;
6529
6530 uts4*)
6531   version_type=linux
6532   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6533   soname_spec='${libname}${release}.so$major'
6534   shlibpath_var=LD_LIBRARY_PATH
6535   ;;
6536
6537 dgux*)
6538   version_type=linux
6539   need_lib_prefix=no
6540   need_version=no
6541   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6542   soname_spec='${libname}${release}.so$major'
6543   shlibpath_var=LD_LIBRARY_PATH
6544   ;;
6545
6546 sysv4*MP*)
6547   if test -d /usr/nec ;then
6548     version_type=linux
6549     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6550     soname_spec='$libname.so.$major'
6551     shlibpath_var=LD_LIBRARY_PATH
6552   fi
6553   ;;
6554
6555 *)
6556   dynamic_linker=no
6557   ;;
6558 esac
6559 echo "$ac_t""$dynamic_linker" 1>&6
6560 test "$dynamic_linker" = no && can_build_shared=no
6561
6562 # Report the final consequences.
6563 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6564 echo "configure:6565: checking if libtool supports shared libraries" >&5
6565 echo "$ac_t""$can_build_shared" 1>&6
6566
6567 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6568 echo "configure:6569: checking whether to build shared libraries" >&5
6569 test "$can_build_shared" = "no" && enable_shared=no
6570
6571 # On AIX, shared libraries and static libraries use the same namespace, and
6572 # are all built from PIC.
6573 case "$host_os" in
6574 aix3*)
6575   test "$enable_shared" = yes && enable_static=no
6576   if test -n "$RANLIB"; then
6577     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6578     postinstall_cmds='$RANLIB $lib'
6579   fi
6580   ;;
6581
6582 aix4*)
6583   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6584     test "$enable_shared" = yes && enable_static=no
6585   fi
6586   ;;
6587 esac
6588 echo "$ac_t""$enable_shared" 1>&6
6589
6590 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6591 echo "configure:6592: checking whether to build static libraries" >&5
6592 # Make sure either enable_shared or enable_static is yes.
6593 test "$enable_shared" = yes || enable_static=yes
6594 echo "$ac_t""$enable_static" 1>&6
6595
6596 if test "$hardcode_action" = relink; then
6597   # Fast installation is not supported
6598   enable_fast_install=no
6599 elif test "$shlibpath_overrides_runpath" = yes ||
6600      test "$enable_shared" = no; then
6601   # Fast installation is not necessary
6602   enable_fast_install=needless
6603 fi
6604
6605 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6606 if test "$GCC" = yes; then
6607   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6608 fi
6609
6610 if test "x$enable_dlopen" != xyes; then
6611   enable_dlopen=unknown
6612   enable_dlopen_self=unknown
6613   enable_dlopen_self_static=unknown
6614 else
6615   lt_cv_dlopen=no
6616   lt_cv_dlopen_libs=
6617
6618   case $host_os in
6619   beos*)
6620     lt_cv_dlopen="load_add_on"
6621     lt_cv_dlopen_libs=
6622     lt_cv_dlopen_self=yes
6623     ;;
6624
6625   cygwin* | mingw* | pw32*)
6626     lt_cv_dlopen="LoadLibrary"
6627     lt_cv_dlopen_libs=
6628    ;;
6629
6630   *)
6631     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6632 echo "configure:6633: checking for shl_load" >&5
6633 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 /* System header to define __stub macros and hopefully few prototypes,
6640     which can conflict with char shl_load(); below.  */
6641 #include <assert.h>
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char shl_load();
6646 char (*f)();
6647
6648 int main() {
6649
6650 /* The GNU C library defines this for functions which it implements
6651     to always fail with ENOSYS.  Some functions are actually named
6652     something starting with __ and the normal name is an alias.  */
6653 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6654 choke me
6655 #else
6656 f = shl_load;
6657 #endif
6658
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_func_shl_load=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_func_shl_load=no"
6669 fi
6670 rm -f conftest*
6671 fi
6672
6673 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6674   echo "$ac_t""yes" 1>&6
6675   lt_cv_dlopen="shl_load"
6676 else
6677   echo "$ac_t""no" 1>&6
6678 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6679 echo "configure:6680: checking for shl_load in -ldld" >&5
6680 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   ac_save_LIBS="$LIBS"
6685 LIBS="-ldld  $LIBS"
6686 cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 /* Override any gcc2 internal prototype to avoid an error.  */
6690 /* We use char because int might match the return type of a gcc2
6691     builtin and then its argument prototype would still apply.  */
6692 char shl_load();
6693
6694 int main() {
6695 shl_load()
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_lib_$ac_lib_var=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_lib_$ac_lib_var=no"
6706 fi
6707 rm -f conftest*
6708 LIBS="$ac_save_LIBS"
6709
6710 fi
6711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6712   echo "$ac_t""yes" 1>&6
6713   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6714 else
6715   echo "$ac_t""no" 1>&6
6716 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6717 echo "configure:6718: checking for dlopen" >&5
6718 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 /* System header to define __stub macros and hopefully few prototypes,
6725     which can conflict with char dlopen(); below.  */
6726 #include <assert.h>
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char dlopen();
6731 char (*f)();
6732
6733 int main() {
6734
6735 /* The GNU C library defines this for functions which it implements
6736     to always fail with ENOSYS.  Some functions are actually named
6737     something starting with __ and the normal name is an alias.  */
6738 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6739 choke me
6740 #else
6741 f = dlopen;
6742 #endif
6743
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   eval "ac_cv_func_dlopen=yes"
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_func_dlopen=no"
6754 fi
6755 rm -f conftest*
6756 fi
6757
6758 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6759   echo "$ac_t""yes" 1>&6
6760   lt_cv_dlopen="dlopen"
6761 else
6762   echo "$ac_t""no" 1>&6
6763 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6764 echo "configure:6765: checking for dlopen in -ldl" >&5
6765 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6767   echo $ac_n "(cached) $ac_c" 1>&6
6768 else
6769   ac_save_LIBS="$LIBS"
6770 LIBS="-ldl  $LIBS"
6771 cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* Override any gcc2 internal prototype to avoid an error.  */
6775 /* We use char because int might match the return type of a gcc2
6776     builtin and then its argument prototype would still apply.  */
6777 char dlopen();
6778
6779 int main() {
6780 dlopen()
6781 ; return 0; }
6782 EOF
6783 if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6784   rm -rf conftest*
6785   eval "ac_cv_lib_$ac_lib_var=yes"
6786 else
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_lib_$ac_lib_var=no"
6791 fi
6792 rm -f conftest*
6793 LIBS="$ac_save_LIBS"
6794
6795 fi
6796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6797   echo "$ac_t""yes" 1>&6
6798   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6799 else
6800   echo "$ac_t""no" 1>&6
6801 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6802 echo "configure:6803: checking for dlopen in -lsvld" >&5
6803 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6805   echo $ac_n "(cached) $ac_c" 1>&6
6806 else
6807   ac_save_LIBS="$LIBS"
6808 LIBS="-lsvld  $LIBS"
6809 cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* Override any gcc2 internal prototype to avoid an error.  */
6813 /* We use char because int might match the return type of a gcc2
6814     builtin and then its argument prototype would still apply.  */
6815 char dlopen();
6816
6817 int main() {
6818 dlopen()
6819 ; return 0; }
6820 EOF
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6822   rm -rf conftest*
6823   eval "ac_cv_lib_$ac_lib_var=yes"
6824 else
6825   echo "configure: failed program was:" >&5
6826   cat conftest.$ac_ext >&5
6827   rm -rf conftest*
6828   eval "ac_cv_lib_$ac_lib_var=no"
6829 fi
6830 rm -f conftest*
6831 LIBS="$ac_save_LIBS"
6832
6833 fi
6834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6835   echo "$ac_t""yes" 1>&6
6836   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6837 else
6838   echo "$ac_t""no" 1>&6
6839 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6840 echo "configure:6841: checking for dld_link in -ldld" >&5
6841 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6843   echo $ac_n "(cached) $ac_c" 1>&6
6844 else
6845   ac_save_LIBS="$LIBS"
6846 LIBS="-ldld  $LIBS"
6847 cat > conftest.$ac_ext <<EOF
6848 #line 6849 "configure"
6849 #include "confdefs.h"
6850 /* Override any gcc2 internal prototype to avoid an error.  */
6851 /* We use char because int might match the return type of a gcc2
6852     builtin and then its argument prototype would still apply.  */
6853 char dld_link();
6854
6855 int main() {
6856 dld_link()
6857 ; return 0; }
6858 EOF
6859 if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6860   rm -rf conftest*
6861   eval "ac_cv_lib_$ac_lib_var=yes"
6862 else
6863   echo "configure: failed program was:" >&5
6864   cat conftest.$ac_ext >&5
6865   rm -rf conftest*
6866   eval "ac_cv_lib_$ac_lib_var=no"
6867 fi
6868 rm -f conftest*
6869 LIBS="$ac_save_LIBS"
6870
6871 fi
6872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6873   echo "$ac_t""yes" 1>&6
6874   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6875 else
6876   echo "$ac_t""no" 1>&6
6877 fi
6878
6879               
6880 fi
6881
6882             
6883 fi
6884
6885           
6886 fi
6887
6888         
6889 fi
6890
6891       
6892 fi
6893
6894     ;;
6895   esac
6896
6897   if test "x$lt_cv_dlopen" != xno; then
6898     enable_dlopen=yes
6899   else
6900     enable_dlopen=no
6901   fi
6902
6903   case $lt_cv_dlopen in
6904   dlopen)
6905     save_CPPFLAGS="$CPPFLAGS"
6906         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6907
6908     save_LDFLAGS="$LDFLAGS"
6909     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6910
6911     save_LIBS="$LIBS"
6912     LIBS="$lt_cv_dlopen_libs $LIBS"
6913
6914     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6915 echo "configure:6916: checking whether a program can dlopen itself" >&5
6916 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6917   echo $ac_n "(cached) $ac_c" 1>&6
6918 else
6919           if test "$cross_compiling" = yes; then :
6920   lt_cv_dlopen_self=cross
6921 else
6922     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6923   lt_status=$lt_dlunknown
6924   cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927
6928 #if HAVE_DLFCN_H
6929 #include <dlfcn.h>
6930 #endif
6931
6932 #include <stdio.h>
6933
6934 #ifdef RTLD_GLOBAL
6935 #  define LT_DLGLOBAL           RTLD_GLOBAL
6936 #else
6937 #  ifdef DL_GLOBAL
6938 #    define LT_DLGLOBAL         DL_GLOBAL
6939 #  else
6940 #    define LT_DLGLOBAL         0
6941 #  endif
6942 #endif
6943
6944 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6945    find out it does not work in some platform. */
6946 #ifndef LT_DLLAZY_OR_NOW
6947 #  ifdef RTLD_LAZY
6948 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6949 #  else
6950 #    ifdef DL_LAZY
6951 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6952 #    else
6953 #      ifdef RTLD_NOW
6954 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6955 #      else
6956 #        ifdef DL_NOW
6957 #          define LT_DLLAZY_OR_NOW      DL_NOW
6958 #        else
6959 #          define LT_DLLAZY_OR_NOW      0
6960 #        endif
6961 #      endif
6962 #    endif
6963 #  endif
6964 #endif
6965
6966 #ifdef __cplusplus
6967 extern "C" void exit (int);
6968 #endif
6969
6970 void fnord() { int i=42;}
6971 int main ()
6972 {
6973   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6974   int status = $lt_dlunknown;
6975
6976   if (self)
6977     {
6978       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6979       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6980       /* dlclose (self); */
6981     }
6982
6983     exit (status);
6984 }
6985 EOF
6986   if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6987     (./conftest; exit; ) 2>/dev/null
6988     lt_status=$?
6989     case x$lt_status in
6990       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6991       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6992       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6993     esac
6994   else :
6995     # compilation failed
6996     lt_cv_dlopen_self=no
6997   fi
6998 fi
6999 rm -fr conftest*
7000
7001     
7002 fi
7003
7004 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7005
7006     if test "x$lt_cv_dlopen_self" = xyes; then
7007       LDFLAGS="$LDFLAGS $link_static_flag"
7008       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7009 echo "configure:7010: checking whether a statically linked program can dlopen itself" >&5
7010 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7011   echo $ac_n "(cached) $ac_c" 1>&6
7012 else
7013           if test "$cross_compiling" = yes; then :
7014   lt_cv_dlopen_self_static=cross
7015 else
7016     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7017   lt_status=$lt_dlunknown
7018   cat > conftest.$ac_ext <<EOF
7019 #line 7020 "configure"
7020 #include "confdefs.h"
7021
7022 #if HAVE_DLFCN_H
7023 #include <dlfcn.h>
7024 #endif
7025
7026 #include <stdio.h>
7027
7028 #ifdef RTLD_GLOBAL
7029 #  define LT_DLGLOBAL           RTLD_GLOBAL
7030 #else
7031 #  ifdef DL_GLOBAL
7032 #    define LT_DLGLOBAL         DL_GLOBAL
7033 #  else
7034 #    define LT_DLGLOBAL         0
7035 #  endif
7036 #endif
7037
7038 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7039    find out it does not work in some platform. */
7040 #ifndef LT_DLLAZY_OR_NOW
7041 #  ifdef RTLD_LAZY
7042 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7043 #  else
7044 #    ifdef DL_LAZY
7045 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7046 #    else
7047 #      ifdef RTLD_NOW
7048 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7049 #      else
7050 #        ifdef DL_NOW
7051 #          define LT_DLLAZY_OR_NOW      DL_NOW
7052 #        else
7053 #          define LT_DLLAZY_OR_NOW      0
7054 #        endif
7055 #      endif
7056 #    endif
7057 #  endif
7058 #endif
7059
7060 #ifdef __cplusplus
7061 extern "C" void exit (int);
7062 #endif
7063
7064 void fnord() { int i=42;}
7065 int main ()
7066 {
7067   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7068   int status = $lt_dlunknown;
7069
7070   if (self)
7071     {
7072       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7073       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7074       /* dlclose (self); */
7075     }
7076
7077     exit (status);
7078 }
7079 EOF
7080   if { (eval echo configure:7081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7081     (./conftest; exit; ) 2>/dev/null
7082     lt_status=$?
7083     case x$lt_status in
7084       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7085       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7086       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7087     esac
7088   else :
7089     # compilation failed
7090     lt_cv_dlopen_self_static=no
7091   fi
7092 fi
7093 rm -fr conftest*
7094
7095       
7096 fi
7097
7098 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7099     fi
7100
7101     CPPFLAGS="$save_CPPFLAGS"
7102     LDFLAGS="$save_LDFLAGS"
7103     LIBS="$save_LIBS"
7104     ;;
7105   esac
7106
7107   case $lt_cv_dlopen_self in
7108   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7109   *) enable_dlopen_self=unknown ;;
7110   esac
7111
7112   case $lt_cv_dlopen_self_static in
7113   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7114   *) enable_dlopen_self_static=unknown ;;
7115   esac
7116 fi
7117
7118
7119 if test "$enable_shared" = yes && test "$GCC" = yes; then
7120   case $archive_cmds in
7121   *'~'*)
7122     # FIXME: we may have to deal with multi-command sequences.
7123     ;;
7124   '$CC '*)
7125     # Test whether the compiler implicitly links with -lc since on some
7126     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7127     # to ld, don't add -lc before -lgcc.
7128     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7129 echo "configure:7130: checking whether -lc should be explicitly linked in" >&5
7130     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7131   echo $ac_n "(cached) $ac_c" 1>&6
7132 else
7133   $rm conftest*
7134     echo 'static int dummy;' > conftest.$ac_ext
7135
7136     if { (eval echo configure:7137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7137       soname=conftest
7138       lib=conftest
7139       libobjs=conftest.$ac_objext
7140       deplibs=
7141       wl=$lt_cv_prog_cc_wl
7142       compiler_flags=-v
7143       linker_flags=-v
7144       verstring=
7145       output_objdir=.
7146       libname=conftest
7147       save_allow_undefined_flag=$allow_undefined_flag
7148       allow_undefined_flag=
7149       if { (eval echo configure:7150: \"$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; }
7150       then
7151         lt_cv_archive_cmds_need_lc=no
7152       else
7153         lt_cv_archive_cmds_need_lc=yes
7154       fi
7155       allow_undefined_flag=$save_allow_undefined_flag
7156     else
7157       cat conftest.err 1>&5
7158     fi
7159 fi
7160
7161     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7162     ;;
7163   esac
7164 fi
7165 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7166
7167 # The second clause should only fire when bootstrapping the
7168 # libtool distribution, otherwise you forgot to ship ltmain.sh
7169 # with your package, and you will get complaints that there are
7170 # no rules to generate ltmain.sh.
7171 if test -f "$ltmain"; then
7172   :
7173 else
7174   # If there is no Makefile yet, we rely on a make rule to execute
7175   # `config.status --recheck' to rerun these tests and create the
7176   # libtool script then.
7177   test -f Makefile && make "$ltmain"
7178 fi
7179
7180 if test -f "$ltmain"; then
7181   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7182   $rm -f "${ofile}T"
7183
7184   echo creating $ofile
7185
7186   # Now quote all the things that may contain metacharacters while being
7187   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7188   # variables and quote the copies for generation of the libtool script.
7189   for var in echo old_CC old_CFLAGS SED \
7190     AR AR_FLAGS CC LD LN_S NM SHELL \
7191     reload_flag reload_cmds wl \
7192     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7193     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7194     library_names_spec soname_spec \
7195     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7196     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7197     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7198     old_striplib striplib file_magic_cmd export_symbols_cmds \
7199     deplibs_check_method allow_undefined_flag no_undefined_flag \
7200     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7201     global_symbol_to_c_name_address \
7202     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7203     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7204     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7205
7206     case $var in
7207     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7208     old_postinstall_cmds | old_postuninstall_cmds | \
7209     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7210     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7211     postinstall_cmds | postuninstall_cmds | \
7212     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7213       # Double-quote double-evaled strings.
7214       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7215       ;;
7216     *)
7217       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7218       ;;
7219     esac
7220   done
7221
7222   cat <<__EOF__ > "${ofile}T"
7223 #! $SHELL
7224
7225 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7226 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7227 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7228 #
7229 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7230 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7231 #
7232 # This program is free software; you can redistribute it and/or modify
7233 # it under the terms of the GNU General Public License as published by
7234 # the Free Software Foundation; either version 2 of the License, or
7235 # (at your option) any later version.
7236 #
7237 # This program is distributed in the hope that it will be useful, but
7238 # WITHOUT ANY WARRANTY; without even the implied warranty of
7239 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7240 # General Public License for more details.
7241 #
7242 # You should have received a copy of the GNU General Public License
7243 # along with this program; if not, write to the Free Software
7244 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7245 #
7246 # As a special exception to the GNU General Public License, if you
7247 # distribute this file as part of a program that contains a
7248 # configuration script generated by Autoconf, you may include it under
7249 # the same distribution terms that you use for the rest of that program.
7250
7251 # A sed that does not truncate output.
7252 SED=$lt_SED
7253
7254 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7255 Xsed="${SED} -e s/^X//"
7256
7257 # The HP-UX ksh and POSIX shell print the target directory to stdout
7258 # if CDPATH is set.
7259 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7260
7261 # ### BEGIN LIBTOOL CONFIG
7262
7263 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7264
7265 # Shell to use when invoking shell scripts.
7266 SHELL=$lt_SHELL
7267
7268 # Whether or not to build shared libraries.
7269 build_libtool_libs=$enable_shared
7270
7271 # Whether or not to build static libraries.
7272 build_old_libs=$enable_static
7273
7274 # Whether or not to add -lc for building shared libraries.
7275 build_libtool_need_lc=$need_lc
7276
7277 # Whether or not to optimize for fast installation.
7278 fast_install=$enable_fast_install
7279
7280 # The host system.
7281 host_alias=$host_alias
7282 host=$host
7283
7284 # An echo program that does not interpret backslashes.
7285 echo=$lt_echo
7286
7287 # The archiver.
7288 AR=$lt_AR
7289 AR_FLAGS=$lt_AR_FLAGS
7290
7291 # The default C compiler.
7292 CC=$lt_CC
7293
7294 # Is the compiler the GNU C compiler?
7295 with_gcc=$GCC
7296
7297 # The linker used to build libraries.
7298 LD=$lt_LD
7299
7300 # Whether we need hard or soft links.
7301 LN_S=$lt_LN_S
7302
7303 # A BSD-compatible nm program.
7304 NM=$lt_NM
7305
7306 # A symbol stripping program
7307 STRIP=$STRIP
7308
7309 # Used to examine libraries when file_magic_cmd begins "file"
7310 MAGIC_CMD=$MAGIC_CMD
7311
7312 # Used on cygwin: DLL creation program.
7313 DLLTOOL="$DLLTOOL"
7314
7315 # Used on cygwin: object dumper.
7316 OBJDUMP="$OBJDUMP"
7317
7318 # Used on cygwin: assembler.
7319 AS="$AS"
7320
7321 # The name of the directory that contains temporary libtool files.
7322 objdir=$objdir
7323
7324 # How to create reloadable object files.
7325 reload_flag=$lt_reload_flag
7326 reload_cmds=$lt_reload_cmds
7327
7328 # How to pass a linker flag through the compiler.
7329 wl=$lt_wl
7330
7331 # Object file suffix (normally "o").
7332 objext="$ac_objext"
7333
7334 # Old archive suffix (normally "a").
7335 libext="$libext"
7336
7337 # Executable file suffix (normally "").
7338 exeext="$exeext"
7339
7340 # Additional compiler flags for building library objects.
7341 pic_flag=$lt_pic_flag
7342 pic_mode=$pic_mode
7343
7344 # Does compiler simultaneously support -c and -o options?
7345 compiler_c_o=$lt_compiler_c_o
7346
7347 # Can we write directly to a .lo ?
7348 compiler_o_lo=$lt_compiler_o_lo
7349
7350 # Must we lock files when doing compilation ?
7351 need_locks=$lt_need_locks
7352
7353 # Do we need the lib prefix for modules?
7354 need_lib_prefix=$need_lib_prefix
7355
7356 # Do we need a version for libraries?
7357 need_version=$need_version
7358
7359 # Whether dlopen is supported.
7360 dlopen_support=$enable_dlopen
7361
7362 # Whether dlopen of programs is supported.
7363 dlopen_self=$enable_dlopen_self
7364
7365 # Whether dlopen of statically linked programs is supported.
7366 dlopen_self_static=$enable_dlopen_self_static
7367
7368 # Compiler flag to prevent dynamic linking.
7369 link_static_flag=$lt_link_static_flag
7370
7371 # Compiler flag to turn off builtin functions.
7372 no_builtin_flag=$lt_no_builtin_flag
7373
7374 # Compiler flag to allow reflexive dlopens.
7375 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7376
7377 # Compiler flag to generate shared objects directly from archives.
7378 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7379
7380 # Compiler flag to generate thread-safe objects.
7381 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7382
7383 # Library versioning type.
7384 version_type=$version_type
7385
7386 # Format of library name prefix.
7387 libname_spec=$lt_libname_spec
7388
7389 # List of archive names.  First name is the real one, the rest are links.
7390 # The last name is the one that the linker finds with -lNAME.
7391 library_names_spec=$lt_library_names_spec
7392
7393 # The coded name of the library, if different from the real name.
7394 soname_spec=$lt_soname_spec
7395
7396 # Commands used to build and install an old-style archive.
7397 RANLIB=$lt_RANLIB
7398 old_archive_cmds=$lt_old_archive_cmds
7399 old_postinstall_cmds=$lt_old_postinstall_cmds
7400 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7401
7402 # Create an old-style archive from a shared archive.
7403 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7404
7405 # Create a temporary old-style archive to link instead of a shared archive.
7406 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7407
7408 # Commands used to build and install a shared archive.
7409 archive_cmds=$lt_archive_cmds
7410 archive_expsym_cmds=$lt_archive_expsym_cmds
7411 postinstall_cmds=$lt_postinstall_cmds
7412 postuninstall_cmds=$lt_postuninstall_cmds
7413
7414 # Commands to strip libraries.
7415 old_striplib=$lt_old_striplib
7416 striplib=$lt_striplib
7417
7418 # Method to check whether dependent libraries are shared objects.
7419 deplibs_check_method=$lt_deplibs_check_method
7420
7421 # Command to use when deplibs_check_method == file_magic.
7422 file_magic_cmd=$lt_file_magic_cmd
7423
7424 # Flag that allows shared libraries with undefined symbols to be built.
7425 allow_undefined_flag=$lt_allow_undefined_flag
7426
7427 # Flag that forces no undefined symbols.
7428 no_undefined_flag=$lt_no_undefined_flag
7429
7430 # Commands used to finish a libtool library installation in a directory.
7431 finish_cmds=$lt_finish_cmds
7432
7433 # Same as above, but a single script fragment to be evaled but not shown.
7434 finish_eval=$lt_finish_eval
7435
7436 # Take the output of nm and produce a listing of raw symbols and C names.
7437 global_symbol_pipe=$lt_global_symbol_pipe
7438
7439 # Transform the output of nm in a proper C declaration
7440 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7441
7442 # Transform the output of nm in a C name address pair
7443 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7444
7445 # This is the shared library runtime path variable.
7446 runpath_var=$runpath_var
7447
7448 # This is the shared library path variable.
7449 shlibpath_var=$shlibpath_var
7450
7451 # Is shlibpath searched before the hard-coded library search path?
7452 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7453
7454 # How to hardcode a shared library path into an executable.
7455 hardcode_action=$hardcode_action
7456
7457 # Whether we should hardcode library paths into libraries.
7458 hardcode_into_libs=$hardcode_into_libs
7459
7460 # Flag to hardcode \$libdir into a binary during linking.
7461 # This must work even if \$libdir does not exist.
7462 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7463
7464 # Whether we need a single -rpath flag with a separated argument.
7465 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7466
7467 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7468 # resulting binary.
7469 hardcode_direct=$hardcode_direct
7470
7471 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7472 # resulting binary.
7473 hardcode_minus_L=$hardcode_minus_L
7474
7475 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7476 # the resulting binary.
7477 hardcode_shlibpath_var=$hardcode_shlibpath_var
7478
7479 # Variables whose values should be saved in libtool wrapper scripts and
7480 # restored at relink time.
7481 variables_saved_for_relink="$variables_saved_for_relink"
7482
7483 # Whether libtool must link a program against all its dependency libraries.
7484 link_all_deplibs=$link_all_deplibs
7485
7486 # Compile-time system search path for libraries
7487 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7488
7489 # Run-time system search path for libraries
7490 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7491
7492 # Fix the shell variable \$srcfile for the compiler.
7493 fix_srcfile_path="$fix_srcfile_path"
7494
7495 # Set to yes if exported symbols are required.
7496 always_export_symbols=$always_export_symbols
7497
7498 # The commands to list exported symbols.
7499 export_symbols_cmds=$lt_export_symbols_cmds
7500
7501 # The commands to extract the exported symbol list from a shared archive.
7502 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7503
7504 # Symbols that should not be listed in the preloaded symbols.
7505 exclude_expsyms=$lt_exclude_expsyms
7506
7507 # Symbols that must always be exported.
7508 include_expsyms=$lt_include_expsyms
7509
7510 # ### END LIBTOOL CONFIG
7511
7512 __EOF__
7513
7514   case $host_os in
7515   aix3*)
7516     cat <<\EOF >> "${ofile}T"
7517
7518 # AIX sometimes has problems with the GCC collect2 program.  For some
7519 # reason, if we set the COLLECT_NAMES environment variable, the problems
7520 # vanish in a puff of smoke.
7521 if test "X${COLLECT_NAMES+set}" != Xset; then
7522   COLLECT_NAMES=
7523   export COLLECT_NAMES
7524 fi
7525 EOF
7526     ;;
7527   esac
7528
7529   case $host_os in
7530   cygwin* | mingw* | pw32* | os2*)
7531     cat <<'EOF' >> "${ofile}T"
7532       # This is a source program that is used to create dlls on Windows
7533       # Don't remove nor modify the starting and closing comments
7534 # /* ltdll.c starts here */
7535 # #define WIN32_LEAN_AND_MEAN
7536 # #include <windows.h>
7537 # #undef WIN32_LEAN_AND_MEAN
7538 # #include <stdio.h>
7539 #
7540 # #ifndef __CYGWIN__
7541 # #  ifdef __CYGWIN32__
7542 # #    define __CYGWIN__ __CYGWIN32__
7543 # #  endif
7544 # #endif
7545 #
7546 # #ifdef __cplusplus
7547 # extern "C" {
7548 # #endif
7549 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7550 # #ifdef __cplusplus
7551 # }
7552 # #endif
7553 #
7554 # #ifdef __CYGWIN__
7555 # #include <cygwin/cygwin_dll.h>
7556 # DECLARE_CYGWIN_DLL( DllMain );
7557 # #endif
7558 # HINSTANCE __hDllInstance_base;
7559 #
7560 # BOOL APIENTRY
7561 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7562 # {
7563 #   __hDllInstance_base = hInst;
7564 #   return TRUE;
7565 # }
7566 # /* ltdll.c ends here */
7567         # This is a source program that is used to create import libraries
7568         # on Windows for dlls which lack them. Don't remove nor modify the
7569         # starting and closing comments
7570 # /* impgen.c starts here */
7571 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7572 #
7573 #  This file is part of GNU libtool.
7574 #
7575 #  This program is free software; you can redistribute it and/or modify
7576 #  it under the terms of the GNU General Public License as published by
7577 #  the Free Software Foundation; either version 2 of the License, or
7578 #  (at your option) any later version.
7579 #
7580 #  This program is distributed in the hope that it will be useful,
7581 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7582 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7583 #  GNU General Public License for more details.
7584 #
7585 #  You should have received a copy of the GNU General Public License
7586 #  along with this program; if not, write to the Free Software
7587 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7588 #  */
7589 #
7590 # #include <stdio.h>            /* for printf() */
7591 # #include <unistd.h>           /* for open(), lseek(), read() */
7592 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7593 # #include <string.h>           /* for strdup() */
7594 #
7595 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7596 # #ifndef O_BINARY
7597 # #define O_BINARY 0
7598 # #endif
7599 #
7600 # static unsigned int
7601 # pe_get16 (fd, offset)
7602 #      int fd;
7603 #      int offset;
7604 # {
7605 #   unsigned char b[2];
7606 #   lseek (fd, offset, SEEK_SET);
7607 #   read (fd, b, 2);
7608 #   return b[0] + (b[1]<<8);
7609 # }
7610 #
7611 # static unsigned int
7612 # pe_get32 (fd, offset)
7613 #     int fd;
7614 #     int offset;
7615 # {
7616 #   unsigned char b[4];
7617 #   lseek (fd, offset, SEEK_SET);
7618 #   read (fd, b, 4);
7619 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7620 # }
7621 #
7622 # static unsigned int
7623 # pe_as32 (ptr)
7624 #      void *ptr;
7625 # {
7626 #   unsigned char *b = ptr;
7627 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7628 # }
7629 #
7630 # int
7631 # main (argc, argv)
7632 #     int argc;
7633 #     char *argv[];
7634 # {
7635 #     int dll;
7636 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7637 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7638 #     unsigned long name_rvas, nexp;
7639 #     unsigned char *expdata, *erva;
7640 #     char *filename, *dll_name;
7641 #
7642 #     filename = argv[1];
7643 #
7644 #     dll = open(filename, O_RDONLY|O_BINARY);
7645 #     if (dll < 1)
7646 #       return 1;
7647 #
7648 #     dll_name = filename;
7649 #
7650 #     for (i=0; filename[i]; i++)
7651 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7652 #           dll_name = filename + i +1;
7653 #
7654 #     pe_header_offset = pe_get32 (dll, 0x3c);
7655 #     opthdr_ofs = pe_header_offset + 4 + 20;
7656 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7657 #
7658 #     if (num_entries < 1) /* no exports */
7659 #       return 1;
7660 #
7661 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7662 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7663 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7664 #     secptr = (pe_header_offset + 4 + 20 +
7665 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7666 #
7667 #     expptr = 0;
7668 #     for (i = 0; i < nsections; i++)
7669 #     {
7670 #       char sname[8];
7671 #       unsigned long secptr1 = secptr + 40 * i;
7672 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7673 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7674 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7675 #       lseek(dll, secptr1, SEEK_SET);
7676 #       read(dll, sname, 8);
7677 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7678 #       {
7679 #           expptr = fptr + (export_rva - vaddr);
7680 #           if (export_rva + export_size > vaddr + vsize)
7681 #               export_size = vsize - (export_rva - vaddr);
7682 #           break;
7683 #       }
7684 #     }
7685 #
7686 #     expdata = (unsigned char*)malloc(export_size);
7687 #     lseek (dll, expptr, SEEK_SET);
7688 #     read (dll, expdata, export_size);
7689 #     erva = expdata - export_rva;
7690 #
7691 #     nexp = pe_as32 (expdata+24);
7692 #     name_rvas = pe_as32 (expdata+32);
7693 #
7694 #     printf ("EXPORTS\n");
7695 #     for (i = 0; i<nexp; i++)
7696 #     {
7697 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7698 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7699 #     }
7700 #
7701 #     return 0;
7702 # }
7703 # /* impgen.c ends here */
7704
7705 EOF
7706     ;;
7707   esac
7708
7709   # We use sed instead of cat because bash on DJGPP gets confused if
7710   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7711   # text mode, it properly converts lines to CR/LF.  This bash problem
7712   # is reportedly fixed, but why not run on old versions too?
7713   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7714
7715   mv -f "${ofile}T" "$ofile" || \
7716     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7717   chmod +x "$ofile"
7718 fi
7719
7720
7721
7722
7723
7724 # This can be used to rebuild libtool when needed
7725 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7726
7727 # Always use our own libtool.
7728 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7729
7730 # Prevent multiple expansion
7731
7732
7733
7734 ol_link_perl=no
7735 if test $ol_enable_perl != no ; then
7736         # Extract the first word of "perl", so it can be a program name with args.
7737 set dummy perl; ac_word=$2
7738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_word" >&5
7740 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   case "$PERLBIN" in
7744   /*)
7745   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7746   ;;
7747   ?:/*)
7748   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7749   ;;
7750   *)
7751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7752   ac_dummy="$PATH"
7753   for ac_dir in $ac_dummy; do 
7754     test -z "$ac_dir" && ac_dir=.
7755     if test -f $ac_dir/$ac_word; then
7756       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7757       break
7758     fi
7759   done
7760   IFS="$ac_save_ifs"
7761   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7762   ;;
7763 esac
7764 fi
7765 PERLBIN="$ac_cv_path_PERLBIN"
7766 if test -n "$PERLBIN"; then
7767   echo "$ac_t""$PERLBIN" 1>&6
7768 else
7769   echo "$ac_t""no" 1>&6
7770 fi
7771
7772
7773         if test "no$PERLBIN" = "no" ; then
7774                 if test $ol_enable_perl = yes ; then
7775                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7776                 fi
7777
7778         else
7779                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7780                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7781
7782                 if test x"$ol_enable_perl" = "xyes" ; then
7783                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7784                 else
7785                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7786                 fi
7787                                 ol_link_perl=yes
7788         fi
7789 fi
7790
7791 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7792 echo "configure:7793: checking how to run the C preprocessor" >&5
7793 # On Suns, sometimes $CPP names a directory.
7794 if test -n "$CPP" && test -d "$CPP"; then
7795   CPP=
7796 fi
7797 if test -z "$CPP"; then
7798 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7799   echo $ac_n "(cached) $ac_c" 1>&6
7800 else
7801     # This must be in double quotes, not single quotes, because CPP may get
7802   # substituted into the Makefile and "${CC-cc}" will confuse make.
7803   CPP="${CC-cc} -E"
7804   # On the NeXT, cc -E runs the code through the compiler's parser,
7805   # not just through cpp.
7806   cat > conftest.$ac_ext <<EOF
7807 #line 7808 "configure"
7808 #include "confdefs.h"
7809 #include <assert.h>
7810 Syntax Error
7811 EOF
7812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7813 { (eval echo configure:7814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7815 if test -z "$ac_err"; then
7816   :
7817 else
7818   echo "$ac_err" >&5
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   CPP="${CC-cc} -E -traditional-cpp"
7823   cat > conftest.$ac_ext <<EOF
7824 #line 7825 "configure"
7825 #include "confdefs.h"
7826 #include <assert.h>
7827 Syntax Error
7828 EOF
7829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7830 { (eval echo configure:7831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7832 if test -z "$ac_err"; then
7833   :
7834 else
7835   echo "$ac_err" >&5
7836   echo "configure: failed program was:" >&5
7837   cat conftest.$ac_ext >&5
7838   rm -rf conftest*
7839   CPP="${CC-cc} -nologo -E"
7840   cat > conftest.$ac_ext <<EOF
7841 #line 7842 "configure"
7842 #include "confdefs.h"
7843 #include <assert.h>
7844 Syntax Error
7845 EOF
7846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7847 { (eval echo configure:7848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7849 if test -z "$ac_err"; then
7850   :
7851 else
7852   echo "$ac_err" >&5
7853   echo "configure: failed program was:" >&5
7854   cat conftest.$ac_ext >&5
7855   rm -rf conftest*
7856   CPP=/lib/cpp
7857 fi
7858 rm -f conftest*
7859 fi
7860 rm -f conftest*
7861 fi
7862 rm -f conftest*
7863   ac_cv_prog_CPP="$CPP"
7864 fi
7865   CPP="$ac_cv_prog_CPP"
7866 else
7867   ac_cv_prog_CPP="$CPP"
7868 fi
7869 echo "$ac_t""$CPP" 1>&6
7870
7871
7872
7873 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7874 echo "configure:7875: checking for Cygwin environment" >&5
7875 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7876   echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881
7882 int main() {
7883
7884 #ifndef __CYGWIN__
7885 #define __CYGWIN__ __CYGWIN32__
7886 #endif
7887 return __CYGWIN__;
7888 ; return 0; }
7889 EOF
7890 if { (eval echo configure:7891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7891   rm -rf conftest*
7892   ac_cv_cygwin=yes
7893 else
7894   echo "configure: failed program was:" >&5
7895   cat conftest.$ac_ext >&5
7896   rm -rf conftest*
7897   ac_cv_cygwin=no
7898 fi
7899 rm -f conftest*
7900 fi
7901
7902 echo "$ac_t""$ac_cv_cygwin" 1>&6
7903 CYGWIN=
7904 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7905 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7906 echo "configure:7907: checking for mingw32 environment" >&5
7907 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913
7914 int main() {
7915 return __MINGW32__;
7916 ; return 0; }
7917 EOF
7918 if { (eval echo configure:7919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7919   rm -rf conftest*
7920   ac_cv_mingw32=yes
7921 else
7922   echo "configure: failed program was:" >&5
7923   cat conftest.$ac_ext >&5
7924   rm -rf conftest*
7925   ac_cv_mingw32=no
7926 fi
7927 rm -f conftest*
7928 fi
7929
7930 echo "$ac_t""$ac_cv_mingw32" 1>&6
7931 MINGW32=
7932 test "$ac_cv_mingw32" = yes && MINGW32=yes
7933
7934
7935
7936 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7937 echo "configure:7938: checking for executable suffix" >&5
7938 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7939   echo $ac_n "(cached) $ac_c" 1>&6
7940 else
7941   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7942   ac_cv_exeext=.exe
7943 else
7944   rm -f conftest*
7945   echo 'int main () { return 0; }' > conftest.$ac_ext
7946   ac_cv_exeext=
7947   if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7948     for file in conftest.*; do
7949       case $file in
7950       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7951       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7952       esac
7953     done
7954   else
7955     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7956   fi
7957   rm -f conftest*
7958   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7959 fi
7960 fi
7961
7962 EXEEXT=""
7963 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7964 echo "$ac_t""${ac_cv_exeext}" 1>&6
7965 ac_exeext=$EXEEXT
7966
7967 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7968 echo "configure:7969: checking for object suffix" >&5
7969 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7970   echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972   rm -f conftest*
7973 echo 'int i = 1;' > conftest.$ac_ext
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975   for ac_file in conftest.*; do
7976     case $ac_file in
7977     *.c) ;;
7978     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7979     esac
7980   done
7981 else
7982   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7983 fi
7984 rm -f conftest*
7985 fi
7986
7987 echo "$ac_t""$ac_cv_objext" 1>&6
7988 OBJEXT=$ac_cv_objext
7989 ac_objext=$ac_cv_objext
7990
7991
7992 cat >> confdefs.h <<EOF
7993 #define EXEEXT "${EXEEXT}"
7994 EOF
7995
7996
7997 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7998 echo "configure:7999: checking for be_app in -lbe" >&5
7999 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8001   echo $ac_n "(cached) $ac_c" 1>&6
8002 else
8003   ac_save_LIBS="$LIBS"
8004 LIBS="-lbe -lroot -lnet $LIBS"
8005 cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008 /* Override any gcc2 internal prototype to avoid an error.  */
8009 /* We use char because int might match the return type of a gcc2
8010     builtin and then its argument prototype would still apply.  */
8011 char be_app();
8012
8013 int main() {
8014 be_app()
8015 ; return 0; }
8016 EOF
8017 if { (eval echo configure:8018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8018   rm -rf conftest*
8019   eval "ac_cv_lib_$ac_lib_var=yes"
8020 else
8021   echo "configure: failed program was:" >&5
8022   cat conftest.$ac_ext >&5
8023   rm -rf conftest*
8024   eval "ac_cv_lib_$ac_lib_var=no"
8025 fi
8026 rm -f conftest*
8027 LIBS="$ac_save_LIBS"
8028
8029 fi
8030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8031   echo "$ac_t""yes" 1>&6
8032   LIBS="$LIBS -lbe -lroot -lnet"
8033 else
8034   echo "$ac_t""no" 1>&6
8035 :
8036 fi
8037
8038
8039
8040
8041
8042 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8043 echo "configure:8044: checking for ${CC-cc} option to accept ANSI C" >&5
8044 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8045   echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047   am_cv_prog_cc_stdc=no
8048 ac_save_CC="$CC"
8049 # Don't try gcc -ansi; that turns off useful extensions and
8050 # breaks some systems' header files.
8051 # AIX                   -qlanglvl=ansi
8052 # Ultrix and OSF/1      -std1
8053 # HP-UX 10.20 and later -Ae
8054 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8055 # SVR4                  -Xc -D__EXTENSIONS__
8056 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8057 do
8058   CC="$ac_save_CC $ac_arg"
8059   cat > conftest.$ac_ext <<EOF
8060 #line 8061 "configure"
8061 #include "confdefs.h"
8062 #include <stdarg.h>
8063 #include <stdio.h>
8064 #include <sys/types.h>
8065 #include <sys/stat.h>
8066 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8067 struct buf { int x; };
8068 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8069 static char *e (p, i)
8070      char **p;
8071      int i;
8072 {
8073   return p[i];
8074 }
8075 static char *f (char * (*g) (char **, int), char **p, ...)
8076 {
8077   char *s;
8078   va_list v;
8079   va_start (v,p);
8080   s = g (p, va_arg (v,int));
8081   va_end (v);
8082   return s;
8083 }
8084 int test (int i, double x);
8085 struct s1 {int (*f) (int a);};
8086 struct s2 {int (*f) (double a);};
8087 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8088 int argc;
8089 char **argv;
8090
8091 int main() {
8092
8093 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8094
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8098   rm -rf conftest*
8099   am_cv_prog_cc_stdc="$ac_arg"; break
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103 fi
8104 rm -f conftest*
8105 done
8106 CC="$ac_save_CC"
8107
8108 fi
8109
8110 if test -z "$am_cv_prog_cc_stdc"; then
8111   echo "$ac_t""none needed" 1>&6
8112 else
8113   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8114 fi
8115 case "x$am_cv_prog_cc_stdc" in
8116   x|xno) ;;
8117   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8118 esac
8119
8120 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8121         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8122 fi
8123
8124 # test for make depend flag
8125 OL_MKDEP=
8126 OL_MKDEP_FLAGS=
8127 if test -z "${MKDEP}"; then
8128         OL_MKDEP="${CC-cc}"
8129         if test -z "${MKDEP_FLAGS}"; then
8130                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8131 echo "configure:8132: checking for ${OL_MKDEP} depend flag" >&5
8132 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8133   echo $ac_n "(cached) $ac_c" 1>&6
8134 else
8135   
8136                         ol_cv_mkdep=no
8137                         for flag in "-M" "-xM"; do
8138                                 cat > conftest.c <<EOF
8139  noCode;
8140 EOF
8141                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8142                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8143                                 then
8144                                         if test ! -f conftest."${ac_object}" ; then
8145                                                 ol_cv_mkdep=$flag
8146                                                 OL_MKDEP_FLAGS="$flag"
8147                                                 break
8148                                         fi
8149                                 fi
8150                         done
8151                         rm -f conftest*
8152                 
8153 fi
8154
8155 echo "$ac_t""$ol_cv_mkdep" 1>&6
8156         else
8157                 cc_cv_mkdep=yes
8158                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8159         fi
8160 else
8161         cc_cv_mkdep=yes
8162         OL_MKDEP="${MKDEP}"
8163         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8164 fi
8165
8166
8167
8168 if test "${ol_cv_mkdep}" = no ; then
8169         # this will soon become an error
8170         echo "configure: warning: do not know how to generate dependencies" 1>&2
8171 fi
8172
8173 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8174 echo "configure:8175: checking for afopen in -ls" >&5
8175 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8177   echo $ac_n "(cached) $ac_c" 1>&6
8178 else
8179   ac_save_LIBS="$LIBS"
8180 LIBS="-ls  $LIBS"
8181 cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 /* Override any gcc2 internal prototype to avoid an error.  */
8185 /* We use char because int might match the return type of a gcc2
8186     builtin and then its argument prototype would still apply.  */
8187 char afopen();
8188
8189 int main() {
8190 afopen()
8191 ; return 0; }
8192 EOF
8193 if { (eval echo configure:8194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8194   rm -rf conftest*
8195   eval "ac_cv_lib_$ac_lib_var=yes"
8196 else
8197   echo "configure: failed program was:" >&5
8198   cat conftest.$ac_ext >&5
8199   rm -rf conftest*
8200   eval "ac_cv_lib_$ac_lib_var=no"
8201 fi
8202 rm -f conftest*
8203 LIBS="$ac_save_LIBS"
8204
8205 fi
8206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8207   echo "$ac_t""yes" 1>&6
8208   
8209         AUTH_LIBS=-ls
8210         cat >> confdefs.h <<\EOF
8211 #define HAVE_AIX_SECURITY 1
8212 EOF
8213
8214
8215 else
8216   echo "$ac_t""no" 1>&6
8217 fi
8218
8219
8220 case "$target" in
8221 *-ibm-openedition)
8222         ac_cv_func_getopt=no
8223         cat >> confdefs.h <<\EOF
8224 #define BOTH_STRINGS_H 1
8225 EOF
8226
8227         ;;
8228 esac
8229
8230 ol_link_modules=no
8231 WITH_MODULES_ENABLED=no
8232 if test $ol_enable_modules != no ; then
8233         for ac_hdr in ltdl.h
8234 do
8235 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8236 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8237 echo "configure:8238: checking for $ac_hdr" >&5
8238 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8239   echo $ac_n "(cached) $ac_c" 1>&6
8240 else
8241   cat > conftest.$ac_ext <<EOF
8242 #line 8243 "configure"
8243 #include "confdefs.h"
8244 #include <$ac_hdr>
8245 EOF
8246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8247 { (eval echo configure:8248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8249 if test -z "$ac_err"; then
8250   rm -rf conftest*
8251   eval "ac_cv_header_$ac_safe=yes"
8252 else
8253   echo "$ac_err" >&5
8254   echo "configure: failed program was:" >&5
8255   cat conftest.$ac_ext >&5
8256   rm -rf conftest*
8257   eval "ac_cv_header_$ac_safe=no"
8258 fi
8259 rm -f conftest*
8260 fi
8261 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8262   echo "$ac_t""yes" 1>&6
8263     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8264   cat >> confdefs.h <<EOF
8265 #define $ac_tr_hdr 1
8266 EOF
8267  
8268 else
8269   echo "$ac_t""no" 1>&6
8270 fi
8271 done
8272
8273
8274         if test $ac_cv_header_ltdl_h = no ; then
8275                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8276         fi
8277
8278         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8279 echo "configure:8280: checking for lt_dlinit in -lltdl" >&5
8280 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   ac_save_LIBS="$LIBS"
8285 LIBS="-lltdl  $LIBS"
8286 cat > conftest.$ac_ext <<EOF
8287 #line 8288 "configure"
8288 #include "confdefs.h"
8289 /* Override any gcc2 internal prototype to avoid an error.  */
8290 /* We use char because int might match the return type of a gcc2
8291     builtin and then its argument prototype would still apply.  */
8292 char lt_dlinit();
8293
8294 int main() {
8295 lt_dlinit()
8296 ; return 0; }
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8299   rm -rf conftest*
8300   eval "ac_cv_lib_$ac_lib_var=yes"
8301 else
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   eval "ac_cv_lib_$ac_lib_var=no"
8306 fi
8307 rm -f conftest*
8308 LIBS="$ac_save_LIBS"
8309
8310 fi
8311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8312   echo "$ac_t""yes" 1>&6
8313   
8314                 MODULES_LIBS=-lltdl
8315                 cat >> confdefs.h <<\EOF
8316 #define HAVE_LIBLTDL 1
8317 EOF
8318
8319         
8320 else
8321   echo "$ac_t""no" 1>&6
8322 fi
8323
8324
8325         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8326                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8327         fi
8328         ol_link_modules=yes
8329         WITH_MODULES_ENABLED=yes
8330
8331 else
8332         for i in $Backends; do
8333                 eval "ol_tmp=\$ol_enable_$i"
8334                 if test $ol_tmp = mod ; then
8335                         echo "configure: warning: building static $i backend" 1>&2
8336                         eval "ol_enable_$i=yes"
8337                 fi
8338         done
8339         for i in $Overlays; do
8340                 eval "ol_tmp=\$ol_enable_$i"
8341                 if test $ol_tmp = mod ; then
8342                         echo "configure: warning: building static $i overlay" 1>&2
8343                         eval "ol_enable_$i=yes"
8344                 fi
8345         done
8346 fi
8347
8348 # test for EBCDIC
8349 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8350 echo "configure:8351: checking for EBCDIC" >&5
8351 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8352   echo $ac_n "(cached) $ac_c" 1>&6
8353 else
8354   
8355         cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358
8359 #if !('M' == 0xd4)
8360 #include <__ASCII__/generate_error.h>
8361 #endif
8362
8363 EOF
8364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8365 { (eval echo configure:8366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8367 if test -z "$ac_err"; then
8368   rm -rf conftest*
8369   ol_cv_cpp_ebcdic=yes
8370 else
8371   echo "$ac_err" >&5
8372   echo "configure: failed program was:" >&5
8373   cat conftest.$ac_ext >&5
8374   rm -rf conftest*
8375   ol_cv_cpp_ebcdic=no
8376 fi
8377 rm -f conftest*
8378 fi
8379
8380 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8381 if test $ol_cv_cpp_ebcdic = yes ; then
8382         cat >> confdefs.h <<\EOF
8383 #define HAVE_EBCDIC 1
8384 EOF
8385
8386 fi
8387
8388 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8389 echo "configure:8390: checking for ANSI C header files" >&5
8390 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8391   echo $ac_n "(cached) $ac_c" 1>&6
8392 else
8393   cat > conftest.$ac_ext <<EOF
8394 #line 8395 "configure"
8395 #include "confdefs.h"
8396 #include <stdlib.h>
8397 #include <stdarg.h>
8398 #include <string.h>
8399 #include <float.h>
8400 EOF
8401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8402 { (eval echo configure:8403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8404 if test -z "$ac_err"; then
8405   rm -rf conftest*
8406   ol_cv_header_stdc=yes
8407 else
8408   echo "$ac_err" >&5
8409   echo "configure: failed program was:" >&5
8410   cat conftest.$ac_ext >&5
8411   rm -rf conftest*
8412   ol_cv_header_stdc=no
8413 fi
8414 rm -f conftest*
8415
8416 if test $ol_cv_header_stdc = yes; then
8417   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8418 cat > conftest.$ac_ext <<EOF
8419 #line 8420 "configure"
8420 #include "confdefs.h"
8421 #include <string.h>
8422 EOF
8423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8424   egrep "memchr" >/dev/null 2>&1; then
8425   :
8426 else
8427   rm -rf conftest*
8428   ol_cv_header_stdc=no
8429 fi
8430 rm -f conftest*
8431
8432 fi
8433
8434 if test $ol_cv_header_stdc = yes; then
8435   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8436 cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 #include <stdlib.h>
8440 EOF
8441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8442   egrep "free" >/dev/null 2>&1; then
8443   :
8444 else
8445   rm -rf conftest*
8446   ol_cv_header_stdc=no
8447 fi
8448 rm -f conftest*
8449
8450 fi
8451
8452 if test $ol_cv_header_stdc = yes; then
8453   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8454 if test "$cross_compiling" = yes; then
8455   :
8456 else
8457   cat > conftest.$ac_ext <<EOF
8458 #line 8459 "configure"
8459 #include "confdefs.h"
8460 #include <ctype.h>
8461 #ifndef HAVE_EBCDIC
8462 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8463 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8464 #else
8465 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8466                 || ('j' <= (c) && (c) <= 'r') \
8467                 || ('s' <= (c) && (c) <= 'z'))
8468 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8469 #endif
8470 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8471 int main () { int i; for (i = 0; i < 256; i++)
8472 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8473 exit (0); }
8474
8475 EOF
8476 if { (eval echo configure:8477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8477 then
8478   :
8479 else
8480   echo "configure: failed program was:" >&5
8481   cat conftest.$ac_ext >&5
8482   rm -fr conftest*
8483   ol_cv_header_stdc=no
8484 fi
8485 rm -fr conftest*
8486 fi
8487
8488 fi
8489 fi
8490
8491 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8492 if test $ol_cv_header_stdc = yes; then
8493   cat >> confdefs.h <<\EOF
8494 #define STDC_HEADERS 1
8495 EOF
8496
8497 fi
8498 ac_cv_header_stdc=disable
8499
8500
8501 if test $ol_cv_header_stdc != yes; then
8502         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8503 fi
8504
8505 ac_header_dirent=no
8506 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8507 do
8508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8509 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8510 echo "configure:8511: checking for $ac_hdr that defines DIR" >&5
8511 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8512   echo $ac_n "(cached) $ac_c" 1>&6
8513 else
8514   cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <sys/types.h>
8518 #include <$ac_hdr>
8519 int main() {
8520 DIR *dirp = 0;
8521 ; return 0; }
8522 EOF
8523 if { (eval echo configure:8524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8524   rm -rf conftest*
8525   eval "ac_cv_header_dirent_$ac_safe=yes"
8526 else
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_header_dirent_$ac_safe=no"
8531 fi
8532 rm -f conftest*
8533 fi
8534 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8535   echo "$ac_t""yes" 1>&6
8536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8537   cat >> confdefs.h <<EOF
8538 #define $ac_tr_hdr 1
8539 EOF
8540  ac_header_dirent=$ac_hdr; break
8541 else
8542   echo "$ac_t""no" 1>&6
8543 fi
8544 done
8545 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8546 if test $ac_header_dirent = dirent.h; then
8547 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8548 echo "configure:8549: checking for opendir in -ldir" >&5
8549 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8551   echo $ac_n "(cached) $ac_c" 1>&6
8552 else
8553   ac_save_LIBS="$LIBS"
8554 LIBS="-ldir  $LIBS"
8555 cat > conftest.$ac_ext <<EOF
8556 #line 8557 "configure"
8557 #include "confdefs.h"
8558 /* Override any gcc2 internal prototype to avoid an error.  */
8559 /* We use char because int might match the return type of a gcc2
8560     builtin and then its argument prototype would still apply.  */
8561 char opendir();
8562
8563 int main() {
8564 opendir()
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8568   rm -rf conftest*
8569   eval "ac_cv_lib_$ac_lib_var=yes"
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   eval "ac_cv_lib_$ac_lib_var=no"
8575 fi
8576 rm -f conftest*
8577 LIBS="$ac_save_LIBS"
8578
8579 fi
8580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8581   echo "$ac_t""yes" 1>&6
8582   LIBS="$LIBS -ldir"
8583 else
8584   echo "$ac_t""no" 1>&6
8585 fi
8586
8587 else
8588 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8589 echo "configure:8590: checking for opendir in -lx" >&5
8590 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   ac_save_LIBS="$LIBS"
8595 LIBS="-lx  $LIBS"
8596 cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 /* Override any gcc2 internal prototype to avoid an error.  */
8600 /* We use char because int might match the return type of a gcc2
8601     builtin and then its argument prototype would still apply.  */
8602 char opendir();
8603
8604 int main() {
8605 opendir()
8606 ; return 0; }
8607 EOF
8608 if { (eval echo configure:8609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=yes"
8611 else
8612   echo "configure: failed program was:" >&5
8613   cat conftest.$ac_ext >&5
8614   rm -rf conftest*
8615   eval "ac_cv_lib_$ac_lib_var=no"
8616 fi
8617 rm -f conftest*
8618 LIBS="$ac_save_LIBS"
8619
8620 fi
8621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8622   echo "$ac_t""yes" 1>&6
8623   LIBS="$LIBS -lx"
8624 else
8625   echo "$ac_t""no" 1>&6
8626 fi
8627
8628 fi
8629
8630 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8631 echo "configure:8632: checking for sys/wait.h that is POSIX.1 compatible" >&5
8632 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8633   echo $ac_n "(cached) $ac_c" 1>&6
8634 else
8635   cat > conftest.$ac_ext <<EOF
8636 #line 8637 "configure"
8637 #include "confdefs.h"
8638 #include <sys/types.h>
8639 #include <sys/wait.h>
8640 #ifndef WEXITSTATUS
8641 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8642 #endif
8643 #ifndef WIFEXITED
8644 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8645 #endif
8646 int main() {
8647 int s;
8648 wait (&s);
8649 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8653   rm -rf conftest*
8654   ac_cv_header_sys_wait_h=yes
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   ac_cv_header_sys_wait_h=no
8660 fi
8661 rm -f conftest*
8662 fi
8663
8664 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8665 if test $ac_cv_header_sys_wait_h = yes; then
8666   cat >> confdefs.h <<\EOF
8667 #define HAVE_SYS_WAIT_H 1
8668 EOF
8669
8670 fi
8671
8672 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8673 echo "configure:8674: checking POSIX termios" >&5
8674 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8675   echo $ac_n "(cached) $ac_c" 1>&6
8676 else
8677   cat > conftest.$ac_ext <<EOF
8678 #line 8679 "configure"
8679 #include "confdefs.h"
8680 #include <sys/types.h>
8681 #include <unistd.h>
8682 #include <termios.h>
8683 int main() {
8684 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8685    tcgetattr(0, 0);
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8689   rm -rf conftest*
8690   am_cv_sys_posix_termios=yes
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   am_cv_sys_posix_termios=no
8696 fi
8697 rm -f conftest*
8698 fi
8699
8700 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8701
8702
8703  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8704 echo "configure:8705: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8705 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8706   echo $ac_n "(cached) $ac_c" 1>&6
8707 else
8708   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8709
8710   gwinsz_in_termios_h=no
8711   if test $am_cv_sys_posix_termios = yes; then
8712     cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <sys/types.h>
8716 #     include <termios.h>
8717 #     ifdef TIOCGWINSZ
8718         yes
8719 #     endif
8720     
8721 EOF
8722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8723   egrep "yes" >/dev/null 2>&1; then
8724   rm -rf conftest*
8725   gwinsz_in_termios_h=yes
8726 fi
8727 rm -f conftest*
8728
8729   fi
8730
8731   if test $gwinsz_in_termios_h = no; then
8732     cat > conftest.$ac_ext <<EOF
8733 #line 8734 "configure"
8734 #include "confdefs.h"
8735 #include <sys/types.h>
8736 #     include <sys/ioctl.h>
8737 #     ifdef TIOCGWINSZ
8738         yes
8739 #     endif
8740     
8741 EOF
8742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8743   egrep "yes" >/dev/null 2>&1; then
8744   rm -rf conftest*
8745   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8746 fi
8747 rm -f conftest*
8748
8749   fi
8750   
8751 fi
8752
8753 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8754   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8755     cat >> confdefs.h <<\EOF
8756 #define GWINSZ_IN_SYS_IOCTL 1
8757 EOF
8758
8759   fi
8760
8761 if test $am_cv_sys_posix_termios = yes ; then
8762         cat >> confdefs.h <<\EOF
8763 #define HAVE_POSIX_TERMIOS 1
8764 EOF
8765
8766 fi
8767
8768 for ac_hdr in \
8769         arpa/inet.h             \
8770         arpa/nameser.h          \
8771         assert.h                \
8772         bits/types.h            \
8773         conio.h                 \
8774         crypt.h                 \
8775         direct.h                \
8776         errno.h                 \
8777         fcntl.h                 \
8778         filio.h                 \
8779         getopt.h                \
8780         grp.h                   \
8781         io.h                    \
8782         libutil.h               \
8783         limits.h                \
8784         locale.h                \
8785         netinet/tcp.h           \
8786         malloc.h                \
8787         memory.h                \
8788         psap.h                  \
8789         pwd.h                   \
8790         process.h               \
8791         resolv.h                \
8792         sgtty.h                 \
8793         shadow.h                \
8794         stddef.h                \
8795         string.h                \
8796         strings.h               \
8797         sysexits.h              \
8798         sys/file.h              \
8799         sys/filio.h             \
8800         sys/errno.h             \
8801         sys/ioctl.h             \
8802         sys/param.h             \
8803         sys/resource.h          \
8804         sys/select.h            \
8805         sys/socket.h            \
8806         sys/stat.h              \
8807         sys/syslog.h            \
8808         sys/time.h              \
8809         sys/types.h             \
8810         sys/ucred.h             \
8811         sys/uio.h               \
8812         syslog.h                \
8813         termios.h               \
8814         unistd.h                \
8815         utime.h                 \
8816         winsock.h               \
8817         winsock2.h              \
8818
8819 do
8820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8822 echo "configure:8823: checking for $ac_hdr" >&5
8823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8824   echo $ac_n "(cached) $ac_c" 1>&6
8825 else
8826   cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829 #include <$ac_hdr>
8830 EOF
8831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8832 { (eval echo configure:8833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8834 if test -z "$ac_err"; then
8835   rm -rf conftest*
8836   eval "ac_cv_header_$ac_safe=yes"
8837 else
8838   echo "$ac_err" >&5
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -rf conftest*
8842   eval "ac_cv_header_$ac_safe=no"
8843 fi
8844 rm -f conftest*
8845 fi
8846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8847   echo "$ac_t""yes" 1>&6
8848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8849   cat >> confdefs.h <<EOF
8850 #define $ac_tr_hdr 1
8851 EOF
8852  
8853 else
8854   echo "$ac_t""no" 1>&6
8855 fi
8856 done
8857
8858
8859
8860 for ac_func in sigaction sigset 
8861 do
8862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8863 echo "configure:8864: checking for $ac_func" >&5
8864 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8865   echo $ac_n "(cached) $ac_c" 1>&6
8866 else
8867   cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 /* System header to define __stub macros and hopefully few prototypes,
8871     which can conflict with char $ac_func(); below.  */
8872 #include <assert.h>
8873 /* Override any gcc2 internal prototype to avoid an error.  */
8874 /* We use char because int might match the return type of a gcc2
8875     builtin and then its argument prototype would still apply.  */
8876 char $ac_func();
8877 char (*f)();
8878
8879 int main() {
8880
8881 /* The GNU C library defines this for functions which it implements
8882     to always fail with ENOSYS.  Some functions are actually named
8883     something starting with __ and the normal name is an alias.  */
8884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8885 choke me
8886 #else
8887 f = $ac_func;
8888 #endif
8889
8890 ; return 0; }
8891 EOF
8892 if { (eval echo configure:8893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8893   rm -rf conftest*
8894   eval "ac_cv_func_$ac_func=yes"
8895 else
8896   echo "configure: failed program was:" >&5
8897   cat conftest.$ac_ext >&5
8898   rm -rf conftest*
8899   eval "ac_cv_func_$ac_func=no"
8900 fi
8901 rm -f conftest*
8902 fi
8903
8904 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8905   echo "$ac_t""yes" 1>&6
8906     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8907   cat >> confdefs.h <<EOF
8908 #define $ac_tr_func 1
8909 EOF
8910  
8911 else
8912   echo "$ac_t""no" 1>&6
8913 fi
8914 done
8915
8916
8917 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8918         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8919 echo "configure:8920: checking for sigset in -lV3" >&5
8920 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8921 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8922   echo $ac_n "(cached) $ac_c" 1>&6
8923 else
8924   ac_save_LIBS="$LIBS"
8925 LIBS="-lV3  $LIBS"
8926 cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 /* Override any gcc2 internal prototype to avoid an error.  */
8930 /* We use char because int might match the return type of a gcc2
8931     builtin and then its argument prototype would still apply.  */
8932 char sigset();
8933
8934 int main() {
8935 sigset()
8936 ; return 0; }
8937 EOF
8938 if { (eval echo configure:8939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8939   rm -rf conftest*
8940   eval "ac_cv_lib_$ac_lib_var=yes"
8941 else
8942   echo "configure: failed program was:" >&5
8943   cat conftest.$ac_ext >&5
8944   rm -rf conftest*
8945   eval "ac_cv_lib_$ac_lib_var=no"
8946 fi
8947 rm -f conftest*
8948 LIBS="$ac_save_LIBS"
8949
8950 fi
8951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8952   echo "$ac_t""yes" 1>&6
8953     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8954     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8955   cat >> confdefs.h <<EOF
8956 #define $ac_tr_lib 1
8957 EOF
8958
8959   LIBS="-lV3 $LIBS"
8960
8961 else
8962   echo "$ac_t""no" 1>&6
8963 fi
8964
8965 fi
8966
8967 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
8968 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8969 echo "configure:8970: checking for winsock" >&5
8970 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8971   echo $ac_n "(cached) $ac_c" 1>&6
8972 else
8973   save_LIBS="$LIBS"
8974 for curlib in ws2_32 wsock32; do
8975         LIBS="$LIBS -l$curlib"
8976         cat > conftest.$ac_ext <<EOF
8977 #line 8978 "configure"
8978 #include "confdefs.h"
8979 #include <winsock.h>
8980                         
8981 int main() {
8982
8983                         socket(0,0,0);
8984                         select(0,NULL,NULL,NULL,NULL);
8985                         closesocket(0);
8986                         gethostname(NULL,0);
8987                         
8988 ; return 0; }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8991   rm -rf conftest*
8992   ol_cv_winsock=yes
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -rf conftest*
8997   ol_cv_winsock=no
8998 fi
8999 rm -f conftest*
9000
9001         if test $ol_cv_winsock = yes; then
9002                 cat >> confdefs.h <<\EOF
9003 #define HAVE_WINSOCK 1
9004 EOF
9005
9006                 ac_cv_func_socket=yes
9007                 ac_cv_func_select=yes
9008                 ac_cv_func_closesocket=yes
9009                 ac_cv_func_gethostname=yes
9010                 if test $curlib = ws2_32; then
9011                         ol_cv_winsock=winsock2
9012                         cat >> confdefs.h <<\EOF
9013 #define HAVE_WINSOCK2 1
9014 EOF
9015
9016                 fi
9017                 break
9018         fi
9019         LIBS="$save_LIBS"
9020 done
9021 fi
9022
9023 echo "$ac_t""$ol_cv_winsock" 1>&6
9024 fi
9025
9026
9027 echo $ac_n "checking for socket""... $ac_c" 1>&6
9028 echo "configure:9029: checking for socket" >&5
9029 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   cat > conftest.$ac_ext <<EOF
9033 #line 9034 "configure"
9034 #include "confdefs.h"
9035 /* System header to define __stub macros and hopefully few prototypes,
9036     which can conflict with char socket(); below.  */
9037 #include <assert.h>
9038 /* Override any gcc2 internal prototype to avoid an error.  */
9039 /* We use char because int might match the return type of a gcc2
9040     builtin and then its argument prototype would still apply.  */
9041 char socket();
9042 char (*f)();
9043
9044 int main() {
9045
9046 /* The GNU C library defines this for functions which it implements
9047     to always fail with ENOSYS.  Some functions are actually named
9048     something starting with __ and the normal name is an alias.  */
9049 #if defined (__stub_socket) || defined (__stub___socket)
9050 choke me
9051 #else
9052 f = socket;
9053 #endif
9054
9055 ; return 0; }
9056 EOF
9057 if { (eval echo configure:9058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9058   rm -rf conftest*
9059   eval "ac_cv_func_socket=yes"
9060 else
9061   echo "configure: failed program was:" >&5
9062   cat conftest.$ac_ext >&5
9063   rm -rf conftest*
9064   eval "ac_cv_func_socket=no"
9065 fi
9066 rm -f conftest*
9067 fi
9068
9069 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9070   echo "$ac_t""yes" 1>&6
9071   :
9072 else
9073   echo "$ac_t""no" 1>&6
9074         
9075         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9076 echo "configure:9077: checking for main in -lsocket" >&5
9077 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9079   echo $ac_n "(cached) $ac_c" 1>&6
9080 else
9081   ac_save_LIBS="$LIBS"
9082 LIBS="-lsocket  $LIBS"
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086
9087 int main() {
9088 main()
9089 ; return 0; }
9090 EOF
9091 if { (eval echo configure:9092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9092   rm -rf conftest*
9093   eval "ac_cv_lib_$ac_lib_var=yes"
9094 else
9095   echo "configure: failed program was:" >&5
9096   cat conftest.$ac_ext >&5
9097   rm -rf conftest*
9098   eval "ac_cv_lib_$ac_lib_var=no"
9099 fi
9100 rm -f conftest*
9101 LIBS="$ac_save_LIBS"
9102
9103 fi
9104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9105   echo "$ac_t""yes" 1>&6
9106     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9107     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9108   cat >> confdefs.h <<EOF
9109 #define $ac_tr_lib 1
9110 EOF
9111
9112   LIBS="-lsocket $LIBS"
9113
9114 else
9115   echo "$ac_t""no" 1>&6
9116 fi
9117
9118         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9119 echo "configure:9120: checking for main in -lnet" >&5
9120 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9121 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9122   echo $ac_n "(cached) $ac_c" 1>&6
9123 else
9124   ac_save_LIBS="$LIBS"
9125 LIBS="-lnet  $LIBS"
9126 cat > conftest.$ac_ext <<EOF
9127 #line 9128 "configure"
9128 #include "confdefs.h"
9129
9130 int main() {
9131 main()
9132 ; return 0; }
9133 EOF
9134 if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9135   rm -rf conftest*
9136   eval "ac_cv_lib_$ac_lib_var=yes"
9137 else
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   eval "ac_cv_lib_$ac_lib_var=no"
9142 fi
9143 rm -f conftest*
9144 LIBS="$ac_save_LIBS"
9145
9146 fi
9147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9148   echo "$ac_t""yes" 1>&6
9149     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9151   cat >> confdefs.h <<EOF
9152 #define $ac_tr_lib 1
9153 EOF
9154
9155   LIBS="-lnet $LIBS"
9156
9157 else
9158   echo "$ac_t""no" 1>&6
9159 fi
9160
9161         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9162 echo "configure:9163: checking for main in -lnsl_s" >&5
9163 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9165   echo $ac_n "(cached) $ac_c" 1>&6
9166 else
9167   ac_save_LIBS="$LIBS"
9168 LIBS="-lnsl_s  $LIBS"
9169 cat > conftest.$ac_ext <<EOF
9170 #line 9171 "configure"
9171 #include "confdefs.h"
9172
9173 int main() {
9174 main()
9175 ; return 0; }
9176 EOF
9177 if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9178   rm -rf conftest*
9179   eval "ac_cv_lib_$ac_lib_var=yes"
9180 else
9181   echo "configure: failed program was:" >&5
9182   cat conftest.$ac_ext >&5
9183   rm -rf conftest*
9184   eval "ac_cv_lib_$ac_lib_var=no"
9185 fi
9186 rm -f conftest*
9187 LIBS="$ac_save_LIBS"
9188
9189 fi
9190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9191   echo "$ac_t""yes" 1>&6
9192     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9193     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9194   cat >> confdefs.h <<EOF
9195 #define $ac_tr_lib 1
9196 EOF
9197
9198   LIBS="-lnsl_s $LIBS"
9199
9200 else
9201   echo "$ac_t""no" 1>&6
9202 fi
9203
9204         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9205 echo "configure:9206: checking for main in -lnsl" >&5
9206 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9208   echo $ac_n "(cached) $ac_c" 1>&6
9209 else
9210   ac_save_LIBS="$LIBS"
9211 LIBS="-lnsl  $LIBS"
9212 cat > conftest.$ac_ext <<EOF
9213 #line 9214 "configure"
9214 #include "confdefs.h"
9215
9216 int main() {
9217 main()
9218 ; return 0; }
9219 EOF
9220 if { (eval echo configure:9221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9221   rm -rf conftest*
9222   eval "ac_cv_lib_$ac_lib_var=yes"
9223 else
9224   echo "configure: failed program was:" >&5
9225   cat conftest.$ac_ext >&5
9226   rm -rf conftest*
9227   eval "ac_cv_lib_$ac_lib_var=no"
9228 fi
9229 rm -f conftest*
9230 LIBS="$ac_save_LIBS"
9231
9232 fi
9233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9234   echo "$ac_t""yes" 1>&6
9235     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9236     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9237   cat >> confdefs.h <<EOF
9238 #define $ac_tr_lib 1
9239 EOF
9240
9241   LIBS="-lnsl $LIBS"
9242
9243 else
9244   echo "$ac_t""no" 1>&6
9245 fi
9246
9247         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9248 echo "configure:9249: checking for socket in -linet" >&5
9249 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9250 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9251   echo $ac_n "(cached) $ac_c" 1>&6
9252 else
9253   ac_save_LIBS="$LIBS"
9254 LIBS="-linet  $LIBS"
9255 cat > conftest.$ac_ext <<EOF
9256 #line 9257 "configure"
9257 #include "confdefs.h"
9258 /* Override any gcc2 internal prototype to avoid an error.  */
9259 /* We use char because int might match the return type of a gcc2
9260     builtin and then its argument prototype would still apply.  */
9261 char socket();
9262
9263 int main() {
9264 socket()
9265 ; return 0; }
9266 EOF
9267 if { (eval echo configure:9268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9268   rm -rf conftest*
9269   eval "ac_cv_lib_$ac_lib_var=yes"
9270 else
9271   echo "configure: failed program was:" >&5
9272   cat conftest.$ac_ext >&5
9273   rm -rf conftest*
9274   eval "ac_cv_lib_$ac_lib_var=no"
9275 fi
9276 rm -f conftest*
9277 LIBS="$ac_save_LIBS"
9278
9279 fi
9280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9281   echo "$ac_t""yes" 1>&6
9282     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9283     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9284   cat >> confdefs.h <<EOF
9285 #define $ac_tr_lib 1
9286 EOF
9287
9288   LIBS="-linet $LIBS"
9289
9290 else
9291   echo "$ac_t""no" 1>&6
9292 fi
9293
9294         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9295 echo "configure:9296: checking for main in -lgen" >&5
9296 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9298   echo $ac_n "(cached) $ac_c" 1>&6
9299 else
9300   ac_save_LIBS="$LIBS"
9301 LIBS="-lgen  $LIBS"
9302 cat > conftest.$ac_ext <<EOF
9303 #line 9304 "configure"
9304 #include "confdefs.h"
9305
9306 int main() {
9307 main()
9308 ; return 0; }
9309 EOF
9310 if { (eval echo configure:9311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9311   rm -rf conftest*
9312   eval "ac_cv_lib_$ac_lib_var=yes"
9313 else
9314   echo "configure: failed program was:" >&5
9315   cat conftest.$ac_ext >&5
9316   rm -rf conftest*
9317   eval "ac_cv_lib_$ac_lib_var=no"
9318 fi
9319 rm -f conftest*
9320 LIBS="$ac_save_LIBS"
9321
9322 fi
9323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9324   echo "$ac_t""yes" 1>&6
9325     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9326     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9327   cat >> confdefs.h <<EOF
9328 #define $ac_tr_lib 1
9329 EOF
9330
9331   LIBS="-lgen $LIBS"
9332
9333 else
9334   echo "$ac_t""no" 1>&6
9335 fi
9336
9337
9338 fi
9339
9340
9341 echo $ac_n "checking for select""... $ac_c" 1>&6
9342 echo "configure:9343: checking for select" >&5
9343 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   cat > conftest.$ac_ext <<EOF
9347 #line 9348 "configure"
9348 #include "confdefs.h"
9349 /* System header to define __stub macros and hopefully few prototypes,
9350     which can conflict with char select(); below.  */
9351 #include <assert.h>
9352 /* Override any gcc2 internal prototype to avoid an error.  */
9353 /* We use char because int might match the return type of a gcc2
9354     builtin and then its argument prototype would still apply.  */
9355 char select();
9356 char (*f)();
9357
9358 int main() {
9359
9360 /* The GNU C library defines this for functions which it implements
9361     to always fail with ENOSYS.  Some functions are actually named
9362     something starting with __ and the normal name is an alias.  */
9363 #if defined (__stub_select) || defined (__stub___select)
9364 choke me
9365 #else
9366 f = select;
9367 #endif
9368
9369 ; return 0; }
9370 EOF
9371 if { (eval echo configure:9372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9372   rm -rf conftest*
9373   eval "ac_cv_func_select=yes"
9374 else
9375   echo "configure: failed program was:" >&5
9376   cat conftest.$ac_ext >&5
9377   rm -rf conftest*
9378   eval "ac_cv_func_select=no"
9379 fi
9380 rm -f conftest*
9381 fi
9382
9383 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9384   echo "$ac_t""yes" 1>&6
9385   :
9386 else
9387   echo "$ac_t""no" 1>&6
9388 { echo "configure: error: select() required." 1>&2; exit 1; }
9389 fi
9390
9391
9392 if test "${ac_cv_header_winsock_h}" != yes; then
9393                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9394 echo "configure:9395: checking types of arguments for select()" >&5
9395  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9396   echo $ac_n "(cached) $ac_c" 1>&6
9397 else
9398    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9399   echo $ac_n "(cached) $ac_c" 1>&6
9400 else
9401     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9402   echo $ac_n "(cached) $ac_c" 1>&6
9403 else
9404      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9405      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9406       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9407        cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 #ifdef HAVE_SYS_TYPES_H
9411 #include <sys/types.h>
9412 #endif
9413 #ifdef HAVE_SYS_TIME_H
9414 #include <sys/time.h>
9415 #endif
9416 #ifdef HAVE_SYS_SELECT_H
9417 #include <sys/select.h>
9418 #endif
9419 #ifdef HAVE_SYS_SOCKET_H
9420 #include <sys/socket.h>
9421 #endif
9422 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);
9423 int main() {
9424
9425 ; return 0; }
9426 EOF
9427 if { (eval echo configure:9428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9428   rm -rf conftest*
9429           ac_not_found=no ; break 3
9430 else
9431   echo "configure: failed program was:" >&5
9432   cat conftest.$ac_ext >&5
9433   rm -rf conftest*
9434   ac_not_found=yes
9435 fi
9436 rm -f conftest*
9437       done
9438      done
9439     done
9440    
9441 fi
9442   
9443 fi
9444  
9445 fi
9446  if test "$ac_not_found" = yes; then
9447   ac_cv_func_select_arg1=int 
9448   ac_cv_func_select_arg234='int *' 
9449   ac_cv_func_select_arg5='struct timeval *'
9450  fi
9451  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9452  cat >> confdefs.h <<EOF
9453 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9454 EOF
9455
9456  cat >> confdefs.h <<EOF
9457 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9458 EOF
9459
9460  cat >> confdefs.h <<EOF
9461 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9462 EOF
9463
9464
9465 fi
9466
9467
9468 for ac_func in poll 
9469 do
9470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9471 echo "configure:9472: checking for $ac_func" >&5
9472 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9473   echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475   cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478 /* System header to define __stub macros and hopefully few prototypes,
9479     which can conflict with char $ac_func(); below.  */
9480 #include <assert.h>
9481 /* Override any gcc2 internal prototype to avoid an error.  */
9482 /* We use char because int might match the return type of a gcc2
9483     builtin and then its argument prototype would still apply.  */
9484 char $ac_func();
9485 char (*f)();
9486
9487 int main() {
9488
9489 /* The GNU C library defines this for functions which it implements
9490     to always fail with ENOSYS.  Some functions are actually named
9491     something starting with __ and the normal name is an alias.  */
9492 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9493 choke me
9494 #else
9495 f = $ac_func;
9496 #endif
9497
9498 ; return 0; }
9499 EOF
9500 if { (eval echo configure:9501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9501   rm -rf conftest*
9502   eval "ac_cv_func_$ac_func=yes"
9503 else
9504   echo "configure: failed program was:" >&5
9505   cat conftest.$ac_ext >&5
9506   rm -rf conftest*
9507   eval "ac_cv_func_$ac_func=no"
9508 fi
9509 rm -f conftest*
9510 fi
9511
9512 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9513   echo "$ac_t""yes" 1>&6
9514     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9515   cat >> confdefs.h <<EOF
9516 #define $ac_tr_func 1
9517 EOF
9518  
9519 else
9520   echo "$ac_t""no" 1>&6
9521 fi
9522 done
9523
9524 for ac_hdr in poll.h 
9525 do
9526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9528 echo "configure:9529: checking for $ac_hdr" >&5
9529 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532   cat > conftest.$ac_ext <<EOF
9533 #line 9534 "configure"
9534 #include "confdefs.h"
9535 #include <$ac_hdr>
9536 EOF
9537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9538 { (eval echo configure:9539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9540 if test -z "$ac_err"; then
9541   rm -rf conftest*
9542   eval "ac_cv_header_$ac_safe=yes"
9543 else
9544   echo "$ac_err" >&5
9545   echo "configure: failed program was:" >&5
9546   cat conftest.$ac_ext >&5
9547   rm -rf conftest*
9548   eval "ac_cv_header_$ac_safe=no"
9549 fi
9550 rm -f conftest*
9551 fi
9552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9553   echo "$ac_t""yes" 1>&6
9554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9555   cat >> confdefs.h <<EOF
9556 #define $ac_tr_hdr 1
9557 EOF
9558  
9559 else
9560   echo "$ac_t""no" 1>&6
9561 fi
9562 done
9563
9564
9565 for ac_hdr in sys/epoll.h 
9566 do
9567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9568 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9569 echo "configure:9570: checking for $ac_hdr" >&5
9570 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9571   echo $ac_n "(cached) $ac_c" 1>&6
9572 else
9573   cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576 #include <$ac_hdr>
9577 EOF
9578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9579 { (eval echo configure:9580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9581 if test -z "$ac_err"; then
9582   rm -rf conftest*
9583   eval "ac_cv_header_$ac_safe=yes"
9584 else
9585   echo "$ac_err" >&5
9586   echo "configure: failed program was:" >&5
9587   cat conftest.$ac_ext >&5
9588   rm -rf conftest*
9589   eval "ac_cv_header_$ac_safe=no"
9590 fi
9591 rm -f conftest*
9592 fi
9593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9594   echo "$ac_t""yes" 1>&6
9595     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9596   cat >> confdefs.h <<EOF
9597 #define $ac_tr_hdr 1
9598 EOF
9599  
9600 else
9601   echo "$ac_t""no" 1>&6
9602 fi
9603 done
9604
9605 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9606 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9607 echo "configure:9608: checking for epoll system call" >&5
9608 if test "$cross_compiling" = yes; then
9609   echo "$ac_t""no" 1>&6
9610 else
9611   cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 int main(int argc, char *argv)
9615 {
9616         int epfd = epoll_create(256);
9617         exit (epfd == -1 ? 1 : 0);
9618 }
9619 EOF
9620 if { (eval echo configure:9621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9621 then
9622   echo "$ac_t""yes" 1>&6
9623 cat >> confdefs.h <<\EOF
9624 #define HAVE_EPOLL 1
9625 EOF
9626
9627 else
9628   echo "configure: failed program was:" >&5
9629   cat conftest.$ac_ext >&5
9630   rm -fr conftest*
9631   echo "$ac_t""no" 1>&6
9632 fi
9633 rm -fr conftest*
9634 fi
9635
9636 fi
9637
9638 # strerror checks
9639 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9640 echo "configure:9641: checking declaration of sys_errlist" >&5
9641 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9642   echo $ac_n "(cached) $ac_c" 1>&6
9643 else
9644   
9645         cat > conftest.$ac_ext <<EOF
9646 #line 9647 "configure"
9647 #include "confdefs.h"
9648
9649 #include <stdio.h>
9650 #include <sys/types.h>
9651 #include <errno.h>
9652 #ifdef WINNT
9653 #include <stdlib.h>
9654 #endif 
9655 int main() {
9656 char *c = (char *) *sys_errlist
9657 ; return 0; }
9658 EOF
9659 if { (eval echo configure:9660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9660   rm -rf conftest*
9661   ol_cv_dcl_sys_errlist=yes
9662         ol_cv_have_sys_errlist=yes
9663 else
9664   echo "configure: failed program was:" >&5
9665   cat conftest.$ac_ext >&5
9666   rm -rf conftest*
9667   ol_cv_dcl_sys_errlist=no
9668 fi
9669 rm -f conftest*
9670 fi
9671
9672 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9673 #
9674 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9675 if test $ol_cv_dcl_sys_errlist = no ; then
9676         cat >> confdefs.h <<\EOF
9677 #define DECL_SYS_ERRLIST 1
9678 EOF
9679
9680
9681         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9682 echo "configure:9683: checking existence of sys_errlist" >&5
9683 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9684   echo $ac_n "(cached) $ac_c" 1>&6
9685 else
9686   
9687                 cat > conftest.$ac_ext <<EOF
9688 #line 9689 "configure"
9689 #include "confdefs.h"
9690 #include <errno.h>
9691 int main() {
9692 char *c = (char *) *sys_errlist
9693 ; return 0; }
9694 EOF
9695 if { (eval echo configure:9696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9696   rm -rf conftest*
9697   ol_cv_have_sys_errlist=yes
9698 else
9699   echo "configure: failed program was:" >&5
9700   cat conftest.$ac_ext >&5
9701   rm -rf conftest*
9702   ol_cv_have_sys_errlist=no
9703 fi
9704 rm -f conftest*
9705 fi
9706
9707 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9708 fi
9709 if test $ol_cv_have_sys_errlist = yes ; then
9710         cat >> confdefs.h <<\EOF
9711 #define HAVE_SYS_ERRLIST 1
9712 EOF
9713
9714 fi
9715  for ac_func in strerror strerror_r
9716 do
9717 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9718 echo "configure:9719: checking for $ac_func" >&5
9719 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9720   echo $ac_n "(cached) $ac_c" 1>&6
9721 else
9722   cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725 /* System header to define __stub macros and hopefully few prototypes,
9726     which can conflict with char $ac_func(); below.  */
9727 #include <assert.h>
9728 /* Override any gcc2 internal prototype to avoid an error.  */
9729 /* We use char because int might match the return type of a gcc2
9730     builtin and then its argument prototype would still apply.  */
9731 char $ac_func();
9732 char (*f)();
9733
9734 int main() {
9735
9736 /* The GNU C library defines this for functions which it implements
9737     to always fail with ENOSYS.  Some functions are actually named
9738     something starting with __ and the normal name is an alias.  */
9739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9740 choke me
9741 #else
9742 f = $ac_func;
9743 #endif
9744
9745 ; return 0; }
9746 EOF
9747 if { (eval echo configure:9748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9748   rm -rf conftest*
9749   eval "ac_cv_func_$ac_func=yes"
9750 else
9751   echo "configure: failed program was:" >&5
9752   cat conftest.$ac_ext >&5
9753   rm -rf conftest*
9754   eval "ac_cv_func_$ac_func=no"
9755 fi
9756 rm -f conftest*
9757 fi
9758
9759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9760   echo "$ac_t""yes" 1>&6
9761     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9762   cat >> confdefs.h <<EOF
9763 #define $ac_tr_func 1
9764 EOF
9765  
9766 else
9767   echo "$ac_t""no" 1>&6
9768 fi
9769 done
9770
9771 ol_cv_func_strerror_r=no
9772 if test "${ac_cv_func_strerror_r}" = yes ; then
9773         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9774 echo "configure:9775: checking non-posix strerror_r" >&5
9775 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9776   echo $ac_n "(cached) $ac_c" 1>&6
9777 else
9778   
9779         cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782 #include <string.h>
9783 EOF
9784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9785   egrep "strerror_r" >/dev/null 2>&1; then
9786   rm -rf conftest*
9787   ol_decl_strerror_r=yes
9788 else
9789   rm -rf conftest*
9790   ol_decl_strerror_r=no
9791 fi
9792 rm -f conftest*
9793
9794         if test $ol_decl_strerror_r = yes ; then
9795                 cat > conftest.$ac_ext <<EOF
9796 #line 9797 "configure"
9797 #include "confdefs.h"
9798 #include <string.h>
9799 int main() {
9800    /* from autoconf 2.59 */
9801                                 char buf[100];
9802                                 char x = *strerror_r (0, buf, sizeof buf);
9803                                 char *p = strerror_r (0, buf, sizeof buf);
9804                         
9805 ; return 0; }
9806 EOF
9807 if { (eval echo configure:9808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9808   rm -rf conftest*
9809   ol_cv_nonposix_strerror_r=yes
9810 else
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813   rm -rf conftest*
9814   ol_cv_nonposix_strerror_r=no
9815 fi
9816 rm -f conftest*
9817         else
9818                 if test "$cross_compiling" = yes; then
9819   ol_cv_nonposix_strerror=no
9820 else
9821   cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824
9825                         main() {
9826                                 char buf[100];
9827                                 buf[0] = 0;
9828                                 strerror_r( 1, buf, sizeof buf );
9829                                 exit( buf[0] == 0 );
9830                         }
9831                         
9832 EOF
9833 if { (eval echo configure:9834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9834 then
9835   ol_cv_nonposix_strerror_r=yes
9836 else
9837   echo "configure: failed program was:" >&5
9838   cat conftest.$ac_ext >&5
9839   rm -fr conftest*
9840   ol_cv_nonposix_strerror=no
9841 fi
9842 rm -fr conftest*
9843 fi
9844
9845         fi
9846         
9847 fi
9848
9849 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9850 if test $ol_cv_nonposix_strerror_r = yes ; then
9851         cat >> confdefs.h <<\EOF
9852 #define HAVE_NONPOSIX_STRERROR_R 1
9853 EOF
9854
9855 fi
9856
9857 elif test "${ac_cv_func_strerror}" = no ; then
9858         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9859 echo "configure:9860: checking declaration of sys_errlist" >&5
9860 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9861   echo $ac_n "(cached) $ac_c" 1>&6
9862 else
9863   
9864         cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867
9868 #include <stdio.h>
9869 #include <sys/types.h>
9870 #include <errno.h>
9871 #ifdef WINNT
9872 #include <stdlib.h>
9873 #endif 
9874 int main() {
9875 char *c = (char *) *sys_errlist
9876 ; return 0; }
9877 EOF
9878 if { (eval echo configure:9879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9879   rm -rf conftest*
9880   ol_cv_dcl_sys_errlist=yes
9881         ol_cv_have_sys_errlist=yes
9882 else
9883   echo "configure: failed program was:" >&5
9884   cat conftest.$ac_ext >&5
9885   rm -rf conftest*
9886   ol_cv_dcl_sys_errlist=no
9887 fi
9888 rm -f conftest*
9889 fi
9890
9891 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9892 #
9893 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9894 if test $ol_cv_dcl_sys_errlist = no ; then
9895         cat >> confdefs.h <<\EOF
9896 #define DECL_SYS_ERRLIST 1
9897 EOF
9898
9899
9900         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9901 echo "configure:9902: checking existence of sys_errlist" >&5
9902 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   
9906                 cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 #include <errno.h>
9910 int main() {
9911 char *c = (char *) *sys_errlist
9912 ; return 0; }
9913 EOF
9914 if { (eval echo configure:9915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9915   rm -rf conftest*
9916   ol_cv_have_sys_errlist=yes
9917 else
9918   echo "configure: failed program was:" >&5
9919   cat conftest.$ac_ext >&5
9920   rm -rf conftest*
9921   ol_cv_have_sys_errlist=no
9922 fi
9923 rm -f conftest*
9924 fi
9925
9926 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9927 fi
9928 if test $ol_cv_have_sys_errlist = yes ; then
9929         cat >> confdefs.h <<\EOF
9930 #define HAVE_SYS_ERRLIST 1
9931 EOF
9932
9933 fi
9934
9935 fi
9936
9937
9938 for ac_hdr in regex.h 
9939 do
9940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9942 echo "configure:9943: checking for $ac_hdr" >&5
9943 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9944   echo $ac_n "(cached) $ac_c" 1>&6
9945 else
9946   cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 #include <$ac_hdr>
9950 EOF
9951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9952 { (eval echo configure:9953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9954 if test -z "$ac_err"; then
9955   rm -rf conftest*
9956   eval "ac_cv_header_$ac_safe=yes"
9957 else
9958   echo "$ac_err" >&5
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   eval "ac_cv_header_$ac_safe=no"
9963 fi
9964 rm -f conftest*
9965 fi
9966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9967   echo "$ac_t""yes" 1>&6
9968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9969   cat >> confdefs.h <<EOF
9970 #define $ac_tr_hdr 1
9971 EOF
9972  
9973 else
9974   echo "$ac_t""no" 1>&6
9975 fi
9976 done
9977
9978 if test "$ac_cv_header_regex_h" != yes ; then
9979         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9980 fi
9981
9982 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9983 echo "configure:9984: checking for library containing regfree" >&5
9984 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   ac_func_search_save_LIBS="$LIBS"
9988 ac_cv_search_regfree="no"
9989 cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char regfree();
9996
9997 int main() {
9998 regfree()
9999 ; return 0; }
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10002   rm -rf conftest*
10003   ac_cv_search_regfree="none required"
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007 fi
10008 rm -f conftest*
10009 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10010 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10011 cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10014 /* Override any gcc2 internal prototype to avoid an error.  */
10015 /* We use char because int might match the return type of a gcc2
10016     builtin and then its argument prototype would still apply.  */
10017 char regfree();
10018
10019 int main() {
10020 regfree()
10021 ; return 0; }
10022 EOF
10023 if { (eval echo configure:10024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10024   rm -rf conftest*
10025   ac_cv_search_regfree="-l$ac_lib"
10026 break
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030 fi
10031 rm -f conftest*
10032 done
10033 LIBS="$ac_func_search_save_LIBS"
10034 fi
10035
10036 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10037 if test "$ac_cv_search_regfree" != "no"; then
10038   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10039   :
10040 else :
10041   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10042 fi
10043
10044
10045 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10046 echo "configure:10047: checking for compatible POSIX regex" >&5
10047 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10048   echo $ac_n "(cached) $ac_c" 1>&6
10049 else
10050   
10051         if test "$cross_compiling" = yes; then
10052   ol_cv_c_posix_regex=cross
10053 else
10054   cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057
10058 #include <sys/types.h>
10059 #include <regex.h>
10060 static char *pattern, *string;
10061 main()
10062 {
10063         int rc;
10064         regex_t re;
10065
10066         pattern = "^A";
10067
10068         if(regcomp(&re, pattern, 0)) {
10069                 return -1;
10070         }
10071         
10072         string = "ALL MATCH";
10073         
10074         rc = regexec(&re, string, 0, (void*)0, 0);
10075
10076         regfree(&re);
10077
10078         return rc;
10079 }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10082 then
10083   ol_cv_c_posix_regex=yes
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -fr conftest*
10088   ol_cv_c_posix_regex=no
10089 fi
10090 rm -fr conftest*
10091 fi
10092
10093 fi
10094
10095 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10096
10097 if test "$ol_cv_c_posix_regex" = no ; then
10098         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10099 fi
10100
10101
10102 have_uuid=no
10103 for ac_hdr in sys/uuid.h
10104 do
10105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10107 echo "configure:10108: checking for $ac_hdr" >&5
10108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   cat > conftest.$ac_ext <<EOF
10112 #line 10113 "configure"
10113 #include "confdefs.h"
10114 #include <$ac_hdr>
10115 EOF
10116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10117 { (eval echo configure:10118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10119 if test -z "$ac_err"; then
10120   rm -rf conftest*
10121   eval "ac_cv_header_$ac_safe=yes"
10122 else
10123   echo "$ac_err" >&5
10124   echo "configure: failed program was:" >&5
10125   cat conftest.$ac_ext >&5
10126   rm -rf conftest*
10127   eval "ac_cv_header_$ac_safe=no"
10128 fi
10129 rm -f conftest*
10130 fi
10131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10132   echo "$ac_t""yes" 1>&6
10133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10134   cat >> confdefs.h <<EOF
10135 #define $ac_tr_hdr 1
10136 EOF
10137  
10138 else
10139   echo "$ac_t""no" 1>&6
10140 fi
10141 done
10142
10143 if test $ac_cv_header_sys_uuid_h = yes ; then
10144         save_LIBS="$LIBS"
10145         
10146 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10147 echo "configure:10148: checking for library containing uuid_to_str" >&5
10148 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   ac_func_search_save_LIBS="$LIBS"
10152 ac_cv_search_uuid_to_str="no"
10153 cat > conftest.$ac_ext <<EOF
10154 #line 10155 "configure"
10155 #include "confdefs.h"
10156 /* Override any gcc2 internal prototype to avoid an error.  */
10157 /* We use char because int might match the return type of a gcc2
10158     builtin and then its argument prototype would still apply.  */
10159 char uuid_to_str();
10160
10161 int main() {
10162 uuid_to_str()
10163 ; return 0; }
10164 EOF
10165 if { (eval echo configure:10166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10166   rm -rf conftest*
10167   ac_cv_search_uuid_to_str="none required"
10168 else
10169   echo "configure: failed program was:" >&5
10170   cat conftest.$ac_ext >&5
10171 fi
10172 rm -f conftest*
10173 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10174 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10175 cat > conftest.$ac_ext <<EOF
10176 #line 10177 "configure"
10177 #include "confdefs.h"
10178 /* Override any gcc2 internal prototype to avoid an error.  */
10179 /* We use char because int might match the return type of a gcc2
10180     builtin and then its argument prototype would still apply.  */
10181 char uuid_to_str();
10182
10183 int main() {
10184 uuid_to_str()
10185 ; return 0; }
10186 EOF
10187 if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10188   rm -rf conftest*
10189   ac_cv_search_uuid_to_str="-l$ac_lib"
10190 break
10191 else
10192   echo "configure: failed program was:" >&5
10193   cat conftest.$ac_ext >&5
10194 fi
10195 rm -f conftest*
10196 done
10197 LIBS="$ac_func_search_save_LIBS"
10198 fi
10199
10200 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10201 if test "$ac_cv_search_uuid_to_str" != "no"; then
10202   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10203   have_uuid=yes
10204 else :
10205   :
10206 fi
10207         LIBS="$save_LIBS"
10208
10209         if test have_uuid = yes ; then
10210                 cat >> confdefs.h <<\EOF
10211 #define HAVE_UUID_TO_STR 1
10212 EOF
10213
10214
10215                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10216                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10217         fi
10218 fi
10219
10220 if test $have_uuid = no ; then
10221         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10222 echo "configure:10223: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10223         save_LIBS="$LIBS"
10224         LIBS="$LIBS -lrpcrt4"
10225         cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228
10229                 int __stdcall UuidCreate(void *);
10230                 int __stdcall UuidToStringA(void *,void **);
10231                 
10232 int main() {
10233
10234                 UuidCreate(0);
10235                 UuidToStringA(0,0);
10236                 
10237 ; return 0; }
10238 EOF
10239 if { (eval echo configure:10240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10240   rm -rf conftest*
10241   need_rpcrt=yes
10242 else
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -rf conftest*
10246   need_rpcrt=no
10247 fi
10248 rm -f conftest*
10249         if test $need_rpcrt = yes; then
10250                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10251         fi
10252         LIBS="$save_LIBS"
10253         echo "$ac_t""$need_rpcrt" 1>&6
10254 fi
10255
10256 ol_cv_lib_resolver=no
10257 if test $ol_cv_lib_resolver = no ; then
10258         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10259 echo "configure:10260: checking for resolver link (default)" >&5
10260 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   
10264         ol_RESOLVER_LIB=
10265         ol_LIBS=$LIBS
10266         LIBS="$ol_RESOLVER_LIB $LIBS"
10267
10268         cat > conftest.$ac_ext <<EOF
10269 #line 10270 "configure"
10270 #include "confdefs.h"
10271
10272 #ifdef HAVE_SYS_TYPES_H
10273 #       include <sys/types.h>
10274 #endif
10275 #include <netinet/in.h>
10276 #ifdef HAVE_ARPA_NAMESER_H
10277 #       include <arpa/nameser.h>
10278 #endif
10279 #ifdef HAVE_RESOLV_H
10280 #       include <resolv.h>
10281 #endif
10282
10283 int main() {
10284 {
10285         int len, status;
10286         char *request = NULL;
10287         unsigned char reply[64*1024];
10288         unsigned char host[64*1024];
10289         unsigned char *p;
10290
10291 #ifdef NS_HFIXEDSZ
10292         /* Bind 8/9 interface */
10293         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10294 #else
10295         /* Bind 4 interface */
10296 # ifndef T_SRV
10297 #  define T_SRV 33
10298 # endif
10299         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10300 #endif
10301         p = reply;
10302 #ifdef NS_HFIXEDSZ
10303         /* Bind 8/9 interface */
10304         p += NS_HFIXEDSZ;
10305 #elif defined(HFIXEDSZ)
10306         /* Bind 4 interface w/ HFIXEDSZ */
10307         p += HFIXEDSZ;
10308 #else
10309         /* Bind 4 interface w/o HFIXEDSZ */
10310         p += sizeof(HEADER);
10311 #endif
10312         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10313 }
10314 ; return 0; }
10315 EOF
10316 if { (eval echo configure:10317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10317   rm -rf conftest*
10318   ol_cv_resolver_none=yes
10319 else
10320   echo "configure: failed program was:" >&5
10321   cat conftest.$ac_ext >&5
10322   rm -rf conftest*
10323   ol_cv_resolver_none=no
10324 fi
10325 rm -f conftest*
10326
10327         LIBS="$ol_LIBS"
10328
10329 fi
10330
10331 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10332
10333         if test $ol_cv_resolver_none = yes ; then
10334                 ol_cv_lib_resolver=yes
10335         fi
10336 fi
10337
10338 if test $ol_cv_lib_resolver = no ; then
10339         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10340 echo "configure:10341: checking for resolver link (-lresolv)" >&5
10341 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10342   echo $ac_n "(cached) $ac_c" 1>&6
10343 else
10344   
10345         ol_RESOLVER_LIB=-lresolv
10346         ol_LIBS=$LIBS
10347         LIBS="$ol_RESOLVER_LIB $LIBS"
10348
10349         cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352
10353 #ifdef HAVE_SYS_TYPES_H
10354 #       include <sys/types.h>
10355 #endif
10356 #include <netinet/in.h>
10357 #ifdef HAVE_ARPA_NAMESER_H
10358 #       include <arpa/nameser.h>
10359 #endif
10360 #ifdef HAVE_RESOLV_H
10361 #       include <resolv.h>
10362 #endif
10363
10364 int main() {
10365 {
10366         int len, status;
10367         char *request = NULL;
10368         unsigned char reply[64*1024];
10369         unsigned char host[64*1024];
10370         unsigned char *p;
10371
10372 #ifdef NS_HFIXEDSZ
10373         /* Bind 8/9 interface */
10374         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10375 #else
10376         /* Bind 4 interface */
10377 # ifndef T_SRV
10378 #  define T_SRV 33
10379 # endif
10380         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10381 #endif
10382         p = reply;
10383 #ifdef NS_HFIXEDSZ
10384         /* Bind 8/9 interface */
10385         p += NS_HFIXEDSZ;
10386 #elif defined(HFIXEDSZ)
10387         /* Bind 4 interface w/ HFIXEDSZ */
10388         p += HFIXEDSZ;
10389 #else
10390         /* Bind 4 interface w/o HFIXEDSZ */
10391         p += sizeof(HEADER);
10392 #endif
10393         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10394 }
10395 ; return 0; }
10396 EOF
10397 if { (eval echo configure:10398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10398   rm -rf conftest*
10399   ol_cv_resolver_resolv=yes
10400 else
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   ol_cv_resolver_resolv=no
10405 fi
10406 rm -f conftest*
10407
10408         LIBS="$ol_LIBS"
10409
10410 fi
10411
10412 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10413
10414         if test $ol_cv_resolver_resolv = yes ; then
10415                 ol_cv_lib_resolver=-lresolv
10416         fi
10417 fi
10418
10419 if test $ol_cv_lib_resolver = no ; then
10420         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10421 echo "configure:10422: checking for resolver link (-lbind)" >&5
10422 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10423   echo $ac_n "(cached) $ac_c" 1>&6
10424 else
10425   
10426         ol_RESOLVER_LIB=-lbind
10427         ol_LIBS=$LIBS
10428         LIBS="$ol_RESOLVER_LIB $LIBS"
10429
10430         cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433
10434 #ifdef HAVE_SYS_TYPES_H
10435 #       include <sys/types.h>
10436 #endif
10437 #include <netinet/in.h>
10438 #ifdef HAVE_ARPA_NAMESER_H
10439 #       include <arpa/nameser.h>
10440 #endif
10441 #ifdef HAVE_RESOLV_H
10442 #       include <resolv.h>
10443 #endif
10444
10445 int main() {
10446 {
10447         int len, status;
10448         char *request = NULL;
10449         unsigned char reply[64*1024];
10450         unsigned char host[64*1024];
10451         unsigned char *p;
10452
10453 #ifdef NS_HFIXEDSZ
10454         /* Bind 8/9 interface */
10455         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10456 #else
10457         /* Bind 4 interface */
10458 # ifndef T_SRV
10459 #  define T_SRV 33
10460 # endif
10461         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10462 #endif
10463         p = reply;
10464 #ifdef NS_HFIXEDSZ
10465         /* Bind 8/9 interface */
10466         p += NS_HFIXEDSZ;
10467 #elif defined(HFIXEDSZ)
10468         /* Bind 4 interface w/ HFIXEDSZ */
10469         p += HFIXEDSZ;
10470 #else
10471         /* Bind 4 interface w/o HFIXEDSZ */
10472         p += sizeof(HEADER);
10473 #endif
10474         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10475 }
10476 ; return 0; }
10477 EOF
10478 if { (eval echo configure:10479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10479   rm -rf conftest*
10480   ol_cv_resolver_bind=yes
10481 else
10482   echo "configure: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   rm -rf conftest*
10485   ol_cv_resolver_bind=no
10486 fi
10487 rm -f conftest*
10488
10489         LIBS="$ol_LIBS"
10490
10491 fi
10492
10493 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10494
10495         if test $ol_cv_resolver_bind = yes ; then
10496                 ol_cv_lib_resolver=-lbind
10497         fi
10498 fi
10499
10500
10501
10502 ol_link_dnssrv=no
10503 if test "$ol_cv_lib_resolver" != no ; then
10504         cat >> confdefs.h <<\EOF
10505 #define HAVE_RES_QUERY 1
10506 EOF
10507
10508
10509         if test "$ol_enable_dnssrv" != no ; then
10510                 ol_link_dnssrv=yes
10511         fi
10512
10513         if test "$ol_cv_lib_resolver" != yes ; then
10514                 LIBS="$ol_cv_lib_resolver $LIBS"
10515         fi
10516 fi
10517
10518 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10519         if test "$ol_link_dnssrv" = no ; then
10520                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10521         fi
10522 else
10523         ol_enable_dnssrv=no
10524 fi
10525
10526 for ac_func in hstrerror 
10527 do
10528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10529 echo "configure:10530: checking for $ac_func" >&5
10530 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   cat > conftest.$ac_ext <<EOF
10534 #line 10535 "configure"
10535 #include "confdefs.h"
10536 /* System header to define __stub macros and hopefully few prototypes,
10537     which can conflict with char $ac_func(); below.  */
10538 #include <assert.h>
10539 /* Override any gcc2 internal prototype to avoid an error.  */
10540 /* We use char because int might match the return type of a gcc2
10541     builtin and then its argument prototype would still apply.  */
10542 char $ac_func();
10543 char (*f)();
10544
10545 int main() {
10546
10547 /* The GNU C library defines this for functions which it implements
10548     to always fail with ENOSYS.  Some functions are actually named
10549     something starting with __ and the normal name is an alias.  */
10550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10551 choke me
10552 #else
10553 f = $ac_func;
10554 #endif
10555
10556 ; return 0; }
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10559   rm -rf conftest*
10560   eval "ac_cv_func_$ac_func=yes"
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -rf conftest*
10565   eval "ac_cv_func_$ac_func=no"
10566 fi
10567 rm -f conftest*
10568 fi
10569
10570 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10571   echo "$ac_t""yes" 1>&6
10572     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10573   cat >> confdefs.h <<EOF
10574 #define $ac_tr_func 1
10575 EOF
10576  
10577 else
10578   echo "$ac_t""no" 1>&6
10579 fi
10580 done
10581
10582
10583 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10584 do
10585 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10586 echo "configure:10587: checking for $ac_func" >&5
10587 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10588   echo $ac_n "(cached) $ac_c" 1>&6
10589 else
10590   cat > conftest.$ac_ext <<EOF
10591 #line 10592 "configure"
10592 #include "confdefs.h"
10593 /* System header to define __stub macros and hopefully few prototypes,
10594     which can conflict with char $ac_func(); below.  */
10595 #include <assert.h>
10596 /* Override any gcc2 internal prototype to avoid an error.  */
10597 /* We use char because int might match the return type of a gcc2
10598     builtin and then its argument prototype would still apply.  */
10599 char $ac_func();
10600 char (*f)();
10601
10602 int main() {
10603
10604 /* The GNU C library defines this for functions which it implements
10605     to always fail with ENOSYS.  Some functions are actually named
10606     something starting with __ and the normal name is an alias.  */
10607 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10608 choke me
10609 #else
10610 f = $ac_func;
10611 #endif
10612
10613 ; return 0; }
10614 EOF
10615 if { (eval echo configure:10616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10616   rm -rf conftest*
10617   eval "ac_cv_func_$ac_func=yes"
10618 else
10619   echo "configure: failed program was:" >&5
10620   cat conftest.$ac_ext >&5
10621   rm -rf conftest*
10622   eval "ac_cv_func_$ac_func=no"
10623 fi
10624 rm -f conftest*
10625 fi
10626
10627 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10628   echo "$ac_t""yes" 1>&6
10629     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10630   cat >> confdefs.h <<EOF
10631 #define $ac_tr_func 1
10632 EOF
10633  
10634 else
10635   echo "$ac_t""no" 1>&6
10636 fi
10637 done
10638
10639
10640 ol_link_ipv6=no
10641 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10642         if test $ol_enable_ipv6 = yes ; then
10643                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10644         fi
10645 elif test $ol_enable_ipv6 != no ; then
10646         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10647 echo "configure:10648: checking INET6_ADDRSTRLEN" >&5
10648 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10649   echo $ac_n "(cached) $ac_c" 1>&6
10650 else
10651   
10652                 cat > conftest.$ac_ext <<EOF
10653 #line 10654 "configure"
10654 #include "confdefs.h"
10655
10656 #                       include <netinet/in.h>
10657 #                       ifdef INET6_ADDRSTRLEN
10658                                 __has_inet6_addrstrlen__;
10659 #                       endif
10660                 
10661 EOF
10662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10663   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10664   rm -rf conftest*
10665   ol_cv_inet6_addrstrlen=yes
10666 else
10667   rm -rf conftest*
10668   ol_cv_inet6_addrstrlen=no
10669 fi
10670 rm -f conftest*
10671
10672 fi
10673
10674 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10675
10676
10677         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10678 echo "configure:10679: checking struct sockaddr_storage" >&5
10679 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10680   echo $ac_n "(cached) $ac_c" 1>&6
10681 else
10682   
10683                 cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686
10687 #include <sys/types.h>
10688 #include <sys/socket.h>
10689
10690 int main() {
10691
10692                         struct sockaddr_storage ss;
10693
10694 ; return 0; }
10695 EOF
10696 if { (eval echo configure:10697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10697   rm -rf conftest*
10698   ol_cv_struct_sockaddr_storage=yes
10699 else
10700   echo "configure: failed program was:" >&5
10701   cat conftest.$ac_ext >&5
10702   rm -rf conftest*
10703   ol_cv_struct_sockaddr_storage=no
10704 fi
10705 rm -f conftest*
10706 fi
10707
10708 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10709
10710         if test $ol_cv_inet6_addrstrlen = yes \
10711                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10712                 ol_link_ipv6=yes
10713         elif test $ol_enable_ipv6 = yes \
10714                         -a $ol_cv_inet6_addrstrlen = no ; then
10715                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10716         elif test $ol_enable_ipv6 = yes \
10717                         -a $ol_cv_struct_sockaddr_storage = no ; then
10718                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10719         fi
10720 fi
10721
10722 if test $ol_enable_local != no ; then
10723         for ac_hdr in sys/un.h 
10724 do
10725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10727 echo "configure:10728: checking for $ac_hdr" >&5
10728 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10729   echo $ac_n "(cached) $ac_c" 1>&6
10730 else
10731   cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 #include <$ac_hdr>
10735 EOF
10736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10737 { (eval echo configure:10738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10739 if test -z "$ac_err"; then
10740   rm -rf conftest*
10741   eval "ac_cv_header_$ac_safe=yes"
10742 else
10743   echo "$ac_err" >&5
10744   echo "configure: failed program was:" >&5
10745   cat conftest.$ac_ext >&5
10746   rm -rf conftest*
10747   eval "ac_cv_header_$ac_safe=no"
10748 fi
10749 rm -f conftest*
10750 fi
10751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10752   echo "$ac_t""yes" 1>&6
10753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10754   cat >> confdefs.h <<EOF
10755 #define $ac_tr_hdr 1
10756 EOF
10757  
10758 else
10759   echo "$ac_t""no" 1>&6
10760 fi
10761 done
10762
10763
10764         if test $ol_enable_local = auto ; then
10765                 ol_enable_local=$ac_cv_header_sys_un_h
10766         elif test $ac_cv_header_sys_un_h = no ; then
10767                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10768         fi
10769 fi
10770
10771 ol_link_kbind=no
10772 ol_link_krb5=no
10773 ol_link_krb4=no
10774
10775 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10776         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10777         -o $ol_with_kerberos = k425 ; then
10778
10779         for ac_hdr in krb5.h
10780 do
10781 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10782 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10783 echo "configure:10784: checking for $ac_hdr" >&5
10784 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10785   echo $ac_n "(cached) $ac_c" 1>&6
10786 else
10787   cat > conftest.$ac_ext <<EOF
10788 #line 10789 "configure"
10789 #include "confdefs.h"
10790 #include <$ac_hdr>
10791 EOF
10792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10793 { (eval echo configure:10794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10795 if test -z "$ac_err"; then
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=yes"
10798 else
10799   echo "$ac_err" >&5
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_header_$ac_safe=no"
10804 fi
10805 rm -f conftest*
10806 fi
10807 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10808   echo "$ac_t""yes" 1>&6
10809     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10810   cat >> confdefs.h <<EOF
10811 #define $ac_tr_hdr 1
10812 EOF
10813  
10814 else
10815   echo "$ac_t""no" 1>&6
10816 fi
10817 done
10818
10819
10820         if test $ac_cv_header_krb5_h = yes ; then
10821                                 for ac_hdr in heim_err.h
10822 do
10823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10825 echo "configure:10826: checking for $ac_hdr" >&5
10826 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10827   echo $ac_n "(cached) $ac_c" 1>&6
10828 else
10829   cat > conftest.$ac_ext <<EOF
10830 #line 10831 "configure"
10831 #include "confdefs.h"
10832 #include <$ac_hdr>
10833 EOF
10834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10835 { (eval echo configure:10836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10837 if test -z "$ac_err"; then
10838   rm -rf conftest*
10839   eval "ac_cv_header_$ac_safe=yes"
10840 else
10841   echo "$ac_err" >&5
10842   echo "configure: failed program was:" >&5
10843   cat conftest.$ac_ext >&5
10844   rm -rf conftest*
10845   eval "ac_cv_header_$ac_safe=no"
10846 fi
10847 rm -f conftest*
10848 fi
10849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10850   echo "$ac_t""yes" 1>&6
10851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10852   cat >> confdefs.h <<EOF
10853 #define $ac_tr_hdr 1
10854 EOF
10855  
10856 else
10857   echo "$ac_t""no" 1>&6
10858 fi
10859 done
10860
10861                 if test $ac_cv_header_heim_err_h = yes ; then
10862                         krb5_impl=heimdal
10863                 else
10864                         krb5_impl=mit
10865                 fi
10866
10867                 if test $krb5_impl = mit; then
10868                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10869 echo "configure:10870: checking for main in -lk5crypto" >&5
10870 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10871 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10872   echo $ac_n "(cached) $ac_c" 1>&6
10873 else
10874   ac_save_LIBS="$LIBS"
10875 LIBS="-lk5crypto  $LIBS"
10876 cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879
10880 int main() {
10881 main()
10882 ; return 0; }
10883 EOF
10884 if { (eval echo configure:10885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10885   rm -rf conftest*
10886   eval "ac_cv_lib_$ac_lib_var=yes"
10887 else
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -rf conftest*
10891   eval "ac_cv_lib_$ac_lib_var=no"
10892 fi
10893 rm -f conftest*
10894 LIBS="$ac_save_LIBS"
10895
10896 fi
10897 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10898   echo "$ac_t""yes" 1>&6
10899   krb5crypto=k5crypto
10900 else
10901   echo "$ac_t""no" 1>&6
10902 krb5crypto=crypto
10903 fi
10904
10905
10906                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10907 echo "configure:10908: checking for main in -lkrb5" >&5
10908 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10909 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10910   echo $ac_n "(cached) $ac_c" 1>&6
10911 else
10912   ac_save_LIBS="$LIBS"
10913 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10914 cat > conftest.$ac_ext <<EOF
10915 #line 10916 "configure"
10916 #include "confdefs.h"
10917
10918 int main() {
10919 main()
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10923   rm -rf conftest*
10924   eval "ac_cv_lib_$ac_lib_var=yes"
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_lib_$ac_lib_var=no"
10930 fi
10931 rm -f conftest*
10932 LIBS="$ac_save_LIBS"
10933
10934 fi
10935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10936   echo "$ac_t""yes" 1>&6
10937   have_krb5=yes
10938                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10939 else
10940   echo "$ac_t""no" 1>&6
10941 have_krb5=no
10942 fi
10943
10944
10945                 elif test $krb5_impl = heimdal; then
10946                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10947 echo "configure:10948: checking for main in -ldes" >&5
10948 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10949 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10950   echo $ac_n "(cached) $ac_c" 1>&6
10951 else
10952   ac_save_LIBS="$LIBS"
10953 LIBS="-ldes  $LIBS"
10954 cat > conftest.$ac_ext <<EOF
10955 #line 10956 "configure"
10956 #include "confdefs.h"
10957
10958 int main() {
10959 main()
10960 ; return 0; }
10961 EOF
10962 if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10963   rm -rf conftest*
10964   eval "ac_cv_lib_$ac_lib_var=yes"
10965 else
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_lib_$ac_lib_var=no"
10970 fi
10971 rm -f conftest*
10972 LIBS="$ac_save_LIBS"
10973
10974 fi
10975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10976   echo "$ac_t""yes" 1>&6
10977   krb5crypto=des
10978 else
10979   echo "$ac_t""no" 1>&6
10980 krb5crypto=crypto
10981 fi
10982
10983
10984                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10985 echo "configure:10986: checking for main in -lkrb5" >&5
10986 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   ac_save_LIBS="$LIBS"
10991 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10992 cat > conftest.$ac_ext <<EOF
10993 #line 10994 "configure"
10994 #include "confdefs.h"
10995
10996 int main() {
10997 main()
10998 ; return 0; }
10999 EOF
11000 if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11001   rm -rf conftest*
11002   eval "ac_cv_lib_$ac_lib_var=yes"
11003 else
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -rf conftest*
11007   eval "ac_cv_lib_$ac_lib_var=no"
11008 fi
11009 rm -f conftest*
11010 LIBS="$ac_save_LIBS"
11011
11012 fi
11013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11014   echo "$ac_t""yes" 1>&6
11015   have_krb5=yes
11016                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11017 else
11018   echo "$ac_t""no" 1>&6
11019 have_krb5=no
11020 fi
11021
11022
11023                         cat >> confdefs.h <<\EOF
11024 #define HAVE_HEIMDAL_KERBEROS 1
11025 EOF
11026
11027
11028                 else
11029                         have_krb5=no
11030                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11031                 fi
11032
11033                 if test $have_krb5 = yes ; then
11034                         ol_link_krb5=yes
11035
11036                         cat >> confdefs.h <<\EOF
11037 #define HAVE_KRB5 1
11038 EOF
11039
11040
11041                         if test $ol_with_kerberos = k5only ; then
11042                                 ol_with_kerberos=found
11043                         fi
11044
11045                 elif test $ol_with_kerberos != auto ; then
11046                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11047                 fi
11048
11049         fi
11050 fi
11051
11052 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11053         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11054
11055         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11056 do
11057 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11059 echo "configure:11060: checking for $ac_hdr" >&5
11060 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11061   echo $ac_n "(cached) $ac_c" 1>&6
11062 else
11063   cat > conftest.$ac_ext <<EOF
11064 #line 11065 "configure"
11065 #include "confdefs.h"
11066 #include <$ac_hdr>
11067 EOF
11068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11069 { (eval echo configure:11070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11071 if test -z "$ac_err"; then
11072   rm -rf conftest*
11073   eval "ac_cv_header_$ac_safe=yes"
11074 else
11075   echo "$ac_err" >&5
11076   echo "configure: failed program was:" >&5
11077   cat conftest.$ac_ext >&5
11078   rm -rf conftest*
11079   eval "ac_cv_header_$ac_safe=no"
11080 fi
11081 rm -f conftest*
11082 fi
11083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11084   echo "$ac_t""yes" 1>&6
11085     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11086   cat >> confdefs.h <<EOF
11087 #define $ac_tr_hdr 1
11088 EOF
11089  
11090 else
11091   echo "$ac_t""no" 1>&6
11092 fi
11093 done
11094
11095
11096         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11097                 if test $krb5_impl = mit; then
11098                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11099 echo "configure:11100: checking for main in -lkrb4" >&5
11100 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11101 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11102   echo $ac_n "(cached) $ac_c" 1>&6
11103 else
11104   ac_save_LIBS="$LIBS"
11105 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11106 cat > conftest.$ac_ext <<EOF
11107 #line 11108 "configure"
11108 #include "confdefs.h"
11109
11110 int main() {
11111 main()
11112 ; return 0; }
11113 EOF
11114 if { (eval echo configure:11115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11115   rm -rf conftest*
11116   eval "ac_cv_lib_$ac_lib_var=yes"
11117 else
11118   echo "configure: failed program was:" >&5
11119   cat conftest.$ac_ext >&5
11120   rm -rf conftest*
11121   eval "ac_cv_lib_$ac_lib_var=no"
11122 fi
11123 rm -f conftest*
11124 LIBS="$ac_save_LIBS"
11125
11126 fi
11127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11128   echo "$ac_t""yes" 1>&6
11129   have_k425=yes
11130                                 KRB4_LIBS="-lkrb4 -ldes425"
11131 else
11132   echo "$ac_t""no" 1>&6
11133 have_k425=no
11134 fi
11135
11136
11137                 elif test $krb5_impl = heimdal; then
11138                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11139 echo "configure:11140: checking for main in -lkrb4" >&5
11140 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11141 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11142   echo $ac_n "(cached) $ac_c" 1>&6
11143 else
11144   ac_save_LIBS="$LIBS"
11145 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11146 cat > conftest.$ac_ext <<EOF
11147 #line 11148 "configure"
11148 #include "confdefs.h"
11149
11150 int main() {
11151 main()
11152 ; return 0; }
11153 EOF
11154 if { (eval echo configure:11155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11155   rm -rf conftest*
11156   eval "ac_cv_lib_$ac_lib_var=yes"
11157 else
11158   echo "configure: failed program was:" >&5
11159   cat conftest.$ac_ext >&5
11160   rm -rf conftest*
11161   eval "ac_cv_lib_$ac_lib_var=no"
11162 fi
11163 rm -f conftest*
11164 LIBS="$ac_save_LIBS"
11165
11166 fi
11167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11168   echo "$ac_t""yes" 1>&6
11169   have_k425=yes
11170                                 KRB4_LIBS="-lkrb4"
11171 else
11172   echo "$ac_t""no" 1>&6
11173 have_k425=no
11174 fi
11175
11176
11177                 else
11178                         have_425=no
11179                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11180                 fi
11181
11182                 if test $have_k425 = yes ; then
11183                         ol_with_kerberos=found
11184                         ol_link_krb4=yes
11185
11186                         cat >> confdefs.h <<\EOF
11187 #define HAVE_KRB425 1
11188 EOF
11189
11190                         cat >> confdefs.h <<\EOF
11191 #define HAVE_KRB4 1
11192 EOF
11193
11194
11195                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11196 echo "configure:11197: checking for des_debug in Kerberos libraries" >&5
11197 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11198   echo $ac_n "(cached) $ac_c" 1>&6
11199 else
11200   
11201                                                                 save_LIBS="$LIBS"
11202                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11203                                 cat > conftest.$ac_ext <<EOF
11204 #line 11205 "configure"
11205 #include "confdefs.h"
11206
11207 #include <kerberosIV/krb.h>
11208 #include <kerberosIV/des.h>
11209 extern int des_debug;
11210
11211 int main() {
11212
11213 des_debug = 1;
11214
11215 ; return 0; }
11216 EOF
11217 if { (eval echo configure:11218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11218   rm -rf conftest*
11219   ol_cv_var_des_debug=yes
11220 else
11221   echo "configure: failed program was:" >&5
11222   cat conftest.$ac_ext >&5
11223   rm -rf conftest*
11224   ol_cv_var_des_debug=no
11225 fi
11226 rm -f conftest*
11227                                                                 LIBS="$save_LIBS"
11228                         
11229 fi
11230
11231 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11232
11233                         if test $ol_cv_var_des_debug = yes ; then
11234                                 cat >> confdefs.h <<\EOF
11235 #define HAVE_DES_DEBUG 1
11236 EOF
11237
11238                         fi
11239
11240                         LIBS="$save_LIBS"
11241                 fi
11242         fi
11243 fi
11244
11245 if test $ol_link_krb5 = yes ; then
11246         ol_with_kerberos=found
11247 fi
11248
11249 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11250         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11251
11252         for ac_hdr in krb.h des.h krb-archaeology.h 
11253 do
11254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11256 echo "configure:11257: checking for $ac_hdr" >&5
11257 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11258   echo $ac_n "(cached) $ac_c" 1>&6
11259 else
11260   cat > conftest.$ac_ext <<EOF
11261 #line 11262 "configure"
11262 #include "confdefs.h"
11263 #include <$ac_hdr>
11264 EOF
11265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11266 { (eval echo configure:11267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11268 if test -z "$ac_err"; then
11269   rm -rf conftest*
11270   eval "ac_cv_header_$ac_safe=yes"
11271 else
11272   echo "$ac_err" >&5
11273   echo "configure: failed program was:" >&5
11274   cat conftest.$ac_ext >&5
11275   rm -rf conftest*
11276   eval "ac_cv_header_$ac_safe=no"
11277 fi
11278 rm -f conftest*
11279 fi
11280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11281   echo "$ac_t""yes" 1>&6
11282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11283   cat >> confdefs.h <<EOF
11284 #define $ac_tr_hdr 1
11285 EOF
11286  
11287 else
11288   echo "$ac_t""no" 1>&6
11289 fi
11290 done
11291
11292
11293         if test $ac_cv_header_krb_h = yes ; then
11294                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11295 echo "configure:11296: checking for main in -lkrb" >&5
11296 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   ac_save_LIBS="$LIBS"
11301 LIBS="-lkrb -ldes $LIBS"
11302 cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305
11306 int main() {
11307 main()
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11311   rm -rf conftest*
11312   eval "ac_cv_lib_$ac_lib_var=yes"
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   eval "ac_cv_lib_$ac_lib_var=no"
11318 fi
11319 rm -f conftest*
11320 LIBS="$ac_save_LIBS"
11321
11322 fi
11323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11324   echo "$ac_t""yes" 1>&6
11325   have_k4=yes
11326 else
11327   echo "$ac_t""no" 1>&6
11328 have_k4=no
11329 fi
11330
11331
11332                 if test $have_k4 = yes ; then
11333                         ol_with_kerberos=found
11334                         ol_link_krb4=yes
11335
11336                         cat >> confdefs.h <<\EOF
11337 #define HAVE_KRB4 1
11338 EOF
11339
11340
11341                         KRB4_LIBS="-lkrb -ldes"
11342
11343                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11344                                 cat >> confdefs.h <<\EOF
11345 #define HAVE_KTH_KERBEROS 1
11346 EOF
11347
11348                         fi
11349                 fi
11350         fi
11351 fi
11352
11353 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11354         ol_link_kbind=yes
11355
11356 elif test $ol_enable_kbind = yes ; then
11357         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11358 fi
11359
11360 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11361         cat >> confdefs.h <<\EOF
11362 #define HAVE_KERBEROS 1
11363 EOF
11364
11365
11366 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11367         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11368 fi
11369
11370         
11371 ol_link_tls=no
11372 if test $ol_with_tls != no ; then
11373         for ac_hdr in openssl/ssl.h ssl.h
11374 do
11375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11377 echo "configure:11378: checking for $ac_hdr" >&5
11378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11379   echo $ac_n "(cached) $ac_c" 1>&6
11380 else
11381   cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 #include <$ac_hdr>
11385 EOF
11386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11387 { (eval echo configure:11388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11389 if test -z "$ac_err"; then
11390   rm -rf conftest*
11391   eval "ac_cv_header_$ac_safe=yes"
11392 else
11393   echo "$ac_err" >&5
11394   echo "configure: failed program was:" >&5
11395   cat conftest.$ac_ext >&5
11396   rm -rf conftest*
11397   eval "ac_cv_header_$ac_safe=no"
11398 fi
11399 rm -f conftest*
11400 fi
11401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11402   echo "$ac_t""yes" 1>&6
11403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11404   cat >> confdefs.h <<EOF
11405 #define $ac_tr_hdr 1
11406 EOF
11407  
11408 else
11409   echo "$ac_t""no" 1>&6
11410 fi
11411 done
11412
11413
11414         if test $ac_cv_header_openssl_ssl_h = yes \
11415                 -o $ac_cv_header_ssl_h = yes ; then
11416                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11417 echo "configure:11418: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11418 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11419 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11420   echo $ac_n "(cached) $ac_c" 1>&6
11421 else
11422   ac_save_LIBS="$LIBS"
11423 LIBS="-lssl -lcrypto $LIBS"
11424 cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 /* Override any gcc2 internal prototype to avoid an error.  */
11428 /* We use char because int might match the return type of a gcc2
11429     builtin and then its argument prototype would still apply.  */
11430 char SSLeay_add_ssl_algorithms();
11431
11432 int main() {
11433 SSLeay_add_ssl_algorithms()
11434 ; return 0; }
11435 EOF
11436 if { (eval echo configure:11437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11437   rm -rf conftest*
11438   eval "ac_cv_lib_$ac_lib_var=yes"
11439 else
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   eval "ac_cv_lib_$ac_lib_var=no"
11444 fi
11445 rm -f conftest*
11446 LIBS="$ac_save_LIBS"
11447
11448 fi
11449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11450   echo "$ac_t""yes" 1>&6
11451   have_ssleay=yes
11452                         need_rsaref=no
11453 else
11454   echo "$ac_t""no" 1>&6
11455 have_ssleay=no
11456 fi
11457
11458                         
11459                 if test $have_ssleay = no ; then
11460                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11461 echo "configure:11462: checking for SSL_library_init in -lssl" >&5
11462 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11464   echo $ac_n "(cached) $ac_c" 1>&6
11465 else
11466   ac_save_LIBS="$LIBS"
11467 LIBS="-lssl -lcrypto $LIBS"
11468 cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471 /* Override any gcc2 internal prototype to avoid an error.  */
11472 /* We use char because int might match the return type of a gcc2
11473     builtin and then its argument prototype would still apply.  */
11474 char SSL_library_init();
11475
11476 int main() {
11477 SSL_library_init()
11478 ; return 0; }
11479 EOF
11480 if { (eval echo configure:11481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11481   rm -rf conftest*
11482   eval "ac_cv_lib_$ac_lib_var=yes"
11483 else
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   eval "ac_cv_lib_$ac_lib_var=no"
11488 fi
11489 rm -f conftest*
11490 LIBS="$ac_save_LIBS"
11491
11492 fi
11493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11494   echo "$ac_t""yes" 1>&6
11495   have_ssleay=yes
11496                                 need_rsaref=no
11497 else
11498   echo "$ac_t""no" 1>&6
11499 have_ssleay=no
11500 fi
11501
11502                 fi
11503
11504                 if test $have_ssleay = no ; then
11505                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11506 echo "configure:11507: checking for ssl3_accept in -lssl" >&5
11507 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11509   echo $ac_n "(cached) $ac_c" 1>&6
11510 else
11511   ac_save_LIBS="$LIBS"
11512 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11513 cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 /* Override any gcc2 internal prototype to avoid an error.  */
11517 /* We use char because int might match the return type of a gcc2
11518     builtin and then its argument prototype would still apply.  */
11519 char ssl3_accept();
11520
11521 int main() {
11522 ssl3_accept()
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   eval "ac_cv_lib_$ac_lib_var=yes"
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   eval "ac_cv_lib_$ac_lib_var=no"
11533 fi
11534 rm -f conftest*
11535 LIBS="$ac_save_LIBS"
11536
11537 fi
11538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11539   echo "$ac_t""yes" 1>&6
11540   have_ssleay=yes
11541                                 need_rsaref=yes
11542 else
11543   echo "$ac_t""no" 1>&6
11544 have_ssleay=no
11545 fi
11546
11547                 fi
11548
11549                 if test $have_ssleay = yes ; then
11550                         ol_with_tls=found
11551                         ol_link_tls=yes
11552
11553                         cat >> confdefs.h <<\EOF
11554 #define HAVE_SSLEAY 1
11555 EOF
11556
11557
11558                         if test $need_rsaref = yes; then
11559                                 cat >> confdefs.h <<\EOF
11560 #define HAVE_RSAREF 1
11561 EOF
11562
11563
11564                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11565                         else
11566                                 TLS_LIBS="-lssl -lcrypto"
11567                         fi
11568                 fi
11569                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11570 echo "configure:11571: checking OpenSSL library version (CRL checking capability)" >&5
11571 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11572   echo $ac_n "(cached) $ac_c" 1>&6
11573 else
11574   
11575         cat > conftest.$ac_ext <<EOF
11576 #line 11577 "configure"
11577 #include "confdefs.h"
11578
11579 #ifdef HAVE_OPENSSL_SSL_H
11580 #include <openssl/ssl.h>
11581 #else
11582 #include <ssl.h>
11583 #endif
11584
11585 /* Require 0.9.7d+ */
11586 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11587         char *__ssl_compat = "0.9.7d";
11588 #endif
11589         
11590 EOF
11591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11592   egrep "__ssl_compat" >/dev/null 2>&1; then
11593   rm -rf conftest*
11594   ol_cv_ssl_crl_compat=yes
11595 else
11596   rm -rf conftest*
11597   ol_cv_ssl_crl_compat=no
11598 fi
11599 rm -f conftest*
11600
11601 fi
11602
11603 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11604
11605                 if test $ol_cv_ssl_crl_compat = no ; then
11606                         ol_link_ssl=no
11607                 else 
11608                         cat >> confdefs.h <<\EOF
11609 #define HAVE_OPENSSL_CRL 1
11610 EOF
11611
11612                 fi
11613         fi
11614
11615 else
11616         echo "configure: warning: TLS data protection not supported!" 1>&2
11617 fi
11618
11619 WITH_TLS=no
11620 if test $ol_link_tls = yes ; then
11621         cat >> confdefs.h <<\EOF
11622 #define HAVE_TLS 1
11623 EOF
11624
11625         WITH_TLS=yes
11626
11627 elif test $ol_with_tls = auto ; then
11628         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11629         echo "configure: warning: TLS data protection not supported!" 1>&2
11630
11631 elif test $ol_with_tls != no ; then
11632         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11633 fi
11634
11635 if test $ol_enable_lmpasswd != no; then
11636         if test $ol_link_tls != yes ; then
11637                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11638         fi
11639
11640         cat >> confdefs.h <<\EOF
11641 #define SLAPD_LMHASH 1
11642 EOF
11643
11644 fi
11645
11646 ol_link_threads=no
11647
11648 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11649         -o $ol_with_threads = nt ; then
11650
11651         
11652         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11653 echo "configure:11654: checking for _beginthread" >&5
11654 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11655   echo $ac_n "(cached) $ac_c" 1>&6
11656 else
11657   cat > conftest.$ac_ext <<EOF
11658 #line 11659 "configure"
11659 #include "confdefs.h"
11660 /* System header to define __stub macros and hopefully few prototypes,
11661     which can conflict with char _beginthread(); below.  */
11662 #include <assert.h>
11663 /* Override any gcc2 internal prototype to avoid an error.  */
11664 /* We use char because int might match the return type of a gcc2
11665     builtin and then its argument prototype would still apply.  */
11666 char _beginthread();
11667 char (*f)();
11668
11669 int main() {
11670
11671 /* The GNU C library defines this for functions which it implements
11672     to always fail with ENOSYS.  Some functions are actually named
11673     something starting with __ and the normal name is an alias.  */
11674 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11675 choke me
11676 #else
11677 f = _beginthread;
11678 #endif
11679
11680 ; return 0; }
11681 EOF
11682 if { (eval echo configure:11683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11683   rm -rf conftest*
11684   eval "ac_cv_func__beginthread=yes"
11685 else
11686   echo "configure: failed program was:" >&5
11687   cat conftest.$ac_ext >&5
11688   rm -rf conftest*
11689   eval "ac_cv_func__beginthread=no"
11690 fi
11691 rm -f conftest*
11692 fi
11693
11694 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11695   echo "$ac_t""yes" 1>&6
11696   :
11697 else
11698   echo "$ac_t""no" 1>&6
11699 fi
11700
11701
11702         if test $ac_cv_func__beginthread = yes ; then
11703                 cat >> confdefs.h <<\EOF
11704 #define HAVE_NT_THREADS 1
11705 EOF
11706
11707                 ol_cv_nt_threads=yes
11708         fi
11709
11710
11711         if test "$ol_cv_nt_threads" = yes ; then
11712                 ol_link_threads=nt
11713                 ol_with_threads=found
11714                 ol_with_yielding_select=yes
11715
11716                 cat >> confdefs.h <<\EOF
11717 #define HAVE_NT_SERVICE_MANAGER 1
11718 EOF
11719
11720                 cat >> confdefs.h <<\EOF
11721 #define HAVE_NT_EVENT_LOG 1
11722 EOF
11723
11724         fi
11725
11726         if test $ol_with_threads = nt ; then
11727                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11728         fi
11729 fi
11730
11731 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11732         -o $ol_with_threads = posix ; then
11733
11734         for ac_hdr in pthread.h
11735 do
11736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11738 echo "configure:11739: checking for $ac_hdr" >&5
11739 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11740   echo $ac_n "(cached) $ac_c" 1>&6
11741 else
11742   cat > conftest.$ac_ext <<EOF
11743 #line 11744 "configure"
11744 #include "confdefs.h"
11745 #include <$ac_hdr>
11746 EOF
11747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11748 { (eval echo configure:11749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11750 if test -z "$ac_err"; then
11751   rm -rf conftest*
11752   eval "ac_cv_header_$ac_safe=yes"
11753 else
11754   echo "$ac_err" >&5
11755   echo "configure: failed program was:" >&5
11756   cat conftest.$ac_ext >&5
11757   rm -rf conftest*
11758   eval "ac_cv_header_$ac_safe=no"
11759 fi
11760 rm -f conftest*
11761 fi
11762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11763   echo "$ac_t""yes" 1>&6
11764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11765   cat >> confdefs.h <<EOF
11766 #define $ac_tr_hdr 1
11767 EOF
11768  
11769 else
11770   echo "$ac_t""no" 1>&6
11771 fi
11772 done
11773
11774
11775         if test $ac_cv_header_pthread_h = yes ; then
11776                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11777 echo "configure:11778: checking POSIX thread version" >&5
11778 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   
11782         cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785
11786 #               include <pthread.h>
11787         
11788 int main() {
11789
11790                 int i = PTHREAD_CREATE_JOINABLE;
11791         
11792 ; return 0; }
11793 EOF
11794 if { (eval echo configure:11795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11795   rm -rf conftest*
11796   
11797         cat > conftest.$ac_ext <<EOF
11798 #line 11799 "configure"
11799 #include "confdefs.h"
11800 #include <pthread.h>
11801 EOF
11802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11803   egrep "pthread_detach" >/dev/null 2>&1; then
11804   rm -rf conftest*
11805   ol_cv_pthread_version=10
11806 else
11807   rm -rf conftest*
11808   ol_cv_pthread_version=8
11809 fi
11810 rm -f conftest*
11811
11812 else
11813   echo "configure: failed program was:" >&5
11814   cat conftest.$ac_ext >&5
11815   rm -rf conftest*
11816   
11817         cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820
11821 #               include <pthread.h>
11822 #               ifdef PTHREAD_CREATE_UNDETACHED
11823                 draft7
11824 #               endif
11825         
11826 EOF
11827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11828   egrep "draft7" >/dev/null 2>&1; then
11829   rm -rf conftest*
11830   ol_cv_pthread_version=7
11831 else
11832   rm -rf conftest*
11833   
11834         cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837 #include <pthread.h>
11838 EOF
11839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11840   egrep "pthread_attr_init" >/dev/null 2>&1; then
11841   rm -rf conftest*
11842   ol_cv_pthread_version=6
11843 else
11844   rm -rf conftest*
11845   
11846         cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849
11850 #               include <pthread.h>
11851 #ifdef          PTHREAD_MUTEX_INITIALIZER
11852                 draft5
11853 #endif
11854         
11855 EOF
11856 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11857   egrep "draft5" >/dev/null 2>&1; then
11858   rm -rf conftest*
11859   ol_cv_pthread_version=5
11860 else
11861   rm -rf conftest*
11862   ol_cv_pthread_version=4
11863 fi
11864 rm -f conftest*
11865  
11866 fi
11867 rm -f conftest*
11868  
11869 fi
11870 rm -f conftest*
11871  
11872 fi
11873 rm -f conftest*
11874
11875 fi
11876
11877 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11878
11879
11880                 if test $ol_cv_pthread_version != 0 ; then
11881                         cat >> confdefs.h <<EOF
11882 #define HAVE_PTHREADS $ol_cv_pthread_version
11883 EOF
11884
11885                 else
11886                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11887                 fi
11888
11889                 # consider threads found
11890                 ol_with_threads=found
11891
11892                 
11893         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11894 echo "configure:11895: checking for LinuxThreads pthread.h" >&5
11895 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11896   echo $ac_n "(cached) $ac_c" 1>&6
11897 else
11898   cat > conftest.$ac_ext <<EOF
11899 #line 11900 "configure"
11900 #include "confdefs.h"
11901 #include <pthread.h>
11902 EOF
11903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11904   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11905   rm -rf conftest*
11906   ol_cv_header_linux_threads=yes
11907 else
11908   rm -rf conftest*
11909   ol_cv_header_linux_threads=no
11910 fi
11911 rm -f conftest*
11912
11913                 
11914 fi
11915
11916 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11917         if test $ol_cv_header_linux_threads = yes; then
11918                 cat >> confdefs.h <<\EOF
11919 #define HAVE_LINUX_THREADS 1
11920 EOF
11921
11922         fi
11923
11924                 
11925         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11926 echo "configure:11927: checking for GNU Pth pthread.h" >&5
11927 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11928   echo $ac_n "(cached) $ac_c" 1>&6
11929 else
11930   cat > conftest.$ac_ext <<EOF
11931 #line 11932 "configure"
11932 #include "confdefs.h"
11933 #include <pthread.h>
11934 #ifdef _POSIX_THREAD_IS_GNU_PTH
11935         __gnu_pth__;
11936 #endif
11937
11938 EOF
11939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11940   egrep "__gnu_pth__" >/dev/null 2>&1; then
11941   rm -rf conftest*
11942   ol_cv_header_gnu_pth_pthread_h=yes
11943 else
11944   rm -rf conftest*
11945   ol_cv_header_gnu_pth_pthread_h=no
11946 fi
11947 rm -f conftest*
11948
11949                 
11950 fi
11951
11952 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11953
11954
11955                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11956                         for ac_hdr in sched.h
11957 do
11958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11960 echo "configure:11961: checking for $ac_hdr" >&5
11961 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11962   echo $ac_n "(cached) $ac_c" 1>&6
11963 else
11964   cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 #include <$ac_hdr>
11968 EOF
11969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11970 { (eval echo configure:11971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11972 if test -z "$ac_err"; then
11973   rm -rf conftest*
11974   eval "ac_cv_header_$ac_safe=yes"
11975 else
11976   echo "$ac_err" >&5
11977   echo "configure: failed program was:" >&5
11978   cat conftest.$ac_ext >&5
11979   rm -rf conftest*
11980   eval "ac_cv_header_$ac_safe=no"
11981 fi
11982 rm -f conftest*
11983 fi
11984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11985   echo "$ac_t""yes" 1>&6
11986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11987   cat >> confdefs.h <<EOF
11988 #define $ac_tr_hdr 1
11989 EOF
11990  
11991 else
11992   echo "$ac_t""no" 1>&6
11993 fi
11994 done
11995
11996                 fi
11997
11998                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11999                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12000 echo "configure:12001: checking for pthread_create in default libraries" >&5
12001 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12002   echo $ac_n "(cached) $ac_c" 1>&6
12003 else
12004   
12005                 if test "$cross_compiling" = yes; then
12006   cat > conftest.$ac_ext <<EOF
12007 #line 12008 "configure"
12008 #include "confdefs.h"
12009 /* pthread test headers */
12010 #include <pthread.h>
12011 #if HAVE_PTHREADS < 7
12012 #include <errno.h>
12013 #endif
12014 #ifndef NULL
12015 #define NULL (void*)0
12016 #endif
12017
12018 static void *task(p)
12019         void *p;
12020 {
12021         return (void *) (p == NULL);
12022 }
12023
12024 int main() {
12025
12026         /* pthread test function */
12027 #ifndef PTHREAD_CREATE_DETACHED
12028 #define PTHREAD_CREATE_DETACHED 1
12029 #endif
12030         pthread_t t;
12031         int status;
12032         int detach = PTHREAD_CREATE_DETACHED;
12033
12034 #if HAVE_PTHREADS > 4
12035         /* Final pthreads */
12036         pthread_attr_t attr;
12037
12038         status = pthread_attr_init(&attr);
12039         if( status ) return status;
12040
12041 #if HAVE_PTHREADS < 7
12042         status = pthread_attr_setdetachstate(&attr, &detach);
12043         if( status < 0 ) status = errno;
12044 #else
12045         status = pthread_attr_setdetachstate(&attr, detach);
12046 #endif
12047         if( status ) return status;
12048         status = pthread_create( &t, &attr, task, NULL );
12049 #if HAVE_PTHREADS < 7
12050         if( status < 0 ) status = errno;
12051 #endif
12052         if( status ) return status;
12053 #else
12054         /* Draft 4 pthreads */
12055         status = pthread_create( &t, pthread_attr_default, task, NULL );
12056         if( status ) return errno;
12057
12058         /* give thread a chance to complete */
12059         /* it should remain joinable and hence detachable */
12060         sleep( 1 );
12061
12062         status = pthread_detach( &t );
12063         if( status ) return errno;
12064 #endif
12065
12066 #ifdef HAVE_LINUX_THREADS
12067         pthread_kill_other_threads_np();
12068 #endif
12069
12070         return 0;
12071
12072 ; return 0; }
12073 EOF
12074 if { (eval echo configure:12075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12075   rm -rf conftest*
12076   ol_cv_pthread_create=yes
12077 else
12078   echo "configure: failed program was:" >&5
12079   cat conftest.$ac_ext >&5
12080   rm -rf conftest*
12081   ol_cv_pthread_create=no
12082 fi
12083 rm -f conftest*
12084 else
12085   cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 /* pthread test headers */
12089 #include <pthread.h>
12090 #if HAVE_PTHREADS < 7
12091 #include <errno.h>
12092 #endif
12093 #ifndef NULL
12094 #define NULL (void*)0
12095 #endif
12096
12097 static void *task(p)
12098         void *p;
12099 {
12100         return (void *) (p == NULL);
12101 }
12102
12103
12104 int main(argc, argv)
12105         int argc;
12106         char **argv;
12107 {
12108
12109         /* pthread test function */
12110 #ifndef PTHREAD_CREATE_DETACHED
12111 #define PTHREAD_CREATE_DETACHED 1
12112 #endif
12113         pthread_t t;
12114         int status;
12115         int detach = PTHREAD_CREATE_DETACHED;
12116
12117 #if HAVE_PTHREADS > 4
12118         /* Final pthreads */
12119         pthread_attr_t attr;
12120
12121         status = pthread_attr_init(&attr);
12122         if( status ) return status;
12123
12124 #if HAVE_PTHREADS < 7
12125         status = pthread_attr_setdetachstate(&attr, &detach);
12126         if( status < 0 ) status = errno;
12127 #else
12128         status = pthread_attr_setdetachstate(&attr, detach);
12129 #endif
12130         if( status ) return status;
12131         status = pthread_create( &t, &attr, task, NULL );
12132 #if HAVE_PTHREADS < 7
12133         if( status < 0 ) status = errno;
12134 #endif
12135         if( status ) return status;
12136 #else
12137         /* Draft 4 pthreads */
12138         status = pthread_create( &t, pthread_attr_default, task, NULL );
12139         if( status ) return errno;
12140
12141         /* give thread a chance to complete */
12142         /* it should remain joinable and hence detachable */
12143         sleep( 1 );
12144
12145         status = pthread_detach( &t );
12146         if( status ) return errno;
12147 #endif
12148
12149 #ifdef HAVE_LINUX_THREADS
12150         pthread_kill_other_threads_np();
12151 #endif
12152
12153         return 0;
12154
12155 }
12156
12157 EOF
12158 if { (eval echo configure:12159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12159 then
12160   ol_cv_pthread_create=yes
12161 else
12162   echo "configure: failed program was:" >&5
12163   cat conftest.$ac_ext >&5
12164   rm -fr conftest*
12165   ol_cv_pthread_create=no
12166 fi
12167 rm -fr conftest*
12168 fi
12169
12170 fi
12171
12172 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12173
12174                 if test $ol_cv_pthread_create != no ; then
12175                         ol_link_threads=posix
12176                         ol_link_pthreads=""
12177                 fi
12178                 
12179                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12180 if test "$ol_link_threads" = no ; then
12181         # try -kthread
12182         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12183 echo "configure:12184: checking for pthread link with -kthread" >&5
12184 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12185   echo $ac_n "(cached) $ac_c" 1>&6
12186 else
12187   
12188                 # save the flags
12189                 ol_LIBS="$LIBS"
12190                 LIBS="-kthread $LIBS"
12191
12192                 if test "$cross_compiling" = yes; then
12193   cat > conftest.$ac_ext <<EOF
12194 #line 12195 "configure"
12195 #include "confdefs.h"
12196 /* pthread test headers */
12197 #include <pthread.h>
12198 #if HAVE_PTHREADS < 7
12199 #include <errno.h>
12200 #endif
12201 #ifndef NULL
12202 #define NULL (void*)0
12203 #endif
12204
12205 static void *task(p)
12206         void *p;
12207 {
12208         return (void *) (p == NULL);
12209 }
12210
12211 int main() {
12212
12213         /* pthread test function */
12214 #ifndef PTHREAD_CREATE_DETACHED
12215 #define PTHREAD_CREATE_DETACHED 1
12216 #endif
12217         pthread_t t;
12218         int status;
12219         int detach = PTHREAD_CREATE_DETACHED;
12220
12221 #if HAVE_PTHREADS > 4
12222         /* Final pthreads */
12223         pthread_attr_t attr;
12224
12225         status = pthread_attr_init(&attr);
12226         if( status ) return status;
12227
12228 #if HAVE_PTHREADS < 7
12229         status = pthread_attr_setdetachstate(&attr, &detach);
12230         if( status < 0 ) status = errno;
12231 #else
12232         status = pthread_attr_setdetachstate(&attr, detach);
12233 #endif
12234         if( status ) return status;
12235         status = pthread_create( &t, &attr, task, NULL );
12236 #if HAVE_PTHREADS < 7
12237         if( status < 0 ) status = errno;
12238 #endif
12239         if( status ) return status;
12240 #else
12241         /* Draft 4 pthreads */
12242         status = pthread_create( &t, pthread_attr_default, task, NULL );
12243         if( status ) return errno;
12244
12245         /* give thread a chance to complete */
12246         /* it should remain joinable and hence detachable */
12247         sleep( 1 );
12248
12249         status = pthread_detach( &t );
12250         if( status ) return errno;
12251 #endif
12252
12253 #ifdef HAVE_LINUX_THREADS
12254         pthread_kill_other_threads_np();
12255 #endif
12256
12257         return 0;
12258
12259 ; return 0; }
12260 EOF
12261 if { (eval echo configure:12262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12262   rm -rf conftest*
12263   ol_cv_pthread_kthread=yes
12264 else
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -rf conftest*
12268   ol_cv_pthread_kthread=no
12269 fi
12270 rm -f conftest*
12271 else
12272   cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275 /* pthread test headers */
12276 #include <pthread.h>
12277 #if HAVE_PTHREADS < 7
12278 #include <errno.h>
12279 #endif
12280 #ifndef NULL
12281 #define NULL (void*)0
12282 #endif
12283
12284 static void *task(p)
12285         void *p;
12286 {
12287         return (void *) (p == NULL);
12288 }
12289
12290
12291 int main(argc, argv)
12292         int argc;
12293         char **argv;
12294 {
12295
12296         /* pthread test function */
12297 #ifndef PTHREAD_CREATE_DETACHED
12298 #define PTHREAD_CREATE_DETACHED 1
12299 #endif
12300         pthread_t t;
12301         int status;
12302         int detach = PTHREAD_CREATE_DETACHED;
12303
12304 #if HAVE_PTHREADS > 4
12305         /* Final pthreads */
12306         pthread_attr_t attr;
12307
12308         status = pthread_attr_init(&attr);
12309         if( status ) return status;
12310
12311 #if HAVE_PTHREADS < 7
12312         status = pthread_attr_setdetachstate(&attr, &detach);
12313         if( status < 0 ) status = errno;
12314 #else
12315         status = pthread_attr_setdetachstate(&attr, detach);
12316 #endif
12317         if( status ) return status;
12318         status = pthread_create( &t, &attr, task, NULL );
12319 #if HAVE_PTHREADS < 7
12320         if( status < 0 ) status = errno;
12321 #endif
12322         if( status ) return status;
12323 #else
12324         /* Draft 4 pthreads */
12325         status = pthread_create( &t, pthread_attr_default, task, NULL );
12326         if( status ) return errno;
12327
12328         /* give thread a chance to complete */
12329         /* it should remain joinable and hence detachable */
12330         sleep( 1 );
12331
12332         status = pthread_detach( &t );
12333         if( status ) return errno;
12334 #endif
12335
12336 #ifdef HAVE_LINUX_THREADS
12337         pthread_kill_other_threads_np();
12338 #endif
12339
12340         return 0;
12341
12342 }
12343
12344 EOF
12345 if { (eval echo configure:12346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12346 then
12347   ol_cv_pthread_kthread=yes
12348 else
12349   echo "configure: failed program was:" >&5
12350   cat conftest.$ac_ext >&5
12351   rm -fr conftest*
12352   ol_cv_pthread_kthread=no
12353 fi
12354 rm -fr conftest*
12355 fi
12356
12357
12358                 # restore the LIBS
12359                 LIBS="$ol_LIBS"
12360         
12361 fi
12362
12363 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12364
12365         if test $ol_cv_pthread_kthread = yes ; then
12366                 ol_link_pthreads="-kthread"
12367                 ol_link_threads=posix
12368         fi
12369 fi
12370
12371                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12372 if test "$ol_link_threads" = no ; then
12373         # try -pthread
12374         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12375 echo "configure:12376: checking for pthread link with -pthread" >&5
12376 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12377   echo $ac_n "(cached) $ac_c" 1>&6
12378 else
12379   
12380                 # save the flags
12381                 ol_LIBS="$LIBS"
12382                 LIBS="-pthread $LIBS"
12383
12384                 if test "$cross_compiling" = yes; then
12385   cat > conftest.$ac_ext <<EOF
12386 #line 12387 "configure"
12387 #include "confdefs.h"
12388 /* pthread test headers */
12389 #include <pthread.h>
12390 #if HAVE_PTHREADS < 7
12391 #include <errno.h>
12392 #endif
12393 #ifndef NULL
12394 #define NULL (void*)0
12395 #endif
12396
12397 static void *task(p)
12398         void *p;
12399 {
12400         return (void *) (p == NULL);
12401 }
12402
12403 int main() {
12404
12405         /* pthread test function */
12406 #ifndef PTHREAD_CREATE_DETACHED
12407 #define PTHREAD_CREATE_DETACHED 1
12408 #endif
12409         pthread_t t;
12410         int status;
12411         int detach = PTHREAD_CREATE_DETACHED;
12412
12413 #if HAVE_PTHREADS > 4
12414         /* Final pthreads */
12415         pthread_attr_t attr;
12416
12417         status = pthread_attr_init(&attr);
12418         if( status ) return status;
12419
12420 #if HAVE_PTHREADS < 7
12421         status = pthread_attr_setdetachstate(&attr, &detach);
12422         if( status < 0 ) status = errno;
12423 #else
12424         status = pthread_attr_setdetachstate(&attr, detach);
12425 #endif
12426         if( status ) return status;
12427         status = pthread_create( &t, &attr, task, NULL );
12428 #if HAVE_PTHREADS < 7
12429         if( status < 0 ) status = errno;
12430 #endif
12431         if( status ) return status;
12432 #else
12433         /* Draft 4 pthreads */
12434         status = pthread_create( &t, pthread_attr_default, task, NULL );
12435         if( status ) return errno;
12436
12437         /* give thread a chance to complete */
12438         /* it should remain joinable and hence detachable */
12439         sleep( 1 );
12440
12441         status = pthread_detach( &t );
12442         if( status ) return errno;
12443 #endif
12444
12445 #ifdef HAVE_LINUX_THREADS
12446         pthread_kill_other_threads_np();
12447 #endif
12448
12449         return 0;
12450
12451 ; return 0; }
12452 EOF
12453 if { (eval echo configure:12454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12454   rm -rf conftest*
12455   ol_cv_pthread_pthread=yes
12456 else
12457   echo "configure: failed program was:" >&5
12458   cat conftest.$ac_ext >&5
12459   rm -rf conftest*
12460   ol_cv_pthread_pthread=no
12461 fi
12462 rm -f conftest*
12463 else
12464   cat > conftest.$ac_ext <<EOF
12465 #line 12466 "configure"
12466 #include "confdefs.h"
12467 /* pthread test headers */
12468 #include <pthread.h>
12469 #if HAVE_PTHREADS < 7
12470 #include <errno.h>
12471 #endif
12472 #ifndef NULL
12473 #define NULL (void*)0
12474 #endif
12475
12476 static void *task(p)
12477         void *p;
12478 {
12479         return (void *) (p == NULL);
12480 }
12481
12482
12483 int main(argc, argv)
12484         int argc;
12485         char **argv;
12486 {
12487
12488         /* pthread test function */
12489 #ifndef PTHREAD_CREATE_DETACHED
12490 #define PTHREAD_CREATE_DETACHED 1
12491 #endif
12492         pthread_t t;
12493         int status;
12494         int detach = PTHREAD_CREATE_DETACHED;
12495
12496 #if HAVE_PTHREADS > 4
12497         /* Final pthreads */
12498         pthread_attr_t attr;
12499
12500         status = pthread_attr_init(&attr);
12501         if( status ) return status;
12502
12503 #if HAVE_PTHREADS < 7
12504         status = pthread_attr_setdetachstate(&attr, &detach);
12505         if( status < 0 ) status = errno;
12506 #else
12507         status = pthread_attr_setdetachstate(&attr, detach);
12508 #endif
12509         if( status ) return status;
12510         status = pthread_create( &t, &attr, task, NULL );
12511 #if HAVE_PTHREADS < 7
12512         if( status < 0 ) status = errno;
12513 #endif
12514         if( status ) return status;
12515 #else
12516         /* Draft 4 pthreads */
12517         status = pthread_create( &t, pthread_attr_default, task, NULL );
12518         if( status ) return errno;
12519
12520         /* give thread a chance to complete */
12521         /* it should remain joinable and hence detachable */
12522         sleep( 1 );
12523
12524         status = pthread_detach( &t );
12525         if( status ) return errno;
12526 #endif
12527
12528 #ifdef HAVE_LINUX_THREADS
12529         pthread_kill_other_threads_np();
12530 #endif
12531
12532         return 0;
12533
12534 }
12535
12536 EOF
12537 if { (eval echo configure:12538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12538 then
12539   ol_cv_pthread_pthread=yes
12540 else
12541   echo "configure: failed program was:" >&5
12542   cat conftest.$ac_ext >&5
12543   rm -fr conftest*
12544   ol_cv_pthread_pthread=no
12545 fi
12546 rm -fr conftest*
12547 fi
12548
12549
12550                 # restore the LIBS
12551                 LIBS="$ol_LIBS"
12552         
12553 fi
12554
12555 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12556
12557         if test $ol_cv_pthread_pthread = yes ; then
12558                 ol_link_pthreads="-pthread"
12559                 ol_link_threads=posix
12560         fi
12561 fi
12562
12563                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12564 if test "$ol_link_threads" = no ; then
12565         # try -pthreads
12566         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12567 echo "configure:12568: checking for pthread link with -pthreads" >&5
12568 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12569   echo $ac_n "(cached) $ac_c" 1>&6
12570 else
12571   
12572                 # save the flags
12573                 ol_LIBS="$LIBS"
12574                 LIBS="-pthreads $LIBS"
12575
12576                 if test "$cross_compiling" = yes; then
12577   cat > conftest.$ac_ext <<EOF
12578 #line 12579 "configure"
12579 #include "confdefs.h"
12580 /* pthread test headers */
12581 #include <pthread.h>
12582 #if HAVE_PTHREADS < 7
12583 #include <errno.h>
12584 #endif
12585 #ifndef NULL
12586 #define NULL (void*)0
12587 #endif
12588
12589 static void *task(p)
12590         void *p;
12591 {
12592         return (void *) (p == NULL);
12593 }
12594
12595 int main() {
12596
12597         /* pthread test function */
12598 #ifndef PTHREAD_CREATE_DETACHED
12599 #define PTHREAD_CREATE_DETACHED 1
12600 #endif
12601         pthread_t t;
12602         int status;
12603         int detach = PTHREAD_CREATE_DETACHED;
12604
12605 #if HAVE_PTHREADS > 4
12606         /* Final pthreads */
12607         pthread_attr_t attr;
12608
12609         status = pthread_attr_init(&attr);
12610         if( status ) return status;
12611
12612 #if HAVE_PTHREADS < 7
12613         status = pthread_attr_setdetachstate(&attr, &detach);
12614         if( status < 0 ) status = errno;
12615 #else
12616         status = pthread_attr_setdetachstate(&attr, detach);
12617 #endif
12618         if( status ) return status;
12619         status = pthread_create( &t, &attr, task, NULL );
12620 #if HAVE_PTHREADS < 7
12621         if( status < 0 ) status = errno;
12622 #endif
12623         if( status ) return status;
12624 #else
12625         /* Draft 4 pthreads */
12626         status = pthread_create( &t, pthread_attr_default, task, NULL );
12627         if( status ) return errno;
12628
12629         /* give thread a chance to complete */
12630         /* it should remain joinable and hence detachable */
12631         sleep( 1 );
12632
12633         status = pthread_detach( &t );
12634         if( status ) return errno;
12635 #endif
12636
12637 #ifdef HAVE_LINUX_THREADS
12638         pthread_kill_other_threads_np();
12639 #endif
12640
12641         return 0;
12642
12643 ; return 0; }
12644 EOF
12645 if { (eval echo configure:12646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12646   rm -rf conftest*
12647   ol_cv_pthread_pthreads=yes
12648 else
12649   echo "configure: failed program was:" >&5
12650   cat conftest.$ac_ext >&5
12651   rm -rf conftest*
12652   ol_cv_pthread_pthreads=no
12653 fi
12654 rm -f conftest*
12655 else
12656   cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 /* pthread test headers */
12660 #include <pthread.h>
12661 #if HAVE_PTHREADS < 7
12662 #include <errno.h>
12663 #endif
12664 #ifndef NULL
12665 #define NULL (void*)0
12666 #endif
12667
12668 static void *task(p)
12669         void *p;
12670 {
12671         return (void *) (p == NULL);
12672 }
12673
12674
12675 int main(argc, argv)
12676         int argc;
12677         char **argv;
12678 {
12679
12680         /* pthread test function */
12681 #ifndef PTHREAD_CREATE_DETACHED
12682 #define PTHREAD_CREATE_DETACHED 1
12683 #endif
12684         pthread_t t;
12685         int status;
12686         int detach = PTHREAD_CREATE_DETACHED;
12687
12688 #if HAVE_PTHREADS > 4
12689         /* Final pthreads */
12690         pthread_attr_t attr;
12691
12692         status = pthread_attr_init(&attr);
12693         if( status ) return status;
12694
12695 #if HAVE_PTHREADS < 7
12696         status = pthread_attr_setdetachstate(&attr, &detach);
12697         if( status < 0 ) status = errno;
12698 #else
12699         status = pthread_attr_setdetachstate(&attr, detach);
12700 #endif
12701         if( status ) return status;
12702         status = pthread_create( &t, &attr, task, NULL );
12703 #if HAVE_PTHREADS < 7
12704         if( status < 0 ) status = errno;
12705 #endif
12706         if( status ) return status;
12707 #else
12708         /* Draft 4 pthreads */
12709         status = pthread_create( &t, pthread_attr_default, task, NULL );
12710         if( status ) return errno;
12711
12712         /* give thread a chance to complete */
12713         /* it should remain joinable and hence detachable */
12714         sleep( 1 );
12715
12716         status = pthread_detach( &t );
12717         if( status ) return errno;
12718 #endif
12719
12720 #ifdef HAVE_LINUX_THREADS
12721         pthread_kill_other_threads_np();
12722 #endif
12723
12724         return 0;
12725
12726 }
12727
12728 EOF
12729 if { (eval echo configure:12730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12730 then
12731   ol_cv_pthread_pthreads=yes
12732 else
12733   echo "configure: failed program was:" >&5
12734   cat conftest.$ac_ext >&5
12735   rm -fr conftest*
12736   ol_cv_pthread_pthreads=no
12737 fi
12738 rm -fr conftest*
12739 fi
12740
12741
12742                 # restore the LIBS
12743                 LIBS="$ol_LIBS"
12744         
12745 fi
12746
12747 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12748
12749         if test $ol_cv_pthread_pthreads = yes ; then
12750                 ol_link_pthreads="-pthreads"
12751                 ol_link_threads=posix
12752         fi
12753 fi
12754
12755                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12756 if test "$ol_link_threads" = no ; then
12757         # try -mthreads
12758         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12759 echo "configure:12760: checking for pthread link with -mthreads" >&5
12760 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12761   echo $ac_n "(cached) $ac_c" 1>&6
12762 else
12763   
12764                 # save the flags
12765                 ol_LIBS="$LIBS"
12766                 LIBS="-mthreads $LIBS"
12767
12768                 if test "$cross_compiling" = yes; then
12769   cat > conftest.$ac_ext <<EOF
12770 #line 12771 "configure"
12771 #include "confdefs.h"
12772 /* pthread test headers */
12773 #include <pthread.h>
12774 #if HAVE_PTHREADS < 7
12775 #include <errno.h>
12776 #endif
12777 #ifndef NULL
12778 #define NULL (void*)0
12779 #endif
12780
12781 static void *task(p)
12782         void *p;
12783 {
12784         return (void *) (p == NULL);
12785 }
12786
12787 int main() {
12788
12789         /* pthread test function */
12790 #ifndef PTHREAD_CREATE_DETACHED
12791 #define PTHREAD_CREATE_DETACHED 1
12792 #endif
12793         pthread_t t;
12794         int status;
12795         int detach = PTHREAD_CREATE_DETACHED;
12796
12797 #if HAVE_PTHREADS > 4
12798         /* Final pthreads */
12799         pthread_attr_t attr;
12800
12801         status = pthread_attr_init(&attr);
12802         if( status ) return status;
12803
12804 #if HAVE_PTHREADS < 7
12805         status = pthread_attr_setdetachstate(&attr, &detach);
12806         if( status < 0 ) status = errno;
12807 #else
12808         status = pthread_attr_setdetachstate(&attr, detach);
12809 #endif
12810         if( status ) return status;
12811         status = pthread_create( &t, &attr, task, NULL );
12812 #if HAVE_PTHREADS < 7
12813         if( status < 0 ) status = errno;
12814 #endif
12815         if( status ) return status;
12816 #else
12817         /* Draft 4 pthreads */
12818         status = pthread_create( &t, pthread_attr_default, task, NULL );
12819         if( status ) return errno;
12820
12821         /* give thread a chance to complete */
12822         /* it should remain joinable and hence detachable */
12823         sleep( 1 );
12824
12825         status = pthread_detach( &t );
12826         if( status ) return errno;
12827 #endif
12828
12829 #ifdef HAVE_LINUX_THREADS
12830         pthread_kill_other_threads_np();
12831 #endif
12832
12833         return 0;
12834
12835 ; return 0; }
12836 EOF
12837 if { (eval echo configure:12838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12838   rm -rf conftest*
12839   ol_cv_pthread_mthreads=yes
12840 else
12841   echo "configure: failed program was:" >&5
12842   cat conftest.$ac_ext >&5
12843   rm -rf conftest*
12844   ol_cv_pthread_mthreads=no
12845 fi
12846 rm -f conftest*
12847 else
12848   cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 /* pthread test headers */
12852 #include <pthread.h>
12853 #if HAVE_PTHREADS < 7
12854 #include <errno.h>
12855 #endif
12856 #ifndef NULL
12857 #define NULL (void*)0
12858 #endif
12859
12860 static void *task(p)
12861         void *p;
12862 {
12863         return (void *) (p == NULL);
12864 }
12865
12866
12867 int main(argc, argv)
12868         int argc;
12869         char **argv;
12870 {
12871
12872         /* pthread test function */
12873 #ifndef PTHREAD_CREATE_DETACHED
12874 #define PTHREAD_CREATE_DETACHED 1
12875 #endif
12876         pthread_t t;
12877         int status;
12878         int detach = PTHREAD_CREATE_DETACHED;
12879
12880 #if HAVE_PTHREADS > 4
12881         /* Final pthreads */
12882         pthread_attr_t attr;
12883
12884         status = pthread_attr_init(&attr);
12885         if( status ) return status;
12886
12887 #if HAVE_PTHREADS < 7
12888         status = pthread_attr_setdetachstate(&attr, &detach);
12889         if( status < 0 ) status = errno;
12890 #else
12891         status = pthread_attr_setdetachstate(&attr, detach);
12892 #endif
12893         if( status ) return status;
12894         status = pthread_create( &t, &attr, task, NULL );
12895 #if HAVE_PTHREADS < 7
12896         if( status < 0 ) status = errno;
12897 #endif
12898         if( status ) return status;
12899 #else
12900         /* Draft 4 pthreads */
12901         status = pthread_create( &t, pthread_attr_default, task, NULL );
12902         if( status ) return errno;
12903
12904         /* give thread a chance to complete */
12905         /* it should remain joinable and hence detachable */
12906         sleep( 1 );
12907
12908         status = pthread_detach( &t );
12909         if( status ) return errno;
12910 #endif
12911
12912 #ifdef HAVE_LINUX_THREADS
12913         pthread_kill_other_threads_np();
12914 #endif
12915
12916         return 0;
12917
12918 }
12919
12920 EOF
12921 if { (eval echo configure:12922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12922 then
12923   ol_cv_pthread_mthreads=yes
12924 else
12925   echo "configure: failed program was:" >&5
12926   cat conftest.$ac_ext >&5
12927   rm -fr conftest*
12928   ol_cv_pthread_mthreads=no
12929 fi
12930 rm -fr conftest*
12931 fi
12932
12933
12934                 # restore the LIBS
12935                 LIBS="$ol_LIBS"
12936         
12937 fi
12938
12939 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12940
12941         if test $ol_cv_pthread_mthreads = yes ; then
12942                 ol_link_pthreads="-mthreads"
12943                 ol_link_threads=posix
12944         fi
12945 fi
12946
12947                 # Pthread try link: -thread (ol_cv_pthread_thread)
12948 if test "$ol_link_threads" = no ; then
12949         # try -thread
12950         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12951 echo "configure:12952: checking for pthread link with -thread" >&5
12952 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12953   echo $ac_n "(cached) $ac_c" 1>&6
12954 else
12955   
12956                 # save the flags
12957                 ol_LIBS="$LIBS"
12958                 LIBS="-thread $LIBS"
12959
12960                 if test "$cross_compiling" = yes; then
12961   cat > conftest.$ac_ext <<EOF
12962 #line 12963 "configure"
12963 #include "confdefs.h"
12964 /* pthread test headers */
12965 #include <pthread.h>
12966 #if HAVE_PTHREADS < 7
12967 #include <errno.h>
12968 #endif
12969 #ifndef NULL
12970 #define NULL (void*)0
12971 #endif
12972
12973 static void *task(p)
12974         void *p;
12975 {
12976         return (void *) (p == NULL);
12977 }
12978
12979 int main() {
12980
12981         /* pthread test function */
12982 #ifndef PTHREAD_CREATE_DETACHED
12983 #define PTHREAD_CREATE_DETACHED 1
12984 #endif
12985         pthread_t t;
12986         int status;
12987         int detach = PTHREAD_CREATE_DETACHED;
12988
12989 #if HAVE_PTHREADS > 4
12990         /* Final pthreads */
12991         pthread_attr_t attr;
12992
12993         status = pthread_attr_init(&attr);
12994         if( status ) return status;
12995
12996 #if HAVE_PTHREADS < 7
12997         status = pthread_attr_setdetachstate(&attr, &detach);
12998         if( status < 0 ) status = errno;
12999 #else
13000         status = pthread_attr_setdetachstate(&attr, detach);
13001 #endif
13002         if( status ) return status;
13003         status = pthread_create( &t, &attr, task, NULL );
13004 #if HAVE_PTHREADS < 7
13005         if( status < 0 ) status = errno;
13006 #endif
13007         if( status ) return status;
13008 #else
13009         /* Draft 4 pthreads */
13010         status = pthread_create( &t, pthread_attr_default, task, NULL );
13011         if( status ) return errno;
13012
13013         /* give thread a chance to complete */
13014         /* it should remain joinable and hence detachable */
13015         sleep( 1 );
13016
13017         status = pthread_detach( &t );
13018         if( status ) return errno;
13019 #endif
13020
13021 #ifdef HAVE_LINUX_THREADS
13022         pthread_kill_other_threads_np();
13023 #endif
13024
13025         return 0;
13026
13027 ; return 0; }
13028 EOF
13029 if { (eval echo configure:13030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13030   rm -rf conftest*
13031   ol_cv_pthread_thread=yes
13032 else
13033   echo "configure: failed program was:" >&5
13034   cat conftest.$ac_ext >&5
13035   rm -rf conftest*
13036   ol_cv_pthread_thread=no
13037 fi
13038 rm -f conftest*
13039 else
13040   cat > conftest.$ac_ext <<EOF
13041 #line 13042 "configure"
13042 #include "confdefs.h"
13043 /* pthread test headers */
13044 #include <pthread.h>
13045 #if HAVE_PTHREADS < 7
13046 #include <errno.h>
13047 #endif
13048 #ifndef NULL
13049 #define NULL (void*)0
13050 #endif
13051
13052 static void *task(p)
13053         void *p;
13054 {
13055         return (void *) (p == NULL);
13056 }
13057
13058
13059 int main(argc, argv)
13060         int argc;
13061         char **argv;
13062 {
13063
13064         /* pthread test function */
13065 #ifndef PTHREAD_CREATE_DETACHED
13066 #define PTHREAD_CREATE_DETACHED 1
13067 #endif
13068         pthread_t t;
13069         int status;
13070         int detach = PTHREAD_CREATE_DETACHED;
13071
13072 #if HAVE_PTHREADS > 4
13073         /* Final pthreads */
13074         pthread_attr_t attr;
13075
13076         status = pthread_attr_init(&attr);
13077         if( status ) return status;
13078
13079 #if HAVE_PTHREADS < 7
13080         status = pthread_attr_setdetachstate(&attr, &detach);
13081         if( status < 0 ) status = errno;
13082 #else
13083         status = pthread_attr_setdetachstate(&attr, detach);
13084 #endif
13085         if( status ) return status;
13086         status = pthread_create( &t, &attr, task, NULL );
13087 #if HAVE_PTHREADS < 7
13088         if( status < 0 ) status = errno;
13089 #endif
13090         if( status ) return status;
13091 #else
13092         /* Draft 4 pthreads */
13093         status = pthread_create( &t, pthread_attr_default, task, NULL );
13094         if( status ) return errno;
13095
13096         /* give thread a chance to complete */
13097         /* it should remain joinable and hence detachable */
13098         sleep( 1 );
13099
13100         status = pthread_detach( &t );
13101         if( status ) return errno;
13102 #endif
13103
13104 #ifdef HAVE_LINUX_THREADS
13105         pthread_kill_other_threads_np();
13106 #endif
13107
13108         return 0;
13109
13110 }
13111
13112 EOF
13113 if { (eval echo configure:13114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13114 then
13115   ol_cv_pthread_thread=yes
13116 else
13117   echo "configure: failed program was:" >&5
13118   cat conftest.$ac_ext >&5
13119   rm -fr conftest*
13120   ol_cv_pthread_thread=no
13121 fi
13122 rm -fr conftest*
13123 fi
13124
13125
13126                 # restore the LIBS
13127                 LIBS="$ol_LIBS"
13128         
13129 fi
13130
13131 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13132
13133         if test $ol_cv_pthread_thread = yes ; then
13134                 ol_link_pthreads="-thread"
13135                 ol_link_threads=posix
13136         fi
13137 fi
13138
13139
13140                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13141 if test "$ol_link_threads" = no ; then
13142         # try -lpthread -lmach -lexc -lc_r
13143         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13144 echo "configure:13145: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13145 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13146   echo $ac_n "(cached) $ac_c" 1>&6
13147 else
13148   
13149                 # save the flags
13150                 ol_LIBS="$LIBS"
13151                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13152
13153                 if test "$cross_compiling" = yes; then
13154   cat > conftest.$ac_ext <<EOF
13155 #line 13156 "configure"
13156 #include "confdefs.h"
13157 /* pthread test headers */
13158 #include <pthread.h>
13159 #if HAVE_PTHREADS < 7
13160 #include <errno.h>
13161 #endif
13162 #ifndef NULL
13163 #define NULL (void*)0
13164 #endif
13165
13166 static void *task(p)
13167         void *p;
13168 {
13169         return (void *) (p == NULL);
13170 }
13171
13172 int main() {
13173
13174         /* pthread test function */
13175 #ifndef PTHREAD_CREATE_DETACHED
13176 #define PTHREAD_CREATE_DETACHED 1
13177 #endif
13178         pthread_t t;
13179         int status;
13180         int detach = PTHREAD_CREATE_DETACHED;
13181
13182 #if HAVE_PTHREADS > 4
13183         /* Final pthreads */
13184         pthread_attr_t attr;
13185
13186         status = pthread_attr_init(&attr);
13187         if( status ) return status;
13188
13189 #if HAVE_PTHREADS < 7
13190         status = pthread_attr_setdetachstate(&attr, &detach);
13191         if( status < 0 ) status = errno;
13192 #else
13193         status = pthread_attr_setdetachstate(&attr, detach);
13194 #endif
13195         if( status ) return status;
13196         status = pthread_create( &t, &attr, task, NULL );
13197 #if HAVE_PTHREADS < 7
13198         if( status < 0 ) status = errno;
13199 #endif
13200         if( status ) return status;
13201 #else
13202         /* Draft 4 pthreads */
13203         status = pthread_create( &t, pthread_attr_default, task, NULL );
13204         if( status ) return errno;
13205
13206         /* give thread a chance to complete */
13207         /* it should remain joinable and hence detachable */
13208         sleep( 1 );
13209
13210         status = pthread_detach( &t );
13211         if( status ) return errno;
13212 #endif
13213
13214 #ifdef HAVE_LINUX_THREADS
13215         pthread_kill_other_threads_np();
13216 #endif
13217
13218         return 0;
13219
13220 ; return 0; }
13221 EOF
13222 if { (eval echo configure:13223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13223   rm -rf conftest*
13224   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13225 else
13226   echo "configure: failed program was:" >&5
13227   cat conftest.$ac_ext >&5
13228   rm -rf conftest*
13229   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13230 fi
13231 rm -f conftest*
13232 else
13233   cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236 /* pthread test headers */
13237 #include <pthread.h>
13238 #if HAVE_PTHREADS < 7
13239 #include <errno.h>
13240 #endif
13241 #ifndef NULL
13242 #define NULL (void*)0
13243 #endif
13244
13245 static void *task(p)
13246         void *p;
13247 {
13248         return (void *) (p == NULL);
13249 }
13250
13251
13252 int main(argc, argv)
13253         int argc;
13254         char **argv;
13255 {
13256
13257         /* pthread test function */
13258 #ifndef PTHREAD_CREATE_DETACHED
13259 #define PTHREAD_CREATE_DETACHED 1
13260 #endif
13261         pthread_t t;
13262         int status;
13263         int detach = PTHREAD_CREATE_DETACHED;
13264
13265 #if HAVE_PTHREADS > 4
13266         /* Final pthreads */
13267         pthread_attr_t attr;
13268
13269         status = pthread_attr_init(&attr);
13270         if( status ) return status;
13271
13272 #if HAVE_PTHREADS < 7
13273         status = pthread_attr_setdetachstate(&attr, &detach);
13274         if( status < 0 ) status = errno;
13275 #else
13276         status = pthread_attr_setdetachstate(&attr, detach);
13277 #endif
13278         if( status ) return status;
13279         status = pthread_create( &t, &attr, task, NULL );
13280 #if HAVE_PTHREADS < 7
13281         if( status < 0 ) status = errno;
13282 #endif
13283         if( status ) return status;
13284 #else
13285         /* Draft 4 pthreads */
13286         status = pthread_create( &t, pthread_attr_default, task, NULL );
13287         if( status ) return errno;
13288
13289         /* give thread a chance to complete */
13290         /* it should remain joinable and hence detachable */
13291         sleep( 1 );
13292
13293         status = pthread_detach( &t );
13294         if( status ) return errno;
13295 #endif
13296
13297 #ifdef HAVE_LINUX_THREADS
13298         pthread_kill_other_threads_np();
13299 #endif
13300
13301         return 0;
13302
13303 }
13304
13305 EOF
13306 if { (eval echo configure:13307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13307 then
13308   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13309 else
13310   echo "configure: failed program was:" >&5
13311   cat conftest.$ac_ext >&5
13312   rm -fr conftest*
13313   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13314 fi
13315 rm -fr conftest*
13316 fi
13317
13318
13319                 # restore the LIBS
13320                 LIBS="$ol_LIBS"
13321         
13322 fi
13323
13324 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13325
13326         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13327                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13328                 ol_link_threads=posix
13329         fi
13330 fi
13331
13332                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13333 if test "$ol_link_threads" = no ; then
13334         # try -lpthread -lmach -lexc
13335         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13336 echo "configure:13337: checking for pthread link with -lpthread -lmach -lexc" >&5
13337 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13338   echo $ac_n "(cached) $ac_c" 1>&6
13339 else
13340   
13341                 # save the flags
13342                 ol_LIBS="$LIBS"
13343                 LIBS="-lpthread -lmach -lexc $LIBS"
13344
13345                 if test "$cross_compiling" = yes; then
13346   cat > conftest.$ac_ext <<EOF
13347 #line 13348 "configure"
13348 #include "confdefs.h"
13349 /* pthread test headers */
13350 #include <pthread.h>
13351 #if HAVE_PTHREADS < 7
13352 #include <errno.h>
13353 #endif
13354 #ifndef NULL
13355 #define NULL (void*)0
13356 #endif
13357
13358 static void *task(p)
13359         void *p;
13360 {
13361         return (void *) (p == NULL);
13362 }
13363
13364 int main() {
13365
13366         /* pthread test function */
13367 #ifndef PTHREAD_CREATE_DETACHED
13368 #define PTHREAD_CREATE_DETACHED 1
13369 #endif
13370         pthread_t t;
13371         int status;
13372         int detach = PTHREAD_CREATE_DETACHED;
13373
13374 #if HAVE_PTHREADS > 4
13375         /* Final pthreads */
13376         pthread_attr_t attr;
13377
13378         status = pthread_attr_init(&attr);
13379         if( status ) return status;
13380
13381 #if HAVE_PTHREADS < 7
13382         status = pthread_attr_setdetachstate(&attr, &detach);
13383         if( status < 0 ) status = errno;
13384 #else
13385         status = pthread_attr_setdetachstate(&attr, detach);
13386 #endif
13387         if( status ) return status;
13388         status = pthread_create( &t, &attr, task, NULL );
13389 #if HAVE_PTHREADS < 7
13390         if( status < 0 ) status = errno;
13391 #endif
13392         if( status ) return status;
13393 #else
13394         /* Draft 4 pthreads */
13395         status = pthread_create( &t, pthread_attr_default, task, NULL );
13396         if( status ) return errno;
13397
13398         /* give thread a chance to complete */
13399         /* it should remain joinable and hence detachable */
13400         sleep( 1 );
13401
13402         status = pthread_detach( &t );
13403         if( status ) return errno;
13404 #endif
13405
13406 #ifdef HAVE_LINUX_THREADS
13407         pthread_kill_other_threads_np();
13408 #endif
13409
13410         return 0;
13411
13412 ; return 0; }
13413 EOF
13414 if { (eval echo configure:13415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13415   rm -rf conftest*
13416   ol_cv_pthread_lpthread_lmach_lexc=yes
13417 else
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   ol_cv_pthread_lpthread_lmach_lexc=no
13422 fi
13423 rm -f conftest*
13424 else
13425   cat > conftest.$ac_ext <<EOF
13426 #line 13427 "configure"
13427 #include "confdefs.h"
13428 /* pthread test headers */
13429 #include <pthread.h>
13430 #if HAVE_PTHREADS < 7
13431 #include <errno.h>
13432 #endif
13433 #ifndef NULL
13434 #define NULL (void*)0
13435 #endif
13436
13437 static void *task(p)
13438         void *p;
13439 {
13440         return (void *) (p == NULL);
13441 }
13442
13443
13444 int main(argc, argv)
13445         int argc;
13446         char **argv;
13447 {
13448
13449         /* pthread test function */
13450 #ifndef PTHREAD_CREATE_DETACHED
13451 #define PTHREAD_CREATE_DETACHED 1
13452 #endif
13453         pthread_t t;
13454         int status;
13455         int detach = PTHREAD_CREATE_DETACHED;
13456
13457 #if HAVE_PTHREADS > 4
13458         /* Final pthreads */
13459         pthread_attr_t attr;
13460
13461         status = pthread_attr_init(&attr);
13462         if( status ) return status;
13463
13464 #if HAVE_PTHREADS < 7
13465         status = pthread_attr_setdetachstate(&attr, &detach);
13466         if( status < 0 ) status = errno;
13467 #else
13468         status = pthread_attr_setdetachstate(&attr, detach);
13469 #endif
13470         if( status ) return status;
13471         status = pthread_create( &t, &attr, task, NULL );
13472 #if HAVE_PTHREADS < 7
13473         if( status < 0 ) status = errno;
13474 #endif
13475         if( status ) return status;
13476 #else
13477         /* Draft 4 pthreads */
13478         status = pthread_create( &t, pthread_attr_default, task, NULL );
13479         if( status ) return errno;
13480
13481         /* give thread a chance to complete */
13482         /* it should remain joinable and hence detachable */
13483         sleep( 1 );
13484
13485         status = pthread_detach( &t );
13486         if( status ) return errno;
13487 #endif
13488
13489 #ifdef HAVE_LINUX_THREADS
13490         pthread_kill_other_threads_np();
13491 #endif
13492
13493         return 0;
13494
13495 }
13496
13497 EOF
13498 if { (eval echo configure:13499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13499 then
13500   ol_cv_pthread_lpthread_lmach_lexc=yes
13501 else
13502   echo "configure: failed program was:" >&5
13503   cat conftest.$ac_ext >&5
13504   rm -fr conftest*
13505   ol_cv_pthread_lpthread_lmach_lexc=no
13506 fi
13507 rm -fr conftest*
13508 fi
13509
13510
13511                 # restore the LIBS
13512                 LIBS="$ol_LIBS"
13513         
13514 fi
13515
13516 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13517
13518         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13519                 ol_link_pthreads="-lpthread -lmach -lexc"
13520                 ol_link_threads=posix
13521         fi
13522 fi
13523
13524
13525                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13526 if test "$ol_link_threads" = no ; then
13527         # try -lpthread -Wl,-woff,85
13528         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13529 echo "configure:13530: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13530 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13531   echo $ac_n "(cached) $ac_c" 1>&6
13532 else
13533   
13534                 # save the flags
13535                 ol_LIBS="$LIBS"
13536                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13537
13538                 if test "$cross_compiling" = yes; then
13539   cat > conftest.$ac_ext <<EOF
13540 #line 13541 "configure"
13541 #include "confdefs.h"
13542 /* pthread test headers */
13543 #include <pthread.h>
13544 #if HAVE_PTHREADS < 7
13545 #include <errno.h>
13546 #endif
13547 #ifndef NULL
13548 #define NULL (void*)0
13549 #endif
13550
13551 static void *task(p)
13552         void *p;
13553 {
13554         return (void *) (p == NULL);
13555 }
13556
13557 int main() {
13558
13559         /* pthread test function */
13560 #ifndef PTHREAD_CREATE_DETACHED
13561 #define PTHREAD_CREATE_DETACHED 1
13562 #endif
13563         pthread_t t;
13564         int status;
13565         int detach = PTHREAD_CREATE_DETACHED;
13566
13567 #if HAVE_PTHREADS > 4
13568         /* Final pthreads */
13569         pthread_attr_t attr;
13570
13571         status = pthread_attr_init(&attr);
13572         if( status ) return status;
13573
13574 #if HAVE_PTHREADS < 7
13575         status = pthread_attr_setdetachstate(&attr, &detach);
13576         if( status < 0 ) status = errno;
13577 #else
13578         status = pthread_attr_setdetachstate(&attr, detach);
13579 #endif
13580         if( status ) return status;
13581         status = pthread_create( &t, &attr, task, NULL );
13582 #if HAVE_PTHREADS < 7
13583         if( status < 0 ) status = errno;
13584 #endif
13585         if( status ) return status;
13586 #else
13587         /* Draft 4 pthreads */
13588         status = pthread_create( &t, pthread_attr_default, task, NULL );
13589         if( status ) return errno;
13590
13591         /* give thread a chance to complete */
13592         /* it should remain joinable and hence detachable */
13593         sleep( 1 );
13594
13595         status = pthread_detach( &t );
13596         if( status ) return errno;
13597 #endif
13598
13599 #ifdef HAVE_LINUX_THREADS
13600         pthread_kill_other_threads_np();
13601 #endif
13602
13603         return 0;
13604
13605 ; return 0; }
13606 EOF
13607 if { (eval echo configure:13608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13608   rm -rf conftest*
13609   ol_cv_pthread_lib_lpthread_woff=yes
13610 else
13611   echo "configure: failed program was:" >&5
13612   cat conftest.$ac_ext >&5
13613   rm -rf conftest*
13614   ol_cv_pthread_lib_lpthread_woff=no
13615 fi
13616 rm -f conftest*
13617 else
13618   cat > conftest.$ac_ext <<EOF
13619 #line 13620 "configure"
13620 #include "confdefs.h"
13621 /* pthread test headers */
13622 #include <pthread.h>
13623 #if HAVE_PTHREADS < 7
13624 #include <errno.h>
13625 #endif
13626 #ifndef NULL
13627 #define NULL (void*)0
13628 #endif
13629
13630 static void *task(p)
13631         void *p;
13632 {
13633         return (void *) (p == NULL);
13634 }
13635
13636
13637 int main(argc, argv)
13638         int argc;
13639         char **argv;
13640 {
13641
13642         /* pthread test function */
13643 #ifndef PTHREAD_CREATE_DETACHED
13644 #define PTHREAD_CREATE_DETACHED 1
13645 #endif
13646         pthread_t t;
13647         int status;
13648         int detach = PTHREAD_CREATE_DETACHED;
13649
13650 #if HAVE_PTHREADS > 4
13651         /* Final pthreads */
13652         pthread_attr_t attr;
13653
13654         status = pthread_attr_init(&attr);
13655         if( status ) return status;
13656
13657 #if HAVE_PTHREADS < 7
13658         status = pthread_attr_setdetachstate(&attr, &detach);
13659         if( status < 0 ) status = errno;
13660 #else
13661         status = pthread_attr_setdetachstate(&attr, detach);
13662 #endif
13663         if( status ) return status;
13664         status = pthread_create( &t, &attr, task, NULL );
13665 #if HAVE_PTHREADS < 7
13666         if( status < 0 ) status = errno;
13667 #endif
13668         if( status ) return status;
13669 #else
13670         /* Draft 4 pthreads */
13671         status = pthread_create( &t, pthread_attr_default, task, NULL );
13672         if( status ) return errno;
13673
13674         /* give thread a chance to complete */
13675         /* it should remain joinable and hence detachable */
13676         sleep( 1 );
13677
13678         status = pthread_detach( &t );
13679         if( status ) return errno;
13680 #endif
13681
13682 #ifdef HAVE_LINUX_THREADS
13683         pthread_kill_other_threads_np();
13684 #endif
13685
13686         return 0;
13687
13688 }
13689
13690 EOF
13691 if { (eval echo configure:13692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13692 then
13693   ol_cv_pthread_lib_lpthread_woff=yes
13694 else
13695   echo "configure: failed program was:" >&5
13696   cat conftest.$ac_ext >&5
13697   rm -fr conftest*
13698   ol_cv_pthread_lib_lpthread_woff=no
13699 fi
13700 rm -fr conftest*
13701 fi
13702
13703
13704                 # restore the LIBS
13705                 LIBS="$ol_LIBS"
13706         
13707 fi
13708
13709 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13710
13711         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13712                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13713                 ol_link_threads=posix
13714         fi
13715 fi
13716
13717
13718                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13719 if test "$ol_link_threads" = no ; then
13720         # try -lpthread
13721         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13722 echo "configure:13723: checking for pthread link with -lpthread" >&5
13723 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13724   echo $ac_n "(cached) $ac_c" 1>&6
13725 else
13726   
13727                 # save the flags
13728                 ol_LIBS="$LIBS"
13729                 LIBS="-lpthread $LIBS"
13730
13731                 if test "$cross_compiling" = yes; then
13732   cat > conftest.$ac_ext <<EOF
13733 #line 13734 "configure"
13734 #include "confdefs.h"
13735 /* pthread test headers */
13736 #include <pthread.h>
13737 #if HAVE_PTHREADS < 7
13738 #include <errno.h>
13739 #endif
13740 #ifndef NULL
13741 #define NULL (void*)0
13742 #endif
13743
13744 static void *task(p)
13745         void *p;
13746 {
13747         return (void *) (p == NULL);
13748 }
13749
13750 int main() {
13751
13752         /* pthread test function */
13753 #ifndef PTHREAD_CREATE_DETACHED
13754 #define PTHREAD_CREATE_DETACHED 1
13755 #endif
13756         pthread_t t;
13757         int status;
13758         int detach = PTHREAD_CREATE_DETACHED;
13759
13760 #if HAVE_PTHREADS > 4
13761         /* Final pthreads */
13762         pthread_attr_t attr;
13763
13764         status = pthread_attr_init(&attr);
13765         if( status ) return status;
13766
13767 #if HAVE_PTHREADS < 7
13768         status = pthread_attr_setdetachstate(&attr, &detach);
13769         if( status < 0 ) status = errno;
13770 #else
13771         status = pthread_attr_setdetachstate(&attr, detach);
13772 #endif
13773         if( status ) return status;
13774         status = pthread_create( &t, &attr, task, NULL );
13775 #if HAVE_PTHREADS < 7
13776         if( status < 0 ) status = errno;
13777 #endif
13778         if( status ) return status;
13779 #else
13780         /* Draft 4 pthreads */
13781         status = pthread_create( &t, pthread_attr_default, task, NULL );
13782         if( status ) return errno;
13783
13784         /* give thread a chance to complete */
13785         /* it should remain joinable and hence detachable */
13786         sleep( 1 );
13787
13788         status = pthread_detach( &t );
13789         if( status ) return errno;
13790 #endif
13791
13792 #ifdef HAVE_LINUX_THREADS
13793         pthread_kill_other_threads_np();
13794 #endif
13795
13796         return 0;
13797
13798 ; return 0; }
13799 EOF
13800 if { (eval echo configure:13801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13801   rm -rf conftest*
13802   ol_cv_pthread_lpthread=yes
13803 else
13804   echo "configure: failed program was:" >&5
13805   cat conftest.$ac_ext >&5
13806   rm -rf conftest*
13807   ol_cv_pthread_lpthread=no
13808 fi
13809 rm -f conftest*
13810 else
13811   cat > conftest.$ac_ext <<EOF
13812 #line 13813 "configure"
13813 #include "confdefs.h"
13814 /* pthread test headers */
13815 #include <pthread.h>
13816 #if HAVE_PTHREADS < 7
13817 #include <errno.h>
13818 #endif
13819 #ifndef NULL
13820 #define NULL (void*)0
13821 #endif
13822
13823 static void *task(p)
13824         void *p;
13825 {
13826         return (void *) (p == NULL);
13827 }
13828
13829
13830 int main(argc, argv)
13831         int argc;
13832         char **argv;
13833 {
13834
13835         /* pthread test function */
13836 #ifndef PTHREAD_CREATE_DETACHED
13837 #define PTHREAD_CREATE_DETACHED 1
13838 #endif
13839         pthread_t t;
13840         int status;
13841         int detach = PTHREAD_CREATE_DETACHED;
13842
13843 #if HAVE_PTHREADS > 4
13844         /* Final pthreads */
13845         pthread_attr_t attr;
13846
13847         status = pthread_attr_init(&attr);
13848         if( status ) return status;
13849
13850 #if HAVE_PTHREADS < 7
13851         status = pthread_attr_setdetachstate(&attr, &detach);
13852         if( status < 0 ) status = errno;
13853 #else
13854         status = pthread_attr_setdetachstate(&attr, detach);
13855 #endif
13856         if( status ) return status;
13857         status = pthread_create( &t, &attr, task, NULL );
13858 #if HAVE_PTHREADS < 7
13859         if( status < 0 ) status = errno;
13860 #endif
13861         if( status ) return status;
13862 #else
13863         /* Draft 4 pthreads */
13864         status = pthread_create( &t, pthread_attr_default, task, NULL );
13865         if( status ) return errno;
13866
13867         /* give thread a chance to complete */
13868         /* it should remain joinable and hence detachable */
13869         sleep( 1 );
13870
13871         status = pthread_detach( &t );
13872         if( status ) return errno;
13873 #endif
13874
13875 #ifdef HAVE_LINUX_THREADS
13876         pthread_kill_other_threads_np();
13877 #endif
13878
13879         return 0;
13880
13881 }
13882
13883 EOF
13884 if { (eval echo configure:13885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13885 then
13886   ol_cv_pthread_lpthread=yes
13887 else
13888   echo "configure: failed program was:" >&5
13889   cat conftest.$ac_ext >&5
13890   rm -fr conftest*
13891   ol_cv_pthread_lpthread=no
13892 fi
13893 rm -fr conftest*
13894 fi
13895
13896
13897                 # restore the LIBS
13898                 LIBS="$ol_LIBS"
13899         
13900 fi
13901
13902 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13903
13904         if test $ol_cv_pthread_lpthread = yes ; then
13905                 ol_link_pthreads="-lpthread"
13906                 ol_link_threads=posix
13907         fi
13908 fi
13909
13910                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13911 if test "$ol_link_threads" = no ; then
13912         # try -lc_r
13913         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13914 echo "configure:13915: checking for pthread link with -lc_r" >&5
13915 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13916   echo $ac_n "(cached) $ac_c" 1>&6
13917 else
13918   
13919                 # save the flags
13920                 ol_LIBS="$LIBS"
13921                 LIBS="-lc_r $LIBS"
13922
13923                 if test "$cross_compiling" = yes; then
13924   cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 /* pthread test headers */
13928 #include <pthread.h>
13929 #if HAVE_PTHREADS < 7
13930 #include <errno.h>
13931 #endif
13932 #ifndef NULL
13933 #define NULL (void*)0
13934 #endif
13935
13936 static void *task(p)
13937         void *p;
13938 {
13939         return (void *) (p == NULL);
13940 }
13941
13942 int main() {
13943
13944         /* pthread test function */
13945 #ifndef PTHREAD_CREATE_DETACHED
13946 #define PTHREAD_CREATE_DETACHED 1
13947 #endif
13948         pthread_t t;
13949         int status;
13950         int detach = PTHREAD_CREATE_DETACHED;
13951
13952 #if HAVE_PTHREADS > 4
13953         /* Final pthreads */
13954         pthread_attr_t attr;
13955
13956         status = pthread_attr_init(&attr);
13957         if( status ) return status;
13958
13959 #if HAVE_PTHREADS < 7
13960         status = pthread_attr_setdetachstate(&attr, &detach);
13961         if( status < 0 ) status = errno;
13962 #else
13963         status = pthread_attr_setdetachstate(&attr, detach);
13964 #endif
13965         if( status ) return status;
13966         status = pthread_create( &t, &attr, task, NULL );
13967 #if HAVE_PTHREADS < 7
13968         if( status < 0 ) status = errno;
13969 #endif
13970         if( status ) return status;
13971 #else
13972         /* Draft 4 pthreads */
13973         status = pthread_create( &t, pthread_attr_default, task, NULL );
13974         if( status ) return errno;
13975
13976         /* give thread a chance to complete */
13977         /* it should remain joinable and hence detachable */
13978         sleep( 1 );
13979
13980         status = pthread_detach( &t );
13981         if( status ) return errno;
13982 #endif
13983
13984 #ifdef HAVE_LINUX_THREADS
13985         pthread_kill_other_threads_np();
13986 #endif
13987
13988         return 0;
13989
13990 ; return 0; }
13991 EOF
13992 if { (eval echo configure:13993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13993   rm -rf conftest*
13994   ol_cv_pthread_lc_r=yes
13995 else
13996   echo "configure: failed program was:" >&5
13997   cat conftest.$ac_ext >&5
13998   rm -rf conftest*
13999   ol_cv_pthread_lc_r=no
14000 fi
14001 rm -f conftest*
14002 else
14003   cat > conftest.$ac_ext <<EOF
14004 #line 14005 "configure"
14005 #include "confdefs.h"
14006 /* pthread test headers */
14007 #include <pthread.h>
14008 #if HAVE_PTHREADS < 7
14009 #include <errno.h>
14010 #endif
14011 #ifndef NULL
14012 #define NULL (void*)0
14013 #endif
14014
14015 static void *task(p)
14016         void *p;
14017 {
14018         return (void *) (p == NULL);
14019 }
14020
14021
14022 int main(argc, argv)
14023         int argc;
14024         char **argv;
14025 {
14026
14027         /* pthread test function */
14028 #ifndef PTHREAD_CREATE_DETACHED
14029 #define PTHREAD_CREATE_DETACHED 1
14030 #endif
14031         pthread_t t;
14032         int status;
14033         int detach = PTHREAD_CREATE_DETACHED;
14034
14035 #if HAVE_PTHREADS > 4
14036         /* Final pthreads */
14037         pthread_attr_t attr;
14038
14039         status = pthread_attr_init(&attr);
14040         if( status ) return status;
14041
14042 #if HAVE_PTHREADS < 7
14043         status = pthread_attr_setdetachstate(&attr, &detach);
14044         if( status < 0 ) status = errno;
14045 #else
14046         status = pthread_attr_setdetachstate(&attr, detach);
14047 #endif
14048         if( status ) return status;
14049         status = pthread_create( &t, &attr, task, NULL );
14050 #if HAVE_PTHREADS < 7
14051         if( status < 0 ) status = errno;
14052 #endif
14053         if( status ) return status;
14054 #else
14055         /* Draft 4 pthreads */
14056         status = pthread_create( &t, pthread_attr_default, task, NULL );
14057         if( status ) return errno;
14058
14059         /* give thread a chance to complete */
14060         /* it should remain joinable and hence detachable */
14061         sleep( 1 );
14062
14063         status = pthread_detach( &t );
14064         if( status ) return errno;
14065 #endif
14066
14067 #ifdef HAVE_LINUX_THREADS
14068         pthread_kill_other_threads_np();
14069 #endif
14070
14071         return 0;
14072
14073 }
14074
14075 EOF
14076 if { (eval echo configure:14077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14077 then
14078   ol_cv_pthread_lc_r=yes
14079 else
14080   echo "configure: failed program was:" >&5
14081   cat conftest.$ac_ext >&5
14082   rm -fr conftest*
14083   ol_cv_pthread_lc_r=no
14084 fi
14085 rm -fr conftest*
14086 fi
14087
14088
14089                 # restore the LIBS
14090                 LIBS="$ol_LIBS"
14091         
14092 fi
14093
14094 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14095
14096         if test $ol_cv_pthread_lc_r = yes ; then
14097                 ol_link_pthreads="-lc_r"
14098                 ol_link_threads=posix
14099         fi
14100 fi
14101
14102
14103                 # Pthread try link: -threads (ol_cv_pthread_threads)
14104 if test "$ol_link_threads" = no ; then
14105         # try -threads
14106         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14107 echo "configure:14108: checking for pthread link with -threads" >&5
14108 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14109   echo $ac_n "(cached) $ac_c" 1>&6
14110 else
14111   
14112                 # save the flags
14113                 ol_LIBS="$LIBS"
14114                 LIBS="-threads $LIBS"
14115
14116                 if test "$cross_compiling" = yes; then
14117   cat > conftest.$ac_ext <<EOF
14118 #line 14119 "configure"
14119 #include "confdefs.h"
14120 /* pthread test headers */
14121 #include <pthread.h>
14122 #if HAVE_PTHREADS < 7
14123 #include <errno.h>
14124 #endif
14125 #ifndef NULL
14126 #define NULL (void*)0
14127 #endif
14128
14129 static void *task(p)
14130         void *p;
14131 {
14132         return (void *) (p == NULL);
14133 }
14134
14135 int main() {
14136
14137         /* pthread test function */
14138 #ifndef PTHREAD_CREATE_DETACHED
14139 #define PTHREAD_CREATE_DETACHED 1
14140 #endif
14141         pthread_t t;
14142         int status;
14143         int detach = PTHREAD_CREATE_DETACHED;
14144
14145 #if HAVE_PTHREADS > 4
14146         /* Final pthreads */
14147         pthread_attr_t attr;
14148
14149         status = pthread_attr_init(&attr);
14150         if( status ) return status;
14151
14152 #if HAVE_PTHREADS < 7
14153         status = pthread_attr_setdetachstate(&attr, &detach);
14154         if( status < 0 ) status = errno;
14155 #else
14156         status = pthread_attr_setdetachstate(&attr, detach);
14157 #endif
14158         if( status ) return status;
14159         status = pthread_create( &t, &attr, task, NULL );
14160 #if HAVE_PTHREADS < 7
14161         if( status < 0 ) status = errno;
14162 #endif
14163         if( status ) return status;
14164 #else
14165         /* Draft 4 pthreads */
14166         status = pthread_create( &t, pthread_attr_default, task, NULL );
14167         if( status ) return errno;
14168
14169         /* give thread a chance to complete */
14170         /* it should remain joinable and hence detachable */
14171         sleep( 1 );
14172
14173         status = pthread_detach( &t );
14174         if( status ) return errno;
14175 #endif
14176
14177 #ifdef HAVE_LINUX_THREADS
14178         pthread_kill_other_threads_np();
14179 #endif
14180
14181         return 0;
14182
14183 ; return 0; }
14184 EOF
14185 if { (eval echo configure:14186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14186   rm -rf conftest*
14187   ol_cv_pthread_threads=yes
14188 else
14189   echo "configure: failed program was:" >&5
14190   cat conftest.$ac_ext >&5
14191   rm -rf conftest*
14192   ol_cv_pthread_threads=no
14193 fi
14194 rm -f conftest*
14195 else
14196   cat > conftest.$ac_ext <<EOF
14197 #line 14198 "configure"
14198 #include "confdefs.h"
14199 /* pthread test headers */
14200 #include <pthread.h>
14201 #if HAVE_PTHREADS < 7
14202 #include <errno.h>
14203 #endif
14204 #ifndef NULL
14205 #define NULL (void*)0
14206 #endif
14207
14208 static void *task(p)
14209         void *p;
14210 {
14211         return (void *) (p == NULL);
14212 }
14213
14214
14215 int main(argc, argv)
14216         int argc;
14217         char **argv;
14218 {
14219
14220         /* pthread test function */
14221 #ifndef PTHREAD_CREATE_DETACHED
14222 #define PTHREAD_CREATE_DETACHED 1
14223 #endif
14224         pthread_t t;
14225         int status;
14226         int detach = PTHREAD_CREATE_DETACHED;
14227
14228 #if HAVE_PTHREADS > 4
14229         /* Final pthreads */
14230         pthread_attr_t attr;
14231
14232         status = pthread_attr_init(&attr);
14233         if( status ) return status;
14234
14235 #if HAVE_PTHREADS < 7
14236         status = pthread_attr_setdetachstate(&attr, &detach);
14237         if( status < 0 ) status = errno;
14238 #else
14239         status = pthread_attr_setdetachstate(&attr, detach);
14240 #endif
14241         if( status ) return status;
14242         status = pthread_create( &t, &attr, task, NULL );
14243 #if HAVE_PTHREADS < 7
14244         if( status < 0 ) status = errno;
14245 #endif
14246         if( status ) return status;
14247 #else
14248         /* Draft 4 pthreads */
14249         status = pthread_create( &t, pthread_attr_default, task, NULL );
14250         if( status ) return errno;
14251
14252         /* give thread a chance to complete */
14253         /* it should remain joinable and hence detachable */
14254         sleep( 1 );
14255
14256         status = pthread_detach( &t );
14257         if( status ) return errno;
14258 #endif
14259
14260 #ifdef HAVE_LINUX_THREADS
14261         pthread_kill_other_threads_np();
14262 #endif
14263
14264         return 0;
14265
14266 }
14267
14268 EOF
14269 if { (eval echo configure:14270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14270 then
14271   ol_cv_pthread_threads=yes
14272 else
14273   echo "configure: failed program was:" >&5
14274   cat conftest.$ac_ext >&5
14275   rm -fr conftest*
14276   ol_cv_pthread_threads=no
14277 fi
14278 rm -fr conftest*
14279 fi
14280
14281
14282                 # restore the LIBS
14283                 LIBS="$ol_LIBS"
14284         
14285 fi
14286
14287 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14288
14289         if test $ol_cv_pthread_threads = yes ; then
14290                 ol_link_pthreads="-threads"
14291                 ol_link_threads=posix
14292         fi
14293 fi
14294
14295
14296                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14297 if test "$ol_link_threads" = no ; then
14298         # try -lpthreads -lmach -lexc -lc_r
14299         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14300 echo "configure:14301: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14301 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14302   echo $ac_n "(cached) $ac_c" 1>&6
14303 else
14304   
14305                 # save the flags
14306                 ol_LIBS="$LIBS"
14307                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14308
14309                 if test "$cross_compiling" = yes; then
14310   cat > conftest.$ac_ext <<EOF
14311 #line 14312 "configure"
14312 #include "confdefs.h"
14313 /* pthread test headers */
14314 #include <pthread.h>
14315 #if HAVE_PTHREADS < 7
14316 #include <errno.h>
14317 #endif
14318 #ifndef NULL
14319 #define NULL (void*)0
14320 #endif
14321
14322 static void *task(p)
14323         void *p;
14324 {
14325         return (void *) (p == NULL);
14326 }
14327
14328 int main() {
14329
14330         /* pthread test function */
14331 #ifndef PTHREAD_CREATE_DETACHED
14332 #define PTHREAD_CREATE_DETACHED 1
14333 #endif
14334         pthread_t t;
14335         int status;
14336         int detach = PTHREAD_CREATE_DETACHED;
14337
14338 #if HAVE_PTHREADS > 4
14339         /* Final pthreads */
14340         pthread_attr_t attr;
14341
14342         status = pthread_attr_init(&attr);
14343         if( status ) return status;
14344
14345 #if HAVE_PTHREADS < 7
14346         status = pthread_attr_setdetachstate(&attr, &detach);
14347         if( status < 0 ) status = errno;
14348 #else
14349         status = pthread_attr_setdetachstate(&attr, detach);
14350 #endif
14351         if( status ) return status;
14352         status = pthread_create( &t, &attr, task, NULL );
14353 #if HAVE_PTHREADS < 7
14354         if( status < 0 ) status = errno;
14355 #endif
14356         if( status ) return status;
14357 #else
14358         /* Draft 4 pthreads */
14359         status = pthread_create( &t, pthread_attr_default, task, NULL );
14360         if( status ) return errno;
14361
14362         /* give thread a chance to complete */
14363         /* it should remain joinable and hence detachable */
14364         sleep( 1 );
14365
14366         status = pthread_detach( &t );
14367         if( status ) return errno;
14368 #endif
14369
14370 #ifdef HAVE_LINUX_THREADS
14371         pthread_kill_other_threads_np();
14372 #endif
14373
14374         return 0;
14375
14376 ; return 0; }
14377 EOF
14378 if { (eval echo configure:14379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14379   rm -rf conftest*
14380   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14381 else
14382   echo "configure: failed program was:" >&5
14383   cat conftest.$ac_ext >&5
14384   rm -rf conftest*
14385   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14386 fi
14387 rm -f conftest*
14388 else
14389   cat > conftest.$ac_ext <<EOF
14390 #line 14391 "configure"
14391 #include "confdefs.h"
14392 /* pthread test headers */
14393 #include <pthread.h>
14394 #if HAVE_PTHREADS < 7
14395 #include <errno.h>
14396 #endif
14397 #ifndef NULL
14398 #define NULL (void*)0
14399 #endif
14400
14401 static void *task(p)
14402         void *p;
14403 {
14404         return (void *) (p == NULL);
14405 }
14406
14407
14408 int main(argc, argv)
14409         int argc;
14410         char **argv;
14411 {
14412
14413         /* pthread test function */
14414 #ifndef PTHREAD_CREATE_DETACHED
14415 #define PTHREAD_CREATE_DETACHED 1
14416 #endif
14417         pthread_t t;
14418         int status;
14419         int detach = PTHREAD_CREATE_DETACHED;
14420
14421 #if HAVE_PTHREADS > 4
14422         /* Final pthreads */
14423         pthread_attr_t attr;
14424
14425         status = pthread_attr_init(&attr);
14426         if( status ) return status;
14427
14428 #if HAVE_PTHREADS < 7
14429         status = pthread_attr_setdetachstate(&attr, &detach);
14430         if( status < 0 ) status = errno;
14431 #else
14432         status = pthread_attr_setdetachstate(&attr, detach);
14433 #endif
14434         if( status ) return status;
14435         status = pthread_create( &t, &attr, task, NULL );
14436 #if HAVE_PTHREADS < 7
14437         if( status < 0 ) status = errno;
14438 #endif
14439         if( status ) return status;
14440 #else
14441         /* Draft 4 pthreads */
14442         status = pthread_create( &t, pthread_attr_default, task, NULL );
14443         if( status ) return errno;
14444
14445         /* give thread a chance to complete */
14446         /* it should remain joinable and hence detachable */
14447         sleep( 1 );
14448
14449         status = pthread_detach( &t );
14450         if( status ) return errno;
14451 #endif
14452
14453 #ifdef HAVE_LINUX_THREADS
14454         pthread_kill_other_threads_np();
14455 #endif
14456
14457         return 0;
14458
14459 }
14460
14461 EOF
14462 if { (eval echo configure:14463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14463 then
14464   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14465 else
14466   echo "configure: failed program was:" >&5
14467   cat conftest.$ac_ext >&5
14468   rm -fr conftest*
14469   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14470 fi
14471 rm -fr conftest*
14472 fi
14473
14474
14475                 # restore the LIBS
14476                 LIBS="$ol_LIBS"
14477         
14478 fi
14479
14480 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14481
14482         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14483                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14484                 ol_link_threads=posix
14485         fi
14486 fi
14487
14488                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14489 if test "$ol_link_threads" = no ; then
14490         # try -lpthreads -lmach -lexc
14491         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14492 echo "configure:14493: checking for pthread link with -lpthreads -lmach -lexc" >&5
14493 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14494   echo $ac_n "(cached) $ac_c" 1>&6
14495 else
14496   
14497                 # save the flags
14498                 ol_LIBS="$LIBS"
14499                 LIBS="-lpthreads -lmach -lexc $LIBS"
14500
14501                 if test "$cross_compiling" = yes; then
14502   cat > conftest.$ac_ext <<EOF
14503 #line 14504 "configure"
14504 #include "confdefs.h"
14505 /* pthread test headers */
14506 #include <pthread.h>
14507 #if HAVE_PTHREADS < 7
14508 #include <errno.h>
14509 #endif
14510 #ifndef NULL
14511 #define NULL (void*)0
14512 #endif
14513
14514 static void *task(p)
14515         void *p;
14516 {
14517         return (void *) (p == NULL);
14518 }
14519
14520 int main() {
14521
14522         /* pthread test function */
14523 #ifndef PTHREAD_CREATE_DETACHED
14524 #define PTHREAD_CREATE_DETACHED 1
14525 #endif
14526         pthread_t t;
14527         int status;
14528         int detach = PTHREAD_CREATE_DETACHED;
14529
14530 #if HAVE_PTHREADS > 4
14531         /* Final pthreads */
14532         pthread_attr_t attr;
14533
14534         status = pthread_attr_init(&attr);
14535         if( status ) return status;
14536
14537 #if HAVE_PTHREADS < 7
14538         status = pthread_attr_setdetachstate(&attr, &detach);
14539         if( status < 0 ) status = errno;
14540 #else
14541         status = pthread_attr_setdetachstate(&attr, detach);
14542 #endif
14543         if( status ) return status;
14544         status = pthread_create( &t, &attr, task, NULL );
14545 #if HAVE_PTHREADS < 7
14546         if( status < 0 ) status = errno;
14547 #endif
14548         if( status ) return status;
14549 #else
14550         /* Draft 4 pthreads */
14551         status = pthread_create( &t, pthread_attr_default, task, NULL );
14552         if( status ) return errno;
14553
14554         /* give thread a chance to complete */
14555         /* it should remain joinable and hence detachable */
14556         sleep( 1 );
14557
14558         status = pthread_detach( &t );
14559         if( status ) return errno;
14560 #endif
14561
14562 #ifdef HAVE_LINUX_THREADS
14563         pthread_kill_other_threads_np();
14564 #endif
14565
14566         return 0;
14567
14568 ; return 0; }
14569 EOF
14570 if { (eval echo configure:14571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14571   rm -rf conftest*
14572   ol_cv_pthread_lpthreads_lmach_lexc=yes
14573 else
14574   echo "configure: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   rm -rf conftest*
14577   ol_cv_pthread_lpthreads_lmach_lexc=no
14578 fi
14579 rm -f conftest*
14580 else
14581   cat > conftest.$ac_ext <<EOF
14582 #line 14583 "configure"
14583 #include "confdefs.h"
14584 /* pthread test headers */
14585 #include <pthread.h>
14586 #if HAVE_PTHREADS < 7
14587 #include <errno.h>
14588 #endif
14589 #ifndef NULL
14590 #define NULL (void*)0
14591 #endif
14592
14593 static void *task(p)
14594         void *p;
14595 {
14596         return (void *) (p == NULL);
14597 }
14598
14599
14600 int main(argc, argv)
14601         int argc;
14602         char **argv;
14603 {
14604
14605         /* pthread test function */
14606 #ifndef PTHREAD_CREATE_DETACHED
14607 #define PTHREAD_CREATE_DETACHED 1
14608 #endif
14609         pthread_t t;
14610         int status;
14611         int detach = PTHREAD_CREATE_DETACHED;
14612
14613 #if HAVE_PTHREADS > 4
14614         /* Final pthreads */
14615         pthread_attr_t attr;
14616
14617         status = pthread_attr_init(&attr);
14618         if( status ) return status;
14619
14620 #if HAVE_PTHREADS < 7
14621         status = pthread_attr_setdetachstate(&attr, &detach);
14622         if( status < 0 ) status = errno;
14623 #else
14624         status = pthread_attr_setdetachstate(&attr, detach);
14625 #endif
14626         if( status ) return status;
14627         status = pthread_create( &t, &attr, task, NULL );
14628 #if HAVE_PTHREADS < 7
14629         if( status < 0 ) status = errno;
14630 #endif
14631         if( status ) return status;
14632 #else
14633         /* Draft 4 pthreads */
14634         status = pthread_create( &t, pthread_attr_default, task, NULL );
14635         if( status ) return errno;
14636
14637         /* give thread a chance to complete */
14638         /* it should remain joinable and hence detachable */
14639         sleep( 1 );
14640
14641         status = pthread_detach( &t );
14642         if( status ) return errno;
14643 #endif
14644
14645 #ifdef HAVE_LINUX_THREADS
14646         pthread_kill_other_threads_np();
14647 #endif
14648
14649         return 0;
14650
14651 }
14652
14653 EOF
14654 if { (eval echo configure:14655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14655 then
14656   ol_cv_pthread_lpthreads_lmach_lexc=yes
14657 else
14658   echo "configure: failed program was:" >&5
14659   cat conftest.$ac_ext >&5
14660   rm -fr conftest*
14661   ol_cv_pthread_lpthreads_lmach_lexc=no
14662 fi
14663 rm -fr conftest*
14664 fi
14665
14666
14667                 # restore the LIBS
14668                 LIBS="$ol_LIBS"
14669         
14670 fi
14671
14672 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14673
14674         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14675                 ol_link_pthreads="-lpthreads -lmach -lexc"
14676                 ol_link_threads=posix
14677         fi
14678 fi
14679
14680                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14681 if test "$ol_link_threads" = no ; then
14682         # try -lpthreads -lexc
14683         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14684 echo "configure:14685: checking for pthread link with -lpthreads -lexc" >&5
14685 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14686   echo $ac_n "(cached) $ac_c" 1>&6
14687 else
14688   
14689                 # save the flags
14690                 ol_LIBS="$LIBS"
14691                 LIBS="-lpthreads -lexc $LIBS"
14692
14693                 if test "$cross_compiling" = yes; then
14694   cat > conftest.$ac_ext <<EOF
14695 #line 14696 "configure"
14696 #include "confdefs.h"
14697 /* pthread test headers */
14698 #include <pthread.h>
14699 #if HAVE_PTHREADS < 7
14700 #include <errno.h>
14701 #endif
14702 #ifndef NULL
14703 #define NULL (void*)0
14704 #endif
14705
14706 static void *task(p)
14707         void *p;
14708 {
14709         return (void *) (p == NULL);
14710 }
14711
14712 int main() {
14713
14714         /* pthread test function */
14715 #ifndef PTHREAD_CREATE_DETACHED
14716 #define PTHREAD_CREATE_DETACHED 1
14717 #endif
14718         pthread_t t;
14719         int status;
14720         int detach = PTHREAD_CREATE_DETACHED;
14721
14722 #if HAVE_PTHREADS > 4
14723         /* Final pthreads */
14724         pthread_attr_t attr;
14725
14726         status = pthread_attr_init(&attr);
14727         if( status ) return status;
14728
14729 #if HAVE_PTHREADS < 7
14730         status = pthread_attr_setdetachstate(&attr, &detach);
14731         if( status < 0 ) status = errno;
14732 #else
14733         status = pthread_attr_setdetachstate(&attr, detach);
14734 #endif
14735         if( status ) return status;
14736         status = pthread_create( &t, &attr, task, NULL );
14737 #if HAVE_PTHREADS < 7
14738         if( status < 0 ) status = errno;
14739 #endif
14740         if( status ) return status;
14741 #else
14742         /* Draft 4 pthreads */
14743         status = pthread_create( &t, pthread_attr_default, task, NULL );
14744         if( status ) return errno;
14745
14746         /* give thread a chance to complete */
14747         /* it should remain joinable and hence detachable */
14748         sleep( 1 );
14749
14750         status = pthread_detach( &t );
14751         if( status ) return errno;
14752 #endif
14753
14754 #ifdef HAVE_LINUX_THREADS
14755         pthread_kill_other_threads_np();
14756 #endif
14757
14758         return 0;
14759
14760 ; return 0; }
14761 EOF
14762 if { (eval echo configure:14763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14763   rm -rf conftest*
14764   ol_cv_pthread_lpthreads_lexc=yes
14765 else
14766   echo "configure: failed program was:" >&5
14767   cat conftest.$ac_ext >&5
14768   rm -rf conftest*
14769   ol_cv_pthread_lpthreads_lexc=no
14770 fi
14771 rm -f conftest*
14772 else
14773   cat > conftest.$ac_ext <<EOF
14774 #line 14775 "configure"
14775 #include "confdefs.h"
14776 /* pthread test headers */
14777 #include <pthread.h>
14778 #if HAVE_PTHREADS < 7
14779 #include <errno.h>
14780 #endif
14781 #ifndef NULL
14782 #define NULL (void*)0
14783 #endif
14784
14785 static void *task(p)
14786         void *p;
14787 {
14788         return (void *) (p == NULL);
14789 }
14790
14791
14792 int main(argc, argv)
14793         int argc;
14794         char **argv;
14795 {
14796
14797         /* pthread test function */
14798 #ifndef PTHREAD_CREATE_DETACHED
14799 #define PTHREAD_CREATE_DETACHED 1
14800 #endif
14801         pthread_t t;
14802         int status;
14803         int detach = PTHREAD_CREATE_DETACHED;
14804
14805 #if HAVE_PTHREADS > 4
14806         /* Final pthreads */
14807         pthread_attr_t attr;
14808
14809         status = pthread_attr_init(&attr);
14810         if( status ) return status;
14811
14812 #if HAVE_PTHREADS < 7
14813         status = pthread_attr_setdetachstate(&attr, &detach);
14814         if( status < 0 ) status = errno;
14815 #else
14816         status = pthread_attr_setdetachstate(&attr, detach);
14817 #endif
14818         if( status ) return status;
14819         status = pthread_create( &t, &attr, task, NULL );
14820 #if HAVE_PTHREADS < 7
14821         if( status < 0 ) status = errno;
14822 #endif
14823         if( status ) return status;
14824 #else
14825         /* Draft 4 pthreads */
14826         status = pthread_create( &t, pthread_attr_default, task, NULL );
14827         if( status ) return errno;
14828
14829         /* give thread a chance to complete */
14830         /* it should remain joinable and hence detachable */
14831         sleep( 1 );
14832
14833         status = pthread_detach( &t );
14834         if( status ) return errno;
14835 #endif
14836
14837 #ifdef HAVE_LINUX_THREADS
14838         pthread_kill_other_threads_np();
14839 #endif
14840
14841         return 0;
14842
14843 }
14844
14845 EOF
14846 if { (eval echo configure:14847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14847 then
14848   ol_cv_pthread_lpthreads_lexc=yes
14849 else
14850   echo "configure: failed program was:" >&5
14851   cat conftest.$ac_ext >&5
14852   rm -fr conftest*
14853   ol_cv_pthread_lpthreads_lexc=no
14854 fi
14855 rm -fr conftest*
14856 fi
14857
14858
14859                 # restore the LIBS
14860                 LIBS="$ol_LIBS"
14861         
14862 fi
14863
14864 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14865
14866         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14867                 ol_link_pthreads="-lpthreads -lexc"
14868                 ol_link_threads=posix
14869         fi
14870 fi
14871
14872
14873                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14874 if test "$ol_link_threads" = no ; then
14875         # try -lpthreads
14876         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14877 echo "configure:14878: checking for pthread link with -lpthreads" >&5
14878 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14879   echo $ac_n "(cached) $ac_c" 1>&6
14880 else
14881   
14882                 # save the flags
14883                 ol_LIBS="$LIBS"
14884                 LIBS="-lpthreads $LIBS"
14885
14886                 if test "$cross_compiling" = yes; then
14887   cat > conftest.$ac_ext <<EOF
14888 #line 14889 "configure"
14889 #include "confdefs.h"
14890 /* pthread test headers */
14891 #include <pthread.h>
14892 #if HAVE_PTHREADS < 7
14893 #include <errno.h>
14894 #endif
14895 #ifndef NULL
14896 #define NULL (void*)0
14897 #endif
14898
14899 static void *task(p)
14900         void *p;
14901 {
14902         return (void *) (p == NULL);
14903 }
14904
14905 int main() {
14906
14907         /* pthread test function */
14908 #ifndef PTHREAD_CREATE_DETACHED
14909 #define PTHREAD_CREATE_DETACHED 1
14910 #endif
14911         pthread_t t;
14912         int status;
14913         int detach = PTHREAD_CREATE_DETACHED;
14914
14915 #if HAVE_PTHREADS > 4
14916         /* Final pthreads */
14917         pthread_attr_t attr;
14918
14919         status = pthread_attr_init(&attr);
14920         if( status ) return status;
14921
14922 #if HAVE_PTHREADS < 7
14923         status = pthread_attr_setdetachstate(&attr, &detach);
14924         if( status < 0 ) status = errno;
14925 #else
14926         status = pthread_attr_setdetachstate(&attr, detach);
14927 #endif
14928         if( status ) return status;
14929         status = pthread_create( &t, &attr, task, NULL );
14930 #if HAVE_PTHREADS < 7
14931         if( status < 0 ) status = errno;
14932 #endif
14933         if( status ) return status;
14934 #else
14935         /* Draft 4 pthreads */
14936         status = pthread_create( &t, pthread_attr_default, task, NULL );
14937         if( status ) return errno;
14938
14939         /* give thread a chance to complete */
14940         /* it should remain joinable and hence detachable */
14941         sleep( 1 );
14942
14943         status = pthread_detach( &t );
14944         if( status ) return errno;
14945 #endif
14946
14947 #ifdef HAVE_LINUX_THREADS
14948         pthread_kill_other_threads_np();
14949 #endif
14950
14951         return 0;
14952
14953 ; return 0; }
14954 EOF
14955 if { (eval echo configure:14956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14956   rm -rf conftest*
14957   ol_cv_pthread_lib_lpthreads=yes
14958 else
14959   echo "configure: failed program was:" >&5
14960   cat conftest.$ac_ext >&5
14961   rm -rf conftest*
14962   ol_cv_pthread_lib_lpthreads=no
14963 fi
14964 rm -f conftest*
14965 else
14966   cat > conftest.$ac_ext <<EOF
14967 #line 14968 "configure"
14968 #include "confdefs.h"
14969 /* pthread test headers */
14970 #include <pthread.h>
14971 #if HAVE_PTHREADS < 7
14972 #include <errno.h>
14973 #endif
14974 #ifndef NULL
14975 #define NULL (void*)0
14976 #endif
14977
14978 static void *task(p)
14979         void *p;
14980 {
14981         return (void *) (p == NULL);
14982 }
14983
14984
14985 int main(argc, argv)
14986         int argc;
14987         char **argv;
14988 {
14989
14990         /* pthread test function */
14991 #ifndef PTHREAD_CREATE_DETACHED
14992 #define PTHREAD_CREATE_DETACHED 1
14993 #endif
14994         pthread_t t;
14995         int status;
14996         int detach = PTHREAD_CREATE_DETACHED;
14997
14998 #if HAVE_PTHREADS > 4
14999         /* Final pthreads */
15000         pthread_attr_t attr;
15001
15002         status = pthread_attr_init(&attr);
15003         if( status ) return status;
15004
15005 #if HAVE_PTHREADS < 7
15006         status = pthread_attr_setdetachstate(&attr, &detach);
15007         if( status < 0 ) status = errno;
15008 #else
15009         status = pthread_attr_setdetachstate(&attr, detach);
15010 #endif
15011         if( status ) return status;
15012         status = pthread_create( &t, &attr, task, NULL );
15013 #if HAVE_PTHREADS < 7
15014         if( status < 0 ) status = errno;
15015 #endif
15016         if( status ) return status;
15017 #else
15018         /* Draft 4 pthreads */
15019         status = pthread_create( &t, pthread_attr_default, task, NULL );
15020         if( status ) return errno;
15021
15022         /* give thread a chance to complete */
15023         /* it should remain joinable and hence detachable */
15024         sleep( 1 );
15025
15026         status = pthread_detach( &t );
15027         if( status ) return errno;
15028 #endif
15029
15030 #ifdef HAVE_LINUX_THREADS
15031         pthread_kill_other_threads_np();
15032 #endif
15033
15034         return 0;
15035
15036 }
15037
15038 EOF
15039 if { (eval echo configure:15040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15040 then
15041   ol_cv_pthread_lib_lpthreads=yes
15042 else
15043   echo "configure: failed program was:" >&5
15044   cat conftest.$ac_ext >&5
15045   rm -fr conftest*
15046   ol_cv_pthread_lib_lpthreads=no
15047 fi
15048 rm -fr conftest*
15049 fi
15050
15051
15052                 # restore the LIBS
15053                 LIBS="$ol_LIBS"
15054         
15055 fi
15056
15057 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15058
15059         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15060                 ol_link_pthreads="-lpthreads"
15061                 ol_link_threads=posix
15062         fi
15063 fi
15064
15065
15066                 if test $ol_link_threads != no ; then
15067                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15068
15069                                                 save_CPPFLAGS="$CPPFLAGS"
15070                         save_LIBS="$LIBS"
15071                         LIBS="$LTHREAD_LIBS $LIBS"
15072
15073                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15074 do
15075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15076 echo "configure:15077: checking for $ac_func" >&5
15077 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15078   echo $ac_n "(cached) $ac_c" 1>&6
15079 else
15080   cat > conftest.$ac_ext <<EOF
15081 #line 15082 "configure"
15082 #include "confdefs.h"
15083 /* System header to define __stub macros and hopefully few prototypes,
15084     which can conflict with char $ac_func(); below.  */
15085 #include <assert.h>
15086 /* Override any gcc2 internal prototype to avoid an error.  */
15087 /* We use char because int might match the return type of a gcc2
15088     builtin and then its argument prototype would still apply.  */
15089 char $ac_func();
15090 char (*f)();
15091
15092 int main() {
15093
15094 /* The GNU C library defines this for functions which it implements
15095     to always fail with ENOSYS.  Some functions are actually named
15096     something starting with __ and the normal name is an alias.  */
15097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15098 choke me
15099 #else
15100 f = $ac_func;
15101 #endif
15102
15103 ; return 0; }
15104 EOF
15105 if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15106   rm -rf conftest*
15107   eval "ac_cv_func_$ac_func=yes"
15108 else
15109   echo "configure: failed program was:" >&5
15110   cat conftest.$ac_ext >&5
15111   rm -rf conftest*
15112   eval "ac_cv_func_$ac_func=no"
15113 fi
15114 rm -f conftest*
15115 fi
15116
15117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15118   echo "$ac_t""yes" 1>&6
15119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15120   cat >> confdefs.h <<EOF
15121 #define $ac_tr_func 1
15122 EOF
15123  
15124 else
15125   echo "$ac_t""no" 1>&6
15126 fi
15127 done
15128
15129
15130                         if test $ac_cv_func_sched_yield = no -a \
15131                                 $ac_cv_func_pthread_yield = no -a \
15132                                 $ac_cv_func_thr_yield = no ; then
15133                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15134 echo "configure:15135: checking for sched_yield in -lrt" >&5
15135 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15137   echo $ac_n "(cached) $ac_c" 1>&6
15138 else
15139   ac_save_LIBS="$LIBS"
15140 LIBS="-lrt  $LIBS"
15141 cat > conftest.$ac_ext <<EOF
15142 #line 15143 "configure"
15143 #include "confdefs.h"
15144 /* Override any gcc2 internal prototype to avoid an error.  */
15145 /* We use char because int might match the return type of a gcc2
15146     builtin and then its argument prototype would still apply.  */
15147 char sched_yield();
15148
15149 int main() {
15150 sched_yield()
15151 ; return 0; }
15152 EOF
15153 if { (eval echo configure:15154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15154   rm -rf conftest*
15155   eval "ac_cv_lib_$ac_lib_var=yes"
15156 else
15157   echo "configure: failed program was:" >&5
15158   cat conftest.$ac_ext >&5
15159   rm -rf conftest*
15160   eval "ac_cv_lib_$ac_lib_var=no"
15161 fi
15162 rm -f conftest*
15163 LIBS="$ac_save_LIBS"
15164
15165 fi
15166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15167   echo "$ac_t""yes" 1>&6
15168   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15169                                         cat >> confdefs.h <<\EOF
15170 #define HAVE_SCHED_YIELD 1
15171 EOF
15172
15173                                         ac_cv_func_sched_yield=yes
15174 else
15175   echo "$ac_t""no" 1>&6
15176 ac_cv_func_sched_yield=no
15177 fi
15178
15179                         fi
15180                         if test $ac_cv_func_sched_yield = no -a \
15181                                 $ac_cv_func_pthread_yield = no -a \
15182                                 "$ac_cv_func_thr_yield" = no ; then
15183                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15184                         fi
15185
15186                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15187 do
15188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15189 echo "configure:15190: checking for $ac_func" >&5
15190 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15191   echo $ac_n "(cached) $ac_c" 1>&6
15192 else
15193   cat > conftest.$ac_ext <<EOF
15194 #line 15195 "configure"
15195 #include "confdefs.h"
15196 /* System header to define __stub macros and hopefully few prototypes,
15197     which can conflict with char $ac_func(); below.  */
15198 #include <assert.h>
15199 /* Override any gcc2 internal prototype to avoid an error.  */
15200 /* We use char because int might match the return type of a gcc2
15201     builtin and then its argument prototype would still apply.  */
15202 char $ac_func();
15203 char (*f)();
15204
15205 int main() {
15206
15207 /* The GNU C library defines this for functions which it implements
15208     to always fail with ENOSYS.  Some functions are actually named
15209     something starting with __ and the normal name is an alias.  */
15210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15211 choke me
15212 #else
15213 f = $ac_func;
15214 #endif
15215
15216 ; return 0; }
15217 EOF
15218 if { (eval echo configure:15219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15219   rm -rf conftest*
15220   eval "ac_cv_func_$ac_func=yes"
15221 else
15222   echo "configure: failed program was:" >&5
15223   cat conftest.$ac_ext >&5
15224   rm -rf conftest*
15225   eval "ac_cv_func_$ac_func=no"
15226 fi
15227 rm -f conftest*
15228 fi
15229
15230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15231   echo "$ac_t""yes" 1>&6
15232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15233   cat >> confdefs.h <<EOF
15234 #define $ac_tr_func 1
15235 EOF
15236  
15237 else
15238   echo "$ac_t""no" 1>&6
15239 fi
15240 done
15241
15242
15243                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15244 echo "configure:15245: checking for pthread_detach with <pthread.h>" >&5
15245 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15246   echo $ac_n "(cached) $ac_c" 1>&6
15247 else
15248   
15249                                                                 cat > conftest.$ac_ext <<EOF
15250 #line 15251 "configure"
15251 #include "confdefs.h"
15252
15253 #include <pthread.h>
15254 #ifndef NULL
15255 #define NULL (void*)0
15256 #endif
15257
15258 int main() {
15259 pthread_detach(NULL);
15260 ; return 0; }
15261 EOF
15262 if { (eval echo configure:15263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15263   rm -rf conftest*
15264   ol_cv_func_pthread_detach=yes
15265 else
15266   echo "configure: failed program was:" >&5
15267   cat conftest.$ac_ext >&5
15268   rm -rf conftest*
15269   ol_cv_func_pthread_detach=no
15270 fi
15271 rm -f conftest*
15272                         
15273 fi
15274
15275 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15276
15277                         if test $ol_cv_func_pthread_detach = no ; then
15278                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15279                         fi
15280
15281                         cat >> confdefs.h <<\EOF
15282 #define HAVE_PTHREAD_DETACH 1
15283 EOF
15284
15285
15286                                                 for ac_func in \
15287                                 pthread_setconcurrency \
15288                                 pthread_getconcurrency \
15289                                 thr_setconcurrency \
15290                                 thr_getconcurrency \
15291                         
15292 do
15293 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15294 echo "configure:15295: checking for $ac_func" >&5
15295 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15296   echo $ac_n "(cached) $ac_c" 1>&6
15297 else
15298   cat > conftest.$ac_ext <<EOF
15299 #line 15300 "configure"
15300 #include "confdefs.h"
15301 /* System header to define __stub macros and hopefully few prototypes,
15302     which can conflict with char $ac_func(); below.  */
15303 #include <assert.h>
15304 /* Override any gcc2 internal prototype to avoid an error.  */
15305 /* We use char because int might match the return type of a gcc2
15306     builtin and then its argument prototype would still apply.  */
15307 char $ac_func();
15308 char (*f)();
15309
15310 int main() {
15311
15312 /* The GNU C library defines this for functions which it implements
15313     to always fail with ENOSYS.  Some functions are actually named
15314     something starting with __ and the normal name is an alias.  */
15315 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15316 choke me
15317 #else
15318 f = $ac_func;
15319 #endif
15320
15321 ; return 0; }
15322 EOF
15323 if { (eval echo configure:15324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15324   rm -rf conftest*
15325   eval "ac_cv_func_$ac_func=yes"
15326 else
15327   echo "configure: failed program was:" >&5
15328   cat conftest.$ac_ext >&5
15329   rm -rf conftest*
15330   eval "ac_cv_func_$ac_func=no"
15331 fi
15332 rm -f conftest*
15333 fi
15334
15335 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15336   echo "$ac_t""yes" 1>&6
15337     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15338   cat >> confdefs.h <<EOF
15339 #define $ac_tr_func 1
15340 EOF
15341  
15342 else
15343   echo "$ac_t""no" 1>&6
15344 fi
15345 done
15346
15347
15348                         
15349         for ac_func in pthread_kill_other_threads_np
15350 do
15351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15352 echo "configure:15353: checking for $ac_func" >&5
15353 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15354   echo $ac_n "(cached) $ac_c" 1>&6
15355 else
15356   cat > conftest.$ac_ext <<EOF
15357 #line 15358 "configure"
15358 #include "confdefs.h"
15359 /* System header to define __stub macros and hopefully few prototypes,
15360     which can conflict with char $ac_func(); below.  */
15361 #include <assert.h>
15362 /* Override any gcc2 internal prototype to avoid an error.  */
15363 /* We use char because int might match the return type of a gcc2
15364     builtin and then its argument prototype would still apply.  */
15365 char $ac_func();
15366 char (*f)();
15367
15368 int main() {
15369
15370 /* The GNU C library defines this for functions which it implements
15371     to always fail with ENOSYS.  Some functions are actually named
15372     something starting with __ and the normal name is an alias.  */
15373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15374 choke me
15375 #else
15376 f = $ac_func;
15377 #endif
15378
15379 ; return 0; }
15380 EOF
15381 if { (eval echo configure:15382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15382   rm -rf conftest*
15383   eval "ac_cv_func_$ac_func=yes"
15384 else
15385   echo "configure: failed program was:" >&5
15386   cat conftest.$ac_ext >&5
15387   rm -rf conftest*
15388   eval "ac_cv_func_$ac_func=no"
15389 fi
15390 rm -f conftest*
15391 fi
15392
15393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15394   echo "$ac_t""yes" 1>&6
15395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15396   cat >> confdefs.h <<EOF
15397 #define $ac_tr_func 1
15398 EOF
15399  
15400 else
15401   echo "$ac_t""no" 1>&6
15402 fi
15403 done
15404
15405         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15406 echo "configure:15407: checking for LinuxThreads implementation" >&5
15407 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15408   echo $ac_n "(cached) $ac_c" 1>&6
15409 else
15410   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15411 fi
15412
15413 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15414
15415                         
15416         
15417         
15418         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15419 echo "configure:15420: checking for LinuxThreads consistency" >&5
15420 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15421   echo $ac_n "(cached) $ac_c" 1>&6
15422 else
15423   
15424                 if test $ol_cv_header_linux_threads = yes -a \
15425                         $ol_cv_sys_linux_threads = yes; then
15426                         ol_cv_linux_threads=yes
15427                 elif test $ol_cv_header_linux_threads = no -a \
15428                         $ol_cv_sys_linux_threads = no; then
15429                         ol_cv_linux_threads=no
15430                 else
15431                         ol_cv_linux_threads=error
15432                 fi
15433         
15434 fi
15435
15436 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15437
15438
15439                         if test $ol_cv_linux_threads = error; then
15440                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15441                         fi
15442
15443                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15444 echo "configure:15445: checking if pthread_create() works" >&5
15445 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15446   echo $ac_n "(cached) $ac_c" 1>&6
15447 else
15448   
15449                         if test "$cross_compiling" = yes; then
15450                                 ol_cv_pthread_create_works=yes
15451 else
15452   cat > conftest.$ac_ext <<EOF
15453 #line 15454 "configure"
15454 #include "confdefs.h"
15455 /* pthread test headers */
15456 #include <pthread.h>
15457 #if HAVE_PTHREADS < 7
15458 #include <errno.h>
15459 #endif
15460 #ifndef NULL
15461 #define NULL (void*)0
15462 #endif
15463
15464 static void *task(p)
15465         void *p;
15466 {
15467         return (void *) (p == NULL);
15468 }
15469
15470
15471 int main(argc, argv)
15472         int argc;
15473         char **argv;
15474 {
15475
15476         /* pthread test function */
15477 #ifndef PTHREAD_CREATE_DETACHED
15478 #define PTHREAD_CREATE_DETACHED 1
15479 #endif
15480         pthread_t t;
15481         int status;
15482         int detach = PTHREAD_CREATE_DETACHED;
15483
15484 #if HAVE_PTHREADS > 4
15485         /* Final pthreads */
15486         pthread_attr_t attr;
15487
15488         status = pthread_attr_init(&attr);
15489         if( status ) return status;
15490
15491 #if HAVE_PTHREADS < 7
15492         status = pthread_attr_setdetachstate(&attr, &detach);
15493         if( status < 0 ) status = errno;
15494 #else
15495         status = pthread_attr_setdetachstate(&attr, detach);
15496 #endif
15497         if( status ) return status;
15498         status = pthread_create( &t, &attr, task, NULL );
15499 #if HAVE_PTHREADS < 7
15500         if( status < 0 ) status = errno;
15501 #endif
15502         if( status ) return status;
15503 #else
15504         /* Draft 4 pthreads */
15505         status = pthread_create( &t, pthread_attr_default, task, NULL );
15506         if( status ) return errno;
15507
15508         /* give thread a chance to complete */
15509         /* it should remain joinable and hence detachable */
15510         sleep( 1 );
15511
15512         status = pthread_detach( &t );
15513         if( status ) return errno;
15514 #endif
15515
15516 #ifdef HAVE_LINUX_THREADS
15517         pthread_kill_other_threads_np();
15518 #endif
15519
15520         return 0;
15521
15522 }
15523
15524 EOF
15525 if { (eval echo configure:15526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15526 then
15527   ol_cv_pthread_create_works=yes
15528 else
15529   echo "configure: failed program was:" >&5
15530   cat conftest.$ac_ext >&5
15531   rm -fr conftest*
15532   ol_cv_pthread_create_works=no
15533 fi
15534 rm -fr conftest*
15535 fi
15536
15537 fi
15538
15539 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15540
15541                         if test $ol_cv_pthread_create_works = no ; then
15542                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15543                         fi
15544
15545                                                 if test $ol_with_yielding_select = auto ; then
15546                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15547 echo "configure:15548: checking if select yields when using pthreads" >&5
15548 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15549   echo $ac_n "(cached) $ac_c" 1>&6
15550 else
15551   
15552                                 if test "$cross_compiling" = yes; then
15553   ol_cv_pthread_select_yields=cross
15554 else
15555   cat > conftest.$ac_ext <<EOF
15556 #line 15557 "configure"
15557 #include "confdefs.h"
15558
15559 #include <sys/types.h>
15560 #include <sys/time.h>
15561 #include <unistd.h>
15562 #include <pthread.h>
15563 #ifndef NULL
15564 #define NULL (void*) 0
15565 #endif
15566
15567 static int fildes[2];
15568
15569 static void *task(p)
15570         void *p;
15571 {
15572         int i;
15573         struct timeval tv;
15574
15575         fd_set rfds;
15576
15577         tv.tv_sec=10;
15578         tv.tv_usec=0;
15579
15580         FD_ZERO(&rfds);
15581         FD_SET(fildes[0], &rfds);
15582
15583         /* we're not interested in any fds */
15584         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15585
15586         if(i < 0) {
15587                 perror("select");
15588                 exit(10);
15589         }
15590
15591         exit(0); /* if we exit here, the select blocked the whole process */
15592 }
15593
15594 int main(argc, argv)
15595         int argc;
15596         char **argv;
15597 {
15598         pthread_t t;
15599
15600         /* create a pipe to select */
15601         if(pipe(&fildes[0])) {
15602                 perror("select");
15603                 exit(1);
15604         }
15605
15606 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15607         (void) pthread_setconcurrency(2);
15608 #else
15609 #ifdef HAVE_THR_SETCONCURRENCY
15610         /* Set Solaris LWP concurrency to 2 */
15611         thr_setconcurrency(2);
15612 #endif
15613 #endif
15614
15615 #if HAVE_PTHREADS < 6
15616         pthread_create(&t, pthread_attr_default, task, NULL);
15617 #else
15618         pthread_create(&t, NULL, task, NULL);
15619 #endif
15620
15621         /* make sure task runs first */
15622 #if HAVE_THR_YIELD
15623         thr_yield();
15624 #elif defined( HAVE_SCHED_YIELD )
15625         sched_yield();
15626 #elif defined( HAVE_PTHREAD_YIELD )
15627         pthread_yield();
15628 #endif
15629
15630         exit(2);
15631 }
15632 EOF
15633 if { (eval echo configure:15634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15634 then
15635   ol_cv_pthread_select_yields=no
15636 else
15637   echo "configure: failed program was:" >&5
15638   cat conftest.$ac_ext >&5
15639   rm -fr conftest*
15640   ol_cv_pthread_select_yields=yes
15641 fi
15642 rm -fr conftest*
15643 fi
15644
15645 fi
15646
15647 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15648
15649                                 if test $ol_cv_pthread_select_yields = cross ; then
15650                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15651                                 fi
15652
15653                                 if test $ol_cv_pthread_select_yields = yes ; then
15654                                         ol_with_yielding_select=yes
15655                                 fi
15656                         fi
15657
15658                                                 CPPFLAGS="$save_CPPFLAGS"
15659                         LIBS="$save_LIBS"
15660                 else
15661                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15662                 fi
15663         fi
15664
15665         if test $ol_with_threads = posix ; then
15666                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15667         fi
15668 fi
15669
15670 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15671         -o $ol_with_threads = mach ; then
15672
15673                 for ac_hdr in mach/cthreads.h cthreads.h
15674 do
15675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15677 echo "configure:15678: checking for $ac_hdr" >&5
15678 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15679   echo $ac_n "(cached) $ac_c" 1>&6
15680 else
15681   cat > conftest.$ac_ext <<EOF
15682 #line 15683 "configure"
15683 #include "confdefs.h"
15684 #include <$ac_hdr>
15685 EOF
15686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15687 { (eval echo configure:15688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15689 if test -z "$ac_err"; then
15690   rm -rf conftest*
15691   eval "ac_cv_header_$ac_safe=yes"
15692 else
15693   echo "$ac_err" >&5
15694   echo "configure: failed program was:" >&5
15695   cat conftest.$ac_ext >&5
15696   rm -rf conftest*
15697   eval "ac_cv_header_$ac_safe=no"
15698 fi
15699 rm -f conftest*
15700 fi
15701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15702   echo "$ac_t""yes" 1>&6
15703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15704   cat >> confdefs.h <<EOF
15705 #define $ac_tr_hdr 1
15706 EOF
15707  
15708 else
15709   echo "$ac_t""no" 1>&6
15710 fi
15711 done
15712
15713         if test $ac_cv_header_mach_cthreads_h = yes ; then
15714                 ol_with_threads=found
15715
15716                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15717 echo "configure:15718: checking for cthread_fork" >&5
15718 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15719   echo $ac_n "(cached) $ac_c" 1>&6
15720 else
15721   cat > conftest.$ac_ext <<EOF
15722 #line 15723 "configure"
15723 #include "confdefs.h"
15724 /* System header to define __stub macros and hopefully few prototypes,
15725     which can conflict with char cthread_fork(); below.  */
15726 #include <assert.h>
15727 /* Override any gcc2 internal prototype to avoid an error.  */
15728 /* We use char because int might match the return type of a gcc2
15729     builtin and then its argument prototype would still apply.  */
15730 char cthread_fork();
15731 char (*f)();
15732
15733 int main() {
15734
15735 /* The GNU C library defines this for functions which it implements
15736     to always fail with ENOSYS.  Some functions are actually named
15737     something starting with __ and the normal name is an alias.  */
15738 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15739 choke me
15740 #else
15741 f = cthread_fork;
15742 #endif
15743
15744 ; return 0; }
15745 EOF
15746 if { (eval echo configure:15747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15747   rm -rf conftest*
15748   eval "ac_cv_func_cthread_fork=yes"
15749 else
15750   echo "configure: failed program was:" >&5
15751   cat conftest.$ac_ext >&5
15752   rm -rf conftest*
15753   eval "ac_cv_func_cthread_fork=no"
15754 fi
15755 rm -f conftest*
15756 fi
15757
15758 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15759   echo "$ac_t""yes" 1>&6
15760   ol_link_threads=yes
15761 else
15762   echo "$ac_t""no" 1>&6
15763 fi
15764
15765
15766                 if test $ol_link_threads = no ; then
15767                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15768 echo "configure:15769: checking for cthread_fork with -all_load" >&5
15769 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15770   echo $ac_n "(cached) $ac_c" 1>&6
15771 else
15772   
15773                                                                 save_LIBS="$LIBS"
15774                                 LIBS="-all_load $LIBS"
15775                                 cat > conftest.$ac_ext <<EOF
15776 #line 15777 "configure"
15777 #include "confdefs.h"
15778 #include <mach/cthreads.h>
15779 int main() {
15780
15781                                         cthread_fork((void *)0, (void *)0);
15782                                         
15783 ; return 0; }
15784 EOF
15785 if { (eval echo configure:15786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15786   rm -rf conftest*
15787   ol_cv_cthread_all_load=yes
15788 else
15789   echo "configure: failed program was:" >&5
15790   cat conftest.$ac_ext >&5
15791   rm -rf conftest*
15792   ol_cv_cthread_all_load=no
15793 fi
15794 rm -f conftest*
15795                                                                 LIBS="$save_LIBS"
15796                         
15797 fi
15798
15799 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15800
15801                         if test $ol_cv_cthread_all_load = yes ; then
15802                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15803                                 ol_link_threads=mach
15804                                 ol_with_threads=found
15805                         fi
15806                 fi
15807
15808         elif test $ac_cv_header_cthreads_h = yes ; then
15809                                 
15810                 ol_with_threads=found
15811  
15812                                 save_LIBS="$LIBS"
15813                 LIBS="$LIBS -lthreads"
15814                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15815 echo "configure:15816: checking for cthread_fork" >&5
15816 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15817   echo $ac_n "(cached) $ac_c" 1>&6
15818 else
15819   cat > conftest.$ac_ext <<EOF
15820 #line 15821 "configure"
15821 #include "confdefs.h"
15822 /* System header to define __stub macros and hopefully few prototypes,
15823     which can conflict with char cthread_fork(); below.  */
15824 #include <assert.h>
15825 /* Override any gcc2 internal prototype to avoid an error.  */
15826 /* We use char because int might match the return type of a gcc2
15827     builtin and then its argument prototype would still apply.  */
15828 char cthread_fork();
15829 char (*f)();
15830
15831 int main() {
15832
15833 /* The GNU C library defines this for functions which it implements
15834     to always fail with ENOSYS.  Some functions are actually named
15835     something starting with __ and the normal name is an alias.  */
15836 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15837 choke me
15838 #else
15839 f = cthread_fork;
15840 #endif
15841
15842 ; return 0; }
15843 EOF
15844 if { (eval echo configure:15845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15845   rm -rf conftest*
15846   eval "ac_cv_func_cthread_fork=yes"
15847 else
15848   echo "configure: failed program was:" >&5
15849   cat conftest.$ac_ext >&5
15850   rm -rf conftest*
15851   eval "ac_cv_func_cthread_fork=no"
15852 fi
15853 rm -f conftest*
15854 fi
15855
15856 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15857   echo "$ac_t""yes" 1>&6
15858   ol_link_threads=yes
15859 else
15860   echo "$ac_t""no" 1>&6
15861 fi
15862
15863                 LIBS="$save_LIBS"
15864
15865                 if test $ol_link_threads = yes ; then
15866                         LTHREAD_LIBS="-lthreads"
15867                         ol_link_threads=mach
15868                         ol_with_threads=found
15869                 else
15870                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15871                 fi
15872
15873         elif test $ol_with_threads = mach ; then
15874                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15875         fi
15876
15877         if test $ol_link_threads = mach ; then
15878                 cat >> confdefs.h <<\EOF
15879 #define HAVE_MACH_CTHREADS 1
15880 EOF
15881
15882         elif test $ol_with_threads = found ; then
15883                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15884         fi
15885 fi
15886
15887 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15888         -o $ol_with_threads = pth ; then
15889
15890         for ac_hdr in pth.h
15891 do
15892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15894 echo "configure:15895: checking for $ac_hdr" >&5
15895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15896   echo $ac_n "(cached) $ac_c" 1>&6
15897 else
15898   cat > conftest.$ac_ext <<EOF
15899 #line 15900 "configure"
15900 #include "confdefs.h"
15901 #include <$ac_hdr>
15902 EOF
15903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15904 { (eval echo configure:15905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15906 if test -z "$ac_err"; then
15907   rm -rf conftest*
15908   eval "ac_cv_header_$ac_safe=yes"
15909 else
15910   echo "$ac_err" >&5
15911   echo "configure: failed program was:" >&5
15912   cat conftest.$ac_ext >&5
15913   rm -rf conftest*
15914   eval "ac_cv_header_$ac_safe=no"
15915 fi
15916 rm -f conftest*
15917 fi
15918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15919   echo "$ac_t""yes" 1>&6
15920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15921   cat >> confdefs.h <<EOF
15922 #define $ac_tr_hdr 1
15923 EOF
15924  
15925 else
15926   echo "$ac_t""no" 1>&6
15927 fi
15928 done
15929
15930
15931         if test $ac_cv_header_pth_h = yes ; then
15932                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15933 echo "configure:15934: checking for pth_version in -lpth" >&5
15934 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15936   echo $ac_n "(cached) $ac_c" 1>&6
15937 else
15938   ac_save_LIBS="$LIBS"
15939 LIBS="-lpth  $LIBS"
15940 cat > conftest.$ac_ext <<EOF
15941 #line 15942 "configure"
15942 #include "confdefs.h"
15943 /* Override any gcc2 internal prototype to avoid an error.  */
15944 /* We use char because int might match the return type of a gcc2
15945     builtin and then its argument prototype would still apply.  */
15946 char pth_version();
15947
15948 int main() {
15949 pth_version()
15950 ; return 0; }
15951 EOF
15952 if { (eval echo configure:15953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15953   rm -rf conftest*
15954   eval "ac_cv_lib_$ac_lib_var=yes"
15955 else
15956   echo "configure: failed program was:" >&5
15957   cat conftest.$ac_ext >&5
15958   rm -rf conftest*
15959   eval "ac_cv_lib_$ac_lib_var=no"
15960 fi
15961 rm -f conftest*
15962 LIBS="$ac_save_LIBS"
15963
15964 fi
15965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15966   echo "$ac_t""yes" 1>&6
15967   have_pth=yes
15968 else
15969   echo "$ac_t""no" 1>&6
15970 have_pth=no
15971 fi
15972
15973
15974                 if test $have_pth = yes ; then
15975                         cat >> confdefs.h <<\EOF
15976 #define HAVE_GNU_PTH 1
15977 EOF
15978
15979                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15980                         ol_link_threads=pth
15981                         ol_with_threads=found
15982
15983                         if test $ol_with_yielding_select = auto ; then
15984                                 ol_with_yielding_select=yes
15985                         fi
15986                 fi
15987         fi
15988 fi
15989
15990 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15991         -o $ol_with_threads = lwp ; then
15992
15993                 for ac_hdr in thread.h synch.h
15994 do
15995 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15996 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15997 echo "configure:15998: checking for $ac_hdr" >&5
15998 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15999   echo $ac_n "(cached) $ac_c" 1>&6
16000 else
16001   cat > conftest.$ac_ext <<EOF
16002 #line 16003 "configure"
16003 #include "confdefs.h"
16004 #include <$ac_hdr>
16005 EOF
16006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16007 { (eval echo configure:16008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16009 if test -z "$ac_err"; then
16010   rm -rf conftest*
16011   eval "ac_cv_header_$ac_safe=yes"
16012 else
16013   echo "$ac_err" >&5
16014   echo "configure: failed program was:" >&5
16015   cat conftest.$ac_ext >&5
16016   rm -rf conftest*
16017   eval "ac_cv_header_$ac_safe=no"
16018 fi
16019 rm -f conftest*
16020 fi
16021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16022   echo "$ac_t""yes" 1>&6
16023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16024   cat >> confdefs.h <<EOF
16025 #define $ac_tr_hdr 1
16026 EOF
16027  
16028 else
16029   echo "$ac_t""no" 1>&6
16030 fi
16031 done
16032
16033         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16034                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16035 echo "configure:16036: checking for thr_create in -lthread" >&5
16036 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16038   echo $ac_n "(cached) $ac_c" 1>&6
16039 else
16040   ac_save_LIBS="$LIBS"
16041 LIBS="-lthread  $LIBS"
16042 cat > conftest.$ac_ext <<EOF
16043 #line 16044 "configure"
16044 #include "confdefs.h"
16045 /* Override any gcc2 internal prototype to avoid an error.  */
16046 /* We use char because int might match the return type of a gcc2
16047     builtin and then its argument prototype would still apply.  */
16048 char thr_create();
16049
16050 int main() {
16051 thr_create()
16052 ; return 0; }
16053 EOF
16054 if { (eval echo configure:16055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16055   rm -rf conftest*
16056   eval "ac_cv_lib_$ac_lib_var=yes"
16057 else
16058   echo "configure: failed program was:" >&5
16059   cat conftest.$ac_ext >&5
16060   rm -rf conftest*
16061   eval "ac_cv_lib_$ac_lib_var=no"
16062 fi
16063 rm -f conftest*
16064 LIBS="$ac_save_LIBS"
16065
16066 fi
16067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16068   echo "$ac_t""yes" 1>&6
16069   have_thr=yes
16070 else
16071   echo "$ac_t""no" 1>&6
16072 have_thr=no
16073 fi
16074
16075
16076                 if test $have_thr = yes ; then
16077                         cat >> confdefs.h <<\EOF
16078 #define HAVE_THR 1
16079 EOF
16080
16081                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16082                         ol_link_threads=thr
16083
16084                         if test $ol_with_yielding_select = auto ; then
16085                                 ol_with_yielding_select=yes
16086                         fi
16087
16088                                                 for ac_func in \
16089                                 thr_setconcurrency \
16090                                 thr_getconcurrency \
16091                         
16092 do
16093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16094 echo "configure:16095: checking for $ac_func" >&5
16095 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16096   echo $ac_n "(cached) $ac_c" 1>&6
16097 else
16098   cat > conftest.$ac_ext <<EOF
16099 #line 16100 "configure"
16100 #include "confdefs.h"
16101 /* System header to define __stub macros and hopefully few prototypes,
16102     which can conflict with char $ac_func(); below.  */
16103 #include <assert.h>
16104 /* Override any gcc2 internal prototype to avoid an error.  */
16105 /* We use char because int might match the return type of a gcc2
16106     builtin and then its argument prototype would still apply.  */
16107 char $ac_func();
16108 char (*f)();
16109
16110 int main() {
16111
16112 /* The GNU C library defines this for functions which it implements
16113     to always fail with ENOSYS.  Some functions are actually named
16114     something starting with __ and the normal name is an alias.  */
16115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16116 choke me
16117 #else
16118 f = $ac_func;
16119 #endif
16120
16121 ; return 0; }
16122 EOF
16123 if { (eval echo configure:16124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16124   rm -rf conftest*
16125   eval "ac_cv_func_$ac_func=yes"
16126 else
16127   echo "configure: failed program was:" >&5
16128   cat conftest.$ac_ext >&5
16129   rm -rf conftest*
16130   eval "ac_cv_func_$ac_func=no"
16131 fi
16132 rm -f conftest*
16133 fi
16134
16135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16136   echo "$ac_t""yes" 1>&6
16137     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16138   cat >> confdefs.h <<EOF
16139 #define $ac_tr_func 1
16140 EOF
16141  
16142 else
16143   echo "$ac_t""no" 1>&6
16144 fi
16145 done
16146
16147                 fi
16148         fi
16149
16150                 for ac_hdr in lwp/lwp.h
16151 do
16152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16154 echo "configure:16155: checking for $ac_hdr" >&5
16155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16156   echo $ac_n "(cached) $ac_c" 1>&6
16157 else
16158   cat > conftest.$ac_ext <<EOF
16159 #line 16160 "configure"
16160 #include "confdefs.h"
16161 #include <$ac_hdr>
16162 EOF
16163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16164 { (eval echo configure:16165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16166 if test -z "$ac_err"; then
16167   rm -rf conftest*
16168   eval "ac_cv_header_$ac_safe=yes"
16169 else
16170   echo "$ac_err" >&5
16171   echo "configure: failed program was:" >&5
16172   cat conftest.$ac_ext >&5
16173   rm -rf conftest*
16174   eval "ac_cv_header_$ac_safe=no"
16175 fi
16176 rm -f conftest*
16177 fi
16178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16179   echo "$ac_t""yes" 1>&6
16180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16181   cat >> confdefs.h <<EOF
16182 #define $ac_tr_hdr 1
16183 EOF
16184  
16185 else
16186   echo "$ac_t""no" 1>&6
16187 fi
16188 done
16189
16190         if test $ac_cv_header_lwp_lwp_h = yes ; then
16191                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16192 echo "configure:16193: checking for lwp_create in -llwp" >&5
16193 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16195   echo $ac_n "(cached) $ac_c" 1>&6
16196 else
16197   ac_save_LIBS="$LIBS"
16198 LIBS="-llwp  $LIBS"
16199 cat > conftest.$ac_ext <<EOF
16200 #line 16201 "configure"
16201 #include "confdefs.h"
16202 /* Override any gcc2 internal prototype to avoid an error.  */
16203 /* We use char because int might match the return type of a gcc2
16204     builtin and then its argument prototype would still apply.  */
16205 char lwp_create();
16206
16207 int main() {
16208 lwp_create()
16209 ; return 0; }
16210 EOF
16211 if { (eval echo configure:16212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16212   rm -rf conftest*
16213   eval "ac_cv_lib_$ac_lib_var=yes"
16214 else
16215   echo "configure: failed program was:" >&5
16216   cat conftest.$ac_ext >&5
16217   rm -rf conftest*
16218   eval "ac_cv_lib_$ac_lib_var=no"
16219 fi
16220 rm -f conftest*
16221 LIBS="$ac_save_LIBS"
16222
16223 fi
16224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16225   echo "$ac_t""yes" 1>&6
16226   have_lwp=yes
16227 else
16228   echo "$ac_t""no" 1>&6
16229 have_lwp=no
16230 fi
16231
16232
16233                 if test $have_lwp = yes ; then
16234                         cat >> confdefs.h <<\EOF
16235 #define HAVE_LWP 1
16236 EOF
16237
16238                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16239                         ol_link_threads=lwp
16240
16241                         if test $ol_with_yielding_select = auto ; then
16242                                 ol_with_yielding_select=no
16243                         fi
16244                 fi
16245         fi
16246 fi
16247
16248 if test $ol_with_yielding_select = yes ; then
16249         cat >> confdefs.h <<\EOF
16250 #define HAVE_YIELDING_SELECT 1
16251 EOF
16252
16253 fi
16254
16255 if test $ol_with_threads = manual ; then
16256                 ol_link_threads=yes
16257
16258         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16259
16260         for ac_hdr in pthread.h sched.h
16261 do
16262 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16263 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16264 echo "configure:16265: checking for $ac_hdr" >&5
16265 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16266   echo $ac_n "(cached) $ac_c" 1>&6
16267 else
16268   cat > conftest.$ac_ext <<EOF
16269 #line 16270 "configure"
16270 #include "confdefs.h"
16271 #include <$ac_hdr>
16272 EOF
16273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16274 { (eval echo configure:16275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16276 if test -z "$ac_err"; then
16277   rm -rf conftest*
16278   eval "ac_cv_header_$ac_safe=yes"
16279 else
16280   echo "$ac_err" >&5
16281   echo "configure: failed program was:" >&5
16282   cat conftest.$ac_ext >&5
16283   rm -rf conftest*
16284   eval "ac_cv_header_$ac_safe=no"
16285 fi
16286 rm -f conftest*
16287 fi
16288 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16289   echo "$ac_t""yes" 1>&6
16290     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16291   cat >> confdefs.h <<EOF
16292 #define $ac_tr_hdr 1
16293 EOF
16294  
16295 else
16296   echo "$ac_t""no" 1>&6
16297 fi
16298 done
16299
16300         for ac_func in sched_yield pthread_yield
16301 do
16302 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16303 echo "configure:16304: checking for $ac_func" >&5
16304 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16305   echo $ac_n "(cached) $ac_c" 1>&6
16306 else
16307   cat > conftest.$ac_ext <<EOF
16308 #line 16309 "configure"
16309 #include "confdefs.h"
16310 /* System header to define __stub macros and hopefully few prototypes,
16311     which can conflict with char $ac_func(); below.  */
16312 #include <assert.h>
16313 /* Override any gcc2 internal prototype to avoid an error.  */
16314 /* We use char because int might match the return type of a gcc2
16315     builtin and then its argument prototype would still apply.  */
16316 char $ac_func();
16317 char (*f)();
16318
16319 int main() {
16320
16321 /* The GNU C library defines this for functions which it implements
16322     to always fail with ENOSYS.  Some functions are actually named
16323     something starting with __ and the normal name is an alias.  */
16324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16325 choke me
16326 #else
16327 f = $ac_func;
16328 #endif
16329
16330 ; return 0; }
16331 EOF
16332 if { (eval echo configure:16333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16333   rm -rf conftest*
16334   eval "ac_cv_func_$ac_func=yes"
16335 else
16336   echo "configure: failed program was:" >&5
16337   cat conftest.$ac_ext >&5
16338   rm -rf conftest*
16339   eval "ac_cv_func_$ac_func=no"
16340 fi
16341 rm -f conftest*
16342 fi
16343
16344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16345   echo "$ac_t""yes" 1>&6
16346     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16347   cat >> confdefs.h <<EOF
16348 #define $ac_tr_func 1
16349 EOF
16350  
16351 else
16352   echo "$ac_t""no" 1>&6
16353 fi
16354 done
16355
16356         
16357         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16358 echo "configure:16359: checking for LinuxThreads pthread.h" >&5
16359 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16360   echo $ac_n "(cached) $ac_c" 1>&6
16361 else
16362   cat > conftest.$ac_ext <<EOF
16363 #line 16364 "configure"
16364 #include "confdefs.h"
16365 #include <pthread.h>
16366 EOF
16367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16368   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16369   rm -rf conftest*
16370   ol_cv_header_linux_threads=yes
16371 else
16372   rm -rf conftest*
16373   ol_cv_header_linux_threads=no
16374 fi
16375 rm -f conftest*
16376
16377                 
16378 fi
16379
16380 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16381         if test $ol_cv_header_linux_threads = yes; then
16382                 cat >> confdefs.h <<\EOF
16383 #define HAVE_LINUX_THREADS 1
16384 EOF
16385
16386         fi
16387
16388
16389         for ac_hdr in mach/cthreads.h
16390 do
16391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16393 echo "configure:16394: checking for $ac_hdr" >&5
16394 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16395   echo $ac_n "(cached) $ac_c" 1>&6
16396 else
16397   cat > conftest.$ac_ext <<EOF
16398 #line 16399 "configure"
16399 #include "confdefs.h"
16400 #include <$ac_hdr>
16401 EOF
16402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16403 { (eval echo configure:16404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16405 if test -z "$ac_err"; then
16406   rm -rf conftest*
16407   eval "ac_cv_header_$ac_safe=yes"
16408 else
16409   echo "$ac_err" >&5
16410   echo "configure: failed program was:" >&5
16411   cat conftest.$ac_ext >&5
16412   rm -rf conftest*
16413   eval "ac_cv_header_$ac_safe=no"
16414 fi
16415 rm -f conftest*
16416 fi
16417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16418   echo "$ac_t""yes" 1>&6
16419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16420   cat >> confdefs.h <<EOF
16421 #define $ac_tr_hdr 1
16422 EOF
16423  
16424 else
16425   echo "$ac_t""no" 1>&6
16426 fi
16427 done
16428
16429         for ac_hdr in lwp/lwp.h
16430 do
16431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16433 echo "configure:16434: checking for $ac_hdr" >&5
16434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16435   echo $ac_n "(cached) $ac_c" 1>&6
16436 else
16437   cat > conftest.$ac_ext <<EOF
16438 #line 16439 "configure"
16439 #include "confdefs.h"
16440 #include <$ac_hdr>
16441 EOF
16442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16443 { (eval echo configure:16444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16445 if test -z "$ac_err"; then
16446   rm -rf conftest*
16447   eval "ac_cv_header_$ac_safe=yes"
16448 else
16449   echo "$ac_err" >&5
16450   echo "configure: failed program was:" >&5
16451   cat conftest.$ac_ext >&5
16452   rm -rf conftest*
16453   eval "ac_cv_header_$ac_safe=no"
16454 fi
16455 rm -f conftest*
16456 fi
16457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16458   echo "$ac_t""yes" 1>&6
16459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16460   cat >> confdefs.h <<EOF
16461 #define $ac_tr_hdr 1
16462 EOF
16463  
16464 else
16465   echo "$ac_t""no" 1>&6
16466 fi
16467 done
16468
16469         for ac_hdr in thread.h synch.h
16470 do
16471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16473 echo "configure:16474: checking for $ac_hdr" >&5
16474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16475   echo $ac_n "(cached) $ac_c" 1>&6
16476 else
16477   cat > conftest.$ac_ext <<EOF
16478 #line 16479 "configure"
16479 #include "confdefs.h"
16480 #include <$ac_hdr>
16481 EOF
16482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16483 { (eval echo configure:16484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16485 if test -z "$ac_err"; then
16486   rm -rf conftest*
16487   eval "ac_cv_header_$ac_safe=yes"
16488 else
16489   echo "$ac_err" >&5
16490   echo "configure: failed program was:" >&5
16491   cat conftest.$ac_ext >&5
16492   rm -rf conftest*
16493   eval "ac_cv_header_$ac_safe=no"
16494 fi
16495 rm -f conftest*
16496 fi
16497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16498   echo "$ac_t""yes" 1>&6
16499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16500   cat >> confdefs.h <<EOF
16501 #define $ac_tr_hdr 1
16502 EOF
16503  
16504 else
16505   echo "$ac_t""no" 1>&6
16506 fi
16507 done
16508
16509 fi
16510
16511 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16512                         cat >> confdefs.h <<\EOF
16513 #define REENTRANT 1
16514 EOF
16515
16516         cat >> confdefs.h <<\EOF
16517 #define _REENTRANT 1
16518 EOF
16519
16520         cat >> confdefs.h <<\EOF
16521 #define THREAD_SAFE 1
16522 EOF
16523
16524         cat >> confdefs.h <<\EOF
16525 #define _THREAD_SAFE 1
16526 EOF
16527
16528         cat >> confdefs.h <<\EOF
16529 #define THREADSAFE 1
16530 EOF
16531
16532         cat >> confdefs.h <<\EOF
16533 #define _THREADSAFE 1
16534 EOF
16535
16536         cat >> confdefs.h <<\EOF
16537 #define _SGI_MP_SOURCE 1
16538 EOF
16539
16540
16541                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16542 echo "configure:16543: checking for thread specific errno" >&5
16543 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16544   echo $ac_n "(cached) $ac_c" 1>&6
16545 else
16546   
16547                 cat > conftest.$ac_ext <<EOF
16548 #line 16549 "configure"
16549 #include "confdefs.h"
16550 #include <errno.h>
16551 int main() {
16552 errno = 0;
16553 ; return 0; }
16554 EOF
16555 if { (eval echo configure:16556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16556   rm -rf conftest*
16557   ol_cv_errno_thread_specific=yes
16558 else
16559   echo "configure: failed program was:" >&5
16560   cat conftest.$ac_ext >&5
16561   rm -rf conftest*
16562   ol_cv_errno_thread_specific=no
16563 fi
16564 rm -f conftest*
16565         
16566 fi
16567
16568 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16569
16570                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16571 echo "configure:16572: checking for thread specific h_errno" >&5
16572 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16573   echo $ac_n "(cached) $ac_c" 1>&6
16574 else
16575   
16576                 cat > conftest.$ac_ext <<EOF
16577 #line 16578 "configure"
16578 #include "confdefs.h"
16579 #include <netdb.h>
16580 int main() {
16581 h_errno = 0;
16582 ; return 0; }
16583 EOF
16584 if { (eval echo configure:16585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16585   rm -rf conftest*
16586   ol_cv_h_errno_thread_specific=yes
16587 else
16588   echo "configure: failed program was:" >&5
16589   cat conftest.$ac_ext >&5
16590   rm -rf conftest*
16591   ol_cv_h_errno_thread_specific=no
16592 fi
16593 rm -f conftest*
16594         
16595 fi
16596
16597 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16598
16599         if test $ol_cv_errno_thread_specific != yes \
16600                 -o $ol_cv_h_errno_thread_specific != yes ; then
16601                 LIBS="$LTHREAD_LIBS $LIBS"
16602                 LTHREAD_LIBS=""
16603         fi
16604
16605 fi  
16606
16607 if test $ol_link_threads = no ; then
16608         if test $ol_with_threads = yes ; then
16609                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16610         fi
16611
16612         if test $ol_with_threads = auto ; then
16613                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16614                 ol_with_threads=no
16615         fi
16616
16617         cat >> confdefs.h <<\EOF
16618 #define NO_THREADS 1
16619 EOF
16620
16621         LTHREAD_LIBS=""
16622 fi
16623
16624 if test $ol_link_threads != no ; then
16625         cat >> confdefs.h <<\EOF
16626 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16627 EOF
16628
16629 fi
16630
16631 for ac_func in \
16632         ctime_r                 \
16633         gethostbyname_r gethostbyaddr_r \
16634
16635 do
16636 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16637 echo "configure:16638: checking for $ac_func" >&5
16638 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16639   echo $ac_n "(cached) $ac_c" 1>&6
16640 else
16641   cat > conftest.$ac_ext <<EOF
16642 #line 16643 "configure"
16643 #include "confdefs.h"
16644 /* System header to define __stub macros and hopefully few prototypes,
16645     which can conflict with char $ac_func(); below.  */
16646 #include <assert.h>
16647 /* Override any gcc2 internal prototype to avoid an error.  */
16648 /* We use char because int might match the return type of a gcc2
16649     builtin and then its argument prototype would still apply.  */
16650 char $ac_func();
16651 char (*f)();
16652
16653 int main() {
16654
16655 /* The GNU C library defines this for functions which it implements
16656     to always fail with ENOSYS.  Some functions are actually named
16657     something starting with __ and the normal name is an alias.  */
16658 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16659 choke me
16660 #else
16661 f = $ac_func;
16662 #endif
16663
16664 ; return 0; }
16665 EOF
16666 if { (eval echo configure:16667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16667   rm -rf conftest*
16668   eval "ac_cv_func_$ac_func=yes"
16669 else
16670   echo "configure: failed program was:" >&5
16671   cat conftest.$ac_ext >&5
16672   rm -rf conftest*
16673   eval "ac_cv_func_$ac_func=no"
16674 fi
16675 rm -f conftest*
16676 fi
16677
16678 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16679   echo "$ac_t""yes" 1>&6
16680     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16681   cat >> confdefs.h <<EOF
16682 #define $ac_tr_func 1
16683 EOF
16684  
16685 else
16686   echo "$ac_t""no" 1>&6
16687 fi
16688 done
16689
16690
16691 if test "$ac_cv_func_ctime_r" = no ; then
16692         ol_cv_func_ctime_r_nargs=0
16693 else
16694         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16695 echo "configure:16696: checking number of arguments of ctime_r" >&5
16696 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16697   echo $ac_n "(cached) $ac_c" 1>&6
16698 else
16699   cat > conftest.$ac_ext <<EOF
16700 #line 16701 "configure"
16701 #include "confdefs.h"
16702 #include <time.h>
16703 int main() {
16704 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16705 ; return 0; }
16706 EOF
16707 if { (eval echo configure:16708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16708   rm -rf conftest*
16709   ol_cv_func_ctime_r_nargs3=yes
16710 else
16711   echo "configure: failed program was:" >&5
16712   cat conftest.$ac_ext >&5
16713   rm -rf conftest*
16714   ol_cv_func_ctime_r_nargs3=no
16715 fi
16716 rm -f conftest*
16717
16718         cat > conftest.$ac_ext <<EOF
16719 #line 16720 "configure"
16720 #include "confdefs.h"
16721 #include <time.h>
16722 int main() {
16723 time_t ti; char *buffer; ctime_r(&ti,buffer);
16724 ; return 0; }
16725 EOF
16726 if { (eval echo configure:16727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16727   rm -rf conftest*
16728   ol_cv_func_ctime_r_nargs2=yes
16729 else
16730   echo "configure: failed program was:" >&5
16731   cat conftest.$ac_ext >&5
16732   rm -rf conftest*
16733   ol_cv_func_ctime_r_nargs2=no
16734 fi
16735 rm -f conftest*
16736
16737         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16738                 $ol_cv_func_ctime_r_nargs2 = no ; then
16739
16740                 ol_cv_func_ctime_r_nargs=3
16741
16742         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16743                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16744
16745                 ol_cv_func_ctime_r_nargs=2
16746
16747         else
16748                 ol_cv_func_ctime_r_nargs=0
16749         fi
16750   
16751 fi
16752
16753 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16754
16755   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16756         cat >> confdefs.h <<EOF
16757 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16758 EOF
16759
16760   fi
16761
16762 fi
16763
16764 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16765         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16766 echo "configure:16767: checking number of arguments of gethostbyname_r" >&5
16767 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16768   echo $ac_n "(cached) $ac_c" 1>&6
16769 else
16770   cat > conftest.$ac_ext <<EOF
16771 #line 16772 "configure"
16772 #include "confdefs.h"
16773 #include <sys/types.h>
16774 #include <sys/socket.h>
16775 #include <netinet/in.h>
16776 #include <netdb.h>
16777 #define BUFSIZE (sizeof(struct hostent)+10)
16778 int main() {
16779 struct hostent hent; char buffer[BUFSIZE];
16780                 int bufsize=BUFSIZE;int h_errno;
16781                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16782                         buffer, bufsize, &h_errno);
16783 ; return 0; }
16784 EOF
16785 if { (eval echo configure:16786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16786   rm -rf conftest*
16787   ol_cv_func_gethostbyname_r_nargs5=yes
16788 else
16789   echo "configure: failed program was:" >&5
16790   cat conftest.$ac_ext >&5
16791   rm -rf conftest*
16792   ol_cv_func_gethostbyname_r_nargs5=no
16793 fi
16794 rm -f conftest*
16795
16796         cat > conftest.$ac_ext <<EOF
16797 #line 16798 "configure"
16798 #include "confdefs.h"
16799 #include <sys/types.h>
16800 #include <sys/socket.h>
16801 #include <netinet/in.h>
16802 #include <netdb.h>
16803 #define BUFSIZE (sizeof(struct hostent)+10)
16804 int main() {
16805 struct hostent hent;struct hostent *rhent;
16806                 char buffer[BUFSIZE];
16807                 int bufsize=BUFSIZE;int h_errno;
16808                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16809                         &rhent, &h_errno);
16810 ; return 0; }
16811 EOF
16812 if { (eval echo configure:16813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16813   rm -rf conftest*
16814   ol_cv_func_gethostbyname_r_nargs6=yes
16815 else
16816   echo "configure: failed program was:" >&5
16817   cat conftest.$ac_ext >&5
16818   rm -rf conftest*
16819   ol_cv_func_gethostbyname_r_nargs6=no
16820 fi
16821 rm -f conftest*
16822
16823         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16824                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16825
16826                 ol_cv_func_gethostbyname_r_nargs=5
16827
16828         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16829                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16830
16831                 ol_cv_func_gethostbyname_r_nargs=6
16832
16833         else
16834                 ol_cv_func_gethostbyname_r_nargs=0
16835         fi
16836   
16837 fi
16838
16839 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16840   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16841         cat >> confdefs.h <<EOF
16842 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16843 EOF
16844
16845   fi
16846
16847 else
16848         ol_cv_func_gethostbyname_r_nargs=0
16849 fi
16850  
16851 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16852         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16853 echo "configure:16854: checking number of arguments of gethostbyaddr_r" >&5
16854 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16855   echo $ac_n "(cached) $ac_c" 1>&6
16856 else
16857   cat > conftest.$ac_ext <<EOF
16858 #line 16859 "configure"
16859 #include "confdefs.h"
16860 #include <sys/types.h>
16861 #include <sys/socket.h>
16862 #include <netinet/in.h>
16863 #include <netdb.h>
16864 #define BUFSIZE (sizeof(struct hostent)+10)
16865 int main() {
16866 struct hostent hent; char buffer[BUFSIZE]; 
16867             struct in_addr add;
16868             size_t alen=sizeof(struct in_addr);
16869             int bufsize=BUFSIZE;int h_errno;
16870                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16871                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16872 ; return 0; }
16873 EOF
16874 if { (eval echo configure:16875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16875   rm -rf conftest*
16876   ol_cv_func_gethostbyaddr_r_nargs7=yes
16877 else
16878   echo "configure: failed program was:" >&5
16879   cat conftest.$ac_ext >&5
16880   rm -rf conftest*
16881   ol_cv_func_gethostbyaddr_r_nargs7=no
16882 fi
16883 rm -f conftest*
16884
16885         cat > conftest.$ac_ext <<EOF
16886 #line 16887 "configure"
16887 #include "confdefs.h"
16888 #include <sys/types.h>
16889 #include <sys/socket.h>
16890 #include <netinet/in.h>
16891 #include <netdb.h>
16892 #define BUFSIZE (sizeof(struct hostent)+10)
16893 int main() {
16894 struct hostent hent;
16895                 struct hostent *rhent; char buffer[BUFSIZE]; 
16896                 struct in_addr add;
16897                 size_t alen=sizeof(struct in_addr);
16898                 int bufsize=BUFSIZE;int h_errno;
16899                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16900                         alen, AF_INET, &hent, buffer, bufsize, 
16901                         &rhent, &h_errno);
16902 ; return 0; }
16903 EOF
16904 if { (eval echo configure:16905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16905   rm -rf conftest*
16906   ol_cv_func_gethostbyaddr_r_nargs8=yes
16907 else
16908   echo "configure: failed program was:" >&5
16909   cat conftest.$ac_ext >&5
16910   rm -rf conftest*
16911   ol_cv_func_gethostbyaddr_r_nargs8=no
16912 fi
16913 rm -f conftest*
16914
16915         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16916                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16917
16918                 ol_cv_func_gethostbyaddr_r_nargs=7
16919
16920         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16921                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16922
16923                 ol_cv_func_gethostbyaddr_r_nargs=8
16924
16925         else
16926                 ol_cv_func_gethostbyaddr_r_nargs=0
16927         fi
16928   
16929 fi
16930
16931 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16932   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16933     cat >> confdefs.h <<EOF
16934 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16935 EOF
16936
16937   fi
16938
16939 else
16940         ol_cv_func_gethostbyaddr_r_nargs=0
16941 fi
16942
16943 ol_link_ldbm=no 
16944
16945 if test $ol_with_ldbm_api = auto \
16946         -o $ol_with_ldbm_api = berkeley \
16947         -o $ol_with_ldbm_api = bcompat ; then
16948
16949         if test $ol_with_ldbm_api = bcompat; then \
16950                 for ac_hdr in db_185.h db.h
16951 do
16952 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16953 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16954 echo "configure:16955: checking for $ac_hdr" >&5
16955 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16956   echo $ac_n "(cached) $ac_c" 1>&6
16957 else
16958   cat > conftest.$ac_ext <<EOF
16959 #line 16960 "configure"
16960 #include "confdefs.h"
16961 #include <$ac_hdr>
16962 EOF
16963 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16964 { (eval echo configure:16965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16965 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16966 if test -z "$ac_err"; then
16967   rm -rf conftest*
16968   eval "ac_cv_header_$ac_safe=yes"
16969 else
16970   echo "$ac_err" >&5
16971   echo "configure: failed program was:" >&5
16972   cat conftest.$ac_ext >&5
16973   rm -rf conftest*
16974   eval "ac_cv_header_$ac_safe=no"
16975 fi
16976 rm -f conftest*
16977 fi
16978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16979   echo "$ac_t""yes" 1>&6
16980     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16981   cat >> confdefs.h <<EOF
16982 #define $ac_tr_hdr 1
16983 EOF
16984  
16985 else
16986   echo "$ac_t""no" 1>&6
16987 fi
16988 done
16989
16990 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16991         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16992 echo "configure:16993: checking if Berkeley DB header compatibility" >&5
16993 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16994   echo $ac_n "(cached) $ac_c" 1>&6
16995 else
16996   
16997                 cat > conftest.$ac_ext <<EOF
16998 #line 16999 "configure"
16999 #include "confdefs.h"
17000
17001 #if HAVE_DB_185_H
17002 #       include <db_185.h>
17003 #else
17004 #       include <db.h>
17005 #endif
17006
17007  /* this check could be improved */
17008 #ifndef DB_VERSION_MAJOR
17009 #       define DB_VERSION_MAJOR 1
17010 #endif
17011
17012 #if DB_VERSION_MAJOR == 1 
17013         __db_version_1
17014 #endif
17015
17016 EOF
17017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17018   egrep "__db_version_1" >/dev/null 2>&1; then
17019   rm -rf conftest*
17020   ol_cv_header_db1=yes
17021 else
17022   rm -rf conftest*
17023   ol_cv_header_db1=no
17024 fi
17025 rm -f conftest*
17026
17027 fi
17028
17029 echo "$ac_t""$ol_cv_header_db1" 1>&6
17030
17031         if test $ol_cv_header_db1 = yes ; then
17032                 ol_cv_lib_db=no
17033 if test $ol_cv_lib_db = no ; then
17034         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17035 echo "configure:17036: checking for Berkeley DB link (default)" >&5
17036 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17037   echo $ac_n "(cached) $ac_c" 1>&6
17038 else
17039   
17040         ol_DB_LIB=
17041         ol_LIBS=$LIBS
17042         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17043
17044         cat > conftest.$ac_ext <<EOF
17045 #line 17046 "configure"
17046 #include "confdefs.h"
17047
17048 #ifdef HAVE_DB_185_H
17049 # include <db_185.h>
17050 #else
17051 # include <db.h>
17052 #endif
17053
17054 #ifndef DB_VERSION_MAJOR
17055 # define DB_VERSION_MAJOR 1
17056 #endif
17057
17058 #ifndef NULL
17059 #define NULL ((void*)0)
17060 #endif
17061
17062 int main() {
17063
17064 #if DB_VERSION_MAJOR > 1
17065         {
17066                 char *version;
17067                 int major, minor, patch;
17068
17069                 version = db_version( &major, &minor, &patch );
17070
17071                 if( major != DB_VERSION_MAJOR ||
17072                         minor < DB_VERSION_MINOR )
17073                 {
17074                         printf("Berkeley DB version mismatch\n"
17075                                 "\theader: %s\n\tlibrary: %s\n",
17076                                 DB_VERSION_STRING, version);
17077                         return 1;
17078                 }
17079         }
17080 #endif
17081
17082 #if DB_VERSION_MAJOR > 2
17083         db_env_create( NULL, 0 );
17084 #elif DB_VERSION_MAJOR > 1
17085         db_appexit( NULL );
17086 #else
17087         (void) dbopen( NULL, 0, 0, 0, NULL);
17088 #endif
17089
17090 ; return 0; }
17091 EOF
17092 if { (eval echo configure:17093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17093   rm -rf conftest*
17094   ol_cv_db_none=yes
17095 else
17096   echo "configure: failed program was:" >&5
17097   cat conftest.$ac_ext >&5
17098   rm -rf conftest*
17099   ol_cv_db_none=no
17100 fi
17101 rm -f conftest*
17102
17103         LIBS="$ol_LIBS"
17104
17105 fi
17106
17107 echo "$ac_t""$ol_cv_db_none" 1>&6
17108
17109         if test $ol_cv_db_none = yes ; then
17110                 ol_cv_lib_db=yes
17111         fi
17112 fi
17113
17114 if test $ol_cv_lib_db = no ; then
17115         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17116 echo "configure:17117: checking for Berkeley DB link (-ldb43)" >&5
17117 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17118   echo $ac_n "(cached) $ac_c" 1>&6
17119 else
17120   
17121         ol_DB_LIB=-ldb43
17122         ol_LIBS=$LIBS
17123         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17124
17125         cat > conftest.$ac_ext <<EOF
17126 #line 17127 "configure"
17127 #include "confdefs.h"
17128
17129 #ifdef HAVE_DB_185_H
17130 # include <db_185.h>
17131 #else
17132 # include <db.h>
17133 #endif
17134
17135 #ifndef DB_VERSION_MAJOR
17136 # define DB_VERSION_MAJOR 1
17137 #endif
17138
17139 #ifndef NULL
17140 #define NULL ((void*)0)
17141 #endif
17142
17143 int main() {
17144
17145 #if DB_VERSION_MAJOR > 1
17146         {
17147                 char *version;
17148                 int major, minor, patch;
17149
17150                 version = db_version( &major, &minor, &patch );
17151
17152                 if( major != DB_VERSION_MAJOR ||
17153                         minor < DB_VERSION_MINOR )
17154                 {
17155                         printf("Berkeley DB version mismatch\n"
17156                                 "\theader: %s\n\tlibrary: %s\n",
17157                                 DB_VERSION_STRING, version);
17158                         return 1;
17159                 }
17160         }
17161 #endif
17162
17163 #if DB_VERSION_MAJOR > 2
17164         db_env_create( NULL, 0 );
17165 #elif DB_VERSION_MAJOR > 1
17166         db_appexit( NULL );
17167 #else
17168         (void) dbopen( NULL, 0, 0, 0, NULL);
17169 #endif
17170
17171 ; return 0; }
17172 EOF
17173 if { (eval echo configure:17174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17174   rm -rf conftest*
17175   ol_cv_db_db43=yes
17176 else
17177   echo "configure: failed program was:" >&5
17178   cat conftest.$ac_ext >&5
17179   rm -rf conftest*
17180   ol_cv_db_db43=no
17181 fi
17182 rm -f conftest*
17183
17184         LIBS="$ol_LIBS"
17185
17186 fi
17187
17188 echo "$ac_t""$ol_cv_db_db43" 1>&6
17189
17190         if test $ol_cv_db_db43 = yes ; then
17191                 ol_cv_lib_db=-ldb43
17192         fi
17193 fi
17194
17195 if test $ol_cv_lib_db = no ; then
17196         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17197 echo "configure:17198: checking for Berkeley DB link (-ldb-43)" >&5
17198 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17199   echo $ac_n "(cached) $ac_c" 1>&6
17200 else
17201   
17202         ol_DB_LIB=-ldb-43
17203         ol_LIBS=$LIBS
17204         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17205
17206         cat > conftest.$ac_ext <<EOF
17207 #line 17208 "configure"
17208 #include "confdefs.h"
17209
17210 #ifdef HAVE_DB_185_H
17211 # include <db_185.h>
17212 #else
17213 # include <db.h>
17214 #endif
17215
17216 #ifndef DB_VERSION_MAJOR
17217 # define DB_VERSION_MAJOR 1
17218 #endif
17219
17220 #ifndef NULL
17221 #define NULL ((void*)0)
17222 #endif
17223
17224 int main() {
17225
17226 #if DB_VERSION_MAJOR > 1
17227         {
17228                 char *version;
17229                 int major, minor, patch;
17230
17231                 version = db_version( &major, &minor, &patch );
17232
17233                 if( major != DB_VERSION_MAJOR ||
17234                         minor < DB_VERSION_MINOR )
17235                 {
17236                         printf("Berkeley DB version mismatch\n"
17237                                 "\theader: %s\n\tlibrary: %s\n",
17238                                 DB_VERSION_STRING, version);
17239                         return 1;
17240                 }
17241         }
17242 #endif
17243
17244 #if DB_VERSION_MAJOR > 2
17245         db_env_create( NULL, 0 );
17246 #elif DB_VERSION_MAJOR > 1
17247         db_appexit( NULL );
17248 #else
17249         (void) dbopen( NULL, 0, 0, 0, NULL);
17250 #endif
17251
17252 ; return 0; }
17253 EOF
17254 if { (eval echo configure:17255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17255   rm -rf conftest*
17256   ol_cv_db_db_43=yes
17257 else
17258   echo "configure: failed program was:" >&5
17259   cat conftest.$ac_ext >&5
17260   rm -rf conftest*
17261   ol_cv_db_db_43=no
17262 fi
17263 rm -f conftest*
17264
17265         LIBS="$ol_LIBS"
17266
17267 fi
17268
17269 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17270
17271         if test $ol_cv_db_db_43 = yes ; then
17272                 ol_cv_lib_db=-ldb-43
17273         fi
17274 fi
17275
17276 if test $ol_cv_lib_db = no ; then
17277         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17278 echo "configure:17279: checking for Berkeley DB link (-ldb-4.3)" >&5
17279 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17280   echo $ac_n "(cached) $ac_c" 1>&6
17281 else
17282   
17283         ol_DB_LIB=-ldb-4.3
17284         ol_LIBS=$LIBS
17285         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17286
17287         cat > conftest.$ac_ext <<EOF
17288 #line 17289 "configure"
17289 #include "confdefs.h"
17290
17291 #ifdef HAVE_DB_185_H
17292 # include <db_185.h>
17293 #else
17294 # include <db.h>
17295 #endif
17296
17297 #ifndef DB_VERSION_MAJOR
17298 # define DB_VERSION_MAJOR 1
17299 #endif
17300
17301 #ifndef NULL
17302 #define NULL ((void*)0)
17303 #endif
17304
17305 int main() {
17306
17307 #if DB_VERSION_MAJOR > 1
17308         {
17309                 char *version;
17310                 int major, minor, patch;
17311
17312                 version = db_version( &major, &minor, &patch );
17313
17314                 if( major != DB_VERSION_MAJOR ||
17315                         minor < DB_VERSION_MINOR )
17316                 {
17317                         printf("Berkeley DB version mismatch\n"
17318                                 "\theader: %s\n\tlibrary: %s\n",
17319                                 DB_VERSION_STRING, version);
17320                         return 1;
17321                 }
17322         }
17323 #endif
17324
17325 #if DB_VERSION_MAJOR > 2
17326         db_env_create( NULL, 0 );
17327 #elif DB_VERSION_MAJOR > 1
17328         db_appexit( NULL );
17329 #else
17330         (void) dbopen( NULL, 0, 0, 0, NULL);
17331 #endif
17332
17333 ; return 0; }
17334 EOF
17335 if { (eval echo configure:17336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17336   rm -rf conftest*
17337   ol_cv_db_db_4_dot_3=yes
17338 else
17339   echo "configure: failed program was:" >&5
17340   cat conftest.$ac_ext >&5
17341   rm -rf conftest*
17342   ol_cv_db_db_4_dot_3=no
17343 fi
17344 rm -f conftest*
17345
17346         LIBS="$ol_LIBS"
17347
17348 fi
17349
17350 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17351
17352         if test $ol_cv_db_db_4_dot_3 = yes ; then
17353                 ol_cv_lib_db=-ldb-4.3
17354         fi
17355 fi
17356
17357 if test $ol_cv_lib_db = no ; then
17358         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17359 echo "configure:17360: checking for Berkeley DB link (-ldb-4-3)" >&5
17360 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17361   echo $ac_n "(cached) $ac_c" 1>&6
17362 else
17363   
17364         ol_DB_LIB=-ldb-4-3
17365         ol_LIBS=$LIBS
17366         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17367
17368         cat > conftest.$ac_ext <<EOF
17369 #line 17370 "configure"
17370 #include "confdefs.h"
17371
17372 #ifdef HAVE_DB_185_H
17373 # include <db_185.h>
17374 #else
17375 # include <db.h>
17376 #endif
17377
17378 #ifndef DB_VERSION_MAJOR
17379 # define DB_VERSION_MAJOR 1
17380 #endif
17381
17382 #ifndef NULL
17383 #define NULL ((void*)0)
17384 #endif
17385
17386 int main() {
17387
17388 #if DB_VERSION_MAJOR > 1
17389         {
17390                 char *version;
17391                 int major, minor, patch;
17392
17393                 version = db_version( &major, &minor, &patch );
17394
17395                 if( major != DB_VERSION_MAJOR ||
17396                         minor < DB_VERSION_MINOR )
17397                 {
17398                         printf("Berkeley DB version mismatch\n"
17399                                 "\theader: %s\n\tlibrary: %s\n",
17400                                 DB_VERSION_STRING, version);
17401                         return 1;
17402                 }
17403         }
17404 #endif
17405
17406 #if DB_VERSION_MAJOR > 2
17407         db_env_create( NULL, 0 );
17408 #elif DB_VERSION_MAJOR > 1
17409         db_appexit( NULL );
17410 #else
17411         (void) dbopen( NULL, 0, 0, 0, NULL);
17412 #endif
17413
17414 ; return 0; }
17415 EOF
17416 if { (eval echo configure:17417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17417   rm -rf conftest*
17418   ol_cv_db_db_4_3=yes
17419 else
17420   echo "configure: failed program was:" >&5
17421   cat conftest.$ac_ext >&5
17422   rm -rf conftest*
17423   ol_cv_db_db_4_3=no
17424 fi
17425 rm -f conftest*
17426
17427         LIBS="$ol_LIBS"
17428
17429 fi
17430
17431 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17432
17433         if test $ol_cv_db_db_4_3 = yes ; then
17434                 ol_cv_lib_db=-ldb-4-3
17435         fi
17436 fi
17437
17438 if test $ol_cv_lib_db = no ; then
17439         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17440 echo "configure:17441: checking for Berkeley DB link (-ldb42)" >&5
17441 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17442   echo $ac_n "(cached) $ac_c" 1>&6
17443 else
17444   
17445         ol_DB_LIB=-ldb42
17446         ol_LIBS=$LIBS
17447         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17448
17449         cat > conftest.$ac_ext <<EOF
17450 #line 17451 "configure"
17451 #include "confdefs.h"
17452
17453 #ifdef HAVE_DB_185_H
17454 # include <db_185.h>
17455 #else
17456 # include <db.h>
17457 #endif
17458
17459 #ifndef DB_VERSION_MAJOR
17460 # define DB_VERSION_MAJOR 1
17461 #endif
17462
17463 #ifndef NULL
17464 #define NULL ((void*)0)
17465 #endif
17466
17467 int main() {
17468
17469 #if DB_VERSION_MAJOR > 1
17470         {
17471                 char *version;
17472                 int major, minor, patch;
17473
17474                 version = db_version( &major, &minor, &patch );
17475
17476                 if( major != DB_VERSION_MAJOR ||
17477                         minor < DB_VERSION_MINOR )
17478                 {
17479                         printf("Berkeley DB version mismatch\n"
17480                                 "\theader: %s\n\tlibrary: %s\n",
17481                                 DB_VERSION_STRING, version);
17482                         return 1;
17483                 }
17484         }
17485 #endif
17486
17487 #if DB_VERSION_MAJOR > 2
17488         db_env_create( NULL, 0 );
17489 #elif DB_VERSION_MAJOR > 1
17490         db_appexit( NULL );
17491 #else
17492         (void) dbopen( NULL, 0, 0, 0, NULL);
17493 #endif
17494
17495 ; return 0; }
17496 EOF
17497 if { (eval echo configure:17498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17498   rm -rf conftest*
17499   ol_cv_db_db42=yes
17500 else
17501   echo "configure: failed program was:" >&5
17502   cat conftest.$ac_ext >&5
17503   rm -rf conftest*
17504   ol_cv_db_db42=no
17505 fi
17506 rm -f conftest*
17507
17508         LIBS="$ol_LIBS"
17509
17510 fi
17511
17512 echo "$ac_t""$ol_cv_db_db42" 1>&6
17513
17514         if test $ol_cv_db_db42 = yes ; then
17515                 ol_cv_lib_db=-ldb42
17516         fi
17517 fi
17518
17519 if test $ol_cv_lib_db = no ; then
17520         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17521 echo "configure:17522: checking for Berkeley DB link (-ldb-42)" >&5
17522 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17523   echo $ac_n "(cached) $ac_c" 1>&6
17524 else
17525   
17526         ol_DB_LIB=-ldb-42
17527         ol_LIBS=$LIBS
17528         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17529
17530         cat > conftest.$ac_ext <<EOF
17531 #line 17532 "configure"
17532 #include "confdefs.h"
17533
17534 #ifdef HAVE_DB_185_H
17535 # include <db_185.h>
17536 #else
17537 # include <db.h>
17538 #endif
17539
17540 #ifndef DB_VERSION_MAJOR
17541 # define DB_VERSION_MAJOR 1
17542 #endif
17543
17544 #ifndef NULL
17545 #define NULL ((void*)0)
17546 #endif
17547
17548 int main() {
17549
17550 #if DB_VERSION_MAJOR > 1
17551         {
17552                 char *version;
17553                 int major, minor, patch;
17554
17555                 version = db_version( &major, &minor, &patch );
17556
17557                 if( major != DB_VERSION_MAJOR ||
17558                         minor < DB_VERSION_MINOR )
17559                 {
17560                         printf("Berkeley DB version mismatch\n"
17561                                 "\theader: %s\n\tlibrary: %s\n",
17562                                 DB_VERSION_STRING, version);
17563                         return 1;
17564                 }
17565         }
17566 #endif
17567
17568 #if DB_VERSION_MAJOR > 2
17569         db_env_create( NULL, 0 );
17570 #elif DB_VERSION_MAJOR > 1
17571         db_appexit( NULL );
17572 #else
17573         (void) dbopen( NULL, 0, 0, 0, NULL);
17574 #endif
17575
17576 ; return 0; }
17577 EOF
17578 if { (eval echo configure:17579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17579   rm -rf conftest*
17580   ol_cv_db_db_42=yes
17581 else
17582   echo "configure: failed program was:" >&5
17583   cat conftest.$ac_ext >&5
17584   rm -rf conftest*
17585   ol_cv_db_db_42=no
17586 fi
17587 rm -f conftest*
17588
17589         LIBS="$ol_LIBS"
17590
17591 fi
17592
17593 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17594
17595         if test $ol_cv_db_db_42 = yes ; then
17596                 ol_cv_lib_db=-ldb-42
17597         fi
17598 fi
17599
17600 if test $ol_cv_lib_db = no ; then
17601         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17602 echo "configure:17603: checking for Berkeley DB link (-ldb-4.2)" >&5
17603 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17604   echo $ac_n "(cached) $ac_c" 1>&6
17605 else
17606   
17607         ol_DB_LIB=-ldb-4.2
17608         ol_LIBS=$LIBS
17609         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17610
17611         cat > conftest.$ac_ext <<EOF
17612 #line 17613 "configure"
17613 #include "confdefs.h"
17614
17615 #ifdef HAVE_DB_185_H
17616 # include <db_185.h>
17617 #else
17618 # include <db.h>
17619 #endif
17620
17621 #ifndef DB_VERSION_MAJOR
17622 # define DB_VERSION_MAJOR 1
17623 #endif
17624
17625 #ifndef NULL
17626 #define NULL ((void*)0)
17627 #endif
17628
17629 int main() {
17630
17631 #if DB_VERSION_MAJOR > 1
17632         {
17633                 char *version;
17634                 int major, minor, patch;
17635
17636                 version = db_version( &major, &minor, &patch );
17637
17638                 if( major != DB_VERSION_MAJOR ||
17639                         minor < DB_VERSION_MINOR )
17640                 {
17641                         printf("Berkeley DB version mismatch\n"
17642                                 "\theader: %s\n\tlibrary: %s\n",
17643                                 DB_VERSION_STRING, version);
17644                         return 1;
17645                 }
17646         }
17647 #endif
17648
17649 #if DB_VERSION_MAJOR > 2
17650         db_env_create( NULL, 0 );
17651 #elif DB_VERSION_MAJOR > 1
17652         db_appexit( NULL );
17653 #else
17654         (void) dbopen( NULL, 0, 0, 0, NULL);
17655 #endif
17656
17657 ; return 0; }
17658 EOF
17659 if { (eval echo configure:17660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17660   rm -rf conftest*
17661   ol_cv_db_db_4_dot_2=yes
17662 else
17663   echo "configure: failed program was:" >&5
17664   cat conftest.$ac_ext >&5
17665   rm -rf conftest*
17666   ol_cv_db_db_4_dot_2=no
17667 fi
17668 rm -f conftest*
17669
17670         LIBS="$ol_LIBS"
17671
17672 fi
17673
17674 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17675
17676         if test $ol_cv_db_db_4_dot_2 = yes ; then
17677                 ol_cv_lib_db=-ldb-4.2
17678         fi
17679 fi
17680
17681 if test $ol_cv_lib_db = no ; then
17682         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17683 echo "configure:17684: checking for Berkeley DB link (-ldb-4-2)" >&5
17684 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17685   echo $ac_n "(cached) $ac_c" 1>&6
17686 else
17687   
17688         ol_DB_LIB=-ldb-4-2
17689         ol_LIBS=$LIBS
17690         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17691
17692         cat > conftest.$ac_ext <<EOF
17693 #line 17694 "configure"
17694 #include "confdefs.h"
17695
17696 #ifdef HAVE_DB_185_H
17697 # include <db_185.h>
17698 #else
17699 # include <db.h>
17700 #endif
17701
17702 #ifndef DB_VERSION_MAJOR
17703 # define DB_VERSION_MAJOR 1
17704 #endif
17705
17706 #ifndef NULL
17707 #define NULL ((void*)0)
17708 #endif
17709
17710 int main() {
17711
17712 #if DB_VERSION_MAJOR > 1
17713         {
17714                 char *version;
17715                 int major, minor, patch;
17716
17717                 version = db_version( &major, &minor, &patch );
17718
17719                 if( major != DB_VERSION_MAJOR ||
17720                         minor < DB_VERSION_MINOR )
17721                 {
17722                         printf("Berkeley DB version mismatch\n"
17723                                 "\theader: %s\n\tlibrary: %s\n",
17724                                 DB_VERSION_STRING, version);
17725                         return 1;
17726                 }
17727         }
17728 #endif
17729
17730 #if DB_VERSION_MAJOR > 2
17731         db_env_create( NULL, 0 );
17732 #elif DB_VERSION_MAJOR > 1
17733         db_appexit( NULL );
17734 #else
17735         (void) dbopen( NULL, 0, 0, 0, NULL);
17736 #endif
17737
17738 ; return 0; }
17739 EOF
17740 if { (eval echo configure:17741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17741   rm -rf conftest*
17742   ol_cv_db_db_4_2=yes
17743 else
17744   echo "configure: failed program was:" >&5
17745   cat conftest.$ac_ext >&5
17746   rm -rf conftest*
17747   ol_cv_db_db_4_2=no
17748 fi
17749 rm -f conftest*
17750
17751         LIBS="$ol_LIBS"
17752
17753 fi
17754
17755 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17756
17757         if test $ol_cv_db_db_4_2 = yes ; then
17758                 ol_cv_lib_db=-ldb-4-2
17759         fi
17760 fi
17761
17762 if test $ol_cv_lib_db = no ; then
17763         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17764 echo "configure:17765: checking for Berkeley DB link (-ldb-4)" >&5
17765 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17766   echo $ac_n "(cached) $ac_c" 1>&6
17767 else
17768   
17769         ol_DB_LIB=-ldb-4
17770         ol_LIBS=$LIBS
17771         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17772
17773         cat > conftest.$ac_ext <<EOF
17774 #line 17775 "configure"
17775 #include "confdefs.h"
17776
17777 #ifdef HAVE_DB_185_H
17778 # include <db_185.h>
17779 #else
17780 # include <db.h>
17781 #endif
17782
17783 #ifndef DB_VERSION_MAJOR
17784 # define DB_VERSION_MAJOR 1
17785 #endif
17786
17787 #ifndef NULL
17788 #define NULL ((void*)0)
17789 #endif
17790
17791 int main() {
17792
17793 #if DB_VERSION_MAJOR > 1
17794         {
17795                 char *version;
17796                 int major, minor, patch;
17797
17798                 version = db_version( &major, &minor, &patch );
17799
17800                 if( major != DB_VERSION_MAJOR ||
17801                         minor < DB_VERSION_MINOR )
17802                 {
17803                         printf("Berkeley DB version mismatch\n"
17804                                 "\theader: %s\n\tlibrary: %s\n",
17805                                 DB_VERSION_STRING, version);
17806                         return 1;
17807                 }
17808         }
17809 #endif
17810
17811 #if DB_VERSION_MAJOR > 2
17812         db_env_create( NULL, 0 );
17813 #elif DB_VERSION_MAJOR > 1
17814         db_appexit( NULL );
17815 #else
17816         (void) dbopen( NULL, 0, 0, 0, NULL);
17817 #endif
17818
17819 ; return 0; }
17820 EOF
17821 if { (eval echo configure:17822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17822   rm -rf conftest*
17823   ol_cv_db_db_4=yes
17824 else
17825   echo "configure: failed program was:" >&5
17826   cat conftest.$ac_ext >&5
17827   rm -rf conftest*
17828   ol_cv_db_db_4=no
17829 fi
17830 rm -f conftest*
17831
17832         LIBS="$ol_LIBS"
17833
17834 fi
17835
17836 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17837
17838         if test $ol_cv_db_db_4 = yes ; then
17839                 ol_cv_lib_db=-ldb-4
17840         fi
17841 fi
17842
17843 if test $ol_cv_lib_db = no ; then
17844         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17845 echo "configure:17846: checking for Berkeley DB link (-ldb4)" >&5
17846 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17847   echo $ac_n "(cached) $ac_c" 1>&6
17848 else
17849   
17850         ol_DB_LIB=-ldb4
17851         ol_LIBS=$LIBS
17852         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17853
17854         cat > conftest.$ac_ext <<EOF
17855 #line 17856 "configure"
17856 #include "confdefs.h"
17857
17858 #ifdef HAVE_DB_185_H
17859 # include <db_185.h>
17860 #else
17861 # include <db.h>
17862 #endif
17863
17864 #ifndef DB_VERSION_MAJOR
17865 # define DB_VERSION_MAJOR 1
17866 #endif
17867
17868 #ifndef NULL
17869 #define NULL ((void*)0)
17870 #endif
17871
17872 int main() {
17873
17874 #if DB_VERSION_MAJOR > 1
17875         {
17876                 char *version;
17877                 int major, minor, patch;
17878
17879                 version = db_version( &major, &minor, &patch );
17880
17881                 if( major != DB_VERSION_MAJOR ||
17882                         minor < DB_VERSION_MINOR )
17883                 {
17884                         printf("Berkeley DB version mismatch\n"
17885                                 "\theader: %s\n\tlibrary: %s\n",
17886                                 DB_VERSION_STRING, version);
17887                         return 1;
17888                 }
17889         }
17890 #endif
17891
17892 #if DB_VERSION_MAJOR > 2
17893         db_env_create( NULL, 0 );
17894 #elif DB_VERSION_MAJOR > 1
17895         db_appexit( NULL );
17896 #else
17897         (void) dbopen( NULL, 0, 0, 0, NULL);
17898 #endif
17899
17900 ; return 0; }
17901 EOF
17902 if { (eval echo configure:17903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17903   rm -rf conftest*
17904   ol_cv_db_db4=yes
17905 else
17906   echo "configure: failed program was:" >&5
17907   cat conftest.$ac_ext >&5
17908   rm -rf conftest*
17909   ol_cv_db_db4=no
17910 fi
17911 rm -f conftest*
17912
17913         LIBS="$ol_LIBS"
17914
17915 fi
17916
17917 echo "$ac_t""$ol_cv_db_db4" 1>&6
17918
17919         if test $ol_cv_db_db4 = yes ; then
17920                 ol_cv_lib_db=-ldb4
17921         fi
17922 fi
17923
17924 if test $ol_cv_lib_db = no ; then
17925         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17926 echo "configure:17927: checking for Berkeley DB link (-ldb)" >&5
17927 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17928   echo $ac_n "(cached) $ac_c" 1>&6
17929 else
17930   
17931         ol_DB_LIB=-ldb
17932         ol_LIBS=$LIBS
17933         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17934
17935         cat > conftest.$ac_ext <<EOF
17936 #line 17937 "configure"
17937 #include "confdefs.h"
17938
17939 #ifdef HAVE_DB_185_H
17940 # include <db_185.h>
17941 #else
17942 # include <db.h>
17943 #endif
17944
17945 #ifndef DB_VERSION_MAJOR
17946 # define DB_VERSION_MAJOR 1
17947 #endif
17948
17949 #ifndef NULL
17950 #define NULL ((void*)0)
17951 #endif
17952
17953 int main() {
17954
17955 #if DB_VERSION_MAJOR > 1
17956         {
17957                 char *version;
17958                 int major, minor, patch;
17959
17960                 version = db_version( &major, &minor, &patch );
17961
17962                 if( major != DB_VERSION_MAJOR ||
17963                         minor < DB_VERSION_MINOR )
17964                 {
17965                         printf("Berkeley DB version mismatch\n"
17966                                 "\theader: %s\n\tlibrary: %s\n",
17967                                 DB_VERSION_STRING, version);
17968                         return 1;
17969                 }
17970         }
17971 #endif
17972
17973 #if DB_VERSION_MAJOR > 2
17974         db_env_create( NULL, 0 );
17975 #elif DB_VERSION_MAJOR > 1
17976         db_appexit( NULL );
17977 #else
17978         (void) dbopen( NULL, 0, 0, 0, NULL);
17979 #endif
17980
17981 ; return 0; }
17982 EOF
17983 if { (eval echo configure:17984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17984   rm -rf conftest*
17985   ol_cv_db_db=yes
17986 else
17987   echo "configure: failed program was:" >&5
17988   cat conftest.$ac_ext >&5
17989   rm -rf conftest*
17990   ol_cv_db_db=no
17991 fi
17992 rm -f conftest*
17993
17994         LIBS="$ol_LIBS"
17995
17996 fi
17997
17998 echo "$ac_t""$ol_cv_db_db" 1>&6
17999
18000         if test $ol_cv_db_db = yes ; then
18001                 ol_cv_lib_db=-ldb
18002         fi
18003 fi
18004
18005 if test $ol_cv_lib_db = no ; then
18006         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18007 echo "configure:18008: checking for Berkeley DB link (-ldb41)" >&5
18008 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18009   echo $ac_n "(cached) $ac_c" 1>&6
18010 else
18011   
18012         ol_DB_LIB=-ldb41
18013         ol_LIBS=$LIBS
18014         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18015
18016         cat > conftest.$ac_ext <<EOF
18017 #line 18018 "configure"
18018 #include "confdefs.h"
18019
18020 #ifdef HAVE_DB_185_H
18021 # include <db_185.h>
18022 #else
18023 # include <db.h>
18024 #endif
18025
18026 #ifndef DB_VERSION_MAJOR
18027 # define DB_VERSION_MAJOR 1
18028 #endif
18029
18030 #ifndef NULL
18031 #define NULL ((void*)0)
18032 #endif
18033
18034 int main() {
18035
18036 #if DB_VERSION_MAJOR > 1
18037         {
18038                 char *version;
18039                 int major, minor, patch;
18040
18041                 version = db_version( &major, &minor, &patch );
18042
18043                 if( major != DB_VERSION_MAJOR ||
18044                         minor < DB_VERSION_MINOR )
18045                 {
18046                         printf("Berkeley DB version mismatch\n"
18047                                 "\theader: %s\n\tlibrary: %s\n",
18048                                 DB_VERSION_STRING, version);
18049                         return 1;
18050                 }
18051         }
18052 #endif
18053
18054 #if DB_VERSION_MAJOR > 2
18055         db_env_create( NULL, 0 );
18056 #elif DB_VERSION_MAJOR > 1
18057         db_appexit( NULL );
18058 #else
18059         (void) dbopen( NULL, 0, 0, 0, NULL);
18060 #endif
18061
18062 ; return 0; }
18063 EOF
18064 if { (eval echo configure:18065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18065   rm -rf conftest*
18066   ol_cv_db_db41=yes
18067 else
18068   echo "configure: failed program was:" >&5
18069   cat conftest.$ac_ext >&5
18070   rm -rf conftest*
18071   ol_cv_db_db41=no
18072 fi
18073 rm -f conftest*
18074
18075         LIBS="$ol_LIBS"
18076
18077 fi
18078
18079 echo "$ac_t""$ol_cv_db_db41" 1>&6
18080
18081         if test $ol_cv_db_db41 = yes ; then
18082                 ol_cv_lib_db=-ldb41
18083         fi
18084 fi
18085
18086 if test $ol_cv_lib_db = no ; then
18087         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18088 echo "configure:18089: checking for Berkeley DB link (-ldb-41)" >&5
18089 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18090   echo $ac_n "(cached) $ac_c" 1>&6
18091 else
18092   
18093         ol_DB_LIB=-ldb-41
18094         ol_LIBS=$LIBS
18095         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18096
18097         cat > conftest.$ac_ext <<EOF
18098 #line 18099 "configure"
18099 #include "confdefs.h"
18100
18101 #ifdef HAVE_DB_185_H
18102 # include <db_185.h>
18103 #else
18104 # include <db.h>
18105 #endif
18106
18107 #ifndef DB_VERSION_MAJOR
18108 # define DB_VERSION_MAJOR 1
18109 #endif
18110
18111 #ifndef NULL
18112 #define NULL ((void*)0)
18113 #endif
18114
18115 int main() {
18116
18117 #if DB_VERSION_MAJOR > 1
18118         {
18119                 char *version;
18120                 int major, minor, patch;
18121
18122                 version = db_version( &major, &minor, &patch );
18123
18124                 if( major != DB_VERSION_MAJOR ||
18125                         minor < DB_VERSION_MINOR )
18126                 {
18127                         printf("Berkeley DB version mismatch\n"
18128                                 "\theader: %s\n\tlibrary: %s\n",
18129                                 DB_VERSION_STRING, version);
18130                         return 1;
18131                 }
18132         }
18133 #endif
18134
18135 #if DB_VERSION_MAJOR > 2
18136         db_env_create( NULL, 0 );
18137 #elif DB_VERSION_MAJOR > 1
18138         db_appexit( NULL );
18139 #else
18140         (void) dbopen( NULL, 0, 0, 0, NULL);
18141 #endif
18142
18143 ; return 0; }
18144 EOF
18145 if { (eval echo configure:18146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18146   rm -rf conftest*
18147   ol_cv_db_db_41=yes
18148 else
18149   echo "configure: failed program was:" >&5
18150   cat conftest.$ac_ext >&5
18151   rm -rf conftest*
18152   ol_cv_db_db_41=no
18153 fi
18154 rm -f conftest*
18155
18156         LIBS="$ol_LIBS"
18157
18158 fi
18159
18160 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18161
18162         if test $ol_cv_db_db_41 = yes ; then
18163                 ol_cv_lib_db=-ldb-41
18164         fi
18165 fi
18166
18167 if test $ol_cv_lib_db = no ; then
18168         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18169 echo "configure:18170: checking for Berkeley DB link (-ldb-4.1)" >&5
18170 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18171   echo $ac_n "(cached) $ac_c" 1>&6
18172 else
18173   
18174         ol_DB_LIB=-ldb-4.1
18175         ol_LIBS=$LIBS
18176         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18177
18178         cat > conftest.$ac_ext <<EOF
18179 #line 18180 "configure"
18180 #include "confdefs.h"
18181
18182 #ifdef HAVE_DB_185_H
18183 # include <db_185.h>
18184 #else
18185 # include <db.h>
18186 #endif
18187
18188 #ifndef DB_VERSION_MAJOR
18189 # define DB_VERSION_MAJOR 1
18190 #endif
18191
18192 #ifndef NULL
18193 #define NULL ((void*)0)
18194 #endif
18195
18196 int main() {
18197
18198 #if DB_VERSION_MAJOR > 1
18199         {
18200                 char *version;
18201                 int major, minor, patch;
18202
18203                 version = db_version( &major, &minor, &patch );
18204
18205                 if( major != DB_VERSION_MAJOR ||
18206                         minor < DB_VERSION_MINOR )
18207                 {
18208                         printf("Berkeley DB version mismatch\n"
18209                                 "\theader: %s\n\tlibrary: %s\n",
18210                                 DB_VERSION_STRING, version);
18211                         return 1;
18212                 }
18213         }
18214 #endif
18215
18216 #if DB_VERSION_MAJOR > 2
18217         db_env_create( NULL, 0 );
18218 #elif DB_VERSION_MAJOR > 1
18219         db_appexit( NULL );
18220 #else
18221         (void) dbopen( NULL, 0, 0, 0, NULL);
18222 #endif
18223
18224 ; return 0; }
18225 EOF
18226 if { (eval echo configure:18227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18227   rm -rf conftest*
18228   ol_cv_db_db_4_dot_1=yes
18229 else
18230   echo "configure: failed program was:" >&5
18231   cat conftest.$ac_ext >&5
18232   rm -rf conftest*
18233   ol_cv_db_db_4_dot_1=no
18234 fi
18235 rm -f conftest*
18236
18237         LIBS="$ol_LIBS"
18238
18239 fi
18240
18241 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18242
18243         if test $ol_cv_db_db_4_dot_1 = yes ; then
18244                 ol_cv_lib_db=-ldb-4.1
18245         fi
18246 fi
18247
18248 if test $ol_cv_lib_db = no ; then
18249         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18250 echo "configure:18251: checking for Berkeley DB link (-ldb-4-1)" >&5
18251 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18252   echo $ac_n "(cached) $ac_c" 1>&6
18253 else
18254   
18255         ol_DB_LIB=-ldb-4-1
18256         ol_LIBS=$LIBS
18257         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18258
18259         cat > conftest.$ac_ext <<EOF
18260 #line 18261 "configure"
18261 #include "confdefs.h"
18262
18263 #ifdef HAVE_DB_185_H
18264 # include <db_185.h>
18265 #else
18266 # include <db.h>
18267 #endif
18268
18269 #ifndef DB_VERSION_MAJOR
18270 # define DB_VERSION_MAJOR 1
18271 #endif
18272
18273 #ifndef NULL
18274 #define NULL ((void*)0)
18275 #endif
18276
18277 int main() {
18278
18279 #if DB_VERSION_MAJOR > 1
18280         {
18281                 char *version;
18282                 int major, minor, patch;
18283
18284                 version = db_version( &major, &minor, &patch );
18285
18286                 if( major != DB_VERSION_MAJOR ||
18287                         minor < DB_VERSION_MINOR )
18288                 {
18289                         printf("Berkeley DB version mismatch\n"
18290                                 "\theader: %s\n\tlibrary: %s\n",
18291                                 DB_VERSION_STRING, version);
18292                         return 1;
18293                 }
18294         }
18295 #endif
18296
18297 #if DB_VERSION_MAJOR > 2
18298         db_env_create( NULL, 0 );
18299 #elif DB_VERSION_MAJOR > 1
18300         db_appexit( NULL );
18301 #else
18302         (void) dbopen( NULL, 0, 0, 0, NULL);
18303 #endif
18304
18305 ; return 0; }
18306 EOF
18307 if { (eval echo configure:18308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18308   rm -rf conftest*
18309   ol_cv_db_db_4_1=yes
18310 else
18311   echo "configure: failed program was:" >&5
18312   cat conftest.$ac_ext >&5
18313   rm -rf conftest*
18314   ol_cv_db_db_4_1=no
18315 fi
18316 rm -f conftest*
18317
18318         LIBS="$ol_LIBS"
18319
18320 fi
18321
18322 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18323
18324         if test $ol_cv_db_db_4_1 = yes ; then
18325                 ol_cv_lib_db=-ldb-4-1
18326         fi
18327 fi
18328
18329 if test $ol_cv_lib_db = no ; then
18330         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18331 echo "configure:18332: checking for Berkeley DB link (-ldb3)" >&5
18332 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18333   echo $ac_n "(cached) $ac_c" 1>&6
18334 else
18335   
18336         ol_DB_LIB=-ldb3
18337         ol_LIBS=$LIBS
18338         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18339
18340         cat > conftest.$ac_ext <<EOF
18341 #line 18342 "configure"
18342 #include "confdefs.h"
18343
18344 #ifdef HAVE_DB_185_H
18345 # include <db_185.h>
18346 #else
18347 # include <db.h>
18348 #endif
18349
18350 #ifndef DB_VERSION_MAJOR
18351 # define DB_VERSION_MAJOR 1
18352 #endif
18353
18354 #ifndef NULL
18355 #define NULL ((void*)0)
18356 #endif
18357
18358 int main() {
18359
18360 #if DB_VERSION_MAJOR > 1
18361         {
18362                 char *version;
18363                 int major, minor, patch;
18364
18365                 version = db_version( &major, &minor, &patch );
18366
18367                 if( major != DB_VERSION_MAJOR ||
18368                         minor < DB_VERSION_MINOR )
18369                 {
18370                         printf("Berkeley DB version mismatch\n"
18371                                 "\theader: %s\n\tlibrary: %s\n",
18372                                 DB_VERSION_STRING, version);
18373                         return 1;
18374                 }
18375         }
18376 #endif
18377
18378 #if DB_VERSION_MAJOR > 2
18379         db_env_create( NULL, 0 );
18380 #elif DB_VERSION_MAJOR > 1
18381         db_appexit( NULL );
18382 #else
18383         (void) dbopen( NULL, 0, 0, 0, NULL);
18384 #endif
18385
18386 ; return 0; }
18387 EOF
18388 if { (eval echo configure:18389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18389   rm -rf conftest*
18390   ol_cv_db_db3=yes
18391 else
18392   echo "configure: failed program was:" >&5
18393   cat conftest.$ac_ext >&5
18394   rm -rf conftest*
18395   ol_cv_db_db3=no
18396 fi
18397 rm -f conftest*
18398
18399         LIBS="$ol_LIBS"
18400
18401 fi
18402
18403 echo "$ac_t""$ol_cv_db_db3" 1>&6
18404
18405         if test $ol_cv_db_db3 = yes ; then
18406                 ol_cv_lib_db=-ldb3
18407         fi
18408 fi
18409
18410 if test $ol_cv_lib_db = no ; then
18411         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18412 echo "configure:18413: checking for Berkeley DB link (-ldb-3)" >&5
18413 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18414   echo $ac_n "(cached) $ac_c" 1>&6
18415 else
18416   
18417         ol_DB_LIB=-ldb-3
18418         ol_LIBS=$LIBS
18419         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18420
18421         cat > conftest.$ac_ext <<EOF
18422 #line 18423 "configure"
18423 #include "confdefs.h"
18424
18425 #ifdef HAVE_DB_185_H
18426 # include <db_185.h>
18427 #else
18428 # include <db.h>
18429 #endif
18430
18431 #ifndef DB_VERSION_MAJOR
18432 # define DB_VERSION_MAJOR 1
18433 #endif
18434
18435 #ifndef NULL
18436 #define NULL ((void*)0)
18437 #endif
18438
18439 int main() {
18440
18441 #if DB_VERSION_MAJOR > 1
18442         {
18443                 char *version;
18444                 int major, minor, patch;
18445
18446                 version = db_version( &major, &minor, &patch );
18447
18448                 if( major != DB_VERSION_MAJOR ||
18449                         minor < DB_VERSION_MINOR )
18450                 {
18451                         printf("Berkeley DB version mismatch\n"
18452                                 "\theader: %s\n\tlibrary: %s\n",
18453                                 DB_VERSION_STRING, version);
18454                         return 1;
18455                 }
18456         }
18457 #endif
18458
18459 #if DB_VERSION_MAJOR > 2
18460         db_env_create( NULL, 0 );
18461 #elif DB_VERSION_MAJOR > 1
18462         db_appexit( NULL );
18463 #else
18464         (void) dbopen( NULL, 0, 0, 0, NULL);
18465 #endif
18466
18467 ; return 0; }
18468 EOF
18469 if { (eval echo configure:18470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18470   rm -rf conftest*
18471   ol_cv_db_db_3=yes
18472 else
18473   echo "configure: failed program was:" >&5
18474   cat conftest.$ac_ext >&5
18475   rm -rf conftest*
18476   ol_cv_db_db_3=no
18477 fi
18478 rm -f conftest*
18479
18480         LIBS="$ol_LIBS"
18481
18482 fi
18483
18484 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18485
18486         if test $ol_cv_db_db_3 = yes ; then
18487                 ol_cv_lib_db=-ldb-3
18488         fi
18489 fi
18490
18491 if test $ol_cv_lib_db = no ; then
18492         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18493 echo "configure:18494: checking for Berkeley DB link (-ldb2)" >&5
18494 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18495   echo $ac_n "(cached) $ac_c" 1>&6
18496 else
18497   
18498         ol_DB_LIB=-ldb2
18499         ol_LIBS=$LIBS
18500         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18501
18502         cat > conftest.$ac_ext <<EOF
18503 #line 18504 "configure"
18504 #include "confdefs.h"
18505
18506 #ifdef HAVE_DB_185_H
18507 # include <db_185.h>
18508 #else
18509 # include <db.h>
18510 #endif
18511
18512 #ifndef DB_VERSION_MAJOR
18513 # define DB_VERSION_MAJOR 1
18514 #endif
18515
18516 #ifndef NULL
18517 #define NULL ((void*)0)
18518 #endif
18519
18520 int main() {
18521
18522 #if DB_VERSION_MAJOR > 1
18523         {
18524                 char *version;
18525                 int major, minor, patch;
18526
18527                 version = db_version( &major, &minor, &patch );
18528
18529                 if( major != DB_VERSION_MAJOR ||
18530                         minor < DB_VERSION_MINOR )
18531                 {
18532                         printf("Berkeley DB version mismatch\n"
18533                                 "\theader: %s\n\tlibrary: %s\n",
18534                                 DB_VERSION_STRING, version);
18535                         return 1;
18536                 }
18537         }
18538 #endif
18539
18540 #if DB_VERSION_MAJOR > 2
18541         db_env_create( NULL, 0 );
18542 #elif DB_VERSION_MAJOR > 1
18543         db_appexit( NULL );
18544 #else
18545         (void) dbopen( NULL, 0, 0, 0, NULL);
18546 #endif
18547
18548 ; return 0; }
18549 EOF
18550 if { (eval echo configure:18551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18551   rm -rf conftest*
18552   ol_cv_db_db2=yes
18553 else
18554   echo "configure: failed program was:" >&5
18555   cat conftest.$ac_ext >&5
18556   rm -rf conftest*
18557   ol_cv_db_db2=no
18558 fi
18559 rm -f conftest*
18560
18561         LIBS="$ol_LIBS"
18562
18563 fi
18564
18565 echo "$ac_t""$ol_cv_db_db2" 1>&6
18566
18567         if test $ol_cv_db_db2 = yes ; then
18568                 ol_cv_lib_db=-ldb2
18569         fi
18570 fi
18571
18572 if test $ol_cv_lib_db = no ; then
18573         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18574 echo "configure:18575: checking for Berkeley DB link (-ldb-2)" >&5
18575 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18576   echo $ac_n "(cached) $ac_c" 1>&6
18577 else
18578   
18579         ol_DB_LIB=-ldb-2
18580         ol_LIBS=$LIBS
18581         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18582
18583         cat > conftest.$ac_ext <<EOF
18584 #line 18585 "configure"
18585 #include "confdefs.h"
18586
18587 #ifdef HAVE_DB_185_H
18588 # include <db_185.h>
18589 #else
18590 # include <db.h>
18591 #endif
18592
18593 #ifndef DB_VERSION_MAJOR
18594 # define DB_VERSION_MAJOR 1
18595 #endif
18596
18597 #ifndef NULL
18598 #define NULL ((void*)0)
18599 #endif
18600
18601 int main() {
18602
18603 #if DB_VERSION_MAJOR > 1
18604         {
18605                 char *version;
18606                 int major, minor, patch;
18607
18608                 version = db_version( &major, &minor, &patch );
18609
18610                 if( major != DB_VERSION_MAJOR ||
18611                         minor < DB_VERSION_MINOR )
18612                 {
18613                         printf("Berkeley DB version mismatch\n"
18614                                 "\theader: %s\n\tlibrary: %s\n",
18615                                 DB_VERSION_STRING, version);
18616                         return 1;
18617                 }
18618         }
18619 #endif
18620
18621 #if DB_VERSION_MAJOR > 2
18622         db_env_create( NULL, 0 );
18623 #elif DB_VERSION_MAJOR > 1
18624         db_appexit( NULL );
18625 #else
18626         (void) dbopen( NULL, 0, 0, 0, NULL);
18627 #endif
18628
18629 ; return 0; }
18630 EOF
18631 if { (eval echo configure:18632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18632   rm -rf conftest*
18633   ol_cv_db_db_2=yes
18634 else
18635   echo "configure: failed program was:" >&5
18636   cat conftest.$ac_ext >&5
18637   rm -rf conftest*
18638   ol_cv_db_db_2=no
18639 fi
18640 rm -f conftest*
18641
18642         LIBS="$ol_LIBS"
18643
18644 fi
18645
18646 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18647
18648         if test $ol_cv_db_db_2 = yes ; then
18649                 ol_cv_lib_db=-ldb-2
18650         fi
18651 fi
18652
18653 if test $ol_cv_lib_db = no ; then
18654         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18655 echo "configure:18656: checking for Berkeley DB link (-ldb1)" >&5
18656 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18657   echo $ac_n "(cached) $ac_c" 1>&6
18658 else
18659   
18660         ol_DB_LIB=-ldb1
18661         ol_LIBS=$LIBS
18662         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18663
18664         cat > conftest.$ac_ext <<EOF
18665 #line 18666 "configure"
18666 #include "confdefs.h"
18667
18668 #ifdef HAVE_DB_185_H
18669 # include <db_185.h>
18670 #else
18671 # include <db.h>
18672 #endif
18673
18674 #ifndef DB_VERSION_MAJOR
18675 # define DB_VERSION_MAJOR 1
18676 #endif
18677
18678 #ifndef NULL
18679 #define NULL ((void*)0)
18680 #endif
18681
18682 int main() {
18683
18684 #if DB_VERSION_MAJOR > 1
18685         {
18686                 char *version;
18687                 int major, minor, patch;
18688
18689                 version = db_version( &major, &minor, &patch );
18690
18691                 if( major != DB_VERSION_MAJOR ||
18692                         minor < DB_VERSION_MINOR )
18693                 {
18694                         printf("Berkeley DB version mismatch\n"
18695                                 "\theader: %s\n\tlibrary: %s\n",
18696                                 DB_VERSION_STRING, version);
18697                         return 1;
18698                 }
18699         }
18700 #endif
18701
18702 #if DB_VERSION_MAJOR > 2
18703         db_env_create( NULL, 0 );
18704 #elif DB_VERSION_MAJOR > 1
18705         db_appexit( NULL );
18706 #else
18707         (void) dbopen( NULL, 0, 0, 0, NULL);
18708 #endif
18709
18710 ; return 0; }
18711 EOF
18712 if { (eval echo configure:18713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18713   rm -rf conftest*
18714   ol_cv_db_db1=yes
18715 else
18716   echo "configure: failed program was:" >&5
18717   cat conftest.$ac_ext >&5
18718   rm -rf conftest*
18719   ol_cv_db_db1=no
18720 fi
18721 rm -f conftest*
18722
18723         LIBS="$ol_LIBS"
18724
18725 fi
18726
18727 echo "$ac_t""$ol_cv_db_db1" 1>&6
18728
18729         if test $ol_cv_db_db1 = yes ; then
18730                 ol_cv_lib_db=-ldb1
18731         fi
18732 fi
18733
18734 if test $ol_cv_lib_db = no ; then
18735         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18736 echo "configure:18737: checking for Berkeley DB link (-ldb-1)" >&5
18737 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18738   echo $ac_n "(cached) $ac_c" 1>&6
18739 else
18740   
18741         ol_DB_LIB=-ldb-1
18742         ol_LIBS=$LIBS
18743         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18744
18745         cat > conftest.$ac_ext <<EOF
18746 #line 18747 "configure"
18747 #include "confdefs.h"
18748
18749 #ifdef HAVE_DB_185_H
18750 # include <db_185.h>
18751 #else
18752 # include <db.h>
18753 #endif
18754
18755 #ifndef DB_VERSION_MAJOR
18756 # define DB_VERSION_MAJOR 1
18757 #endif
18758
18759 #ifndef NULL
18760 #define NULL ((void*)0)
18761 #endif
18762
18763 int main() {
18764
18765 #if DB_VERSION_MAJOR > 1
18766         {
18767                 char *version;
18768                 int major, minor, patch;
18769
18770                 version = db_version( &major, &minor, &patch );
18771
18772                 if( major != DB_VERSION_MAJOR ||
18773                         minor < DB_VERSION_MINOR )
18774                 {
18775                         printf("Berkeley DB version mismatch\n"
18776                                 "\theader: %s\n\tlibrary: %s\n",
18777                                 DB_VERSION_STRING, version);
18778                         return 1;
18779                 }
18780         }
18781 #endif
18782
18783 #if DB_VERSION_MAJOR > 2
18784         db_env_create( NULL, 0 );
18785 #elif DB_VERSION_MAJOR > 1
18786         db_appexit( NULL );
18787 #else
18788         (void) dbopen( NULL, 0, 0, 0, NULL);
18789 #endif
18790
18791 ; return 0; }
18792 EOF
18793 if { (eval echo configure:18794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18794   rm -rf conftest*
18795   ol_cv_db_db_1=yes
18796 else
18797   echo "configure: failed program was:" >&5
18798   cat conftest.$ac_ext >&5
18799   rm -rf conftest*
18800   ol_cv_db_db_1=no
18801 fi
18802 rm -f conftest*
18803
18804         LIBS="$ol_LIBS"
18805
18806 fi
18807
18808 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18809
18810         if test $ol_cv_db_db_1 = yes ; then
18811                 ol_cv_lib_db=-ldb-1
18812         fi
18813 fi
18814
18815
18816                 if test "$ol_cv_lib_db" != no ; then
18817                         ol_cv_berkeley_db=yes
18818                 fi
18819         fi
18820 fi
18821
18822         else
18823                 ol_cv_berkeley_db=no
18824 for ac_hdr in db.h
18825 do
18826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18828 echo "configure:18829: checking for $ac_hdr" >&5
18829 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18830   echo $ac_n "(cached) $ac_c" 1>&6
18831 else
18832   cat > conftest.$ac_ext <<EOF
18833 #line 18834 "configure"
18834 #include "confdefs.h"
18835 #include <$ac_hdr>
18836 EOF
18837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18838 { (eval echo configure:18839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18840 if test -z "$ac_err"; then
18841   rm -rf conftest*
18842   eval "ac_cv_header_$ac_safe=yes"
18843 else
18844   echo "$ac_err" >&5
18845   echo "configure: failed program was:" >&5
18846   cat conftest.$ac_ext >&5
18847   rm -rf conftest*
18848   eval "ac_cv_header_$ac_safe=no"
18849 fi
18850 rm -f conftest*
18851 fi
18852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18853   echo "$ac_t""yes" 1>&6
18854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18855   cat >> confdefs.h <<EOF
18856 #define $ac_tr_hdr 1
18857 EOF
18858  
18859 else
18860   echo "$ac_t""no" 1>&6
18861 fi
18862 done
18863
18864 if test $ac_cv_header_db_h = yes; then
18865         ol_cv_lib_db=no
18866 if test $ol_cv_lib_db = no ; then
18867         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18868 echo "configure:18869: checking for Berkeley DB link (default)" >&5
18869 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18870   echo $ac_n "(cached) $ac_c" 1>&6
18871 else
18872   
18873         ol_DB_LIB=
18874         ol_LIBS=$LIBS
18875         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18876
18877         cat > conftest.$ac_ext <<EOF
18878 #line 18879 "configure"
18879 #include "confdefs.h"
18880
18881 #ifdef HAVE_DB_185_H
18882 # include <db_185.h>
18883 #else
18884 # include <db.h>
18885 #endif
18886
18887 #ifndef DB_VERSION_MAJOR
18888 # define DB_VERSION_MAJOR 1
18889 #endif
18890
18891 #ifndef NULL
18892 #define NULL ((void*)0)
18893 #endif
18894
18895 int main() {
18896
18897 #if DB_VERSION_MAJOR > 1
18898         {
18899                 char *version;
18900                 int major, minor, patch;
18901
18902                 version = db_version( &major, &minor, &patch );
18903
18904                 if( major != DB_VERSION_MAJOR ||
18905                         minor < DB_VERSION_MINOR )
18906                 {
18907                         printf("Berkeley DB version mismatch\n"
18908                                 "\theader: %s\n\tlibrary: %s\n",
18909                                 DB_VERSION_STRING, version);
18910                         return 1;
18911                 }
18912         }
18913 #endif
18914
18915 #if DB_VERSION_MAJOR > 2
18916         db_env_create( NULL, 0 );
18917 #elif DB_VERSION_MAJOR > 1
18918         db_appexit( NULL );
18919 #else
18920         (void) dbopen( NULL, 0, 0, 0, NULL);
18921 #endif
18922
18923 ; return 0; }
18924 EOF
18925 if { (eval echo configure:18926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18926   rm -rf conftest*
18927   ol_cv_db_none=yes
18928 else
18929   echo "configure: failed program was:" >&5
18930   cat conftest.$ac_ext >&5
18931   rm -rf conftest*
18932   ol_cv_db_none=no
18933 fi
18934 rm -f conftest*
18935
18936         LIBS="$ol_LIBS"
18937
18938 fi
18939
18940 echo "$ac_t""$ol_cv_db_none" 1>&6
18941
18942         if test $ol_cv_db_none = yes ; then
18943                 ol_cv_lib_db=yes
18944         fi
18945 fi
18946
18947 if test $ol_cv_lib_db = no ; then
18948         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18949 echo "configure:18950: checking for Berkeley DB link (-ldb43)" >&5
18950 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18951   echo $ac_n "(cached) $ac_c" 1>&6
18952 else
18953   
18954         ol_DB_LIB=-ldb43
18955         ol_LIBS=$LIBS
18956         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18957
18958         cat > conftest.$ac_ext <<EOF
18959 #line 18960 "configure"
18960 #include "confdefs.h"
18961
18962 #ifdef HAVE_DB_185_H
18963 # include <db_185.h>
18964 #else
18965 # include <db.h>
18966 #endif
18967
18968 #ifndef DB_VERSION_MAJOR
18969 # define DB_VERSION_MAJOR 1
18970 #endif
18971
18972 #ifndef NULL
18973 #define NULL ((void*)0)
18974 #endif
18975
18976 int main() {
18977
18978 #if DB_VERSION_MAJOR > 1
18979         {
18980                 char *version;
18981                 int major, minor, patch;
18982
18983                 version = db_version( &major, &minor, &patch );
18984
18985                 if( major != DB_VERSION_MAJOR ||
18986                         minor < DB_VERSION_MINOR )
18987                 {
18988                         printf("Berkeley DB version mismatch\n"
18989                                 "\theader: %s\n\tlibrary: %s\n",
18990                                 DB_VERSION_STRING, version);
18991                         return 1;
18992                 }
18993         }
18994 #endif
18995
18996 #if DB_VERSION_MAJOR > 2
18997         db_env_create( NULL, 0 );
18998 #elif DB_VERSION_MAJOR > 1
18999         db_appexit( NULL );
19000 #else
19001         (void) dbopen( NULL, 0, 0, 0, NULL);
19002 #endif
19003
19004 ; return 0; }
19005 EOF
19006 if { (eval echo configure:19007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19007   rm -rf conftest*
19008   ol_cv_db_db43=yes
19009 else
19010   echo "configure: failed program was:" >&5
19011   cat conftest.$ac_ext >&5
19012   rm -rf conftest*
19013   ol_cv_db_db43=no
19014 fi
19015 rm -f conftest*
19016
19017         LIBS="$ol_LIBS"
19018
19019 fi
19020
19021 echo "$ac_t""$ol_cv_db_db43" 1>&6
19022
19023         if test $ol_cv_db_db43 = yes ; then
19024                 ol_cv_lib_db=-ldb43
19025         fi
19026 fi
19027
19028 if test $ol_cv_lib_db = no ; then
19029         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19030 echo "configure:19031: checking for Berkeley DB link (-ldb-43)" >&5
19031 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19032   echo $ac_n "(cached) $ac_c" 1>&6
19033 else
19034   
19035         ol_DB_LIB=-ldb-43
19036         ol_LIBS=$LIBS
19037         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19038
19039         cat > conftest.$ac_ext <<EOF
19040 #line 19041 "configure"
19041 #include "confdefs.h"
19042
19043 #ifdef HAVE_DB_185_H
19044 # include <db_185.h>
19045 #else
19046 # include <db.h>
19047 #endif
19048
19049 #ifndef DB_VERSION_MAJOR
19050 # define DB_VERSION_MAJOR 1
19051 #endif
19052
19053 #ifndef NULL
19054 #define NULL ((void*)0)
19055 #endif
19056
19057 int main() {
19058
19059 #if DB_VERSION_MAJOR > 1
19060         {
19061                 char *version;
19062                 int major, minor, patch;
19063
19064                 version = db_version( &major, &minor, &patch );
19065
19066                 if( major != DB_VERSION_MAJOR ||
19067                         minor < DB_VERSION_MINOR )
19068                 {
19069                         printf("Berkeley DB version mismatch\n"
19070                                 "\theader: %s\n\tlibrary: %s\n",
19071                                 DB_VERSION_STRING, version);
19072                         return 1;
19073                 }
19074         }
19075 #endif
19076
19077 #if DB_VERSION_MAJOR > 2
19078         db_env_create( NULL, 0 );
19079 #elif DB_VERSION_MAJOR > 1
19080         db_appexit( NULL );
19081 #else
19082         (void) dbopen( NULL, 0, 0, 0, NULL);
19083 #endif
19084
19085 ; return 0; }
19086 EOF
19087 if { (eval echo configure:19088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19088   rm -rf conftest*
19089   ol_cv_db_db_43=yes
19090 else
19091   echo "configure: failed program was:" >&5
19092   cat conftest.$ac_ext >&5
19093   rm -rf conftest*
19094   ol_cv_db_db_43=no
19095 fi
19096 rm -f conftest*
19097
19098         LIBS="$ol_LIBS"
19099
19100 fi
19101
19102 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19103
19104         if test $ol_cv_db_db_43 = yes ; then
19105                 ol_cv_lib_db=-ldb-43
19106         fi
19107 fi
19108
19109 if test $ol_cv_lib_db = no ; then
19110         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19111 echo "configure:19112: checking for Berkeley DB link (-ldb-4.3)" >&5
19112 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19113   echo $ac_n "(cached) $ac_c" 1>&6
19114 else
19115   
19116         ol_DB_LIB=-ldb-4.3
19117         ol_LIBS=$LIBS
19118         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19119
19120         cat > conftest.$ac_ext <<EOF
19121 #line 19122 "configure"
19122 #include "confdefs.h"
19123
19124 #ifdef HAVE_DB_185_H
19125 # include <db_185.h>
19126 #else
19127 # include <db.h>
19128 #endif
19129
19130 #ifndef DB_VERSION_MAJOR
19131 # define DB_VERSION_MAJOR 1
19132 #endif
19133
19134 #ifndef NULL
19135 #define NULL ((void*)0)
19136 #endif
19137
19138 int main() {
19139
19140 #if DB_VERSION_MAJOR > 1
19141         {
19142                 char *version;
19143                 int major, minor, patch;
19144
19145                 version = db_version( &major, &minor, &patch );
19146
19147                 if( major != DB_VERSION_MAJOR ||
19148                         minor < DB_VERSION_MINOR )
19149                 {
19150                         printf("Berkeley DB version mismatch\n"
19151                                 "\theader: %s\n\tlibrary: %s\n",
19152                                 DB_VERSION_STRING, version);
19153                         return 1;
19154                 }
19155         }
19156 #endif
19157
19158 #if DB_VERSION_MAJOR > 2
19159         db_env_create( NULL, 0 );
19160 #elif DB_VERSION_MAJOR > 1
19161         db_appexit( NULL );
19162 #else
19163         (void) dbopen( NULL, 0, 0, 0, NULL);
19164 #endif
19165
19166 ; return 0; }
19167 EOF
19168 if { (eval echo configure:19169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19169   rm -rf conftest*
19170   ol_cv_db_db_4_dot_3=yes
19171 else
19172   echo "configure: failed program was:" >&5
19173   cat conftest.$ac_ext >&5
19174   rm -rf conftest*
19175   ol_cv_db_db_4_dot_3=no
19176 fi
19177 rm -f conftest*
19178
19179         LIBS="$ol_LIBS"
19180
19181 fi
19182
19183 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19184
19185         if test $ol_cv_db_db_4_dot_3 = yes ; then
19186                 ol_cv_lib_db=-ldb-4.3
19187         fi
19188 fi
19189
19190 if test $ol_cv_lib_db = no ; then
19191         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19192 echo "configure:19193: checking for Berkeley DB link (-ldb-4-3)" >&5
19193 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19194   echo $ac_n "(cached) $ac_c" 1>&6
19195 else
19196   
19197         ol_DB_LIB=-ldb-4-3
19198         ol_LIBS=$LIBS
19199         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19200
19201         cat > conftest.$ac_ext <<EOF
19202 #line 19203 "configure"
19203 #include "confdefs.h"
19204
19205 #ifdef HAVE_DB_185_H
19206 # include <db_185.h>
19207 #else
19208 # include <db.h>
19209 #endif
19210
19211 #ifndef DB_VERSION_MAJOR
19212 # define DB_VERSION_MAJOR 1
19213 #endif
19214
19215 #ifndef NULL
19216 #define NULL ((void*)0)
19217 #endif
19218
19219 int main() {
19220
19221 #if DB_VERSION_MAJOR > 1
19222         {
19223                 char *version;
19224                 int major, minor, patch;
19225
19226                 version = db_version( &major, &minor, &patch );
19227
19228                 if( major != DB_VERSION_MAJOR ||
19229                         minor < DB_VERSION_MINOR )
19230                 {
19231                         printf("Berkeley DB version mismatch\n"
19232                                 "\theader: %s\n\tlibrary: %s\n",
19233                                 DB_VERSION_STRING, version);
19234                         return 1;
19235                 }
19236         }
19237 #endif
19238
19239 #if DB_VERSION_MAJOR > 2
19240         db_env_create( NULL, 0 );
19241 #elif DB_VERSION_MAJOR > 1
19242         db_appexit( NULL );
19243 #else
19244         (void) dbopen( NULL, 0, 0, 0, NULL);
19245 #endif
19246
19247 ; return 0; }
19248 EOF
19249 if { (eval echo configure:19250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19250   rm -rf conftest*
19251   ol_cv_db_db_4_3=yes
19252 else
19253   echo "configure: failed program was:" >&5
19254   cat conftest.$ac_ext >&5
19255   rm -rf conftest*
19256   ol_cv_db_db_4_3=no
19257 fi
19258 rm -f conftest*
19259
19260         LIBS="$ol_LIBS"
19261
19262 fi
19263
19264 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19265
19266         if test $ol_cv_db_db_4_3 = yes ; then
19267                 ol_cv_lib_db=-ldb-4-3
19268         fi
19269 fi
19270
19271 if test $ol_cv_lib_db = no ; then
19272         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19273 echo "configure:19274: checking for Berkeley DB link (-ldb42)" >&5
19274 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19275   echo $ac_n "(cached) $ac_c" 1>&6
19276 else
19277   
19278         ol_DB_LIB=-ldb42
19279         ol_LIBS=$LIBS
19280         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19281
19282         cat > conftest.$ac_ext <<EOF
19283 #line 19284 "configure"
19284 #include "confdefs.h"
19285
19286 #ifdef HAVE_DB_185_H
19287 # include <db_185.h>
19288 #else
19289 # include <db.h>
19290 #endif
19291
19292 #ifndef DB_VERSION_MAJOR
19293 # define DB_VERSION_MAJOR 1
19294 #endif
19295
19296 #ifndef NULL
19297 #define NULL ((void*)0)
19298 #endif
19299
19300 int main() {
19301
19302 #if DB_VERSION_MAJOR > 1
19303         {
19304                 char *version;
19305                 int major, minor, patch;
19306
19307                 version = db_version( &major, &minor, &patch );
19308
19309                 if( major != DB_VERSION_MAJOR ||
19310                         minor < DB_VERSION_MINOR )
19311                 {
19312                         printf("Berkeley DB version mismatch\n"
19313                                 "\theader: %s\n\tlibrary: %s\n",
19314                                 DB_VERSION_STRING, version);
19315                         return 1;
19316                 }
19317         }
19318 #endif
19319
19320 #if DB_VERSION_MAJOR > 2
19321         db_env_create( NULL, 0 );
19322 #elif DB_VERSION_MAJOR > 1
19323         db_appexit( NULL );
19324 #else
19325         (void) dbopen( NULL, 0, 0, 0, NULL);
19326 #endif
19327
19328 ; return 0; }
19329 EOF
19330 if { (eval echo configure:19331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19331   rm -rf conftest*
19332   ol_cv_db_db42=yes
19333 else
19334   echo "configure: failed program was:" >&5
19335   cat conftest.$ac_ext >&5
19336   rm -rf conftest*
19337   ol_cv_db_db42=no
19338 fi
19339 rm -f conftest*
19340
19341         LIBS="$ol_LIBS"
19342
19343 fi
19344
19345 echo "$ac_t""$ol_cv_db_db42" 1>&6
19346
19347         if test $ol_cv_db_db42 = yes ; then
19348                 ol_cv_lib_db=-ldb42
19349         fi
19350 fi
19351
19352 if test $ol_cv_lib_db = no ; then
19353         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19354 echo "configure:19355: checking for Berkeley DB link (-ldb-42)" >&5
19355 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19356   echo $ac_n "(cached) $ac_c" 1>&6
19357 else
19358   
19359         ol_DB_LIB=-ldb-42
19360         ol_LIBS=$LIBS
19361         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19362
19363         cat > conftest.$ac_ext <<EOF
19364 #line 19365 "configure"
19365 #include "confdefs.h"
19366
19367 #ifdef HAVE_DB_185_H
19368 # include <db_185.h>
19369 #else
19370 # include <db.h>
19371 #endif
19372
19373 #ifndef DB_VERSION_MAJOR
19374 # define DB_VERSION_MAJOR 1
19375 #endif
19376
19377 #ifndef NULL
19378 #define NULL ((void*)0)
19379 #endif
19380
19381 int main() {
19382
19383 #if DB_VERSION_MAJOR > 1
19384         {
19385                 char *version;
19386                 int major, minor, patch;
19387
19388                 version = db_version( &major, &minor, &patch );
19389
19390                 if( major != DB_VERSION_MAJOR ||
19391                         minor < DB_VERSION_MINOR )
19392                 {
19393                         printf("Berkeley DB version mismatch\n"
19394                                 "\theader: %s\n\tlibrary: %s\n",
19395                                 DB_VERSION_STRING, version);
19396                         return 1;
19397                 }
19398         }
19399 #endif
19400
19401 #if DB_VERSION_MAJOR > 2
19402         db_env_create( NULL, 0 );
19403 #elif DB_VERSION_MAJOR > 1
19404         db_appexit( NULL );
19405 #else
19406         (void) dbopen( NULL, 0, 0, 0, NULL);
19407 #endif
19408
19409 ; return 0; }
19410 EOF
19411 if { (eval echo configure:19412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19412   rm -rf conftest*
19413   ol_cv_db_db_42=yes
19414 else
19415   echo "configure: failed program was:" >&5
19416   cat conftest.$ac_ext >&5
19417   rm -rf conftest*
19418   ol_cv_db_db_42=no
19419 fi
19420 rm -f conftest*
19421
19422         LIBS="$ol_LIBS"
19423
19424 fi
19425
19426 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19427
19428         if test $ol_cv_db_db_42 = yes ; then
19429                 ol_cv_lib_db=-ldb-42
19430         fi
19431 fi
19432
19433 if test $ol_cv_lib_db = no ; then
19434         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19435 echo "configure:19436: checking for Berkeley DB link (-ldb-4.2)" >&5
19436 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19437   echo $ac_n "(cached) $ac_c" 1>&6
19438 else
19439   
19440         ol_DB_LIB=-ldb-4.2
19441         ol_LIBS=$LIBS
19442         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19443
19444         cat > conftest.$ac_ext <<EOF
19445 #line 19446 "configure"
19446 #include "confdefs.h"
19447
19448 #ifdef HAVE_DB_185_H
19449 # include <db_185.h>
19450 #else
19451 # include <db.h>
19452 #endif
19453
19454 #ifndef DB_VERSION_MAJOR
19455 # define DB_VERSION_MAJOR 1
19456 #endif
19457
19458 #ifndef NULL
19459 #define NULL ((void*)0)
19460 #endif
19461
19462 int main() {
19463
19464 #if DB_VERSION_MAJOR > 1
19465         {
19466                 char *version;
19467                 int major, minor, patch;
19468
19469                 version = db_version( &major, &minor, &patch );
19470
19471                 if( major != DB_VERSION_MAJOR ||
19472                         minor < DB_VERSION_MINOR )
19473                 {
19474                         printf("Berkeley DB version mismatch\n"
19475                                 "\theader: %s\n\tlibrary: %s\n",
19476                                 DB_VERSION_STRING, version);
19477                         return 1;
19478                 }
19479         }
19480 #endif
19481
19482 #if DB_VERSION_MAJOR > 2
19483         db_env_create( NULL, 0 );
19484 #elif DB_VERSION_MAJOR > 1
19485         db_appexit( NULL );
19486 #else
19487         (void) dbopen( NULL, 0, 0, 0, NULL);
19488 #endif
19489
19490 ; return 0; }
19491 EOF
19492 if { (eval echo configure:19493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19493   rm -rf conftest*
19494   ol_cv_db_db_4_dot_2=yes
19495 else
19496   echo "configure: failed program was:" >&5
19497   cat conftest.$ac_ext >&5
19498   rm -rf conftest*
19499   ol_cv_db_db_4_dot_2=no
19500 fi
19501 rm -f conftest*
19502
19503         LIBS="$ol_LIBS"
19504
19505 fi
19506
19507 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19508
19509         if test $ol_cv_db_db_4_dot_2 = yes ; then
19510                 ol_cv_lib_db=-ldb-4.2
19511         fi
19512 fi
19513
19514 if test $ol_cv_lib_db = no ; then
19515         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19516 echo "configure:19517: checking for Berkeley DB link (-ldb-4-2)" >&5
19517 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19518   echo $ac_n "(cached) $ac_c" 1>&6
19519 else
19520   
19521         ol_DB_LIB=-ldb-4-2
19522         ol_LIBS=$LIBS
19523         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19524
19525         cat > conftest.$ac_ext <<EOF
19526 #line 19527 "configure"
19527 #include "confdefs.h"
19528
19529 #ifdef HAVE_DB_185_H
19530 # include <db_185.h>
19531 #else
19532 # include <db.h>
19533 #endif
19534
19535 #ifndef DB_VERSION_MAJOR
19536 # define DB_VERSION_MAJOR 1
19537 #endif
19538
19539 #ifndef NULL
19540 #define NULL ((void*)0)
19541 #endif
19542
19543 int main() {
19544
19545 #if DB_VERSION_MAJOR > 1
19546         {
19547                 char *version;
19548                 int major, minor, patch;
19549
19550                 version = db_version( &major, &minor, &patch );
19551
19552                 if( major != DB_VERSION_MAJOR ||
19553                         minor < DB_VERSION_MINOR )
19554                 {
19555                         printf("Berkeley DB version mismatch\n"
19556                                 "\theader: %s\n\tlibrary: %s\n",
19557                                 DB_VERSION_STRING, version);
19558                         return 1;
19559                 }
19560         }
19561 #endif
19562
19563 #if DB_VERSION_MAJOR > 2
19564         db_env_create( NULL, 0 );
19565 #elif DB_VERSION_MAJOR > 1
19566         db_appexit( NULL );
19567 #else
19568         (void) dbopen( NULL, 0, 0, 0, NULL);
19569 #endif
19570
19571 ; return 0; }
19572 EOF
19573 if { (eval echo configure:19574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19574   rm -rf conftest*
19575   ol_cv_db_db_4_2=yes
19576 else
19577   echo "configure: failed program was:" >&5
19578   cat conftest.$ac_ext >&5
19579   rm -rf conftest*
19580   ol_cv_db_db_4_2=no
19581 fi
19582 rm -f conftest*
19583
19584         LIBS="$ol_LIBS"
19585
19586 fi
19587
19588 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19589
19590         if test $ol_cv_db_db_4_2 = yes ; then
19591                 ol_cv_lib_db=-ldb-4-2
19592         fi
19593 fi
19594
19595 if test $ol_cv_lib_db = no ; then
19596         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19597 echo "configure:19598: checking for Berkeley DB link (-ldb-4)" >&5
19598 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19599   echo $ac_n "(cached) $ac_c" 1>&6
19600 else
19601   
19602         ol_DB_LIB=-ldb-4
19603         ol_LIBS=$LIBS
19604         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19605
19606         cat > conftest.$ac_ext <<EOF
19607 #line 19608 "configure"
19608 #include "confdefs.h"
19609
19610 #ifdef HAVE_DB_185_H
19611 # include <db_185.h>
19612 #else
19613 # include <db.h>
19614 #endif
19615
19616 #ifndef DB_VERSION_MAJOR
19617 # define DB_VERSION_MAJOR 1
19618 #endif
19619
19620 #ifndef NULL
19621 #define NULL ((void*)0)
19622 #endif
19623
19624 int main() {
19625
19626 #if DB_VERSION_MAJOR > 1
19627         {
19628                 char *version;
19629                 int major, minor, patch;
19630
19631                 version = db_version( &major, &minor, &patch );
19632
19633                 if( major != DB_VERSION_MAJOR ||
19634                         minor < DB_VERSION_MINOR )
19635                 {
19636                         printf("Berkeley DB version mismatch\n"
19637                                 "\theader: %s\n\tlibrary: %s\n",
19638                                 DB_VERSION_STRING, version);
19639                         return 1;
19640                 }
19641         }
19642 #endif
19643
19644 #if DB_VERSION_MAJOR > 2
19645         db_env_create( NULL, 0 );
19646 #elif DB_VERSION_MAJOR > 1
19647         db_appexit( NULL );
19648 #else
19649         (void) dbopen( NULL, 0, 0, 0, NULL);
19650 #endif
19651
19652 ; return 0; }
19653 EOF
19654 if { (eval echo configure:19655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19655   rm -rf conftest*
19656   ol_cv_db_db_4=yes
19657 else
19658   echo "configure: failed program was:" >&5
19659   cat conftest.$ac_ext >&5
19660   rm -rf conftest*
19661   ol_cv_db_db_4=no
19662 fi
19663 rm -f conftest*
19664
19665         LIBS="$ol_LIBS"
19666
19667 fi
19668
19669 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19670
19671         if test $ol_cv_db_db_4 = yes ; then
19672                 ol_cv_lib_db=-ldb-4
19673         fi
19674 fi
19675
19676 if test $ol_cv_lib_db = no ; then
19677         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19678 echo "configure:19679: checking for Berkeley DB link (-ldb4)" >&5
19679 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19680   echo $ac_n "(cached) $ac_c" 1>&6
19681 else
19682   
19683         ol_DB_LIB=-ldb4
19684         ol_LIBS=$LIBS
19685         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19686
19687         cat > conftest.$ac_ext <<EOF
19688 #line 19689 "configure"
19689 #include "confdefs.h"
19690
19691 #ifdef HAVE_DB_185_H
19692 # include <db_185.h>
19693 #else
19694 # include <db.h>
19695 #endif
19696
19697 #ifndef DB_VERSION_MAJOR
19698 # define DB_VERSION_MAJOR 1
19699 #endif
19700
19701 #ifndef NULL
19702 #define NULL ((void*)0)
19703 #endif
19704
19705 int main() {
19706
19707 #if DB_VERSION_MAJOR > 1
19708         {
19709                 char *version;
19710                 int major, minor, patch;
19711
19712                 version = db_version( &major, &minor, &patch );
19713
19714                 if( major != DB_VERSION_MAJOR ||
19715                         minor < DB_VERSION_MINOR )
19716                 {
19717                         printf("Berkeley DB version mismatch\n"
19718                                 "\theader: %s\n\tlibrary: %s\n",
19719                                 DB_VERSION_STRING, version);
19720                         return 1;
19721                 }
19722         }
19723 #endif
19724
19725 #if DB_VERSION_MAJOR > 2
19726         db_env_create( NULL, 0 );
19727 #elif DB_VERSION_MAJOR > 1
19728         db_appexit( NULL );
19729 #else
19730         (void) dbopen( NULL, 0, 0, 0, NULL);
19731 #endif
19732
19733 ; return 0; }
19734 EOF
19735 if { (eval echo configure:19736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19736   rm -rf conftest*
19737   ol_cv_db_db4=yes
19738 else
19739   echo "configure: failed program was:" >&5
19740   cat conftest.$ac_ext >&5
19741   rm -rf conftest*
19742   ol_cv_db_db4=no
19743 fi
19744 rm -f conftest*
19745
19746         LIBS="$ol_LIBS"
19747
19748 fi
19749
19750 echo "$ac_t""$ol_cv_db_db4" 1>&6
19751
19752         if test $ol_cv_db_db4 = yes ; then
19753                 ol_cv_lib_db=-ldb4
19754         fi
19755 fi
19756
19757 if test $ol_cv_lib_db = no ; then
19758         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19759 echo "configure:19760: checking for Berkeley DB link (-ldb)" >&5
19760 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19761   echo $ac_n "(cached) $ac_c" 1>&6
19762 else
19763   
19764         ol_DB_LIB=-ldb
19765         ol_LIBS=$LIBS
19766         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19767
19768         cat > conftest.$ac_ext <<EOF
19769 #line 19770 "configure"
19770 #include "confdefs.h"
19771
19772 #ifdef HAVE_DB_185_H
19773 # include <db_185.h>
19774 #else
19775 # include <db.h>
19776 #endif
19777
19778 #ifndef DB_VERSION_MAJOR
19779 # define DB_VERSION_MAJOR 1
19780 #endif
19781
19782 #ifndef NULL
19783 #define NULL ((void*)0)
19784 #endif
19785
19786 int main() {
19787
19788 #if DB_VERSION_MAJOR > 1
19789         {
19790                 char *version;
19791                 int major, minor, patch;
19792
19793                 version = db_version( &major, &minor, &patch );
19794
19795                 if( major != DB_VERSION_MAJOR ||
19796                         minor < DB_VERSION_MINOR )
19797                 {
19798                         printf("Berkeley DB version mismatch\n"
19799                                 "\theader: %s\n\tlibrary: %s\n",
19800                                 DB_VERSION_STRING, version);
19801                         return 1;
19802                 }
19803         }
19804 #endif
19805
19806 #if DB_VERSION_MAJOR > 2
19807         db_env_create( NULL, 0 );
19808 #elif DB_VERSION_MAJOR > 1
19809         db_appexit( NULL );
19810 #else
19811         (void) dbopen( NULL, 0, 0, 0, NULL);
19812 #endif
19813
19814 ; return 0; }
19815 EOF
19816 if { (eval echo configure:19817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19817   rm -rf conftest*
19818   ol_cv_db_db=yes
19819 else
19820   echo "configure: failed program was:" >&5
19821   cat conftest.$ac_ext >&5
19822   rm -rf conftest*
19823   ol_cv_db_db=no
19824 fi
19825 rm -f conftest*
19826
19827         LIBS="$ol_LIBS"
19828
19829 fi
19830
19831 echo "$ac_t""$ol_cv_db_db" 1>&6
19832
19833         if test $ol_cv_db_db = yes ; then
19834                 ol_cv_lib_db=-ldb
19835         fi
19836 fi
19837
19838 if test $ol_cv_lib_db = no ; then
19839         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19840 echo "configure:19841: checking for Berkeley DB link (-ldb41)" >&5
19841 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19842   echo $ac_n "(cached) $ac_c" 1>&6
19843 else
19844   
19845         ol_DB_LIB=-ldb41
19846         ol_LIBS=$LIBS
19847         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19848
19849         cat > conftest.$ac_ext <<EOF
19850 #line 19851 "configure"
19851 #include "confdefs.h"
19852
19853 #ifdef HAVE_DB_185_H
19854 # include <db_185.h>
19855 #else
19856 # include <db.h>
19857 #endif
19858
19859 #ifndef DB_VERSION_MAJOR
19860 # define DB_VERSION_MAJOR 1
19861 #endif
19862
19863 #ifndef NULL
19864 #define NULL ((void*)0)
19865 #endif
19866
19867 int main() {
19868
19869 #if DB_VERSION_MAJOR > 1
19870         {
19871                 char *version;
19872                 int major, minor, patch;
19873
19874                 version = db_version( &major, &minor, &patch );
19875
19876                 if( major != DB_VERSION_MAJOR ||
19877                         minor < DB_VERSION_MINOR )
19878                 {
19879                         printf("Berkeley DB version mismatch\n"
19880                                 "\theader: %s\n\tlibrary: %s\n",
19881                                 DB_VERSION_STRING, version);
19882                         return 1;
19883                 }
19884         }
19885 #endif
19886
19887 #if DB_VERSION_MAJOR > 2
19888         db_env_create( NULL, 0 );
19889 #elif DB_VERSION_MAJOR > 1
19890         db_appexit( NULL );
19891 #else
19892         (void) dbopen( NULL, 0, 0, 0, NULL);
19893 #endif
19894
19895 ; return 0; }
19896 EOF
19897 if { (eval echo configure:19898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19898   rm -rf conftest*
19899   ol_cv_db_db41=yes
19900 else
19901   echo "configure: failed program was:" >&5
19902   cat conftest.$ac_ext >&5
19903   rm -rf conftest*
19904   ol_cv_db_db41=no
19905 fi
19906 rm -f conftest*
19907
19908         LIBS="$ol_LIBS"
19909
19910 fi
19911
19912 echo "$ac_t""$ol_cv_db_db41" 1>&6
19913
19914         if test $ol_cv_db_db41 = yes ; then
19915                 ol_cv_lib_db=-ldb41
19916         fi
19917 fi
19918
19919 if test $ol_cv_lib_db = no ; then
19920         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19921 echo "configure:19922: checking for Berkeley DB link (-ldb-41)" >&5
19922 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19923   echo $ac_n "(cached) $ac_c" 1>&6
19924 else
19925   
19926         ol_DB_LIB=-ldb-41
19927         ol_LIBS=$LIBS
19928         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19929
19930         cat > conftest.$ac_ext <<EOF
19931 #line 19932 "configure"
19932 #include "confdefs.h"
19933
19934 #ifdef HAVE_DB_185_H
19935 # include <db_185.h>
19936 #else
19937 # include <db.h>
19938 #endif
19939
19940 #ifndef DB_VERSION_MAJOR
19941 # define DB_VERSION_MAJOR 1
19942 #endif
19943
19944 #ifndef NULL
19945 #define NULL ((void*)0)
19946 #endif
19947
19948 int main() {
19949
19950 #if DB_VERSION_MAJOR > 1
19951         {
19952                 char *version;
19953                 int major, minor, patch;
19954
19955                 version = db_version( &major, &minor, &patch );
19956
19957                 if( major != DB_VERSION_MAJOR ||
19958                         minor < DB_VERSION_MINOR )
19959                 {
19960                         printf("Berkeley DB version mismatch\n"
19961                                 "\theader: %s\n\tlibrary: %s\n",
19962                                 DB_VERSION_STRING, version);
19963                         return 1;
19964                 }
19965         }
19966 #endif
19967
19968 #if DB_VERSION_MAJOR > 2
19969         db_env_create( NULL, 0 );
19970 #elif DB_VERSION_MAJOR > 1
19971         db_appexit( NULL );
19972 #else
19973         (void) dbopen( NULL, 0, 0, 0, NULL);
19974 #endif
19975
19976 ; return 0; }
19977 EOF
19978 if { (eval echo configure:19979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19979   rm -rf conftest*
19980   ol_cv_db_db_41=yes
19981 else
19982   echo "configure: failed program was:" >&5
19983   cat conftest.$ac_ext >&5
19984   rm -rf conftest*
19985   ol_cv_db_db_41=no
19986 fi
19987 rm -f conftest*
19988
19989         LIBS="$ol_LIBS"
19990
19991 fi
19992
19993 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19994
19995         if test $ol_cv_db_db_41 = yes ; then
19996                 ol_cv_lib_db=-ldb-41
19997         fi
19998 fi
19999
20000 if test $ol_cv_lib_db = no ; then
20001         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20002 echo "configure:20003: checking for Berkeley DB link (-ldb-4.1)" >&5
20003 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20004   echo $ac_n "(cached) $ac_c" 1>&6
20005 else
20006   
20007         ol_DB_LIB=-ldb-4.1
20008         ol_LIBS=$LIBS
20009         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20010
20011         cat > conftest.$ac_ext <<EOF
20012 #line 20013 "configure"
20013 #include "confdefs.h"
20014
20015 #ifdef HAVE_DB_185_H
20016 # include <db_185.h>
20017 #else
20018 # include <db.h>
20019 #endif
20020
20021 #ifndef DB_VERSION_MAJOR
20022 # define DB_VERSION_MAJOR 1
20023 #endif
20024
20025 #ifndef NULL
20026 #define NULL ((void*)0)
20027 #endif
20028
20029 int main() {
20030
20031 #if DB_VERSION_MAJOR > 1
20032         {
20033                 char *version;
20034                 int major, minor, patch;
20035
20036                 version = db_version( &major, &minor, &patch );
20037
20038                 if( major != DB_VERSION_MAJOR ||
20039                         minor < DB_VERSION_MINOR )
20040                 {
20041                         printf("Berkeley DB version mismatch\n"
20042                                 "\theader: %s\n\tlibrary: %s\n",
20043                                 DB_VERSION_STRING, version);
20044                         return 1;
20045                 }
20046         }
20047 #endif
20048
20049 #if DB_VERSION_MAJOR > 2
20050         db_env_create( NULL, 0 );
20051 #elif DB_VERSION_MAJOR > 1
20052         db_appexit( NULL );
20053 #else
20054         (void) dbopen( NULL, 0, 0, 0, NULL);
20055 #endif
20056
20057 ; return 0; }
20058 EOF
20059 if { (eval echo configure:20060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20060   rm -rf conftest*
20061   ol_cv_db_db_4_dot_1=yes
20062 else
20063   echo "configure: failed program was:" >&5
20064   cat conftest.$ac_ext >&5
20065   rm -rf conftest*
20066   ol_cv_db_db_4_dot_1=no
20067 fi
20068 rm -f conftest*
20069
20070         LIBS="$ol_LIBS"
20071
20072 fi
20073
20074 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20075
20076         if test $ol_cv_db_db_4_dot_1 = yes ; then
20077                 ol_cv_lib_db=-ldb-4.1
20078         fi
20079 fi
20080
20081 if test $ol_cv_lib_db = no ; then
20082         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20083 echo "configure:20084: checking for Berkeley DB link (-ldb-4-1)" >&5
20084 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20085   echo $ac_n "(cached) $ac_c" 1>&6
20086 else
20087   
20088         ol_DB_LIB=-ldb-4-1
20089         ol_LIBS=$LIBS
20090         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20091
20092         cat > conftest.$ac_ext <<EOF
20093 #line 20094 "configure"
20094 #include "confdefs.h"
20095
20096 #ifdef HAVE_DB_185_H
20097 # include <db_185.h>
20098 #else
20099 # include <db.h>
20100 #endif
20101
20102 #ifndef DB_VERSION_MAJOR
20103 # define DB_VERSION_MAJOR 1
20104 #endif
20105
20106 #ifndef NULL
20107 #define NULL ((void*)0)
20108 #endif
20109
20110 int main() {
20111
20112 #if DB_VERSION_MAJOR > 1
20113         {
20114                 char *version;
20115                 int major, minor, patch;
20116
20117                 version = db_version( &major, &minor, &patch );
20118
20119                 if( major != DB_VERSION_MAJOR ||
20120                         minor < DB_VERSION_MINOR )
20121                 {
20122                         printf("Berkeley DB version mismatch\n"
20123                                 "\theader: %s\n\tlibrary: %s\n",
20124                                 DB_VERSION_STRING, version);
20125                         return 1;
20126                 }
20127         }
20128 #endif
20129
20130 #if DB_VERSION_MAJOR > 2
20131         db_env_create( NULL, 0 );
20132 #elif DB_VERSION_MAJOR > 1
20133         db_appexit( NULL );
20134 #else
20135         (void) dbopen( NULL, 0, 0, 0, NULL);
20136 #endif
20137
20138 ; return 0; }
20139 EOF
20140 if { (eval echo configure:20141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20141   rm -rf conftest*
20142   ol_cv_db_db_4_1=yes
20143 else
20144   echo "configure: failed program was:" >&5
20145   cat conftest.$ac_ext >&5
20146   rm -rf conftest*
20147   ol_cv_db_db_4_1=no
20148 fi
20149 rm -f conftest*
20150
20151         LIBS="$ol_LIBS"
20152
20153 fi
20154
20155 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20156
20157         if test $ol_cv_db_db_4_1 = yes ; then
20158                 ol_cv_lib_db=-ldb-4-1
20159         fi
20160 fi
20161
20162 if test $ol_cv_lib_db = no ; then
20163         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20164 echo "configure:20165: checking for Berkeley DB link (-ldb3)" >&5
20165 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20166   echo $ac_n "(cached) $ac_c" 1>&6
20167 else
20168   
20169         ol_DB_LIB=-ldb3
20170         ol_LIBS=$LIBS
20171         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20172
20173         cat > conftest.$ac_ext <<EOF
20174 #line 20175 "configure"
20175 #include "confdefs.h"
20176
20177 #ifdef HAVE_DB_185_H
20178 # include <db_185.h>
20179 #else
20180 # include <db.h>
20181 #endif
20182
20183 #ifndef DB_VERSION_MAJOR
20184 # define DB_VERSION_MAJOR 1
20185 #endif
20186
20187 #ifndef NULL
20188 #define NULL ((void*)0)
20189 #endif
20190
20191 int main() {
20192
20193 #if DB_VERSION_MAJOR > 1
20194         {
20195                 char *version;
20196                 int major, minor, patch;
20197
20198                 version = db_version( &major, &minor, &patch );
20199
20200                 if( major != DB_VERSION_MAJOR ||
20201                         minor < DB_VERSION_MINOR )
20202                 {
20203                         printf("Berkeley DB version mismatch\n"
20204                                 "\theader: %s\n\tlibrary: %s\n",
20205                                 DB_VERSION_STRING, version);
20206                         return 1;
20207                 }
20208         }
20209 #endif
20210
20211 #if DB_VERSION_MAJOR > 2
20212         db_env_create( NULL, 0 );
20213 #elif DB_VERSION_MAJOR > 1
20214         db_appexit( NULL );
20215 #else
20216         (void) dbopen( NULL, 0, 0, 0, NULL);
20217 #endif
20218
20219 ; return 0; }
20220 EOF
20221 if { (eval echo configure:20222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20222   rm -rf conftest*
20223   ol_cv_db_db3=yes
20224 else
20225   echo "configure: failed program was:" >&5
20226   cat conftest.$ac_ext >&5
20227   rm -rf conftest*
20228   ol_cv_db_db3=no
20229 fi
20230 rm -f conftest*
20231
20232         LIBS="$ol_LIBS"
20233
20234 fi
20235
20236 echo "$ac_t""$ol_cv_db_db3" 1>&6
20237
20238         if test $ol_cv_db_db3 = yes ; then
20239                 ol_cv_lib_db=-ldb3
20240         fi
20241 fi
20242
20243 if test $ol_cv_lib_db = no ; then
20244         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20245 echo "configure:20246: checking for Berkeley DB link (-ldb-3)" >&5
20246 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20247   echo $ac_n "(cached) $ac_c" 1>&6
20248 else
20249   
20250         ol_DB_LIB=-ldb-3
20251         ol_LIBS=$LIBS
20252         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20253
20254         cat > conftest.$ac_ext <<EOF
20255 #line 20256 "configure"
20256 #include "confdefs.h"
20257
20258 #ifdef HAVE_DB_185_H
20259 # include <db_185.h>
20260 #else
20261 # include <db.h>
20262 #endif
20263
20264 #ifndef DB_VERSION_MAJOR
20265 # define DB_VERSION_MAJOR 1
20266 #endif
20267
20268 #ifndef NULL
20269 #define NULL ((void*)0)
20270 #endif
20271
20272 int main() {
20273
20274 #if DB_VERSION_MAJOR > 1
20275         {
20276                 char *version;
20277                 int major, minor, patch;
20278
20279                 version = db_version( &major, &minor, &patch );
20280
20281                 if( major != DB_VERSION_MAJOR ||
20282                         minor < DB_VERSION_MINOR )
20283                 {
20284                         printf("Berkeley DB version mismatch\n"
20285                                 "\theader: %s\n\tlibrary: %s\n",
20286                                 DB_VERSION_STRING, version);
20287                         return 1;
20288                 }
20289         }
20290 #endif
20291
20292 #if DB_VERSION_MAJOR > 2
20293         db_env_create( NULL, 0 );
20294 #elif DB_VERSION_MAJOR > 1
20295         db_appexit( NULL );
20296 #else
20297         (void) dbopen( NULL, 0, 0, 0, NULL);
20298 #endif
20299
20300 ; return 0; }
20301 EOF
20302 if { (eval echo configure:20303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20303   rm -rf conftest*
20304   ol_cv_db_db_3=yes
20305 else
20306   echo "configure: failed program was:" >&5
20307   cat conftest.$ac_ext >&5
20308   rm -rf conftest*
20309   ol_cv_db_db_3=no
20310 fi
20311 rm -f conftest*
20312
20313         LIBS="$ol_LIBS"
20314
20315 fi
20316
20317 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20318
20319         if test $ol_cv_db_db_3 = yes ; then
20320                 ol_cv_lib_db=-ldb-3
20321         fi
20322 fi
20323
20324 if test $ol_cv_lib_db = no ; then
20325         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20326 echo "configure:20327: checking for Berkeley DB link (-ldb2)" >&5
20327 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20328   echo $ac_n "(cached) $ac_c" 1>&6
20329 else
20330   
20331         ol_DB_LIB=-ldb2
20332         ol_LIBS=$LIBS
20333         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20334
20335         cat > conftest.$ac_ext <<EOF
20336 #line 20337 "configure"
20337 #include "confdefs.h"
20338
20339 #ifdef HAVE_DB_185_H
20340 # include <db_185.h>
20341 #else
20342 # include <db.h>
20343 #endif
20344
20345 #ifndef DB_VERSION_MAJOR
20346 # define DB_VERSION_MAJOR 1
20347 #endif
20348
20349 #ifndef NULL
20350 #define NULL ((void*)0)
20351 #endif
20352
20353 int main() {
20354
20355 #if DB_VERSION_MAJOR > 1
20356         {
20357                 char *version;
20358                 int major, minor, patch;
20359
20360                 version = db_version( &major, &minor, &patch );
20361
20362                 if( major != DB_VERSION_MAJOR ||
20363                         minor < DB_VERSION_MINOR )
20364                 {
20365                         printf("Berkeley DB version mismatch\n"
20366                                 "\theader: %s\n\tlibrary: %s\n",
20367                                 DB_VERSION_STRING, version);
20368                         return 1;
20369                 }
20370         }
20371 #endif
20372
20373 #if DB_VERSION_MAJOR > 2
20374         db_env_create( NULL, 0 );
20375 #elif DB_VERSION_MAJOR > 1
20376         db_appexit( NULL );
20377 #else
20378         (void) dbopen( NULL, 0, 0, 0, NULL);
20379 #endif
20380
20381 ; return 0; }
20382 EOF
20383 if { (eval echo configure:20384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20384   rm -rf conftest*
20385   ol_cv_db_db2=yes
20386 else
20387   echo "configure: failed program was:" >&5
20388   cat conftest.$ac_ext >&5
20389   rm -rf conftest*
20390   ol_cv_db_db2=no
20391 fi
20392 rm -f conftest*
20393
20394         LIBS="$ol_LIBS"
20395
20396 fi
20397
20398 echo "$ac_t""$ol_cv_db_db2" 1>&6
20399
20400         if test $ol_cv_db_db2 = yes ; then
20401                 ol_cv_lib_db=-ldb2
20402         fi
20403 fi
20404
20405 if test $ol_cv_lib_db = no ; then
20406         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20407 echo "configure:20408: checking for Berkeley DB link (-ldb-2)" >&5
20408 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20409   echo $ac_n "(cached) $ac_c" 1>&6
20410 else
20411   
20412         ol_DB_LIB=-ldb-2
20413         ol_LIBS=$LIBS
20414         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20415
20416         cat > conftest.$ac_ext <<EOF
20417 #line 20418 "configure"
20418 #include "confdefs.h"
20419
20420 #ifdef HAVE_DB_185_H
20421 # include <db_185.h>
20422 #else
20423 # include <db.h>
20424 #endif
20425
20426 #ifndef DB_VERSION_MAJOR
20427 # define DB_VERSION_MAJOR 1
20428 #endif
20429
20430 #ifndef NULL
20431 #define NULL ((void*)0)
20432 #endif
20433
20434 int main() {
20435
20436 #if DB_VERSION_MAJOR > 1
20437         {
20438                 char *version;
20439                 int major, minor, patch;
20440
20441                 version = db_version( &major, &minor, &patch );
20442
20443                 if( major != DB_VERSION_MAJOR ||
20444                         minor < DB_VERSION_MINOR )
20445                 {
20446                         printf("Berkeley DB version mismatch\n"
20447                                 "\theader: %s\n\tlibrary: %s\n",
20448                                 DB_VERSION_STRING, version);
20449                         return 1;
20450                 }
20451         }
20452 #endif
20453
20454 #if DB_VERSION_MAJOR > 2
20455         db_env_create( NULL, 0 );
20456 #elif DB_VERSION_MAJOR > 1
20457         db_appexit( NULL );
20458 #else
20459         (void) dbopen( NULL, 0, 0, 0, NULL);
20460 #endif
20461
20462 ; return 0; }
20463 EOF
20464 if { (eval echo configure:20465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20465   rm -rf conftest*
20466   ol_cv_db_db_2=yes
20467 else
20468   echo "configure: failed program was:" >&5
20469   cat conftest.$ac_ext >&5
20470   rm -rf conftest*
20471   ol_cv_db_db_2=no
20472 fi
20473 rm -f conftest*
20474
20475         LIBS="$ol_LIBS"
20476
20477 fi
20478
20479 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20480
20481         if test $ol_cv_db_db_2 = yes ; then
20482                 ol_cv_lib_db=-ldb-2
20483         fi
20484 fi
20485
20486 if test $ol_cv_lib_db = no ; then
20487         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20488 echo "configure:20489: checking for Berkeley DB link (-ldb1)" >&5
20489 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20490   echo $ac_n "(cached) $ac_c" 1>&6
20491 else
20492   
20493         ol_DB_LIB=-ldb1
20494         ol_LIBS=$LIBS
20495         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20496
20497         cat > conftest.$ac_ext <<EOF
20498 #line 20499 "configure"
20499 #include "confdefs.h"
20500
20501 #ifdef HAVE_DB_185_H
20502 # include <db_185.h>
20503 #else
20504 # include <db.h>
20505 #endif
20506
20507 #ifndef DB_VERSION_MAJOR
20508 # define DB_VERSION_MAJOR 1
20509 #endif
20510
20511 #ifndef NULL
20512 #define NULL ((void*)0)
20513 #endif
20514
20515 int main() {
20516
20517 #if DB_VERSION_MAJOR > 1
20518         {
20519                 char *version;
20520                 int major, minor, patch;
20521
20522                 version = db_version( &major, &minor, &patch );
20523
20524                 if( major != DB_VERSION_MAJOR ||
20525                         minor < DB_VERSION_MINOR )
20526                 {
20527                         printf("Berkeley DB version mismatch\n"
20528                                 "\theader: %s\n\tlibrary: %s\n",
20529                                 DB_VERSION_STRING, version);
20530                         return 1;
20531                 }
20532         }
20533 #endif
20534
20535 #if DB_VERSION_MAJOR > 2
20536         db_env_create( NULL, 0 );
20537 #elif DB_VERSION_MAJOR > 1
20538         db_appexit( NULL );
20539 #else
20540         (void) dbopen( NULL, 0, 0, 0, NULL);
20541 #endif
20542
20543 ; return 0; }
20544 EOF
20545 if { (eval echo configure:20546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20546   rm -rf conftest*
20547   ol_cv_db_db1=yes
20548 else
20549   echo "configure: failed program was:" >&5
20550   cat conftest.$ac_ext >&5
20551   rm -rf conftest*
20552   ol_cv_db_db1=no
20553 fi
20554 rm -f conftest*
20555
20556         LIBS="$ol_LIBS"
20557
20558 fi
20559
20560 echo "$ac_t""$ol_cv_db_db1" 1>&6
20561
20562         if test $ol_cv_db_db1 = yes ; then
20563                 ol_cv_lib_db=-ldb1
20564         fi
20565 fi
20566
20567 if test $ol_cv_lib_db = no ; then
20568         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20569 echo "configure:20570: checking for Berkeley DB link (-ldb-1)" >&5
20570 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20571   echo $ac_n "(cached) $ac_c" 1>&6
20572 else
20573   
20574         ol_DB_LIB=-ldb-1
20575         ol_LIBS=$LIBS
20576         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20577
20578         cat > conftest.$ac_ext <<EOF
20579 #line 20580 "configure"
20580 #include "confdefs.h"
20581
20582 #ifdef HAVE_DB_185_H
20583 # include <db_185.h>
20584 #else
20585 # include <db.h>
20586 #endif
20587
20588 #ifndef DB_VERSION_MAJOR
20589 # define DB_VERSION_MAJOR 1
20590 #endif
20591
20592 #ifndef NULL
20593 #define NULL ((void*)0)
20594 #endif
20595
20596 int main() {
20597
20598 #if DB_VERSION_MAJOR > 1
20599         {
20600                 char *version;
20601                 int major, minor, patch;
20602
20603                 version = db_version( &major, &minor, &patch );
20604
20605                 if( major != DB_VERSION_MAJOR ||
20606                         minor < DB_VERSION_MINOR )
20607                 {
20608                         printf("Berkeley DB version mismatch\n"
20609                                 "\theader: %s\n\tlibrary: %s\n",
20610                                 DB_VERSION_STRING, version);
20611                         return 1;
20612                 }
20613         }
20614 #endif
20615
20616 #if DB_VERSION_MAJOR > 2
20617         db_env_create( NULL, 0 );
20618 #elif DB_VERSION_MAJOR > 1
20619         db_appexit( NULL );
20620 #else
20621         (void) dbopen( NULL, 0, 0, 0, NULL);
20622 #endif
20623
20624 ; return 0; }
20625 EOF
20626 if { (eval echo configure:20627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20627   rm -rf conftest*
20628   ol_cv_db_db_1=yes
20629 else
20630   echo "configure: failed program was:" >&5
20631   cat conftest.$ac_ext >&5
20632   rm -rf conftest*
20633   ol_cv_db_db_1=no
20634 fi
20635 rm -f conftest*
20636
20637         LIBS="$ol_LIBS"
20638
20639 fi
20640
20641 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20642
20643         if test $ol_cv_db_db_1 = yes ; then
20644                 ol_cv_lib_db=-ldb-1
20645         fi
20646 fi
20647
20648
20649         if test "$ol_cv_lib_db" != no ; then
20650                 ol_cv_berkeley_db=yes
20651                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20652 echo "configure:20653: checking for Berkeley DB version match" >&5
20653 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20654   echo $ac_n "(cached) $ac_c" 1>&6
20655 else
20656   
20657         ol_LIBS="$LIBS"
20658         LIBS="$LTHREAD_LIBS $LIBS"
20659         if test $ol_cv_lib_db != yes ; then
20660                 LIBS="$ol_cv_lib_db $LIBS"
20661         fi
20662
20663         if test "$cross_compiling" = yes; then
20664   ol_cv_berkeley_db_version=cross
20665 else
20666   cat > conftest.$ac_ext <<EOF
20667 #line 20668 "configure"
20668 #include "confdefs.h"
20669
20670 #ifdef HAVE_DB_185_H
20671         choke me;
20672 #else
20673 #include <db.h>
20674 #endif
20675 #ifndef DB_VERSION_MAJOR
20676 # define DB_VERSION_MAJOR 1
20677 #endif
20678 #ifndef NULL
20679 #define NULL ((void *)0)
20680 #endif
20681 main()
20682 {
20683 #if DB_VERSION_MAJOR > 1
20684         char *version;
20685         int major, minor, patch;
20686
20687         version = db_version( &major, &minor, &patch );
20688
20689         if( major != DB_VERSION_MAJOR ||
20690                 minor != DB_VERSION_MINOR ||
20691                 patch != DB_VERSION_PATCH )
20692         {
20693                 printf("Berkeley DB version mismatch\n"
20694                         "\theader: %s\n\tlibrary: %s\n",
20695                         DB_VERSION_STRING, version);
20696                 return 1;
20697         }
20698 #endif
20699
20700         return 0;
20701 }
20702 EOF
20703 if { (eval echo configure:20704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20704 then
20705   ol_cv_berkeley_db_version=yes
20706 else
20707   echo "configure: failed program was:" >&5
20708   cat conftest.$ac_ext >&5
20709   rm -fr conftest*
20710   ol_cv_berkeley_db_version=no
20711 fi
20712 rm -fr conftest*
20713 fi
20714
20715
20716         LIBS="$ol_LIBS"
20717
20718 fi
20719
20720 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20721
20722         if test $ol_cv_berkeley_db_version = no ; then
20723                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20724         fi
20725
20726                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20727 echo "configure:20728: checking for Berkeley DB thread support" >&5
20728 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20729   echo $ac_n "(cached) $ac_c" 1>&6
20730 else
20731   
20732         ol_LIBS="$LIBS"
20733         LIBS="$LTHREAD_LIBS $LIBS"
20734         if test $ol_cv_lib_db != yes ; then
20735                 LIBS="$ol_cv_lib_db $LIBS"
20736         fi
20737
20738         if test "$cross_compiling" = yes; then
20739   ol_cv_berkeley_db_thread=cross
20740 else
20741   cat > conftest.$ac_ext <<EOF
20742 #line 20743 "configure"
20743 #include "confdefs.h"
20744
20745 #ifdef HAVE_DB_185_H
20746         choke me;
20747 #else
20748 #include <db.h>
20749 #endif
20750 #ifndef NULL
20751 #define NULL ((void *)0)
20752 #endif
20753 main()
20754 {
20755         int rc;
20756         u_int32_t flags = DB_CREATE |
20757 #ifdef DB_PRIVATE
20758                 DB_PRIVATE |
20759 #endif
20760                 DB_THREAD;
20761
20762 #if DB_VERSION_MAJOR > 2
20763         DB_ENV *env = NULL;
20764
20765         rc = db_env_create( &env, 0 );
20766
20767         flags |= DB_INIT_MPOOL;
20768 #ifdef DB_MPOOL_PRIVATE
20769         flags |= DB_MPOOL_PRIVATE;
20770 #endif
20771
20772         if( rc ) {
20773                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20774                 return rc;
20775         }
20776
20777 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20778         rc = env->open( env, NULL, flags, 0 );
20779 #else
20780         rc = env->open( env, NULL, NULL, flags, 0 );
20781 #endif
20782
20783         if ( rc == 0 ) {
20784                 rc = env->close( env, 0 );
20785         }
20786
20787         if( rc ) {
20788                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20789                 return rc;
20790         }
20791
20792 #else
20793         DB_ENV env;
20794         memset( &env, '\0', sizeof(env) );
20795
20796         rc = db_appinit( NULL, NULL, &env, flags );
20797
20798         if( rc == 0 ) {
20799                 db_appexit( &env );
20800         }
20801
20802         unlink("__db_mpool.share");
20803         unlink("__db_lock.share");
20804 #endif
20805
20806         return rc;
20807 }
20808 EOF
20809 if { (eval echo configure:20810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20810 then
20811   ol_cv_berkeley_db_thread=yes
20812 else
20813   echo "configure: failed program was:" >&5
20814   cat conftest.$ac_ext >&5
20815   rm -fr conftest*
20816   ol_cv_berkeley_db_thread=no
20817 fi
20818 rm -fr conftest*
20819 fi
20820
20821
20822         LIBS="$ol_LIBS"
20823
20824 fi
20825
20826 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20827
20828         if test $ol_cv_berkeley_db_thread != no ; then
20829                 cat >> confdefs.h <<\EOF
20830 #define HAVE_BERKELEY_DB_THREAD 1
20831 EOF
20832
20833         fi
20834
20835         fi
20836 fi
20837
20838         fi
20839
20840         if test $ol_cv_berkeley_db != no ; then
20841                 cat >> confdefs.h <<\EOF
20842 #define HAVE_BERKELEY_DB 1
20843 EOF
20844
20845
20846                 ol_link_ldbm=berkeley
20847                 ol_with_ldbm_api=berkeley
20848
20849                 if test $ol_with_ldbm_type = hash ; then
20850                         cat >> confdefs.h <<\EOF
20851 #define LDBM_USE_DBHASH 1
20852 EOF
20853
20854                 else
20855                         cat >> confdefs.h <<\EOF
20856 #define LDBM_USE_DBBTREE 1
20857 EOF
20858
20859                 fi
20860
20861                                                 if test $ol_cv_lib_db != yes ; then
20862                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20863                 fi
20864         fi
20865 fi
20866
20867 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20868         if test $ol_link_ldbm != berkeley ; then
20869                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20870         else
20871                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20872 echo "configure:20873: checking Berkeley DB version for BDB backend" >&5
20873 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20874   echo $ac_n "(cached) $ac_c" 1>&6
20875 else
20876   
20877         cat > conftest.$ac_ext <<EOF
20878 #line 20879 "configure"
20879 #include "confdefs.h"
20880
20881 #include <db.h>
20882
20883  /* this check could be improved */
20884 #ifndef DB_VERSION_MAJOR
20885 #       define DB_VERSION_MAJOR 1
20886 #endif
20887 #ifndef DB_VERSION_MINOR
20888 #       define DB_VERSION_MINOR 0
20889 #endif
20890
20891 /* require 4.2 or later */
20892 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20893         __db_version_compat
20894 #endif
20895         
20896 EOF
20897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20898   egrep "__db_version_compat" >/dev/null 2>&1; then
20899   rm -rf conftest*
20900   ol_cv_bdb_compat=yes
20901 else
20902   rm -rf conftest*
20903   ol_cv_bdb_compat=no
20904 fi
20905 rm -f conftest*
20906
20907 fi
20908
20909 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20910
20911
20912                 if test $ol_cv_bdb_compat != yes ; then
20913                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20914                 fi
20915         fi
20916 fi
20917
20918 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20919         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20920         ol_with_ldbm_api=none
20921 fi
20922
20923 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20924         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20925 echo "configure:20926: checking for MDBM library" >&5
20926 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20927   echo $ac_n "(cached) $ac_c" 1>&6
20928 else
20929         ol_LIBS="$LIBS"
20930         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20931 echo "configure:20932: checking for mdbm_set_chain" >&5
20932 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20933   echo $ac_n "(cached) $ac_c" 1>&6
20934 else
20935   cat > conftest.$ac_ext <<EOF
20936 #line 20937 "configure"
20937 #include "confdefs.h"
20938 /* System header to define __stub macros and hopefully few prototypes,
20939     which can conflict with char mdbm_set_chain(); below.  */
20940 #include <assert.h>
20941 /* Override any gcc2 internal prototype to avoid an error.  */
20942 /* We use char because int might match the return type of a gcc2
20943     builtin and then its argument prototype would still apply.  */
20944 char mdbm_set_chain();
20945 char (*f)();
20946
20947 int main() {
20948
20949 /* The GNU C library defines this for functions which it implements
20950     to always fail with ENOSYS.  Some functions are actually named
20951     something starting with __ and the normal name is an alias.  */
20952 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20953 choke me
20954 #else
20955 f = mdbm_set_chain;
20956 #endif
20957
20958 ; return 0; }
20959 EOF
20960 if { (eval echo configure:20961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20961   rm -rf conftest*
20962   eval "ac_cv_func_mdbm_set_chain=yes"
20963 else
20964   echo "configure: failed program was:" >&5
20965   cat conftest.$ac_ext >&5
20966   rm -rf conftest*
20967   eval "ac_cv_func_mdbm_set_chain=no"
20968 fi
20969 rm -f conftest*
20970 fi
20971
20972 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20973   echo "$ac_t""yes" 1>&6
20974   ol_cv_lib_mdbm=yes
20975 else
20976   echo "$ac_t""no" 1>&6
20977
20978                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20979 echo "configure:20980: checking for mdbm_set_chain in -lmdbm" >&5
20980 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20982   echo $ac_n "(cached) $ac_c" 1>&6
20983 else
20984   ac_save_LIBS="$LIBS"
20985 LIBS="-lmdbm  $LIBS"
20986 cat > conftest.$ac_ext <<EOF
20987 #line 20988 "configure"
20988 #include "confdefs.h"
20989 /* Override any gcc2 internal prototype to avoid an error.  */
20990 /* We use char because int might match the return type of a gcc2
20991     builtin and then its argument prototype would still apply.  */
20992 char mdbm_set_chain();
20993
20994 int main() {
20995 mdbm_set_chain()
20996 ; return 0; }
20997 EOF
20998 if { (eval echo configure:20999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20999   rm -rf conftest*
21000   eval "ac_cv_lib_$ac_lib_var=yes"
21001 else
21002   echo "configure: failed program was:" >&5
21003   cat conftest.$ac_ext >&5
21004   rm -rf conftest*
21005   eval "ac_cv_lib_$ac_lib_var=no"
21006 fi
21007 rm -f conftest*
21008 LIBS="$ac_save_LIBS"
21009
21010 fi
21011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21012   echo "$ac_t""yes" 1>&6
21013   ol_cv_lib_mdbm=-lmdbm
21014 else
21015   echo "$ac_t""no" 1>&6
21016 ol_cv_lib_mdbm=no
21017 fi
21018
21019         
21020 fi
21021
21022         LIBS="$ol_LIBS"
21023
21024 fi
21025
21026 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21027
21028
21029  for ac_hdr in mdbm.h
21030 do
21031 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21032 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21033 echo "configure:21034: checking for $ac_hdr" >&5
21034 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21035   echo $ac_n "(cached) $ac_c" 1>&6
21036 else
21037   cat > conftest.$ac_ext <<EOF
21038 #line 21039 "configure"
21039 #include "confdefs.h"
21040 #include <$ac_hdr>
21041 EOF
21042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21043 { (eval echo configure:21044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21045 if test -z "$ac_err"; then
21046   rm -rf conftest*
21047   eval "ac_cv_header_$ac_safe=yes"
21048 else
21049   echo "$ac_err" >&5
21050   echo "configure: failed program was:" >&5
21051   cat conftest.$ac_ext >&5
21052   rm -rf conftest*
21053   eval "ac_cv_header_$ac_safe=no"
21054 fi
21055 rm -f conftest*
21056 fi
21057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21058   echo "$ac_t""yes" 1>&6
21059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21060   cat >> confdefs.h <<EOF
21061 #define $ac_tr_hdr 1
21062 EOF
21063  
21064 else
21065   echo "$ac_t""no" 1>&6
21066 fi
21067 done
21068
21069  echo $ac_n "checking for db""... $ac_c" 1>&6
21070 echo "configure:21071: checking for db" >&5
21071 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21072   echo $ac_n "(cached) $ac_c" 1>&6
21073 else
21074   
21075         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21076                 ol_cv_mdbm=no
21077         else
21078                 ol_cv_mdbm=yes
21079         fi
21080
21081 fi
21082
21083 echo "$ac_t""$ol_cv_mdbm" 1>&6
21084  if test $ol_cv_mdbm = yes ; then
21085         cat >> confdefs.h <<\EOF
21086 #define HAVE_MDBM 1
21087 EOF
21088
21089  fi
21090
21091
21092         if test $ol_cv_mdbm = yes ; then
21093                 ol_link_ldbm=mdbm
21094                 ol_with_ldbm_api=mdbm
21095                 if test $ol_cv_lib_mdbm != yes ; then
21096                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21097                 fi
21098         fi
21099 fi
21100
21101 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21102         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21103 echo "configure:21104: checking for GDBM library" >&5
21104 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21105   echo $ac_n "(cached) $ac_c" 1>&6
21106 else
21107         ol_LIBS="$LIBS"
21108         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21109 echo "configure:21110: checking for gdbm_open" >&5
21110 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21111   echo $ac_n "(cached) $ac_c" 1>&6
21112 else
21113   cat > conftest.$ac_ext <<EOF
21114 #line 21115 "configure"
21115 #include "confdefs.h"
21116 /* System header to define __stub macros and hopefully few prototypes,
21117     which can conflict with char gdbm_open(); below.  */
21118 #include <assert.h>
21119 /* Override any gcc2 internal prototype to avoid an error.  */
21120 /* We use char because int might match the return type of a gcc2
21121     builtin and then its argument prototype would still apply.  */
21122 char gdbm_open();
21123 char (*f)();
21124
21125 int main() {
21126
21127 /* The GNU C library defines this for functions which it implements
21128     to always fail with ENOSYS.  Some functions are actually named
21129     something starting with __ and the normal name is an alias.  */
21130 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21131 choke me
21132 #else
21133 f = gdbm_open;
21134 #endif
21135
21136 ; return 0; }
21137 EOF
21138 if { (eval echo configure:21139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21139   rm -rf conftest*
21140   eval "ac_cv_func_gdbm_open=yes"
21141 else
21142   echo "configure: failed program was:" >&5
21143   cat conftest.$ac_ext >&5
21144   rm -rf conftest*
21145   eval "ac_cv_func_gdbm_open=no"
21146 fi
21147 rm -f conftest*
21148 fi
21149
21150 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21151   echo "$ac_t""yes" 1>&6
21152   ol_cv_lib_gdbm=yes
21153 else
21154   echo "$ac_t""no" 1>&6
21155
21156                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21157 echo "configure:21158: checking for gdbm_open in -lgdbm" >&5
21158 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21160   echo $ac_n "(cached) $ac_c" 1>&6
21161 else
21162   ac_save_LIBS="$LIBS"
21163 LIBS="-lgdbm  $LIBS"
21164 cat > conftest.$ac_ext <<EOF
21165 #line 21166 "configure"
21166 #include "confdefs.h"
21167 /* Override any gcc2 internal prototype to avoid an error.  */
21168 /* We use char because int might match the return type of a gcc2
21169     builtin and then its argument prototype would still apply.  */
21170 char gdbm_open();
21171
21172 int main() {
21173 gdbm_open()
21174 ; return 0; }
21175 EOF
21176 if { (eval echo configure:21177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21177   rm -rf conftest*
21178   eval "ac_cv_lib_$ac_lib_var=yes"
21179 else
21180   echo "configure: failed program was:" >&5
21181   cat conftest.$ac_ext >&5
21182   rm -rf conftest*
21183   eval "ac_cv_lib_$ac_lib_var=no"
21184 fi
21185 rm -f conftest*
21186 LIBS="$ac_save_LIBS"
21187
21188 fi
21189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21190   echo "$ac_t""yes" 1>&6
21191   ol_cv_lib_gdbm=-lgdbm
21192 else
21193   echo "$ac_t""no" 1>&6
21194 ol_cv_lib_gdbm=no
21195 fi
21196
21197         
21198 fi
21199
21200         LIBS="$ol_LIBS"
21201
21202 fi
21203
21204 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21205
21206
21207  for ac_hdr in gdbm.h
21208 do
21209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21211 echo "configure:21212: checking for $ac_hdr" >&5
21212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21213   echo $ac_n "(cached) $ac_c" 1>&6
21214 else
21215   cat > conftest.$ac_ext <<EOF
21216 #line 21217 "configure"
21217 #include "confdefs.h"
21218 #include <$ac_hdr>
21219 EOF
21220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21221 { (eval echo configure:21222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21223 if test -z "$ac_err"; then
21224   rm -rf conftest*
21225   eval "ac_cv_header_$ac_safe=yes"
21226 else
21227   echo "$ac_err" >&5
21228   echo "configure: failed program was:" >&5
21229   cat conftest.$ac_ext >&5
21230   rm -rf conftest*
21231   eval "ac_cv_header_$ac_safe=no"
21232 fi
21233 rm -f conftest*
21234 fi
21235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21236   echo "$ac_t""yes" 1>&6
21237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21238   cat >> confdefs.h <<EOF
21239 #define $ac_tr_hdr 1
21240 EOF
21241  
21242 else
21243   echo "$ac_t""no" 1>&6
21244 fi
21245 done
21246
21247  echo $ac_n "checking for db""... $ac_c" 1>&6
21248 echo "configure:21249: checking for db" >&5
21249 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21250   echo $ac_n "(cached) $ac_c" 1>&6
21251 else
21252   
21253         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21254                 ol_cv_gdbm=no
21255         else
21256                 ol_cv_gdbm=yes
21257         fi
21258
21259 fi
21260
21261 echo "$ac_t""$ol_cv_gdbm" 1>&6
21262  if test $ol_cv_gdbm = yes ; then
21263         cat >> confdefs.h <<\EOF
21264 #define HAVE_GDBM 1
21265 EOF
21266
21267  fi
21268
21269
21270         if test $ol_cv_gdbm = yes ; then
21271                 ol_link_ldbm=gdbm
21272                 ol_with_ldbm_api=gdbm
21273
21274                 if test $ol_cv_lib_gdbm != yes ; then
21275                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21276                 fi
21277         fi
21278 fi
21279
21280 if test $ol_with_ldbm_api = ndbm ; then
21281         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21282 echo "configure:21283: checking for NDBM library" >&5
21283 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21284   echo $ac_n "(cached) $ac_c" 1>&6
21285 else
21286         ol_LIBS="$LIBS"
21287         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21288 echo "configure:21289: checking for dbm_open" >&5
21289 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21290   echo $ac_n "(cached) $ac_c" 1>&6
21291 else
21292   cat > conftest.$ac_ext <<EOF
21293 #line 21294 "configure"
21294 #include "confdefs.h"
21295 /* System header to define __stub macros and hopefully few prototypes,
21296     which can conflict with char dbm_open(); below.  */
21297 #include <assert.h>
21298 /* Override any gcc2 internal prototype to avoid an error.  */
21299 /* We use char because int might match the return type of a gcc2
21300     builtin and then its argument prototype would still apply.  */
21301 char dbm_open();
21302 char (*f)();
21303
21304 int main() {
21305
21306 /* The GNU C library defines this for functions which it implements
21307     to always fail with ENOSYS.  Some functions are actually named
21308     something starting with __ and the normal name is an alias.  */
21309 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21310 choke me
21311 #else
21312 f = dbm_open;
21313 #endif
21314
21315 ; return 0; }
21316 EOF
21317 if { (eval echo configure:21318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21318   rm -rf conftest*
21319   eval "ac_cv_func_dbm_open=yes"
21320 else
21321   echo "configure: failed program was:" >&5
21322   cat conftest.$ac_ext >&5
21323   rm -rf conftest*
21324   eval "ac_cv_func_dbm_open=no"
21325 fi
21326 rm -f conftest*
21327 fi
21328
21329 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21330   echo "$ac_t""yes" 1>&6
21331   ol_cv_lib_ndbm=yes
21332 else
21333   echo "$ac_t""no" 1>&6
21334
21335                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21336 echo "configure:21337: checking for dbm_open in -lndbm" >&5
21337 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21339   echo $ac_n "(cached) $ac_c" 1>&6
21340 else
21341   ac_save_LIBS="$LIBS"
21342 LIBS="-lndbm  $LIBS"
21343 cat > conftest.$ac_ext <<EOF
21344 #line 21345 "configure"
21345 #include "confdefs.h"
21346 /* Override any gcc2 internal prototype to avoid an error.  */
21347 /* We use char because int might match the return type of a gcc2
21348     builtin and then its argument prototype would still apply.  */
21349 char dbm_open();
21350
21351 int main() {
21352 dbm_open()
21353 ; return 0; }
21354 EOF
21355 if { (eval echo configure:21356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21356   rm -rf conftest*
21357   eval "ac_cv_lib_$ac_lib_var=yes"
21358 else
21359   echo "configure: failed program was:" >&5
21360   cat conftest.$ac_ext >&5
21361   rm -rf conftest*
21362   eval "ac_cv_lib_$ac_lib_var=no"
21363 fi
21364 rm -f conftest*
21365 LIBS="$ac_save_LIBS"
21366
21367 fi
21368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21369   echo "$ac_t""yes" 1>&6
21370   ol_cv_lib_ndbm=-lndbm
21371 else
21372   echo "$ac_t""no" 1>&6
21373
21374                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21375 echo "configure:21376: checking for dbm_open in -ldbm" >&5
21376 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21378   echo $ac_n "(cached) $ac_c" 1>&6
21379 else
21380   ac_save_LIBS="$LIBS"
21381 LIBS="-ldbm  $LIBS"
21382 cat > conftest.$ac_ext <<EOF
21383 #line 21384 "configure"
21384 #include "confdefs.h"
21385 /* Override any gcc2 internal prototype to avoid an error.  */
21386 /* We use char because int might match the return type of a gcc2
21387     builtin and then its argument prototype would still apply.  */
21388 char dbm_open();
21389
21390 int main() {
21391 dbm_open()
21392 ; return 0; }
21393 EOF
21394 if { (eval echo configure:21395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21395   rm -rf conftest*
21396   eval "ac_cv_lib_$ac_lib_var=yes"
21397 else
21398   echo "configure: failed program was:" >&5
21399   cat conftest.$ac_ext >&5
21400   rm -rf conftest*
21401   eval "ac_cv_lib_$ac_lib_var=no"
21402 fi
21403 rm -f conftest*
21404 LIBS="$ac_save_LIBS"
21405
21406 fi
21407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21408   echo "$ac_t""yes" 1>&6
21409   ol_cv_lib_ndbm=-ldbm
21410 else
21411   echo "$ac_t""no" 1>&6
21412 ol_cv_lib_ndbm=no
21413 fi
21414                 
21415 fi
21416
21417         
21418 fi
21419
21420         LIBS="$ol_LIBS"
21421
21422 fi
21423
21424 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21425
21426
21427  for ac_hdr in ndbm.h
21428 do
21429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21431 echo "configure:21432: checking for $ac_hdr" >&5
21432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21433   echo $ac_n "(cached) $ac_c" 1>&6
21434 else
21435   cat > conftest.$ac_ext <<EOF
21436 #line 21437 "configure"
21437 #include "confdefs.h"
21438 #include <$ac_hdr>
21439 EOF
21440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21441 { (eval echo configure:21442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21443 if test -z "$ac_err"; then
21444   rm -rf conftest*
21445   eval "ac_cv_header_$ac_safe=yes"
21446 else
21447   echo "$ac_err" >&5
21448   echo "configure: failed program was:" >&5
21449   cat conftest.$ac_ext >&5
21450   rm -rf conftest*
21451   eval "ac_cv_header_$ac_safe=no"
21452 fi
21453 rm -f conftest*
21454 fi
21455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21456   echo "$ac_t""yes" 1>&6
21457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21458   cat >> confdefs.h <<EOF
21459 #define $ac_tr_hdr 1
21460 EOF
21461  
21462 else
21463   echo "$ac_t""no" 1>&6
21464 fi
21465 done
21466
21467  echo $ac_n "checking for db""... $ac_c" 1>&6
21468 echo "configure:21469: checking for db" >&5
21469 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21470   echo $ac_n "(cached) $ac_c" 1>&6
21471 else
21472   
21473         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21474                 ol_cv_ndbm=no
21475         else
21476                 ol_cv_ndbm=yes
21477         fi
21478
21479 fi
21480
21481 echo "$ac_t""$ol_cv_ndbm" 1>&6
21482  if test $ol_cv_ndbm = yes ; then
21483         cat >> confdefs.h <<\EOF
21484 #define HAVE_NDBM 1
21485 EOF
21486
21487  fi
21488
21489
21490         if test $ol_cv_ndbm = yes ; then
21491                 ol_link_ldbm=ndbm
21492                 ol_with_ldbm_api=ndbm
21493
21494                 if test $ol_cv_lib_ndbm != yes ; then
21495                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21496                 fi
21497         fi
21498 fi
21499
21500 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21501         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21502 fi
21503
21504 if test $ol_enable_bdb = yes -o \
21505         $ol_enable_hdb = yes -o \
21506         $ol_enable_ldbm = yes ; then
21507         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21508 fi
21509
21510
21511 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21512         BUILD_LIBS_DYNAMIC=shared
21513         cat >> confdefs.h <<\EOF
21514 #define LDAP_LIBS_DYNAMIC 1
21515 EOF
21516
21517         LTSTATIC=""
21518 else
21519         BUILD_LIBS_DYNAMIC=static
21520         LTSTATIC="-static"
21521 fi
21522
21523 if test $ol_enable_wrappers != no ; then
21524         for ac_hdr in tcpd.h
21525 do
21526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21528 echo "configure:21529: checking for $ac_hdr" >&5
21529 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21530   echo $ac_n "(cached) $ac_c" 1>&6
21531 else
21532   cat > conftest.$ac_ext <<EOF
21533 #line 21534 "configure"
21534 #include "confdefs.h"
21535 #include <$ac_hdr>
21536 EOF
21537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21538 { (eval echo configure:21539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21540 if test -z "$ac_err"; then
21541   rm -rf conftest*
21542   eval "ac_cv_header_$ac_safe=yes"
21543 else
21544   echo "$ac_err" >&5
21545   echo "configure: failed program was:" >&5
21546   cat conftest.$ac_ext >&5
21547   rm -rf conftest*
21548   eval "ac_cv_header_$ac_safe=no"
21549 fi
21550 rm -f conftest*
21551 fi
21552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21553   echo "$ac_t""yes" 1>&6
21554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21555   cat >> confdefs.h <<EOF
21556 #define $ac_tr_hdr 1
21557 EOF
21558  
21559                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21560 echo "configure:21561: checking for TCP wrappers library" >&5
21561                 save_LIBS="$LIBS"
21562                 LIBS="$LIBS -lwrap"
21563                 cat > conftest.$ac_ext <<EOF
21564 #line 21565 "configure"
21565 #include "confdefs.h"
21566
21567 #include <tcpd.h>
21568 int allow_severity = 0;
21569 int deny_severity  = 0;
21570
21571 struct request_info *req;
21572                 
21573 int main() {
21574
21575 hosts_access(req)
21576                 
21577 ; return 0; }
21578 EOF
21579 if { (eval echo configure:21580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21580   rm -rf conftest*
21581   echo "$ac_t""-lwrap" 1>&6
21582                 have_wrappers=yes
21583                 LIBS="$save_LIBS"
21584 else
21585   echo "configure: failed program was:" >&5
21586   cat conftest.$ac_ext >&5
21587   rm -rf conftest*
21588   
21589                                 LIBS="$LIBS -lnsl"
21590                 cat > conftest.$ac_ext <<EOF
21591 #line 21592 "configure"
21592 #include "confdefs.h"
21593
21594 #include <tcpd.h>
21595 int allow_severity = 0;
21596 int deny_severity  = 0;
21597
21598 struct request_info *req;
21599                 
21600 int main() {
21601
21602 hosts_access(req)
21603                 
21604 ; return 0; }
21605 EOF
21606 if { (eval echo configure:21607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21607   rm -rf conftest*
21608   echo "$ac_t""-lwrap -lnsl" 1>&6
21609                 have_wrappers=yes
21610                 LIBS="$save_LIBS -lnsl"
21611 else
21612   echo "configure: failed program was:" >&5
21613   cat conftest.$ac_ext >&5
21614   rm -rf conftest*
21615   
21616                 echo "$ac_t""no" 1>&6
21617                 have_wrappers=no
21618                 LIBS=$save_LIBS
21619 fi
21620 rm -f conftest*
21621 fi
21622 rm -f conftest*
21623 else
21624   echo "$ac_t""no" 1>&6
21625 have_wrappers=no
21626 fi
21627 done
21628
21629
21630         if test $have_wrappers = yes ; then
21631                 cat >> confdefs.h <<\EOF
21632 #define HAVE_TCPD 1
21633 EOF
21634
21635                 WRAP_LIBS="-lwrap"
21636         elif test $ol_enable_wrappers = yes ; then
21637                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21638         else
21639                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21640                 WRAP_LIBS=""
21641         fi
21642 fi
21643
21644 if test $ol_enable_syslog != no ; then
21645         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21646 echo "configure:21647: checking for openlog" >&5
21647 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21648   echo $ac_n "(cached) $ac_c" 1>&6
21649 else
21650   cat > conftest.$ac_ext <<EOF
21651 #line 21652 "configure"
21652 #include "confdefs.h"
21653 /* System header to define __stub macros and hopefully few prototypes,
21654     which can conflict with char openlog(); below.  */
21655 #include <assert.h>
21656 /* Override any gcc2 internal prototype to avoid an error.  */
21657 /* We use char because int might match the return type of a gcc2
21658     builtin and then its argument prototype would still apply.  */
21659 char openlog();
21660 char (*f)();
21661
21662 int main() {
21663
21664 /* The GNU C library defines this for functions which it implements
21665     to always fail with ENOSYS.  Some functions are actually named
21666     something starting with __ and the normal name is an alias.  */
21667 #if defined (__stub_openlog) || defined (__stub___openlog)
21668 choke me
21669 #else
21670 f = openlog;
21671 #endif
21672
21673 ; return 0; }
21674 EOF
21675 if { (eval echo configure:21676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21676   rm -rf conftest*
21677   eval "ac_cv_func_openlog=yes"
21678 else
21679   echo "configure: failed program was:" >&5
21680   cat conftest.$ac_ext >&5
21681   rm -rf conftest*
21682   eval "ac_cv_func_openlog=no"
21683 fi
21684 rm -f conftest*
21685 fi
21686
21687 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21688   echo "$ac_t""yes" 1>&6
21689   :
21690 else
21691   echo "$ac_t""no" 1>&6
21692 fi
21693
21694         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21695                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21696         fi
21697         ol_enable_syslog=$ac_cv_func_openlog
21698 fi
21699
21700
21701 ol_link_sql=no
21702 if test $ol_enable_sql != no ; then
21703         for ac_hdr in sql.h sqlext.h
21704 do
21705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21707 echo "configure:21708: checking for $ac_hdr" >&5
21708 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21709   echo $ac_n "(cached) $ac_c" 1>&6
21710 else
21711   cat > conftest.$ac_ext <<EOF
21712 #line 21713 "configure"
21713 #include "confdefs.h"
21714 #include <$ac_hdr>
21715 EOF
21716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21717 { (eval echo configure:21718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21719 if test -z "$ac_err"; then
21720   rm -rf conftest*
21721   eval "ac_cv_header_$ac_safe=yes"
21722 else
21723   echo "$ac_err" >&5
21724   echo "configure: failed program was:" >&5
21725   cat conftest.$ac_ext >&5
21726   rm -rf conftest*
21727   eval "ac_cv_header_$ac_safe=no"
21728 fi
21729 rm -f conftest*
21730 fi
21731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21732   echo "$ac_t""yes" 1>&6
21733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21734   cat >> confdefs.h <<EOF
21735 #define $ac_tr_hdr 1
21736 EOF
21737  
21738 else
21739   echo "$ac_t""no" 1>&6
21740 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21741         
21742 fi
21743 done
21744
21745
21746         sql_LIBS="$LIBS"
21747         LIBS="$LTHREAD_LIBS"
21748
21749         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21750 echo "configure:21751: checking for SQLDriverConnect in -liodbc" >&5
21751 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21753   echo $ac_n "(cached) $ac_c" 1>&6
21754 else
21755   ac_save_LIBS="$LIBS"
21756 LIBS="-liodbc  $LIBS"
21757 cat > conftest.$ac_ext <<EOF
21758 #line 21759 "configure"
21759 #include "confdefs.h"
21760 /* Override any gcc2 internal prototype to avoid an error.  */
21761 /* We use char because int might match the return type of a gcc2
21762     builtin and then its argument prototype would still apply.  */
21763 char SQLDriverConnect();
21764
21765 int main() {
21766 SQLDriverConnect()
21767 ; return 0; }
21768 EOF
21769 if { (eval echo configure:21770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21770   rm -rf conftest*
21771   eval "ac_cv_lib_$ac_lib_var=yes"
21772 else
21773   echo "configure: failed program was:" >&5
21774   cat conftest.$ac_ext >&5
21775   rm -rf conftest*
21776   eval "ac_cv_lib_$ac_lib_var=no"
21777 fi
21778 rm -f conftest*
21779 LIBS="$ac_save_LIBS"
21780
21781 fi
21782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21783   echo "$ac_t""yes" 1>&6
21784   have_iodbc=yes
21785 else
21786   echo "$ac_t""no" 1>&6
21787 have_iodbc=no
21788 fi
21789
21790         if test $have_iodbc = yes ; then
21791                 ol_link_sql="-liodbc"
21792         else
21793                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21794 echo "configure:21795: checking for SQLDriverConnect in -lodbc" >&5
21795 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21797   echo $ac_n "(cached) $ac_c" 1>&6
21798 else
21799   ac_save_LIBS="$LIBS"
21800 LIBS="-lodbc  $LIBS"
21801 cat > conftest.$ac_ext <<EOF
21802 #line 21803 "configure"
21803 #include "confdefs.h"
21804 /* Override any gcc2 internal prototype to avoid an error.  */
21805 /* We use char because int might match the return type of a gcc2
21806     builtin and then its argument prototype would still apply.  */
21807 char SQLDriverConnect();
21808
21809 int main() {
21810 SQLDriverConnect()
21811 ; return 0; }
21812 EOF
21813 if { (eval echo configure:21814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21814   rm -rf conftest*
21815   eval "ac_cv_lib_$ac_lib_var=yes"
21816 else
21817   echo "configure: failed program was:" >&5
21818   cat conftest.$ac_ext >&5
21819   rm -rf conftest*
21820   eval "ac_cv_lib_$ac_lib_var=no"
21821 fi
21822 rm -f conftest*
21823 LIBS="$ac_save_LIBS"
21824
21825 fi
21826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21827   echo "$ac_t""yes" 1>&6
21828   have_odbc=yes
21829 else
21830   echo "$ac_t""no" 1>&6
21831 have_odbc=no
21832 fi
21833
21834                 if test $have_odbc = yes ; then
21835                         ol_link_sql="-lodbc"
21836                 fi
21837         fi
21838
21839         LIBS="$sql_LIBS"
21840
21841         if test $ol_link_sql != no ; then
21842                 SLAPD_SQL_LIBS="$ol_link_sql"
21843
21844         elif test $ol_enable_sql != auto ; then
21845                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21846         fi
21847 fi
21848
21849 WITH_SASL=no
21850 ol_link_sasl=no
21851 ol_link_spasswd=no
21852 if test $ol_with_cyrus_sasl != no ; then
21853         for ac_hdr in sasl/sasl.h sasl.h
21854 do
21855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21857 echo "configure:21858: checking for $ac_hdr" >&5
21858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21859   echo $ac_n "(cached) $ac_c" 1>&6
21860 else
21861   cat > conftest.$ac_ext <<EOF
21862 #line 21863 "configure"
21863 #include "confdefs.h"
21864 #include <$ac_hdr>
21865 EOF
21866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21867 { (eval echo configure:21868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21869 if test -z "$ac_err"; then
21870   rm -rf conftest*
21871   eval "ac_cv_header_$ac_safe=yes"
21872 else
21873   echo "$ac_err" >&5
21874   echo "configure: failed program was:" >&5
21875   cat conftest.$ac_ext >&5
21876   rm -rf conftest*
21877   eval "ac_cv_header_$ac_safe=no"
21878 fi
21879 rm -f conftest*
21880 fi
21881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21882   echo "$ac_t""yes" 1>&6
21883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21884   cat >> confdefs.h <<EOF
21885 #define $ac_tr_hdr 1
21886 EOF
21887  
21888 else
21889   echo "$ac_t""no" 1>&6
21890 fi
21891 done
21892
21893
21894         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21895                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21896 echo "configure:21897: checking for sasl_client_init in -lsasl2" >&5
21897 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21898 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21899   echo $ac_n "(cached) $ac_c" 1>&6
21900 else
21901   ac_save_LIBS="$LIBS"
21902 LIBS="-lsasl2  $LIBS"
21903 cat > conftest.$ac_ext <<EOF
21904 #line 21905 "configure"
21905 #include "confdefs.h"
21906 /* Override any gcc2 internal prototype to avoid an error.  */
21907 /* We use char because int might match the return type of a gcc2
21908     builtin and then its argument prototype would still apply.  */
21909 char sasl_client_init();
21910
21911 int main() {
21912 sasl_client_init()
21913 ; return 0; }
21914 EOF
21915 if { (eval echo configure:21916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21916   rm -rf conftest*
21917   eval "ac_cv_lib_$ac_lib_var=yes"
21918 else
21919   echo "configure: failed program was:" >&5
21920   cat conftest.$ac_ext >&5
21921   rm -rf conftest*
21922   eval "ac_cv_lib_$ac_lib_var=no"
21923 fi
21924 rm -f conftest*
21925 LIBS="$ac_save_LIBS"
21926
21927 fi
21928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21929   echo "$ac_t""yes" 1>&6
21930   ol_link_sasl="-lsasl2"
21931 else
21932   echo "$ac_t""no" 1>&6
21933 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21934 echo "configure:21935: checking for sasl_client_init in -lsasl" >&5
21935 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21937   echo $ac_n "(cached) $ac_c" 1>&6
21938 else
21939   ac_save_LIBS="$LIBS"
21940 LIBS="-lsasl  $LIBS"
21941 cat > conftest.$ac_ext <<EOF
21942 #line 21943 "configure"
21943 #include "confdefs.h"
21944 /* Override any gcc2 internal prototype to avoid an error.  */
21945 /* We use char because int might match the return type of a gcc2
21946     builtin and then its argument prototype would still apply.  */
21947 char sasl_client_init();
21948
21949 int main() {
21950 sasl_client_init()
21951 ; return 0; }
21952 EOF
21953 if { (eval echo configure:21954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21954   rm -rf conftest*
21955   eval "ac_cv_lib_$ac_lib_var=yes"
21956 else
21957   echo "configure: failed program was:" >&5
21958   cat conftest.$ac_ext >&5
21959   rm -rf conftest*
21960   eval "ac_cv_lib_$ac_lib_var=no"
21961 fi
21962 rm -f conftest*
21963 LIBS="$ac_save_LIBS"
21964
21965 fi
21966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21967   echo "$ac_t""yes" 1>&6
21968   ol_link_sasl="-lsasl"
21969 else
21970   echo "$ac_t""no" 1>&6
21971 fi
21972
21973 fi
21974
21975         fi
21976
21977         if test $ol_link_sasl = no ; then
21978                 if test $ol_with_cyrus_sasl != auto ; then
21979                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21980                 else
21981                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21982                         echo "configure: warning: SASL authentication not supported!" 1>&2
21983                         if test $ol_link_tls = no ; then
21984                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21985                         fi
21986                 fi
21987         else
21988                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21989 echo "configure:21990: checking Cyrus SASL library version" >&5
21990 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21991   echo $ac_n "(cached) $ac_c" 1>&6
21992 else
21993   
21994         cat > conftest.$ac_ext <<EOF
21995 #line 21996 "configure"
21996 #include "confdefs.h"
21997
21998 #ifdef HAVE_SASL_SASL_H
21999 #include <sasl/sasl.h>
22000 #else
22001 #include <sasl.h>
22002 #endif
22003
22004 /* Require 2.1.15+ */
22005 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22006         char *__sasl_compat = "2.2+ or better okay (we guess)";
22007 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22008         && SASL_VERSION_STEP >=15
22009         char *__sasl_compat = "2.1.15+ or better okay";
22010 #endif
22011         
22012 EOF
22013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22014   egrep "__sasl_compat" >/dev/null 2>&1; then
22015   rm -rf conftest*
22016   ol_cv_sasl_compat=yes
22017 else
22018   rm -rf conftest*
22019   ol_cv_sasl_compat=no
22020 fi
22021 rm -f conftest*
22022
22023 fi
22024
22025 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22026
22027                 if test $ol_cv_sasl_compat = no ; then
22028                         ol_link_sasl=no
22029                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22030                 fi
22031
22032                 cat >> confdefs.h <<\EOF
22033 #define HAVE_CYRUS_SASL 1
22034 EOF
22035
22036                 SASL_LIBS="$ol_link_sasl"
22037                 if test $ol_enable_spasswd != no ; then
22038                         ol_link_spasswd=yes
22039                 fi
22040
22041                 ac_save_LIBS="$LIBS"
22042                 LIBS="$LIBS $ol_link_sasl"
22043                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22044 echo "configure:22045: checking for sasl_version" >&5
22045 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22046   echo $ac_n "(cached) $ac_c" 1>&6
22047 else
22048   cat > conftest.$ac_ext <<EOF
22049 #line 22050 "configure"
22050 #include "confdefs.h"
22051 /* System header to define __stub macros and hopefully few prototypes,
22052     which can conflict with char sasl_version(); below.  */
22053 #include <assert.h>
22054 /* Override any gcc2 internal prototype to avoid an error.  */
22055 /* We use char because int might match the return type of a gcc2
22056     builtin and then its argument prototype would still apply.  */
22057 char sasl_version();
22058 char (*f)();
22059
22060 int main() {
22061
22062 /* The GNU C library defines this for functions which it implements
22063     to always fail with ENOSYS.  Some functions are actually named
22064     something starting with __ and the normal name is an alias.  */
22065 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22066 choke me
22067 #else
22068 f = sasl_version;
22069 #endif
22070
22071 ; return 0; }
22072 EOF
22073 if { (eval echo configure:22074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22074   rm -rf conftest*
22075   eval "ac_cv_func_sasl_version=yes"
22076 else
22077   echo "configure: failed program was:" >&5
22078   cat conftest.$ac_ext >&5
22079   rm -rf conftest*
22080   eval "ac_cv_func_sasl_version=no"
22081 fi
22082 rm -f conftest*
22083 fi
22084
22085 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22086   echo "$ac_t""yes" 1>&6
22087   cat >> confdefs.h <<\EOF
22088 #define HAVE_SASL_VERSION 1
22089 EOF
22090
22091 else
22092   echo "$ac_t""no" 1>&6
22093 fi
22094
22095                 LIBS="$ac_save_LIBS"
22096
22097                 WITH_SASL=yes
22098         fi
22099
22100 else
22101         echo "configure: warning: SASL authentication not supported!" 1>&2
22102         if test $ol_link_tls = no ; then
22103                 echo "configure: warning: Strong authentication not supported!" 1>&2
22104         fi
22105 fi
22106
22107 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22108         dev=no
22109         if test -r /dev/urandom ; then
22110                 dev="/dev/urandom";
22111         elif test -r /idev/urandom ; then
22112                 dev="/idev/urandom";
22113         elif test -r /dev/srandom ; then
22114                 dev="/dev/srandom";
22115         elif test -r /dev/random ; then
22116                 dev="/dev/random";
22117         elif test -r /idev/random ; then
22118                 dev="/idev/random";
22119         fi
22120
22121         if test $dev != no ; then
22122                 cat >> confdefs.h <<EOF
22123 #define URANDOM_DEVICE "$dev"
22124 EOF
22125
22126         fi
22127 fi
22128
22129 ol_link_fetch=no
22130 if test $ol_with_fetch != no ; then
22131         ol_LIBS=$LIBS
22132 LIBS="-lfetch -lcom_err $LIBS"
22133 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22134 echo "configure:22135: checking fetch(3) library" >&5
22135 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22136   echo $ac_n "(cached) $ac_c" 1>&6
22137 else
22138   
22139         cat > conftest.$ac_ext <<EOF
22140 #line 22141 "configure"
22141 #include "confdefs.h"
22142
22143 #include <sys/param.h>
22144 #include <stdio.h>
22145 #include <fetch.h>
22146 int main() {
22147 struct url *u = fetchParseURL("file:///"); 
22148 ; return 0; }
22149 EOF
22150 if { (eval echo configure:22151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22151   rm -rf conftest*
22152   ol_cv_lib_fetch=yes
22153 else
22154   echo "configure: failed program was:" >&5
22155   cat conftest.$ac_ext >&5
22156   rm -rf conftest*
22157   ol_cv_lib_fetch=no
22158 fi
22159 rm -f conftest*
22160 fi
22161
22162 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22163 LIBS=$ol_LIBS
22164 if test $ol_cv_lib_fetch != no ; then
22165         ol_link_fetch="-lfetch -lcom_err"
22166         cat >> confdefs.h <<\EOF
22167 #define HAVE_FETCH 1
22168 EOF
22169
22170 fi
22171
22172
22173         if test $ol_cv_lib_fetch != no ; then
22174                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22175                 ol_link_fetch=freebsd
22176
22177         elif test $ol_with_fetch != auto ; then
22178                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22179         fi 
22180 fi
22181
22182 if test $ol_enable_crypt != no ; then
22183         save_LIBS="$LIBS"
22184         LIBS="$TLS_LIBS $LIBS"
22185
22186         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22187 echo "configure:22188: checking for crypt" >&5
22188 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22189   echo $ac_n "(cached) $ac_c" 1>&6
22190 else
22191   cat > conftest.$ac_ext <<EOF
22192 #line 22193 "configure"
22193 #include "confdefs.h"
22194 /* System header to define __stub macros and hopefully few prototypes,
22195     which can conflict with char crypt(); below.  */
22196 #include <assert.h>
22197 /* Override any gcc2 internal prototype to avoid an error.  */
22198 /* We use char because int might match the return type of a gcc2
22199     builtin and then its argument prototype would still apply.  */
22200 char crypt();
22201 char (*f)();
22202
22203 int main() {
22204
22205 /* The GNU C library defines this for functions which it implements
22206     to always fail with ENOSYS.  Some functions are actually named
22207     something starting with __ and the normal name is an alias.  */
22208 #if defined (__stub_crypt) || defined (__stub___crypt)
22209 choke me
22210 #else
22211 f = crypt;
22212 #endif
22213
22214 ; return 0; }
22215 EOF
22216 if { (eval echo configure:22217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22217   rm -rf conftest*
22218   eval "ac_cv_func_crypt=yes"
22219 else
22220   echo "configure: failed program was:" >&5
22221   cat conftest.$ac_ext >&5
22222   rm -rf conftest*
22223   eval "ac_cv_func_crypt=no"
22224 fi
22225 rm -f conftest*
22226 fi
22227
22228 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22229   echo "$ac_t""yes" 1>&6
22230   have_crypt=yes
22231 else
22232   echo "$ac_t""no" 1>&6
22233
22234                 LIBS="$save_LIBS"
22235                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22236 echo "configure:22237: checking for crypt in -lcrypt" >&5
22237 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22238 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22239   echo $ac_n "(cached) $ac_c" 1>&6
22240 else
22241   ac_save_LIBS="$LIBS"
22242 LIBS="-lcrypt  $LIBS"
22243 cat > conftest.$ac_ext <<EOF
22244 #line 22245 "configure"
22245 #include "confdefs.h"
22246 /* Override any gcc2 internal prototype to avoid an error.  */
22247 /* We use char because int might match the return type of a gcc2
22248     builtin and then its argument prototype would still apply.  */
22249 char crypt();
22250
22251 int main() {
22252 crypt()
22253 ; return 0; }
22254 EOF
22255 if { (eval echo configure:22256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22256   rm -rf conftest*
22257   eval "ac_cv_lib_$ac_lib_var=yes"
22258 else
22259   echo "configure: failed program was:" >&5
22260   cat conftest.$ac_ext >&5
22261   rm -rf conftest*
22262   eval "ac_cv_lib_$ac_lib_var=no"
22263 fi
22264 rm -f conftest*
22265 LIBS="$ac_save_LIBS"
22266
22267 fi
22268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22269   echo "$ac_t""yes" 1>&6
22270   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22271                         have_crypt=yes
22272 else
22273   echo "$ac_t""no" 1>&6
22274 have_crypt=no
22275 fi
22276
22277 fi
22278
22279
22280         LIBS="$save_LIBS"
22281
22282         if test $have_crypt = yes ; then
22283                 cat >> confdefs.h <<\EOF
22284 #define HAVE_CRYPT 1
22285 EOF
22286
22287         else
22288                 echo "configure: warning: could not find crypt" 1>&2
22289                 if test $ol_enable_crypt = yes ; then
22290                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22291                 fi
22292
22293                 echo "configure: warning: disabling crypt support" 1>&2
22294                 ol_enable_crypt=no
22295         fi
22296 fi
22297
22298 if test $ol_enable_proctitle != no ; then
22299         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22300 echo "configure:22301: checking for setproctitle" >&5
22301 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22302   echo $ac_n "(cached) $ac_c" 1>&6
22303 else
22304   cat > conftest.$ac_ext <<EOF
22305 #line 22306 "configure"
22306 #include "confdefs.h"
22307 /* System header to define __stub macros and hopefully few prototypes,
22308     which can conflict with char setproctitle(); below.  */
22309 #include <assert.h>
22310 /* Override any gcc2 internal prototype to avoid an error.  */
22311 /* We use char because int might match the return type of a gcc2
22312     builtin and then its argument prototype would still apply.  */
22313 char setproctitle();
22314 char (*f)();
22315
22316 int main() {
22317
22318 /* The GNU C library defines this for functions which it implements
22319     to always fail with ENOSYS.  Some functions are actually named
22320     something starting with __ and the normal name is an alias.  */
22321 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22322 choke me
22323 #else
22324 f = setproctitle;
22325 #endif
22326
22327 ; return 0; }
22328 EOF
22329 if { (eval echo configure:22330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22330   rm -rf conftest*
22331   eval "ac_cv_func_setproctitle=yes"
22332 else
22333   echo "configure: failed program was:" >&5
22334   cat conftest.$ac_ext >&5
22335   rm -rf conftest*
22336   eval "ac_cv_func_setproctitle=no"
22337 fi
22338 rm -f conftest*
22339 fi
22340
22341 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22342   echo "$ac_t""yes" 1>&6
22343   have_setproctitle=yes
22344 else
22345   echo "$ac_t""no" 1>&6
22346
22347                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22348 echo "configure:22349: checking for setproctitle in -lutil" >&5
22349 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22350 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22351   echo $ac_n "(cached) $ac_c" 1>&6
22352 else
22353   ac_save_LIBS="$LIBS"
22354 LIBS="-lutil  $LIBS"
22355 cat > conftest.$ac_ext <<EOF
22356 #line 22357 "configure"
22357 #include "confdefs.h"
22358 /* Override any gcc2 internal prototype to avoid an error.  */
22359 /* We use char because int might match the return type of a gcc2
22360     builtin and then its argument prototype would still apply.  */
22361 char setproctitle();
22362
22363 int main() {
22364 setproctitle()
22365 ; return 0; }
22366 EOF
22367 if { (eval echo configure:22368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22368   rm -rf conftest*
22369   eval "ac_cv_lib_$ac_lib_var=yes"
22370 else
22371   echo "configure: failed program was:" >&5
22372   cat conftest.$ac_ext >&5
22373   rm -rf conftest*
22374   eval "ac_cv_lib_$ac_lib_var=no"
22375 fi
22376 rm -f conftest*
22377 LIBS="$ac_save_LIBS"
22378
22379 fi
22380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22381   echo "$ac_t""yes" 1>&6
22382   have_setproctitle=yes
22383                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22384 else
22385   echo "$ac_t""no" 1>&6
22386 have_setproctitle=no
22387                         LIBOBJS="$LIBOBJS setproctitle.o"
22388                         LIBSRCS="$LIBSRCS setproctitle.c"
22389 fi
22390
22391 fi
22392
22393
22394         if test $have_setproctitle = yes ; then
22395                 cat >> confdefs.h <<\EOF
22396 #define HAVE_SETPROCTITLE 1
22397 EOF
22398
22399         fi
22400 fi
22401
22402 if test $ol_enable_slp != no ; then
22403         for ac_hdr in slp.h 
22404 do
22405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22407 echo "configure:22408: checking for $ac_hdr" >&5
22408 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22409   echo $ac_n "(cached) $ac_c" 1>&6
22410 else
22411   cat > conftest.$ac_ext <<EOF
22412 #line 22413 "configure"
22413 #include "confdefs.h"
22414 #include <$ac_hdr>
22415 EOF
22416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22417 { (eval echo configure:22418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22419 if test -z "$ac_err"; then
22420   rm -rf conftest*
22421   eval "ac_cv_header_$ac_safe=yes"
22422 else
22423   echo "$ac_err" >&5
22424   echo "configure: failed program was:" >&5
22425   cat conftest.$ac_ext >&5
22426   rm -rf conftest*
22427   eval "ac_cv_header_$ac_safe=no"
22428 fi
22429 rm -f conftest*
22430 fi
22431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22432   echo "$ac_t""yes" 1>&6
22433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22434   cat >> confdefs.h <<EOF
22435 #define $ac_tr_hdr 1
22436 EOF
22437  
22438 else
22439   echo "$ac_t""no" 1>&6
22440 fi
22441 done
22442
22443
22444         if test $ac_cv_header_slp_h = yes ; then
22445                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22446 echo "configure:22447: checking for SLPOpen in -lslp" >&5
22447 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22449   echo $ac_n "(cached) $ac_c" 1>&6
22450 else
22451   ac_save_LIBS="$LIBS"
22452 LIBS="-lslp  $LIBS"
22453 cat > conftest.$ac_ext <<EOF
22454 #line 22455 "configure"
22455 #include "confdefs.h"
22456 /* Override any gcc2 internal prototype to avoid an error.  */
22457 /* We use char because int might match the return type of a gcc2
22458     builtin and then its argument prototype would still apply.  */
22459 char SLPOpen();
22460
22461 int main() {
22462 SLPOpen()
22463 ; return 0; }
22464 EOF
22465 if { (eval echo configure:22466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22466   rm -rf conftest*
22467   eval "ac_cv_lib_$ac_lib_var=yes"
22468 else
22469   echo "configure: failed program was:" >&5
22470   cat conftest.$ac_ext >&5
22471   rm -rf conftest*
22472   eval "ac_cv_lib_$ac_lib_var=no"
22473 fi
22474 rm -f conftest*
22475 LIBS="$ac_save_LIBS"
22476
22477 fi
22478 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22479   echo "$ac_t""yes" 1>&6
22480   have_slp=yes
22481 else
22482   echo "$ac_t""no" 1>&6
22483 have_slp=no
22484 fi
22485
22486                 if test $have_slp = yes ; then
22487                         cat >> confdefs.h <<\EOF
22488 #define HAVE_SLP 1
22489 EOF
22490
22491                         SLAPD_SLP_LIBS=-lslp
22492                 fi
22493
22494         elif test $ol_enable_slp = yes ; then
22495                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22496         fi
22497 fi
22498
22499 if test "$ol_with_multiple_precision" != "no" ; then
22500         ol_have_bignum=no
22501         ol_have_gmp=no
22502
22503         for ac_hdr in openssl/bn.h bn.h
22504 do
22505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22507 echo "configure:22508: checking for $ac_hdr" >&5
22508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22509   echo $ac_n "(cached) $ac_c" 1>&6
22510 else
22511   cat > conftest.$ac_ext <<EOF
22512 #line 22513 "configure"
22513 #include "confdefs.h"
22514 #include <$ac_hdr>
22515 EOF
22516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22517 { (eval echo configure:22518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22519 if test -z "$ac_err"; then
22520   rm -rf conftest*
22521   eval "ac_cv_header_$ac_safe=yes"
22522 else
22523   echo "$ac_err" >&5
22524   echo "configure: failed program was:" >&5
22525   cat conftest.$ac_ext >&5
22526   rm -rf conftest*
22527   eval "ac_cv_header_$ac_safe=no"
22528 fi
22529 rm -f conftest*
22530 fi
22531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22532   echo "$ac_t""yes" 1>&6
22533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22534   cat >> confdefs.h <<EOF
22535 #define $ac_tr_hdr 1
22536 EOF
22537  
22538 else
22539   echo "$ac_t""no" 1>&6
22540 fi
22541 done
22542
22543         for ac_hdr in openssl/crypto.h crypto.h
22544 do
22545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22547 echo "configure:22548: checking for $ac_hdr" >&5
22548 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22549   echo $ac_n "(cached) $ac_c" 1>&6
22550 else
22551   cat > conftest.$ac_ext <<EOF
22552 #line 22553 "configure"
22553 #include "confdefs.h"
22554 #include <$ac_hdr>
22555 EOF
22556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22557 { (eval echo configure:22558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22559 if test -z "$ac_err"; then
22560   rm -rf conftest*
22561   eval "ac_cv_header_$ac_safe=yes"
22562 else
22563   echo "$ac_err" >&5
22564   echo "configure: failed program was:" >&5
22565   cat conftest.$ac_ext >&5
22566   rm -rf conftest*
22567   eval "ac_cv_header_$ac_safe=no"
22568 fi
22569 rm -f conftest*
22570 fi
22571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22572   echo "$ac_t""yes" 1>&6
22573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22574   cat >> confdefs.h <<EOF
22575 #define $ac_tr_hdr 1
22576 EOF
22577  
22578 else
22579   echo "$ac_t""no" 1>&6
22580 fi
22581 done
22582
22583         for ac_hdr in gmp.h 
22584 do
22585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22587 echo "configure:22588: checking for $ac_hdr" >&5
22588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22589   echo $ac_n "(cached) $ac_c" 1>&6
22590 else
22591   cat > conftest.$ac_ext <<EOF
22592 #line 22593 "configure"
22593 #include "confdefs.h"
22594 #include <$ac_hdr>
22595 EOF
22596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22597 { (eval echo configure:22598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22599 if test -z "$ac_err"; then
22600   rm -rf conftest*
22601   eval "ac_cv_header_$ac_safe=yes"
22602 else
22603   echo "$ac_err" >&5
22604   echo "configure: failed program was:" >&5
22605   cat conftest.$ac_ext >&5
22606   rm -rf conftest*
22607   eval "ac_cv_header_$ac_safe=no"
22608 fi
22609 rm -f conftest*
22610 fi
22611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22612   echo "$ac_t""yes" 1>&6
22613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22614   cat >> confdefs.h <<EOF
22615 #define $ac_tr_hdr 1
22616 EOF
22617  
22618 else
22619   echo "$ac_t""no" 1>&6
22620 fi
22621 done
22622
22623
22624         if test "$ol_with_tls" = "found" ; then
22625                 ol_have_bn_h=no
22626                 ol_have_crypto_h=no
22627
22628                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22629                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22630                         ol_have_bn_h=yes
22631                 fi
22632
22633                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22634                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22635                         ol_have_crypto_h=yes
22636                 fi
22637
22638                 if test "$ol_have_bn_h" = "yes" \
22639                                 -a "$ol_have_crypto_h" = "yes" ; then
22640                         ol_have_bignum=yes
22641                 fi
22642         fi
22643
22644         if test $ac_cv_header_gmp_h = yes ; then
22645                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22646 echo "configure:22647: checking for __gmpz_add_ui in -lgmp" >&5
22647 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22649   echo $ac_n "(cached) $ac_c" 1>&6
22650 else
22651   ac_save_LIBS="$LIBS"
22652 LIBS="-lgmp  $LIBS"
22653 cat > conftest.$ac_ext <<EOF
22654 #line 22655 "configure"
22655 #include "confdefs.h"
22656 /* Override any gcc2 internal prototype to avoid an error.  */
22657 /* We use char because int might match the return type of a gcc2
22658     builtin and then its argument prototype would still apply.  */
22659 char __gmpz_add_ui();
22660
22661 int main() {
22662 __gmpz_add_ui()
22663 ; return 0; }
22664 EOF
22665 if { (eval echo configure:22666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22666   rm -rf conftest*
22667   eval "ac_cv_lib_$ac_lib_var=yes"
22668 else
22669   echo "configure: failed program was:" >&5
22670   cat conftest.$ac_ext >&5
22671   rm -rf conftest*
22672   eval "ac_cv_lib_$ac_lib_var=no"
22673 fi
22674 rm -f conftest*
22675 LIBS="$ac_save_LIBS"
22676
22677 fi
22678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22679   echo "$ac_t""yes" 1>&6
22680   have_gmp=yes
22681 else
22682   echo "$ac_t""no" 1>&6
22683 have_gmp=no
22684 fi
22685
22686                 if test $have_gmp = yes ; then
22687                         ol_have_gmp=yes
22688                 fi
22689         fi
22690
22691         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22692 echo "configure:22693: checking for multiple precision support" >&5
22693
22694         ol_mp_support="none"
22695         case "$ol_with_multiple_precision" in
22696         auto)
22697                                                                                 if test "$ol_have_bignum" = "yes" ; then
22698                         ol_mp_support="bignum"
22699                 else
22700                         if test "$ol_have_gmp" = "yes" ; then
22701                                 ol_mp_support="gmp"
22702                         fi
22703                 fi
22704                 ;;
22705         bignum)
22706                 if test "$ol_have_bignum" != "yes" ; then
22707                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22708                 fi
22709                 ol_mp_support="bignum"
22710                 ;;
22711         gmp)
22712                 if test "$ol_have_gmp" != "yes" ; then
22713                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22714                 fi
22715                 ol_mp_support="gmp"
22716                 ;;
22717         yes)
22718                 if test "$ol_have_bignum" = "yes" ; then
22719                         ol_mp_support="bignum"
22720                 elif test "$ol_have_gmp" = "yes" ; then
22721                         ol_mp_support="gmp"
22722                 else
22723                         { echo "configure: error: not available" 1>&2; exit 1; }
22724                 fi
22725                 ;;
22726         esac
22727
22728         case "$ol_mp_support" in
22729         bignum)
22730                 cat >> confdefs.h <<\EOF
22731 #define HAVE_BIGNUM 1
22732 EOF
22733
22734                 ;;
22735         gmp)
22736                 cat >> confdefs.h <<\EOF
22737 #define HAVE_GMP 1
22738 EOF
22739
22740                 SLAPD_GMP_LIBS=-lgmp
22741                 ;;
22742         none)
22743                 ;;
22744         esac
22745
22746         echo "$ac_t""$ol_mp_support" 1>&6
22747 fi
22748
22749
22750 echo $ac_n "checking long long""... $ac_c" 1>&6
22751 echo "configure:22752: checking long long" >&5
22752 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22753   echo $ac_n "(cached) $ac_c" 1>&6
22754 else
22755   
22756         cat > conftest.$ac_ext <<EOF
22757 #line 22758 "configure"
22758 #include "confdefs.h"
22759
22760 int main() {
22761 long long x;
22762 ; return 0; }
22763 EOF
22764 if { (eval echo configure:22765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22765   rm -rf conftest*
22766   ol_cv_type_long_long=yes
22767 else
22768   echo "configure: failed program was:" >&5
22769   cat conftest.$ac_ext >&5
22770   rm -rf conftest*
22771   ol_cv_type_long_long=no
22772 fi
22773 rm -f conftest*
22774 fi
22775
22776 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22777 if test $ol_cv_type_long_long = yes; then
22778         cat >> confdefs.h <<\EOF
22779 #define HAVE_LONG_LONG 1
22780 EOF
22781
22782 fi
22783
22784 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22785 echo "configure:22786: checking for ANSI C header files" >&5
22786 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22787   echo $ac_n "(cached) $ac_c" 1>&6
22788 else
22789   cat > conftest.$ac_ext <<EOF
22790 #line 22791 "configure"
22791 #include "confdefs.h"
22792 #include <stdlib.h>
22793 #include <stdarg.h>
22794 #include <string.h>
22795 #include <float.h>
22796 EOF
22797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22798 { (eval echo configure:22799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22800 if test -z "$ac_err"; then
22801   rm -rf conftest*
22802   ac_cv_header_stdc=yes
22803 else
22804   echo "$ac_err" >&5
22805   echo "configure: failed program was:" >&5
22806   cat conftest.$ac_ext >&5
22807   rm -rf conftest*
22808   ac_cv_header_stdc=no
22809 fi
22810 rm -f conftest*
22811
22812 if test $ac_cv_header_stdc = yes; then
22813   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22814 cat > conftest.$ac_ext <<EOF
22815 #line 22816 "configure"
22816 #include "confdefs.h"
22817 #include <string.h>
22818 EOF
22819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22820   egrep "memchr" >/dev/null 2>&1; then
22821   :
22822 else
22823   rm -rf conftest*
22824   ac_cv_header_stdc=no
22825 fi
22826 rm -f conftest*
22827
22828 fi
22829
22830 if test $ac_cv_header_stdc = yes; then
22831   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22832 cat > conftest.$ac_ext <<EOF
22833 #line 22834 "configure"
22834 #include "confdefs.h"
22835 #include <stdlib.h>
22836 EOF
22837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22838   egrep "free" >/dev/null 2>&1; then
22839   :
22840 else
22841   rm -rf conftest*
22842   ac_cv_header_stdc=no
22843 fi
22844 rm -f conftest*
22845
22846 fi
22847
22848 if test $ac_cv_header_stdc = yes; then
22849   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22850 if test "$cross_compiling" = yes; then
22851   :
22852 else
22853   cat > conftest.$ac_ext <<EOF
22854 #line 22855 "configure"
22855 #include "confdefs.h"
22856 #include <ctype.h>
22857 #if ((' ' & 0x0FF) == 0x020)
22858 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22859 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22860 #else
22861 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22862  || ('j' <= (c) && (c) <= 'r') \
22863  || ('s' <= (c) && (c) <= 'z'))
22864 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22865 #endif
22866 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22867 int main () { int i; for (i = 0; i < 256; i++)
22868 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22869 exit (0); }
22870
22871 EOF
22872 if { (eval echo configure:22873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22873 then
22874   :
22875 else
22876   echo "configure: failed program was:" >&5
22877   cat conftest.$ac_ext >&5
22878   rm -fr conftest*
22879   ac_cv_header_stdc=no
22880 fi
22881 rm -fr conftest*
22882 fi
22883
22884 fi
22885 fi
22886
22887 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22888 if test $ac_cv_header_stdc = yes; then
22889   cat >> confdefs.h <<\EOF
22890 #define STDC_HEADERS 1
22891 EOF
22892
22893 fi
22894
22895 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22896 echo "configure:22897: checking for mode_t" >&5
22897 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22898   echo $ac_n "(cached) $ac_c" 1>&6
22899 else
22900   cat > conftest.$ac_ext <<EOF
22901 #line 22902 "configure"
22902 #include "confdefs.h"
22903 #include <sys/types.h>
22904 #if STDC_HEADERS
22905 #include <stdlib.h>
22906 #include <stddef.h>
22907 #endif
22908
22909 EOF
22910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22911   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22912   rm -rf conftest*
22913   eval "ac_cv_type_mode_t=yes"
22914 else
22915   rm -rf conftest*
22916   eval "ac_cv_type_mode_t=no"
22917 fi
22918 rm -f conftest*
22919
22920 fi
22921 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22922   echo "$ac_t""yes" 1>&6
22923 else
22924   echo "$ac_t""no" 1>&6
22925   cat >> confdefs.h <<EOF
22926 #define mode_t int
22927 EOF
22928
22929 fi
22930
22931 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22932 echo "configure:22933: checking for off_t" >&5
22933 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22934   echo $ac_n "(cached) $ac_c" 1>&6
22935 else
22936   cat > conftest.$ac_ext <<EOF
22937 #line 22938 "configure"
22938 #include "confdefs.h"
22939 #include <sys/types.h>
22940 #if STDC_HEADERS
22941 #include <stdlib.h>
22942 #include <stddef.h>
22943 #endif
22944
22945 EOF
22946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22947   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22948   rm -rf conftest*
22949   eval "ac_cv_type_off_t=yes"
22950 else
22951   rm -rf conftest*
22952   eval "ac_cv_type_off_t=no"
22953 fi
22954 rm -f conftest*
22955
22956 fi
22957 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22958   echo "$ac_t""yes" 1>&6
22959 else
22960   echo "$ac_t""no" 1>&6
22961   cat >> confdefs.h <<EOF
22962 #define off_t long
22963 EOF
22964
22965 fi
22966
22967 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22968 echo "configure:22969: checking for pid_t" >&5
22969 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22970   echo $ac_n "(cached) $ac_c" 1>&6
22971 else
22972   cat > conftest.$ac_ext <<EOF
22973 #line 22974 "configure"
22974 #include "confdefs.h"
22975 #include <sys/types.h>
22976 #if STDC_HEADERS
22977 #include <stdlib.h>
22978 #include <stddef.h>
22979 #endif
22980
22981 EOF
22982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22983   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22984   rm -rf conftest*
22985   eval "ac_cv_type_pid_t=yes"
22986 else
22987   rm -rf conftest*
22988   eval "ac_cv_type_pid_t=no"
22989 fi
22990 rm -f conftest*
22991
22992 fi
22993 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22994   echo "$ac_t""yes" 1>&6
22995 else
22996   echo "$ac_t""no" 1>&6
22997   cat >> confdefs.h <<EOF
22998 #define pid_t int
22999 EOF
23000
23001 fi
23002
23003 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23004 echo "configure:23005: checking for ptrdiff_t" >&5
23005 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23006   echo $ac_n "(cached) $ac_c" 1>&6
23007 else
23008   cat > conftest.$ac_ext <<EOF
23009 #line 23010 "configure"
23010 #include "confdefs.h"
23011 #include <stddef.h>
23012 int main() {
23013 ptrdiff_t p
23014 ; return 0; }
23015 EOF
23016 if { (eval echo configure:23017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23017   rm -rf conftest*
23018   am_cv_type_ptrdiff_t=yes
23019 else
23020   echo "configure: failed program was:" >&5
23021   cat conftest.$ac_ext >&5
23022   rm -rf conftest*
23023   am_cv_type_ptrdiff_t=no
23024 fi
23025 rm -f conftest*
23026 fi
23027
23028 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23029    if test $am_cv_type_ptrdiff_t = yes; then
23030      cat >> confdefs.h <<\EOF
23031 #define HAVE_PTRDIFF_T 1
23032 EOF
23033
23034    fi
23035
23036 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23037 echo "configure:23038: checking return type of signal handlers" >&5
23038 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23039   echo $ac_n "(cached) $ac_c" 1>&6
23040 else
23041   cat > conftest.$ac_ext <<EOF
23042 #line 23043 "configure"
23043 #include "confdefs.h"
23044 #include <sys/types.h>
23045 #include <signal.h>
23046 #ifdef signal
23047 #undef signal
23048 #endif
23049 #ifdef __cplusplus
23050 extern "C" void (*signal (int, void (*)(int)))(int);
23051 #else
23052 void (*signal ()) ();
23053 #endif
23054
23055 int main() {
23056 int i;
23057 ; return 0; }
23058 EOF
23059 if { (eval echo configure:23060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23060   rm -rf conftest*
23061   ac_cv_type_signal=void
23062 else
23063   echo "configure: failed program was:" >&5
23064   cat conftest.$ac_ext >&5
23065   rm -rf conftest*
23066   ac_cv_type_signal=int
23067 fi
23068 rm -f conftest*
23069 fi
23070
23071 echo "$ac_t""$ac_cv_type_signal" 1>&6
23072 cat >> confdefs.h <<EOF
23073 #define RETSIGTYPE $ac_cv_type_signal
23074 EOF
23075
23076
23077 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23078 echo "configure:23079: checking for size_t" >&5
23079 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23080   echo $ac_n "(cached) $ac_c" 1>&6
23081 else
23082   cat > conftest.$ac_ext <<EOF
23083 #line 23084 "configure"
23084 #include "confdefs.h"
23085 #include <sys/types.h>
23086 #if STDC_HEADERS
23087 #include <stdlib.h>
23088 #include <stddef.h>
23089 #endif
23090
23091 EOF
23092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23093   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23094   rm -rf conftest*
23095   eval "ac_cv_type_size_t=yes"
23096 else
23097   rm -rf conftest*
23098   eval "ac_cv_type_size_t=no"
23099 fi
23100 rm -f conftest*
23101
23102 fi
23103 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23104   echo "$ac_t""yes" 1>&6
23105 else
23106   echo "$ac_t""no" 1>&6
23107   cat >> confdefs.h <<EOF
23108 #define size_t unsigned
23109 EOF
23110
23111 fi
23112
23113
23114 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23115 echo "configure:23116: checking for ssize_t" >&5
23116 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23117   echo $ac_n "(cached) $ac_c" 1>&6
23118 else
23119   cat > conftest.$ac_ext <<EOF
23120 #line 23121 "configure"
23121 #include "confdefs.h"
23122 #include <sys/types.h>
23123 #if STDC_HEADERS
23124 #include <stdlib.h>
23125 #include <stddef.h>
23126 #endif
23127
23128 EOF
23129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23130   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23131   rm -rf conftest*
23132   eval "ac_cv_type_ssize_t=yes"
23133 else
23134   rm -rf conftest*
23135   eval "ac_cv_type_ssize_t=no"
23136 fi
23137 rm -f conftest*
23138
23139 fi
23140 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23141   echo "$ac_t""yes" 1>&6
23142 else
23143   echo "$ac_t""no" 1>&6
23144   cat >> confdefs.h <<EOF
23145 #define ssize_t signed int
23146 EOF
23147
23148 fi
23149
23150 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23151 echo "configure:23152: checking for caddr_t" >&5
23152 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23153   echo $ac_n "(cached) $ac_c" 1>&6
23154 else
23155   cat > conftest.$ac_ext <<EOF
23156 #line 23157 "configure"
23157 #include "confdefs.h"
23158 #include <sys/types.h>
23159 #if STDC_HEADERS
23160 #include <stdlib.h>
23161 #include <stddef.h>
23162 #endif
23163
23164 EOF
23165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23166   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23167   rm -rf conftest*
23168   eval "ac_cv_type_caddr_t=yes"
23169 else
23170   rm -rf conftest*
23171   eval "ac_cv_type_caddr_t=no"
23172 fi
23173 rm -f conftest*
23174
23175 fi
23176 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23177   echo "$ac_t""yes" 1>&6
23178 else
23179   echo "$ac_t""no" 1>&6
23180   cat >> confdefs.h <<EOF
23181 #define caddr_t char *
23182 EOF
23183
23184 fi
23185
23186
23187 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23188 echo "configure:23189: checking for socklen_t" >&5
23189 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23190   echo $ac_n "(cached) $ac_c" 1>&6
23191 else
23192   cat > conftest.$ac_ext <<EOF
23193 #line 23194 "configure"
23194 #include "confdefs.h"
23195
23196 #ifdef HAVE_SYS_TYPES_H
23197 #include <sys/types.h>
23198 #endif
23199 #ifdef HAVE_SYS_SOCKET_H
23200 #include <sys/socket.h>
23201 #endif
23202
23203 int main() {
23204 socklen_t len;
23205 ; return 0; }
23206 EOF
23207 if { (eval echo configure:23208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23208   rm -rf conftest*
23209   ol_cv_type_socklen_t=yes
23210 else
23211   echo "configure: failed program was:" >&5
23212   cat conftest.$ac_ext >&5
23213   rm -rf conftest*
23214   ol_cv_type_socklen_t=no
23215 fi
23216 rm -f conftest*
23217 fi
23218
23219 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23220   if test $ol_cv_type_socklen_t = no; then
23221     cat >> confdefs.h <<\EOF
23222 #define socklen_t int
23223 EOF
23224
23225   fi
23226  
23227 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23228 echo "configure:23229: checking for member st_blksize in aggregate type struct stat" >&5
23229 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
23230   echo $ac_n "(cached) $ac_c" 1>&6
23231 else
23232   cat > conftest.$ac_ext <<EOF
23233 #line 23234 "configure"
23234 #include "confdefs.h"
23235 #include <sys/types.h>
23236 #include <sys/stat.h>
23237 int main() {
23238 struct stat foo; foo.st_blksize;
23239 ; return 0; }
23240 EOF
23241 if { (eval echo configure:23242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23242   rm -rf conftest*
23243   ac_cv_c_struct_member_st_blksize=yes
23244 else
23245   echo "configure: failed program was:" >&5
23246   cat conftest.$ac_ext >&5
23247   rm -rf conftest*
23248   ac_cv_c_struct_member_st_blksize=no
23249 fi
23250 rm -f conftest*
23251 fi
23252
23253 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23254 st_blksize="$ac_cv_c_struct_member_st_blksize"
23255 if test $ac_cv_c_struct_member_st_blksize = yes; then
23256   cat >> confdefs.h <<\EOF
23257 #define HAVE_ST_BLKSIZE 1
23258 EOF
23259
23260 fi
23261
23262 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23263 echo "configure:23264: checking whether time.h and sys/time.h may both be included" >&5
23264 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
23265   echo $ac_n "(cached) $ac_c" 1>&6
23266 else
23267   cat > conftest.$ac_ext <<EOF
23268 #line 23269 "configure"
23269 #include "confdefs.h"
23270 #include <sys/types.h>
23271 #include <sys/time.h>
23272 #include <time.h>
23273 int main() {
23274 struct tm *tp;
23275 ; return 0; }
23276 EOF
23277 if { (eval echo configure:23278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23278   rm -rf conftest*
23279   ac_cv_header_time=yes
23280 else
23281   echo "configure: failed program was:" >&5
23282   cat conftest.$ac_ext >&5
23283   rm -rf conftest*
23284   ac_cv_header_time=no
23285 fi
23286 rm -f conftest*
23287 fi
23288
23289 echo "$ac_t""$ac_cv_header_time" 1>&6
23290 if test $ac_cv_header_time = yes; then
23291   cat >> confdefs.h <<\EOF
23292 #define TIME_WITH_SYS_TIME 1
23293 EOF
23294
23295 fi
23296
23297 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23298 echo "configure:23299: checking whether struct tm is in sys/time.h or time.h" >&5
23299 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23300   echo $ac_n "(cached) $ac_c" 1>&6
23301 else
23302   cat > conftest.$ac_ext <<EOF
23303 #line 23304 "configure"
23304 #include "confdefs.h"
23305 #include <sys/types.h>
23306 #include <time.h>
23307 int main() {
23308 struct tm *tp; tp->tm_sec;
23309 ; return 0; }
23310 EOF
23311 if { (eval echo configure:23312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23312   rm -rf conftest*
23313   ac_cv_struct_tm=time.h
23314 else
23315   echo "configure: failed program was:" >&5
23316   cat conftest.$ac_ext >&5
23317   rm -rf conftest*
23318   ac_cv_struct_tm=sys/time.h
23319 fi
23320 rm -f conftest*
23321 fi
23322
23323 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23324 if test $ac_cv_struct_tm = sys/time.h; then
23325   cat >> confdefs.h <<\EOF
23326 #define TM_IN_SYS_TIME 1
23327 EOF
23328
23329 fi
23330
23331 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23332 echo "configure:23333: checking for uid_t in sys/types.h" >&5
23333 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23334   echo $ac_n "(cached) $ac_c" 1>&6
23335 else
23336   cat > conftest.$ac_ext <<EOF
23337 #line 23338 "configure"
23338 #include "confdefs.h"
23339 #include <sys/types.h>
23340 EOF
23341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23342   egrep "uid_t" >/dev/null 2>&1; then
23343   rm -rf conftest*
23344   ac_cv_type_uid_t=yes
23345 else
23346   rm -rf conftest*
23347   ac_cv_type_uid_t=no
23348 fi
23349 rm -f conftest*
23350
23351 fi
23352
23353 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23354 if test $ac_cv_type_uid_t = no; then
23355   cat >> confdefs.h <<\EOF
23356 #define uid_t int
23357 EOF
23358
23359   cat >> confdefs.h <<\EOF
23360 #define gid_t int
23361 EOF
23362
23363 fi
23364
23365 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23366 echo "configure:23367: checking for sig_atomic_t" >&5
23367 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23368   echo $ac_n "(cached) $ac_c" 1>&6
23369 else
23370   cat > conftest.$ac_ext <<EOF
23371 #line 23372 "configure"
23372 #include "confdefs.h"
23373 #include <signal.h>
23374 int main() {
23375 sig_atomic_t atomic;
23376 ; return 0; }
23377 EOF
23378 if { (eval echo configure:23379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23379   rm -rf conftest*
23380   ol_cv_type_sig_atomic_t=yes
23381 else
23382   echo "configure: failed program was:" >&5
23383   cat conftest.$ac_ext >&5
23384   rm -rf conftest*
23385   ol_cv_type_sig_atomic_t=no
23386 fi
23387 rm -f conftest*
23388 fi
23389
23390 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23391   if test $ol_cv_type_sig_atomic_t = no; then
23392     cat >> confdefs.h <<\EOF
23393 #define sig_atomic_t int
23394 EOF
23395
23396   fi
23397  
23398
23399
23400 # test for pw_gecos in struct passwd
23401 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23402 echo "configure:23403: checking struct passwd for pw_gecos" >&5
23403 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23404   echo $ac_n "(cached) $ac_c" 1>&6
23405 else
23406   
23407         cat > conftest.$ac_ext <<EOF
23408 #line 23409 "configure"
23409 #include "confdefs.h"
23410 #include <pwd.h>
23411 int main() {
23412
23413         struct passwd pwd;
23414         pwd.pw_gecos = pwd.pw_name;
23415
23416 ; return 0; }
23417 EOF
23418 if { (eval echo configure:23419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23419   rm -rf conftest*
23420   ol_cv_struct_passwd_pw_gecos=yes
23421 else
23422   echo "configure: failed program was:" >&5
23423   cat conftest.$ac_ext >&5
23424   rm -rf conftest*
23425   ol_cv_struct_passwd_pw_gecos=no
23426 fi
23427 rm -f conftest*
23428 fi
23429
23430 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23431 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23432         cat >> confdefs.h <<\EOF
23433 #define HAVE_PW_GECOS 1
23434 EOF
23435
23436 fi
23437
23438 # test for pw_passwd in struct passwd
23439 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23440 echo "configure:23441: checking struct passwd for pw_passwd" >&5
23441 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23442   echo $ac_n "(cached) $ac_c" 1>&6
23443 else
23444   
23445         cat > conftest.$ac_ext <<EOF
23446 #line 23447 "configure"
23447 #include "confdefs.h"
23448 #include <pwd.h>
23449 int main() {
23450
23451         struct passwd pwd;
23452         pwd.pw_passwd = pwd.pw_name;
23453
23454 ; return 0; }
23455 EOF
23456 if { (eval echo configure:23457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23457   rm -rf conftest*
23458   ol_cv_struct_passwd_pw_passwd=yes
23459 else
23460   echo "configure: failed program was:" >&5
23461   cat conftest.$ac_ext >&5
23462   rm -rf conftest*
23463   ol_cv_struct_passwd_pw_passwd=no
23464 fi
23465 rm -f conftest*
23466 fi
23467
23468 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23469 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23470         cat >> confdefs.h <<\EOF
23471 #define HAVE_PW_PASSWD 1
23472 EOF
23473
23474 fi
23475
23476
23477 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23478 echo "configure:23479: checking if toupper() requires islower()" >&5
23479 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23480   echo $ac_n "(cached) $ac_c" 1>&6
23481 else
23482   
23483         if test "$cross_compiling" = yes; then
23484   ol_cv_c_upper_lower=safe
23485 else
23486   cat > conftest.$ac_ext <<EOF
23487 #line 23488 "configure"
23488 #include "confdefs.h"
23489
23490 #include <ctype.h>
23491 main()
23492 {
23493         if ('C' == toupper('C'))
23494                 exit(0);
23495         else
23496                 exit(1);
23497 }
23498 EOF
23499 if { (eval echo configure:23500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23500 then
23501   ol_cv_c_upper_lower=no
23502 else
23503   echo "configure: failed program was:" >&5
23504   cat conftest.$ac_ext >&5
23505   rm -fr conftest*
23506   ol_cv_c_upper_lower=yes
23507 fi
23508 rm -fr conftest*
23509 fi
23510
23511 fi
23512
23513 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23514 if test $ol_cv_c_upper_lower != no ; then
23515         cat >> confdefs.h <<\EOF
23516 #define C_UPPER_LOWER 1
23517 EOF
23518
23519 fi
23520
23521 echo $ac_n "checking for working const""... $ac_c" 1>&6
23522 echo "configure:23523: checking for working const" >&5
23523 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23524   echo $ac_n "(cached) $ac_c" 1>&6
23525 else
23526   cat > conftest.$ac_ext <<EOF
23527 #line 23528 "configure"
23528 #include "confdefs.h"
23529
23530 int main() {
23531
23532 /* Ultrix mips cc rejects this.  */
23533 typedef int charset[2]; const charset x;
23534 /* SunOS 4.1.1 cc rejects this.  */
23535 char const *const *ccp;
23536 char **p;
23537 /* NEC SVR4.0.2 mips cc rejects this.  */
23538 struct point {int x, y;};
23539 static struct point const zero = {0,0};
23540 /* AIX XL C 1.02.0.0 rejects this.
23541    It does not let you subtract one const X* pointer from another in an arm
23542    of an if-expression whose if-part is not a constant expression */
23543 const char *g = "string";
23544 ccp = &g + (g ? g-g : 0);
23545 /* HPUX 7.0 cc rejects these. */
23546 ++ccp;
23547 p = (char**) ccp;
23548 ccp = (char const *const *) p;
23549 { /* SCO 3.2v4 cc rejects this.  */
23550   char *t;
23551   char const *s = 0 ? (char *) 0 : (char const *) 0;
23552
23553   *t++ = 0;
23554 }
23555 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23556   int x[] = {25, 17};
23557   const int *foo = &x[0];
23558   ++foo;
23559 }
23560 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23561   typedef const int *iptr;
23562   iptr p = 0;
23563   ++p;
23564 }
23565 { /* AIX XL C 1.02.0.0 rejects this saying
23566      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23567   struct s { int j; const int *ap[3]; };
23568   struct s *b; b->j = 5;
23569 }
23570 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23571   const int foo = 10;
23572 }
23573
23574 ; return 0; }
23575 EOF
23576 if { (eval echo configure:23577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23577   rm -rf conftest*
23578   ac_cv_c_const=yes
23579 else
23580   echo "configure: failed program was:" >&5
23581   cat conftest.$ac_ext >&5
23582   rm -rf conftest*
23583   ac_cv_c_const=no
23584 fi
23585 rm -f conftest*
23586 fi
23587
23588 echo "$ac_t""$ac_cv_c_const" 1>&6
23589 if test $ac_cv_c_const = no; then
23590   cat >> confdefs.h <<\EOF
23591 #define const 
23592 EOF
23593
23594 fi
23595
23596 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23597 echo "configure:23598: checking if compiler understands volatile" >&5
23598 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23599   echo $ac_n "(cached) $ac_c" 1>&6
23600 else
23601   cat > conftest.$ac_ext <<EOF
23602 #line 23603 "configure"
23603 #include "confdefs.h"
23604 int x, y, z;
23605 int main() {
23606 volatile int a; int * volatile b = x ? &y : &z;
23607       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23608       *b = 0;
23609 ; return 0; }
23610 EOF
23611 if { (eval echo configure:23612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23612   rm -rf conftest*
23613   ol_cv_c_volatile=yes
23614 else
23615   echo "configure: failed program was:" >&5
23616   cat conftest.$ac_ext >&5
23617   rm -rf conftest*
23618   ol_cv_c_volatile=no
23619 fi
23620 rm -f conftest*
23621 fi
23622
23623 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23624   if test $ol_cv_c_volatile = yes; then
23625     : 
23626   else
23627     cat >> confdefs.h <<\EOF
23628 #define volatile 
23629 EOF
23630
23631   fi
23632  
23633
23634 if test $cross_compiling = yes ; then
23635         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23636         cat >> confdefs.h <<\EOF
23637 #define CROSS_COMPILING 1
23638 EOF
23639
23640 else
23641         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23642 echo "configure:23643: checking whether byte ordering is bigendian" >&5
23643 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23644   echo $ac_n "(cached) $ac_c" 1>&6
23645 else
23646   ac_cv_c_bigendian=unknown
23647 # See if sys/param.h defines the BYTE_ORDER macro.
23648 cat > conftest.$ac_ext <<EOF
23649 #line 23650 "configure"
23650 #include "confdefs.h"
23651 #include <sys/types.h>
23652 #include <sys/param.h>
23653 int main() {
23654
23655 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23656  bogus endian macros
23657 #endif
23658 ; return 0; }
23659 EOF
23660 if { (eval echo configure:23661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23661   rm -rf conftest*
23662   # It does; now see whether it defined to BIG_ENDIAN or not.
23663 cat > conftest.$ac_ext <<EOF
23664 #line 23665 "configure"
23665 #include "confdefs.h"
23666 #include <sys/types.h>
23667 #include <sys/param.h>
23668 int main() {
23669
23670 #if BYTE_ORDER != BIG_ENDIAN
23671  not big endian
23672 #endif
23673 ; return 0; }
23674 EOF
23675 if { (eval echo configure:23676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23676   rm -rf conftest*
23677   ac_cv_c_bigendian=yes
23678 else
23679   echo "configure: failed program was:" >&5
23680   cat conftest.$ac_ext >&5
23681   rm -rf conftest*
23682   ac_cv_c_bigendian=no
23683 fi
23684 rm -f conftest*
23685 else
23686   echo "configure: failed program was:" >&5
23687   cat conftest.$ac_ext >&5
23688 fi
23689 rm -f conftest*
23690 if test $ac_cv_c_bigendian = unknown; then
23691 if test "$cross_compiling" = yes; then
23692     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23693 else
23694   cat > conftest.$ac_ext <<EOF
23695 #line 23696 "configure"
23696 #include "confdefs.h"
23697 main () {
23698   /* Are we little or big endian?  From Harbison&Steele.  */
23699   union
23700   {
23701     long l;
23702     char c[sizeof (long)];
23703   } u;
23704   u.l = 1;
23705   exit (u.c[sizeof (long) - 1] == 1);
23706 }
23707 EOF
23708 if { (eval echo configure:23709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23709 then
23710   ac_cv_c_bigendian=no
23711 else
23712   echo "configure: failed program was:" >&5
23713   cat conftest.$ac_ext >&5
23714   rm -fr conftest*
23715   ac_cv_c_bigendian=yes
23716 fi
23717 rm -fr conftest*
23718 fi
23719
23720 fi
23721 fi
23722
23723 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23724 if test $ac_cv_c_bigendian = yes; then
23725   cat >> confdefs.h <<\EOF
23726 #define WORDS_BIGENDIAN 1
23727 EOF
23728
23729 fi
23730
23731 fi
23732
23733 echo $ac_n "checking size of short""... $ac_c" 1>&6
23734 echo "configure:23735: checking size of short" >&5 
23735 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23736   echo $ac_n "(cached) $ac_c" 1>&6
23737 else
23738   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23739   cat > conftest.$ac_ext <<EOF
23740 #line 23741 "configure"
23741 #include "confdefs.h"
23742 #include "confdefs.h" 
23743 #include <stdlib.h>
23744 #include <sys/types.h> 
23745  
23746
23747 int main() {
23748 switch (0) case 0: case (sizeof (short) == $ac_size):;
23749 ; return 0; }
23750 EOF
23751 if { (eval echo configure:23752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23752   rm -rf conftest*
23753   ac_cv_sizeof_short=$ac_size
23754 else
23755   echo "configure: failed program was:" >&5
23756   cat conftest.$ac_ext >&5
23757 fi
23758 rm -f conftest* 
23759   if test x$ac_cv_sizeof_short != x ; then break; fi 
23760 done 
23761
23762 fi
23763  
23764 if test x$ac_cv_sizeof_short = x ; then 
23765   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23766 fi 
23767 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23768 cat >> confdefs.h <<EOF
23769 #define SIZEOF_SHORT $ac_cv_sizeof_short
23770 EOF
23771  
23772  
23773 echo $ac_n "checking size of int""... $ac_c" 1>&6
23774 echo "configure:23775: checking size of int" >&5 
23775 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23776   echo $ac_n "(cached) $ac_c" 1>&6
23777 else
23778   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23779   cat > conftest.$ac_ext <<EOF
23780 #line 23781 "configure"
23781 #include "confdefs.h"
23782 #include "confdefs.h" 
23783 #include <stdlib.h>
23784 #include <sys/types.h> 
23785  
23786
23787 int main() {
23788 switch (0) case 0: case (sizeof (int) == $ac_size):;
23789 ; return 0; }
23790 EOF
23791 if { (eval echo configure:23792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23792   rm -rf conftest*
23793   ac_cv_sizeof_int=$ac_size
23794 else
23795   echo "configure: failed program was:" >&5
23796   cat conftest.$ac_ext >&5
23797 fi
23798 rm -f conftest* 
23799   if test x$ac_cv_sizeof_int != x ; then break; fi 
23800 done 
23801
23802 fi
23803  
23804 if test x$ac_cv_sizeof_int = x ; then 
23805   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23806 fi 
23807 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23808 cat >> confdefs.h <<EOF
23809 #define SIZEOF_INT $ac_cv_sizeof_int
23810 EOF
23811  
23812  
23813 echo $ac_n "checking size of long""... $ac_c" 1>&6
23814 echo "configure:23815: checking size of long" >&5 
23815 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23816   echo $ac_n "(cached) $ac_c" 1>&6
23817 else
23818   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23819   cat > conftest.$ac_ext <<EOF
23820 #line 23821 "configure"
23821 #include "confdefs.h"
23822 #include "confdefs.h" 
23823 #include <stdlib.h>
23824 #include <sys/types.h> 
23825  
23826
23827 int main() {
23828 switch (0) case 0: case (sizeof (long) == $ac_size):;
23829 ; return 0; }
23830 EOF
23831 if { (eval echo configure:23832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23832   rm -rf conftest*
23833   ac_cv_sizeof_long=$ac_size
23834 else
23835   echo "configure: failed program was:" >&5
23836   cat conftest.$ac_ext >&5
23837 fi
23838 rm -f conftest* 
23839   if test x$ac_cv_sizeof_long != x ; then break; fi 
23840 done 
23841
23842 fi
23843  
23844 if test x$ac_cv_sizeof_long = x ; then 
23845   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23846 fi 
23847 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23848 cat >> confdefs.h <<EOF
23849 #define SIZEOF_LONG $ac_cv_sizeof_long
23850 EOF
23851  
23852
23853 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23854 echo "configure:23855: checking size of wchar_t" >&5 
23855 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23856   echo $ac_n "(cached) $ac_c" 1>&6
23857 else
23858   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23859   cat > conftest.$ac_ext <<EOF
23860 #line 23861 "configure"
23861 #include "confdefs.h"
23862 #include "confdefs.h" 
23863 #include <stdlib.h>
23864 #include <sys/types.h> 
23865  
23866
23867 int main() {
23868 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23869 ; return 0; }
23870 EOF
23871 if { (eval echo configure:23872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23872   rm -rf conftest*
23873   ac_cv_sizeof_wchar_t=$ac_size
23874 else
23875   echo "configure: failed program was:" >&5
23876   cat conftest.$ac_ext >&5
23877 fi
23878 rm -f conftest* 
23879   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23880 done 
23881
23882 fi
23883  
23884 if test x$ac_cv_sizeof_wchar_t = x ; then 
23885   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23886 fi 
23887 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23888 cat >> confdefs.h <<EOF
23889 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23890 EOF
23891  
23892
23893
23894 if test "$ac_cv_sizeof_int" -lt 4 ; then
23895         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23896
23897         cat >> confdefs.h <<\EOF
23898 #define LBER_INT_T long
23899 EOF
23900
23901 else
23902         cat >> confdefs.h <<\EOF
23903 #define LBER_INT_T int
23904 EOF
23905
23906 fi
23907
23908 cat >> confdefs.h <<\EOF
23909 #define LBER_LEN_T long
23910 EOF
23911
23912 cat >> confdefs.h <<\EOF
23913 #define LBER_SOCKET_T int
23914 EOF
23915
23916 cat >> confdefs.h <<\EOF
23917 #define LBER_TAG_T long
23918 EOF
23919
23920
23921 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23922 echo "configure:23923: checking for 8-bit clean memcmp" >&5
23923 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23924   echo $ac_n "(cached) $ac_c" 1>&6
23925 else
23926   if test "$cross_compiling" = yes; then
23927   ac_cv_func_memcmp_clean=no
23928 else
23929   cat > conftest.$ac_ext <<EOF
23930 #line 23931 "configure"
23931 #include "confdefs.h"
23932
23933 main()
23934 {
23935   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23936   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23937 }
23938
23939 EOF
23940 if { (eval echo configure:23941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23941 then
23942   ac_cv_func_memcmp_clean=yes
23943 else
23944   echo "configure: failed program was:" >&5
23945   cat conftest.$ac_ext >&5
23946   rm -fr conftest*
23947   ac_cv_func_memcmp_clean=no
23948 fi
23949 rm -fr conftest*
23950 fi
23951
23952 fi
23953
23954 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23955 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23956
23957
23958 if test $ac_cv_func_memcmp_clean = no ; then
23959         cat >> confdefs.h <<\EOF
23960 #define NEED_MEMCMP_REPLACEMENT 1
23961 EOF
23962
23963 fi
23964
23965 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23966 echo "configure:23967: checking for strftime" >&5
23967 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23968   echo $ac_n "(cached) $ac_c" 1>&6
23969 else
23970   cat > conftest.$ac_ext <<EOF
23971 #line 23972 "configure"
23972 #include "confdefs.h"
23973 /* System header to define __stub macros and hopefully few prototypes,
23974     which can conflict with char strftime(); below.  */
23975 #include <assert.h>
23976 /* Override any gcc2 internal prototype to avoid an error.  */
23977 /* We use char because int might match the return type of a gcc2
23978     builtin and then its argument prototype would still apply.  */
23979 char strftime();
23980 char (*f)();
23981
23982 int main() {
23983
23984 /* The GNU C library defines this for functions which it implements
23985     to always fail with ENOSYS.  Some functions are actually named
23986     something starting with __ and the normal name is an alias.  */
23987 #if defined (__stub_strftime) || defined (__stub___strftime)
23988 choke me
23989 #else
23990 f = strftime;
23991 #endif
23992
23993 ; return 0; }
23994 EOF
23995 if { (eval echo configure:23996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23996   rm -rf conftest*
23997   eval "ac_cv_func_strftime=yes"
23998 else
23999   echo "configure: failed program was:" >&5
24000   cat conftest.$ac_ext >&5
24001   rm -rf conftest*
24002   eval "ac_cv_func_strftime=no"
24003 fi
24004 rm -f conftest*
24005 fi
24006
24007 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24008   echo "$ac_t""yes" 1>&6
24009   cat >> confdefs.h <<\EOF
24010 #define HAVE_STRFTIME 1
24011 EOF
24012
24013 else
24014   echo "$ac_t""no" 1>&6
24015 # strftime is in -lintl on SCO UNIX.
24016 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24017 echo "configure:24018: checking for strftime in -lintl" >&5
24018 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24020   echo $ac_n "(cached) $ac_c" 1>&6
24021 else
24022   ac_save_LIBS="$LIBS"
24023 LIBS="-lintl  $LIBS"
24024 cat > conftest.$ac_ext <<EOF
24025 #line 24026 "configure"
24026 #include "confdefs.h"
24027 /* Override any gcc2 internal prototype to avoid an error.  */
24028 /* We use char because int might match the return type of a gcc2
24029     builtin and then its argument prototype would still apply.  */
24030 char strftime();
24031
24032 int main() {
24033 strftime()
24034 ; return 0; }
24035 EOF
24036 if { (eval echo configure:24037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24037   rm -rf conftest*
24038   eval "ac_cv_lib_$ac_lib_var=yes"
24039 else
24040   echo "configure: failed program was:" >&5
24041   cat conftest.$ac_ext >&5
24042   rm -rf conftest*
24043   eval "ac_cv_lib_$ac_lib_var=no"
24044 fi
24045 rm -f conftest*
24046 LIBS="$ac_save_LIBS"
24047
24048 fi
24049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24050   echo "$ac_t""yes" 1>&6
24051   cat >> confdefs.h <<\EOF
24052 #define HAVE_STRFTIME 1
24053 EOF
24054
24055 LIBS="-lintl $LIBS"
24056 else
24057   echo "$ac_t""no" 1>&6
24058 fi
24059
24060 fi
24061
24062
24063 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24064 echo "configure:24065: checking for inet_aton()" >&5
24065 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24066   echo $ac_n "(cached) $ac_c" 1>&6
24067 else
24068   cat > conftest.$ac_ext <<EOF
24069 #line 24070 "configure"
24070 #include "confdefs.h"
24071
24072 #ifdef HAVE_SYS_TYPES_H
24073 #       include <sys/types.h>
24074 #endif
24075 #ifdef HAVE_SYS_SOCKET_H
24076 #       include <sys/socket.h>
24077 #       ifdef HAVE_SYS_SELECT_H
24078 #               include <sys/select.h>
24079 #       endif
24080 #       include <netinet/in.h>
24081 #       ifdef HAVE_ARPA_INET_H
24082 #               include <arpa/inet.h>
24083 #       endif
24084 #endif
24085
24086 int main() {
24087 struct in_addr in;
24088 int rc = inet_aton( "255.255.255.255", &in );
24089 ; return 0; }
24090 EOF
24091 if { (eval echo configure:24092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24092   rm -rf conftest*
24093   ol_cv_func_inet_aton=yes
24094 else
24095   echo "configure: failed program was:" >&5
24096   cat conftest.$ac_ext >&5
24097   rm -rf conftest*
24098   ol_cv_func_inet_aton=no
24099 fi
24100 rm -f conftest*
24101 fi
24102
24103 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24104   if test $ol_cv_func_inet_aton != no; then
24105     cat >> confdefs.h <<\EOF
24106 #define HAVE_INET_ATON 1
24107 EOF
24108
24109   fi
24110  
24111
24112 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24113 echo "configure:24114: checking for _spawnlp" >&5
24114 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24115   echo $ac_n "(cached) $ac_c" 1>&6
24116 else
24117   cat > conftest.$ac_ext <<EOF
24118 #line 24119 "configure"
24119 #include "confdefs.h"
24120 /* System header to define __stub macros and hopefully few prototypes,
24121     which can conflict with char _spawnlp(); below.  */
24122 #include <assert.h>
24123 /* Override any gcc2 internal prototype to avoid an error.  */
24124 /* We use char because int might match the return type of a gcc2
24125     builtin and then its argument prototype would still apply.  */
24126 char _spawnlp();
24127 char (*f)();
24128
24129 int main() {
24130
24131 /* The GNU C library defines this for functions which it implements
24132     to always fail with ENOSYS.  Some functions are actually named
24133     something starting with __ and the normal name is an alias.  */
24134 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24135 choke me
24136 #else
24137 f = _spawnlp;
24138 #endif
24139
24140 ; return 0; }
24141 EOF
24142 if { (eval echo configure:24143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24143   rm -rf conftest*
24144   eval "ac_cv_func__spawnlp=yes"
24145 else
24146   echo "configure: failed program was:" >&5
24147   cat conftest.$ac_ext >&5
24148   rm -rf conftest*
24149   eval "ac_cv_func__spawnlp=no"
24150 fi
24151 rm -f conftest*
24152 fi
24153
24154 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24155   echo "$ac_t""yes" 1>&6
24156   cat >> confdefs.h <<\EOF
24157 #define HAVE_SPAWNLP 1
24158 EOF
24159
24160 else
24161   echo "$ac_t""no" 1>&6
24162 fi
24163
24164
24165 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24166 echo "configure:24167: checking for _snprintf" >&5
24167 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24168   echo $ac_n "(cached) $ac_c" 1>&6
24169 else
24170   cat > conftest.$ac_ext <<EOF
24171 #line 24172 "configure"
24172 #include "confdefs.h"
24173 /* System header to define __stub macros and hopefully few prototypes,
24174     which can conflict with char _snprintf(); below.  */
24175 #include <assert.h>
24176 /* Override any gcc2 internal prototype to avoid an error.  */
24177 /* We use char because int might match the return type of a gcc2
24178     builtin and then its argument prototype would still apply.  */
24179 char _snprintf();
24180 char (*f)();
24181
24182 int main() {
24183
24184 /* The GNU C library defines this for functions which it implements
24185     to always fail with ENOSYS.  Some functions are actually named
24186     something starting with __ and the normal name is an alias.  */
24187 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24188 choke me
24189 #else
24190 f = _snprintf;
24191 #endif
24192
24193 ; return 0; }
24194 EOF
24195 if { (eval echo configure:24196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24196   rm -rf conftest*
24197   eval "ac_cv_func__snprintf=yes"
24198 else
24199   echo "configure: failed program was:" >&5
24200   cat conftest.$ac_ext >&5
24201   rm -rf conftest*
24202   eval "ac_cv_func__snprintf=no"
24203 fi
24204 rm -f conftest*
24205 fi
24206
24207 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24208   echo "$ac_t""yes" 1>&6
24209   ac_cv_func_snprintf=yes
24210         cat >> confdefs.h <<\EOF
24211 #define snprintf _snprintf
24212 EOF
24213
24214
24215 else
24216   echo "$ac_t""no" 1>&6
24217 fi
24218
24219
24220 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24221 echo "configure:24222: checking for _vsnprintf" >&5
24222 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24223   echo $ac_n "(cached) $ac_c" 1>&6
24224 else
24225   cat > conftest.$ac_ext <<EOF
24226 #line 24227 "configure"
24227 #include "confdefs.h"
24228 /* System header to define __stub macros and hopefully few prototypes,
24229     which can conflict with char _vsnprintf(); below.  */
24230 #include <assert.h>
24231 /* Override any gcc2 internal prototype to avoid an error.  */
24232 /* We use char because int might match the return type of a gcc2
24233     builtin and then its argument prototype would still apply.  */
24234 char _vsnprintf();
24235 char (*f)();
24236
24237 int main() {
24238
24239 /* The GNU C library defines this for functions which it implements
24240     to always fail with ENOSYS.  Some functions are actually named
24241     something starting with __ and the normal name is an alias.  */
24242 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24243 choke me
24244 #else
24245 f = _vsnprintf;
24246 #endif
24247
24248 ; return 0; }
24249 EOF
24250 if { (eval echo configure:24251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24251   rm -rf conftest*
24252   eval "ac_cv_func__vsnprintf=yes"
24253 else
24254   echo "configure: failed program was:" >&5
24255   cat conftest.$ac_ext >&5
24256   rm -rf conftest*
24257   eval "ac_cv_func__vsnprintf=no"
24258 fi
24259 rm -f conftest*
24260 fi
24261
24262 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24263   echo "$ac_t""yes" 1>&6
24264   ac_cv_func_vsnprintf=yes
24265         cat >> confdefs.h <<\EOF
24266 #define vsnprintf _vsnprintf
24267 EOF
24268
24269
24270 else
24271   echo "$ac_t""no" 1>&6
24272 fi
24273
24274
24275 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24276 echo "configure:24277: checking for vprintf" >&5
24277 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24278   echo $ac_n "(cached) $ac_c" 1>&6
24279 else
24280   cat > conftest.$ac_ext <<EOF
24281 #line 24282 "configure"
24282 #include "confdefs.h"
24283 /* System header to define __stub macros and hopefully few prototypes,
24284     which can conflict with char vprintf(); below.  */
24285 #include <assert.h>
24286 /* Override any gcc2 internal prototype to avoid an error.  */
24287 /* We use char because int might match the return type of a gcc2
24288     builtin and then its argument prototype would still apply.  */
24289 char vprintf();
24290 char (*f)();
24291
24292 int main() {
24293
24294 /* The GNU C library defines this for functions which it implements
24295     to always fail with ENOSYS.  Some functions are actually named
24296     something starting with __ and the normal name is an alias.  */
24297 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24298 choke me
24299 #else
24300 f = vprintf;
24301 #endif
24302
24303 ; return 0; }
24304 EOF
24305 if { (eval echo configure:24306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24306   rm -rf conftest*
24307   eval "ac_cv_func_vprintf=yes"
24308 else
24309   echo "configure: failed program was:" >&5
24310   cat conftest.$ac_ext >&5
24311   rm -rf conftest*
24312   eval "ac_cv_func_vprintf=no"
24313 fi
24314 rm -f conftest*
24315 fi
24316
24317 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24318   echo "$ac_t""yes" 1>&6
24319   cat >> confdefs.h <<\EOF
24320 #define HAVE_VPRINTF 1
24321 EOF
24322
24323 else
24324   echo "$ac_t""no" 1>&6
24325 fi
24326
24327 if test "$ac_cv_func_vprintf" != yes; then
24328 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24329 echo "configure:24330: checking for _doprnt" >&5
24330 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24331   echo $ac_n "(cached) $ac_c" 1>&6
24332 else
24333   cat > conftest.$ac_ext <<EOF
24334 #line 24335 "configure"
24335 #include "confdefs.h"
24336 /* System header to define __stub macros and hopefully few prototypes,
24337     which can conflict with char _doprnt(); below.  */
24338 #include <assert.h>
24339 /* Override any gcc2 internal prototype to avoid an error.  */
24340 /* We use char because int might match the return type of a gcc2
24341     builtin and then its argument prototype would still apply.  */
24342 char _doprnt();
24343 char (*f)();
24344
24345 int main() {
24346
24347 /* The GNU C library defines this for functions which it implements
24348     to always fail with ENOSYS.  Some functions are actually named
24349     something starting with __ and the normal name is an alias.  */
24350 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24351 choke me
24352 #else
24353 f = _doprnt;
24354 #endif
24355
24356 ; return 0; }
24357 EOF
24358 if { (eval echo configure:24359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24359   rm -rf conftest*
24360   eval "ac_cv_func__doprnt=yes"
24361 else
24362   echo "configure: failed program was:" >&5
24363   cat conftest.$ac_ext >&5
24364   rm -rf conftest*
24365   eval "ac_cv_func__doprnt=no"
24366 fi
24367 rm -f conftest*
24368 fi
24369
24370 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24371   echo "$ac_t""yes" 1>&6
24372   cat >> confdefs.h <<\EOF
24373 #define HAVE_DOPRNT 1
24374 EOF
24375
24376 else
24377   echo "$ac_t""no" 1>&6
24378 fi
24379
24380 fi
24381
24382
24383 if test $ac_cv_func_vprintf = yes ; then
24384                 for ac_func in snprintf vsnprintf
24385 do
24386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24387 echo "configure:24388: checking for $ac_func" >&5
24388 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24389   echo $ac_n "(cached) $ac_c" 1>&6
24390 else
24391   cat > conftest.$ac_ext <<EOF
24392 #line 24393 "configure"
24393 #include "confdefs.h"
24394 /* System header to define __stub macros and hopefully few prototypes,
24395     which can conflict with char $ac_func(); below.  */
24396 #include <assert.h>
24397 /* Override any gcc2 internal prototype to avoid an error.  */
24398 /* We use char because int might match the return type of a gcc2
24399     builtin and then its argument prototype would still apply.  */
24400 char $ac_func();
24401 char (*f)();
24402
24403 int main() {
24404
24405 /* The GNU C library defines this for functions which it implements
24406     to always fail with ENOSYS.  Some functions are actually named
24407     something starting with __ and the normal name is an alias.  */
24408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24409 choke me
24410 #else
24411 f = $ac_func;
24412 #endif
24413
24414 ; return 0; }
24415 EOF
24416 if { (eval echo configure:24417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24417   rm -rf conftest*
24418   eval "ac_cv_func_$ac_func=yes"
24419 else
24420   echo "configure: failed program was:" >&5
24421   cat conftest.$ac_ext >&5
24422   rm -rf conftest*
24423   eval "ac_cv_func_$ac_func=no"
24424 fi
24425 rm -f conftest*
24426 fi
24427
24428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24429   echo "$ac_t""yes" 1>&6
24430     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24431   cat >> confdefs.h <<EOF
24432 #define $ac_tr_func 1
24433 EOF
24434  
24435 else
24436   echo "$ac_t""no" 1>&6
24437 fi
24438 done
24439
24440 fi
24441
24442 for ac_func in \
24443         bcopy                   \
24444         closesocket             \
24445         chroot                  \
24446         endgrent                \
24447         endpwent                \
24448         fcntl                   \
24449         flock                   \
24450         fstat                   \
24451         getdtablesize   \
24452         getgrgid                \
24453         gethostname             \
24454         getpass                 \
24455         getpassphrase   \
24456         getpwuid                \
24457         getpwnam                \
24458         getspnam                \
24459         gettimeofday    \
24460         initgroups              \
24461         lockf                   \
24462         memcpy                  \
24463         memmove                 \
24464         mkstemp                 \
24465         mktemp                  \
24466         pipe                    \
24467         read                    \
24468         recv                    \
24469         recvfrom                \
24470         setpwfile               \
24471         setgid                  \
24472         setegid                 \
24473         setsid                  \
24474         setuid                  \
24475         seteuid                 \
24476         signal                  \
24477         strdup                  \
24478         strpbrk                 \
24479         strrchr                 \
24480         strsep                  \
24481         strstr                  \
24482         strtol                  \
24483         strtoul                 \
24484         strtoq                  \
24485         strtouq                 \
24486         strtoll                 \
24487         strspn                  \
24488         sysconf                 \
24489         usleep                  \
24490         waitpid                 \
24491         wait4                   \
24492         write                   \
24493         send                    \
24494         sendmsg                 \
24495         sendto                  \
24496
24497 do
24498 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24499 echo "configure:24500: checking for $ac_func" >&5
24500 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24501   echo $ac_n "(cached) $ac_c" 1>&6
24502 else
24503   cat > conftest.$ac_ext <<EOF
24504 #line 24505 "configure"
24505 #include "confdefs.h"
24506 /* System header to define __stub macros and hopefully few prototypes,
24507     which can conflict with char $ac_func(); below.  */
24508 #include <assert.h>
24509 /* Override any gcc2 internal prototype to avoid an error.  */
24510 /* We use char because int might match the return type of a gcc2
24511     builtin and then its argument prototype would still apply.  */
24512 char $ac_func();
24513 char (*f)();
24514
24515 int main() {
24516
24517 /* The GNU C library defines this for functions which it implements
24518     to always fail with ENOSYS.  Some functions are actually named
24519     something starting with __ and the normal name is an alias.  */
24520 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24521 choke me
24522 #else
24523 f = $ac_func;
24524 #endif
24525
24526 ; return 0; }
24527 EOF
24528 if { (eval echo configure:24529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24529   rm -rf conftest*
24530   eval "ac_cv_func_$ac_func=yes"
24531 else
24532   echo "configure: failed program was:" >&5
24533   cat conftest.$ac_ext >&5
24534   rm -rf conftest*
24535   eval "ac_cv_func_$ac_func=no"
24536 fi
24537 rm -f conftest*
24538 fi
24539
24540 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24541   echo "$ac_t""yes" 1>&6
24542     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24543   cat >> confdefs.h <<EOF
24544 #define $ac_tr_func 1
24545 EOF
24546  
24547 else
24548   echo "$ac_t""no" 1>&6
24549 fi
24550 done
24551
24552
24553 for ac_func in getopt getpeereid
24554 do
24555 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24556 echo "configure:24557: checking for $ac_func" >&5
24557 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24558   echo $ac_n "(cached) $ac_c" 1>&6
24559 else
24560   cat > conftest.$ac_ext <<EOF
24561 #line 24562 "configure"
24562 #include "confdefs.h"
24563 /* System header to define __stub macros and hopefully few prototypes,
24564     which can conflict with char $ac_func(); below.  */
24565 #include <assert.h>
24566 /* Override any gcc2 internal prototype to avoid an error.  */
24567 /* We use char because int might match the return type of a gcc2
24568     builtin and then its argument prototype would still apply.  */
24569 char $ac_func();
24570 char (*f)();
24571
24572 int main() {
24573
24574 /* The GNU C library defines this for functions which it implements
24575     to always fail with ENOSYS.  Some functions are actually named
24576     something starting with __ and the normal name is an alias.  */
24577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24578 choke me
24579 #else
24580 f = $ac_func;
24581 #endif
24582
24583 ; return 0; }
24584 EOF
24585 if { (eval echo configure:24586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24586   rm -rf conftest*
24587   eval "ac_cv_func_$ac_func=yes"
24588 else
24589   echo "configure: failed program was:" >&5
24590   cat conftest.$ac_ext >&5
24591   rm -rf conftest*
24592   eval "ac_cv_func_$ac_func=no"
24593 fi
24594 rm -f conftest*
24595 fi
24596
24597 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24598   echo "$ac_t""yes" 1>&6
24599     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24600   cat >> confdefs.h <<EOF
24601 #define $ac_tr_func 1
24602 EOF
24603  
24604 else
24605   echo "$ac_t""no" 1>&6
24606 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24607 fi
24608 done
24609
24610
24611
24612 if test "$ac_cv_func_getopt" != yes; then
24613         LIBSRCS="$LIBSRCS getopt.c"
24614 fi
24615 if test "$ac_cv_func_getpeereid" != yes; then
24616         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24617 echo "configure:24618: checking for msg_accrights in msghdr" >&5
24618 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
24619   echo $ac_n "(cached) $ac_c" 1>&6
24620 else
24621   cat > conftest.$ac_ext <<EOF
24622 #line 24623 "configure"
24623 #include "confdefs.h"
24624 #include <sys/socket.h>
24625 int main() {
24626 struct msghdr m; m.msg_accrightslen=0
24627 ; return 0; }
24628 EOF
24629 if { (eval echo configure:24630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24630   rm -rf conftest*
24631   ol_cv_msghdr_msg_accrights=yes
24632 else
24633   echo "configure: failed program was:" >&5
24634   cat conftest.$ac_ext >&5
24635   rm -rf conftest*
24636   ol_cv_msghdr_msg_accrights=no
24637 fi
24638 rm -f conftest*
24639         
24640 fi
24641
24642 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24643   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24644         cat >> confdefs.h <<\EOF
24645 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24646 EOF
24647
24648   fi
24649
24650         if test "$ac_cv_func_getpeereid" != yes; then
24651                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24652 echo "configure:24653: checking for msg_control in msghdr" >&5
24653 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24654   echo $ac_n "(cached) $ac_c" 1>&6
24655 else
24656   cat > conftest.$ac_ext <<EOF
24657 #line 24658 "configure"
24658 #include "confdefs.h"
24659 #include <sys/socket.h>
24660 int main() {
24661 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24662 ; return 0; }
24663 EOF
24664 if { (eval echo configure:24665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24665   rm -rf conftest*
24666   ol_cv_msghdr_msg_control=yes
24667 else
24668   echo "configure: failed program was:" >&5
24669   cat conftest.$ac_ext >&5
24670   rm -rf conftest*
24671   ol_cv_msghdr_msg_control=no
24672 fi
24673 rm -f conftest*
24674         
24675 fi
24676
24677 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24678   if test $ol_cv_msghdr_msg_control = "yes" ; then
24679         cat >> confdefs.h <<\EOF
24680 #define HAVE_MSGHDR_MSG_CONTROL 1
24681 EOF
24682
24683   fi
24684
24685         fi
24686         LIBSRCS="$LIBSRCS getpeereid.c"
24687 fi
24688 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24689         if test "$ac_cv_func_snprintf" != yes; then
24690                 cat >> confdefs.h <<\EOF
24691 #define snprintf ber_pvt_snprintf
24692 EOF
24693
24694         fi
24695         if test "$ac_cv_func_vsnprintf" != yes; then
24696                 cat >> confdefs.h <<\EOF
24697 #define vsnprintf ber_pvt_vsnprintf
24698 EOF
24699
24700         fi
24701 fi
24702
24703
24704 if test "$ol_enable_slapi" != no ; then
24705                         for ac_hdr in ltdl.h
24706 do
24707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24709 echo "configure:24710: checking for $ac_hdr" >&5
24710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24711   echo $ac_n "(cached) $ac_c" 1>&6
24712 else
24713   cat > conftest.$ac_ext <<EOF
24714 #line 24715 "configure"
24715 #include "confdefs.h"
24716 #include <$ac_hdr>
24717 EOF
24718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24719 { (eval echo configure:24720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24721 if test -z "$ac_err"; then
24722   rm -rf conftest*
24723   eval "ac_cv_header_$ac_safe=yes"
24724 else
24725   echo "$ac_err" >&5
24726   echo "configure: failed program was:" >&5
24727   cat conftest.$ac_ext >&5
24728   rm -rf conftest*
24729   eval "ac_cv_header_$ac_safe=no"
24730 fi
24731 rm -f conftest*
24732 fi
24733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24734   echo "$ac_t""yes" 1>&6
24735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24736   cat >> confdefs.h <<EOF
24737 #define $ac_tr_hdr 1
24738 EOF
24739  
24740 else
24741   echo "$ac_t""no" 1>&6
24742 fi
24743 done
24744
24745
24746         if test $ac_cv_header_ltdl_h != yes ; then
24747                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24748         fi
24749         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24750 echo "configure:24751: checking for lt_dlinit in -lltdl" >&5
24751 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24753   echo $ac_n "(cached) $ac_c" 1>&6
24754 else
24755   ac_save_LIBS="$LIBS"
24756 LIBS="-lltdl  $LIBS"
24757 cat > conftest.$ac_ext <<EOF
24758 #line 24759 "configure"
24759 #include "confdefs.h"
24760 /* Override any gcc2 internal prototype to avoid an error.  */
24761 /* We use char because int might match the return type of a gcc2
24762     builtin and then its argument prototype would still apply.  */
24763 char lt_dlinit();
24764
24765 int main() {
24766 lt_dlinit()
24767 ; return 0; }
24768 EOF
24769 if { (eval echo configure:24770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24770   rm -rf conftest*
24771   eval "ac_cv_lib_$ac_lib_var=yes"
24772 else
24773   echo "configure: failed program was:" >&5
24774   cat conftest.$ac_ext >&5
24775   rm -rf conftest*
24776   eval "ac_cv_lib_$ac_lib_var=no"
24777 fi
24778 rm -f conftest*
24779 LIBS="$ac_save_LIBS"
24780
24781 fi
24782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24783   echo "$ac_t""yes" 1>&6
24784   
24785                 SLAPI_LIBS=-lltdl
24786                 LIBSLAPI=libslapi.a
24787                 LIBSLAPITOOLS=../libslapi.a
24788                 cat >> confdefs.h <<\EOF
24789 #define HAVE_LIBLTDL 1
24790 EOF
24791
24792         
24793 else
24794   echo "$ac_t""no" 1>&6
24795 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24796 fi
24797
24798
24799         cat >> confdefs.h <<\EOF
24800 #define LDAP_SLAPI 1
24801 EOF
24802
24803 fi
24804
24805 if test "$ol_enable_debug" != no ; then
24806         cat >> confdefs.h <<\EOF
24807 #define LDAP_DEBUG 1
24808 EOF
24809
24810 fi
24811 if test "$ol_enable_syslog" = yes ; then
24812         cat >> confdefs.h <<\EOF
24813 #define LDAP_SYSLOG 1
24814 EOF
24815
24816 fi
24817 if test "$ol_link_kbind" != no ; then
24818         cat >> confdefs.h <<\EOF
24819 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24820 EOF
24821
24822 fi
24823 if test "$ol_enable_proctitle" != no ; then
24824         cat >> confdefs.h <<\EOF
24825 #define LDAP_PROCTITLE 1
24826 EOF
24827
24828 fi
24829 if test "$ol_enable_referrals" != no ; then
24830         cat >> confdefs.h <<\EOF
24831 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24832 EOF
24833
24834 fi
24835 if test "$ol_enable_local" != no; then
24836         cat >> confdefs.h <<\EOF
24837 #define LDAP_PF_LOCAL 1
24838 EOF
24839
24840 fi
24841 if test "$ol_link_ipv6" != no; then
24842         cat >> confdefs.h <<\EOF
24843 #define LDAP_PF_INET6 1
24844 EOF
24845
24846 fi
24847 if test "$ol_enable_cleartext" != no ; then
24848         cat >> confdefs.h <<\EOF
24849 #define SLAPD_CLEARTEXT 1
24850 EOF
24851
24852 fi
24853 if test "$ol_enable_crypt" != no ; then
24854         cat >> confdefs.h <<\EOF
24855 #define SLAPD_CRYPT 1
24856 EOF
24857
24858 fi
24859 if test "$ol_link_spasswd" != no ; then
24860         cat >> confdefs.h <<\EOF
24861 #define SLAPD_SPASSWD 1
24862 EOF
24863
24864 fi
24865 if test "$ol_enable_multimaster" != no ; then
24866         cat >> confdefs.h <<\EOF
24867 #define SLAPD_MULTIMASTER 1
24868 EOF
24869
24870 fi
24871 if test "$ol_enable_rlookups" != no ; then
24872         cat >> confdefs.h <<\EOF
24873 #define SLAPD_RLOOKUPS 1
24874 EOF
24875
24876 fi
24877 if test "$ol_enable_aci" != no ; then
24878         cat >> confdefs.h <<\EOF
24879 #define SLAPD_ACI_ENABLED 1
24880 EOF
24881
24882 fi
24883
24884 if test "$ol_link_modules" != no ; then
24885         cat >> confdefs.h <<\EOF
24886 #define SLAPD_MODULES 1
24887 EOF
24888
24889         BUILD_SLAPD=yes
24890         SLAPD_MODULES_LDFLAGS="-dlopen self"
24891 fi
24892
24893 cat >> confdefs.h <<\EOF
24894 #define SLAPD_MOD_STATIC 1
24895 EOF
24896
24897 cat >> confdefs.h <<\EOF
24898 #define SLAPD_MOD_DYNAMIC 2
24899 EOF
24900
24901
24902 if test "$ol_enable_bdb" != no ; then
24903         BUILD_SLAPD=yes
24904         BUILD_BDB=$ol_enable_bdb
24905         if test "$ol_enable_bdb" = mod ; then
24906                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24907                 MFLAG=SLAPD_MOD_DYNAMIC
24908         else
24909                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24910                 MFLAG=SLAPD_MOD_STATIC
24911         fi
24912         cat >> confdefs.h <<EOF
24913 #define SLAPD_BDB $MFLAG
24914 EOF
24915
24916 fi
24917
24918 if test "$ol_enable_dnssrv" != no ; then
24919         BUILD_SLAPD=yes
24920         BUILD_DNSSRV=$ol_enable_dnssrv
24921         if test "$ol_enable_dnssrv" = mod ; then
24922                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24923                 MFLAG=SLAPD_MOD_DYNAMIC
24924         else
24925                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24926                 MFLAG=SLAPD_MOD_STATIC
24927         fi
24928         cat >> confdefs.h <<EOF
24929 #define SLAPD_DNSSRV $MFLAG
24930 EOF
24931
24932 fi
24933
24934 if test "$ol_enable_hdb" != no ; then
24935         BUILD_SLAPD=yes
24936         BUILD_HDB=$ol_enable_hdb
24937         if test "$ol_enable_hdb" = mod ; then
24938                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24939                 MFLAG=SLAPD_MOD_DYNAMIC
24940         else
24941                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24942                 MFLAG=SLAPD_MOD_STATIC
24943         fi
24944         cat >> confdefs.h <<EOF
24945 #define SLAPD_HDB $MFLAG
24946 EOF
24947
24948 fi
24949
24950 if test "$ol_enable_ldap" != no ; then
24951         BUILD_SLAPD=yes
24952         BUILD_LDAP=$ol_enable_ldap
24953         if test "$ol_enable_ldap" = mod ; then
24954                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24955                 MFLAG=SLAPD_MOD_DYNAMIC
24956         else
24957                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24958                 MFLAG=SLAPD_MOD_STATIC
24959         fi
24960         cat >> confdefs.h <<EOF
24961 #define SLAPD_LDAP $MFLAG
24962 EOF
24963
24964 fi
24965
24966 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24967         BUILD_SLAPD=yes
24968         BUILD_LDBM=$ol_enable_ldbm
24969         if test "$ol_enable_ldbm" = mod ; then
24970                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24971                 MFLAG=SLAPD_MOD_DYNAMIC
24972         else
24973                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24974                 MFLAG=SLAPD_MOD_STATIC
24975         fi
24976         cat >> confdefs.h <<EOF
24977 #define SLAPD_LDBM $MFLAG
24978 EOF
24979
24980 fi
24981
24982 if test "$ol_enable_meta" != no ; then
24983         BUILD_SLAPD=yes
24984         BUILD_META=$ol_enable_meta
24985         BUILD_REWRITE=yes
24986         if test "$ol_enable_meta" = mod ; then
24987                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24988                 MFLAG=SLAPD_MOD_DYNAMIC
24989         else
24990                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24991                 MFLAG=SLAPD_MOD_STATIC
24992         fi
24993         cat >> confdefs.h <<EOF
24994 #define SLAPD_META $MFLAG
24995 EOF
24996
24997 fi
24998
24999 if test "$ol_enable_monitor" != no ; then
25000         BUILD_SLAPD=yes
25001         BUILD_MONITOR=$ol_enable_monitor
25002         if test "$ol_enable_monitor" = mod ; then
25003                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25004                 MFLAG=SLAPD_MOD_DYNAMIC
25005         else
25006                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25007                 MFLAG=SLAPD_MOD_STATIC
25008         fi
25009         cat >> confdefs.h <<EOF
25010 #define SLAPD_MONITOR $MFLAG
25011 EOF
25012
25013 fi
25014
25015 if test "$ol_enable_null" != no ; then
25016         BUILD_SLAPD=yes
25017         BUILD_NULL=$ol_enable_null
25018         if test "$ol_enable_null" = mod ; then
25019                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25020                 MFLAG=SLAPD_MOD_DYNAMIC
25021         else
25022                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25023                 MFLAG=SLAPD_MOD_STATIC
25024         fi
25025         cat >> confdefs.h <<EOF
25026 #define SLAPD_NULL $MFLAG
25027 EOF
25028
25029 fi
25030
25031 if test "$ol_enable_passwd" != no ; then
25032         BUILD_SLAPD=yes
25033         BUILD_PASSWD=$ol_enable_passwd
25034         if test "$ol_enable_passwd" = mod ; then
25035                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25036                 MFLAG=SLAPD_MOD_DYNAMIC
25037         else
25038                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25039                 MFLAG=SLAPD_MOD_STATIC
25040         fi
25041         cat >> confdefs.h <<EOF
25042 #define SLAPD_PASSWD $MFLAG
25043 EOF
25044
25045 fi
25046
25047 if test "$ol_link_perl" != no ; then
25048         BUILD_SLAPD=yes
25049         BUILD_PERL=$ol_enable_perl
25050         if test "$ol_enable_perl" = mod ; then
25051                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25052                 MFLAG=SLAPD_MOD_DYNAMIC
25053         else
25054                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25055                 MFLAG=SLAPD_MOD_STATIC
25056         fi
25057         cat >> confdefs.h <<EOF
25058 #define SLAPD_PERL $MFLAG
25059 EOF
25060
25061 fi
25062
25063 if test "$ol_enable_relay" != no ; then
25064         BUILD_SLAPD=yes
25065         BUILD_RELAY=$ol_enable_relay
25066         if test "$ol_enable_relay" = mod ; then
25067                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25068                 MFLAG=SLAPD_MOD_DYNAMIC
25069         else
25070                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25071                 MFLAG=SLAPD_MOD_STATIC
25072         fi
25073         cat >> confdefs.h <<EOF
25074 #define SLAPD_RELAY $MFLAG
25075 EOF
25076
25077 fi
25078
25079 if test "$ol_enable_shell" != no ; then
25080         if test "$ol_link_threads" != no ; then
25081                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25082         fi
25083         BUILD_SLAPD=yes
25084         BUILD_SHELL=$ol_enable_shell
25085         if test "$ol_enable_shell" = mod ; then
25086                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25087                 MFLAG=SLAPD_MOD_DYNAMIC
25088         else
25089                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25090                 MFLAG=SLAPD_MOD_STATIC
25091         fi
25092         cat >> confdefs.h <<EOF
25093 #define SLAPD_SHELL $MFLAG
25094 EOF
25095
25096 fi
25097
25098 if test "$ol_link_sql" != no ; then
25099         BUILD_SLAPD=yes
25100         BUILD_SQL=$ol_enable_sql
25101         if test "$ol_enable_sql" = mod; then
25102                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25103                 MFLAG=SLAPD_MOD_DYNAMIC
25104         else
25105                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25106                 MFLAG=SLAPD_MOD_STATIC
25107         fi
25108         cat >> confdefs.h <<EOF
25109 #define SLAPD_SQL $MFLAG
25110 EOF
25111
25112 fi
25113
25114 if test "$ol_enable_accesslog" != no ; then
25115         BUILD_ACCESSLOG=$ol_enable_accesslog
25116         if test "$ol_enable_accesslog" = mod ; then
25117                 MFLAG=SLAPD_MOD_DYNAMIC
25118                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
25119         else
25120                 MFLAG=SLAPD_MOD_STATIC
25121                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
25122         fi
25123         cat >> confdefs.h <<EOF
25124 #define SLAPD_OVER_ACCESSLOG $MFLAG
25125 EOF
25126
25127 fi
25128
25129 if test "$ol_enable_denyop" != no ; then
25130         BUILD_DENYOP=$ol_enable_denyop
25131         if test "$ol_enable_denyop" = mod ; then
25132                 MFLAG=SLAPD_MOD_DYNAMIC
25133                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25134         else
25135                 MFLAG=SLAPD_MOD_STATIC
25136                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25137         fi
25138         cat >> confdefs.h <<EOF
25139 #define SLAPD_OVER_DENYOP $MFLAG
25140 EOF
25141
25142 fi
25143
25144 if test "$ol_enable_dyngroup" != no ; then
25145         BUILD_DYNGROUP=$ol_enable_dyngroup
25146         if test "$ol_enable_dyngroup" = mod ; then
25147                 MFLAG=SLAPD_MOD_DYNAMIC
25148                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25149         else
25150                 MFLAG=SLAPD_MOD_STATIC
25151                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25152         fi
25153         cat >> confdefs.h <<EOF
25154 #define SLAPD_OVER_DYNGROUP $MFLAG
25155 EOF
25156
25157 fi
25158
25159 if test "$ol_enable_dynlist" != no ; then
25160         BUILD_DYNLIST=$ol_enable_dynlist
25161         if test "$ol_enable_dynlist" = mod ; then
25162                 MFLAG=SLAPD_MOD_DYNAMIC
25163                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25164         else
25165                 MFLAG=SLAPD_MOD_STATIC
25166                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25167         fi
25168         cat >> confdefs.h <<EOF
25169 #define SLAPD_OVER_DYNLIST $MFLAG
25170 EOF
25171
25172 fi
25173
25174 if test "$ol_enable_glue" != no ; then
25175         BUILD_GLUE=$ol_enable_glue
25176         if test "$ol_enable_glue" = mod ; then
25177                 MFLAG=SLAPD_MOD_DYNAMIC
25178                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25179         else
25180                 MFLAG=SLAPD_MOD_STATIC
25181                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25182         fi
25183         cat >> confdefs.h <<EOF
25184 #define SLAPD_OVER_GLUE $MFLAG
25185 EOF
25186
25187 fi
25188
25189 if test "$ol_enable_lastmod" != no ; then
25190         BUILD_LASTMOD=$ol_enable_lastmod
25191         if test "$ol_enable_lastmod" = mod ; then
25192                 MFLAG=SLAPD_MOD_DYNAMIC
25193                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25194         else
25195                 MFLAG=SLAPD_MOD_STATIC
25196                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25197         fi
25198         cat >> confdefs.h <<EOF
25199 #define SLAPD_OVER_LASTMOD $MFLAG
25200 EOF
25201
25202 fi
25203
25204 if test "$ol_enable_ppolicy" != no ; then
25205         BUILD_PPOLICY=$ol_enable_ppolicy
25206         if test "$ol_enable_ppolicy" = mod ; then
25207                 MFLAG=SLAPD_MOD_DYNAMIC
25208                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25209         else
25210                 MFLAG=SLAPD_MOD_STATIC
25211                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25212         fi
25213         cat >> confdefs.h <<EOF
25214 #define SLAPD_OVER_PPOLICY $MFLAG
25215 EOF
25216
25217 fi
25218
25219 if test "$ol_enable_proxycache" != no ; then
25220         BUILD_PROXYCACHE=$ol_enable_proxycache
25221         if test "$ol_enable_proxycache" = mod ; then
25222                 MFLAG=SLAPD_MOD_DYNAMIC
25223                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25224         else
25225                 MFLAG=SLAPD_MOD_STATIC
25226                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25227         fi
25228         cat >> confdefs.h <<EOF
25229 #define SLAPD_OVER_PROXYCACHE $MFLAG
25230 EOF
25231
25232 fi
25233
25234 if test "$ol_enable_refint" != no ; then
25235         BUILD_REFINT=$ol_enable_refint
25236         if test "$ol_enable_refint" = mod ; then
25237                 MFLAG=SLAPD_MOD_DYNAMIC
25238                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25239         else
25240                 MFLAG=SLAPD_MOD_STATIC
25241                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25242         fi
25243         cat >> confdefs.h <<EOF
25244 #define SLAPD_OVER_REFINT $MFLAG
25245 EOF
25246
25247 fi
25248
25249 if test "$ol_enable_retcode" != no ; then
25250         BUILD_RETCODE=$ol_enable_retcode
25251         if test "$ol_enable_retcode" = mod ; then
25252                 MFLAG=SLAPD_MOD_DYNAMIC
25253                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
25254         else
25255                 MFLAG=SLAPD_MOD_STATIC
25256                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
25257         fi
25258         cat >> confdefs.h <<EOF
25259 #define SLAPD_OVER_RETCODE $MFLAG
25260 EOF
25261
25262 fi
25263
25264 if test "$ol_enable_rwm" != no ; then
25265         BUILD_REWRITE=yes
25266         BUILD_RWM=$ol_enable_rwm
25267         if test "$ol_enable_rwm" = mod ; then
25268                 MFLAG=SLAPD_MOD_DYNAMIC
25269                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25270         else
25271                 MFLAG=SLAPD_MOD_STATIC
25272                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25273         fi
25274         cat >> confdefs.h <<EOF
25275 #define SLAPD_OVER_RWM $MFLAG
25276 EOF
25277
25278 fi
25279
25280 if test "$ol_enable_syncprov" != no ; then
25281         BUILD_SYNCPROV=$ol_enable_syncprov
25282         if test "$ol_enable_syncprov" = mod ; then
25283                 MFLAG=SLAPD_MOD_DYNAMIC
25284                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25285         else
25286                 MFLAG=SLAPD_MOD_STATIC
25287                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25288         fi
25289         cat >> confdefs.h <<EOF
25290 #define SLAPD_OVER_SYNCPROV $MFLAG
25291 EOF
25292
25293 fi
25294
25295 if test "$ol_enable_translucent" != no ; then
25296         BUILD_TRANSLUCENT=$ol_enable_translucent
25297         if test "$ol_enable_translucent" = mod ; then
25298                 MFLAG=SLAPD_MOD_DYNAMIC
25299                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25300         else
25301                 MFLAG=SLAPD_MOD_STATIC
25302                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25303         fi
25304         cat >> confdefs.h <<EOF
25305 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25306 EOF
25307
25308 fi
25309
25310 if test "$ol_enable_unique" != no ; then
25311         BUILD_UNIQUE=$ol_enable_unique
25312         if test "$ol_enable_unique" = mod ; then
25313                 MFLAG=SLAPD_MOD_DYNAMIC
25314                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25315         else
25316                 MFLAG=SLAPD_MOD_STATIC
25317                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25318         fi
25319         cat >> confdefs.h <<EOF
25320 #define SLAPD_OVER_UNIQUE $MFLAG
25321 EOF
25322
25323 fi
25324
25325 if test "$ol_enable_valsort" != no ; then
25326         BUILD_VALSORT=$ol_enable_valsort
25327         if test "$ol_enable_valsort" = mod ; then
25328                 MFLAG=SLAPD_MOD_DYNAMIC
25329                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
25330         else
25331                 MFLAG=SLAPD_MOD_STATIC
25332                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
25333         fi
25334         cat >> confdefs.h <<EOF
25335 #define SLAPD_OVER_VALSORT $MFLAG
25336 EOF
25337
25338 fi
25339
25340 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25341         $BUILD_SLAPD = yes ; then
25342         BUILD_SLURPD=yes
25343 fi
25344
25345 if test "$ol_enable_rewrite" != no ; then
25346         cat >> confdefs.h <<\EOF
25347 #define ENABLE_REWRITE 1
25348 EOF
25349
25350         BUILD_REWRITE=yes
25351 fi
25352
25353 if test "$ol_enable_slapi" != no ; then
25354         cat >> confdefs.h <<\EOF
25355 #define ENABLE_SLAPI 1
25356 EOF
25357
25358         BUILD_SLAPI=yes
25359         SLAPD_SLAPI_DEPEND=libslapi.a
25360 fi
25361
25362
25363
25364 if test "$ac_cv_mingw32" = yes ; then
25365         PLAT=NT
25366         SLAPD_MODULES_LDFLAGS=
25367 else
25368         PLAT=UNIX
25369 fi
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
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449 # Check whether --with-xxinstall or --without-xxinstall was given.
25450 if test "${with_xxinstall+set}" = set; then
25451   withval="$with_xxinstall"
25452   :
25453 fi
25454
25455
25456
25457 trap '' 1 2 15
25458
25459 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25460
25461 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25462 # Let make expand exec_prefix.
25463 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25464
25465 # Any assignment to VPATH causes Sun make to only execute
25466 # the first set of double-colon rules, so remove it if not needed.
25467 # If there is a colon in the path, we need to keep it.
25468 if test "x$srcdir" = x.; then
25469   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25470 fi
25471
25472 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25473
25474 DEFS=-DHAVE_CONFIG_H
25475
25476 # Without the "./", some shells look in PATH for config.status.
25477 : ${CONFIG_STATUS=./config.status}
25478
25479 echo creating $CONFIG_STATUS
25480 rm -f $CONFIG_STATUS
25481 cat > $CONFIG_STATUS <<EOF
25482 #! /bin/sh
25483 # Generated automatically by configure.
25484 # Run this file to recreate the current configuration.
25485 # This directory was configured as follows,
25486 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25487 #
25488 # $0 $ac_configure_args
25489 #
25490 # Compiler output produced by configure, useful for debugging
25491 # configure, is in ./config.log if it exists.
25492
25493 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25494 for ac_option
25495 do
25496   case "\$ac_option" in
25497   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25498     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25499     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25500   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25501     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25502     exit 0 ;;
25503   -help | --help | --hel | --he | --h)
25504     echo "\$ac_cs_usage"; exit 0 ;;
25505   *) echo "\$ac_cs_usage"; exit 1 ;;
25506   esac
25507 done
25508
25509 ac_given_srcdir=$srcdir
25510 ac_given_INSTALL="$INSTALL"
25511
25512 trap 'rm -fr `echo "\
25513 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25514 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25515 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25516 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25517 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25518 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25519 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25520 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25521 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25522 include/Makefile:build/top.mk:include/Makefile.in \
25523 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25524 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25525 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25526 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25527 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25528 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25529 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25530 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25531 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25532 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25533 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25534 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25535 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25536 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25537 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25538 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25539 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25540 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25541 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25542 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25543 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25544 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25545 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25546 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25547 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25548 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25549 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25550 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25551 tests/run \
25552 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25553  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25554 EOF
25555 cat >> $CONFIG_STATUS <<EOF
25556
25557 # Protect against being on the right side of a sed subst in config.status.
25558 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25559  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25560 $ac_vpsub
25561 $extrasub
25562 s%@SHELL@%$SHELL%g
25563 s%@CFLAGS@%$CFLAGS%g
25564 s%@CPPFLAGS@%$CPPFLAGS%g
25565 s%@CXXFLAGS@%$CXXFLAGS%g
25566 s%@FFLAGS@%$FFLAGS%g
25567 s%@DEFS@%$DEFS%g
25568 s%@LDFLAGS@%$LDFLAGS%g
25569 s%@LIBS@%$LIBS%g
25570 s%@exec_prefix@%$exec_prefix%g
25571 s%@prefix@%$prefix%g
25572 s%@program_transform_name@%$program_transform_name%g
25573 s%@bindir@%$bindir%g
25574 s%@sbindir@%$sbindir%g
25575 s%@libexecdir@%$libexecdir%g
25576 s%@datadir@%$datadir%g
25577 s%@sysconfdir@%$sysconfdir%g
25578 s%@sharedstatedir@%$sharedstatedir%g
25579 s%@localstatedir@%$localstatedir%g
25580 s%@libdir@%$libdir%g
25581 s%@includedir@%$includedir%g
25582 s%@oldincludedir@%$oldincludedir%g
25583 s%@infodir@%$infodir%g
25584 s%@mandir@%$mandir%g
25585 s%@host@%$host%g
25586 s%@host_alias@%$host_alias%g
25587 s%@host_cpu@%$host_cpu%g
25588 s%@host_vendor@%$host_vendor%g
25589 s%@host_os@%$host_os%g
25590 s%@target@%$target%g
25591 s%@target_alias@%$target_alias%g
25592 s%@target_cpu@%$target_cpu%g
25593 s%@target_vendor@%$target_vendor%g
25594 s%@target_os@%$target_os%g
25595 s%@build@%$build%g
25596 s%@build_alias@%$build_alias%g
25597 s%@build_cpu@%$build_cpu%g
25598 s%@build_vendor@%$build_vendor%g
25599 s%@build_os@%$build_os%g
25600 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25601 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25602 s%@INSTALL_DATA@%$INSTALL_DATA%g
25603 s%@PACKAGE@%$PACKAGE%g
25604 s%@VERSION@%$VERSION%g
25605 s%@ACLOCAL@%$ACLOCAL%g
25606 s%@AUTOCONF@%$AUTOCONF%g
25607 s%@AUTOMAKE@%$AUTOMAKE%g
25608 s%@AUTOHEADER@%$AUTOHEADER%g
25609 s%@MAKEINFO@%$MAKEINFO%g
25610 s%@install_sh@%$install_sh%g
25611 s%@AMTAR@%$AMTAR%g
25612 s%@AWK@%$AWK%g
25613 s%@AMTARFLAGS@%$AMTARFLAGS%g
25614 s%@SET_MAKE@%$SET_MAKE%g
25615 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25616 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25617 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25618 s%@top_builddir@%$top_builddir%g
25619 s%@ldap_subdir@%$ldap_subdir%g
25620 s%@CC@%$CC%g
25621 s%@AR@%$AR%g
25622 s%@LN_S@%$LN_S%g
25623 s%@OBJEXT@%$OBJEXT%g
25624 s%@EXEEXT@%$EXEEXT%g
25625 s%@ECHO@%$ECHO%g
25626 s%@RANLIB@%$RANLIB%g
25627 s%@STRIP@%$STRIP%g
25628 s%@DLLTOOL@%$DLLTOOL%g
25629 s%@AS@%$AS%g
25630 s%@OBJDUMP@%$OBJDUMP%g
25631 s%@CPP@%$CPP%g
25632 s%@LIBTOOL@%$LIBTOOL%g
25633 s%@PERLBIN@%$PERLBIN%g
25634 s%@OL_MKDEP@%$OL_MKDEP%g
25635 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25636 s%@LTSTATIC@%$LTSTATIC%g
25637 s%@LIBOBJS@%$LIBOBJS%g
25638 s%@LIBSRCS@%$LIBSRCS%g
25639 s%@PLAT@%$PLAT%g
25640 s%@WITH_SASL@%$WITH_SASL%g
25641 s%@WITH_TLS@%$WITH_TLS%g
25642 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25643 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25644 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25645 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25646 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25647 s%@BUILD_BDB@%$BUILD_BDB%g
25648 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25649 s%@BUILD_HDB@%$BUILD_HDB%g
25650 s%@BUILD_LDAP@%$BUILD_LDAP%g
25651 s%@BUILD_LDBM@%$BUILD_LDBM%g
25652 s%@BUILD_META@%$BUILD_META%g
25653 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25654 s%@BUILD_NULL@%$BUILD_NULL%g
25655 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25656 s%@BUILD_RELAY@%$BUILD_RELAY%g
25657 s%@BUILD_PERL@%$BUILD_PERL%g
25658 s%@BUILD_SHELL@%$BUILD_SHELL%g
25659 s%@BUILD_SQL@%$BUILD_SQL%g
25660 s%@BUILD_ACCESSLOG@%$BUILD_ACCESSLOG%g
25661 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25662 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25663 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25664 s%@BUILD_GLUE@%$BUILD_GLUE%g
25665 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25666 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25667 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25668 s%@BUILD_REFINT@%$BUILD_REFINT%g
25669 s%@BUILD_RETCODE@%$BUILD_RETCODE%g
25670 s%@BUILD_RWM@%$BUILD_RWM%g
25671 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25672 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25673 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25674 s%@BUILD_VALSORT@%$BUILD_VALSORT%g
25675 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25676 s%@LDAP_LIBS@%$LDAP_LIBS%g
25677 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25678 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25679 s%@LDBM_LIBS@%$LDBM_LIBS%g
25680 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25681 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25682 s%@WRAP_LIBS@%$WRAP_LIBS%g
25683 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25684 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25685 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25686 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25687 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25688 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25689 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25690 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25691 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25692 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25693 s%@KRB4_LIBS@%$KRB4_LIBS%g
25694 s%@KRB5_LIBS@%$KRB5_LIBS%g
25695 s%@SASL_LIBS@%$SASL_LIBS%g
25696 s%@TLS_LIBS@%$TLS_LIBS%g
25697 s%@MODULES_LIBS@%$MODULES_LIBS%g
25698 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25699 s%@LIBSLAPI@%$LIBSLAPI%g
25700 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25701 s%@AUTH_LIBS@%$AUTH_LIBS%g
25702 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25703 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25704 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25705 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25706 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25707
25708 CEOF
25709 EOF
25710
25711 cat >> $CONFIG_STATUS <<\EOF
25712
25713 # Split the substitutions into bite-sized pieces for seds with
25714 # small command number limits, like on Digital OSF/1 and HP-UX.
25715 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25716 ac_file=1 # Number of current file.
25717 ac_beg=1 # First line for current file.
25718 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25719 ac_more_lines=:
25720 ac_sed_cmds=""
25721 while $ac_more_lines; do
25722   if test $ac_beg -gt 1; then
25723     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25724   else
25725     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25726   fi
25727   if test ! -s conftest.s$ac_file; then
25728     ac_more_lines=false
25729     rm -f conftest.s$ac_file
25730   else
25731     if test -z "$ac_sed_cmds"; then
25732       ac_sed_cmds="sed -f conftest.s$ac_file"
25733     else
25734       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25735     fi
25736     ac_file=`expr $ac_file + 1`
25737     ac_beg=$ac_end
25738     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25739   fi
25740 done
25741 if test -z "$ac_sed_cmds"; then
25742   ac_sed_cmds=cat
25743 fi
25744 EOF
25745
25746 cat >> $CONFIG_STATUS <<EOF
25747
25748 CONFIG_FILES=\${CONFIG_FILES-"\
25749 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25750 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25751 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25752 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25753 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25754 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25755 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25756 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25757 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25758 include/Makefile:build/top.mk:include/Makefile.in \
25759 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25760 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25761 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25762 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25763 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25764 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25765 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25766 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25767 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25768 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25769 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25770 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25771 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25772 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25773 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25774 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25775 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25776 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25777 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25778 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25779 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25780 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25781 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25782 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25783 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25784 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25785 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25786 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25787 tests/run \
25788 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25789 "}
25790 EOF
25791 cat >> $CONFIG_STATUS <<\EOF
25792 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25793   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25794   case "$ac_file" in
25795   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25796        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25797   *) ac_file_in="${ac_file}.in" ;;
25798   esac
25799
25800   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25801
25802   # Remove last slash and all that follows it.  Not all systems have dirname.
25803   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25804   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25805     # The file is in a subdirectory.
25806     test ! -d "$ac_dir" && mkdir "$ac_dir"
25807     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25808     # A "../" for each directory in $ac_dir_suffix.
25809     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25810   else
25811     ac_dir_suffix= ac_dots=
25812   fi
25813
25814   case "$ac_given_srcdir" in
25815   .)  srcdir=.
25816       if test -z "$ac_dots"; then top_srcdir=.
25817       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25818   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25819   *) # Relative path.
25820     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25821     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25822   esac
25823
25824   case "$ac_given_INSTALL" in
25825   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25826   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25827   esac
25828
25829   echo creating "$ac_file"
25830   rm -f "$ac_file"
25831   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25832   case "$ac_file" in
25833   *[Mm]akefile*) ac_comsub="1i\\
25834 # $configure_input" ;;
25835   *) ac_comsub= ;;
25836   esac
25837
25838   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25839   sed -e "$ac_comsub
25840 s%@configure_input@%$configure_input%g
25841 s%@srcdir@%$srcdir%g
25842 s%@top_srcdir@%$top_srcdir%g
25843 s%@INSTALL@%$INSTALL%g
25844 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25845 fi; done
25846 rm -f conftest.s*
25847
25848 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25849 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25850 #
25851 # ac_d sets the value in "#define NAME VALUE" lines.
25852 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25853 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25854 ac_dC='\3'
25855 ac_dD='%g'
25856 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25857 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25858 ac_uB='\([      ]\)%\1#\2define\3'
25859 ac_uC=' '
25860 ac_uD='\4%g'
25861 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25862 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25863 ac_eB='$%\1#\2define\3'
25864 ac_eC=' '
25865 ac_eD='%g'
25866
25867 if test "${CONFIG_HEADERS+set}" != set; then
25868 EOF
25869 cat >> $CONFIG_STATUS <<EOF
25870   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25871 EOF
25872 cat >> $CONFIG_STATUS <<\EOF
25873 fi
25874 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25875   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25876   case "$ac_file" in
25877   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25878        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25879   *) ac_file_in="${ac_file}.in" ;;
25880   esac
25881
25882   echo creating $ac_file
25883
25884   rm -f conftest.frag conftest.in conftest.out
25885   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25886   cat $ac_file_inputs > conftest.in
25887
25888 EOF
25889
25890 # Transform confdefs.h into a sed script conftest.vals that substitutes
25891 # the proper values into config.h.in to produce config.h.  And first:
25892 # Protect against being on the right side of a sed subst in config.status.
25893 # Protect against being in an unquoted here document in config.status.
25894 rm -f conftest.vals
25895 cat > conftest.hdr <<\EOF
25896 s/[\\&%]/\\&/g
25897 s%[\\$`]%\\&%g
25898 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25899 s%ac_d%ac_u%gp
25900 s%ac_u%ac_e%gp
25901 EOF
25902 sed -n -f conftest.hdr confdefs.h > conftest.vals
25903 rm -f conftest.hdr
25904
25905 # This sed command replaces #undef with comments.  This is necessary, for
25906 # example, in the case of _POSIX_SOURCE, which is predefined and required
25907 # on some systems where configure will not decide to define it.
25908 cat >> conftest.vals <<\EOF
25909 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25910 EOF
25911
25912 # Break up conftest.vals because some shells have a limit on
25913 # the size of here documents, and old seds have small limits too.
25914
25915 rm -f conftest.tail
25916 while :
25917 do
25918   ac_lines=`grep -c . conftest.vals`
25919   # grep -c gives empty output for an empty file on some AIX systems.
25920   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25921   # Write a limited-size here document to conftest.frag.
25922   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25923   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25924   echo 'CEOF
25925   sed -f conftest.frag conftest.in > conftest.out
25926   rm -f conftest.in
25927   mv conftest.out conftest.in
25928 ' >> $CONFIG_STATUS
25929   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25930   rm -f conftest.vals
25931   mv conftest.tail conftest.vals
25932 done
25933 rm -f conftest.vals
25934
25935 cat >> $CONFIG_STATUS <<\EOF
25936   rm -f conftest.frag conftest.h
25937   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25938   cat conftest.in >> conftest.h
25939   rm -f conftest.in
25940   if cmp -s $ac_file conftest.h 2>/dev/null; then
25941     echo "$ac_file is unchanged"
25942     rm -f conftest.h
25943   else
25944     # Remove last slash and all that follows it.  Not all systems have dirname.
25945       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25946       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25947       # The file is in a subdirectory.
25948       test ! -d "$ac_dir" && mkdir "$ac_dir"
25949     fi
25950     rm -f $ac_file
25951     mv conftest.h $ac_file
25952   fi
25953 fi; done
25954
25955 EOF
25956 cat >> $CONFIG_STATUS <<EOF
25957 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25958 EOF
25959 cat >> $CONFIG_STATUS <<\EOF
25960
25961 chmod +x tests/run
25962 date > stamp-h
25963 BACKENDSC="servers/slapd/backends.c"
25964 echo "Making $BACKENDSC"
25965 rm -f $BACKENDSC
25966 cat > $BACKENDSC << ENDX
25967 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25968  *
25969  * Copyright 1998-2005 The OpenLDAP Foundation.
25970  * All rights reserved.
25971  *
25972  * Redistribution and use in source and binary forms, with or without
25973  * modification, are permitted only as authorized by the OpenLDAP
25974  * Public License.
25975  *
25976  * A copy of this license is available in the file LICENSE in the
25977  * top-level directory of the distribution or, alternatively, at
25978  * <http://www.OpenLDAP.org/license.html>.
25979  */
25980 /* This file is automatically generated by configure; please do not edit. */
25981
25982 #include "portable.h"
25983 #include "slap.h"
25984
25985 ENDX
25986 if test "${STATIC_BACKENDS}"; then
25987         for b in config ${STATIC_BACKENDS}; do
25988                 bb=`echo "${b}" | sed -e 's/back-//'`
25989                 cat >> $BACKENDSC << ENDX
25990 extern BI_init ${bb}_back_initialize;
25991 ENDX
25992         done
25993
25994         cat >> $BACKENDSC << ENDX
25995
25996 BackendInfo slap_binfo[] = {
25997 ENDX
25998
25999         for b in config ${STATIC_BACKENDS}; do
26000                 bb=`echo "${b}" | sed -e 's/back-//'`
26001                 echo "    Add ${bb} ..."
26002                 cat >> $BACKENDSC << ENDX
26003         { "${bb}", ${bb}_back_initialize },
26004 ENDX
26005         done
26006
26007         cat >> $BACKENDSC << ENDX
26008         { NULL, NULL },
26009 };
26010
26011 /* end of generated file */
26012 ENDX
26013 fi
26014
26015 echo Please run \"make depend\" to build dependencies
26016
26017 exit 0
26018 EOF
26019 chmod +x $CONFIG_STATUS
26020 rm -fr confdefs* $ac_clean_files
26021 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
26022