]> git.sur5r.net Git - openldap/blob - configure
ITS#3773 fix RDN comparison
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.582 2005/05/11 08:18:29 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2005 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-accesslog            In-Directory Access Logging overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-dynlist      Dynamic List overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-glue         Backend Glue overlay no|yes|mod [yes]"
138 ac_help="$ac_help
139     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
146 ac_help="$ac_help
147     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
148 ac_help="$ac_help
149     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]"
150 ac_help="$ac_help
151     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]"
152 ac_help="$ac_help
153     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
154 ac_help="$ac_help
155
156 SLURPD (Replication Daemon) Options:"
157 ac_help="$ac_help
158   --enable-slurpd         enable building slurpd [auto]"
159 ac_help="$ac_help
160
161 Library Generation & Linking Options"
162 ac_help="$ac_help
163   --enable-static[=PKGS]  build static libraries [default=yes]"
164 ac_help="$ac_help
165   --enable-shared[=PKGS]  build shared libraries [default=yes]"
166 ac_help="$ac_help
167   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
168 ac_help="$ac_help
169   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
170
171 # Find the correct PATH separator.  Usually this is `:', but
172 # DJGPP uses `;' like DOS.
173 if test "X${PATH_SEPARATOR+set}" != Xset; then
174   UNAME=${UNAME-`uname 2>/dev/null`}
175   case X$UNAME in
176     *-DOS) lt_cv_sys_path_separator=';' ;;
177     *)     lt_cv_sys_path_separator=':' ;;
178   esac
179   PATH_SEPARATOR=$lt_cv_sys_path_separator
180 fi
181
182
183 # Check that we are running under the correct shell.
184 SHELL=${CONFIG_SHELL-/bin/sh}
185
186 case X$ECHO in
187 X*--fallback-echo)
188   # Remove one level of quotation (which was required for Make).
189   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
190   ;;
191 esac
192
193 echo=${ECHO-echo}
194 if test "X$1" = X--no-reexec; then
195   # Discard the --no-reexec flag, and continue.
196   shift
197 elif test "X$1" = X--fallback-echo; then
198   # Avoid inline document here, it may be left over
199   :
200 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
201   # Yippee, $echo works!
202   :
203 else
204   # Restart under the correct shell.
205   exec $SHELL "$0" --no-reexec ${1+"$@"}
206 fi
207
208 if test "X$1" = X--fallback-echo; then
209   # used as fallback echo
210   shift
211   cat <<EOF
212
213 EOF
214   exit 0
215 fi
216
217 # The HP-UX ksh and POSIX shell print the target directory to stdout
218 # if CDPATH is set.
219 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
220
221 if test -z "$ECHO"; then
222 if test "X${echo_test_string+set}" != Xset; then
223 # find a string as large as possible, as long as the shell can cope with it
224   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
225     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
226     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
227        echo_test_string="`eval $cmd`" &&
228        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
229     then
230       break
231     fi
232   done
233 fi
234
235 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
236    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
237    test "X$echo_testing_string" = "X$echo_test_string"; then
238   :
239 else
240   # The Solaris, AIX, and Digital Unix default echo programs unquote
241   # backslashes.  This makes it impossible to quote backslashes using
242   #   echo "$something" | sed 's/\\/\\\\/g'
243   #
244   # So, first we look for a working echo in the user's PATH.
245
246   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
247   for dir in $PATH /usr/ucb; do
248     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
249        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       echo="$dir/echo"
253       break
254     fi
255   done
256   IFS="$save_ifs"
257
258   if test "X$echo" = Xecho; then
259     # We didn't find a better echo, so look for alternatives.
260     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
261        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
262        test "X$echo_testing_string" = "X$echo_test_string"; then
263       # This shell has a builtin print -r that does the trick.
264       echo='print -r'
265     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
266          test "X$CONFIG_SHELL" != X/bin/ksh; then
267       # If we have ksh, try running configure again with it.
268       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
269       export ORIGINAL_CONFIG_SHELL
270       CONFIG_SHELL=/bin/ksh
271       export CONFIG_SHELL
272       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
273     else
274       # Try using printf.
275       echo='printf %s\n'
276       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
277          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
278          test "X$echo_testing_string" = "X$echo_test_string"; then
279         # Cool, printf works
280         :
281       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
286         export CONFIG_SHELL
287         SHELL="$CONFIG_SHELL"
288         export SHELL
289         echo="$CONFIG_SHELL $0 --fallback-echo"
290       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
291            test "X$echo_testing_string" = 'X\t' &&
292            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
293            test "X$echo_testing_string" = "X$echo_test_string"; then
294         echo="$CONFIG_SHELL $0 --fallback-echo"
295       else
296         # maybe with a smaller string...
297         prev=:
298
299         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
300           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
301           then
302             break
303           fi
304           prev="$cmd"
305         done
306
307         if test "$prev" != 'sed 50q "$0"'; then
308           echo_test_string=`eval $prev`
309           export echo_test_string
310           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
311         else
312           # Oops.  We lost completely, so just stick with echo.
313           echo=echo
314         fi
315       fi
316     fi
317   fi
318 fi
319 fi
320
321 # Copy echo and quote the copy suitably for passing to libtool from
322 # the Makefile, instead of quoting the original, which is used later.
323 ECHO=$echo
324 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
325    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
326 fi
327
328
329 ac_help="$ac_help
330   --disable-libtool-lock  avoid locking (might break parallel builds)"
331 ac_help="$ac_help
332   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
333 ac_help="$ac_help
334
335 See INSTALL file for further details."
336
337 # Initialize some variables set by options.
338 # The variables have the same names as the options, with
339 # dashes changed to underlines.
340 build=NONE
341 cache_file=./config.cache
342 exec_prefix=NONE
343 host=NONE
344 no_create=
345 nonopt=NONE
346 no_recursion=
347 prefix=NONE
348 program_prefix=NONE
349 program_suffix=NONE
350 program_transform_name=s,x,x,
351 silent=
352 site=
353 srcdir=
354 target=NONE
355 verbose=
356 x_includes=NONE
357 x_libraries=NONE
358 bindir='${exec_prefix}/bin'
359 sbindir='${exec_prefix}/sbin'
360 libexecdir='${exec_prefix}/libexec'
361 datadir='${prefix}/share'
362 sysconfdir='${prefix}/etc'
363 sharedstatedir='${prefix}/com'
364 localstatedir='${prefix}/var'
365 libdir='${exec_prefix}/lib'
366 includedir='${prefix}/include'
367 oldincludedir='/usr/include'
368 infodir='${prefix}/info'
369 mandir='${prefix}/man'
370
371 # Initialize some other variables.
372 subdirs=
373 MFLAGS= MAKEFLAGS=
374 SHELL=${CONFIG_SHELL-/bin/sh}
375 # Maximum number of lines to put in a shell here document.
376 ac_max_here_lines=12
377
378 ac_prev=
379 for ac_option
380 do
381
382   # If the previous option needs an argument, assign it.
383   if test -n "$ac_prev"; then
384     eval "$ac_prev=\$ac_option"
385     ac_prev=
386     continue
387   fi
388
389   case "$ac_option" in
390   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
391   *) ac_optarg= ;;
392   esac
393
394   # Accept the important Cygnus configure options, so we can diagnose typos.
395
396   case "$ac_option" in
397
398   -bindir | --bindir | --bindi | --bind | --bin | --bi)
399     ac_prev=bindir ;;
400   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
401     bindir="$ac_optarg" ;;
402
403   -build | --build | --buil | --bui | --bu)
404     ac_prev=build ;;
405   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
406     build="$ac_optarg" ;;
407
408   -cache-file | --cache-file | --cache-fil | --cache-fi \
409   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
410     ac_prev=cache_file ;;
411   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
412   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
413     cache_file="$ac_optarg" ;;
414
415   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
416     ac_prev=datadir ;;
417   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
418   | --da=*)
419     datadir="$ac_optarg" ;;
420
421   -disable-* | --disable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     eval "enable_${ac_feature}=no" ;;
429
430   -enable-* | --enable-*)
431     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
432     # Reject names that are not valid shell variable names.
433     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
434       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
435     fi
436     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
437     case "$ac_option" in
438       *=*) ;;
439       *) ac_optarg=yes ;;
440     esac
441     eval "enable_${ac_feature}='$ac_optarg'" ;;
442
443   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
444   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
445   | --exec | --exe | --ex)
446     ac_prev=exec_prefix ;;
447   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
448   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
449   | --exec=* | --exe=* | --ex=*)
450     exec_prefix="$ac_optarg" ;;
451
452   -gas | --gas | --ga | --g)
453     # Obsolete; use --with-gas.
454     with_gas=yes ;;
455
456   -help | --help | --hel | --he)
457     # Omit some internal or obsolete options to make the list less imposing.
458     # This message is too long to be a string in the A/UX 3.1 sh.
459     cat << EOF
460 Usage: configure [options] [host]
461 Options: [defaults in brackets after descriptions]
462 Configuration:
463   --cache-file=FILE       cache test results in FILE
464   --help                  print this message
465   --no-create             do not create output files
466   --quiet, --silent       do not print \`checking...' messages
467   --version               print the version of autoconf that created configure
468 Directory and file names:
469   --prefix=PREFIX         install architecture-independent files in PREFIX
470                           [$ac_default_prefix]
471   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
472                           [same as prefix]
473   --bindir=DIR            user executables in DIR [EPREFIX/bin]
474   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
475   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
476   --datadir=DIR           read-only architecture-independent data in DIR
477                           [PREFIX/share]
478   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
479   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
480                           [PREFIX/com]
481   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
482   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
483   --includedir=DIR        C header files in DIR [PREFIX/include]
484   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
485   --infodir=DIR           info documentation in DIR [PREFIX/info]
486   --mandir=DIR            man documentation in DIR [PREFIX/man]
487   --srcdir=DIR            find the sources in DIR [configure dir or ..]
488   --program-prefix=PREFIX prepend PREFIX to installed program names
489   --program-suffix=SUFFIX append SUFFIX to installed program names
490   --program-transform-name=PROGRAM
491                           run sed PROGRAM on installed program names
492 EOF
493     cat << EOF
494 Host type:
495   --build=BUILD           configure for building on BUILD [BUILD=HOST]
496   --host=HOST             configure for HOST [guessed]
497   --target=TARGET         configure for TARGET [TARGET=HOST]
498 Features and packages:
499   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
500   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
501   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
502   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
503   --x-includes=DIR        X include files are in DIR
504   --x-libraries=DIR       X library files are in DIR
505 EOF
506     if test -n "$ac_help"; then
507       echo "--enable and --with options recognized:$ac_help"
508     fi
509     exit 0 ;;
510
511   -host | --host | --hos | --ho)
512     ac_prev=host ;;
513   -host=* | --host=* | --hos=* | --ho=*)
514     host="$ac_optarg" ;;
515
516   -includedir | --includedir | --includedi | --included | --include \
517   | --includ | --inclu | --incl | --inc)
518     ac_prev=includedir ;;
519   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
520   | --includ=* | --inclu=* | --incl=* | --inc=*)
521     includedir="$ac_optarg" ;;
522
523   -infodir | --infodir | --infodi | --infod | --info | --inf)
524     ac_prev=infodir ;;
525   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
526     infodir="$ac_optarg" ;;
527
528   -libdir | --libdir | --libdi | --libd)
529     ac_prev=libdir ;;
530   -libdir=* | --libdir=* | --libdi=* | --libd=*)
531     libdir="$ac_optarg" ;;
532
533   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
534   | --libexe | --libex | --libe)
535     ac_prev=libexecdir ;;
536   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
537   | --libexe=* | --libex=* | --libe=*)
538     libexecdir="$ac_optarg" ;;
539
540   -localstatedir | --localstatedir | --localstatedi | --localstated \
541   | --localstate | --localstat | --localsta | --localst \
542   | --locals | --local | --loca | --loc | --lo)
543     ac_prev=localstatedir ;;
544   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
545   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
546   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
547     localstatedir="$ac_optarg" ;;
548
549   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
550     ac_prev=mandir ;;
551   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
552     mandir="$ac_optarg" ;;
553
554   -nfp | --nfp | --nf)
555     # Obsolete; use --without-fp.
556     with_fp=no ;;
557
558   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
559   | --no-cr | --no-c)
560     no_create=yes ;;
561
562   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
563   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
564     no_recursion=yes ;;
565
566   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
567   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
568   | --oldin | --oldi | --old | --ol | --o)
569     ac_prev=oldincludedir ;;
570   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
571   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
572   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
573     oldincludedir="$ac_optarg" ;;
574
575   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
576     ac_prev=prefix ;;
577   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
578     prefix="$ac_optarg" ;;
579
580   -program-prefix | --program-prefix | --program-prefi | --program-pref \
581   | --program-pre | --program-pr | --program-p)
582     ac_prev=program_prefix ;;
583   -program-prefix=* | --program-prefix=* | --program-prefi=* \
584   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
585     program_prefix="$ac_optarg" ;;
586
587   -program-suffix | --program-suffix | --program-suffi | --program-suff \
588   | --program-suf | --program-su | --program-s)
589     ac_prev=program_suffix ;;
590   -program-suffix=* | --program-suffix=* | --program-suffi=* \
591   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
592     program_suffix="$ac_optarg" ;;
593
594   -program-transform-name | --program-transform-name \
595   | --program-transform-nam | --program-transform-na \
596   | --program-transform-n | --program-transform- \
597   | --program-transform | --program-transfor \
598   | --program-transfo | --program-transf \
599   | --program-trans | --program-tran \
600   | --progr-tra | --program-tr | --program-t)
601     ac_prev=program_transform_name ;;
602   -program-transform-name=* | --program-transform-name=* \
603   | --program-transform-nam=* | --program-transform-na=* \
604   | --program-transform-n=* | --program-transform-=* \
605   | --program-transform=* | --program-transfor=* \
606   | --program-transfo=* | --program-transf=* \
607   | --program-trans=* | --program-tran=* \
608   | --progr-tra=* | --program-tr=* | --program-t=*)
609     program_transform_name="$ac_optarg" ;;
610
611   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
612   | -silent | --silent | --silen | --sile | --sil)
613     silent=yes ;;
614
615   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
616     ac_prev=sbindir ;;
617   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
618   | --sbi=* | --sb=*)
619     sbindir="$ac_optarg" ;;
620
621   -sharedstatedir | --sharedstatedir | --sharedstatedi \
622   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
623   | --sharedst | --shareds | --shared | --share | --shar \
624   | --sha | --sh)
625     ac_prev=sharedstatedir ;;
626   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
627   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
628   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
629   | --sha=* | --sh=*)
630     sharedstatedir="$ac_optarg" ;;
631
632   -site | --site | --sit)
633     ac_prev=site ;;
634   -site=* | --site=* | --sit=*)
635     site="$ac_optarg" ;;
636
637   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
638     ac_prev=srcdir ;;
639   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
640     srcdir="$ac_optarg" ;;
641
642   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
643   | --syscon | --sysco | --sysc | --sys | --sy)
644     ac_prev=sysconfdir ;;
645   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
646   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
647     sysconfdir="$ac_optarg" ;;
648
649   -target | --target | --targe | --targ | --tar | --ta | --t)
650     ac_prev=target ;;
651   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
652     target="$ac_optarg" ;;
653
654   -v | -verbose | --verbose | --verbos | --verbo | --verb)
655     verbose=yes ;;
656
657   -version | --version | --versio | --versi | --vers)
658     echo "configure generated by autoconf version 2.13.1"
659     exit 0 ;;
660
661   -with-* | --with-*)
662     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
663     # Reject names that are not valid shell variable names.
664     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
665       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
666     fi
667     ac_package=`echo $ac_package| sed 's/-/_/g'`
668     case "$ac_option" in
669       *=*) ;;
670       *) ac_optarg=yes ;;
671     esac
672     eval "with_${ac_package}='$ac_optarg'" ;;
673
674   -without-* | --without-*)
675     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
676     # Reject names that are not valid shell variable names.
677     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
678       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
679     fi
680     ac_package=`echo $ac_package| sed 's/-/_/g'`
681     eval "with_${ac_package}=no" ;;
682
683   --x)
684     # Obsolete; use --with-x.
685     with_x=yes ;;
686
687   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
688   | --x-incl | --x-inc | --x-in | --x-i)
689     ac_prev=x_includes ;;
690   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
691   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
692     x_includes="$ac_optarg" ;;
693
694   -x-libraries | --x-libraries | --x-librarie | --x-librari \
695   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
696     ac_prev=x_libraries ;;
697   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
698   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
699     x_libraries="$ac_optarg" ;;
700
701   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
702     ;;
703
704   *)
705     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
706       echo "configure: warning: $ac_option: invalid host type" 1>&2
707     fi
708     if test "x$nonopt" != xNONE; then
709       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
710     fi
711     nonopt="$ac_option"
712     ;;
713
714   esac
715 done
716
717 if test -n "$ac_prev"; then
718   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
719 fi
720
721 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
722
723 # File descriptor usage:
724 # 0 standard input
725 # 1 file creation
726 # 2 errors and warnings
727 # 3 some systems may open it to /dev/tty
728 # 4 used on the Kubota Titan
729 # 6 checking for... messages and results
730 # 5 compiler messages saved in config.log
731 if test "$silent" = yes; then
732   exec 6>/dev/null
733 else
734   exec 6>&1
735 fi
736 exec 5>./config.log
737
738 echo "\
739 This file contains any messages produced by compilers while
740 running configure, to aid debugging if configure makes a mistake.
741 " 1>&5
742
743 # Strip out --no-create and --no-recursion so they do not pile up.
744 # Also quote any args containing shell metacharacters.
745 ac_configure_args=
746 for ac_arg
747 do
748   case "$ac_arg" in
749   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
750   | --no-cr | --no-c) ;;
751   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
752   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
753   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
754   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
755   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
756   esac
757 done
758
759 # NLS nuisances.
760 # Only set these to C if already set.  These must not be set unconditionally
761 # because not all systems understand e.g. LANG=C (notably SCO).
762 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
763 # Non-C LC_CTYPE values break the ctype check.
764 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
765 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
766 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
767 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
768
769 # confdefs.h avoids OS command line length limits that DEFS can exceed.
770 rm -rf conftest* confdefs.h
771 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
772 echo > confdefs.h
773
774 # A filename unique to this package, relative to the directory that
775 # configure is in, which we can look for to find out if srcdir is correct.
776 ac_unique_file=build/version.sh
777
778 # Find the source files, if location was not specified.
779 if test -z "$srcdir"; then
780   ac_srcdir_defaulted=yes
781   # Try the directory containing this script, then its parent.
782   ac_prog=$0
783   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
784   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
785   srcdir=$ac_confdir
786   if test ! -r $srcdir/$ac_unique_file; then
787     srcdir=..
788   fi
789 else
790   ac_srcdir_defaulted=no
791 fi
792 if test ! -r $srcdir/$ac_unique_file; then
793   if test "$ac_srcdir_defaulted" = yes; then
794     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
795   else
796     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
797   fi
798 fi
799 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
800
801 # Prefer explicitly selected file to automatically selected ones.
802 if test -z "$CONFIG_SITE"; then
803   if test "x$prefix" != xNONE; then
804     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
805   else
806     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
807   fi
808 fi
809 for ac_site_file in $CONFIG_SITE; do
810   if test -r "$ac_site_file"; then
811     echo "loading site script $ac_site_file"
812     . "$ac_site_file"
813   fi
814 done
815
816
817 ac_ext=c
818 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
819 ac_cpp='$CPP $CPPFLAGS'
820 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
821 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
822 cross_compiling=$ac_cv_prog_cc_cross
823
824 ac_exeext=
825 ac_objext=o
826 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
827   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
828   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
829     ac_n= ac_c='
830 ' ac_t='        '
831   else
832     ac_n=-n ac_c= ac_t=
833   fi
834 else
835   ac_n= ac_c='\c' ac_t=
836 fi
837
838
839 # set unset (borrowed from autoconf 2.49c)
840 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
841   ol_unset=unset
842 else
843   ol_unset=false
844 fi
845 # unset CDPATH
846 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
847
848 ac_aux_dir=
849 for ac_dir in build $srcdir/build; do
850   if test -f $ac_dir/install-sh; then
851     ac_aux_dir=$ac_dir
852     ac_install_sh="$ac_aux_dir/install-sh -c"
853     break
854   elif 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/shtool; then
859     ac_aux_dir=$ac_dir
860     ac_install_sh="$ac_aux_dir/shtool install -c"
861     break
862   fi
863 done
864 if test -z "$ac_aux_dir"; then
865   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
866 fi
867 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
868 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
869 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
870
871 eval `$ac_aux_dir/version.sh`
872 if test -z "$OL_STRING"; then
873         { echo "configure: error: could not determine version" 1>&2; exit 1; }
874 fi
875
876 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
877         ac_cv_shtool="$ac_aux_dir/shtool"
878 else
879         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
880 fi
881
882 SHTOOL="$ac_cv_shtool"
883
884 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
885 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
886
887 OPENLDAP_CVS=""
888 if test -d $ac_aux_dir/CVS; then
889         OPENLDAP_CVS="(from CVS sources) "
890 fi
891
892 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
893
894
895 echo $ac_n "checking host system type""... $ac_c" 1>&6
896 echo "configure:897: checking host system type" >&5
897 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
898
899 # Make sure we can run config.sub.
900   if $ac_config_sub sun4 >/dev/null 2>&1; then :
901     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
902   fi
903
904   ac_cv_host_alias=$host
905   case "$ac_cv_host_alias" in
906   NONE)
907     case $nonopt in
908     NONE)
909       if ac_cv_host_alias=`$ac_config_guess`; then :
910       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
911       fi ;;
912     *) ac_cv_host_alias=$nonopt ;;
913     esac ;;
914   esac
915
916   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
917   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
918   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
919   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
920 else
921   echo $ac_n "(cached) $ac_c" 1>&6
922 fi
923
924 echo "$ac_t""$ac_cv_host" 1>&6
925
926 host=$ac_cv_host
927 host_alias=$ac_cv_host_alias
928 host_cpu=$ac_cv_host_cpu
929 host_vendor=$ac_cv_host_vendor
930 host_os=$ac_cv_host_os
931
932
933
934
935
936 echo $ac_n "checking target system type""... $ac_c" 1>&6
937 echo "configure:938: checking target system type" >&5
938 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
939
940 # Make sure we can run config.sub.
941   if $ac_config_sub sun4 >/dev/null 2>&1; then :
942     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
943   fi
944
945   ac_cv_target_alias=$target
946   case "$ac_cv_target_alias" in
947   NONE)
948     case $nonopt in
949     NONE)
950       ac_cv_target_alias=$host_alias ;;
951
952     *) ac_cv_target_alias=$nonopt ;;
953     esac ;;
954   esac
955
956   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
957   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
958   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
959   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
960 else
961   echo $ac_n "(cached) $ac_c" 1>&6
962 fi
963
964 echo "$ac_t""$ac_cv_target" 1>&6
965
966 target=$ac_cv_target
967 target_alias=$ac_cv_target_alias
968 target_cpu=$ac_cv_target_cpu
969 target_vendor=$ac_cv_target_vendor
970 target_os=$ac_cv_target_os
971
972
973
974
975
976 echo $ac_n "checking build system type""... $ac_c" 1>&6
977 echo "configure:978: checking build system type" >&5
978 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
979
980 # Make sure we can run config.sub.
981   if $ac_config_sub sun4 >/dev/null 2>&1; then :
982     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
983   fi
984
985   ac_cv_build_alias=$build
986   case "$ac_cv_build_alias" in
987   NONE)
988     case $nonopt in
989     NONE)
990       ac_cv_build_alias=$host_alias ;;
991
992     *) ac_cv_build_alias=$nonopt ;;
993     esac ;;
994   esac
995
996   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
997   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
998   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
999   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1000 else
1001   echo $ac_n "(cached) $ac_c" 1>&6
1002 fi
1003
1004 echo "$ac_t""$ac_cv_build" 1>&6
1005
1006 build=$ac_cv_build
1007 build_alias=$ac_cv_build_alias
1008 build_cpu=$ac_cv_build_cpu
1009 build_vendor=$ac_cv_build_vendor
1010 build_os=$ac_cv_build_os
1011
1012
1013
1014
1015
1016 # Do some error checking and defaulting for the host and target type.
1017 # The inputs are:
1018 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1019 #
1020 # The rules are:
1021 # 1. You are not allowed to specify --host, --target, and nonopt at the
1022 #    same time.
1023 # 2. Host defaults to nonopt.
1024 # 3. If nonopt is not specified, then host defaults to the current host,
1025 #    as determined by config.guess.
1026 # 4. Target and build default to nonopt.
1027 # 5. If nonopt is not specified, then target and build default to host.
1028
1029 # The aliases save the names the user supplied, while $host etc.
1030 # will get canonicalized.
1031 case $host---$target---$nonopt in
1032 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1033 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1034 esac
1035
1036 test "$host_alias" != "$target_alias" &&
1037   test "$program_prefix$program_suffix$program_transform_name" = \
1038     NONENONEs,x,x, &&
1039   program_prefix=${target_alias}-
1040
1041
1042 # Find a good install program.  We prefer a C program (faster),
1043 # so one script is as good as another.  But avoid the broken or
1044 # incompatible versions:
1045 # SysV /etc/install, /usr/sbin/install
1046 # SunOS /usr/etc/install
1047 # IRIX /sbin/install
1048 # AIX /bin/install
1049 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1050 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1051 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1052 # ./install, which can be erroneously created by make from ./install.sh.
1053 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1054 echo "configure:1055: checking for a BSD compatible install" >&5
1055 if test -z "$INSTALL"; then
1056 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1057   echo $ac_n "(cached) $ac_c" 1>&6
1058 else
1059     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1060   for ac_dir in $PATH; do
1061     # Account for people who put trailing slashes in PATH elements.
1062     case "$ac_dir/" in
1063     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1064     *)
1065       # OSF1 and SCO ODT 3.0 have their own names for install.
1066       # Don't use installbsd from OSF since it installs stuff as root
1067       # by default.
1068       for ac_prog in ginstall scoinst install; do
1069         if test -f $ac_dir/$ac_prog; then
1070           if test $ac_prog = install &&
1071             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1072             # AIX install.  It has an incompatible calling convention.
1073             :
1074           elif test $ac_prog = install &&
1075             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1076             # program-specific install script used by HP pwplus--don't use.
1077             :
1078           else
1079             ac_cv_path_install="$ac_dir/$ac_prog -c"
1080             break 2
1081           fi
1082         fi
1083       done
1084       ;;
1085     esac
1086   done
1087   IFS="$ac_save_IFS"
1088
1089 fi
1090   if test "${ac_cv_path_install+set}" = set; then
1091     INSTALL="$ac_cv_path_install"
1092   else
1093     # As a last resort, use the slow shell script.  We don't cache a
1094     # path for INSTALL within a source directory, because that will
1095     # break other packages using the cache if that directory is
1096     # removed, or if the path is relative.
1097     INSTALL="$ac_install_sh"
1098   fi
1099 fi
1100 echo "$ac_t""$INSTALL" 1>&6
1101
1102 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1103 # It thinks the first close brace ends the variable substitution.
1104 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1105
1106 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1107
1108 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1109
1110 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1111 echo "configure:1112: checking whether build environment is sane" >&5
1112 # Just in case
1113 sleep 1
1114 echo timestamp > conftestfile
1115 # Do `set' in a subshell so we don't clobber the current shell's
1116 # arguments.  Must try -L first in case configure is actually a
1117 # symlink; some systems play weird games with the mod time of symlinks
1118 # (eg FreeBSD returns the mod time of the symlink's containing
1119 # directory).
1120 if (
1121    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1122    if test "$*" = "X"; then
1123       # -L didn't work.
1124       set X `ls -t $srcdir/configure conftestfile`
1125    fi
1126    if test "$*" != "X $srcdir/configure conftestfile" \
1127       && test "$*" != "X conftestfile $srcdir/configure"; then
1128
1129       # If neither matched, then we have a broken ls.  This can happen
1130       # if, for instance, CONFIG_SHELL is bash and it inherits a
1131       # broken ls alias from the environment.  This has actually
1132       # happened.  Such a system could not be considered "sane".
1133       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1134 alias in your environment" 1>&2; exit 1; }
1135    fi
1136
1137    test "$2" = conftestfile
1138    )
1139 then
1140    # Ok.
1141    :
1142 else
1143    { echo "configure: error: newly created file is older than distributed files!
1144 Check your system clock" 1>&2; exit 1; }
1145 fi
1146 rm -f conftest*
1147 echo "$ac_t""yes" 1>&6
1148 if test "$program_transform_name" = s,x,x,; then
1149   program_transform_name=
1150 else
1151   # Double any \ or $.  echo might interpret backslashes.
1152   cat <<\EOF_SED > conftestsed
1153 s,\\,\\\\,g; s,\$,$$,g
1154 EOF_SED
1155   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1156   rm -f conftestsed
1157 fi
1158 test "$program_prefix" != NONE &&
1159   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1160 # Use a double $ so make ignores it.
1161 test "$program_suffix" != NONE &&
1162   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1163
1164 # sed with no file args requires a program.
1165 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1166
1167 for ac_prog in mawk gawk nawk awk
1168 do
1169 # Extract the first word of "$ac_prog", so it can be a program name with args.
1170 set dummy $ac_prog; ac_word=$2
1171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1172 echo "configure:1173: checking for $ac_word" >&5
1173 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1174   echo $ac_n "(cached) $ac_c" 1>&6
1175 else
1176   if test -n "$AWK"; then
1177   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1178 else
1179   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1180   ac_dummy="$PATH"
1181   for ac_dir in $ac_dummy; do
1182     test -z "$ac_dir" && ac_dir=.
1183     if test -f $ac_dir/$ac_word; then
1184       ac_cv_prog_AWK="$ac_prog"
1185       break
1186     fi
1187   done
1188   IFS="$ac_save_ifs"
1189 fi
1190 fi
1191 AWK="$ac_cv_prog_AWK"
1192 if test -n "$AWK"; then
1193   echo "$ac_t""$AWK" 1>&6
1194 else
1195   echo "$ac_t""no" 1>&6
1196 fi
1197
1198 test -n "$AWK" && break
1199 done
1200
1201 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1202 echo "configure:1203: checking whether ${MAKE-make} sets \${MAKE}" >&5
1203 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1204 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1205   echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207   cat > conftestmake <<\EOF
1208 all:
1209         @echo 'ac_maketemp="${MAKE}"'
1210 EOF
1211 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1212 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1213 if test -n "$ac_maketemp"; then
1214   eval ac_cv_prog_make_${ac_make}_set=yes
1215 else
1216   eval ac_cv_prog_make_${ac_make}_set=no
1217 fi
1218 rm -f conftestmake
1219 fi
1220 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1221   echo "$ac_t""yes" 1>&6
1222   SET_MAKE=
1223 else
1224   echo "$ac_t""no" 1>&6
1225   SET_MAKE="MAKE=${MAKE-make}"
1226 fi
1227
1228
1229
1230 PACKAGE=$OL_PACKAGE
1231
1232 VERSION=$OL_VERSION
1233
1234 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1235   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1236 fi
1237
1238
1239
1240 missing_dir=`cd $ac_aux_dir && pwd`
1241 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1242 echo "configure:1243: checking for working aclocal" >&5
1243 # Run test in a subshell; some versions of sh will print an error if
1244 # an executable is not found, even if stderr is redirected.
1245 # Redirect stdin to placate older versions of autoconf.  Sigh.
1246 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1247    ACLOCAL=aclocal
1248    echo "$ac_t""found" 1>&6
1249 else
1250    ACLOCAL="$missing_dir/missing aclocal"
1251    echo "$ac_t""missing" 1>&6
1252 fi
1253
1254 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1255 echo "configure:1256: checking for working autoconf" >&5
1256 # Run test in a subshell; some versions of sh will print an error if
1257 # an executable is not found, even if stderr is redirected.
1258 # Redirect stdin to placate older versions of autoconf.  Sigh.
1259 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1260    AUTOCONF=autoconf
1261    echo "$ac_t""found" 1>&6
1262 else
1263    AUTOCONF="$missing_dir/missing autoconf"
1264    echo "$ac_t""missing" 1>&6
1265 fi
1266
1267 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1268 echo "configure:1269: checking for working automake" >&5
1269 # Run test in a subshell; some versions of sh will print an error if
1270 # an executable is not found, even if stderr is redirected.
1271 # Redirect stdin to placate older versions of autoconf.  Sigh.
1272 if (automake --version) < /dev/null > /dev/null 2>&1; then
1273    AUTOMAKE=automake
1274    echo "$ac_t""found" 1>&6
1275 else
1276    AUTOMAKE="$missing_dir/missing automake"
1277    echo "$ac_t""missing" 1>&6
1278 fi
1279
1280 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1281 echo "configure:1282: checking for working autoheader" >&5
1282 # Run test in a subshell; some versions of sh will print an error if
1283 # an executable is not found, even if stderr is redirected.
1284 # Redirect stdin to placate older versions of autoconf.  Sigh.
1285 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1286    AUTOHEADER=autoheader
1287    echo "$ac_t""found" 1>&6
1288 else
1289    AUTOHEADER="$missing_dir/missing autoheader"
1290    echo "$ac_t""missing" 1>&6
1291 fi
1292
1293 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1294 echo "configure:1295: checking for working makeinfo" >&5
1295 # Run test in a subshell; some versions of sh will print an error if
1296 # an executable is not found, even if stderr is redirected.
1297 # Redirect stdin to placate older versions of autoconf.  Sigh.
1298 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1299    MAKEINFO=makeinfo
1300    echo "$ac_t""found" 1>&6
1301 else
1302    MAKEINFO="$missing_dir/missing makeinfo"
1303    echo "$ac_t""missing" 1>&6
1304 fi
1305
1306 install_sh="$missing_dir/install-sh"
1307 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1308
1309 for ac_prog in gnutar gtar tar
1310 do
1311 # Extract the first word of "$ac_prog", so it can be a program name with args.
1312 set dummy $ac_prog; ac_word=$2
1313 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1314 echo "configure:1315: checking for $ac_word" >&5
1315 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1316   echo $ac_n "(cached) $ac_c" 1>&6
1317 else
1318   if test -n "$AMTAR"; then
1319   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1320 else
1321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1322   ac_dummy="$PATH"
1323   for ac_dir in $ac_dummy; do
1324     test -z "$ac_dir" && ac_dir=.
1325     if test -f $ac_dir/$ac_word; then
1326       ac_cv_prog_AMTAR="$ac_prog"
1327       break
1328     fi
1329   done
1330   IFS="$ac_save_ifs"
1331 fi
1332 fi
1333 AMTAR="$ac_cv_prog_AMTAR"
1334 if test -n "$AMTAR"; then
1335   echo "$ac_t""$AMTAR" 1>&6
1336 else
1337   echo "$ac_t""no" 1>&6
1338 fi
1339
1340 test -n "$AMTAR" && break
1341 done
1342
1343
1344 AMTARFLAGS=
1345 if test -n "$AMTAR"; then
1346   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1347         AMTARFLAGS=o
1348   fi
1349 fi
1350
1351 cat >> confdefs.h <<EOF
1352 #define OPENLDAP_PACKAGE "$PACKAGE"
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define OPENLDAP_VERSION "$VERSION"
1357 EOF
1358
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION $OL_API_INC
1362 EOF
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1366 EOF
1367
1368 cat >> confdefs.h <<EOF
1369 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1370 EOF
1371
1372 cat >> confdefs.h <<EOF
1373 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1374 EOF
1375
1376
1377 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1378
1379 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1380
1381 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1382
1383
1384
1385 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1386 echo "configure:1387: checking configure arguments" >&5
1387
1388
1389 top_builddir=`pwd`
1390
1391 ldap_subdir="/openldap"
1392
1393 # Check whether --with-subdir or --without-subdir was given.
1394 if test "${with_subdir+set}" = set; then
1395   withval="$with_subdir"
1396   case "$withval" in
1397         no) ldap_subdir=""
1398                 ;;
1399         yes)
1400                 ;;
1401         /*|\\*)
1402                 ldap_subdir="$withval"
1403                 ;;
1404         *)
1405                 ldap_subdir="/$withval"
1406                 ;;
1407 esac
1408
1409 fi
1410
1411
1412 # OpenLDAP --enable-debug
1413         # Check whether --enable-debug or --disable-debug was given.
1414 if test "${enable_debug+set}" = set; then
1415   enableval="$enable_debug"
1416   
1417         ol_arg=invalid
1418         for ol_val in auto yes no ; do
1419                 if test "$enableval" = "$ol_val" ; then
1420                         ol_arg="$ol_val"
1421                 fi
1422         done
1423         if test "$ol_arg" = "invalid" ; then
1424                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1425         fi
1426         ol_enable_debug="$ol_arg"
1427
1428 else
1429         ol_enable_debug="yes"
1430 fi
1431 # end --enable-debug
1432 # OpenLDAP --enable-dynamic
1433         # Check whether --enable-dynamic or --disable-dynamic was given.
1434 if test "${enable_dynamic+set}" = set; then
1435   enableval="$enable_dynamic"
1436   
1437         ol_arg=invalid
1438         for ol_val in auto yes no ; do
1439                 if test "$enableval" = "$ol_val" ; then
1440                         ol_arg="$ol_val"
1441                 fi
1442         done
1443         if test "$ol_arg" = "invalid" ; then
1444                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1445         fi
1446         ol_enable_dynamic="$ol_arg"
1447
1448 else
1449         ol_enable_dynamic="no"
1450 fi
1451 # end --enable-dynamic
1452 # OpenLDAP --enable-syslog
1453         # Check whether --enable-syslog or --disable-syslog was given.
1454 if test "${enable_syslog+set}" = set; then
1455   enableval="$enable_syslog"
1456   
1457         ol_arg=invalid
1458         for ol_val in auto yes no ; do
1459                 if test "$enableval" = "$ol_val" ; then
1460                         ol_arg="$ol_val"
1461                 fi
1462         done
1463         if test "$ol_arg" = "invalid" ; then
1464                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1465         fi
1466         ol_enable_syslog="$ol_arg"
1467
1468 else
1469         ol_enable_syslog="auto"
1470 fi
1471 # end --enable-syslog
1472 # OpenLDAP --enable-proctitle
1473         # Check whether --enable-proctitle or --disable-proctitle was given.
1474 if test "${enable_proctitle+set}" = set; then
1475   enableval="$enable_proctitle"
1476   
1477         ol_arg=invalid
1478         for ol_val in auto yes no ; do
1479                 if test "$enableval" = "$ol_val" ; then
1480                         ol_arg="$ol_val"
1481                 fi
1482         done
1483         if test "$ol_arg" = "invalid" ; then
1484                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1485         fi
1486         ol_enable_proctitle="$ol_arg"
1487
1488 else
1489         ol_enable_proctitle="yes"
1490 fi
1491 # end --enable-proctitle
1492 ol_enable_referrals=${ol_enable_referrals-no}
1493 ol_enable_kbind=${ol_enable_kbind-no}
1494 # OpenLDAP --enable-ipv6
1495         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1496 if test "${enable_ipv6+set}" = set; then
1497   enableval="$enable_ipv6"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1507         fi
1508         ol_enable_ipv6="$ol_arg"
1509
1510 else
1511         ol_enable_ipv6="auto"
1512 fi
1513 # end --enable-ipv6
1514 # OpenLDAP --enable-local
1515         # Check whether --enable-local or --disable-local was given.
1516 if test "${enable_local+set}" = set; then
1517   enableval="$enable_local"
1518   
1519         ol_arg=invalid
1520         for ol_val in auto yes no ; do
1521                 if test "$enableval" = "$ol_val" ; then
1522                         ol_arg="$ol_val"
1523                 fi
1524         done
1525         if test "$ol_arg" = "invalid" ; then
1526                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1527         fi
1528         ol_enable_local="$ol_arg"
1529
1530 else
1531         ol_enable_local="auto"
1532 fi
1533 # end --enable-local
1534
1535
1536 # OpenLDAP --with-cyrus_sasl
1537         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1538 if test "${with_cyrus_sasl+set}" = set; then
1539   withval="$with_cyrus_sasl"
1540   
1541         ol_arg=invalid
1542         for ol_val in auto yes no  ; do
1543                 if test "$withval" = "$ol_val" ; then
1544                         ol_arg="$ol_val"
1545                 fi
1546         done
1547         if test "$ol_arg" = "invalid" ; then
1548                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1549         fi
1550         ol_with_cyrus_sasl="$ol_arg"
1551
1552 else
1553         ol_with_cyrus_sasl="auto"
1554 fi
1555 # end --with-cyrus_sasl
1556
1557 # OpenLDAP --with-fetch
1558         # Check whether --with-fetch or --without-fetch was given.
1559 if test "${with_fetch+set}" = set; then
1560   withval="$with_fetch"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no  ; do
1564                 if test "$withval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1570         fi
1571         ol_with_fetch="$ol_arg"
1572
1573 else
1574         ol_with_fetch="auto"
1575 fi
1576 # end --with-fetch
1577
1578 ol_with_kerberos=${ol_with_kerberos-auto}
1579 # OpenLDAP --with-threads
1580         # Check whether --with-threads or --without-threads was given.
1581 if test "${with_threads+set}" = set; then
1582   withval="$with_threads"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1586                 if test "$withval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1592         fi
1593         ol_with_threads="$ol_arg"
1594
1595 else
1596         ol_with_threads="auto"
1597 fi
1598 # end --with-threads
1599
1600 # OpenLDAP --with-tls
1601         # Check whether --with-tls or --without-tls was given.
1602 if test "${with_tls+set}" = set; then
1603   withval="$with_tls"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto ssleay openssl yes no  ; do
1607                 if test "$withval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1613         fi
1614         ol_with_tls="$ol_arg"
1615
1616 else
1617         ol_with_tls="auto"
1618 fi
1619 # end --with-tls
1620
1621 # OpenLDAP --with-yielding_select
1622         # Check whether --with-yielding_select or --without-yielding_select was given.
1623 if test "${with_yielding_select+set}" = set; then
1624   withval="$with_yielding_select"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto yes no manual  ; do
1628                 if test "$withval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1634         fi
1635         ol_with_yielding_select="$ol_arg"
1636
1637 else
1638         ol_with_yielding_select="auto"
1639 fi
1640 # end --with-yielding_select
1641
1642 # OpenLDAP --with-multiple_precision
1643         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1644 if test "${with_multiple_precision+set}" = set; then
1645   withval="$with_multiple_precision"
1646   
1647         ol_arg=invalid
1648         for ol_val in auto bignum gmp yes no  ; do
1649                 if test "$withval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1655         fi
1656         ol_with_multiple_precision="$ol_arg"
1657
1658 else
1659         ol_with_multiple_precision="auto"
1660 fi
1661 # end --with-multiple_precision
1662
1663
1664
1665 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1666 if test "${with_xxslapdoptions+set}" = set; then
1667   withval="$with_xxslapdoptions"
1668   :
1669 fi
1670
1671 # OpenLDAP --enable-slapd
1672         # Check whether --enable-slapd or --disable-slapd was given.
1673 if test "${enable_slapd+set}" = set; then
1674   enableval="$enable_slapd"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1684         fi
1685         ol_enable_slapd="$ol_arg"
1686
1687 else
1688         ol_enable_slapd="yes"
1689 fi
1690 # end --enable-slapd
1691 # OpenLDAP --enable-aci
1692         # Check whether --enable-aci or --disable-aci was given.
1693 if test "${enable_aci+set}" = set; then
1694   enableval="$enable_aci"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1704         fi
1705         ol_enable_aci="$ol_arg"
1706
1707 else
1708         ol_enable_aci="no"
1709 fi
1710 # end --enable-aci
1711 # OpenLDAP --enable-cleartext
1712         # Check whether --enable-cleartext or --disable-cleartext was given.
1713 if test "${enable_cleartext+set}" = set; then
1714   enableval="$enable_cleartext"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1724         fi
1725         ol_enable_cleartext="$ol_arg"
1726
1727 else
1728         ol_enable_cleartext="yes"
1729 fi
1730 # end --enable-cleartext
1731 # OpenLDAP --enable-crypt
1732         # Check whether --enable-crypt or --disable-crypt was given.
1733 if test "${enable_crypt+set}" = set; then
1734   enableval="$enable_crypt"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1744         fi
1745         ol_enable_crypt="$ol_arg"
1746
1747 else
1748         ol_enable_crypt="no"
1749 fi
1750 # end --enable-crypt
1751 # OpenLDAP --enable-lmpasswd
1752         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1753 if test "${enable_lmpasswd+set}" = set; then
1754   enableval="$enable_lmpasswd"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_lmpasswd="$ol_arg"
1766
1767 else
1768         ol_enable_lmpasswd="no"
1769 fi
1770 # end --enable-lmpasswd
1771 # OpenLDAP --enable-spasswd
1772         # Check whether --enable-spasswd or --disable-spasswd was given.
1773 if test "${enable_spasswd+set}" = set; then
1774   enableval="$enable_spasswd"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1784         fi
1785         ol_enable_spasswd="$ol_arg"
1786
1787 else
1788         ol_enable_spasswd="no"
1789 fi
1790 # end --enable-spasswd
1791 # OpenLDAP --enable-modules
1792         # Check whether --enable-modules or --disable-modules was given.
1793 if test "${enable_modules+set}" = set; then
1794   enableval="$enable_modules"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1804         fi
1805         ol_enable_modules="$ol_arg"
1806
1807 else
1808         ol_enable_modules="no"
1809 fi
1810 # end --enable-modules
1811 ol_enable_multimaster=${ol_enable_multimaster-no}
1812 # OpenLDAP --enable-rewrite
1813         # Check whether --enable-rewrite or --disable-rewrite was given.
1814 if test "${enable_rewrite+set}" = set; then
1815   enableval="$enable_rewrite"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1825         fi
1826         ol_enable_rewrite="$ol_arg"
1827
1828 else
1829         ol_enable_rewrite="auto"
1830 fi
1831 # end --enable-rewrite
1832 # OpenLDAP --enable-rlookups
1833         # Check whether --enable-rlookups or --disable-rlookups was given.
1834 if test "${enable_rlookups+set}" = set; then
1835   enableval="$enable_rlookups"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1845         fi
1846         ol_enable_rlookups="$ol_arg"
1847
1848 else
1849         ol_enable_rlookups="no"
1850 fi
1851 # end --enable-rlookups
1852 # OpenLDAP --enable-slapi
1853         # Check whether --enable-slapi or --disable-slapi was given.
1854 if test "${enable_slapi+set}" = set; then
1855   enableval="$enable_slapi"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1865         fi
1866         ol_enable_slapi="$ol_arg"
1867
1868 else
1869         ol_enable_slapi="no"
1870 fi
1871 # end --enable-slapi
1872 # OpenLDAP --enable-slp
1873         # Check whether --enable-slp or --disable-slp was given.
1874 if test "${enable_slp+set}" = set; then
1875   enableval="$enable_slp"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1885         fi
1886         ol_enable_slp="$ol_arg"
1887
1888 else
1889         ol_enable_slp="no"
1890 fi
1891 # end --enable-slp
1892 # OpenLDAP --enable-wrappers
1893         # Check whether --enable-wrappers or --disable-wrappers was given.
1894 if test "${enable_wrappers+set}" = set; then
1895   enableval="$enable_wrappers"
1896   
1897         ol_arg=invalid
1898         for ol_val in auto yes no ; do
1899                 if test "$enableval" = "$ol_val" ; then
1900                         ol_arg="$ol_val"
1901                 fi
1902         done
1903         if test "$ol_arg" = "invalid" ; then
1904                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1905         fi
1906         ol_enable_wrappers="$ol_arg"
1907
1908 else
1909         ol_enable_wrappers="no"
1910 fi
1911 # end --enable-wrappers
1912
1913 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1914         passwd perl relay shell sql"
1915
1916 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1917 if test "${with_xxslapbackends+set}" = set; then
1918   withval="$with_xxslapbackends"
1919   :
1920 fi
1921
1922
1923 # OpenLDAP --enable-backends
1924         # Check whether --enable-backends or --disable-backends was given.
1925 if test "${enable_backends+set}" = set; then
1926   enableval="$enable_backends"
1927   
1928         ol_arg=invalid
1929         for ol_val in no yes mod ; do
1930                 if test "$enableval" = "$ol_val" ; then
1931                         ol_arg="$ol_val"
1932                 fi
1933         done
1934         if test "$ol_arg" = "invalid" ; then
1935                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1936         fi
1937         ol_enable_backends="$ol_arg"
1938
1939 else
1940         ol_enable_backends="no"
1941 fi
1942 # end --enable-backends
1943 # OpenLDAP --enable-bdb
1944         # Check whether --enable-bdb or --disable-bdb was given.
1945 if test "${enable_bdb+set}" = set; then
1946   enableval="$enable_bdb"
1947   
1948         ol_arg=invalid
1949         for ol_val in no yes mod ; do
1950                 if test "$enableval" = "$ol_val" ; then
1951                         ol_arg="$ol_val"
1952                 fi
1953         done
1954         if test "$ol_arg" = "invalid" ; then
1955                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1956         fi
1957         ol_enable_bdb="$ol_arg"
1958
1959 else
1960         ol_enable_bdb="yes"
1961 fi
1962 # end --enable-bdb
1963 # OpenLDAP --enable-dnssrv
1964         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1965 if test "${enable_dnssrv+set}" = set; then
1966   enableval="$enable_dnssrv"
1967   
1968         ol_arg=invalid
1969         for ol_val in no yes mod ; do
1970                 if test "$enableval" = "$ol_val" ; then
1971                         ol_arg="$ol_val"
1972                 fi
1973         done
1974         if test "$ol_arg" = "invalid" ; then
1975                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1976         fi
1977         ol_enable_dnssrv="$ol_arg"
1978
1979 else
1980         ol_enable_dnssrv="no"
1981 fi
1982 # end --enable-dnssrv
1983 # OpenLDAP --enable-hdb
1984         # Check whether --enable-hdb or --disable-hdb was given.
1985 if test "${enable_hdb+set}" = set; then
1986   enableval="$enable_hdb"
1987   
1988         ol_arg=invalid
1989         for ol_val in no yes mod ; do
1990                 if test "$enableval" = "$ol_val" ; then
1991                         ol_arg="$ol_val"
1992                 fi
1993         done
1994         if test "$ol_arg" = "invalid" ; then
1995                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1996         fi
1997         ol_enable_hdb="$ol_arg"
1998
1999 else
2000         ol_enable_hdb="yes"
2001 fi
2002 # end --enable-hdb
2003 # OpenLDAP --enable-ldap
2004         # Check whether --enable-ldap or --disable-ldap was given.
2005 if test "${enable_ldap+set}" = set; then
2006   enableval="$enable_ldap"
2007   
2008         ol_arg=invalid
2009         for ol_val in no yes mod ; do
2010                 if test "$enableval" = "$ol_val" ; then
2011                         ol_arg="$ol_val"
2012                 fi
2013         done
2014         if test "$ol_arg" = "invalid" ; then
2015                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2016         fi
2017         ol_enable_ldap="$ol_arg"
2018
2019 else
2020         ol_enable_ldap="no"
2021 fi
2022 # end --enable-ldap
2023 # OpenLDAP --enable-ldbm
2024         # Check whether --enable-ldbm or --disable-ldbm was given.
2025 if test "${enable_ldbm+set}" = set; then
2026   enableval="$enable_ldbm"
2027   
2028         ol_arg=invalid
2029         for ol_val in no yes mod ; do
2030                 if test "$enableval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2036         fi
2037         ol_enable_ldbm="$ol_arg"
2038
2039 else
2040         ol_enable_ldbm="no"
2041 fi
2042 # end --enable-ldbm
2043 # OpenLDAP --with-ldbm_api
2044         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2045 if test "${with_ldbm_api+set}" = set; then
2046   withval="$with_ldbm_api"
2047   
2048         ol_arg=invalid
2049         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2050                 if test "$withval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2056         fi
2057         ol_with_ldbm_api="$ol_arg"
2058
2059 else
2060         ol_with_ldbm_api="auto"
2061 fi
2062 # end --with-ldbm_api
2063
2064 # OpenLDAP --with-ldbm_type
2065         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2066 if test "${with_ldbm_type+set}" = set; then
2067   withval="$with_ldbm_type"
2068   
2069         ol_arg=invalid
2070         for ol_val in auto btree hash ; do
2071                 if test "$withval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2077         fi
2078         ol_with_ldbm_type="$ol_arg"
2079
2080 else
2081         ol_with_ldbm_type="auto"
2082 fi
2083 # end --with-ldbm_type
2084
2085 # OpenLDAP --enable-meta
2086         # Check whether --enable-meta or --disable-meta was given.
2087 if test "${enable_meta+set}" = set; then
2088   enableval="$enable_meta"
2089   
2090         ol_arg=invalid
2091         for ol_val in no yes mod ; do
2092                 if test "$enableval" = "$ol_val" ; then
2093                         ol_arg="$ol_val"
2094                 fi
2095         done
2096         if test "$ol_arg" = "invalid" ; then
2097                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2098         fi
2099         ol_enable_meta="$ol_arg"
2100
2101 else
2102         ol_enable_meta="no"
2103 fi
2104 # end --enable-meta
2105 # OpenLDAP --enable-monitor
2106         # Check whether --enable-monitor or --disable-monitor was given.
2107 if test "${enable_monitor+set}" = set; then
2108   enableval="$enable_monitor"
2109   
2110         ol_arg=invalid
2111         for ol_val in no yes mod ; do
2112                 if test "$enableval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2118         fi
2119         ol_enable_monitor="$ol_arg"
2120
2121 else
2122         ol_enable_monitor="yes"
2123 fi
2124 # end --enable-monitor
2125 # OpenLDAP --enable-null
2126         # Check whether --enable-null or --disable-null was given.
2127 if test "${enable_null+set}" = set; then
2128   enableval="$enable_null"
2129   
2130         ol_arg=invalid
2131         for ol_val in no yes mod ; do
2132                 if test "$enableval" = "$ol_val" ; then
2133                         ol_arg="$ol_val"
2134                 fi
2135         done
2136         if test "$ol_arg" = "invalid" ; then
2137                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2138         fi
2139         ol_enable_null="$ol_arg"
2140
2141 else
2142         ol_enable_null="no"
2143 fi
2144 # end --enable-null
2145 # OpenLDAP --enable-passwd
2146         # Check whether --enable-passwd or --disable-passwd was given.
2147 if test "${enable_passwd+set}" = set; then
2148   enableval="$enable_passwd"
2149   
2150         ol_arg=invalid
2151         for ol_val in no yes mod ; do
2152                 if test "$enableval" = "$ol_val" ; then
2153                         ol_arg="$ol_val"
2154                 fi
2155         done
2156         if test "$ol_arg" = "invalid" ; then
2157                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2158         fi
2159         ol_enable_passwd="$ol_arg"
2160
2161 else
2162         ol_enable_passwd="no"
2163 fi
2164 # end --enable-passwd
2165 # OpenLDAP --enable-perl
2166         # Check whether --enable-perl or --disable-perl was given.
2167 if test "${enable_perl+set}" = set; then
2168   enableval="$enable_perl"
2169   
2170         ol_arg=invalid
2171         for ol_val in no yes mod ; do
2172                 if test "$enableval" = "$ol_val" ; then
2173                         ol_arg="$ol_val"
2174                 fi
2175         done
2176         if test "$ol_arg" = "invalid" ; then
2177                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2178         fi
2179         ol_enable_perl="$ol_arg"
2180
2181 else
2182         ol_enable_perl="no"
2183 fi
2184 # end --enable-perl
2185 # OpenLDAP --enable-relay
2186         # Check whether --enable-relay or --disable-relay was given.
2187 if test "${enable_relay+set}" = set; then
2188   enableval="$enable_relay"
2189   
2190         ol_arg=invalid
2191         for ol_val in no yes mod ; do
2192                 if test "$enableval" = "$ol_val" ; then
2193                         ol_arg="$ol_val"
2194                 fi
2195         done
2196         if test "$ol_arg" = "invalid" ; then
2197                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2198         fi
2199         ol_enable_relay="$ol_arg"
2200
2201 else
2202         ol_enable_relay="yes"
2203 fi
2204 # end --enable-relay
2205 # OpenLDAP --enable-shell
2206         # Check whether --enable-shell or --disable-shell was given.
2207 if test "${enable_shell+set}" = set; then
2208   enableval="$enable_shell"
2209   
2210         ol_arg=invalid
2211         for ol_val in no yes mod ; do
2212                 if test "$enableval" = "$ol_val" ; then
2213                         ol_arg="$ol_val"
2214                 fi
2215         done
2216         if test "$ol_arg" = "invalid" ; then
2217                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2218         fi
2219         ol_enable_shell="$ol_arg"
2220
2221 else
2222         ol_enable_shell="no"
2223 fi
2224 # end --enable-shell
2225 # OpenLDAP --enable-sql
2226         # Check whether --enable-sql or --disable-sql was given.
2227 if test "${enable_sql+set}" = set; then
2228   enableval="$enable_sql"
2229   
2230         ol_arg=invalid
2231         for ol_val in no yes mod ; do
2232                 if test "$enableval" = "$ol_val" ; then
2233                         ol_arg="$ol_val"
2234                 fi
2235         done
2236         if test "$ol_arg" = "invalid" ; then
2237                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2238         fi
2239         ol_enable_sql="$ol_arg"
2240
2241 else
2242         ol_enable_sql="no"
2243 fi
2244 # end --enable-sql
2245
2246 Overlays="accesslog denyop dyngroup dynlist glue lastmod ppolicy proxycache \
2247         refint rwm syncprov translucent unique"
2248
2249 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2250 if test "${with_xxslapoverlays+set}" = set; then
2251   withval="$with_xxslapoverlays"
2252   :
2253 fi
2254
2255
2256 # OpenLDAP --enable-overlays
2257         # Check whether --enable-overlays or --disable-overlays was given.
2258 if test "${enable_overlays+set}" = set; then
2259   enableval="$enable_overlays"
2260   
2261         ol_arg=invalid
2262         for ol_val in no yes mod ; do
2263                 if test "$enableval" = "$ol_val" ; then
2264                         ol_arg="$ol_val"
2265                 fi
2266         done
2267         if test "$ol_arg" = "invalid" ; then
2268                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2269         fi
2270         ol_enable_overlays="$ol_arg"
2271
2272 else
2273         ol_enable_overlays="no"
2274 fi
2275 # end --enable-overlays
2276 # OpenLDAP --enable-accesslog
2277         # Check whether --enable-accesslog or --disable-accesslog was given.
2278 if test "${enable_accesslog+set}" = set; then
2279   enableval="$enable_accesslog"
2280   
2281         ol_arg=invalid
2282         for ol_val in no yes mod ; do
2283                 if test "$enableval" = "$ol_val" ; then
2284                         ol_arg="$ol_val"
2285                 fi
2286         done
2287         if test "$ol_arg" = "invalid" ; then
2288                 { echo "configure: error: bad value $enableval for --enable-accesslog" 1>&2; exit 1; }
2289         fi
2290         ol_enable_accesslog="$ol_arg"
2291
2292 else
2293         ol_enable_accesslog="no"
2294 fi
2295 # end --enable-accesslog
2296
2297 # OpenLDAP --enable-denyop
2298         # Check whether --enable-denyop or --disable-denyop was given.
2299 if test "${enable_denyop+set}" = set; then
2300   enableval="$enable_denyop"
2301   
2302         ol_arg=invalid
2303         for ol_val in no yes mod ; do
2304                 if test "$enableval" = "$ol_val" ; then
2305                         ol_arg="$ol_val"
2306                 fi
2307         done
2308         if test "$ol_arg" = "invalid" ; then
2309                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2310         fi
2311         ol_enable_denyop="$ol_arg"
2312
2313 else
2314         ol_enable_denyop="no"
2315 fi
2316 # end --enable-denyop
2317
2318 # OpenLDAP --enable-dyngroup
2319         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2320 if test "${enable_dyngroup+set}" = set; then
2321   enableval="$enable_dyngroup"
2322   
2323         ol_arg=invalid
2324         for ol_val in no yes mod ; do
2325                 if test "$enableval" = "$ol_val" ; then
2326                         ol_arg="$ol_val"
2327                 fi
2328         done
2329         if test "$ol_arg" = "invalid" ; then
2330                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2331         fi
2332         ol_enable_dyngroup="$ol_arg"
2333
2334 else
2335         ol_enable_dyngroup="no"
2336 fi
2337 # end --enable-dyngroup
2338
2339 # OpenLDAP --enable-dynlist
2340         # Check whether --enable-dynlist or --disable-dynlist was given.
2341 if test "${enable_dynlist+set}" = set; then
2342   enableval="$enable_dynlist"
2343   
2344         ol_arg=invalid
2345         for ol_val in no yes mod ; do
2346                 if test "$enableval" = "$ol_val" ; then
2347                         ol_arg="$ol_val"
2348                 fi
2349         done
2350         if test "$ol_arg" = "invalid" ; then
2351                 { echo "configure: error: bad value $enableval for --enable-dynlist" 1>&2; exit 1; }
2352         fi
2353         ol_enable_dynlist="$ol_arg"
2354
2355 else
2356         ol_enable_dynlist="no"
2357 fi
2358 # end --enable-dynlist
2359
2360 # OpenLDAP --enable-glue
2361         # Check whether --enable-glue or --disable-glue was given.
2362 if test "${enable_glue+set}" = set; then
2363   enableval="$enable_glue"
2364   
2365         ol_arg=invalid
2366         for ol_val in no yes mod ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-glue" 1>&2; exit 1; }
2373         fi
2374         ol_enable_glue="$ol_arg"
2375
2376 else
2377         ol_enable_glue="yes"
2378 fi
2379 # end --enable-glue
2380
2381 # OpenLDAP --enable-lastmod
2382         # Check whether --enable-lastmod or --disable-lastmod was given.
2383 if test "${enable_lastmod+set}" = set; then
2384   enableval="$enable_lastmod"
2385   
2386         ol_arg=invalid
2387         for ol_val in no yes mod ; do
2388                 if test "$enableval" = "$ol_val" ; then
2389                         ol_arg="$ol_val"
2390                 fi
2391         done
2392         if test "$ol_arg" = "invalid" ; then
2393                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2394         fi
2395         ol_enable_lastmod="$ol_arg"
2396
2397 else
2398         ol_enable_lastmod="no"
2399 fi
2400 # end --enable-lastmod
2401
2402 # OpenLDAP --enable-ppolicy
2403         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2404 if test "${enable_ppolicy+set}" = set; then
2405   enableval="$enable_ppolicy"
2406   
2407         ol_arg=invalid
2408         for ol_val in no yes mod ; do
2409                 if test "$enableval" = "$ol_val" ; then
2410                         ol_arg="$ol_val"
2411                 fi
2412         done
2413         if test "$ol_arg" = "invalid" ; then
2414                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2415         fi
2416         ol_enable_ppolicy="$ol_arg"
2417
2418 else
2419         ol_enable_ppolicy="no"
2420 fi
2421 # end --enable-ppolicy
2422
2423 # OpenLDAP --enable-proxycache
2424         # Check whether --enable-proxycache or --disable-proxycache was given.
2425 if test "${enable_proxycache+set}" = set; then
2426   enableval="$enable_proxycache"
2427   
2428         ol_arg=invalid
2429         for ol_val in no yes mod ; do
2430                 if test "$enableval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2436         fi
2437         ol_enable_proxycache="$ol_arg"
2438
2439 else
2440         ol_enable_proxycache="no"
2441 fi
2442 # end --enable-proxycache
2443
2444 # OpenLDAP --enable-refint
2445         # Check whether --enable-refint or --disable-refint was given.
2446 if test "${enable_refint+set}" = set; then
2447   enableval="$enable_refint"
2448   
2449         ol_arg=invalid
2450         for ol_val in no yes mod ; do
2451                 if test "$enableval" = "$ol_val" ; then
2452                         ol_arg="$ol_val"
2453                 fi
2454         done
2455         if test "$ol_arg" = "invalid" ; then
2456                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2457         fi
2458         ol_enable_refint="$ol_arg"
2459
2460 else
2461         ol_enable_refint="no"
2462 fi
2463 # end --enable-refint
2464
2465 # OpenLDAP --enable-rwm
2466         # Check whether --enable-rwm or --disable-rwm was given.
2467 if test "${enable_rwm+set}" = set; then
2468   enableval="$enable_rwm"
2469   
2470         ol_arg=invalid
2471         for ol_val in no yes mod ; do
2472                 if test "$enableval" = "$ol_val" ; then
2473                         ol_arg="$ol_val"
2474                 fi
2475         done
2476         if test "$ol_arg" = "invalid" ; then
2477                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2478         fi
2479         ol_enable_rwm="$ol_arg"
2480
2481 else
2482         ol_enable_rwm="no"
2483 fi
2484 # end --enable-rwm
2485
2486 # OpenLDAP --enable-syncprov
2487         # Check whether --enable-syncprov or --disable-syncprov was given.
2488 if test "${enable_syncprov+set}" = set; then
2489   enableval="$enable_syncprov"
2490   
2491         ol_arg=invalid
2492         for ol_val in no yes mod ; do
2493                 if test "$enableval" = "$ol_val" ; then
2494                         ol_arg="$ol_val"
2495                 fi
2496         done
2497         if test "$ol_arg" = "invalid" ; then
2498                 { echo "configure: error: bad value $enableval for --enable-syncprov" 1>&2; exit 1; }
2499         fi
2500         ol_enable_syncprov="$ol_arg"
2501
2502 else
2503         ol_enable_syncprov="yes"
2504 fi
2505 # end --enable-syncprov
2506
2507 # OpenLDAP --enable-translucent
2508         # Check whether --enable-translucent or --disable-translucent was given.
2509 if test "${enable_translucent+set}" = set; then
2510   enableval="$enable_translucent"
2511   
2512         ol_arg=invalid
2513         for ol_val in no yes mod ; do
2514                 if test "$enableval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { echo "configure: error: bad value $enableval for --enable-translucent" 1>&2; exit 1; }
2520         fi
2521         ol_enable_translucent="$ol_arg"
2522
2523 else
2524         ol_enable_translucent="no"
2525 fi
2526 # end --enable-translucent
2527
2528 # OpenLDAP --enable-unique
2529         # Check whether --enable-unique or --disable-unique was given.
2530 if test "${enable_unique+set}" = set; then
2531   enableval="$enable_unique"
2532   
2533         ol_arg=invalid
2534         for ol_val in no yes mod ; do
2535                 if test "$enableval" = "$ol_val" ; then
2536                         ol_arg="$ol_val"
2537                 fi
2538         done
2539         if test "$ol_arg" = "invalid" ; then
2540                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2541         fi
2542         ol_enable_unique="$ol_arg"
2543
2544 else
2545         ol_enable_unique="no"
2546 fi
2547 # end --enable-unique
2548
2549
2550
2551 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2552 if test "${with_xxslurpdoptions+set}" = set; then
2553   withval="$with_xxslurpdoptions"
2554   :
2555 fi
2556
2557 # OpenLDAP --enable-slurpd
2558         # Check whether --enable-slurpd or --disable-slurpd was given.
2559 if test "${enable_slurpd+set}" = set; then
2560   enableval="$enable_slurpd"
2561   
2562         ol_arg=invalid
2563         for ol_val in auto yes no ; do
2564                 if test "$enableval" = "$ol_val" ; then
2565                         ol_arg="$ol_val"
2566                 fi
2567         done
2568         if test "$ol_arg" = "invalid" ; then
2569                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2570         fi
2571         ol_enable_slurpd="$ol_arg"
2572
2573 else
2574         ol_enable_slurpd="auto"
2575 fi
2576 # end --enable-slurpd
2577
2578 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2579 if test "${with_xxliboptions+set}" = set; then
2580   withval="$with_xxliboptions"
2581   :
2582 fi
2583
2584 # Check whether --enable-static or --disable-static was given.
2585 if test "${enable_static+set}" = set; then
2586   enableval="$enable_static"
2587   p=${PACKAGE-default}
2588 case $enableval in
2589 yes) enable_static=yes ;;
2590 no) enable_static=no ;;
2591 *)
2592   enable_static=no
2593   # Look at the argument we got.  We use all the common list separators.
2594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2595   for pkg in $enableval; do
2596     if test "X$pkg" = "X$p"; then
2597       enable_static=yes
2598     fi
2599   done
2600   IFS="$ac_save_ifs"
2601   ;;
2602 esac
2603 else
2604   enable_static=yes
2605 fi
2606
2607 # Check whether --enable-shared or --disable-shared was given.
2608 if test "${enable_shared+set}" = set; then
2609   enableval="$enable_shared"
2610   p=${PACKAGE-default}
2611 case $enableval in
2612 yes) enable_shared=yes ;;
2613 no) enable_shared=no ;;
2614 *)
2615   enable_shared=no
2616   # Look at the argument we got.  We use all the common list separators.
2617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2618   for pkg in $enableval; do
2619     if test "X$pkg" = "X$p"; then
2620       enable_shared=yes
2621     fi
2622   done
2623   IFS="$ac_save_ifs"
2624   ;;
2625 esac
2626 else
2627   enable_shared=yes
2628 fi
2629
2630
2631
2632 # Activate any backends that were not explicitly enabled.
2633 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2634 if test $ol_enable_backends != no ; then
2635         for i in $Backends; do
2636                 eval "ol_tmp=\$ol_enable_$i"
2637                 if test $ol_tmp = no ; then
2638                         eval "ol_enable_$i=$ol_enable_backends"
2639                 fi
2640         done
2641 fi
2642 # Activate the overlays
2643 if test $ol_enable_overlays != no ; then
2644         for i in $Overlays; do
2645                 eval "ol_tmp=\$ol_enable_$i"
2646                 if test $ol_tmp = no ; then
2647                         eval "ol_enable_$i=$ol_enable_overlays"
2648                 fi
2649         done
2650 fi
2651
2652 # validate options
2653 if test $ol_enable_slapd = no ; then
2654                 if test $ol_enable_slapi = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2656         fi
2657         if test $ol_enable_backends != no ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2659         fi
2660         for i in $Backends; do
2661                 eval "ol_tmp=\$ol_enable_$i"
2662                 if test $ol_tmp != no ; then
2663                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2664                         eval "ol_enable_$i=no"
2665                 fi
2666         done
2667         if test $ol_enable_modules = yes ; then
2668                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2669         fi
2670         if test $ol_enable_multimaster = yes ; then
2671                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2672         fi
2673         if test $ol_enable_wrappers = yes ; then
2674                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2675         fi
2676         if test $ol_enable_rlookups = yes ; then
2677                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2678         fi
2679         if test $ol_enable_aci = yes ; then
2680                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2681         fi
2682         if test $ol_with_ldbm_api != auto ; then
2683                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2684         fi
2685         if test $ol_with_ldbm_type != auto ; then
2686                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2687         fi
2688         if test $ol_enable_slurpd = yes ; then
2689                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2690         fi
2691         if test $ol_enable_rewrite = yes ; then
2692                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2693         fi
2694                 if test $ol_enable_overlays != no ; then
2695                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2696         fi
2697         for i in $Overlays; 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
2705         # force settings to no
2706         ol_enable_slapi=no
2707
2708         ol_enable_backends=no
2709         ol_enable_overlays=no
2710         ol_enable_modules=no
2711         ol_enable_multimaster=no
2712         ol_enable_rlookups=no
2713         ol_enable_aci=no
2714         ol_enable_wrappers=no
2715
2716         ol_with_ldbm_api=no
2717         ol_with_ldbm_type=no
2718
2719         ol_enable_slurpd=no
2720
2721         ol_enable_rewrite=no
2722
2723 elif test $ol_enable_ldbm = no ; then
2724         
2725         if test $ol_with_ldbm_api != auto ; then
2726                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2727         fi
2728
2729         if test $ol_with_ldbm_type != auto ; then
2730                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2731         fi
2732
2733         if test $ol_enable_modules != yes -a \
2734                 $ol_enable_bdb = no -a \
2735                 $ol_enable_dnssrv = no -a \
2736                 $ol_enable_hdb = no -a \
2737                 $ol_enable_ldap = no -a \
2738                 $ol_enable_meta = no -a \
2739                 $ol_enable_monitor = no -a \
2740                 $ol_enable_null = no -a \
2741                 $ol_enable_passwd = no -a \
2742                 $ol_enable_perl = no -a \
2743                 $ol_enable_relay = no -a \
2744                 $ol_enable_shell = no -a \
2745                 $ol_enable_sql = no ; then
2746
2747                 if test $ol_enable_slapd = yes ; then
2748                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2749                 else
2750                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2751                         ol_enable_slapd=no
2752                 fi
2753         fi
2754
2755         ol_with_ldbm_api=no
2756         ol_with_ldbm_type=no
2757
2758         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2759                 ol_with_ldbm_api=berkeley
2760         fi
2761
2762 else
2763                 if test $ol_with_ldbm_api = gdbm -a \
2764                 $ol_with_ldbm_type = btree ; then
2765                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2766         fi
2767         if test $ol_with_ldbm_api = mdbm -a \
2768                 $ol_with_ldbm_type = btree ; then
2769                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2770         fi
2771         if test $ol_with_ldbm_api = ndbm -a \
2772                 $ol_with_ldbm_type = btree ; then
2773                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2774         fi
2775
2776         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2777                 if test $ol_with_ldbm_api = auto ; then
2778                         ol_with_ldbm_api=berkeley
2779                 elif test $ol_with_ldbm_api != berkeley ; then
2780                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2781                 fi
2782         fi
2783 fi
2784
2785 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2786         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2787 fi
2788
2789 if test $ol_enable_slurpd = yes ; then
2790                 if test $ol_with_threads = no ; then
2791                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2792         fi
2793 fi
2794
2795 if test $ol_enable_lmpasswd = yes ; then
2796         if test $ol_with_tls = no ; then
2797                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2798         fi
2799 fi
2800
2801 if test $ol_enable_kbind = yes ; then
2802         if test $ol_with_kerberos = no ; then
2803                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2804         elif test $ol_with_kerberos = auto ; then
2805                 ol_with_kerberos=yes
2806         fi
2807
2808 elif test $ol_enable_kbind = no ; then
2809         if test $ol_with_kerberos = auto ; then
2810                 ol_with_kerberos=no
2811         elif test $ol_with_kerberos != no ; then
2812                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2813                 ol_with_kerberos=no
2814         fi
2815 fi
2816
2817 if test $ol_enable_spasswd = yes ; then
2818         if test $ol_with_cyrus_sasl = no ; then
2819                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2820         fi
2821         ol_with_cyrus_sasl=yes
2822 fi
2823
2824 echo "$ac_t""done" 1>&6
2825
2826 LDAP_LIBS=
2827 LDBM_LIBS=
2828 LTHREAD_LIBS=
2829 LUTIL_LIBS=
2830
2831 SLAPD_LIBS=
2832 SLURPD_LIBS=
2833
2834 BUILD_SLAPD=no
2835 BUILD_SLURPD=no
2836
2837 BUILD_THREAD=no
2838
2839 BUILD_SLAPI=no
2840 SLAPD_SLAPI_DEPEND=
2841
2842 BUILD_BDB=no
2843 BUILD_DNSSRV=no
2844 BUILD_HDB=no
2845 BUILD_LDAP=no
2846 BUILD_LDBM=no
2847 BUILD_META=no
2848 BUILD_MONITOR=no
2849 BUILD_NULL=no
2850 BUILD_PASSWD=no
2851 BUILD_PERL=no
2852 BUILD_RELAY=no
2853 BUILD_SHELL=no
2854 BUILD_SQL=no
2855
2856 BUILD_ACCESSLOG=no
2857 BUILD_DENYOP=no
2858 BUILD_DYNGROUP=no
2859 BUILD_DYNLIST=no
2860 BUILD_GLUE=no
2861 BUILD_LASTMOD=no
2862 BUILD_PPOLICY=no
2863 BUILD_PROXYCACHE=no
2864 BUILD_REFINT=no
2865 BUILD_RWM=no
2866 BUILD_SYNCPROV=no
2867 BUILD_TRANSLUCENT=no
2868 BUILD_UNIQUE=no
2869
2870 SLAPD_STATIC_OVERLAYS=
2871 SLAPD_DYNAMIC_OVERLAYS=
2872
2873 SLAPD_MODULES_LDFLAGS=
2874 SLAPD_MODULES_CPPFLAGS=
2875
2876 SLAPD_STATIC_BACKENDS=back-ldif
2877 SLAPD_DYNAMIC_BACKENDS=
2878
2879 SLAPD_PERL_LDFLAGS=
2880 MOD_PERL_LDFLAGS=
2881 PERL_CPPFLAGS=
2882
2883 SLAPD_SQL_LDFLAGS=
2884 SLAPD_SQL_LIBS=
2885 SLAPD_SQL_INCLUDES=
2886
2887 KRB4_LIBS=
2888 KRB5_LIBS=
2889 SASL_LIBS=
2890 TLS_LIBS=
2891 MODULES_LIBS=
2892 SLAPI_LIBS=
2893 LIBSLAPI=
2894 LIBSLAPITOOLS=
2895 AUTH_LIBS=
2896
2897 SLAPD_SLP_LIBS=
2898 SLAPD_GMP_LIBS=
2899
2900
2901 cat >> confdefs.h <<\EOF
2902 #define HAVE_MKVERSION 1
2903 EOF
2904
2905
2906
2907
2908 ol_aix_threads=no
2909 case "$target" in
2910 *-*-aix*)       if test -z "$CC" ; then
2911                 case "$ol_with_threads" in
2912                 auto | yes |  posix) ol_aix_threads=yes ;;
2913                 esac
2914         fi
2915 ;;
2916 esac
2917
2918 if test $ol_aix_threads = yes ; then
2919         if test -z "${CC}" ; then
2920                 for ac_prog in cc_r xlc_r cc
2921 do
2922 # Extract the first word of "$ac_prog", so it can be a program name with args.
2923 set dummy $ac_prog; ac_word=$2
2924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2925 echo "configure:2926: checking for $ac_word" >&5
2926 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2927   echo $ac_n "(cached) $ac_c" 1>&6
2928 else
2929   if test -n "$CC"; then
2930   ac_cv_prog_CC="$CC" # Let the user override the test.
2931 else
2932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2933   ac_dummy="$PATH"
2934   for ac_dir in $ac_dummy; do
2935     test -z "$ac_dir" && ac_dir=.
2936     if test -f $ac_dir/$ac_word; then
2937       ac_cv_prog_CC="$ac_prog"
2938       break
2939     fi
2940   done
2941   IFS="$ac_save_ifs"
2942 fi
2943 fi
2944 CC="$ac_cv_prog_CC"
2945 if test -n "$CC"; then
2946   echo "$ac_t""$CC" 1>&6
2947 else
2948   echo "$ac_t""no" 1>&6
2949 fi
2950
2951 test -n "$CC" && break
2952 done
2953
2954
2955                 if test "$CC" = cc ; then
2956                                                 if test $ol_with_threads != auto ; then
2957                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2958                         else
2959                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2960                         fi
2961                         ol_with_threads=no
2962                 fi
2963         fi
2964
2965         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2966                 ol_with_threads=posix
2967                 ol_cv_pthread_create=yes
2968         fi
2969 fi
2970
2971 if test -z "${CC}"; then
2972         for ac_prog in cc gcc
2973 do
2974 # Extract the first word of "$ac_prog", so it can be a program name with args.
2975 set dummy $ac_prog; ac_word=$2
2976 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2977 echo "configure:2978: checking for $ac_word" >&5
2978 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2979   echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981   if test -n "$CC"; then
2982   ac_cv_prog_CC="$CC" # Let the user override the test.
2983 else
2984   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2985   ac_dummy="$PATH"
2986   for ac_dir in $ac_dummy; do
2987     test -z "$ac_dir" && ac_dir=.
2988     if test -f $ac_dir/$ac_word; then
2989       ac_cv_prog_CC="$ac_prog"
2990       break
2991     fi
2992   done
2993   IFS="$ac_save_ifs"
2994 fi
2995 fi
2996 CC="$ac_cv_prog_CC"
2997 if test -n "$CC"; then
2998   echo "$ac_t""$CC" 1>&6
2999 else
3000   echo "$ac_t""no" 1>&6
3001 fi
3002
3003 test -n "$CC" && break
3004 done
3005 test -n "$CC" || CC="missing"
3006
3007
3008         if test "${CC}" = "missing" ; then
3009                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3010         fi
3011 fi
3012
3013 if test -z "${AR}"; then
3014         for ac_prog in ar gar
3015 do
3016 # Extract the first word of "$ac_prog", so it can be a program name with args.
3017 set dummy $ac_prog; ac_word=$2
3018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3019 echo "configure:3020: checking for $ac_word" >&5
3020 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   if test -n "$AR"; then
3024   ac_cv_prog_AR="$AR" # Let the user override the test.
3025 else
3026   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3027   ac_dummy="$PATH"
3028   for ac_dir in $ac_dummy; do
3029     test -z "$ac_dir" && ac_dir=.
3030     if test -f $ac_dir/$ac_word; then
3031       ac_cv_prog_AR="$ac_prog"
3032       break
3033     fi
3034   done
3035   IFS="$ac_save_ifs"
3036 fi
3037 fi
3038 AR="$ac_cv_prog_AR"
3039 if test -n "$AR"; then
3040   echo "$ac_t""$AR" 1>&6
3041 else
3042   echo "$ac_t""no" 1>&6
3043 fi
3044
3045 test -n "$AR" && break
3046 done
3047 test -n "$AR" || AR="missing"
3048
3049
3050         if test "${AR}" = "missing" ; then
3051                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3052         fi
3053 fi
3054
3055
3056
3057 # Find the correct PATH separator.  Usually this is `:', but
3058 # DJGPP uses `;' like DOS.
3059 if test "X${PATH_SEPARATOR+set}" != Xset; then
3060   UNAME=${UNAME-`uname 2>/dev/null`}
3061   case X$UNAME in
3062     *-DOS) lt_cv_sys_path_separator=';' ;;
3063     *)     lt_cv_sys_path_separator=':' ;;
3064   esac
3065   PATH_SEPARATOR=$lt_cv_sys_path_separator
3066 fi
3067
3068 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3069 echo "configure:3070: checking for Cygwin environment" >&5
3070 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   cat > conftest.$ac_ext <<EOF
3074 #line 3075 "configure"
3075 #include "confdefs.h"
3076
3077 int main() {
3078
3079 #ifndef __CYGWIN__
3080 #define __CYGWIN__ __CYGWIN32__
3081 #endif
3082 return __CYGWIN__;
3083 ; return 0; }
3084 EOF
3085 if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086   rm -rf conftest*
3087   ac_cv_cygwin=yes
3088 else
3089   echo "configure: failed program was:" >&5
3090   cat conftest.$ac_ext >&5
3091   rm -rf conftest*
3092   ac_cv_cygwin=no
3093 fi
3094 rm -f conftest*
3095 fi
3096
3097 echo "$ac_t""$ac_cv_cygwin" 1>&6
3098 CYGWIN=
3099 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3100 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3101 echo "configure:3102: checking for mingw32 environment" >&5
3102 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3103   echo $ac_n "(cached) $ac_c" 1>&6
3104 else
3105   cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108
3109 int main() {
3110 return __MINGW32__;
3111 ; return 0; }
3112 EOF
3113 if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3114   rm -rf conftest*
3115   ac_cv_mingw32=yes
3116 else
3117   echo "configure: failed program was:" >&5
3118   cat conftest.$ac_ext >&5
3119   rm -rf conftest*
3120   ac_cv_mingw32=no
3121 fi
3122 rm -f conftest*
3123 fi
3124
3125 echo "$ac_t""$ac_cv_mingw32" 1>&6
3126 MINGW32=
3127 test "$ac_cv_mingw32" = yes && MINGW32=yes
3128 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3129 echo "configure:3130: checking for EMX OS/2 environment" >&5
3130 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3131   echo $ac_n "(cached) $ac_c" 1>&6
3132 else
3133   cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136
3137 int main() {
3138 return __EMX__;
3139 ; return 0; }
3140 EOF
3141 if { (eval echo configure:3142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3142   rm -rf conftest*
3143   ac_cv_emxos2=yes
3144 else
3145   echo "configure: failed program was:" >&5
3146   cat conftest.$ac_ext >&5
3147   rm -rf conftest*
3148   ac_cv_emxos2=no
3149 fi
3150 rm -f conftest*
3151 fi
3152
3153 echo "$ac_t""$ac_cv_emxos2" 1>&6
3154 EMXOS2=
3155 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3156 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3157 echo "configure:3158: checking how to run the C preprocessor" >&5
3158 # On Suns, sometimes $CPP names a directory.
3159 if test -n "$CPP" && test -d "$CPP"; then
3160   CPP=
3161 fi
3162 if test -z "$CPP"; then
3163 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3164   echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166     # This must be in double quotes, not single quotes, because CPP may get
3167   # substituted into the Makefile and "${CC-cc}" will confuse make.
3168   CPP="${CC-cc} -E"
3169   # On the NeXT, cc -E runs the code through the compiler's parser,
3170   # not just through cpp.
3171   cat > conftest.$ac_ext <<EOF
3172 #line 3173 "configure"
3173 #include "confdefs.h"
3174 #include <assert.h>
3175 Syntax Error
3176 EOF
3177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3178 { (eval echo configure:3179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3180 if test -z "$ac_err"; then
3181   :
3182 else
3183   echo "$ac_err" >&5
3184   echo "configure: failed program was:" >&5
3185   cat conftest.$ac_ext >&5
3186   rm -rf conftest*
3187   CPP="${CC-cc} -E -traditional-cpp"
3188   cat > conftest.$ac_ext <<EOF
3189 #line 3190 "configure"
3190 #include "confdefs.h"
3191 #include <assert.h>
3192 Syntax Error
3193 EOF
3194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3195 { (eval echo configure:3196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3197 if test -z "$ac_err"; then
3198   :
3199 else
3200   echo "$ac_err" >&5
3201   echo "configure: failed program was:" >&5
3202   cat conftest.$ac_ext >&5
3203   rm -rf conftest*
3204   CPP="${CC-cc} -nologo -E"
3205   cat > conftest.$ac_ext <<EOF
3206 #line 3207 "configure"
3207 #include "confdefs.h"
3208 #include <assert.h>
3209 Syntax Error
3210 EOF
3211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3212 { (eval echo configure:3213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3214 if test -z "$ac_err"; then
3215   :
3216 else
3217   echo "$ac_err" >&5
3218   echo "configure: failed program was:" >&5
3219   cat conftest.$ac_ext >&5
3220   rm -rf conftest*
3221   CPP=/lib/cpp
3222 fi
3223 rm -f conftest*
3224 fi
3225 rm -f conftest*
3226 fi
3227 rm -f conftest*
3228   ac_cv_prog_CPP="$CPP"
3229 fi
3230   CPP="$ac_cv_prog_CPP"
3231 else
3232   ac_cv_prog_CPP="$CPP"
3233 fi
3234 echo "$ac_t""$CPP" 1>&6
3235
3236 # Check whether --enable-fast-install or --disable-fast-install was given.
3237 if test "${enable_fast_install+set}" = set; then
3238   enableval="$enable_fast_install"
3239   p=${PACKAGE-default}
3240 case $enableval in
3241 yes) enable_fast_install=yes ;;
3242 no) enable_fast_install=no ;;
3243 *)
3244   enable_fast_install=no
3245   # Look at the argument we got.  We use all the common list separators.
3246   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3247   for pkg in $enableval; do
3248     if test "X$pkg" = "X$p"; then
3249       enable_fast_install=yes
3250     fi
3251   done
3252   IFS="$ac_save_ifs"
3253   ;;
3254 esac
3255 else
3256   enable_fast_install=yes
3257 fi
3258
3259 # Extract the first word of "gcc", so it can be a program name with args.
3260 set dummy gcc; ac_word=$2
3261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3262 echo "configure:3263: checking for $ac_word" >&5
3263 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   if test -n "$CC"; then
3267   ac_cv_prog_CC="$CC" # Let the user override the test.
3268 else
3269   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3270   ac_dummy="$PATH"
3271   for ac_dir in $ac_dummy; do
3272     test -z "$ac_dir" && ac_dir=.
3273     if test -f $ac_dir/$ac_word; then
3274       ac_cv_prog_CC="gcc"
3275       break
3276     fi
3277   done
3278   IFS="$ac_save_ifs"
3279 fi
3280 fi
3281 CC="$ac_cv_prog_CC"
3282 if test -n "$CC"; then
3283   echo "$ac_t""$CC" 1>&6
3284 else
3285   echo "$ac_t""no" 1>&6
3286 fi
3287
3288 if test -z "$CC"; then
3289   # Extract the first word of "cc", so it can be a program name with args.
3290 set dummy cc; ac_word=$2
3291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3292 echo "configure:3293: checking for $ac_word" >&5
3293 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3294   echo $ac_n "(cached) $ac_c" 1>&6
3295 else
3296   if test -n "$CC"; then
3297   ac_cv_prog_CC="$CC" # Let the user override the test.
3298 else
3299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3300   ac_prog_rejected=no
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3306         ac_prog_rejected=yes
3307         continue
3308       fi
3309       ac_cv_prog_CC="cc"
3310       break
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314 if test $ac_prog_rejected = yes; then
3315   # We found a bogon in the path, so make sure we never use it.
3316   set dummy $ac_cv_prog_CC
3317   shift
3318   if test $# -gt 0; then
3319     # We chose a different compiler from the bogus one.
3320     # However, it has the same basename, so the bogon will be chosen
3321     # first if we set CC to just the basename; use the full file name.
3322     shift
3323     set dummy "$ac_dir/$ac_word" "$@"
3324     shift
3325     ac_cv_prog_CC="$@"
3326   fi
3327 fi
3328 fi
3329 fi
3330 CC="$ac_cv_prog_CC"
3331 if test -n "$CC"; then
3332   echo "$ac_t""$CC" 1>&6
3333 else
3334   echo "$ac_t""no" 1>&6
3335 fi
3336
3337   if test -z "$CC"; then
3338     case "`uname -s`" in
3339     *win32* | *WIN32* | *CYGWIN*)
3340       # Extract the first word of "cl", so it can be a program name with args.
3341 set dummy cl; ac_word=$2
3342 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3343 echo "configure:3344: checking for $ac_word" >&5
3344 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3345   echo $ac_n "(cached) $ac_c" 1>&6
3346 else
3347   if test -n "$CC"; then
3348   ac_cv_prog_CC="$CC" # Let the user override the test.
3349 else
3350   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3351   ac_dummy="$PATH"
3352   for ac_dir in $ac_dummy; do
3353     test -z "$ac_dir" && ac_dir=.
3354     if test -f $ac_dir/$ac_word; then
3355       ac_cv_prog_CC="cl"
3356       break
3357     fi
3358   done
3359   IFS="$ac_save_ifs"
3360 fi
3361 fi
3362 CC="$ac_cv_prog_CC"
3363 if test -n "$CC"; then
3364   echo "$ac_t""$CC" 1>&6
3365 else
3366   echo "$ac_t""no" 1>&6
3367 fi
3368  ;;
3369     esac
3370   fi
3371   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3372 fi
3373
3374 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3375 echo "configure:3376: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3376
3377 ac_ext=c
3378 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3379 ac_cpp='$CPP $CPPFLAGS'
3380 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3381 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3382 cross_compiling=$ac_cv_prog_cc_cross
3383
3384 cat > conftest.$ac_ext << EOF
3385
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388
3389 main(){return(0);}
3390 EOF
3391 if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392   ac_cv_prog_cc_works=yes
3393   # If we can't run a trivial program, we are probably using a cross compiler.
3394   if (./conftest; exit) 2>/dev/null; then
3395     ac_cv_prog_cc_cross=no
3396   else
3397     ac_cv_prog_cc_cross=yes
3398   fi
3399 else
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   ac_cv_prog_cc_works=no
3403 fi
3404 rm -fr conftest*
3405 ac_ext=c
3406 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3407 ac_cpp='$CPP $CPPFLAGS'
3408 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3409 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3410 cross_compiling=$ac_cv_prog_cc_cross
3411
3412 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3413 if test $ac_cv_prog_cc_works = no; then
3414   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3415 fi
3416 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3417 echo "configure:3418: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3418 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3419 cross_compiling=$ac_cv_prog_cc_cross
3420
3421 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3422 echo "configure:3423: checking whether we are using GNU C" >&5
3423 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   cat > conftest.c <<EOF
3427 #ifdef __GNUC__
3428   yes;
3429 #endif
3430 EOF
3431 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3432   ac_cv_prog_gcc=yes
3433 else
3434   ac_cv_prog_gcc=no
3435 fi
3436 fi
3437
3438 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3439
3440 if test $ac_cv_prog_gcc = yes; then
3441   GCC=yes
3442 else
3443   GCC=
3444 fi
3445
3446 ac_test_CFLAGS="${CFLAGS+set}"
3447 ac_save_CFLAGS="$CFLAGS"
3448 CFLAGS=
3449 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3450 echo "configure:3451: checking whether ${CC-cc} accepts -g" >&5
3451 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3452   echo $ac_n "(cached) $ac_c" 1>&6
3453 else
3454   echo 'void f(){}' > conftest.c
3455 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3456   ac_cv_prog_cc_g=yes
3457 else
3458   ac_cv_prog_cc_g=no
3459 fi
3460 rm -f conftest*
3461
3462 fi
3463
3464 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3465 if test "$ac_test_CFLAGS" = set; then
3466   CFLAGS="$ac_save_CFLAGS"
3467 elif test $ac_cv_prog_cc_g = yes; then
3468   if test "$GCC" = yes; then
3469     CFLAGS="-g -O2"
3470   else
3471     CFLAGS="-g"
3472   fi
3473 else
3474   if test "$GCC" = yes; then
3475     CFLAGS="-O2"
3476   else
3477     CFLAGS=
3478   fi
3479 fi
3480
3481 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3482 if test "${with_gnu_ld+set}" = set; then
3483   withval="$with_gnu_ld"
3484   test "$withval" = no || with_gnu_ld=yes
3485 else
3486   with_gnu_ld=no
3487 fi
3488
3489 ac_prog=ld
3490 if test "$GCC" = yes; then
3491   # Check if gcc -print-prog-name=ld gives a path.
3492   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3493 echo "configure:3494: checking for ld used by GCC" >&5
3494   case $host in
3495   *-*-mingw*)
3496     # gcc leaves a trailing carriage return which upsets mingw
3497     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3498   *)
3499     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3500   esac
3501   case $ac_prog in
3502     # Accept absolute paths.
3503     [\\/]* | [A-Za-z]:[\\/]*)
3504       re_direlt='/[^/][^/]*/\.\./'
3505       # Canonicalize the path of ld
3506       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3507       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3508         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3509       done
3510       test -z "$LD" && LD="$ac_prog"
3511       ;;
3512   "")
3513     # If it fails, then pretend we aren't using GCC.
3514     ac_prog=ld
3515     ;;
3516   *)
3517     # If it is relative, then search for the first ld in PATH.
3518     with_gnu_ld=unknown
3519     ;;
3520   esac
3521 elif test "$with_gnu_ld" = yes; then
3522   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3523 echo "configure:3524: checking for GNU ld" >&5
3524 else
3525   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3526 echo "configure:3527: checking for non-GNU ld" >&5
3527 fi
3528 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3529   echo $ac_n "(cached) $ac_c" 1>&6
3530 else
3531   if test -z "$LD"; then
3532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3533   for ac_dir in $PATH; do
3534     test -z "$ac_dir" && ac_dir=.
3535     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3536       lt_cv_path_LD="$ac_dir/$ac_prog"
3537       # Check to see if the program is GNU ld.  I'd rather use --version,
3538       # but apparently some GNU ld's only accept -v.
3539       # Break only if it was the GNU/non-GNU ld that we prefer.
3540       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3541         test "$with_gnu_ld" != no && break
3542       else
3543         test "$with_gnu_ld" != yes && break
3544       fi
3545     fi
3546   done
3547   IFS="$ac_save_ifs"
3548 else
3549   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3550 fi
3551 fi
3552
3553 LD="$lt_cv_path_LD"
3554 if test -n "$LD"; then
3555   echo "$ac_t""$LD" 1>&6
3556 else
3557   echo "$ac_t""no" 1>&6
3558 fi
3559 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3560 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3561 echo "configure:3562: checking if the linker ($LD) is GNU ld" >&5
3562 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3563   echo $ac_n "(cached) $ac_c" 1>&6
3564 else
3565   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3566 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3567   lt_cv_prog_gnu_ld=yes
3568 else
3569   lt_cv_prog_gnu_ld=no
3570 fi
3571 fi
3572
3573 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3574 with_gnu_ld=$lt_cv_prog_gnu_ld
3575
3576
3577 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3578 echo "configure:3579: checking for $LD option to reload object files" >&5
3579 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   lt_cv_ld_reload_flag='-r'
3583 fi
3584
3585 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3586 reload_flag=$lt_cv_ld_reload_flag
3587 test -n "$reload_flag" && reload_flag=" $reload_flag"
3588
3589 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3590 echo "configure:3591: checking for BSD-compatible nm" >&5
3591 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3592   echo $ac_n "(cached) $ac_c" 1>&6
3593 else
3594   if test -n "$NM"; then
3595   # Let the user override the test.
3596   lt_cv_path_NM="$NM"
3597 else
3598   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3599   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3600     test -z "$ac_dir" && ac_dir=.
3601     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3602     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3603       # Check to see if the nm accepts a BSD-compat flag.
3604       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3605       #   nm: unknown option "B" ignored
3606       # Tru64's nm complains that /dev/null is an invalid object file
3607       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3608         lt_cv_path_NM="$tmp_nm -B"
3609         break
3610       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3611         lt_cv_path_NM="$tmp_nm -p"
3612         break
3613       else
3614         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3615         continue # so that we can try to find one that supports BSD flags
3616       fi
3617     fi
3618   done
3619   IFS="$ac_save_ifs"
3620   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3621 fi
3622 fi
3623
3624 NM="$lt_cv_path_NM"
3625 echo "$ac_t""$NM" 1>&6
3626
3627 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3628 echo "configure:3629: checking for a sed that does not truncate output" >&5
3629 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3630   echo $ac_n "(cached) $ac_c" 1>&6
3631 else
3632   # Loop through the user's path and test for sed and gsed.
3633 # Then use that list of sed's as ones to test for truncation.
3634 as_executable_p="test -f"
3635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636 for as_dir in $PATH
3637 do
3638   IFS=$as_save_IFS
3639   test -z "$as_dir" && as_dir=.
3640   for ac_prog in sed gsed; do
3641     for ac_exec_ext in '' $ac_executable_extensions; do
3642       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3643         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3644       fi
3645     done
3646   done
3647 done
3648
3649   # Create a temporary directory, and hook for its removal unless debugging.
3650 $debug ||
3651 {
3652   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3653   trap '{ (exit 1); exit 1; }' 1 2 13 15
3654 }
3655
3656 # Create a (secure) tmp directory for tmp files.
3657 : ${TMPDIR=/tmp}
3658 {
3659   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3660   test -n "$tmp" && test -d "$tmp"
3661 }  ||
3662 {
3663   tmp=$TMPDIR/sed$$-$RANDOM
3664   (umask 077 && mkdir $tmp)
3665 } ||
3666 {
3667    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3668    { (exit 1); exit 1; }
3669 }
3670   _max=0
3671   _count=0
3672   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3673   # along with /bin/sed that truncates output.
3674   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3675     test ! -f ${_sed} && break
3676     cat /dev/null > "$tmp/sed.in"
3677     _count=0
3678     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3679     # Check for GNU sed and select it if it is found.
3680     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3681       lt_cv_path_SED=${_sed}
3682       break
3683     fi
3684     while true; do
3685       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3686       mv "$tmp/sed.tmp" "$tmp/sed.in"
3687       cp "$tmp/sed.in" "$tmp/sed.nl"
3688       echo >>"$tmp/sed.nl"
3689       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3690       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3691       # 40000 chars as input seems more than enough
3692       test $_count -gt 10 && break
3693       _count=`expr $_count + 1`
3694       if test $_count -gt $_max; then
3695         _max=$_count
3696         lt_cv_path_SED=$_sed
3697       fi
3698     done
3699   done
3700   rm -rf "$tmp"
3701
3702 fi
3703
3704 if test "X$SED" != "X"; then
3705   lt_cv_path_SED=$SED
3706 else
3707   SED=$lt_cv_path_SED
3708 fi
3709 echo "$ac_t""$SED" 1>&6
3710
3711 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3712 echo "configure:3713: checking whether ln -s works" >&5
3713 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3714   echo $ac_n "(cached) $ac_c" 1>&6
3715 else
3716   rm -f conftestdata
3717 if ln -s X conftestdata 2>/dev/null
3718 then
3719   rm -f conftestdata
3720   ac_cv_prog_LN_S="ln -s"
3721 else
3722   ac_cv_prog_LN_S=ln
3723 fi
3724 fi
3725 LN_S="$ac_cv_prog_LN_S"
3726 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3727   echo "$ac_t""yes" 1>&6
3728 else
3729   echo "$ac_t""no" 1>&6
3730 fi
3731
3732 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3733 echo "configure:3734: checking how to recognise dependent libraries" >&5
3734 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737   lt_cv_file_magic_cmd='$MAGIC_CMD'
3738 lt_cv_file_magic_test_file=
3739 lt_cv_deplibs_check_method='unknown'
3740 # Need to set the preceding variable on all platforms that support
3741 # interlibrary dependencies.
3742 # 'none' -- dependencies not supported.
3743 # `unknown' -- same as none, but documents that we really don't know.
3744 # 'pass_all' -- all dependencies passed with no checks.
3745 # 'test_compile' -- check by making test program.
3746 # 'file_magic [[regex]]' -- check by looking for files in library path
3747 # which responds to the $file_magic_cmd with a given egrep regex.
3748 # If you have `file' or equivalent on your system and you're not sure
3749 # whether `pass_all' will *always* work, you probably want this one.
3750
3751 case $host_os in
3752 aix4* | aix5*)
3753   lt_cv_deplibs_check_method=pass_all
3754   ;;
3755
3756 beos*)
3757   lt_cv_deplibs_check_method=pass_all
3758   ;;
3759
3760 bsdi4*)
3761   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3762   lt_cv_file_magic_cmd='/usr/bin/file -L'
3763   lt_cv_file_magic_test_file=/shlib/libc.so
3764   ;;
3765
3766 cygwin* | mingw* | pw32*)
3767   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3768   lt_cv_file_magic_cmd='$OBJDUMP -f'
3769   ;;
3770
3771 darwin* | rhapsody*)
3772   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3773   lt_cv_file_magic_cmd='/usr/bin/file -L'
3774   case "$host_os" in
3775   rhapsody* | darwin1.[012])
3776     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3777     ;;
3778   *) # Darwin 1.3 on
3779     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3780     ;;
3781   esac
3782   ;;
3783
3784 freebsd*)
3785   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3786     case $host_cpu in
3787     i*86 )
3788       # Not sure whether the presence of OpenBSD here was a mistake.
3789       # Let's accept both of them until this is cleared up.
3790       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3791       lt_cv_file_magic_cmd=/usr/bin/file
3792       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3793       ;;
3794     esac
3795   else
3796     lt_cv_deplibs_check_method=pass_all
3797   fi
3798   ;;
3799
3800 gnu*)
3801   lt_cv_deplibs_check_method=pass_all
3802   ;;
3803
3804 hpux10.20*|hpux11*)
3805   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3806   lt_cv_file_magic_cmd=/usr/bin/file
3807   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3808   ;;
3809
3810 irix5* | irix6* | nonstopux*)
3811   case $host_os in
3812   irix5* | nonstopux*)
3813     # this will be overridden with pass_all, but let us keep it just in case
3814     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3815     ;;
3816   *)
3817     case $LD in
3818     *-32|*"-32 ") libmagic=32-bit;;
3819     *-n32|*"-n32 ") libmagic=N32;;
3820     *-64|*"-64 ") libmagic=64-bit;;
3821     *) libmagic=never-match;;
3822     esac
3823     # this will be overridden with pass_all, but let us keep it just in case
3824     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3825     ;;
3826   esac
3827   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3828   lt_cv_deplibs_check_method=pass_all
3829   ;;
3830
3831 # This must be Linux ELF.
3832 linux-gnu*)
3833   case $host_cpu in
3834   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3835     lt_cv_deplibs_check_method=pass_all ;;
3836   *)
3837     # glibc up to 2.1.1 does not perform some relocations on ARM
3838     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3839   esac
3840   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3841   ;;
3842
3843 netbsd*)
3844   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3845     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3846   else
3847     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3848   fi
3849   ;;
3850
3851 newos6*)
3852   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3853   lt_cv_file_magic_cmd=/usr/bin/file
3854   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3855   ;;
3856
3857 openbsd*)
3858   lt_cv_file_magic_cmd=/usr/bin/file
3859   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3860   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3861     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3862   else
3863     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3864   fi
3865   ;;
3866
3867 openedition*)
3868   lt_cv_deplibs_check_method=pass_all
3869   ;;
3870
3871 osf3* | osf4* | osf5*)
3872   # this will be overridden with pass_all, but let us keep it just in case
3873   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3874   lt_cv_file_magic_test_file=/shlib/libc.so
3875   lt_cv_deplibs_check_method=pass_all
3876   ;;
3877
3878 sco3.2v5*)
3879   lt_cv_deplibs_check_method=pass_all
3880   ;;
3881
3882 solaris*)
3883   lt_cv_deplibs_check_method=pass_all
3884   lt_cv_file_magic_test_file=/lib/libc.so
3885   ;;
3886
3887 sysv5uw[78]* | sysv4*uw2*)
3888   lt_cv_deplibs_check_method=pass_all
3889   ;;
3890
3891 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3892   case $host_vendor in
3893   motorola)
3894     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]'
3895     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3896     ;;
3897   ncr)
3898     lt_cv_deplibs_check_method=pass_all
3899     ;;
3900   sequent)
3901     lt_cv_file_magic_cmd='/bin/file'
3902     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3903     ;;
3904   sni)
3905     lt_cv_file_magic_cmd='/bin/file'
3906     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3907     lt_cv_file_magic_test_file=/lib/libc.so
3908     ;;
3909   siemens)
3910     lt_cv_deplibs_check_method=pass_all
3911     ;;
3912   esac
3913   ;;
3914 esac
3915
3916 fi
3917
3918 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3919 file_magic_cmd=$lt_cv_file_magic_cmd
3920 deplibs_check_method=$lt_cv_deplibs_check_method
3921
3922 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3923 echo "configure:3924: checking for object suffix" >&5
3924 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3925   echo $ac_n "(cached) $ac_c" 1>&6
3926 else
3927   rm -f conftest*
3928 echo 'int i = 1;' > conftest.$ac_ext
3929 if { (eval echo configure:3930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3930   for ac_file in conftest.*; do
3931     case $ac_file in
3932     *.c) ;;
3933     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3934     esac
3935   done
3936 else
3937   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3938 fi
3939 rm -f conftest*
3940 fi
3941
3942 echo "$ac_t""$ac_cv_objext" 1>&6
3943 OBJEXT=$ac_cv_objext
3944 ac_objext=$ac_cv_objext
3945
3946
3947
3948
3949 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3950 echo "configure:3951: checking for executable suffix" >&5
3951 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3955   ac_cv_exeext=.exe
3956 else
3957   rm -f conftest*
3958   echo 'int main () { return 0; }' > conftest.$ac_ext
3959   ac_cv_exeext=
3960   if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3961     for file in conftest.*; do
3962       case $file in
3963       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3964       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3965       esac
3966     done
3967   else
3968     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3969   fi
3970   rm -f conftest*
3971   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3972 fi
3973 fi
3974
3975 EXEEXT=""
3976 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3977 echo "$ac_t""${ac_cv_exeext}" 1>&6
3978 ac_exeext=$EXEEXT
3979
3980 if test $host != $build; then
3981   ac_tool_prefix=${host_alias}-
3982 else
3983   ac_tool_prefix=
3984 fi
3985
3986
3987
3988
3989 # Check for command to grab the raw symbol name followed by C symbol from nm.
3990 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3991 echo "configure:3992: checking command to parse $NM output" >&5
3992 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3993   echo $ac_n "(cached) $ac_c" 1>&6
3994 else
3995   
3996 # These are sane defaults that work on at least a few old systems.
3997 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3998
3999 # Character class describing NM global symbol codes.
4000 symcode='[BCDEGRST]'
4001
4002 # Regexp to match symbols that can be accessed directly from C.
4003 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4004
4005 # Transform the above into a raw symbol and a C symbol.
4006 symxfrm='\1 \2\3 \3'
4007
4008 # Transform an extracted symbol line into a proper C declaration
4009 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4010
4011 # Transform an extracted symbol line into symbol name and symbol address
4012 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'"
4013
4014 # Define system-specific variables.
4015 case $host_os in
4016 aix*)
4017   symcode='[BCDT]'
4018   ;;
4019 cygwin* | mingw* | pw32*)
4020   symcode='[ABCDGISTW]'
4021   ;;
4022 hpux*) # Its linker distinguishes data from code symbols
4023   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4024   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'"
4025   ;;
4026 irix* | nonstopux*)
4027   symcode='[BCDEGRST]'
4028   ;;
4029 osf*)
4030   symcode='[BCDEGQRST]'
4031   ;;
4032 solaris* | sysv5*)
4033   symcode='[BDT]'
4034   ;;
4035 sysv4)
4036   symcode='[DFNSTU]'
4037   ;;
4038 esac
4039
4040 # Handle CRLF in mingw tool chain
4041 opt_cr=
4042 case $host_os in
4043 mingw*)
4044   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4045   ;;
4046 esac
4047
4048 # If we're using GNU nm, then use its standard symbol codes.
4049 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4050   symcode='[ABCDGISTW]'
4051 fi
4052
4053 # Try without a prefix undercore, then with it.
4054 for ac_symprfx in "" "_"; do
4055
4056   # Write the raw and C identifiers.
4057 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4058
4059   # Check to see that the pipe works correctly.
4060   pipe_works=no
4061   rm -f conftest*
4062   cat > conftest.$ac_ext <<EOF
4063 #ifdef __cplusplus
4064 extern "C" {
4065 #endif
4066 char nm_test_var;
4067 void nm_test_func(){}
4068 #ifdef __cplusplus
4069 }
4070 #endif
4071 int main(){nm_test_var='a';nm_test_func();return(0);}
4072 EOF
4073
4074   if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4075     # Now try to grab the symbols.
4076     nlist=conftest.nm
4077     if { (eval echo configure:4078: \"$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
4078       # Try sorting and uniquifying the output.
4079       if sort "$nlist" | uniq > "$nlist"T; then
4080         mv -f "$nlist"T "$nlist"
4081       else
4082         rm -f "$nlist"T
4083       fi
4084
4085       # Make sure that we snagged all the symbols we need.
4086       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4087         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4088           cat <<EOF > conftest.$ac_ext
4089 #ifdef __cplusplus
4090 extern "C" {
4091 #endif
4092
4093 EOF
4094           # Now generate the symbol file.
4095           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4096
4097           cat <<EOF >> conftest.$ac_ext
4098 #if defined (__STDC__) && __STDC__
4099 # define lt_ptr void *
4100 #else
4101 # define lt_ptr char *
4102 # define const
4103 #endif
4104
4105 /* The mapping between symbol names and symbols. */
4106 const struct {
4107   const char *name;
4108   lt_ptr address;
4109 }
4110 lt_preloaded_symbols[] =
4111 {
4112 EOF
4113           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4114           cat <<\EOF >> conftest.$ac_ext
4115   {0, (lt_ptr) 0}
4116 };
4117
4118 #ifdef __cplusplus
4119 }
4120 #endif
4121 EOF
4122           # Now try linking the two files.
4123           mv conftest.$ac_objext conftstm.$ac_objext
4124           save_LIBS="$LIBS"
4125           save_CFLAGS="$CFLAGS"
4126           LIBS="conftstm.$ac_objext"
4127           CFLAGS="$CFLAGS$no_builtin_flag"
4128           if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4129             pipe_works=yes
4130           fi
4131           LIBS="$save_LIBS"
4132           CFLAGS="$save_CFLAGS"
4133         else
4134           echo "cannot find nm_test_func in $nlist" >&5
4135         fi
4136       else
4137         echo "cannot find nm_test_var in $nlist" >&5
4138       fi
4139     else
4140       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4141     fi
4142   else
4143     echo "$progname: failed program was:" >&5
4144     cat conftest.$ac_ext >&5
4145   fi
4146   rm -f conftest* conftst*
4147
4148   # Do not use the global_symbol_pipe unless it works.
4149   if test "$pipe_works" = yes; then
4150     break
4151   else
4152     lt_cv_sys_global_symbol_pipe=
4153   fi
4154 done
4155
4156 fi
4157
4158 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4160   global_symbol_to_cdecl=
4161   global_symbol_to_c_name_address=
4162 else
4163   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4164   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4165 fi
4166 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4167 then
4168   echo "$ac_t""failed" 1>&6
4169 else
4170   echo "$ac_t""ok" 1>&6
4171 fi
4172
4173 for ac_hdr in dlfcn.h
4174 do
4175 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4176 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4177 echo "configure:4178: checking for $ac_hdr" >&5
4178 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4179   echo $ac_n "(cached) $ac_c" 1>&6
4180 else
4181   cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 #include <$ac_hdr>
4185 EOF
4186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4187 { (eval echo configure:4188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4189 if test -z "$ac_err"; then
4190   rm -rf conftest*
4191   eval "ac_cv_header_$ac_safe=yes"
4192 else
4193   echo "$ac_err" >&5
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   eval "ac_cv_header_$ac_safe=no"
4198 fi
4199 rm -f conftest*
4200 fi
4201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4202   echo "$ac_t""yes" 1>&6
4203     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4204   cat >> confdefs.h <<EOF
4205 #define $ac_tr_hdr 1
4206 EOF
4207  
4208 else
4209   echo "$ac_t""no" 1>&6
4210 fi
4211 done
4212
4213
4214
4215
4216
4217
4218 # Only perform the check for file, if the check method requires it
4219 case $deplibs_check_method in
4220 file_magic*)
4221   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4222     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4223 echo "configure:4224: checking for ${ac_tool_prefix}file" >&5
4224 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4225   echo $ac_n "(cached) $ac_c" 1>&6
4226 else
4227   case $MAGIC_CMD in
4228   /*)
4229   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4230   ;;
4231   ?:/*)
4232   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4233   ;;
4234   *)
4235   ac_save_MAGIC_CMD="$MAGIC_CMD"
4236   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4237   ac_dummy="/usr/bin:$PATH"
4238   for ac_dir in $ac_dummy; do
4239     test -z "$ac_dir" && ac_dir=.
4240     if test -f $ac_dir/${ac_tool_prefix}file; then
4241       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4242       if test -n "$file_magic_test_file"; then
4243         case $deplibs_check_method in
4244         "file_magic "*)
4245           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4246           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4247           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4248             egrep "$file_magic_regex" > /dev/null; then
4249             :
4250           else
4251             cat <<EOF 1>&2
4252
4253 *** Warning: the command libtool uses to detect shared libraries,
4254 *** $file_magic_cmd, produces output that libtool cannot recognize.
4255 *** The result is that libtool may fail to recognize shared libraries
4256 *** as such.  This will affect the creation of libtool libraries that
4257 *** depend on shared libraries, but programs linked with such libtool
4258 *** libraries will work regardless of this problem.  Nevertheless, you
4259 *** may want to report the problem to your system manager and/or to
4260 *** bug-libtool@gnu.org
4261
4262 EOF
4263           fi ;;
4264         esac
4265       fi
4266       break
4267     fi
4268   done
4269   IFS="$ac_save_ifs"
4270   MAGIC_CMD="$ac_save_MAGIC_CMD"
4271   ;;
4272 esac
4273 fi
4274
4275 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4276 if test -n "$MAGIC_CMD"; then
4277   echo "$ac_t""$MAGIC_CMD" 1>&6
4278 else
4279   echo "$ac_t""no" 1>&6
4280 fi
4281
4282 if test -z "$lt_cv_path_MAGIC_CMD"; then
4283   if test -n "$ac_tool_prefix"; then
4284     echo $ac_n "checking for file""... $ac_c" 1>&6
4285 echo "configure:4286: checking for file" >&5
4286 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4287   echo $ac_n "(cached) $ac_c" 1>&6
4288 else
4289   case $MAGIC_CMD in
4290   /*)
4291   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4292   ;;
4293   ?:/*)
4294   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4295   ;;
4296   *)
4297   ac_save_MAGIC_CMD="$MAGIC_CMD"
4298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4299   ac_dummy="/usr/bin:$PATH"
4300   for ac_dir in $ac_dummy; do
4301     test -z "$ac_dir" && ac_dir=.
4302     if test -f $ac_dir/file; then
4303       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4304       if test -n "$file_magic_test_file"; then
4305         case $deplibs_check_method in
4306         "file_magic "*)
4307           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4308           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4309           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4310             egrep "$file_magic_regex" > /dev/null; then
4311             :
4312           else
4313             cat <<EOF 1>&2
4314
4315 *** Warning: the command libtool uses to detect shared libraries,
4316 *** $file_magic_cmd, produces output that libtool cannot recognize.
4317 *** The result is that libtool may fail to recognize shared libraries
4318 *** as such.  This will affect the creation of libtool libraries that
4319 *** depend on shared libraries, but programs linked with such libtool
4320 *** libraries will work regardless of this problem.  Nevertheless, you
4321 *** may want to report the problem to your system manager and/or to
4322 *** bug-libtool@gnu.org
4323
4324 EOF
4325           fi ;;
4326         esac
4327       fi
4328       break
4329     fi
4330   done
4331   IFS="$ac_save_ifs"
4332   MAGIC_CMD="$ac_save_MAGIC_CMD"
4333   ;;
4334 esac
4335 fi
4336
4337 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4338 if test -n "$MAGIC_CMD"; then
4339   echo "$ac_t""$MAGIC_CMD" 1>&6
4340 else
4341   echo "$ac_t""no" 1>&6
4342 fi
4343
4344   else
4345     MAGIC_CMD=:
4346   fi
4347 fi
4348
4349   fi
4350   ;;
4351 esac
4352
4353 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4354 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4356 echo "configure:4357: checking for $ac_word" >&5
4357 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   if test -n "$RANLIB"; then
4361   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4362 else
4363   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4364   ac_dummy="$PATH"
4365   for ac_dir in $ac_dummy; do
4366     test -z "$ac_dir" && ac_dir=.
4367     if test -f $ac_dir/$ac_word; then
4368       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4369       break
4370     fi
4371   done
4372   IFS="$ac_save_ifs"
4373 fi
4374 fi
4375 RANLIB="$ac_cv_prog_RANLIB"
4376 if test -n "$RANLIB"; then
4377   echo "$ac_t""$RANLIB" 1>&6
4378 else
4379   echo "$ac_t""no" 1>&6
4380 fi
4381
4382
4383 if test -z "$ac_cv_prog_RANLIB"; then
4384 if test -n "$ac_tool_prefix"; then
4385   # Extract the first word of "ranlib", so it can be a program name with args.
4386 set dummy ranlib; ac_word=$2
4387 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4388 echo "configure:4389: checking for $ac_word" >&5
4389 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4390   echo $ac_n "(cached) $ac_c" 1>&6
4391 else
4392   if test -n "$RANLIB"; then
4393   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4394 else
4395   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4396   ac_dummy="$PATH"
4397   for ac_dir in $ac_dummy; do
4398     test -z "$ac_dir" && ac_dir=.
4399     if test -f $ac_dir/$ac_word; then
4400       ac_cv_prog_RANLIB="ranlib"
4401       break
4402     fi
4403   done
4404   IFS="$ac_save_ifs"
4405   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4406 fi
4407 fi
4408 RANLIB="$ac_cv_prog_RANLIB"
4409 if test -n "$RANLIB"; then
4410   echo "$ac_t""$RANLIB" 1>&6
4411 else
4412   echo "$ac_t""no" 1>&6
4413 fi
4414
4415 else
4416   RANLIB=":"
4417 fi
4418 fi
4419
4420 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4421 set dummy ${ac_tool_prefix}strip; 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_STRIP+set}\" = set"; then
4425   echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427   if test -n "$STRIP"; then
4428   ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
4436       break
4437     fi
4438   done
4439   IFS="$ac_save_ifs"
4440 fi
4441 fi
4442 STRIP="$ac_cv_prog_STRIP"
4443 if test -n "$STRIP"; then
4444   echo "$ac_t""$STRIP" 1>&6
4445 else
4446   echo "$ac_t""no" 1>&6
4447 fi
4448
4449
4450 if test -z "$ac_cv_prog_STRIP"; then
4451 if test -n "$ac_tool_prefix"; then
4452   # Extract the first word of "strip", so it can be a program name with args.
4453 set dummy strip; ac_word=$2
4454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4455 echo "configure:4456: checking for $ac_word" >&5
4456 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   if test -n "$STRIP"; then
4460   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4461 else
4462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4463   ac_dummy="$PATH"
4464   for ac_dir in $ac_dummy; do
4465     test -z "$ac_dir" && ac_dir=.
4466     if test -f $ac_dir/$ac_word; then
4467       ac_cv_prog_STRIP="strip"
4468       break
4469     fi
4470   done
4471   IFS="$ac_save_ifs"
4472   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4473 fi
4474 fi
4475 STRIP="$ac_cv_prog_STRIP"
4476 if test -n "$STRIP"; then
4477   echo "$ac_t""$STRIP" 1>&6
4478 else
4479   echo "$ac_t""no" 1>&6
4480 fi
4481
4482 else
4483   STRIP=":"
4484 fi
4485 fi
4486
4487
4488 enable_dlopen=yes
4489 enable_win32_dll=yes
4490
4491 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4492 if test "${enable_libtool_lock+set}" = set; then
4493   enableval="$enable_libtool_lock"
4494   :
4495 fi
4496
4497 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4498
4499 # Some flags need to be propagated to the compiler or linker for good
4500 # libtool support.
4501 case $host in
4502 *-*-irix6*)
4503   # Find out which ABI we are using.
4504   echo '#line 4505 "configure"' > conftest.$ac_ext
4505   if { (eval echo configure:4506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4506     case `/usr/bin/file conftest.$ac_objext` in
4507     *32-bit*)
4508       LD="${LD-ld} -32"
4509       ;;
4510     *N32*)
4511       LD="${LD-ld} -n32"
4512       ;;
4513     *64-bit*)
4514       LD="${LD-ld} -64"
4515       ;;
4516     esac
4517   fi
4518   rm -rf conftest*
4519   ;;
4520
4521 *-*-sco3.2v5*)
4522   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4523   SAVE_CFLAGS="$CFLAGS"
4524   CFLAGS="$CFLAGS -belf"
4525   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4526 echo "configure:4527: checking whether the C compiler needs -belf" >&5
4527 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   
4531      ac_ext=c
4532 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4533 ac_cpp='$CPP $CPPFLAGS'
4534 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4535 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4536 cross_compiling=$ac_cv_prog_cc_cross
4537
4538      cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541
4542 int main() {
4543
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547   rm -rf conftest*
4548   lt_cv_cc_needs_belf=yes
4549 else
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   lt_cv_cc_needs_belf=no
4554 fi
4555 rm -f conftest*
4556      ac_ext=c
4557 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4558 ac_cpp='$CPP $CPPFLAGS'
4559 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4560 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4561 cross_compiling=$ac_cv_prog_cc_cross
4562
4563 fi
4564
4565 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4566   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4567     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4568     CFLAGS="$SAVE_CFLAGS"
4569   fi
4570   ;;
4571
4572 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4573   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4574 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4575 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4576 echo "configure:4577: checking for $ac_word" >&5
4577 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4578   echo $ac_n "(cached) $ac_c" 1>&6
4579 else
4580   if test -n "$DLLTOOL"; then
4581   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4582 else
4583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4584   ac_dummy="$PATH"
4585   for ac_dir in $ac_dummy; do
4586     test -z "$ac_dir" && ac_dir=.
4587     if test -f $ac_dir/$ac_word; then
4588       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4589       break
4590     fi
4591   done
4592   IFS="$ac_save_ifs"
4593 fi
4594 fi
4595 DLLTOOL="$ac_cv_prog_DLLTOOL"
4596 if test -n "$DLLTOOL"; then
4597   echo "$ac_t""$DLLTOOL" 1>&6
4598 else
4599   echo "$ac_t""no" 1>&6
4600 fi
4601
4602
4603 if test -z "$ac_cv_prog_DLLTOOL"; then
4604 if test -n "$ac_tool_prefix"; then
4605   # Extract the first word of "dlltool", so it can be a program name with args.
4606 set dummy dlltool; ac_word=$2
4607 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4608 echo "configure:4609: checking for $ac_word" >&5
4609 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4610   echo $ac_n "(cached) $ac_c" 1>&6
4611 else
4612   if test -n "$DLLTOOL"; then
4613   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4614 else
4615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4616   ac_dummy="$PATH"
4617   for ac_dir in $ac_dummy; do
4618     test -z "$ac_dir" && ac_dir=.
4619     if test -f $ac_dir/$ac_word; then
4620       ac_cv_prog_DLLTOOL="dlltool"
4621       break
4622     fi
4623   done
4624   IFS="$ac_save_ifs"
4625   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4626 fi
4627 fi
4628 DLLTOOL="$ac_cv_prog_DLLTOOL"
4629 if test -n "$DLLTOOL"; then
4630   echo "$ac_t""$DLLTOOL" 1>&6
4631 else
4632   echo "$ac_t""no" 1>&6
4633 fi
4634
4635 else
4636   DLLTOOL="false"
4637 fi
4638 fi
4639
4640   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4641 set dummy ${ac_tool_prefix}as; 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_AS+set}\" = set"; then
4645   echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647   if test -n "$AS"; then
4648   ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
4656       break
4657     fi
4658   done
4659   IFS="$ac_save_ifs"
4660 fi
4661 fi
4662 AS="$ac_cv_prog_AS"
4663 if test -n "$AS"; then
4664   echo "$ac_t""$AS" 1>&6
4665 else
4666   echo "$ac_t""no" 1>&6
4667 fi
4668
4669
4670 if test -z "$ac_cv_prog_AS"; then
4671 if test -n "$ac_tool_prefix"; then
4672   # Extract the first word of "as", so it can be a program name with args.
4673 set dummy as; ac_word=$2
4674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4675 echo "configure:4676: checking for $ac_word" >&5
4676 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679   if test -n "$AS"; then
4680   ac_cv_prog_AS="$AS" # Let the user override the test.
4681 else
4682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4683   ac_dummy="$PATH"
4684   for ac_dir in $ac_dummy; do
4685     test -z "$ac_dir" && ac_dir=.
4686     if test -f $ac_dir/$ac_word; then
4687       ac_cv_prog_AS="as"
4688       break
4689     fi
4690   done
4691   IFS="$ac_save_ifs"
4692   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4693 fi
4694 fi
4695 AS="$ac_cv_prog_AS"
4696 if test -n "$AS"; then
4697   echo "$ac_t""$AS" 1>&6
4698 else
4699   echo "$ac_t""no" 1>&6
4700 fi
4701
4702 else
4703   AS="false"
4704 fi
4705 fi
4706
4707   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4708 set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+set}\" = set"; then
4712   echo $ac_n "(cached) $ac_c" 1>&6
4713 else
4714   if test -n "$OBJDUMP"; then
4715   ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
4723       break
4724     fi
4725   done
4726   IFS="$ac_save_ifs"
4727 fi
4728 fi
4729 OBJDUMP="$ac_cv_prog_OBJDUMP"
4730 if test -n "$OBJDUMP"; then
4731   echo "$ac_t""$OBJDUMP" 1>&6
4732 else
4733   echo "$ac_t""no" 1>&6
4734 fi
4735
4736
4737 if test -z "$ac_cv_prog_OBJDUMP"; then
4738 if test -n "$ac_tool_prefix"; then
4739   # Extract the first word of "objdump", so it can be a program name with args.
4740 set dummy objdump; ac_word=$2
4741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_word" >&5
4743 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   if test -n "$OBJDUMP"; then
4747   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4748 else
4749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4750   ac_dummy="$PATH"
4751   for ac_dir in $ac_dummy; do
4752     test -z "$ac_dir" && ac_dir=.
4753     if test -f $ac_dir/$ac_word; then
4754       ac_cv_prog_OBJDUMP="objdump"
4755       break
4756     fi
4757   done
4758   IFS="$ac_save_ifs"
4759   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4760 fi
4761 fi
4762 OBJDUMP="$ac_cv_prog_OBJDUMP"
4763 if test -n "$OBJDUMP"; then
4764   echo "$ac_t""$OBJDUMP" 1>&6
4765 else
4766   echo "$ac_t""no" 1>&6
4767 fi
4768
4769 else
4770   OBJDUMP="false"
4771 fi
4772 fi
4773
4774
4775   # recent cygwin and mingw systems supply a stub DllMain which the user
4776   # can override, but on older systems we have to supply one
4777   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4778 echo "configure:4779: checking if libtool should supply DllMain function" >&5
4779 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4780   echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782   cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785
4786 int main() {
4787 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4788       DllMain (0, 0, 0);
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4792   rm -rf conftest*
4793   lt_cv_need_dllmain=no
4794 else
4795   echo "configure: failed program was:" >&5
4796   cat conftest.$ac_ext >&5
4797   rm -rf conftest*
4798   lt_cv_need_dllmain=yes
4799 fi
4800 rm -f conftest*
4801 fi
4802
4803 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4804
4805   case $host/$CC in
4806   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4807     # old mingw systems require "-dll" to link a DLL, while more recent ones
4808     # require "-mdll"
4809     SAVE_CFLAGS="$CFLAGS"
4810     CFLAGS="$CFLAGS -mdll"
4811     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4812 echo "configure:4813: checking how to link DLLs" >&5
4813 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4814   echo $ac_n "(cached) $ac_c" 1>&6
4815 else
4816   cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819
4820 int main() {
4821
4822 ; return 0; }
4823 EOF
4824 if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4825   rm -rf conftest*
4826   lt_cv_cc_dll_switch=-mdll
4827 else
4828   echo "configure: failed program was:" >&5
4829   cat conftest.$ac_ext >&5
4830   rm -rf conftest*
4831   lt_cv_cc_dll_switch=-dll
4832 fi
4833 rm -f conftest*
4834 fi
4835
4836 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4837     CFLAGS="$SAVE_CFLAGS" ;;
4838   *-*-cygwin* | *-*-pw32*)
4839     # cygwin systems need to pass --dll to the linker, and not link
4840     # crt.o which will require a WinMain@16 definition.
4841     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4842   esac
4843   ;;
4844   
4845 esac
4846
4847 # Sed substitution that helps us do robust quoting.  It backslashifies
4848 # metacharacters that are still active within double-quoted strings.
4849 Xsed='sed -e s/^X//'
4850 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4851
4852 # Same as above, but do not quote variable references.
4853 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4854
4855 # Sed substitution to delay expansion of an escaped shell variable in a
4856 # double_quote_subst'ed string.
4857 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4858
4859 # Constants:
4860 rm="rm -f"
4861
4862 # Global variables:
4863 default_ofile=libtool
4864 can_build_shared=yes
4865
4866 # All known linkers require a `.a' archive for static linking (except M$VC,
4867 # which needs '.lib').
4868 libext=a
4869 ltmain="$ac_aux_dir/ltmain.sh"
4870 ofile="$default_ofile"
4871 with_gnu_ld="$lt_cv_prog_gnu_ld"
4872 need_locks="$enable_libtool_lock"
4873
4874 old_CC="$CC"
4875 old_CFLAGS="$CFLAGS"
4876
4877 # Set sane defaults for various variables
4878 test -z "$AR" && AR=ar
4879 test -z "$AR_FLAGS" && AR_FLAGS=cru
4880 test -z "$AS" && AS=as
4881 test -z "$CC" && CC=cc
4882 test -z "$DLLTOOL" && DLLTOOL=dlltool
4883 test -z "$LD" && LD=ld
4884 test -z "$LN_S" && LN_S="ln -s"
4885 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4886 test -z "$NM" && NM=nm
4887 test -z "$OBJDUMP" && OBJDUMP=objdump
4888 test -z "$RANLIB" && RANLIB=:
4889 test -z "$STRIP" && STRIP=:
4890 test -z "$ac_objext" && ac_objext=o
4891
4892 if test x"$host" != x"$build"; then
4893   ac_tool_prefix=${host_alias}-
4894 else
4895   ac_tool_prefix=
4896 fi
4897
4898 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4899 case $host_os in
4900 linux-gnu*) ;;
4901 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4902 esac
4903
4904 case $host_os in
4905 aix3*)
4906   # AIX sometimes has problems with the GCC collect2 program.  For some
4907   # reason, if we set the COLLECT_NAMES environment variable, the problems
4908   # vanish in a puff of smoke.
4909   if test "X${COLLECT_NAMES+set}" != Xset; then
4910     COLLECT_NAMES=
4911     export COLLECT_NAMES
4912   fi
4913   ;;
4914 esac
4915
4916 # Determine commands to create old-style static archives.
4917 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4918 old_postinstall_cmds='chmod 644 $oldlib'
4919 old_postuninstall_cmds=
4920
4921 if test -n "$RANLIB"; then
4922   case $host_os in
4923   openbsd*)
4924     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4925     ;;
4926   *)
4927     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4928     ;;
4929   esac
4930   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4931 fi
4932
4933 # Allow CC to be a program name with arguments.
4934 set dummy $CC
4935 compiler="$2"
4936
4937 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4938 echo "configure:4939: checking for objdir" >&5
4939 rm -f .libs 2>/dev/null
4940 mkdir .libs 2>/dev/null
4941 if test -d .libs; then
4942   objdir=.libs
4943 else
4944   # MS-DOS does not allow filenames that begin with a dot.
4945   objdir=_libs
4946 fi
4947 rmdir .libs 2>/dev/null
4948 echo "$ac_t""$objdir" 1>&6
4949
4950
4951 # Check whether --with-pic or --without-pic was given.
4952 if test "${with_pic+set}" = set; then
4953   withval="$with_pic"
4954   pic_mode="$withval"
4955 else
4956   pic_mode=default
4957 fi
4958
4959 test -z "$pic_mode" && pic_mode=default
4960
4961 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4962 # in isolation, and that seeing it set (from the cache) indicates that
4963 # the associated values are set (in the cache) correctly too.
4964 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4965 echo "configure:4966: checking for $compiler option to produce PIC" >&5
4966 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4967   echo $ac_n "(cached) $ac_c" 1>&6
4968 else
4969    lt_cv_prog_cc_pic=
4970   lt_cv_prog_cc_shlib=
4971   lt_cv_prog_cc_wl=
4972   lt_cv_prog_cc_static=
4973   lt_cv_prog_cc_no_builtin=
4974   lt_cv_prog_cc_can_build_shared=$can_build_shared
4975
4976   if test "$GCC" = yes; then
4977     lt_cv_prog_cc_wl='-Wl,'
4978     lt_cv_prog_cc_static='-static'
4979
4980     case $host_os in
4981     aix*)
4982       # Below there is a dirty hack to force normal static linking with -ldl
4983       # The problem is because libdl dynamically linked with both libc and
4984       # libC (AIX C++ library), which obviously doesn't included in libraries
4985       # list by gcc. This cause undefined symbols with -static flags.
4986       # This hack allows C programs to be linked with "-static -ldl", but
4987       # not sure about C++ programs.
4988       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4989       ;;
4990     amigaos*)
4991       # FIXME: we need at least 68020 code to build shared libraries, but
4992       # adding the `-m68020' flag to GCC prevents building anything better,
4993       # like `-m68040'.
4994       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4995       ;;
4996     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4997       # PIC is the default for these OSes.
4998       ;;
4999     darwin* | rhapsody*)
5000       # PIC is the default on this platform
5001       # Common symbols not allowed in MH_DYLIB files
5002       lt_cv_prog_cc_pic='-fno-common'
5003       ;;
5004     cygwin* | mingw* | pw32* | os2*)
5005       # This hack is so that the source file can tell whether it is being
5006       # built for inclusion in a dll (and should export symbols for example).
5007       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5008       ;;
5009     sysv4*MP*)
5010       if test -d /usr/nec; then
5011          lt_cv_prog_cc_pic=-Kconform_pic
5012       fi
5013       ;;
5014     *)
5015       lt_cv_prog_cc_pic='-fPIC'
5016       ;;
5017     esac
5018   else
5019     # PORTME Check for PIC flags for the system compiler.
5020     case $host_os in
5021     aix3* | aix4* | aix5*)
5022       lt_cv_prog_cc_wl='-Wl,'
5023       # All AIX code is PIC.
5024       if test "$host_cpu" = ia64; then
5025         # AIX 5 now supports IA64 processor
5026         lt_cv_prog_cc_static='-Bstatic'
5027       else
5028         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5029       fi
5030       ;;
5031
5032     hpux9* | hpux10* | hpux11*)
5033       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5034       lt_cv_prog_cc_wl='-Wl,'
5035       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5036       lt_cv_prog_cc_pic='+Z'
5037       ;;
5038
5039     irix5* | irix6* | nonstopux*)
5040       lt_cv_prog_cc_wl='-Wl,'
5041       lt_cv_prog_cc_static='-non_shared'
5042       # PIC (with -KPIC) is the default.
5043       ;;
5044
5045     cygwin* | mingw* | pw32* | os2*)
5046       # This hack is so that the source file can tell whether it is being
5047       # built for inclusion in a dll (and should export symbols for example).
5048       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5049       ;;
5050
5051     newsos6)
5052       lt_cv_prog_cc_pic='-KPIC'
5053       lt_cv_prog_cc_static='-Bstatic'
5054       ;;
5055     
5056     openedition)
5057       # XPLINK code is PIC by default
5058       ;;
5059
5060     osf3* | osf4* | osf5*)
5061       # All OSF/1 code is PIC.
5062       lt_cv_prog_cc_wl='-Wl,'
5063       lt_cv_prog_cc_static='-non_shared'
5064       ;;
5065
5066     sco3.2v5*)
5067       lt_cv_prog_cc_pic='-Kpic'
5068       lt_cv_prog_cc_static='-dn'
5069       lt_cv_prog_cc_shlib='-belf'
5070       ;;
5071
5072     solaris*)
5073       lt_cv_prog_cc_pic='-KPIC'
5074       lt_cv_prog_cc_static='-Bstatic'
5075       lt_cv_prog_cc_wl='-Wl,'
5076       ;;
5077
5078     sunos4*)
5079       lt_cv_prog_cc_pic='-PIC'
5080       lt_cv_prog_cc_static='-Bstatic'
5081       lt_cv_prog_cc_wl='-Qoption ld '
5082       ;;
5083
5084     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5085       lt_cv_prog_cc_pic='-KPIC'
5086       lt_cv_prog_cc_static='-Bstatic'
5087       lt_cv_prog_cc_wl='-Wl,'
5088       ;;
5089
5090     uts4*)
5091       lt_cv_prog_cc_pic='-pic'
5092       lt_cv_prog_cc_static='-Bstatic'
5093       ;;
5094
5095     sysv4*MP*)
5096       if test -d /usr/nec ;then
5097         lt_cv_prog_cc_pic='-Kconform_pic'
5098         lt_cv_prog_cc_static='-Bstatic'
5099       fi
5100       ;;
5101
5102     *)
5103       lt_cv_prog_cc_can_build_shared=no
5104       ;;
5105     esac
5106   fi
5107
5108 fi
5109
5110 if test -z "$lt_cv_prog_cc_pic"; then
5111   echo "$ac_t""none" 1>&6
5112 else
5113   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5114
5115   # Check to make sure the pic_flag actually works.
5116   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5117 echo "configure:5118: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5118   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5119   echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121       save_CFLAGS="$CFLAGS"
5122     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5123     cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126
5127 int main() {
5128
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5132   rm -rf conftest*
5133         case $host_os in
5134       hpux9* | hpux10* | hpux11*)
5135         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5136         # they create non-PIC objects.  So, if there were any warnings, we
5137         # assume that PIC is not supported.
5138         if test -s conftest.err; then
5139           lt_cv_prog_cc_pic_works=no
5140         else
5141           lt_cv_prog_cc_pic_works=yes
5142         fi
5143         ;;
5144       *)
5145         lt_cv_prog_cc_pic_works=yes
5146         ;;
5147       esac
5148     
5149 else
5150   echo "configure: failed program was:" >&5
5151   cat conftest.$ac_ext >&5
5152   rm -rf conftest*
5153         lt_cv_prog_cc_pic_works=no
5154     
5155 fi
5156 rm -f conftest*
5157     CFLAGS="$save_CFLAGS"
5158   
5159 fi
5160
5161
5162   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5163     lt_cv_prog_cc_pic=
5164     lt_cv_prog_cc_can_build_shared=no
5165   else
5166     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5167   fi
5168
5169   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5170 fi
5171
5172 # Check for any special shared library compilation flags.
5173 if test -n "$lt_cv_prog_cc_shlib"; then
5174   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5175   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5176   else
5177    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5178     lt_cv_prog_cc_can_build_shared=no
5179   fi
5180 fi
5181
5182 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5183 echo "configure:5184: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5184 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187     lt_cv_prog_cc_static_works=no
5188   save_LDFLAGS="$LDFLAGS"
5189   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5190   cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193
5194 int main() {
5195
5196 ; return 0; }
5197 EOF
5198 if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5199   rm -rf conftest*
5200   lt_cv_prog_cc_static_works=yes
5201 else
5202   echo "configure: failed program was:" >&5
5203   cat conftest.$ac_ext >&5
5204 fi
5205 rm -f conftest*
5206   LDFLAGS="$save_LDFLAGS"
5207
5208 fi
5209
5210
5211 # Belt *and* braces to stop my trousers falling down:
5212 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5213 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5214
5215 pic_flag="$lt_cv_prog_cc_pic"
5216 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5217 wl="$lt_cv_prog_cc_wl"
5218 link_static_flag="$lt_cv_prog_cc_static"
5219 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5220 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5221
5222
5223 # Check to see if options -o and -c are simultaneously supported by compiler
5224 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5225 echo "configure:5226: checking if $compiler supports -c -o file.$ac_objext" >&5
5226 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5227   echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229   
5230 $rm -r conftest 2>/dev/null
5231 mkdir conftest
5232 cd conftest
5233 echo "int some_variable = 0;" > conftest.$ac_ext
5234 mkdir out
5235 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5236 # that will create temporary files in the current directory regardless of
5237 # the output directory.  Thus, making CWD read-only will cause this test
5238 # to fail, enabling locking or at least warning the user not to do parallel
5239 # builds.
5240 chmod -w .
5241 save_CFLAGS="$CFLAGS"
5242 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5243 compiler_c_o=no
5244 if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5245   # The compiler can only warn and ignore the option if not recognized
5246   # So say no if there are warnings
5247   if test -s out/conftest.err; then
5248     lt_cv_compiler_c_o=no
5249   else
5250     lt_cv_compiler_c_o=yes
5251   fi
5252 else
5253   # Append any errors to the config.log.
5254   cat out/conftest.err 1>&5
5255   lt_cv_compiler_c_o=no
5256 fi
5257 CFLAGS="$save_CFLAGS"
5258 chmod u+w .
5259 $rm conftest* out/*
5260 rmdir out
5261 cd ..
5262 rmdir conftest
5263 $rm -r conftest 2>/dev/null
5264
5265 fi
5266
5267 compiler_c_o=$lt_cv_compiler_c_o
5268 echo "$ac_t""$compiler_c_o" 1>&6
5269
5270 if test x"$compiler_c_o" = x"yes"; then
5271   # Check to see if we can write to a .lo
5272   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5273 echo "configure:5274: checking if $compiler supports -c -o file.lo" >&5
5274   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5275   echo $ac_n "(cached) $ac_c" 1>&6
5276 else
5277   
5278   lt_cv_compiler_o_lo=no
5279   save_CFLAGS="$CFLAGS"
5280   CFLAGS="$CFLAGS -c -o conftest.lo"
5281   save_objext="$ac_objext"
5282   ac_objext=lo
5283   cat > conftest.$ac_ext <<EOF
5284 #line 5285 "configure"
5285 #include "confdefs.h"
5286
5287 int main() {
5288 int some_variable = 0;
5289 ; return 0; }
5290 EOF
5291 if { (eval echo configure:5292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5292   rm -rf conftest*
5293       # The compiler can only warn and ignore the option if not recognized
5294     # So say no if there are warnings
5295     if test -s conftest.err; then
5296       lt_cv_compiler_o_lo=no
5297     else
5298       lt_cv_compiler_o_lo=yes
5299     fi
5300   
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304 fi
5305 rm -f conftest*
5306   ac_objext="$save_objext"
5307   CFLAGS="$save_CFLAGS"
5308   
5309 fi
5310
5311   compiler_o_lo=$lt_cv_compiler_o_lo
5312   echo "$ac_t""$compiler_o_lo" 1>&6
5313 else
5314   compiler_o_lo=no
5315 fi
5316
5317 # Check to see if we can do hard links to lock some files if needed
5318 hard_links="nottested"
5319 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5320   # do not overwrite the value of need_locks provided by the user
5321   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5322 echo "configure:5323: checking if we can lock with hard links" >&5
5323   hard_links=yes
5324   $rm conftest*
5325   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5326   touch conftest.a
5327   ln conftest.a conftest.b 2>&5 || hard_links=no
5328   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5329   echo "$ac_t""$hard_links" 1>&6
5330   if test "$hard_links" = no; then
5331     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5332     need_locks=warn
5333   fi
5334 else
5335   need_locks=no
5336 fi
5337
5338 if test "$GCC" = yes; then
5339   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5340   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5341 echo "configure:5342: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5342   echo "int some_variable = 0;" > conftest.$ac_ext
5343   save_CFLAGS="$CFLAGS"
5344   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5345   compiler_rtti_exceptions=no
5346   cat > conftest.$ac_ext <<EOF
5347 #line 5348 "configure"
5348 #include "confdefs.h"
5349
5350 int main() {
5351 int some_variable = 0;
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5355   rm -rf conftest*
5356       # The compiler can only warn and ignore the option if not recognized
5357     # So say no if there are warnings
5358     if test -s conftest.err; then
5359       compiler_rtti_exceptions=no
5360     else
5361       compiler_rtti_exceptions=yes
5362     fi
5363   
5364 else
5365   echo "configure: failed program was:" >&5
5366   cat conftest.$ac_ext >&5
5367 fi
5368 rm -f conftest*
5369   CFLAGS="$save_CFLAGS"
5370   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5371
5372   if test "$compiler_rtti_exceptions" = "yes"; then
5373     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5374   else
5375     no_builtin_flag=' -fno-builtin'
5376   fi
5377 fi
5378
5379 # See if the linker supports building shared libraries.
5380 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5381 echo "configure:5382: checking whether the linker ($LD) supports shared libraries" >&5
5382
5383 allow_undefined_flag=
5384 no_undefined_flag=
5385 need_lib_prefix=unknown
5386 need_version=unknown
5387 # when you set need_version to no, make sure it does not cause -set_version
5388 # flags to be left without arguments
5389 archive_cmds=
5390 archive_expsym_cmds=
5391 old_archive_from_new_cmds=
5392 old_archive_from_expsyms_cmds=
5393 export_dynamic_flag_spec=
5394 whole_archive_flag_spec=
5395 thread_safe_flag_spec=
5396 hardcode_into_libs=no
5397 hardcode_libdir_flag_spec=
5398 hardcode_libdir_separator=
5399 hardcode_direct=no
5400 hardcode_minus_L=no
5401 hardcode_shlibpath_var=unsupported
5402 runpath_var=
5403 link_all_deplibs=unknown
5404 always_export_symbols=no
5405 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5406 # include_expsyms should be a list of space-separated symbols to be *always*
5407 # included in the symbol list
5408 include_expsyms=
5409 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5410 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5411 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5412 # as well as any symbol that contains `d'.
5413 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5414 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5415 # platforms (ab)use it in PIC code, but their linkers get confused if
5416 # the symbol is explicitly referenced.  Since portable code cannot
5417 # rely on this symbol name, it's probably fine to never include it in
5418 # preloaded symbol tables.
5419 extract_expsyms_cmds=
5420
5421 case $host_os in
5422 cygwin* | mingw* | pw32*)
5423   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5424   # When not using gcc, we currently assume that we are using
5425   # Microsoft Visual C++.
5426   if test "$GCC" != yes; then
5427     with_gnu_ld=no
5428   fi
5429   ;;
5430 openbsd*)
5431   with_gnu_ld=no
5432   ;;
5433 esac
5434
5435 ld_shlibs=yes
5436 if test "$with_gnu_ld" = yes; then
5437   # If archive_cmds runs LD, not CC, wlarc should be empty
5438   wlarc='${wl}'
5439
5440   # See if GNU ld supports shared libraries.
5441   case $host_os in
5442   aix3* | aix4* | aix5*)
5443     # On AIX, the GNU linker is very broken
5444     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5445     ld_shlibs=no
5446     cat <<EOF 1>&2
5447
5448 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5449 *** to be unable to reliably create shared libraries on AIX.
5450 *** Therefore, libtool is disabling shared libraries support.  If you
5451 *** really care for shared libraries, you may want to modify your PATH
5452 *** so that a non-GNU linker is found, and then restart.
5453
5454 EOF
5455     ;;
5456
5457   amigaos*)
5458     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)'
5459     hardcode_libdir_flag_spec='-L$libdir'
5460     hardcode_minus_L=yes
5461
5462     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5463     # that the semantics of dynamic libraries on AmigaOS, at least up
5464     # to version 4, is to share data among multiple programs linked
5465     # with the same dynamic library.  Since this doesn't match the
5466     # behavior of shared libraries on other platforms, we can use
5467     # them.
5468     ld_shlibs=no
5469     ;;
5470
5471   beos*)
5472     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5473       allow_undefined_flag=unsupported
5474       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5475       # support --undefined.  This deserves some investigation.  FIXME
5476       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5477     else
5478       ld_shlibs=no
5479     fi
5480     ;;
5481
5482   cygwin* | mingw* | pw32*)
5483     # hardcode_libdir_flag_spec is actually meaningless, as there is
5484     # no search path for DLLs.
5485     hardcode_libdir_flag_spec='-L$libdir'
5486     allow_undefined_flag=unsupported
5487     always_export_symbols=yes
5488
5489     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5490       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5491       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5492       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5493       else $CC -o impgen impgen.c ; fi)~
5494       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5495
5496     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5497
5498     # cygwin and mingw dlls have different entry points and sets of symbols
5499     # to exclude.
5500     # FIXME: what about values for MSVC?
5501     dll_entry=__cygwin_dll_entry@12
5502     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5503     case $host_os in
5504     mingw*)
5505       # mingw values
5506       dll_entry=_DllMainCRTStartup@12
5507       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5508       ;;
5509     esac
5510
5511     # mingw and cygwin differ, and it's simplest to just exclude the union
5512     # of the two symbol sets.
5513     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5514
5515     # recent cygwin and mingw systems supply a stub DllMain which the user
5516     # can override, but on older systems we have to supply one (in ltdll.c)
5517     if test "x$lt_cv_need_dllmain" = "xyes"; then
5518       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5519       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~
5520         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5521     else
5522       ltdll_obj=
5523       ltdll_cmds=
5524     fi
5525
5526     # Extract the symbol export list from an `--export-all' def file,
5527     # then regenerate the def file from the symbol export list, so that
5528     # the compiled dll only exports the symbol export list.
5529     # Be careful not to strip the DATA tag left be newer dlltools.
5530     export_symbols_cmds="$ltdll_cmds"'
5531       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5532       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5533
5534     # If the export-symbols file already is a .def file (1st line
5535     # is EXPORTS), use it as is.
5536     # If DATA tags from a recent dlltool are present, honour them!
5537     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5538         cp $export_symbols $output_objdir/$soname-def;
5539       else
5540         echo EXPORTS > $output_objdir/$soname-def;
5541         _lt_hint=1;
5542         cat $export_symbols | while read symbol; do
5543          set dummy \$symbol;
5544          case \$# in
5545            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5546            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5547            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5548          esac;
5549          _lt_hint=`expr 1 + \$_lt_hint`;
5550         done;
5551       fi~
5552       '"$ltdll_cmds"'
5553       $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~
5554       $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~
5555       $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~
5556       $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~
5557       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5558     ;;
5559
5560   netbsd*)
5561     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5562       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5563       wlarc=
5564     else
5565       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5566       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5567     fi
5568     ;;
5569
5570   solaris* | sysv5*)
5571     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5572       ld_shlibs=no
5573       cat <<EOF 1>&2
5574
5575 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5576 *** create shared libraries on Solaris systems.  Therefore, libtool
5577 *** is disabling shared libraries support.  We urge you to upgrade GNU
5578 *** binutils to release 2.9.1 or newer.  Another option is to modify
5579 *** your PATH or compiler configuration so that the native linker is
5580 *** used, and then restart.
5581
5582 EOF
5583     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5584       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5585       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5586     else
5587       ld_shlibs=no
5588     fi
5589     ;;
5590
5591   sunos4*)
5592     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5593     wlarc=
5594     hardcode_direct=yes
5595     hardcode_shlibpath_var=no
5596     ;;
5597
5598   *)
5599     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5600       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5601       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5602     else
5603       ld_shlibs=no
5604     fi
5605     ;;
5606   esac
5607
5608   if test "$ld_shlibs" = yes; then
5609     runpath_var=LD_RUN_PATH
5610     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5611     export_dynamic_flag_spec='${wl}--export-dynamic'
5612     case $host_os in
5613     cygwin* | mingw* | pw32*)
5614       # dlltool doesn't understand --whole-archive et. al.
5615       whole_archive_flag_spec=
5616       ;;
5617     *)
5618       # ancient GNU ld didn't support --whole-archive et. al.
5619       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5620         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5621       else
5622         whole_archive_flag_spec=
5623       fi
5624       ;;
5625     esac
5626   fi
5627 else
5628   # PORTME fill in a description of your system's linker (not GNU ld)
5629   case $host_os in
5630   aix3*)
5631     allow_undefined_flag=unsupported
5632     always_export_symbols=yes
5633     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'
5634     # Note: this linker hardcodes the directories in LIBPATH if there
5635     # are no directories specified by -L.
5636     hardcode_minus_L=yes
5637     if test "$GCC" = yes && test -z "$link_static_flag"; then
5638       # Neither direct hardcoding nor static linking is supported with a
5639       # broken collect2.
5640       hardcode_direct=unsupported
5641     fi
5642     ;;
5643
5644   aix4* | aix5*)
5645     if test "$host_cpu" = ia64; then
5646       # On IA64, the linker does run time linking by default, so we don't
5647       # have to do anything special.
5648       aix_use_runtimelinking=no
5649       exp_sym_flag='-Bexport'
5650       no_entry_flag=""
5651     else
5652       aix_use_runtimelinking=no
5653
5654       # Test if we are trying to use run time linking or normal
5655       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5656       # need to do runtime linking.
5657       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5658         for ld_flag in $LDFLAGS; do
5659           case $ld_flag in
5660           *-brtl*)
5661             aix_use_runtimelinking=yes
5662             break
5663           ;;
5664           esac
5665         done
5666       esac
5667
5668       exp_sym_flag='-bexport'
5669       no_entry_flag='-bnoentry'
5670     fi
5671
5672     # When large executables or shared objects are built, AIX ld can
5673     # have problems creating the table of contents.  If linking a library
5674     # or program results in "error TOC overflow" add -mminimal-toc to
5675     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5676     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5677
5678     hardcode_direct=yes
5679     archive_cmds=''
5680     hardcode_libdir_separator=':'
5681     if test "$GCC" = yes; then
5682       case $host_os in aix4.[012]|aix4.[012].*)
5683         collect2name=`${CC} -print-prog-name=collect2`
5684         if test -f "$collect2name" && \
5685           strings "$collect2name" | grep resolve_lib_name >/dev/null
5686         then
5687           # We have reworked collect2
5688           hardcode_direct=yes
5689         else
5690           # We have old collect2
5691           hardcode_direct=unsupported
5692           # It fails to find uninstalled libraries when the uninstalled
5693           # path is not listed in the libpath.  Setting hardcode_minus_L
5694           # to unsupported forces relinking
5695           hardcode_minus_L=yes
5696           hardcode_libdir_flag_spec='-L$libdir'
5697           hardcode_libdir_separator=
5698         fi
5699       esac
5700
5701       shared_flag='-shared'
5702     else
5703       # not using gcc
5704       if test "$host_cpu" = ia64; then
5705         shared_flag='${wl}-G'
5706       else
5707         if test "$aix_use_runtimelinking" = yes; then
5708           shared_flag='${wl}-G'
5709         else
5710           shared_flag='${wl}-bM:SRE'
5711         fi
5712       fi
5713     fi
5714
5715     # It seems that -bexpall can do strange things, so it is better to
5716     # generate a list of symbols to export.
5717     always_export_symbols=yes
5718     if test "$aix_use_runtimelinking" = yes; then
5719       # Warning - without using the other runtime loading flags (-brtl),
5720       # -berok will link without error, but may produce a broken library.
5721       allow_undefined_flag='-berok'
5722       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5723       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"
5724     else
5725       if test "$host_cpu" = ia64; then
5726         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5727         allow_undefined_flag="-z nodefs"
5728         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"
5729       else
5730         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5731         # Warning - without using the other run time loading flags,
5732         # -berok will link without error, but may produce a broken library.
5733         allow_undefined_flag='${wl}-berok'
5734         # This is a bit strange, but is similar to how AIX traditionally builds
5735         # it's shared libraries.
5736         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'
5737       fi
5738     fi
5739     ;;
5740
5741   amigaos*)
5742     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)'
5743     hardcode_libdir_flag_spec='-L$libdir'
5744     hardcode_minus_L=yes
5745     # see comment about different semantics on the GNU ld section
5746     ld_shlibs=no
5747     ;;
5748
5749   cygwin* | mingw* | pw32*)
5750     # When not using gcc, we currently assume that we are using
5751     # Microsoft Visual C++.
5752     # hardcode_libdir_flag_spec is actually meaningless, as there is
5753     # no search path for DLLs.
5754     hardcode_libdir_flag_spec=' '
5755     allow_undefined_flag=unsupported
5756     # Tell ltmain to make .lib files, not .a files.
5757     libext=lib
5758     # FIXME: Setting linknames here is a bad hack.
5759     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5760     # The linker will automatically build a .lib file if we build a DLL.
5761     old_archive_from_new_cmds='true'
5762     # FIXME: Should let the user specify the lib program.
5763     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5764     fix_srcfile_path='`cygpath -w "$srcfile"`'
5765     ;;
5766
5767   darwin* | rhapsody*)
5768     case "$host_os" in
5769     rhapsody* | darwin1.[012])
5770       allow_undefined_flag='-undefined suppress'
5771       ;;
5772     *) # Darwin 1.3 on
5773       allow_undefined_flag='-flat_namespace -undefined suppress'
5774       ;;
5775     esac
5776     # FIXME: Relying on posixy $() will cause problems for
5777     #        cross-compilation, but unfortunately the echo tests do not
5778     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5779     #        `"' quotes if we put them in here... so don't!
5780     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)'
5781     # We need to add '_' to the symbols in $export_symbols first
5782     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5783     hardcode_direct=yes
5784     hardcode_shlibpath_var=no
5785     whole_archive_flag_spec='-all_load $convenience'
5786     ;;
5787
5788   freebsd1*)
5789     ld_shlibs=no
5790     ;;
5791
5792   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5793   # support.  Future versions do this automatically, but an explicit c++rt0.o
5794   # does not break anything, and helps significantly (at the cost of a little
5795   # extra space).
5796   freebsd2.2*)
5797     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5798     hardcode_libdir_flag_spec='-R$libdir'
5799     hardcode_direct=yes
5800     hardcode_shlibpath_var=no
5801     ;;
5802
5803   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5804   freebsd2*)
5805     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5806     hardcode_direct=yes
5807     hardcode_minus_L=yes
5808     hardcode_shlibpath_var=no
5809     ;;
5810
5811   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5812   freebsd*)
5813     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5814     hardcode_libdir_flag_spec='-R$libdir'
5815     hardcode_direct=yes
5816     hardcode_shlibpath_var=no
5817     ;;
5818
5819   hpux9* | hpux10* | hpux11*)
5820     case $host_os in
5821     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' ;;
5822     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5823     esac
5824     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5825     hardcode_libdir_separator=:
5826     hardcode_direct=yes
5827     hardcode_minus_L=yes # Not in the search PATH, but as the default
5828                          # location of the library.
5829     export_dynamic_flag_spec='${wl}-E'
5830     ;;
5831
5832   irix5* | irix6* | nonstopux*)
5833     if test "$GCC" = yes; then
5834       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'
5835       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5836     else
5837       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'
5838       hardcode_libdir_flag_spec='-rpath $libdir'
5839     fi
5840     hardcode_libdir_separator=:
5841     link_all_deplibs=yes
5842     ;;
5843
5844   netbsd*)
5845     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5846       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5847     else
5848       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5849     fi
5850     hardcode_libdir_flag_spec='-R$libdir'
5851     hardcode_direct=yes
5852     hardcode_shlibpath_var=no
5853     ;;
5854
5855   newsos6)
5856     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5857     hardcode_direct=yes
5858     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5859     hardcode_libdir_separator=:
5860     hardcode_shlibpath_var=no
5861     ;;
5862
5863   openbsd*)
5864     hardcode_direct=yes
5865     hardcode_shlibpath_var=no
5866     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5867       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5868       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5869       export_dynamic_flag_spec='${wl}-E'
5870     else
5871       case "$host_os" in
5872       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5873         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5874         hardcode_libdir_flag_spec='-R$libdir'
5875         ;;
5876       *)
5877         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5878         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5879         ;;
5880       esac
5881     fi
5882     ;;
5883
5884   openedition*)
5885     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5886         cp \$linknames \$output_objdir && linknames=''"
5887     export_dynamic_flag_spec="-Wl,DLL"
5888     ;;
5889
5890   os2*)
5891     hardcode_libdir_flag_spec='-L$libdir'
5892     hardcode_minus_L=yes
5893     allow_undefined_flag=unsupported
5894     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'
5895     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5896     ;;
5897
5898   osf3*)
5899     if test "$GCC" = yes; then
5900       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5901       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'
5902     else
5903       allow_undefined_flag=' -expect_unresolved \*'
5904       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'
5905     fi
5906     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5907     hardcode_libdir_separator=:
5908     ;;
5909
5910   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5911     if test "$GCC" = yes; then
5912       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5913       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'
5914       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5915     else
5916       allow_undefined_flag=' -expect_unresolved \*'
5917       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'
5918       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5919       $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'
5920
5921       #Both c and cxx compiler support -rpath directly
5922       hardcode_libdir_flag_spec='-rpath $libdir'
5923     fi
5924     hardcode_libdir_separator=:
5925     ;;
5926
5927   sco3.2v5*)
5928     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5929     hardcode_shlibpath_var=no
5930     runpath_var=LD_RUN_PATH
5931     hardcode_runpath_var=yes
5932     export_dynamic_flag_spec='${wl}-Bexport'
5933     ;;
5934
5935   solaris*)
5936     # gcc --version < 3.0 without binutils cannot create self contained
5937     # shared libraries reliably, requiring libgcc.a to resolve some of
5938     # the object symbols generated in some cases.  Libraries that use
5939     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5940     # a copy of libgcc.a into every shared library to guarantee resolving
5941     # such symbols causes other problems:  According to Tim Van Holder
5942     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5943     # (to the application) exception stack for one thing.
5944     no_undefined_flag=' -z defs'
5945     if test "$GCC" = yes; then
5946       case `$CC --version 2>/dev/null` in
5947       [12].*)
5948         cat <<EOF 1>&2
5949
5950 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5951 *** create self contained shared libraries on Solaris systems, without
5952 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5953 *** -no-undefined support, which will at least allow you to build shared
5954 *** libraries.  However, you may find that when you link such libraries
5955 *** into an application without using GCC, you have to manually add
5956 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5957 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5958 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5959
5960 EOF
5961         no_undefined_flag=
5962         ;;
5963       esac
5964     fi
5965     # $CC -shared without GNU ld will not create a library from C++
5966     # object files and a static libstdc++, better avoid it by now
5967     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5969                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5970     hardcode_libdir_flag_spec='-R$libdir'
5971     hardcode_shlibpath_var=no
5972     case $host_os in
5973     solaris2.[0-5] | solaris2.[0-5].*) ;;
5974     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5975       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5976     esac
5977     link_all_deplibs=yes
5978     ;;
5979
5980   sunos4*)
5981     if test "x$host_vendor" = xsequent; then
5982       # Use $CC to link under sequent, because it throws in some extra .o
5983       # files that make .init and .fini sections work.
5984       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5985     else
5986       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5987     fi
5988     hardcode_libdir_flag_spec='-L$libdir'
5989     hardcode_direct=yes
5990     hardcode_minus_L=yes
5991     hardcode_shlibpath_var=no
5992     ;;
5993
5994   sysv4)
5995     case $host_vendor in
5996       sni)
5997         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5998         hardcode_direct=yes # is this really true???
5999         ;;
6000       siemens)
6001         ## LD is ld it makes a PLAMLIB
6002         ## CC just makes a GrossModule.
6003         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6004         reload_cmds='$CC -r -o $output$reload_objs'
6005         hardcode_direct=no
6006         ;;
6007       motorola)
6008         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6009         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6010         ;;
6011     esac
6012     runpath_var='LD_RUN_PATH'
6013     hardcode_shlibpath_var=no
6014     ;;
6015
6016   sysv4.3*)
6017     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     hardcode_shlibpath_var=no
6019     export_dynamic_flag_spec='-Bexport'
6020     ;;
6021
6022   sysv5*)
6023     no_undefined_flag=' -z text'
6024     # $CC -shared without GNU ld will not create a library from C++
6025     # object files and a static libstdc++, better avoid it by now
6026     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6027     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6028                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6029     hardcode_libdir_flag_spec=
6030     hardcode_shlibpath_var=no
6031     runpath_var='LD_RUN_PATH'
6032     ;;
6033
6034   uts4*)
6035     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6036     hardcode_libdir_flag_spec='-L$libdir'
6037     hardcode_shlibpath_var=no
6038     ;;
6039
6040   dgux*)
6041     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6042     hardcode_libdir_flag_spec='-L$libdir'
6043     hardcode_shlibpath_var=no
6044     ;;
6045
6046   sysv4*MP*)
6047     if test -d /usr/nec; then
6048       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6049       hardcode_shlibpath_var=no
6050       runpath_var=LD_RUN_PATH
6051       hardcode_runpath_var=yes
6052       ld_shlibs=yes
6053     fi
6054     ;;
6055
6056   sysv4.2uw2*)
6057     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6058     hardcode_direct=yes
6059     hardcode_minus_L=no
6060     hardcode_shlibpath_var=no
6061     hardcode_runpath_var=yes
6062     runpath_var=LD_RUN_PATH
6063     ;;
6064
6065   sysv5uw7* | unixware7*)
6066     no_undefined_flag='${wl}-z ${wl}text'
6067     if test "$GCC" = yes; then
6068       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6069     else
6070       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6071     fi
6072     runpath_var='LD_RUN_PATH'
6073     hardcode_shlibpath_var=no
6074     ;;
6075
6076   *)
6077     ld_shlibs=no
6078     ;;
6079   esac
6080 fi
6081 echo "$ac_t""$ld_shlibs" 1>&6
6082 test "$ld_shlibs" = no && can_build_shared=no
6083
6084 # Check hardcoding attributes.
6085 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6086 echo "configure:6087: checking how to hardcode library paths into programs" >&5
6087 hardcode_action=
6088 if test -n "$hardcode_libdir_flag_spec" || \
6089    test -n "$runpath_var"; then
6090
6091   # We can hardcode non-existant directories.
6092   if test "$hardcode_direct" != no &&
6093      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6094      # have to relink, otherwise we might link with an installed library
6095      # when we should be linking with a yet-to-be-installed one
6096      ## test "$hardcode_shlibpath_var" != no &&
6097      test "$hardcode_minus_L" != no; then
6098     # Linking always hardcodes the temporary library directory.
6099     hardcode_action=relink
6100   else
6101     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6102     hardcode_action=immediate
6103   fi
6104 else
6105   # We cannot hardcode anything, or else we can only hardcode existing
6106   # directories.
6107   hardcode_action=unsupported
6108 fi
6109 echo "$ac_t""$hardcode_action" 1>&6
6110
6111 striplib=
6112 old_striplib=
6113 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6114 echo "configure:6115: checking whether stripping libraries is possible" >&5
6115 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6116   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6117   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6118   echo "$ac_t""yes" 1>&6
6119 else
6120   echo "$ac_t""no" 1>&6
6121 fi
6122
6123 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6124 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6125
6126 # PORTME Fill in your ld.so characteristics
6127 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6128 echo "configure:6129: checking dynamic linker characteristics" >&5
6129 library_names_spec=
6130 libname_spec='lib$name'
6131 soname_spec=
6132 postinstall_cmds=
6133 postuninstall_cmds=
6134 finish_cmds=
6135 finish_eval=
6136 shlibpath_var=
6137 shlibpath_overrides_runpath=unknown
6138 version_type=none
6139 dynamic_linker="$host_os ld.so"
6140 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6141 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6142
6143 case $host_os in
6144 aix3*)
6145   version_type=linux
6146   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6147   shlibpath_var=LIBPATH
6148
6149   # AIX has no versioning support, so we append a major version to the name.
6150   soname_spec='${libname}${release}.so$major'
6151   ;;
6152
6153 aix4* | aix5*)
6154   version_type=linux
6155   need_lib_prefix=no
6156   need_version=no
6157   hardcode_into_libs=yes
6158   if test "$host_cpu" = ia64; then
6159     # AIX 5 supports IA64
6160     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6161     shlibpath_var=LD_LIBRARY_PATH
6162   else
6163     # With GCC up to 2.95.x, collect2 would create an import file
6164     # for dependence libraries.  The import file would start with
6165     # the line `#! .'.  This would cause the generated library to
6166     # depend on `.', always an invalid library.  This was fixed in
6167     # development snapshots of GCC prior to 3.0.
6168     case $host_os in
6169       aix4 | aix4.[01] | aix4.[01].*)
6170         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6171              echo ' yes '
6172              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6173           :
6174         else
6175           can_build_shared=no
6176         fi
6177         ;;
6178     esac
6179     # AIX (on Power*) has no versioning support, so currently we can
6180     # not hardcode correct soname into executable. Probably we can
6181     # add versioning support to collect2, so additional links can
6182     # be useful in future.
6183     if test "$aix_use_runtimelinking" = yes; then
6184       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6185       # instead of lib<name>.a to let people know that these are not
6186       # typical AIX shared libraries.
6187       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6188     else
6189       # We preserve .a as extension for shared libraries through AIX4.2
6190       # and later when we are not doing run time linking.
6191       library_names_spec='${libname}${release}.a $libname.a'
6192       soname_spec='${libname}${release}.so$major'
6193     fi
6194     shlibpath_var=LIBPATH
6195   fi
6196   hardcode_into_libs=yes
6197   ;;
6198
6199 amigaos*)
6200   library_names_spec='$libname.ixlibrary $libname.a'
6201   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6202   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'
6203   ;;
6204
6205 beos*)
6206   library_names_spec='${libname}.so'
6207   dynamic_linker="$host_os ld.so"
6208   shlibpath_var=LIBRARY_PATH
6209   ;;
6210
6211 bsdi4*)
6212   version_type=linux
6213   need_version=no
6214   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6215   soname_spec='${libname}${release}.so$major'
6216   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6217   shlibpath_var=LD_LIBRARY_PATH
6218   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6219   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6220   export_dynamic_flag_spec=-rdynamic
6221   # the default ld.so.conf also contains /usr/contrib/lib and
6222   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6223   # libtool to hard-code these into programs
6224   ;;
6225
6226 cygwin* | mingw* | pw32*)
6227   version_type=windows
6228   need_version=no
6229   need_lib_prefix=no
6230   case $GCC,$host_os in
6231   yes,cygwin*)
6232     library_names_spec='$libname.dll.a'
6233     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6234     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6235       dldir=$destdir/`dirname \$dlpath`~
6236       test -d \$dldir || mkdir -p \$dldir~
6237       $install_prog .libs/$dlname \$dldir/$dlname'
6238     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6239       dlpath=$dir/\$dldll~
6240        $rm \$dlpath'
6241     ;;
6242   yes,mingw*)
6243     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6244     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6245     ;;
6246   yes,pw32*)
6247     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6248     ;;
6249   *)
6250     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6251     ;;
6252   esac
6253   dynamic_linker='Win32 ld.exe'
6254   # FIXME: first we should search . and the directory the executable is in
6255   shlibpath_var=PATH
6256   ;;
6257
6258 darwin* | rhapsody*)
6259   dynamic_linker="$host_os dyld"
6260   version_type=darwin
6261   need_lib_prefix=no
6262   need_version=no
6263   # FIXME: Relying on posixy $() will cause problems for
6264   #        cross-compilation, but unfortunately the echo tests do not
6265   #        yet detect zsh echo's removal of \ escapes.
6266   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)'
6267   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6268   shlibpath_overrides_runpath=yes
6269   shlibpath_var=DYLD_LIBRARY_PATH
6270   ;;
6271
6272 freebsd1*)
6273   dynamic_linker=no
6274   ;;
6275
6276 freebsd*)
6277   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6278   version_type=freebsd-$objformat
6279   case $version_type in
6280     freebsd-elf*)
6281       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6282       need_version=no
6283       need_lib_prefix=no
6284       ;;
6285     freebsd-*)
6286       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6287       need_version=yes
6288       ;;
6289   esac
6290   shlibpath_var=LD_LIBRARY_PATH
6291   case $host_os in
6292   freebsd2*)
6293     shlibpath_overrides_runpath=yes
6294     ;;
6295   *)
6296     shlibpath_overrides_runpath=no
6297     hardcode_into_libs=yes
6298     ;;
6299   esac
6300   ;;
6301
6302 gnu*)
6303   version_type=linux
6304   need_lib_prefix=no
6305   need_version=no
6306   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6307   soname_spec='${libname}${release}.so$major'
6308   shlibpath_var=LD_LIBRARY_PATH
6309   hardcode_into_libs=yes
6310   ;;
6311
6312 hpux9* | hpux10* | hpux11*)
6313   # Give a soname corresponding to the major version so that dld.sl refuses to
6314   # link against other versions.
6315   dynamic_linker="$host_os dld.sl"
6316   version_type=sunos
6317   need_lib_prefix=no
6318   need_version=no
6319   shlibpath_var=SHLIB_PATH
6320   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6321   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6322   soname_spec='${libname}${release}.sl$major'
6323   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6324   postinstall_cmds='chmod 555 $lib'
6325   ;;
6326
6327 irix5* | irix6* | nonstopux*)
6328   case $host_os in
6329     nonstopux*) version_type=nonstopux ;;
6330     *)          version_type=irix ;;
6331   esac
6332   need_lib_prefix=no
6333   need_version=no
6334   soname_spec='${libname}${release}.so$major'
6335   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6336   case $host_os in
6337   irix5* | nonstopux*)
6338     libsuff= shlibsuff=
6339     ;;
6340   *)
6341     case $LD in # libtool.m4 will add one of these switches to LD
6342     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6343     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6344     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6345     *) libsuff= shlibsuff= libmagic=never-match;;
6346     esac
6347     ;;
6348   esac
6349   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6350   shlibpath_overrides_runpath=no
6351   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6352   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6353   ;;
6354
6355 # No shared lib support for Linux oldld, aout, or coff.
6356 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6357   dynamic_linker=no
6358   ;;
6359
6360 # This must be Linux ELF.
6361 linux-gnu*)
6362   version_type=linux
6363   need_lib_prefix=no
6364   need_version=no
6365   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6366   soname_spec='${libname}${release}.so$major'
6367   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6368   shlibpath_var=LD_LIBRARY_PATH
6369   shlibpath_overrides_runpath=no
6370   # This implies no fast_install, which is unacceptable.
6371   # Some rework will be needed to allow for fast_install
6372   # before this can be enabled.
6373   hardcode_into_libs=yes
6374
6375   # We used to test for /lib/ld.so.1 and disable shared libraries on
6376   # powerpc, because MkLinux only supported shared libraries with the
6377   # GNU dynamic linker.  Since this was broken with cross compilers,
6378   # most powerpc-linux boxes support dynamic linking these days and
6379   # people can always --disable-shared, the test was removed, and we
6380   # assume the GNU/Linux dynamic linker is in use.
6381   dynamic_linker='GNU/Linux ld.so'
6382   ;;
6383
6384 netbsd*)
6385   version_type=sunos
6386   need_lib_prefix=no
6387   need_version=no
6388   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6389     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6390     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6391     dynamic_linker='NetBSD (a.out) ld.so'
6392   else
6393     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6394     soname_spec='${libname}${release}.so$major'
6395     dynamic_linker='NetBSD ld.elf_so'
6396   fi
6397   shlibpath_var=LD_LIBRARY_PATH
6398   shlibpath_overrides_runpath=yes
6399   hardcode_into_libs=yes
6400   ;;
6401
6402 newsos6)
6403   version_type=linux
6404   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6405   shlibpath_var=LD_LIBRARY_PATH
6406   shlibpath_overrides_runpath=yes
6407   ;;
6408
6409 openbsd*)
6410   version_type=sunos
6411   need_lib_prefix=no
6412   need_version=no
6413   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6414     case "$host_os" in
6415     openbsd2.[89] | openbsd2.[89].*)
6416       shlibpath_overrides_runpath=no
6417       ;;
6418     *)
6419       shlibpath_overrides_runpath=yes
6420       ;;
6421     esac
6422   else
6423     shlibpath_overrides_runpath=yes
6424   fi
6425   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6426   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6427   shlibpath_var=LD_LIBRARY_PATH
6428   ;;
6429
6430 openedition*)
6431   need_lib_prefix=no
6432   need_version=no
6433   shlibpath_overrides_runpath=yes
6434   shlibpath_var=LIBPATH
6435   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6436   # the library's exports are in libname.x; this is the file that must
6437   # actually be linked with to use a DLL.
6438   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6439   ;;
6440
6441 os2*)
6442   libname_spec='$name'
6443   need_lib_prefix=no
6444   library_names_spec='$libname.dll $libname.a'
6445   dynamic_linker='OS/2 ld.exe'
6446   shlibpath_var=LIBPATH
6447   ;;
6448
6449 osf3* | osf4* | osf5*)
6450   version_type=osf
6451   need_version=no
6452   soname_spec='${libname}${release}.so$major'
6453   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6454   shlibpath_var=LD_LIBRARY_PATH
6455   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6456   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6457   hardcode_into_libs=yes
6458   ;;
6459
6460 sco3.2v5*)
6461   version_type=osf
6462   soname_spec='${libname}${release}.so$major'
6463   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6464   shlibpath_var=LD_LIBRARY_PATH
6465   ;;
6466
6467 solaris*)
6468   version_type=linux
6469   need_lib_prefix=no
6470   need_version=no
6471   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6472   soname_spec='${libname}${release}.so$major'
6473   shlibpath_var=LD_LIBRARY_PATH
6474   shlibpath_overrides_runpath=yes
6475   hardcode_into_libs=yes
6476   # ldd complains unless libraries are executable
6477   postinstall_cmds='chmod +x $lib'
6478   ;;
6479
6480 sunos4*)
6481   version_type=sunos
6482   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6483   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6484   shlibpath_var=LD_LIBRARY_PATH
6485   shlibpath_overrides_runpath=yes
6486   if test "$with_gnu_ld" = yes; then
6487     need_lib_prefix=no
6488   fi
6489   need_version=yes
6490   ;;
6491
6492 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6493   version_type=linux
6494   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6495   soname_spec='${libname}${release}.so$major'
6496   shlibpath_var=LD_LIBRARY_PATH
6497   case $host_vendor in
6498     sni)
6499       shlibpath_overrides_runpath=no
6500       need_lib_prefix=no
6501       export_dynamic_flag_spec='${wl}-Blargedynsym'
6502       runpath_var=LD_RUN_PATH
6503       ;;
6504     siemens)
6505       need_lib_prefix=no
6506       ;;
6507     motorola)
6508       need_lib_prefix=no
6509       need_version=no
6510       shlibpath_overrides_runpath=no
6511       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6512       ;;
6513   esac
6514   ;;
6515
6516 uts4*)
6517   version_type=linux
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6519   soname_spec='${libname}${release}.so$major'
6520   shlibpath_var=LD_LIBRARY_PATH
6521   ;;
6522
6523 dgux*)
6524   version_type=linux
6525   need_lib_prefix=no
6526   need_version=no
6527   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6528   soname_spec='${libname}${release}.so$major'
6529   shlibpath_var=LD_LIBRARY_PATH
6530   ;;
6531
6532 sysv4*MP*)
6533   if test -d /usr/nec ;then
6534     version_type=linux
6535     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6536     soname_spec='$libname.so.$major'
6537     shlibpath_var=LD_LIBRARY_PATH
6538   fi
6539   ;;
6540
6541 *)
6542   dynamic_linker=no
6543   ;;
6544 esac
6545 echo "$ac_t""$dynamic_linker" 1>&6
6546 test "$dynamic_linker" = no && can_build_shared=no
6547
6548 # Report the final consequences.
6549 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6550 echo "configure:6551: checking if libtool supports shared libraries" >&5
6551 echo "$ac_t""$can_build_shared" 1>&6
6552
6553 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6554 echo "configure:6555: checking whether to build shared libraries" >&5
6555 test "$can_build_shared" = "no" && enable_shared=no
6556
6557 # On AIX, shared libraries and static libraries use the same namespace, and
6558 # are all built from PIC.
6559 case "$host_os" in
6560 aix3*)
6561   test "$enable_shared" = yes && enable_static=no
6562   if test -n "$RANLIB"; then
6563     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6564     postinstall_cmds='$RANLIB $lib'
6565   fi
6566   ;;
6567
6568 aix4*)
6569   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6570     test "$enable_shared" = yes && enable_static=no
6571   fi
6572   ;;
6573 esac
6574 echo "$ac_t""$enable_shared" 1>&6
6575
6576 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6577 echo "configure:6578: checking whether to build static libraries" >&5
6578 # Make sure either enable_shared or enable_static is yes.
6579 test "$enable_shared" = yes || enable_static=yes
6580 echo "$ac_t""$enable_static" 1>&6
6581
6582 if test "$hardcode_action" = relink; then
6583   # Fast installation is not supported
6584   enable_fast_install=no
6585 elif test "$shlibpath_overrides_runpath" = yes ||
6586      test "$enable_shared" = no; then
6587   # Fast installation is not necessary
6588   enable_fast_install=needless
6589 fi
6590
6591 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6592 if test "$GCC" = yes; then
6593   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6594 fi
6595
6596 if test "x$enable_dlopen" != xyes; then
6597   enable_dlopen=unknown
6598   enable_dlopen_self=unknown
6599   enable_dlopen_self_static=unknown
6600 else
6601   lt_cv_dlopen=no
6602   lt_cv_dlopen_libs=
6603
6604   case $host_os in
6605   beos*)
6606     lt_cv_dlopen="load_add_on"
6607     lt_cv_dlopen_libs=
6608     lt_cv_dlopen_self=yes
6609     ;;
6610
6611   cygwin* | mingw* | pw32*)
6612     lt_cv_dlopen="LoadLibrary"
6613     lt_cv_dlopen_libs=
6614    ;;
6615
6616   *)
6617     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6618 echo "configure:6619: checking for dllload" >&5
6619 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 /* System header to define __stub macros and hopefully few prototypes,
6626     which can conflict with char dllload(); below.  */
6627 #include <assert.h>
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 /* We use char because int might match the return type of a gcc2
6630     builtin and then its argument prototype would still apply.  */
6631 char dllload();
6632 char (*f)();
6633
6634 int main() {
6635
6636 /* The GNU C library defines this for functions which it implements
6637     to always fail with ENOSYS.  Some functions are actually named
6638     something starting with __ and the normal name is an alias.  */
6639 #if defined (__stub_dllload) || defined (__stub___dllload)
6640 choke me
6641 #else
6642 f = dllload;
6643 #endif
6644
6645 ; return 0; }
6646 EOF
6647 if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6648   rm -rf conftest*
6649   eval "ac_cv_func_dllload=yes"
6650 else
6651   echo "configure: failed program was:" >&5
6652   cat conftest.$ac_ext >&5
6653   rm -rf conftest*
6654   eval "ac_cv_func_dllload=no"
6655 fi
6656 rm -f conftest*
6657 fi
6658
6659 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6660   echo "$ac_t""yes" 1>&6
6661   lt_cv_dlopen="dllload"
6662 else
6663   echo "$ac_t""no" 1>&6
6664 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6665 echo "configure:6666: checking for shl_load" >&5
6666 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6667   echo $ac_n "(cached) $ac_c" 1>&6
6668 else
6669   cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* System header to define __stub macros and hopefully few prototypes,
6673     which can conflict with char shl_load(); below.  */
6674 #include <assert.h>
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 /* We use char because int might match the return type of a gcc2
6677     builtin and then its argument prototype would still apply.  */
6678 char shl_load();
6679 char (*f)();
6680
6681 int main() {
6682
6683 /* The GNU C library defines this for functions which it implements
6684     to always fail with ENOSYS.  Some functions are actually named
6685     something starting with __ and the normal name is an alias.  */
6686 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6687 choke me
6688 #else
6689 f = shl_load;
6690 #endif
6691
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   eval "ac_cv_func_shl_load=yes"
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701   eval "ac_cv_func_shl_load=no"
6702 fi
6703 rm -f conftest*
6704 fi
6705
6706 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708   lt_cv_dlopen="shl_load"
6709 else
6710   echo "$ac_t""no" 1>&6
6711 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6712 echo "configure:6713: checking for shl_load in -ldld" >&5
6713 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6715   echo $ac_n "(cached) $ac_c" 1>&6
6716 else
6717   ac_save_LIBS="$LIBS"
6718 LIBS="-ldld  $LIBS"
6719 cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 /* Override any gcc2 internal prototype to avoid an error.  */
6723 /* We use char because int might match the return type of a gcc2
6724     builtin and then its argument prototype would still apply.  */
6725 char shl_load();
6726
6727 int main() {
6728 shl_load()
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_lib_$ac_lib_var=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=no"
6739 fi
6740 rm -f conftest*
6741 LIBS="$ac_save_LIBS"
6742
6743 fi
6744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6747 else
6748   echo "$ac_t""no" 1>&6
6749 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6750 echo "configure:6751: checking for dlopen" >&5
6751 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6752   echo $ac_n "(cached) $ac_c" 1>&6
6753 else
6754   cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757 /* System header to define __stub macros and hopefully few prototypes,
6758     which can conflict with char dlopen(); below.  */
6759 #include <assert.h>
6760 /* Override any gcc2 internal prototype to avoid an error.  */
6761 /* We use char because int might match the return type of a gcc2
6762     builtin and then its argument prototype would still apply.  */
6763 char dlopen();
6764 char (*f)();
6765
6766 int main() {
6767
6768 /* The GNU C library defines this for functions which it implements
6769     to always fail with ENOSYS.  Some functions are actually named
6770     something starting with __ and the normal name is an alias.  */
6771 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6772 choke me
6773 #else
6774 f = dlopen;
6775 #endif
6776
6777 ; return 0; }
6778 EOF
6779 if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6780   rm -rf conftest*
6781   eval "ac_cv_func_dlopen=yes"
6782 else
6783   echo "configure: failed program was:" >&5
6784   cat conftest.$ac_ext >&5
6785   rm -rf conftest*
6786   eval "ac_cv_func_dlopen=no"
6787 fi
6788 rm -f conftest*
6789 fi
6790
6791 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6792   echo "$ac_t""yes" 1>&6
6793   lt_cv_dlopen="dlopen"
6794 else
6795   echo "$ac_t""no" 1>&6
6796 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6797 echo "configure:6798: checking for dlopen in -ldl" >&5
6798 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6799 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6800   echo $ac_n "(cached) $ac_c" 1>&6
6801 else
6802   ac_save_LIBS="$LIBS"
6803 LIBS="-ldl  $LIBS"
6804 cat > conftest.$ac_ext <<EOF
6805 #line 6806 "configure"
6806 #include "confdefs.h"
6807 /* Override any gcc2 internal prototype to avoid an error.  */
6808 /* We use char because int might match the return type of a gcc2
6809     builtin and then its argument prototype would still apply.  */
6810 char dlopen();
6811
6812 int main() {
6813 dlopen()
6814 ; return 0; }
6815 EOF
6816 if { (eval echo configure:6817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6817   rm -rf conftest*
6818   eval "ac_cv_lib_$ac_lib_var=yes"
6819 else
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -rf conftest*
6823   eval "ac_cv_lib_$ac_lib_var=no"
6824 fi
6825 rm -f conftest*
6826 LIBS="$ac_save_LIBS"
6827
6828 fi
6829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6830   echo "$ac_t""yes" 1>&6
6831   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6832 else
6833   echo "$ac_t""no" 1>&6
6834 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6835 echo "configure:6836: checking for dlopen in -lsvld" >&5
6836 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6837 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6838   echo $ac_n "(cached) $ac_c" 1>&6
6839 else
6840   ac_save_LIBS="$LIBS"
6841 LIBS="-lsvld  $LIBS"
6842 cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 /* Override any gcc2 internal prototype to avoid an error.  */
6846 /* We use char because int might match the return type of a gcc2
6847     builtin and then its argument prototype would still apply.  */
6848 char dlopen();
6849
6850 int main() {
6851 dlopen()
6852 ; return 0; }
6853 EOF
6854 if { (eval echo configure:6855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6855   rm -rf conftest*
6856   eval "ac_cv_lib_$ac_lib_var=yes"
6857 else
6858   echo "configure: failed program was:" >&5
6859   cat conftest.$ac_ext >&5
6860   rm -rf conftest*
6861   eval "ac_cv_lib_$ac_lib_var=no"
6862 fi
6863 rm -f conftest*
6864 LIBS="$ac_save_LIBS"
6865
6866 fi
6867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6868   echo "$ac_t""yes" 1>&6
6869   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6870 else
6871   echo "$ac_t""no" 1>&6
6872 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6873 echo "configure:6874: checking for dld_link in -ldld" >&5
6874 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6876   echo $ac_n "(cached) $ac_c" 1>&6
6877 else
6878   ac_save_LIBS="$LIBS"
6879 LIBS="-ldld  $LIBS"
6880 cat > conftest.$ac_ext <<EOF
6881 #line 6882 "configure"
6882 #include "confdefs.h"
6883 /* Override any gcc2 internal prototype to avoid an error.  */
6884 /* We use char because int might match the return type of a gcc2
6885     builtin and then its argument prototype would still apply.  */
6886 char dld_link();
6887
6888 int main() {
6889 dld_link()
6890 ; return 0; }
6891 EOF
6892 if { (eval echo configure:6893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6893   rm -rf conftest*
6894   eval "ac_cv_lib_$ac_lib_var=yes"
6895 else
6896   echo "configure: failed program was:" >&5
6897   cat conftest.$ac_ext >&5
6898   rm -rf conftest*
6899   eval "ac_cv_lib_$ac_lib_var=no"
6900 fi
6901 rm -f conftest*
6902 LIBS="$ac_save_LIBS"
6903
6904 fi
6905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6906   echo "$ac_t""yes" 1>&6
6907   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6908 else
6909   echo "$ac_t""no" 1>&6
6910 fi
6911
6912               
6913 fi
6914
6915             
6916 fi
6917
6918           
6919 fi
6920
6921         
6922 fi
6923
6924       
6925 fi
6926
6927     
6928 fi
6929
6930     ;;
6931   esac
6932
6933   if test "x$lt_cv_dlopen" != xno; then
6934     enable_dlopen=yes
6935   else
6936     enable_dlopen=no
6937   fi
6938
6939   case $lt_cv_dlopen in
6940   dlopen)
6941     save_CPPFLAGS="$CPPFLAGS"
6942         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6943
6944     save_LDFLAGS="$LDFLAGS"
6945     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6946
6947     save_LIBS="$LIBS"
6948     LIBS="$lt_cv_dlopen_libs $LIBS"
6949
6950     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6951 echo "configure:6952: checking whether a program can dlopen itself" >&5
6952 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6953   echo $ac_n "(cached) $ac_c" 1>&6
6954 else
6955           if test "$cross_compiling" = yes; then :
6956   lt_cv_dlopen_self=cross
6957 else
6958     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6959   lt_status=$lt_dlunknown
6960   cat > conftest.$ac_ext <<EOF
6961 #line 6962 "configure"
6962 #include "confdefs.h"
6963
6964 #if HAVE_DLFCN_H
6965 #include <dlfcn.h>
6966 #endif
6967
6968 #include <stdio.h>
6969
6970 #ifdef RTLD_GLOBAL
6971 #  define LT_DLGLOBAL           RTLD_GLOBAL
6972 #else
6973 #  ifdef DL_GLOBAL
6974 #    define LT_DLGLOBAL         DL_GLOBAL
6975 #  else
6976 #    define LT_DLGLOBAL         0
6977 #  endif
6978 #endif
6979
6980 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6981    find out it does not work in some platform. */
6982 #ifndef LT_DLLAZY_OR_NOW
6983 #  ifdef RTLD_LAZY
6984 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6985 #  else
6986 #    ifdef DL_LAZY
6987 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6988 #    else
6989 #      ifdef RTLD_NOW
6990 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6991 #      else
6992 #        ifdef DL_NOW
6993 #          define LT_DLLAZY_OR_NOW      DL_NOW
6994 #        else
6995 #          define LT_DLLAZY_OR_NOW      0
6996 #        endif
6997 #      endif
6998 #    endif
6999 #  endif
7000 #endif
7001
7002 #ifdef __cplusplus
7003 extern "C" void exit (int);
7004 #endif
7005
7006 void fnord() { int i=42;}
7007 int main ()
7008 {
7009   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7010   int status = $lt_dlunknown;
7011
7012   if (self)
7013     {
7014       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7015       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7016       /* dlclose (self); */
7017     }
7018
7019     exit (status);
7020 }
7021 EOF
7022   if { (eval echo configure:7023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7023     (./conftest; exit; ) 2>/dev/null
7024     lt_status=$?
7025     case x$lt_status in
7026       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7027       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7028       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7029     esac
7030   else :
7031     # compilation failed
7032     lt_cv_dlopen_self=no
7033   fi
7034 fi
7035 rm -fr conftest*
7036
7037     
7038 fi
7039
7040 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7041
7042     if test "x$lt_cv_dlopen_self" = xyes; then
7043       LDFLAGS="$LDFLAGS $link_static_flag"
7044       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7045 echo "configure:7046: checking whether a statically linked program can dlopen itself" >&5
7046 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7047   echo $ac_n "(cached) $ac_c" 1>&6
7048 else
7049           if test "$cross_compiling" = yes; then :
7050   lt_cv_dlopen_self_static=cross
7051 else
7052     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7053   lt_status=$lt_dlunknown
7054   cat > conftest.$ac_ext <<EOF
7055 #line 7056 "configure"
7056 #include "confdefs.h"
7057
7058 #if HAVE_DLFCN_H
7059 #include <dlfcn.h>
7060 #endif
7061
7062 #include <stdio.h>
7063
7064 #ifdef RTLD_GLOBAL
7065 #  define LT_DLGLOBAL           RTLD_GLOBAL
7066 #else
7067 #  ifdef DL_GLOBAL
7068 #    define LT_DLGLOBAL         DL_GLOBAL
7069 #  else
7070 #    define LT_DLGLOBAL         0
7071 #  endif
7072 #endif
7073
7074 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7075    find out it does not work in some platform. */
7076 #ifndef LT_DLLAZY_OR_NOW
7077 #  ifdef RTLD_LAZY
7078 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7079 #  else
7080 #    ifdef DL_LAZY
7081 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7082 #    else
7083 #      ifdef RTLD_NOW
7084 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7085 #      else
7086 #        ifdef DL_NOW
7087 #          define LT_DLLAZY_OR_NOW      DL_NOW
7088 #        else
7089 #          define LT_DLLAZY_OR_NOW      0
7090 #        endif
7091 #      endif
7092 #    endif
7093 #  endif
7094 #endif
7095
7096 #ifdef __cplusplus
7097 extern "C" void exit (int);
7098 #endif
7099
7100 void fnord() { int i=42;}
7101 int main ()
7102 {
7103   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7104   int status = $lt_dlunknown;
7105
7106   if (self)
7107     {
7108       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7109       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7110       /* dlclose (self); */
7111     }
7112
7113     exit (status);
7114 }
7115 EOF
7116   if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7117     (./conftest; exit; ) 2>/dev/null
7118     lt_status=$?
7119     case x$lt_status in
7120       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7121       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7122       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7123     esac
7124   else :
7125     # compilation failed
7126     lt_cv_dlopen_self_static=no
7127   fi
7128 fi
7129 rm -fr conftest*
7130
7131       
7132 fi
7133
7134 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7135     fi
7136
7137     CPPFLAGS="$save_CPPFLAGS"
7138     LDFLAGS="$save_LDFLAGS"
7139     LIBS="$save_LIBS"
7140     ;;
7141   esac
7142
7143   case $lt_cv_dlopen_self in
7144   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7145   *) enable_dlopen_self=unknown ;;
7146   esac
7147
7148   case $lt_cv_dlopen_self_static in
7149   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7150   *) enable_dlopen_self_static=unknown ;;
7151   esac
7152 fi
7153
7154
7155 if test "$enable_shared" = yes && test "$GCC" = yes; then
7156   case $archive_cmds in
7157   *'~'*)
7158     # FIXME: we may have to deal with multi-command sequences.
7159     ;;
7160   '$CC '*)
7161     # Test whether the compiler implicitly links with -lc since on some
7162     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7163     # to ld, don't add -lc before -lgcc.
7164     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7165 echo "configure:7166: checking whether -lc should be explicitly linked in" >&5
7166     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7167   echo $ac_n "(cached) $ac_c" 1>&6
7168 else
7169   $rm conftest*
7170     echo 'static int dummy;' > conftest.$ac_ext
7171
7172     if { (eval echo configure:7173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7173       soname=conftest
7174       lib=conftest
7175       libobjs=conftest.$ac_objext
7176       deplibs=
7177       wl=$lt_cv_prog_cc_wl
7178       compiler_flags=-v
7179       linker_flags=-v
7180       verstring=
7181       output_objdir=.
7182       libname=conftest
7183       save_allow_undefined_flag=$allow_undefined_flag
7184       allow_undefined_flag=
7185       if { (eval echo configure:7186: \"$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; }
7186       then
7187         lt_cv_archive_cmds_need_lc=no
7188       else
7189         lt_cv_archive_cmds_need_lc=yes
7190       fi
7191       allow_undefined_flag=$save_allow_undefined_flag
7192     else
7193       cat conftest.err 1>&5
7194     fi
7195 fi
7196
7197     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7198     ;;
7199   esac
7200 fi
7201 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7202
7203 # The second clause should only fire when bootstrapping the
7204 # libtool distribution, otherwise you forgot to ship ltmain.sh
7205 # with your package, and you will get complaints that there are
7206 # no rules to generate ltmain.sh.
7207 if test -f "$ltmain"; then
7208   :
7209 else
7210   # If there is no Makefile yet, we rely on a make rule to execute
7211   # `config.status --recheck' to rerun these tests and create the
7212   # libtool script then.
7213   test -f Makefile && make "$ltmain"
7214 fi
7215
7216 if test -f "$ltmain"; then
7217   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7218   $rm -f "${ofile}T"
7219
7220   echo creating $ofile
7221
7222   # Now quote all the things that may contain metacharacters while being
7223   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7224   # variables and quote the copies for generation of the libtool script.
7225   for var in echo old_CC old_CFLAGS SED \
7226     AR AR_FLAGS CC LD LN_S NM SHELL \
7227     reload_flag reload_cmds wl \
7228     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7229     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7230     library_names_spec soname_spec \
7231     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7232     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7233     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7234     old_striplib striplib file_magic_cmd export_symbols_cmds \
7235     deplibs_check_method allow_undefined_flag no_undefined_flag \
7236     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7237     global_symbol_to_c_name_address \
7238     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7239     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7240     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7241
7242     case $var in
7243     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7244     old_postinstall_cmds | old_postuninstall_cmds | \
7245     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7246     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7247     postinstall_cmds | postuninstall_cmds | \
7248     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7249       # Double-quote double-evaled strings.
7250       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7251       ;;
7252     *)
7253       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7254       ;;
7255     esac
7256   done
7257
7258   cat <<__EOF__ > "${ofile}T"
7259 #! $SHELL
7260
7261 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7262 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7263 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7264 #
7265 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7266 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7267 #
7268 # This program is free software; you can redistribute it and/or modify
7269 # it under the terms of the GNU General Public License as published by
7270 # the Free Software Foundation; either version 2 of the License, or
7271 # (at your option) any later version.
7272 #
7273 # This program is distributed in the hope that it will be useful, but
7274 # WITHOUT ANY WARRANTY; without even the implied warranty of
7275 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7276 # General Public License for more details.
7277 #
7278 # You should have received a copy of the GNU General Public License
7279 # along with this program; if not, write to the Free Software
7280 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7281 #
7282 # As a special exception to the GNU General Public License, if you
7283 # distribute this file as part of a program that contains a
7284 # configuration script generated by Autoconf, you may include it under
7285 # the same distribution terms that you use for the rest of that program.
7286
7287 # A sed that does not truncate output.
7288 SED=$lt_SED
7289
7290 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7291 Xsed="${SED} -e s/^X//"
7292
7293 # The HP-UX ksh and POSIX shell print the target directory to stdout
7294 # if CDPATH is set.
7295 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7296
7297 # ### BEGIN LIBTOOL CONFIG
7298
7299 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7300
7301 # Shell to use when invoking shell scripts.
7302 SHELL=$lt_SHELL
7303
7304 # Whether or not to build shared libraries.
7305 build_libtool_libs=$enable_shared
7306
7307 # Whether or not to build static libraries.
7308 build_old_libs=$enable_static
7309
7310 # Whether or not to add -lc for building shared libraries.
7311 build_libtool_need_lc=$need_lc
7312
7313 # Whether or not to optimize for fast installation.
7314 fast_install=$enable_fast_install
7315
7316 # The host system.
7317 host_alias=$host_alias
7318 host=$host
7319
7320 # An echo program that does not interpret backslashes.
7321 echo=$lt_echo
7322
7323 # The archiver.
7324 AR=$lt_AR
7325 AR_FLAGS=$lt_AR_FLAGS
7326
7327 # The default C compiler.
7328 CC=$lt_CC
7329
7330 # Is the compiler the GNU C compiler?
7331 with_gcc=$GCC
7332
7333 # The linker used to build libraries.
7334 LD=$lt_LD
7335
7336 # Whether we need hard or soft links.
7337 LN_S=$lt_LN_S
7338
7339 # A BSD-compatible nm program.
7340 NM=$lt_NM
7341
7342 # A symbol stripping program
7343 STRIP=$STRIP
7344
7345 # Used to examine libraries when file_magic_cmd begins "file"
7346 MAGIC_CMD=$MAGIC_CMD
7347
7348 # Used on cygwin: DLL creation program.
7349 DLLTOOL="$DLLTOOL"
7350
7351 # Used on cygwin: object dumper.
7352 OBJDUMP="$OBJDUMP"
7353
7354 # Used on cygwin: assembler.
7355 AS="$AS"
7356
7357 # The name of the directory that contains temporary libtool files.
7358 objdir=$objdir
7359
7360 # How to create reloadable object files.
7361 reload_flag=$lt_reload_flag
7362 reload_cmds=$lt_reload_cmds
7363
7364 # How to pass a linker flag through the compiler.
7365 wl=$lt_wl
7366
7367 # Object file suffix (normally "o").
7368 objext="$ac_objext"
7369
7370 # Old archive suffix (normally "a").
7371 libext="$libext"
7372
7373 # Executable file suffix (normally "").
7374 exeext="$exeext"
7375
7376 # Additional compiler flags for building library objects.
7377 pic_flag=$lt_pic_flag
7378 pic_mode=$pic_mode
7379
7380 # Does compiler simultaneously support -c and -o options?
7381 compiler_c_o=$lt_compiler_c_o
7382
7383 # Can we write directly to a .lo ?
7384 compiler_o_lo=$lt_compiler_o_lo
7385
7386 # Must we lock files when doing compilation ?
7387 need_locks=$lt_need_locks
7388
7389 # Do we need the lib prefix for modules?
7390 need_lib_prefix=$need_lib_prefix
7391
7392 # Do we need a version for libraries?
7393 need_version=$need_version
7394
7395 # Whether dlopen is supported.
7396 dlopen_support=$enable_dlopen
7397
7398 # Whether dlopen of programs is supported.
7399 dlopen_self=$enable_dlopen_self
7400
7401 # Whether dlopen of statically linked programs is supported.
7402 dlopen_self_static=$enable_dlopen_self_static
7403
7404 # Compiler flag to prevent dynamic linking.
7405 link_static_flag=$lt_link_static_flag
7406
7407 # Compiler flag to turn off builtin functions.
7408 no_builtin_flag=$lt_no_builtin_flag
7409
7410 # Compiler flag to allow reflexive dlopens.
7411 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7412
7413 # Compiler flag to generate shared objects directly from archives.
7414 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7415
7416 # Compiler flag to generate thread-safe objects.
7417 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7418
7419 # Library versioning type.
7420 version_type=$version_type
7421
7422 # Format of library name prefix.
7423 libname_spec=$lt_libname_spec
7424
7425 # List of archive names.  First name is the real one, the rest are links.
7426 # The last name is the one that the linker finds with -lNAME.
7427 library_names_spec=$lt_library_names_spec
7428
7429 # The coded name of the library, if different from the real name.
7430 soname_spec=$lt_soname_spec
7431
7432 # Commands used to build and install an old-style archive.
7433 RANLIB=$lt_RANLIB
7434 old_archive_cmds=$lt_old_archive_cmds
7435 old_postinstall_cmds=$lt_old_postinstall_cmds
7436 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7437
7438 # Create an old-style archive from a shared archive.
7439 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7440
7441 # Create a temporary old-style archive to link instead of a shared archive.
7442 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7443
7444 # Commands used to build and install a shared archive.
7445 archive_cmds=$lt_archive_cmds
7446 archive_expsym_cmds=$lt_archive_expsym_cmds
7447 postinstall_cmds=$lt_postinstall_cmds
7448 postuninstall_cmds=$lt_postuninstall_cmds
7449
7450 # Commands to strip libraries.
7451 old_striplib=$lt_old_striplib
7452 striplib=$lt_striplib
7453
7454 # Method to check whether dependent libraries are shared objects.
7455 deplibs_check_method=$lt_deplibs_check_method
7456
7457 # Command to use when deplibs_check_method == file_magic.
7458 file_magic_cmd=$lt_file_magic_cmd
7459
7460 # Flag that allows shared libraries with undefined symbols to be built.
7461 allow_undefined_flag=$lt_allow_undefined_flag
7462
7463 # Flag that forces no undefined symbols.
7464 no_undefined_flag=$lt_no_undefined_flag
7465
7466 # Commands used to finish a libtool library installation in a directory.
7467 finish_cmds=$lt_finish_cmds
7468
7469 # Same as above, but a single script fragment to be evaled but not shown.
7470 finish_eval=$lt_finish_eval
7471
7472 # Take the output of nm and produce a listing of raw symbols and C names.
7473 global_symbol_pipe=$lt_global_symbol_pipe
7474
7475 # Transform the output of nm in a proper C declaration
7476 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7477
7478 # Transform the output of nm in a C name address pair
7479 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7480
7481 # This is the shared library runtime path variable.
7482 runpath_var=$runpath_var
7483
7484 # This is the shared library path variable.
7485 shlibpath_var=$shlibpath_var
7486
7487 # Is shlibpath searched before the hard-coded library search path?
7488 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7489
7490 # How to hardcode a shared library path into an executable.
7491 hardcode_action=$hardcode_action
7492
7493 # Whether we should hardcode library paths into libraries.
7494 hardcode_into_libs=$hardcode_into_libs
7495
7496 # Flag to hardcode \$libdir into a binary during linking.
7497 # This must work even if \$libdir does not exist.
7498 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7499
7500 # Whether we need a single -rpath flag with a separated argument.
7501 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7502
7503 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7504 # resulting binary.
7505 hardcode_direct=$hardcode_direct
7506
7507 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7508 # resulting binary.
7509 hardcode_minus_L=$hardcode_minus_L
7510
7511 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7512 # the resulting binary.
7513 hardcode_shlibpath_var=$hardcode_shlibpath_var
7514
7515 # Variables whose values should be saved in libtool wrapper scripts and
7516 # restored at relink time.
7517 variables_saved_for_relink="$variables_saved_for_relink"
7518
7519 # Whether libtool must link a program against all its dependency libraries.
7520 link_all_deplibs=$link_all_deplibs
7521
7522 # Compile-time system search path for libraries
7523 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7524
7525 # Run-time system search path for libraries
7526 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7527
7528 # Fix the shell variable \$srcfile for the compiler.
7529 fix_srcfile_path="$fix_srcfile_path"
7530
7531 # Set to yes if exported symbols are required.
7532 always_export_symbols=$always_export_symbols
7533
7534 # The commands to list exported symbols.
7535 export_symbols_cmds=$lt_export_symbols_cmds
7536
7537 # The commands to extract the exported symbol list from a shared archive.
7538 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7539
7540 # Symbols that should not be listed in the preloaded symbols.
7541 exclude_expsyms=$lt_exclude_expsyms
7542
7543 # Symbols that must always be exported.
7544 include_expsyms=$lt_include_expsyms
7545
7546 # ### END LIBTOOL CONFIG
7547
7548 __EOF__
7549
7550   case $host_os in
7551   aix3*)
7552     cat <<\EOF >> "${ofile}T"
7553
7554 # AIX sometimes has problems with the GCC collect2 program.  For some
7555 # reason, if we set the COLLECT_NAMES environment variable, the problems
7556 # vanish in a puff of smoke.
7557 if test "X${COLLECT_NAMES+set}" != Xset; then
7558   COLLECT_NAMES=
7559   export COLLECT_NAMES
7560 fi
7561 EOF
7562     ;;
7563   esac
7564
7565   case $host_os in
7566   cygwin* | mingw* | pw32* | os2*)
7567     cat <<'EOF' >> "${ofile}T"
7568       # This is a source program that is used to create dlls on Windows
7569       # Don't remove nor modify the starting and closing comments
7570 # /* ltdll.c starts here */
7571 # #define WIN32_LEAN_AND_MEAN
7572 # #include <windows.h>
7573 # #undef WIN32_LEAN_AND_MEAN
7574 # #include <stdio.h>
7575 #
7576 # #ifndef __CYGWIN__
7577 # #  ifdef __CYGWIN32__
7578 # #    define __CYGWIN__ __CYGWIN32__
7579 # #  endif
7580 # #endif
7581 #
7582 # #ifdef __cplusplus
7583 # extern "C" {
7584 # #endif
7585 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7586 # #ifdef __cplusplus
7587 # }
7588 # #endif
7589 #
7590 # #ifdef __CYGWIN__
7591 # #include <cygwin/cygwin_dll.h>
7592 # DECLARE_CYGWIN_DLL( DllMain );
7593 # #endif
7594 # HINSTANCE __hDllInstance_base;
7595 #
7596 # BOOL APIENTRY
7597 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7598 # {
7599 #   __hDllInstance_base = hInst;
7600 #   return TRUE;
7601 # }
7602 # /* ltdll.c ends here */
7603         # This is a source program that is used to create import libraries
7604         # on Windows for dlls which lack them. Don't remove nor modify the
7605         # starting and closing comments
7606 # /* impgen.c starts here */
7607 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7608 #
7609 #  This file is part of GNU libtool.
7610 #
7611 #  This program is free software; you can redistribute it and/or modify
7612 #  it under the terms of the GNU General Public License as published by
7613 #  the Free Software Foundation; either version 2 of the License, or
7614 #  (at your option) any later version.
7615 #
7616 #  This program is distributed in the hope that it will be useful,
7617 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7618 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7619 #  GNU General Public License for more details.
7620 #
7621 #  You should have received a copy of the GNU General Public License
7622 #  along with this program; if not, write to the Free Software
7623 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7624 #  */
7625 #
7626 # #include <stdio.h>            /* for printf() */
7627 # #include <unistd.h>           /* for open(), lseek(), read() */
7628 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7629 # #include <string.h>           /* for strdup() */
7630 #
7631 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7632 # #ifndef O_BINARY
7633 # #define O_BINARY 0
7634 # #endif
7635 #
7636 # static unsigned int
7637 # pe_get16 (fd, offset)
7638 #      int fd;
7639 #      int offset;
7640 # {
7641 #   unsigned char b[2];
7642 #   lseek (fd, offset, SEEK_SET);
7643 #   read (fd, b, 2);
7644 #   return b[0] + (b[1]<<8);
7645 # }
7646 #
7647 # static unsigned int
7648 # pe_get32 (fd, offset)
7649 #     int fd;
7650 #     int offset;
7651 # {
7652 #   unsigned char b[4];
7653 #   lseek (fd, offset, SEEK_SET);
7654 #   read (fd, b, 4);
7655 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7656 # }
7657 #
7658 # static unsigned int
7659 # pe_as32 (ptr)
7660 #      void *ptr;
7661 # {
7662 #   unsigned char *b = ptr;
7663 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7664 # }
7665 #
7666 # int
7667 # main (argc, argv)
7668 #     int argc;
7669 #     char *argv[];
7670 # {
7671 #     int dll;
7672 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7673 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7674 #     unsigned long name_rvas, nexp;
7675 #     unsigned char *expdata, *erva;
7676 #     char *filename, *dll_name;
7677 #
7678 #     filename = argv[1];
7679 #
7680 #     dll = open(filename, O_RDONLY|O_BINARY);
7681 #     if (dll < 1)
7682 #       return 1;
7683 #
7684 #     dll_name = filename;
7685 #
7686 #     for (i=0; filename[i]; i++)
7687 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7688 #           dll_name = filename + i +1;
7689 #
7690 #     pe_header_offset = pe_get32 (dll, 0x3c);
7691 #     opthdr_ofs = pe_header_offset + 4 + 20;
7692 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7693 #
7694 #     if (num_entries < 1) /* no exports */
7695 #       return 1;
7696 #
7697 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7698 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7699 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7700 #     secptr = (pe_header_offset + 4 + 20 +
7701 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7702 #
7703 #     expptr = 0;
7704 #     for (i = 0; i < nsections; i++)
7705 #     {
7706 #       char sname[8];
7707 #       unsigned long secptr1 = secptr + 40 * i;
7708 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7709 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7710 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7711 #       lseek(dll, secptr1, SEEK_SET);
7712 #       read(dll, sname, 8);
7713 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7714 #       {
7715 #           expptr = fptr + (export_rva - vaddr);
7716 #           if (export_rva + export_size > vaddr + vsize)
7717 #               export_size = vsize - (export_rva - vaddr);
7718 #           break;
7719 #       }
7720 #     }
7721 #
7722 #     expdata = (unsigned char*)malloc(export_size);
7723 #     lseek (dll, expptr, SEEK_SET);
7724 #     read (dll, expdata, export_size);
7725 #     erva = expdata - export_rva;
7726 #
7727 #     nexp = pe_as32 (expdata+24);
7728 #     name_rvas = pe_as32 (expdata+32);
7729 #
7730 #     printf ("EXPORTS\n");
7731 #     for (i = 0; i<nexp; i++)
7732 #     {
7733 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7734 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7735 #     }
7736 #
7737 #     return 0;
7738 # }
7739 # /* impgen.c ends here */
7740
7741 EOF
7742     ;;
7743   esac
7744
7745   # We use sed instead of cat because bash on DJGPP gets confused if
7746   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7747   # text mode, it properly converts lines to CR/LF.  This bash problem
7748   # is reportedly fixed, but why not run on old versions too?
7749   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7750
7751   mv -f "${ofile}T" "$ofile" || \
7752     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7753   chmod +x "$ofile"
7754 fi
7755
7756
7757
7758
7759
7760 # This can be used to rebuild libtool when needed
7761 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7762
7763 # Always use our own libtool.
7764 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7765
7766 # Prevent multiple expansion
7767
7768
7769
7770 ol_link_perl=no
7771 if test $ol_enable_perl != no ; then
7772         # Extract the first word of "perl", so it can be a program name with args.
7773 set dummy perl; ac_word=$2
7774 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7775 echo "configure:7776: checking for $ac_word" >&5
7776 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7777   echo $ac_n "(cached) $ac_c" 1>&6
7778 else
7779   case "$PERLBIN" in
7780   /*)
7781   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7782   ;;
7783   ?:/*)
7784   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7785   ;;
7786   *)
7787   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7788   ac_dummy="$PATH"
7789   for ac_dir in $ac_dummy; do 
7790     test -z "$ac_dir" && ac_dir=.
7791     if test -f $ac_dir/$ac_word; then
7792       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7793       break
7794     fi
7795   done
7796   IFS="$ac_save_ifs"
7797   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7798   ;;
7799 esac
7800 fi
7801 PERLBIN="$ac_cv_path_PERLBIN"
7802 if test -n "$PERLBIN"; then
7803   echo "$ac_t""$PERLBIN" 1>&6
7804 else
7805   echo "$ac_t""no" 1>&6
7806 fi
7807
7808
7809         if test "no$PERLBIN" = "no" ; then
7810                 if test $ol_enable_perl = yes ; then
7811                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7812                 fi
7813
7814         else
7815                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7816                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7817
7818                 if test x"$ol_enable_perl" = "xyes" ; then
7819                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7820                 else
7821                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7822                 fi
7823                                 ol_link_perl=yes
7824         fi
7825 fi
7826
7827 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7828 echo "configure:7829: checking how to run the C preprocessor" >&5
7829 # On Suns, sometimes $CPP names a directory.
7830 if test -n "$CPP" && test -d "$CPP"; then
7831   CPP=
7832 fi
7833 if test -z "$CPP"; then
7834 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7835   echo $ac_n "(cached) $ac_c" 1>&6
7836 else
7837     # This must be in double quotes, not single quotes, because CPP may get
7838   # substituted into the Makefile and "${CC-cc}" will confuse make.
7839   CPP="${CC-cc} -E"
7840   # On the NeXT, cc -E runs the code through the compiler's parser,
7841   # not just through cpp.
7842   cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845 #include <assert.h>
7846 Syntax Error
7847 EOF
7848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7849 { (eval echo configure:7850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7851 if test -z "$ac_err"; then
7852   :
7853 else
7854   echo "$ac_err" >&5
7855   echo "configure: failed program was:" >&5
7856   cat conftest.$ac_ext >&5
7857   rm -rf conftest*
7858   CPP="${CC-cc} -E -traditional-cpp"
7859   cat > conftest.$ac_ext <<EOF
7860 #line 7861 "configure"
7861 #include "confdefs.h"
7862 #include <assert.h>
7863 Syntax Error
7864 EOF
7865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7866 { (eval echo configure:7867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7868 if test -z "$ac_err"; then
7869   :
7870 else
7871   echo "$ac_err" >&5
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   CPP="${CC-cc} -nologo -E"
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 #include <assert.h>
7880 Syntax Error
7881 EOF
7882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7883 { (eval echo configure:7884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7885 if test -z "$ac_err"; then
7886   :
7887 else
7888   echo "$ac_err" >&5
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   CPP=/lib/cpp
7893 fi
7894 rm -f conftest*
7895 fi
7896 rm -f conftest*
7897 fi
7898 rm -f conftest*
7899   ac_cv_prog_CPP="$CPP"
7900 fi
7901   CPP="$ac_cv_prog_CPP"
7902 else
7903   ac_cv_prog_CPP="$CPP"
7904 fi
7905 echo "$ac_t""$CPP" 1>&6
7906
7907
7908
7909 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7910 echo "configure:7911: checking for Cygwin environment" >&5
7911 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7912   echo $ac_n "(cached) $ac_c" 1>&6
7913 else
7914   cat > conftest.$ac_ext <<EOF
7915 #line 7916 "configure"
7916 #include "confdefs.h"
7917
7918 int main() {
7919
7920 #ifndef __CYGWIN__
7921 #define __CYGWIN__ __CYGWIN32__
7922 #endif
7923 return __CYGWIN__;
7924 ; return 0; }
7925 EOF
7926 if { (eval echo configure:7927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7927   rm -rf conftest*
7928   ac_cv_cygwin=yes
7929 else
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   ac_cv_cygwin=no
7934 fi
7935 rm -f conftest*
7936 fi
7937
7938 echo "$ac_t""$ac_cv_cygwin" 1>&6
7939 CYGWIN=
7940 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7941 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7942 echo "configure:7943: checking for mingw32 environment" >&5
7943 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949
7950 int main() {
7951 return __MINGW32__;
7952 ; return 0; }
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7955   rm -rf conftest*
7956   ac_cv_mingw32=yes
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   ac_cv_mingw32=no
7962 fi
7963 rm -f conftest*
7964 fi
7965
7966 echo "$ac_t""$ac_cv_mingw32" 1>&6
7967 MINGW32=
7968 test "$ac_cv_mingw32" = yes && MINGW32=yes
7969
7970
7971
7972 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7973 echo "configure:7974: checking for executable suffix" >&5
7974 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7975   echo $ac_n "(cached) $ac_c" 1>&6
7976 else
7977   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7978   ac_cv_exeext=.exe
7979 else
7980   rm -f conftest*
7981   echo 'int main () { return 0; }' > conftest.$ac_ext
7982   ac_cv_exeext=
7983   if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7984     for file in conftest.*; do
7985       case $file in
7986       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7987       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7988       esac
7989     done
7990   else
7991     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7992   fi
7993   rm -f conftest*
7994   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7995 fi
7996 fi
7997
7998 EXEEXT=""
7999 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8000 echo "$ac_t""${ac_cv_exeext}" 1>&6
8001 ac_exeext=$EXEEXT
8002
8003 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8004 echo "configure:8005: checking for object suffix" >&5
8005 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8006   echo $ac_n "(cached) $ac_c" 1>&6
8007 else
8008   rm -f conftest*
8009 echo 'int i = 1;' > conftest.$ac_ext
8010 if { (eval echo configure:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8011   for ac_file in conftest.*; do
8012     case $ac_file in
8013     *.c) ;;
8014     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8015     esac
8016   done
8017 else
8018   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 echo "$ac_t""$ac_cv_objext" 1>&6
8024 OBJEXT=$ac_cv_objext
8025 ac_objext=$ac_cv_objext
8026
8027
8028 cat >> confdefs.h <<EOF
8029 #define EXEEXT "${EXEEXT}"
8030 EOF
8031
8032
8033 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8034 echo "configure:8035: checking for be_app in -lbe" >&5
8035 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8037   echo $ac_n "(cached) $ac_c" 1>&6
8038 else
8039   ac_save_LIBS="$LIBS"
8040 LIBS="-lbe -lroot -lnet $LIBS"
8041 cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 /* Override any gcc2 internal prototype to avoid an error.  */
8045 /* We use char because int might match the return type of a gcc2
8046     builtin and then its argument prototype would still apply.  */
8047 char be_app();
8048
8049 int main() {
8050 be_app()
8051 ; return 0; }
8052 EOF
8053 if { (eval echo configure:8054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8054   rm -rf conftest*
8055   eval "ac_cv_lib_$ac_lib_var=yes"
8056 else
8057   echo "configure: failed program was:" >&5
8058   cat conftest.$ac_ext >&5
8059   rm -rf conftest*
8060   eval "ac_cv_lib_$ac_lib_var=no"
8061 fi
8062 rm -f conftest*
8063 LIBS="$ac_save_LIBS"
8064
8065 fi
8066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8067   echo "$ac_t""yes" 1>&6
8068   LIBS="$LIBS -lbe -lroot -lnet"
8069 else
8070   echo "$ac_t""no" 1>&6
8071 :
8072 fi
8073
8074
8075
8076
8077
8078 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8079 echo "configure:8080: checking for ${CC-cc} option to accept ANSI C" >&5
8080 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8081   echo $ac_n "(cached) $ac_c" 1>&6
8082 else
8083   am_cv_prog_cc_stdc=no
8084 ac_save_CC="$CC"
8085 # Don't try gcc -ansi; that turns off useful extensions and
8086 # breaks some systems' header files.
8087 # AIX                   -qlanglvl=ansi
8088 # Ultrix and OSF/1      -std1
8089 # HP-UX 10.20 and later -Ae
8090 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8091 # SVR4                  -Xc -D__EXTENSIONS__
8092 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8093 do
8094   CC="$ac_save_CC $ac_arg"
8095   cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 #include <stdarg.h>
8099 #include <stdio.h>
8100 #include <sys/types.h>
8101 #include <sys/stat.h>
8102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8103 struct buf { int x; };
8104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8105 static char *e (p, i)
8106      char **p;
8107      int i;
8108 {
8109   return p[i];
8110 }
8111 static char *f (char * (*g) (char **, int), char **p, ...)
8112 {
8113   char *s;
8114   va_list v;
8115   va_start (v,p);
8116   s = g (p, va_arg (v,int));
8117   va_end (v);
8118   return s;
8119 }
8120 int test (int i, double x);
8121 struct s1 {int (*f) (int a);};
8122 struct s2 {int (*f) (double a);};
8123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8124 int argc;
8125 char **argv;
8126
8127 int main() {
8128
8129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8130
8131 ; return 0; }
8132 EOF
8133 if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8134   rm -rf conftest*
8135   am_cv_prog_cc_stdc="$ac_arg"; break
8136 else
8137   echo "configure: failed program was:" >&5
8138   cat conftest.$ac_ext >&5
8139 fi
8140 rm -f conftest*
8141 done
8142 CC="$ac_save_CC"
8143
8144 fi
8145
8146 if test -z "$am_cv_prog_cc_stdc"; then
8147   echo "$ac_t""none needed" 1>&6
8148 else
8149   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8150 fi
8151 case "x$am_cv_prog_cc_stdc" in
8152   x|xno) ;;
8153   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8154 esac
8155
8156 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8157         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8158 fi
8159
8160 # test for make depend flag
8161 OL_MKDEP=
8162 OL_MKDEP_FLAGS=
8163 if test -z "${MKDEP}"; then
8164         OL_MKDEP="${CC-cc}"
8165         if test -z "${MKDEP_FLAGS}"; then
8166                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8167 echo "configure:8168: checking for ${OL_MKDEP} depend flag" >&5
8168 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8169   echo $ac_n "(cached) $ac_c" 1>&6
8170 else
8171   
8172                         ol_cv_mkdep=no
8173                         for flag in "-M" "-xM"; do
8174                                 cat > conftest.c <<EOF
8175  noCode;
8176 EOF
8177                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8178                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8179                                 then
8180                                         if test ! -f conftest."${ac_object}" ; then
8181                                                 ol_cv_mkdep=$flag
8182                                                 OL_MKDEP_FLAGS="$flag"
8183                                                 break
8184                                         fi
8185                                 fi
8186                         done
8187                         rm -f conftest*
8188                 
8189 fi
8190
8191 echo "$ac_t""$ol_cv_mkdep" 1>&6
8192         else
8193                 cc_cv_mkdep=yes
8194                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8195         fi
8196 else
8197         cc_cv_mkdep=yes
8198         OL_MKDEP="${MKDEP}"
8199         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8200 fi
8201
8202
8203
8204 if test "${ol_cv_mkdep}" = no ; then
8205         # this will soon become an error
8206         echo "configure: warning: do not know how to generate dependencies" 1>&2
8207 fi
8208
8209 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8210 echo "configure:8211: checking for afopen in -ls" >&5
8211 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8213   echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215   ac_save_LIBS="$LIBS"
8216 LIBS="-ls  $LIBS"
8217 cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* Override any gcc2 internal prototype to avoid an error.  */
8221 /* We use char because int might match the return type of a gcc2
8222     builtin and then its argument prototype would still apply.  */
8223 char afopen();
8224
8225 int main() {
8226 afopen()
8227 ; return 0; }
8228 EOF
8229 if { (eval echo configure:8230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8230   rm -rf conftest*
8231   eval "ac_cv_lib_$ac_lib_var=yes"
8232 else
8233   echo "configure: failed program was:" >&5
8234   cat conftest.$ac_ext >&5
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=no"
8237 fi
8238 rm -f conftest*
8239 LIBS="$ac_save_LIBS"
8240
8241 fi
8242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8243   echo "$ac_t""yes" 1>&6
8244   
8245         AUTH_LIBS=-ls
8246         cat >> confdefs.h <<\EOF
8247 #define HAVE_AIX_SECURITY 1
8248 EOF
8249
8250
8251 else
8252   echo "$ac_t""no" 1>&6
8253 fi
8254
8255
8256 case "$target" in
8257 *-ibm-openedition)
8258         ac_cv_func_getopt=no
8259         cat >> confdefs.h <<\EOF
8260 #define BOTH_STRINGS_H 1
8261 EOF
8262
8263         ;;
8264 esac
8265
8266 ol_link_modules=no
8267 WITH_MODULES_ENABLED=no
8268 if test $ol_enable_modules != no ; then
8269         for ac_hdr in ltdl.h
8270 do
8271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8273 echo "configure:8274: checking for $ac_hdr" >&5
8274 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8275   echo $ac_n "(cached) $ac_c" 1>&6
8276 else
8277   cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 #include <$ac_hdr>
8281 EOF
8282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8283 { (eval echo configure:8284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8285 if test -z "$ac_err"; then
8286   rm -rf conftest*
8287   eval "ac_cv_header_$ac_safe=yes"
8288 else
8289   echo "$ac_err" >&5
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   eval "ac_cv_header_$ac_safe=no"
8294 fi
8295 rm -f conftest*
8296 fi
8297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8298   echo "$ac_t""yes" 1>&6
8299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8300   cat >> confdefs.h <<EOF
8301 #define $ac_tr_hdr 1
8302 EOF
8303  
8304 else
8305   echo "$ac_t""no" 1>&6
8306 fi
8307 done
8308
8309
8310         if test $ac_cv_header_ltdl_h = no ; then
8311                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8312         fi
8313
8314         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8315 echo "configure:8316: checking for lt_dlinit in -lltdl" >&5
8316 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8318   echo $ac_n "(cached) $ac_c" 1>&6
8319 else
8320   ac_save_LIBS="$LIBS"
8321 LIBS="-lltdl  $LIBS"
8322 cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 /* Override any gcc2 internal prototype to avoid an error.  */
8326 /* We use char because int might match the return type of a gcc2
8327     builtin and then its argument prototype would still apply.  */
8328 char lt_dlinit();
8329
8330 int main() {
8331 lt_dlinit()
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=no"
8342 fi
8343 rm -f conftest*
8344 LIBS="$ac_save_LIBS"
8345
8346 fi
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8348   echo "$ac_t""yes" 1>&6
8349   
8350                 MODULES_LIBS=-lltdl
8351                 cat >> confdefs.h <<\EOF
8352 #define HAVE_LIBLTDL 1
8353 EOF
8354
8355         
8356 else
8357   echo "$ac_t""no" 1>&6
8358 fi
8359
8360
8361         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8362                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8363         fi
8364         ol_link_modules=yes
8365         WITH_MODULES_ENABLED=yes
8366
8367 else
8368         for i in $Backends; do
8369                 eval "ol_tmp=\$ol_enable_$i"
8370                 if test $ol_tmp = mod ; then
8371                         echo "configure: warning: building static $i backend" 1>&2
8372                         eval "ol_enable_$i=yes"
8373                 fi
8374         done
8375         for i in $Overlays; do
8376                 eval "ol_tmp=\$ol_enable_$i"
8377                 if test $ol_tmp = mod ; then
8378                         echo "configure: warning: building static $i overlay" 1>&2
8379                         eval "ol_enable_$i=yes"
8380                 fi
8381         done
8382 fi
8383
8384 # test for EBCDIC
8385 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8386 echo "configure:8387: checking for EBCDIC" >&5
8387 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8388   echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390   
8391         cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394
8395 #if !('M' == 0xd4)
8396 #include <__ASCII__/generate_error.h>
8397 #endif
8398
8399 EOF
8400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8401 { (eval echo configure:8402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8403 if test -z "$ac_err"; then
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=yes
8406 else
8407   echo "$ac_err" >&5
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   ol_cv_cpp_ebcdic=no
8412 fi
8413 rm -f conftest*
8414 fi
8415
8416 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8417 if test $ol_cv_cpp_ebcdic = yes ; then
8418         cat >> confdefs.h <<\EOF
8419 #define HAVE_EBCDIC 1
8420 EOF
8421
8422 fi
8423
8424 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8425 echo "configure:8426: checking for ANSI C header files" >&5
8426 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <stdlib.h>
8433 #include <stdarg.h>
8434 #include <string.h>
8435 #include <float.h>
8436 EOF
8437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8438 { (eval echo configure:8439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8440 if test -z "$ac_err"; then
8441   rm -rf conftest*
8442   ol_cv_header_stdc=yes
8443 else
8444   echo "$ac_err" >&5
8445   echo "configure: failed program was:" >&5
8446   cat conftest.$ac_ext >&5
8447   rm -rf conftest*
8448   ol_cv_header_stdc=no
8449 fi
8450 rm -f conftest*
8451
8452 if test $ol_cv_header_stdc = yes; then
8453   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457 #include <string.h>
8458 EOF
8459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8460   egrep "memchr" >/dev/null 2>&1; then
8461   :
8462 else
8463   rm -rf conftest*
8464   ol_cv_header_stdc=no
8465 fi
8466 rm -f conftest*
8467
8468 fi
8469
8470 if test $ol_cv_header_stdc = yes; then
8471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <stdlib.h>
8476 EOF
8477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8478   egrep "free" >/dev/null 2>&1; then
8479   :
8480 else
8481   rm -rf conftest*
8482   ol_cv_header_stdc=no
8483 fi
8484 rm -f conftest*
8485
8486 fi
8487
8488 if test $ol_cv_header_stdc = yes; then
8489   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8490 if test "$cross_compiling" = yes; then
8491   :
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 #include <ctype.h>
8497 #ifndef HAVE_EBCDIC
8498 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8499 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8500 #else
8501 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8502                 || ('j' <= (c) && (c) <= 'r') \
8503                 || ('s' <= (c) && (c) <= 'z'))
8504 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8505 #endif
8506 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8507 int main () { int i; for (i = 0; i < 256; i++)
8508 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8509 exit (0); }
8510
8511 EOF
8512 if { (eval echo configure:8513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
8513 then
8514   :
8515 else
8516   echo "configure: failed program was:" >&5
8517   cat conftest.$ac_ext >&5
8518   rm -fr conftest*
8519   ol_cv_header_stdc=no
8520 fi
8521 rm -fr conftest*
8522 fi
8523
8524 fi
8525 fi
8526
8527 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8528 if test $ol_cv_header_stdc = yes; then
8529   cat >> confdefs.h <<\EOF
8530 #define STDC_HEADERS 1
8531 EOF
8532
8533 fi
8534 ac_cv_header_stdc=disable
8535
8536
8537 if test $ol_cv_header_stdc != yes; then
8538         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8539 fi
8540
8541 ac_header_dirent=no
8542 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8543 do
8544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8545 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8546 echo "configure:8547: checking for $ac_hdr that defines DIR" >&5
8547 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <sys/types.h>
8554 #include <$ac_hdr>
8555 int main() {
8556 DIR *dirp = 0;
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8560   rm -rf conftest*
8561   eval "ac_cv_header_dirent_$ac_safe=yes"
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   eval "ac_cv_header_dirent_$ac_safe=no"
8567 fi
8568 rm -f conftest*
8569 fi
8570 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8573   cat >> confdefs.h <<EOF
8574 #define $ac_tr_hdr 1
8575 EOF
8576  ac_header_dirent=$ac_hdr; break
8577 else
8578   echo "$ac_t""no" 1>&6
8579 fi
8580 done
8581 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8582 if test $ac_header_dirent = dirent.h; then
8583 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8584 echo "configure:8585: checking for opendir in -ldir" >&5
8585 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   ac_save_LIBS="$LIBS"
8590 LIBS="-ldir  $LIBS"
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* Override any gcc2 internal prototype to avoid an error.  */
8595 /* We use char because int might match the return type of a gcc2
8596     builtin and then its argument prototype would still apply.  */
8597 char opendir();
8598
8599 int main() {
8600 opendir()
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=no"
8611 fi
8612 rm -f conftest*
8613 LIBS="$ac_save_LIBS"
8614
8615 fi
8616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8617   echo "$ac_t""yes" 1>&6
8618   LIBS="$LIBS -ldir"
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622
8623 else
8624 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8625 echo "configure:8626: checking for opendir in -lx" >&5
8626 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   ac_save_LIBS="$LIBS"
8631 LIBS="-lx  $LIBS"
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 /* Override any gcc2 internal prototype to avoid an error.  */
8636 /* We use char because int might match the return type of a gcc2
8637     builtin and then its argument prototype would still apply.  */
8638 char opendir();
8639
8640 int main() {
8641 opendir()
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=yes"
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=no"
8652 fi
8653 rm -f conftest*
8654 LIBS="$ac_save_LIBS"
8655
8656 fi
8657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8658   echo "$ac_t""yes" 1>&6
8659   LIBS="$LIBS -lx"
8660 else
8661   echo "$ac_t""no" 1>&6
8662 fi
8663
8664 fi
8665
8666 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8667 echo "configure:8668: checking for sys/wait.h that is POSIX.1 compatible" >&5
8668 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 #include <sys/types.h>
8675 #include <sys/wait.h>
8676 #ifndef WEXITSTATUS
8677 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8678 #endif
8679 #ifndef WIFEXITED
8680 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8681 #endif
8682 int main() {
8683 int s;
8684 wait (&s);
8685 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8689   rm -rf conftest*
8690   ac_cv_header_sys_wait_h=yes
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   ac_cv_header_sys_wait_h=no
8696 fi
8697 rm -f conftest*
8698 fi
8699
8700 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8701 if test $ac_cv_header_sys_wait_h = yes; then
8702   cat >> confdefs.h <<\EOF
8703 #define HAVE_SYS_WAIT_H 1
8704 EOF
8705
8706 fi
8707
8708 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8709 echo "configure:8710: checking POSIX termios" >&5
8710 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <unistd.h>
8718 #include <termios.h>
8719 int main() {
8720 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8721    tcgetattr(0, 0);
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8725   rm -rf conftest*
8726   am_cv_sys_posix_termios=yes
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   am_cv_sys_posix_termios=no
8732 fi
8733 rm -f conftest*
8734 fi
8735
8736 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8737
8738
8739  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8740 echo "configure:8741: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8741 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8742   echo $ac_n "(cached) $ac_c" 1>&6
8743 else
8744   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8745
8746   gwinsz_in_termios_h=no
8747   if test $am_cv_sys_posix_termios = yes; then
8748     cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 #include <sys/types.h>
8752 #     include <termios.h>
8753 #     ifdef TIOCGWINSZ
8754         yes
8755 #     endif
8756     
8757 EOF
8758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8759   egrep "yes" >/dev/null 2>&1; then
8760   rm -rf conftest*
8761   gwinsz_in_termios_h=yes
8762 fi
8763 rm -f conftest*
8764
8765   fi
8766
8767   if test $gwinsz_in_termios_h = no; then
8768     cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <sys/types.h>
8772 #     include <sys/ioctl.h>
8773 #     ifdef TIOCGWINSZ
8774         yes
8775 #     endif
8776     
8777 EOF
8778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8779   egrep "yes" >/dev/null 2>&1; then
8780   rm -rf conftest*
8781   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8782 fi
8783 rm -f conftest*
8784
8785   fi
8786   
8787 fi
8788
8789 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8790   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8791     cat >> confdefs.h <<\EOF
8792 #define GWINSZ_IN_SYS_IOCTL 1
8793 EOF
8794
8795   fi
8796
8797 if test $am_cv_sys_posix_termios = yes ; then
8798         cat >> confdefs.h <<\EOF
8799 #define HAVE_POSIX_TERMIOS 1
8800 EOF
8801
8802 fi
8803
8804 for ac_hdr in \
8805         arpa/inet.h             \
8806         arpa/nameser.h  \
8807         assert.h                \
8808         bits/types.h    \
8809         conio.h                 \
8810         crypt.h                 \
8811         direct.h                \
8812         errno.h                 \
8813         fcntl.h                 \
8814         filio.h                 \
8815         getopt.h                \
8816         grp.h                   \
8817         io.h                    \
8818         libutil.h               \
8819         limits.h                \
8820         locale.h                \
8821         netinet/tcp.h   \
8822         malloc.h                \
8823         memory.h                \
8824         psap.h                  \
8825         pwd.h                   \
8826         process.h               \
8827         resolv.h                \
8828         sgtty.h                 \
8829         shadow.h                \
8830         stddef.h                \
8831         string.h                \
8832         strings.h               \
8833         sysexits.h              \
8834         sys/file.h              \
8835         sys/filio.h             \
8836         sys/errno.h             \
8837         sys/ioctl.h             \
8838         sys/param.h             \
8839         sys/resource.h  \
8840         sys/select.h    \
8841         sys/socket.h    \
8842         sys/stat.h              \
8843         sys/syslog.h    \
8844         sys/time.h              \
8845         sys/types.h             \
8846         sys/ucred.h             \
8847         sys/uio.h               \
8848         syslog.h                \
8849         termios.h               \
8850         unistd.h                \
8851         winsock.h               \
8852         winsock2.h              \
8853
8854 do
8855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8857 echo "configure:8858: checking for $ac_hdr" >&5
8858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 #include <$ac_hdr>
8865 EOF
8866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8867 { (eval echo configure:8868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8869 if test -z "$ac_err"; then
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=yes"
8872 else
8873   echo "$ac_err" >&5
8874   echo "configure: failed program was:" >&5
8875   cat conftest.$ac_ext >&5
8876   rm -rf conftest*
8877   eval "ac_cv_header_$ac_safe=no"
8878 fi
8879 rm -f conftest*
8880 fi
8881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8882   echo "$ac_t""yes" 1>&6
8883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8884   cat >> confdefs.h <<EOF
8885 #define $ac_tr_hdr 1
8886 EOF
8887  
8888 else
8889   echo "$ac_t""no" 1>&6
8890 fi
8891 done
8892
8893
8894
8895 for ac_func in sigaction sigset 
8896 do
8897 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8898 echo "configure:8899: checking for $ac_func" >&5
8899 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
8900   echo $ac_n "(cached) $ac_c" 1>&6
8901 else
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 /* System header to define __stub macros and hopefully few prototypes,
8906     which can conflict with char $ac_func(); below.  */
8907 #include <assert.h>
8908 /* Override any gcc2 internal prototype to avoid an error.  */
8909 /* We use char because int might match the return type of a gcc2
8910     builtin and then its argument prototype would still apply.  */
8911 char $ac_func();
8912 char (*f)();
8913
8914 int main() {
8915
8916 /* The GNU C library defines this for functions which it implements
8917     to always fail with ENOSYS.  Some functions are actually named
8918     something starting with __ and the normal name is an alias.  */
8919 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8920 choke me
8921 #else
8922 f = $ac_func;
8923 #endif
8924
8925 ; return 0; }
8926 EOF
8927 if { (eval echo configure:8928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8928   rm -rf conftest*
8929   eval "ac_cv_func_$ac_func=yes"
8930 else
8931   echo "configure: failed program was:" >&5
8932   cat conftest.$ac_ext >&5
8933   rm -rf conftest*
8934   eval "ac_cv_func_$ac_func=no"
8935 fi
8936 rm -f conftest*
8937 fi
8938
8939 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8940   echo "$ac_t""yes" 1>&6
8941     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8942   cat >> confdefs.h <<EOF
8943 #define $ac_tr_func 1
8944 EOF
8945  
8946 else
8947   echo "$ac_t""no" 1>&6
8948 fi
8949 done
8950
8951
8952 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
8953         echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8954 echo "configure:8955: checking for sigset in -lV3" >&5
8955 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8957   echo $ac_n "(cached) $ac_c" 1>&6
8958 else
8959   ac_save_LIBS="$LIBS"
8960 LIBS="-lV3  $LIBS"
8961 cat > conftest.$ac_ext <<EOF
8962 #line 8963 "configure"
8963 #include "confdefs.h"
8964 /* Override any gcc2 internal prototype to avoid an error.  */
8965 /* We use char because int might match the return type of a gcc2
8966     builtin and then its argument prototype would still apply.  */
8967 char sigset();
8968
8969 int main() {
8970 sigset()
8971 ; return 0; }
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8974   rm -rf conftest*
8975   eval "ac_cv_lib_$ac_lib_var=yes"
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   eval "ac_cv_lib_$ac_lib_var=no"
8981 fi
8982 rm -f conftest*
8983 LIBS="$ac_save_LIBS"
8984
8985 fi
8986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8987   echo "$ac_t""yes" 1>&6
8988     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8990   cat >> confdefs.h <<EOF
8991 #define $ac_tr_lib 1
8992 EOF
8993
8994   LIBS="-lV3 $LIBS"
8995
8996 else
8997   echo "$ac_t""no" 1>&6
8998 fi
8999
9000 fi
9001
9002 if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
9003 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9004 echo "configure:9005: checking for winsock" >&5
9005 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   save_LIBS="$LIBS"
9009 for curlib in ws2_32 wsock32; do
9010         LIBS="$LIBS -l$curlib"
9011         cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 #include <winsock.h>
9015                         
9016 int main() {
9017
9018                         socket(0,0,0);
9019                         select(0,NULL,NULL,NULL,NULL);
9020                         closesocket(0);
9021                         gethostname(NULL,0);
9022                         
9023 ; return 0; }
9024 EOF
9025 if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9026   rm -rf conftest*
9027   ol_cv_winsock=yes
9028 else
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -rf conftest*
9032   ol_cv_winsock=no
9033 fi
9034 rm -f conftest*
9035
9036         if test $ol_cv_winsock = yes; then
9037                 cat >> confdefs.h <<\EOF
9038 #define HAVE_WINSOCK 1
9039 EOF
9040
9041                 ac_cv_func_socket=yes
9042                 ac_cv_func_select=yes
9043                 ac_cv_func_closesocket=yes
9044                 ac_cv_func_gethostname=yes
9045                 if test $curlib = ws2_32; then
9046                         ol_cv_winsock=winsock2
9047                         cat >> confdefs.h <<\EOF
9048 #define HAVE_WINSOCK2 1
9049 EOF
9050
9051                 fi
9052                 break
9053         fi
9054         LIBS="$save_LIBS"
9055 done
9056 fi
9057
9058 echo "$ac_t""$ol_cv_winsock" 1>&6
9059 fi
9060
9061
9062 echo $ac_n "checking for socket""... $ac_c" 1>&6
9063 echo "configure:9064: checking for socket" >&5
9064 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9065   echo $ac_n "(cached) $ac_c" 1>&6
9066 else
9067   cat > conftest.$ac_ext <<EOF
9068 #line 9069 "configure"
9069 #include "confdefs.h"
9070 /* System header to define __stub macros and hopefully few prototypes,
9071     which can conflict with char socket(); below.  */
9072 #include <assert.h>
9073 /* Override any gcc2 internal prototype to avoid an error.  */
9074 /* We use char because int might match the return type of a gcc2
9075     builtin and then its argument prototype would still apply.  */
9076 char socket();
9077 char (*f)();
9078
9079 int main() {
9080
9081 /* The GNU C library defines this for functions which it implements
9082     to always fail with ENOSYS.  Some functions are actually named
9083     something starting with __ and the normal name is an alias.  */
9084 #if defined (__stub_socket) || defined (__stub___socket)
9085 choke me
9086 #else
9087 f = socket;
9088 #endif
9089
9090 ; return 0; }
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9093   rm -rf conftest*
9094   eval "ac_cv_func_socket=yes"
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_func_socket=no"
9100 fi
9101 rm -f conftest*
9102 fi
9103
9104 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9105   echo "$ac_t""yes" 1>&6
9106   :
9107 else
9108   echo "$ac_t""no" 1>&6
9109         
9110         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9111 echo "configure:9112: checking for main in -lsocket" >&5
9112 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9114   echo $ac_n "(cached) $ac_c" 1>&6
9115 else
9116   ac_save_LIBS="$LIBS"
9117 LIBS="-lsocket  $LIBS"
9118 cat > conftest.$ac_ext <<EOF
9119 #line 9120 "configure"
9120 #include "confdefs.h"
9121
9122 int main() {
9123 main()
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   eval "ac_cv_lib_$ac_lib_var=yes"
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   eval "ac_cv_lib_$ac_lib_var=no"
9134 fi
9135 rm -f conftest*
9136 LIBS="$ac_save_LIBS"
9137
9138 fi
9139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9140   echo "$ac_t""yes" 1>&6
9141     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9143   cat >> confdefs.h <<EOF
9144 #define $ac_tr_lib 1
9145 EOF
9146
9147   LIBS="-lsocket $LIBS"
9148
9149 else
9150   echo "$ac_t""no" 1>&6
9151 fi
9152
9153         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9154 echo "configure:9155: checking for main in -lnet" >&5
9155 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9157   echo $ac_n "(cached) $ac_c" 1>&6
9158 else
9159   ac_save_LIBS="$LIBS"
9160 LIBS="-lnet  $LIBS"
9161 cat > conftest.$ac_ext <<EOF
9162 #line 9163 "configure"
9163 #include "confdefs.h"
9164
9165 int main() {
9166 main()
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9170   rm -rf conftest*
9171   eval "ac_cv_lib_$ac_lib_var=yes"
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_lib_$ac_lib_var=no"
9177 fi
9178 rm -f conftest*
9179 LIBS="$ac_save_LIBS"
9180
9181 fi
9182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9183   echo "$ac_t""yes" 1>&6
9184     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9185     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9186   cat >> confdefs.h <<EOF
9187 #define $ac_tr_lib 1
9188 EOF
9189
9190   LIBS="-lnet $LIBS"
9191
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195
9196         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9197 echo "configure:9198: checking for main in -lnsl_s" >&5
9198 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9199 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9200   echo $ac_n "(cached) $ac_c" 1>&6
9201 else
9202   ac_save_LIBS="$LIBS"
9203 LIBS="-lnsl_s  $LIBS"
9204 cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207
9208 int main() {
9209 main()
9210 ; return 0; }
9211 EOF
9212 if { (eval echo configure:9213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9213   rm -rf conftest*
9214   eval "ac_cv_lib_$ac_lib_var=yes"
9215 else
9216   echo "configure: failed program was:" >&5
9217   cat conftest.$ac_ext >&5
9218   rm -rf conftest*
9219   eval "ac_cv_lib_$ac_lib_var=no"
9220 fi
9221 rm -f conftest*
9222 LIBS="$ac_save_LIBS"
9223
9224 fi
9225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9226   echo "$ac_t""yes" 1>&6
9227     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9228     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9229   cat >> confdefs.h <<EOF
9230 #define $ac_tr_lib 1
9231 EOF
9232
9233   LIBS="-lnsl_s $LIBS"
9234
9235 else
9236   echo "$ac_t""no" 1>&6
9237 fi
9238
9239         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9240 echo "configure:9241: checking for main in -lnsl" >&5
9241 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9243   echo $ac_n "(cached) $ac_c" 1>&6
9244 else
9245   ac_save_LIBS="$LIBS"
9246 LIBS="-lnsl  $LIBS"
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250
9251 int main() {
9252 main()
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   eval "ac_cv_lib_$ac_lib_var=yes"
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_lib_$ac_lib_var=no"
9263 fi
9264 rm -f conftest*
9265 LIBS="$ac_save_LIBS"
9266
9267 fi
9268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9269   echo "$ac_t""yes" 1>&6
9270     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9272   cat >> confdefs.h <<EOF
9273 #define $ac_tr_lib 1
9274 EOF
9275
9276   LIBS="-lnsl $LIBS"
9277
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281
9282         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9283 echo "configure:9284: checking for socket in -linet" >&5
9284 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   ac_save_LIBS="$LIBS"
9289 LIBS="-linet  $LIBS"
9290 cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293 /* Override any gcc2 internal prototype to avoid an error.  */
9294 /* We use char because int might match the return type of a gcc2
9295     builtin and then its argument prototype would still apply.  */
9296 char socket();
9297
9298 int main() {
9299 socket()
9300 ; return 0; }
9301 EOF
9302 if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9303   rm -rf conftest*
9304   eval "ac_cv_lib_$ac_lib_var=yes"
9305 else
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -rf conftest*
9309   eval "ac_cv_lib_$ac_lib_var=no"
9310 fi
9311 rm -f conftest*
9312 LIBS="$ac_save_LIBS"
9313
9314 fi
9315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9318     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9319   cat >> confdefs.h <<EOF
9320 #define $ac_tr_lib 1
9321 EOF
9322
9323   LIBS="-linet $LIBS"
9324
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328
9329         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9330 echo "configure:9331: checking for main in -lgen" >&5
9331 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9333   echo $ac_n "(cached) $ac_c" 1>&6
9334 else
9335   ac_save_LIBS="$LIBS"
9336 LIBS="-lgen  $LIBS"
9337 cat > conftest.$ac_ext <<EOF
9338 #line 9339 "configure"
9339 #include "confdefs.h"
9340
9341 int main() {
9342 main()
9343 ; return 0; }
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9346   rm -rf conftest*
9347   eval "ac_cv_lib_$ac_lib_var=yes"
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -rf conftest*
9352   eval "ac_cv_lib_$ac_lib_var=no"
9353 fi
9354 rm -f conftest*
9355 LIBS="$ac_save_LIBS"
9356
9357 fi
9358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9359   echo "$ac_t""yes" 1>&6
9360     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9361     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9362   cat >> confdefs.h <<EOF
9363 #define $ac_tr_lib 1
9364 EOF
9365
9366   LIBS="-lgen $LIBS"
9367
9368 else
9369   echo "$ac_t""no" 1>&6
9370 fi
9371
9372
9373 fi
9374
9375
9376 echo $ac_n "checking for select""... $ac_c" 1>&6
9377 echo "configure:9378: checking for select" >&5
9378 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9379   echo $ac_n "(cached) $ac_c" 1>&6
9380 else
9381   cat > conftest.$ac_ext <<EOF
9382 #line 9383 "configure"
9383 #include "confdefs.h"
9384 /* System header to define __stub macros and hopefully few prototypes,
9385     which can conflict with char select(); below.  */
9386 #include <assert.h>
9387 /* Override any gcc2 internal prototype to avoid an error.  */
9388 /* We use char because int might match the return type of a gcc2
9389     builtin and then its argument prototype would still apply.  */
9390 char select();
9391 char (*f)();
9392
9393 int main() {
9394
9395 /* The GNU C library defines this for functions which it implements
9396     to always fail with ENOSYS.  Some functions are actually named
9397     something starting with __ and the normal name is an alias.  */
9398 #if defined (__stub_select) || defined (__stub___select)
9399 choke me
9400 #else
9401 f = select;
9402 #endif
9403
9404 ; return 0; }
9405 EOF
9406 if { (eval echo configure:9407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9407   rm -rf conftest*
9408   eval "ac_cv_func_select=yes"
9409 else
9410   echo "configure: failed program was:" >&5
9411   cat conftest.$ac_ext >&5
9412   rm -rf conftest*
9413   eval "ac_cv_func_select=no"
9414 fi
9415 rm -f conftest*
9416 fi
9417
9418 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9419   echo "$ac_t""yes" 1>&6
9420   :
9421 else
9422   echo "$ac_t""no" 1>&6
9423 { echo "configure: error: select() required." 1>&2; exit 1; }
9424 fi
9425
9426
9427 if test "${ac_cv_header_winsock_h}" != yes; then
9428                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9429 echo "configure:9430: checking types of arguments for select()" >&5
9430  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9431   echo $ac_n "(cached) $ac_c" 1>&6
9432 else
9433    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9440      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9441       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9442        cat > conftest.$ac_ext <<EOF
9443 #line 9444 "configure"
9444 #include "confdefs.h"
9445 #ifdef HAVE_SYS_TYPES_H
9446 #include <sys/types.h>
9447 #endif
9448 #ifdef HAVE_SYS_TIME_H
9449 #include <sys/time.h>
9450 #endif
9451 #ifdef HAVE_SYS_SELECT_H
9452 #include <sys/select.h>
9453 #endif
9454 #ifdef HAVE_SYS_SOCKET_H
9455 #include <sys/socket.h>
9456 #endif
9457 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);
9458 int main() {
9459
9460 ; return 0; }
9461 EOF
9462 if { (eval echo configure:9463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9463   rm -rf conftest*
9464           ac_not_found=no ; break 3
9465 else
9466   echo "configure: failed program was:" >&5
9467   cat conftest.$ac_ext >&5
9468   rm -rf conftest*
9469   ac_not_found=yes
9470 fi
9471 rm -f conftest*
9472       done
9473      done
9474     done
9475    
9476 fi
9477   
9478 fi
9479  
9480 fi
9481  if test "$ac_not_found" = yes; then
9482   ac_cv_func_select_arg1=int 
9483   ac_cv_func_select_arg234='int *' 
9484   ac_cv_func_select_arg5='struct timeval *'
9485  fi
9486  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9487  cat >> confdefs.h <<EOF
9488 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9489 EOF
9490
9491  cat >> confdefs.h <<EOF
9492 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9493 EOF
9494
9495  cat >> confdefs.h <<EOF
9496 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9497 EOF
9498
9499
9500 fi
9501
9502
9503 for ac_func in poll 
9504 do
9505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9506 echo "configure:9507: checking for $ac_func" >&5
9507 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510   cat > conftest.$ac_ext <<EOF
9511 #line 9512 "configure"
9512 #include "confdefs.h"
9513 /* System header to define __stub macros and hopefully few prototypes,
9514     which can conflict with char $ac_func(); below.  */
9515 #include <assert.h>
9516 /* Override any gcc2 internal prototype to avoid an error.  */
9517 /* We use char because int might match the return type of a gcc2
9518     builtin and then its argument prototype would still apply.  */
9519 char $ac_func();
9520 char (*f)();
9521
9522 int main() {
9523
9524 /* The GNU C library defines this for functions which it implements
9525     to always fail with ENOSYS.  Some functions are actually named
9526     something starting with __ and the normal name is an alias.  */
9527 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9528 choke me
9529 #else
9530 f = $ac_func;
9531 #endif
9532
9533 ; return 0; }
9534 EOF
9535 if { (eval echo configure:9536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9536   rm -rf conftest*
9537   eval "ac_cv_func_$ac_func=yes"
9538 else
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   eval "ac_cv_func_$ac_func=no"
9543 fi
9544 rm -f conftest*
9545 fi
9546
9547 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9548   echo "$ac_t""yes" 1>&6
9549     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9550   cat >> confdefs.h <<EOF
9551 #define $ac_tr_func 1
9552 EOF
9553  
9554 else
9555   echo "$ac_t""no" 1>&6
9556 fi
9557 done
9558
9559 for ac_hdr in poll.h 
9560 do
9561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9563 echo "configure:9564: checking for $ac_hdr" >&5
9564 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9565   echo $ac_n "(cached) $ac_c" 1>&6
9566 else
9567   cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570 #include <$ac_hdr>
9571 EOF
9572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9573 { (eval echo configure:9574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9575 if test -z "$ac_err"; then
9576   rm -rf conftest*
9577   eval "ac_cv_header_$ac_safe=yes"
9578 else
9579   echo "$ac_err" >&5
9580   echo "configure: failed program was:" >&5
9581   cat conftest.$ac_ext >&5
9582   rm -rf conftest*
9583   eval "ac_cv_header_$ac_safe=no"
9584 fi
9585 rm -f conftest*
9586 fi
9587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9588   echo "$ac_t""yes" 1>&6
9589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9590   cat >> confdefs.h <<EOF
9591 #define $ac_tr_hdr 1
9592 EOF
9593  
9594 else
9595   echo "$ac_t""no" 1>&6
9596 fi
9597 done
9598
9599
9600 for ac_hdr in sys/epoll.h 
9601 do
9602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9604 echo "configure:9605: checking for $ac_hdr" >&5
9605 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9606   echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608   cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 #include <$ac_hdr>
9612 EOF
9613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9614 { (eval echo configure:9615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9616 if test -z "$ac_err"; then
9617   rm -rf conftest*
9618   eval "ac_cv_header_$ac_safe=yes"
9619 else
9620   echo "$ac_err" >&5
9621   echo "configure: failed program was:" >&5
9622   cat conftest.$ac_ext >&5
9623   rm -rf conftest*
9624   eval "ac_cv_header_$ac_safe=no"
9625 fi
9626 rm -f conftest*
9627 fi
9628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9629   echo "$ac_t""yes" 1>&6
9630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9631   cat >> confdefs.h <<EOF
9632 #define $ac_tr_hdr 1
9633 EOF
9634  
9635 else
9636   echo "$ac_t""no" 1>&6
9637 fi
9638 done
9639
9640 if test "${ac_cv_header_sys_epoll_h}" = yes; then
9641 echo $ac_n "checking for epoll system call""... $ac_c" 1>&6
9642 echo "configure:9643: checking for epoll system call" >&5
9643 if test "$cross_compiling" = yes; then
9644   echo "$ac_t""no" 1>&6
9645 else
9646   cat > conftest.$ac_ext <<EOF
9647 #line 9648 "configure"
9648 #include "confdefs.h"
9649 int main(int argc, char *argv)
9650 {
9651         int epfd = epoll_create(256);
9652         exit (epfd == -1 ? 1 : 0);
9653 }
9654 EOF
9655 if { (eval echo configure:9656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9656 then
9657   echo "$ac_t""yes" 1>&6
9658 cat >> confdefs.h <<\EOF
9659 #define HAVE_EPOLL 1
9660 EOF
9661
9662 else
9663   echo "configure: failed program was:" >&5
9664   cat conftest.$ac_ext >&5
9665   rm -fr conftest*
9666   echo "$ac_t""no" 1>&6
9667 fi
9668 rm -fr conftest*
9669 fi
9670
9671 fi
9672
9673 # strerror checks
9674 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9675 echo "configure:9676: checking declaration of sys_errlist" >&5
9676 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9677   echo $ac_n "(cached) $ac_c" 1>&6
9678 else
9679   
9680         cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683
9684 #include <stdio.h>
9685 #include <sys/types.h>
9686 #include <errno.h>
9687 #ifdef WINNT
9688 #include <stdlib.h>
9689 #endif 
9690 int main() {
9691 char *c = (char *) *sys_errlist
9692 ; return 0; }
9693 EOF
9694 if { (eval echo configure:9695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9695   rm -rf conftest*
9696   ol_cv_dcl_sys_errlist=yes
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_dcl_sys_errlist=no
9703 fi
9704 rm -f conftest*
9705 fi
9706
9707 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9708 #
9709 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9710 if test $ol_cv_dcl_sys_errlist = no ; then
9711         cat >> confdefs.h <<\EOF
9712 #define DECL_SYS_ERRLIST 1
9713 EOF
9714
9715
9716         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9717 echo "configure:9718: checking existence of sys_errlist" >&5
9718 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9719   echo $ac_n "(cached) $ac_c" 1>&6
9720 else
9721   
9722                 cat > conftest.$ac_ext <<EOF
9723 #line 9724 "configure"
9724 #include "confdefs.h"
9725 #include <errno.h>
9726 int main() {
9727 char *c = (char *) *sys_errlist
9728 ; return 0; }
9729 EOF
9730 if { (eval echo configure:9731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9731   rm -rf conftest*
9732   ol_cv_have_sys_errlist=yes
9733 else
9734   echo "configure: failed program was:" >&5
9735   cat conftest.$ac_ext >&5
9736   rm -rf conftest*
9737   ol_cv_have_sys_errlist=no
9738 fi
9739 rm -f conftest*
9740 fi
9741
9742 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9743 fi
9744 if test $ol_cv_have_sys_errlist = yes ; then
9745         cat >> confdefs.h <<\EOF
9746 #define HAVE_SYS_ERRLIST 1
9747 EOF
9748
9749 fi
9750  for ac_func in strerror strerror_r
9751 do
9752 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9753 echo "configure:9754: checking for $ac_func" >&5
9754 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 /* System header to define __stub macros and hopefully few prototypes,
9761     which can conflict with char $ac_func(); below.  */
9762 #include <assert.h>
9763 /* Override any gcc2 internal prototype to avoid an error.  */
9764 /* We use char because int might match the return type of a gcc2
9765     builtin and then its argument prototype would still apply.  */
9766 char $ac_func();
9767 char (*f)();
9768
9769 int main() {
9770
9771 /* The GNU C library defines this for functions which it implements
9772     to always fail with ENOSYS.  Some functions are actually named
9773     something starting with __ and the normal name is an alias.  */
9774 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9775 choke me
9776 #else
9777 f = $ac_func;
9778 #endif
9779
9780 ; return 0; }
9781 EOF
9782 if { (eval echo configure:9783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9783   rm -rf conftest*
9784   eval "ac_cv_func_$ac_func=yes"
9785 else
9786   echo "configure: failed program was:" >&5
9787   cat conftest.$ac_ext >&5
9788   rm -rf conftest*
9789   eval "ac_cv_func_$ac_func=no"
9790 fi
9791 rm -f conftest*
9792 fi
9793
9794 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9795   echo "$ac_t""yes" 1>&6
9796     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9797   cat >> confdefs.h <<EOF
9798 #define $ac_tr_func 1
9799 EOF
9800  
9801 else
9802   echo "$ac_t""no" 1>&6
9803 fi
9804 done
9805
9806 ol_cv_func_strerror_r=no
9807 if test "${ac_cv_func_strerror_r}" = yes ; then
9808         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9809 echo "configure:9810: checking non-posix strerror_r" >&5
9810 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   
9814         cat > conftest.$ac_ext <<EOF
9815 #line 9816 "configure"
9816 #include "confdefs.h"
9817 #include <string.h>
9818 EOF
9819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9820   egrep "strerror_r" >/dev/null 2>&1; then
9821   rm -rf conftest*
9822   ol_decl_strerror_r=yes
9823 else
9824   rm -rf conftest*
9825   ol_decl_strerror_r=no
9826 fi
9827 rm -f conftest*
9828
9829         if test $ol_decl_strerror_r = yes ; then
9830                 cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9833 #include <string.h>
9834 int main() {
9835    /* from autoconf 2.59 */
9836                                 char buf[100];
9837                                 char x = *strerror_r (0, buf, sizeof buf);
9838                                 char *p = strerror_r (0, buf, sizeof buf);
9839                         
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9843   rm -rf conftest*
9844   ol_cv_nonposix_strerror_r=yes
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   ol_cv_nonposix_strerror_r=no
9850 fi
9851 rm -f conftest*
9852         else
9853                 if test "$cross_compiling" = yes; then
9854   ol_cv_nonposix_strerror=no
9855 else
9856   cat > conftest.$ac_ext <<EOF
9857 #line 9858 "configure"
9858 #include "confdefs.h"
9859
9860                         main() {
9861                                 char buf[100];
9862                                 buf[0] = 0;
9863                                 strerror_r( 1, buf, sizeof buf );
9864                                 exit( buf[0] == 0 );
9865                         }
9866                         
9867 EOF
9868 if { (eval echo configure:9869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
9869 then
9870   ol_cv_nonposix_strerror_r=yes
9871 else
9872   echo "configure: failed program was:" >&5
9873   cat conftest.$ac_ext >&5
9874   rm -fr conftest*
9875   ol_cv_nonposix_strerror=no
9876 fi
9877 rm -fr conftest*
9878 fi
9879
9880         fi
9881         
9882 fi
9883
9884 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9885 if test $ol_cv_nonposix_strerror_r = yes ; then
9886         cat >> confdefs.h <<\EOF
9887 #define HAVE_NONPOSIX_STRERROR_R 1
9888 EOF
9889
9890 fi
9891
9892 elif test "${ac_cv_func_strerror}" = no ; then
9893         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9894 echo "configure:9895: checking declaration of sys_errlist" >&5
9895 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9896   echo $ac_n "(cached) $ac_c" 1>&6
9897 else
9898   
9899         cat > conftest.$ac_ext <<EOF
9900 #line 9901 "configure"
9901 #include "confdefs.h"
9902
9903 #include <stdio.h>
9904 #include <sys/types.h>
9905 #include <errno.h>
9906 #ifdef WINNT
9907 #include <stdlib.h>
9908 #endif 
9909 int main() {
9910 char *c = (char *) *sys_errlist
9911 ; return 0; }
9912 EOF
9913 if { (eval echo configure:9914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9914   rm -rf conftest*
9915   ol_cv_dcl_sys_errlist=yes
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_dcl_sys_errlist=no
9922 fi
9923 rm -f conftest*
9924 fi
9925
9926 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9927 #
9928 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9929 if test $ol_cv_dcl_sys_errlist = no ; then
9930         cat >> confdefs.h <<\EOF
9931 #define DECL_SYS_ERRLIST 1
9932 EOF
9933
9934
9935         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9936 echo "configure:9937: checking existence of sys_errlist" >&5
9937 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9938   echo $ac_n "(cached) $ac_c" 1>&6
9939 else
9940   
9941                 cat > conftest.$ac_ext <<EOF
9942 #line 9943 "configure"
9943 #include "confdefs.h"
9944 #include <errno.h>
9945 int main() {
9946 char *c = (char *) *sys_errlist
9947 ; return 0; }
9948 EOF
9949 if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9950   rm -rf conftest*
9951   ol_cv_have_sys_errlist=yes
9952 else
9953   echo "configure: failed program was:" >&5
9954   cat conftest.$ac_ext >&5
9955   rm -rf conftest*
9956   ol_cv_have_sys_errlist=no
9957 fi
9958 rm -f conftest*
9959 fi
9960
9961 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9962 fi
9963 if test $ol_cv_have_sys_errlist = yes ; then
9964         cat >> confdefs.h <<\EOF
9965 #define HAVE_SYS_ERRLIST 1
9966 EOF
9967
9968 fi
9969
9970 fi
9971
9972
9973 for ac_hdr in regex.h 
9974 do
9975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9977 echo "configure:9978: checking for $ac_hdr" >&5
9978 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9979   echo $ac_n "(cached) $ac_c" 1>&6
9980 else
9981   cat > conftest.$ac_ext <<EOF
9982 #line 9983 "configure"
9983 #include "confdefs.h"
9984 #include <$ac_hdr>
9985 EOF
9986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9987 { (eval echo configure:9988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9989 if test -z "$ac_err"; then
9990   rm -rf conftest*
9991   eval "ac_cv_header_$ac_safe=yes"
9992 else
9993   echo "$ac_err" >&5
9994   echo "configure: failed program was:" >&5
9995   cat conftest.$ac_ext >&5
9996   rm -rf conftest*
9997   eval "ac_cv_header_$ac_safe=no"
9998 fi
9999 rm -f conftest*
10000 fi
10001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10002   echo "$ac_t""yes" 1>&6
10003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10004   cat >> confdefs.h <<EOF
10005 #define $ac_tr_hdr 1
10006 EOF
10007  
10008 else
10009   echo "$ac_t""no" 1>&6
10010 fi
10011 done
10012
10013 if test "$ac_cv_header_regex_h" != yes ; then
10014         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
10015 fi
10016
10017 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
10018 echo "configure:10019: checking for library containing regfree" >&5
10019 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   ac_func_search_save_LIBS="$LIBS"
10023 ac_cv_search_regfree="no"
10024 cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 /* We use char because int might match the return type of a gcc2
10029     builtin and then its argument prototype would still apply.  */
10030 char regfree();
10031
10032 int main() {
10033 regfree()
10034 ; return 0; }
10035 EOF
10036 if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10037   rm -rf conftest*
10038   ac_cv_search_regfree="none required"
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042 fi
10043 rm -f conftest*
10044 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
10045 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10046 cat > conftest.$ac_ext <<EOF
10047 #line 10048 "configure"
10048 #include "confdefs.h"
10049 /* Override any gcc2 internal prototype to avoid an error.  */
10050 /* We use char because int might match the return type of a gcc2
10051     builtin and then its argument prototype would still apply.  */
10052 char regfree();
10053
10054 int main() {
10055 regfree()
10056 ; return 0; }
10057 EOF
10058 if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10059   rm -rf conftest*
10060   ac_cv_search_regfree="-l$ac_lib"
10061 break
10062 else
10063   echo "configure: failed program was:" >&5
10064   cat conftest.$ac_ext >&5
10065 fi
10066 rm -f conftest*
10067 done
10068 LIBS="$ac_func_search_save_LIBS"
10069 fi
10070
10071 echo "$ac_t""$ac_cv_search_regfree" 1>&6
10072 if test "$ac_cv_search_regfree" != "no"; then
10073   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
10074   :
10075 else :
10076   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
10077 fi
10078
10079
10080 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
10081 echo "configure:10082: checking for compatible POSIX regex" >&5
10082 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
10083   echo $ac_n "(cached) $ac_c" 1>&6
10084 else
10085   
10086         if test "$cross_compiling" = yes; then
10087   ol_cv_c_posix_regex=cross
10088 else
10089   cat > conftest.$ac_ext <<EOF
10090 #line 10091 "configure"
10091 #include "confdefs.h"
10092
10093 #include <sys/types.h>
10094 #include <regex.h>
10095 static char *pattern, *string;
10096 main()
10097 {
10098         int rc;
10099         regex_t re;
10100
10101         pattern = "^A";
10102
10103         if(regcomp(&re, pattern, 0)) {
10104                 return -1;
10105         }
10106         
10107         string = "ALL MATCH";
10108         
10109         rc = regexec(&re, string, 0, (void*)0, 0);
10110
10111         regfree(&re);
10112
10113         return rc;
10114 }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
10117 then
10118   ol_cv_c_posix_regex=yes
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -fr conftest*
10123   ol_cv_c_posix_regex=no
10124 fi
10125 rm -fr conftest*
10126 fi
10127
10128 fi
10129
10130 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
10131
10132 if test "$ol_cv_c_posix_regex" = no ; then
10133         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
10134 fi
10135
10136
10137 have_uuid=no
10138 for ac_hdr in sys/uuid.h
10139 do
10140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10141 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10142 echo "configure:10143: checking for $ac_hdr" >&5
10143 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10144   echo $ac_n "(cached) $ac_c" 1>&6
10145 else
10146   cat > conftest.$ac_ext <<EOF
10147 #line 10148 "configure"
10148 #include "confdefs.h"
10149 #include <$ac_hdr>
10150 EOF
10151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10152 { (eval echo configure:10153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10154 if test -z "$ac_err"; then
10155   rm -rf conftest*
10156   eval "ac_cv_header_$ac_safe=yes"
10157 else
10158   echo "$ac_err" >&5
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161   rm -rf conftest*
10162   eval "ac_cv_header_$ac_safe=no"
10163 fi
10164 rm -f conftest*
10165 fi
10166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10167   echo "$ac_t""yes" 1>&6
10168     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10169   cat >> confdefs.h <<EOF
10170 #define $ac_tr_hdr 1
10171 EOF
10172  
10173 else
10174   echo "$ac_t""no" 1>&6
10175 fi
10176 done
10177
10178 if test $ac_cv_header_sys_uuid_h = yes ; then
10179         save_LIBS="$LIBS"
10180         
10181 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
10182 echo "configure:10183: checking for library containing uuid_to_str" >&5
10183 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
10184   echo $ac_n "(cached) $ac_c" 1>&6
10185 else
10186   ac_func_search_save_LIBS="$LIBS"
10187 ac_cv_search_uuid_to_str="no"
10188 cat > conftest.$ac_ext <<EOF
10189 #line 10190 "configure"
10190 #include "confdefs.h"
10191 /* Override any gcc2 internal prototype to avoid an error.  */
10192 /* We use char because int might match the return type of a gcc2
10193     builtin and then its argument prototype would still apply.  */
10194 char uuid_to_str();
10195
10196 int main() {
10197 uuid_to_str()
10198 ; return 0; }
10199 EOF
10200 if { (eval echo configure:10201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10201   rm -rf conftest*
10202   ac_cv_search_uuid_to_str="none required"
10203 else
10204   echo "configure: failed program was:" >&5
10205   cat conftest.$ac_ext >&5
10206 fi
10207 rm -f conftest*
10208 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
10209 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10210 cat > conftest.$ac_ext <<EOF
10211 #line 10212 "configure"
10212 #include "confdefs.h"
10213 /* Override any gcc2 internal prototype to avoid an error.  */
10214 /* We use char because int might match the return type of a gcc2
10215     builtin and then its argument prototype would still apply.  */
10216 char uuid_to_str();
10217
10218 int main() {
10219 uuid_to_str()
10220 ; return 0; }
10221 EOF
10222 if { (eval echo configure:10223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10223   rm -rf conftest*
10224   ac_cv_search_uuid_to_str="-l$ac_lib"
10225 break
10226 else
10227   echo "configure: failed program was:" >&5
10228   cat conftest.$ac_ext >&5
10229 fi
10230 rm -f conftest*
10231 done
10232 LIBS="$ac_func_search_save_LIBS"
10233 fi
10234
10235 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10236 if test "$ac_cv_search_uuid_to_str" != "no"; then
10237   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10238   have_uuid=yes
10239 else :
10240   :
10241 fi
10242         LIBS="$save_LIBS"
10243
10244         if test have_uuid = yes ; then
10245                 cat >> confdefs.h <<\EOF
10246 #define HAVE_UUID_TO_STR 1
10247 EOF
10248
10249
10250                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10251                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10252         fi
10253 fi
10254
10255 if test $have_uuid = no ; then
10256         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10257 echo "configure:10258: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10258         save_LIBS="$LIBS"
10259         LIBS="$LIBS -lrpcrt4"
10260         cat > conftest.$ac_ext <<EOF
10261 #line 10262 "configure"
10262 #include "confdefs.h"
10263
10264                 int __stdcall UuidCreate(void *);
10265                 int __stdcall UuidToStringA(void *,void **);
10266                 
10267 int main() {
10268
10269                 UuidCreate(0);
10270                 UuidToStringA(0,0);
10271                 
10272 ; return 0; }
10273 EOF
10274 if { (eval echo configure:10275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10275   rm -rf conftest*
10276   need_rpcrt=yes
10277 else
10278   echo "configure: failed program was:" >&5
10279   cat conftest.$ac_ext >&5
10280   rm -rf conftest*
10281   need_rpcrt=no
10282 fi
10283 rm -f conftest*
10284         if test $need_rpcrt = yes; then
10285                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10286         fi
10287         LIBS="$save_LIBS"
10288         echo "$ac_t""$need_rpcrt" 1>&6
10289 fi
10290
10291 ol_cv_lib_resolver=no
10292 if test $ol_cv_lib_resolver = no ; then
10293         echo $ac_n "checking for resolver link (default)""... $ac_c" 1>&6
10294 echo "configure:10295: checking for resolver link (default)" >&5
10295 if eval "test \"\${ol_cv_resolver_none+set}\" = set"; then
10296   echo $ac_n "(cached) $ac_c" 1>&6
10297 else
10298   
10299         ol_RESOLVER_LIB=
10300         ol_LIBS=$LIBS
10301         LIBS="$ol_RESOLVER_LIB $LIBS"
10302
10303         cat > conftest.$ac_ext <<EOF
10304 #line 10305 "configure"
10305 #include "confdefs.h"
10306
10307 #ifdef HAVE_SYS_TYPES_H
10308 #       include <sys/types.h>
10309 #endif
10310 #include <netinet/in.h>
10311 #ifdef HAVE_ARPA_NAMESER_H
10312 #       include <arpa/nameser.h>
10313 #endif
10314 #ifdef HAVE_RESOLV_H
10315 #       include <resolv.h>
10316 #endif
10317
10318 int main() {
10319 {
10320         int len, status;
10321         char *request = NULL;
10322         unsigned char reply[64*1024];
10323         unsigned char host[64*1024];
10324         unsigned char *p;
10325
10326 #ifdef NS_HFIXEDSZ
10327         /* Bind 8/9 interface */
10328         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10329 #else
10330         /* Bind 4 interface */
10331 # ifndef T_SRV
10332 #  define T_SRV 33
10333 # endif
10334         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10335 #endif
10336         p = reply;
10337 #ifdef NS_HFIXEDSZ
10338         /* Bind 8/9 interface */
10339         p += NS_HFIXEDSZ;
10340 #elif defined(HFIXEDSZ)
10341         /* Bind 4 interface w/ HFIXEDSZ */
10342         p += HFIXEDSZ;
10343 #else
10344         /* Bind 4 interface w/o HFIXEDSZ */
10345         p += sizeof(HEADER);
10346 #endif
10347         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10348 }
10349 ; return 0; }
10350 EOF
10351 if { (eval echo configure:10352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10352   rm -rf conftest*
10353   ol_cv_resolver_none=yes
10354 else
10355   echo "configure: failed program was:" >&5
10356   cat conftest.$ac_ext >&5
10357   rm -rf conftest*
10358   ol_cv_resolver_none=no
10359 fi
10360 rm -f conftest*
10361
10362         LIBS="$ol_LIBS"
10363
10364 fi
10365
10366 echo "$ac_t""$ol_cv_resolver_none" 1>&6
10367
10368         if test $ol_cv_resolver_none = yes ; then
10369                 ol_cv_lib_resolver=yes
10370         fi
10371 fi
10372
10373 if test $ol_cv_lib_resolver = no ; then
10374         echo $ac_n "checking for resolver link (-lresolv)""... $ac_c" 1>&6
10375 echo "configure:10376: checking for resolver link (-lresolv)" >&5
10376 if eval "test \"\${ol_cv_resolver_resolv+set}\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   
10380         ol_RESOLVER_LIB=-lresolv
10381         ol_LIBS=$LIBS
10382         LIBS="$ol_RESOLVER_LIB $LIBS"
10383
10384         cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387
10388 #ifdef HAVE_SYS_TYPES_H
10389 #       include <sys/types.h>
10390 #endif
10391 #include <netinet/in.h>
10392 #ifdef HAVE_ARPA_NAMESER_H
10393 #       include <arpa/nameser.h>
10394 #endif
10395 #ifdef HAVE_RESOLV_H
10396 #       include <resolv.h>
10397 #endif
10398
10399 int main() {
10400 {
10401         int len, status;
10402         char *request = NULL;
10403         unsigned char reply[64*1024];
10404         unsigned char host[64*1024];
10405         unsigned char *p;
10406
10407 #ifdef NS_HFIXEDSZ
10408         /* Bind 8/9 interface */
10409         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10410 #else
10411         /* Bind 4 interface */
10412 # ifndef T_SRV
10413 #  define T_SRV 33
10414 # endif
10415         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10416 #endif
10417         p = reply;
10418 #ifdef NS_HFIXEDSZ
10419         /* Bind 8/9 interface */
10420         p += NS_HFIXEDSZ;
10421 #elif defined(HFIXEDSZ)
10422         /* Bind 4 interface w/ HFIXEDSZ */
10423         p += HFIXEDSZ;
10424 #else
10425         /* Bind 4 interface w/o HFIXEDSZ */
10426         p += sizeof(HEADER);
10427 #endif
10428         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10429 }
10430 ; return 0; }
10431 EOF
10432 if { (eval echo configure:10433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10433   rm -rf conftest*
10434   ol_cv_resolver_resolv=yes
10435 else
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   ol_cv_resolver_resolv=no
10440 fi
10441 rm -f conftest*
10442
10443         LIBS="$ol_LIBS"
10444
10445 fi
10446
10447 echo "$ac_t""$ol_cv_resolver_resolv" 1>&6
10448
10449         if test $ol_cv_resolver_resolv = yes ; then
10450                 ol_cv_lib_resolver=-lresolv
10451         fi
10452 fi
10453
10454 if test $ol_cv_lib_resolver = no ; then
10455         echo $ac_n "checking for resolver link (-lbind)""... $ac_c" 1>&6
10456 echo "configure:10457: checking for resolver link (-lbind)" >&5
10457 if eval "test \"\${ol_cv_resolver_bind+set}\" = set"; then
10458   echo $ac_n "(cached) $ac_c" 1>&6
10459 else
10460   
10461         ol_RESOLVER_LIB=-lbind
10462         ol_LIBS=$LIBS
10463         LIBS="$ol_RESOLVER_LIB $LIBS"
10464
10465         cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468
10469 #ifdef HAVE_SYS_TYPES_H
10470 #       include <sys/types.h>
10471 #endif
10472 #include <netinet/in.h>
10473 #ifdef HAVE_ARPA_NAMESER_H
10474 #       include <arpa/nameser.h>
10475 #endif
10476 #ifdef HAVE_RESOLV_H
10477 #       include <resolv.h>
10478 #endif
10479
10480 int main() {
10481 {
10482         int len, status;
10483         char *request = NULL;
10484         unsigned char reply[64*1024];
10485         unsigned char host[64*1024];
10486         unsigned char *p;
10487
10488 #ifdef NS_HFIXEDSZ
10489         /* Bind 8/9 interface */
10490         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
10491 #else
10492         /* Bind 4 interface */
10493 # ifndef T_SRV
10494 #  define T_SRV 33
10495 # endif
10496         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
10497 #endif
10498         p = reply;
10499 #ifdef NS_HFIXEDSZ
10500         /* Bind 8/9 interface */
10501         p += NS_HFIXEDSZ;
10502 #elif defined(HFIXEDSZ)
10503         /* Bind 4 interface w/ HFIXEDSZ */
10504         p += HFIXEDSZ;
10505 #else
10506         /* Bind 4 interface w/o HFIXEDSZ */
10507         p += sizeof(HEADER);
10508 #endif
10509         status = dn_expand( reply, reply+len, p, host, sizeof(host));
10510 }
10511 ; return 0; }
10512 EOF
10513 if { (eval echo configure:10514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10514   rm -rf conftest*
10515   ol_cv_resolver_bind=yes
10516 else
10517   echo "configure: failed program was:" >&5
10518   cat conftest.$ac_ext >&5
10519   rm -rf conftest*
10520   ol_cv_resolver_bind=no
10521 fi
10522 rm -f conftest*
10523
10524         LIBS="$ol_LIBS"
10525
10526 fi
10527
10528 echo "$ac_t""$ol_cv_resolver_bind" 1>&6
10529
10530         if test $ol_cv_resolver_bind = yes ; then
10531                 ol_cv_lib_resolver=-lbind
10532         fi
10533 fi
10534
10535
10536
10537 ol_link_dnssrv=no
10538 if test "$ol_cv_lib_resolver" != no ; then
10539         cat >> confdefs.h <<\EOF
10540 #define HAVE_RES_QUERY 1
10541 EOF
10542
10543
10544         if test "$ol_enable_dnssrv" != no ; then
10545                 ol_link_dnssrv=yes
10546         fi
10547
10548         if test "$ol_cv_lib_resolver" != yes ; then
10549                 LIBS="$ol_cv_lib_resolver $LIBS"
10550         fi
10551 fi
10552
10553 if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
10554         if test "$ol_link_dnssrv" = no ; then
10555                 { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10556         fi
10557 else
10558         ol_enable_dnssrv=no
10559 fi
10560
10561 for ac_func in hstrerror 
10562 do
10563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10564 echo "configure:10565: checking for $ac_func" >&5
10565 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10566   echo $ac_n "(cached) $ac_c" 1>&6
10567 else
10568   cat > conftest.$ac_ext <<EOF
10569 #line 10570 "configure"
10570 #include "confdefs.h"
10571 /* System header to define __stub macros and hopefully few prototypes,
10572     which can conflict with char $ac_func(); below.  */
10573 #include <assert.h>
10574 /* Override any gcc2 internal prototype to avoid an error.  */
10575 /* We use char because int might match the return type of a gcc2
10576     builtin and then its argument prototype would still apply.  */
10577 char $ac_func();
10578 char (*f)();
10579
10580 int main() {
10581
10582 /* The GNU C library defines this for functions which it implements
10583     to always fail with ENOSYS.  Some functions are actually named
10584     something starting with __ and the normal name is an alias.  */
10585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10586 choke me
10587 #else
10588 f = $ac_func;
10589 #endif
10590
10591 ; return 0; }
10592 EOF
10593 if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10594   rm -rf conftest*
10595   eval "ac_cv_func_$ac_func=yes"
10596 else
10597   echo "configure: failed program was:" >&5
10598   cat conftest.$ac_ext >&5
10599   rm -rf conftest*
10600   eval "ac_cv_func_$ac_func=no"
10601 fi
10602 rm -f conftest*
10603 fi
10604
10605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10606   echo "$ac_t""yes" 1>&6
10607     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10608   cat >> confdefs.h <<EOF
10609 #define $ac_tr_func 1
10610 EOF
10611  
10612 else
10613   echo "$ac_t""no" 1>&6
10614 fi
10615 done
10616
10617
10618 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10619 do
10620 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10621 echo "configure:10622: checking for $ac_func" >&5
10622 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10623   echo $ac_n "(cached) $ac_c" 1>&6
10624 else
10625   cat > conftest.$ac_ext <<EOF
10626 #line 10627 "configure"
10627 #include "confdefs.h"
10628 /* System header to define __stub macros and hopefully few prototypes,
10629     which can conflict with char $ac_func(); below.  */
10630 #include <assert.h>
10631 /* Override any gcc2 internal prototype to avoid an error.  */
10632 /* We use char because int might match the return type of a gcc2
10633     builtin and then its argument prototype would still apply.  */
10634 char $ac_func();
10635 char (*f)();
10636
10637 int main() {
10638
10639 /* The GNU C library defines this for functions which it implements
10640     to always fail with ENOSYS.  Some functions are actually named
10641     something starting with __ and the normal name is an alias.  */
10642 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10643 choke me
10644 #else
10645 f = $ac_func;
10646 #endif
10647
10648 ; return 0; }
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10651   rm -rf conftest*
10652   eval "ac_cv_func_$ac_func=yes"
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -rf conftest*
10657   eval "ac_cv_func_$ac_func=no"
10658 fi
10659 rm -f conftest*
10660 fi
10661
10662 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10663   echo "$ac_t""yes" 1>&6
10664     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10665   cat >> confdefs.h <<EOF
10666 #define $ac_tr_func 1
10667 EOF
10668  
10669 else
10670   echo "$ac_t""no" 1>&6
10671 fi
10672 done
10673
10674
10675 ol_link_ipv6=no
10676 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10677         if test $ol_enable_ipv6 = yes ; then
10678                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10679         fi
10680 elif test $ol_enable_ipv6 != no ; then
10681         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10682 echo "configure:10683: checking INET6_ADDRSTRLEN" >&5
10683 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10684   echo $ac_n "(cached) $ac_c" 1>&6
10685 else
10686   
10687                 cat > conftest.$ac_ext <<EOF
10688 #line 10689 "configure"
10689 #include "confdefs.h"
10690
10691 #                       include <netinet/in.h>
10692 #                       ifdef INET6_ADDRSTRLEN
10693                                 __has_inet6_addrstrlen__;
10694 #                       endif
10695                 
10696 EOF
10697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10698   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10699   rm -rf conftest*
10700   ol_cv_inet6_addrstrlen=yes
10701 else
10702   rm -rf conftest*
10703   ol_cv_inet6_addrstrlen=no
10704 fi
10705 rm -f conftest*
10706
10707 fi
10708
10709 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10710
10711
10712         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10713 echo "configure:10714: checking struct sockaddr_storage" >&5
10714 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10715   echo $ac_n "(cached) $ac_c" 1>&6
10716 else
10717   
10718                 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721
10722 #include <sys/types.h>
10723 #include <sys/socket.h>
10724
10725 int main() {
10726
10727                         struct sockaddr_storage ss;
10728
10729 ; return 0; }
10730 EOF
10731 if { (eval echo configure:10732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10732   rm -rf conftest*
10733   ol_cv_struct_sockaddr_storage=yes
10734 else
10735   echo "configure: failed program was:" >&5
10736   cat conftest.$ac_ext >&5
10737   rm -rf conftest*
10738   ol_cv_struct_sockaddr_storage=no
10739 fi
10740 rm -f conftest*
10741 fi
10742
10743 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10744
10745         if test $ol_cv_inet6_addrstrlen = yes \
10746                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10747                 ol_link_ipv6=yes
10748         elif test $ol_enable_ipv6 = yes \
10749                         -a $ol_cv_inet6_addrstrlen = no ; then
10750                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10751         elif test $ol_enable_ipv6 = yes \
10752                         -a $ol_cv_struct_sockaddr_storage = no ; then
10753                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10754         fi
10755 fi
10756
10757 if test $ol_enable_local != no ; then
10758         for ac_hdr in sys/un.h 
10759 do
10760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10762 echo "configure:10763: checking for $ac_hdr" >&5
10763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   cat > conftest.$ac_ext <<EOF
10767 #line 10768 "configure"
10768 #include "confdefs.h"
10769 #include <$ac_hdr>
10770 EOF
10771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10772 { (eval echo configure:10773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10774 if test -z "$ac_err"; then
10775   rm -rf conftest*
10776   eval "ac_cv_header_$ac_safe=yes"
10777 else
10778   echo "$ac_err" >&5
10779   echo "configure: failed program was:" >&5
10780   cat conftest.$ac_ext >&5
10781   rm -rf conftest*
10782   eval "ac_cv_header_$ac_safe=no"
10783 fi
10784 rm -f conftest*
10785 fi
10786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10787   echo "$ac_t""yes" 1>&6
10788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10789   cat >> confdefs.h <<EOF
10790 #define $ac_tr_hdr 1
10791 EOF
10792  
10793 else
10794   echo "$ac_t""no" 1>&6
10795 fi
10796 done
10797
10798
10799         if test $ol_enable_local = auto ; then
10800                 ol_enable_local=$ac_cv_header_sys_un_h
10801         elif test $ac_cv_header_sys_un_h = no ; then
10802                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10803         fi
10804 fi
10805
10806 ol_link_kbind=no
10807 ol_link_krb5=no
10808 ol_link_krb4=no
10809
10810 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10811         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10812         -o $ol_with_kerberos = k425 ; then
10813
10814         for ac_hdr in krb5.h
10815 do
10816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10818 echo "configure:10819: checking for $ac_hdr" >&5
10819 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10820   echo $ac_n "(cached) $ac_c" 1>&6
10821 else
10822   cat > conftest.$ac_ext <<EOF
10823 #line 10824 "configure"
10824 #include "confdefs.h"
10825 #include <$ac_hdr>
10826 EOF
10827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10828 { (eval echo configure:10829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10830 if test -z "$ac_err"; then
10831   rm -rf conftest*
10832   eval "ac_cv_header_$ac_safe=yes"
10833 else
10834   echo "$ac_err" >&5
10835   echo "configure: failed program was:" >&5
10836   cat conftest.$ac_ext >&5
10837   rm -rf conftest*
10838   eval "ac_cv_header_$ac_safe=no"
10839 fi
10840 rm -f conftest*
10841 fi
10842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10843   echo "$ac_t""yes" 1>&6
10844     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10845   cat >> confdefs.h <<EOF
10846 #define $ac_tr_hdr 1
10847 EOF
10848  
10849 else
10850   echo "$ac_t""no" 1>&6
10851 fi
10852 done
10853
10854
10855         if test $ac_cv_header_krb5_h = yes ; then
10856                                 for ac_hdr in heim_err.h
10857 do
10858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10860 echo "configure:10861: checking for $ac_hdr" >&5
10861 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10862   echo $ac_n "(cached) $ac_c" 1>&6
10863 else
10864   cat > conftest.$ac_ext <<EOF
10865 #line 10866 "configure"
10866 #include "confdefs.h"
10867 #include <$ac_hdr>
10868 EOF
10869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10870 { (eval echo configure:10871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10872 if test -z "$ac_err"; then
10873   rm -rf conftest*
10874   eval "ac_cv_header_$ac_safe=yes"
10875 else
10876   echo "$ac_err" >&5
10877   echo "configure: failed program was:" >&5
10878   cat conftest.$ac_ext >&5
10879   rm -rf conftest*
10880   eval "ac_cv_header_$ac_safe=no"
10881 fi
10882 rm -f conftest*
10883 fi
10884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10885   echo "$ac_t""yes" 1>&6
10886     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10887   cat >> confdefs.h <<EOF
10888 #define $ac_tr_hdr 1
10889 EOF
10890  
10891 else
10892   echo "$ac_t""no" 1>&6
10893 fi
10894 done
10895
10896                 if test $ac_cv_header_heim_err_h = yes ; then
10897                         krb5_impl=heimdal
10898                 else
10899                         krb5_impl=mit
10900                 fi
10901
10902                 if test $krb5_impl = mit; then
10903                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10904 echo "configure:10905: checking for main in -lk5crypto" >&5
10905 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10907   echo $ac_n "(cached) $ac_c" 1>&6
10908 else
10909   ac_save_LIBS="$LIBS"
10910 LIBS="-lk5crypto  $LIBS"
10911 cat > conftest.$ac_ext <<EOF
10912 #line 10913 "configure"
10913 #include "confdefs.h"
10914
10915 int main() {
10916 main()
10917 ; return 0; }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10920   rm -rf conftest*
10921   eval "ac_cv_lib_$ac_lib_var=yes"
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_lib_$ac_lib_var=no"
10927 fi
10928 rm -f conftest*
10929 LIBS="$ac_save_LIBS"
10930
10931 fi
10932 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10933   echo "$ac_t""yes" 1>&6
10934   krb5crypto=k5crypto
10935 else
10936   echo "$ac_t""no" 1>&6
10937 krb5crypto=crypto
10938 fi
10939
10940
10941                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10942 echo "configure:10943: checking for main in -lkrb5" >&5
10943 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10945   echo $ac_n "(cached) $ac_c" 1>&6
10946 else
10947   ac_save_LIBS="$LIBS"
10948 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10949 cat > conftest.$ac_ext <<EOF
10950 #line 10951 "configure"
10951 #include "confdefs.h"
10952
10953 int main() {
10954 main()
10955 ; return 0; }
10956 EOF
10957 if { (eval echo configure:10958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10958   rm -rf conftest*
10959   eval "ac_cv_lib_$ac_lib_var=yes"
10960 else
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_lib_$ac_lib_var=no"
10965 fi
10966 rm -f conftest*
10967 LIBS="$ac_save_LIBS"
10968
10969 fi
10970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10971   echo "$ac_t""yes" 1>&6
10972   have_krb5=yes
10973                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10974 else
10975   echo "$ac_t""no" 1>&6
10976 have_krb5=no
10977 fi
10978
10979
10980                 elif test $krb5_impl = heimdal; then
10981                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10982 echo "configure:10983: checking for main in -ldes" >&5
10983 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10985   echo $ac_n "(cached) $ac_c" 1>&6
10986 else
10987   ac_save_LIBS="$LIBS"
10988 LIBS="-ldes  $LIBS"
10989 cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992
10993 int main() {
10994 main()
10995 ; return 0; }
10996 EOF
10997 if { (eval echo configure:10998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10998   rm -rf conftest*
10999   eval "ac_cv_lib_$ac_lib_var=yes"
11000 else
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   eval "ac_cv_lib_$ac_lib_var=no"
11005 fi
11006 rm -f conftest*
11007 LIBS="$ac_save_LIBS"
11008
11009 fi
11010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012   krb5crypto=des
11013 else
11014   echo "$ac_t""no" 1>&6
11015 krb5crypto=crypto
11016 fi
11017
11018
11019                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
11020 echo "configure:11021: checking for main in -lkrb5" >&5
11021 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
11022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11023   echo $ac_n "(cached) $ac_c" 1>&6
11024 else
11025   ac_save_LIBS="$LIBS"
11026 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030
11031 int main() {
11032 main()
11033 ; return 0; }
11034 EOF
11035 if { (eval echo configure:11036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11036   rm -rf conftest*
11037   eval "ac_cv_lib_$ac_lib_var=yes"
11038 else
11039   echo "configure: failed program was:" >&5
11040   cat conftest.$ac_ext >&5
11041   rm -rf conftest*
11042   eval "ac_cv_lib_$ac_lib_var=no"
11043 fi
11044 rm -f conftest*
11045 LIBS="$ac_save_LIBS"
11046
11047 fi
11048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11049   echo "$ac_t""yes" 1>&6
11050   have_krb5=yes
11051                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
11052 else
11053   echo "$ac_t""no" 1>&6
11054 have_krb5=no
11055 fi
11056
11057
11058                         cat >> confdefs.h <<\EOF
11059 #define HAVE_HEIMDAL_KERBEROS 1
11060 EOF
11061
11062
11063                 else
11064                         have_krb5=no
11065                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
11066                 fi
11067
11068                 if test $have_krb5 = yes ; then
11069                         ol_link_krb5=yes
11070
11071                         cat >> confdefs.h <<\EOF
11072 #define HAVE_KRB5 1
11073 EOF
11074
11075
11076                         if test $ol_with_kerberos = k5only ; then
11077                                 ol_with_kerberos=found
11078                         fi
11079
11080                 elif test $ol_with_kerberos != auto ; then
11081                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
11082                 fi
11083
11084         fi
11085 fi
11086
11087 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
11088         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
11089
11090         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
11091 do
11092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11094 echo "configure:11095: checking for $ac_hdr" >&5
11095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11096   echo $ac_n "(cached) $ac_c" 1>&6
11097 else
11098   cat > conftest.$ac_ext <<EOF
11099 #line 11100 "configure"
11100 #include "confdefs.h"
11101 #include <$ac_hdr>
11102 EOF
11103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11104 { (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11106 if test -z "$ac_err"; then
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=yes"
11109 else
11110   echo "$ac_err" >&5
11111   echo "configure: failed program was:" >&5
11112   cat conftest.$ac_ext >&5
11113   rm -rf conftest*
11114   eval "ac_cv_header_$ac_safe=no"
11115 fi
11116 rm -f conftest*
11117 fi
11118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11119   echo "$ac_t""yes" 1>&6
11120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11121   cat >> confdefs.h <<EOF
11122 #define $ac_tr_hdr 1
11123 EOF
11124  
11125 else
11126   echo "$ac_t""no" 1>&6
11127 fi
11128 done
11129
11130
11131         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11132                 if test $krb5_impl = mit; then
11133                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11134 echo "configure:11135: checking for main in -lkrb4" >&5
11135 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11137   echo $ac_n "(cached) $ac_c" 1>&6
11138 else
11139   ac_save_LIBS="$LIBS"
11140 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11141 cat > conftest.$ac_ext <<EOF
11142 #line 11143 "configure"
11143 #include "confdefs.h"
11144
11145 int main() {
11146 main()
11147 ; return 0; }
11148 EOF
11149 if { (eval echo configure:11150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11150   rm -rf conftest*
11151   eval "ac_cv_lib_$ac_lib_var=yes"
11152 else
11153   echo "configure: failed program was:" >&5
11154   cat conftest.$ac_ext >&5
11155   rm -rf conftest*
11156   eval "ac_cv_lib_$ac_lib_var=no"
11157 fi
11158 rm -f conftest*
11159 LIBS="$ac_save_LIBS"
11160
11161 fi
11162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11163   echo "$ac_t""yes" 1>&6
11164   have_k425=yes
11165                                 KRB4_LIBS="-lkrb4 -ldes425"
11166 else
11167   echo "$ac_t""no" 1>&6
11168 have_k425=no
11169 fi
11170
11171
11172                 elif test $krb5_impl = heimdal; then
11173                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11174 echo "configure:11175: checking for main in -lkrb4" >&5
11175 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11177   echo $ac_n "(cached) $ac_c" 1>&6
11178 else
11179   ac_save_LIBS="$LIBS"
11180 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11181 cat > conftest.$ac_ext <<EOF
11182 #line 11183 "configure"
11183 #include "confdefs.h"
11184
11185 int main() {
11186 main()
11187 ; return 0; }
11188 EOF
11189 if { (eval echo configure:11190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11190   rm -rf conftest*
11191   eval "ac_cv_lib_$ac_lib_var=yes"
11192 else
11193   echo "configure: failed program was:" >&5
11194   cat conftest.$ac_ext >&5
11195   rm -rf conftest*
11196   eval "ac_cv_lib_$ac_lib_var=no"
11197 fi
11198 rm -f conftest*
11199 LIBS="$ac_save_LIBS"
11200
11201 fi
11202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11203   echo "$ac_t""yes" 1>&6
11204   have_k425=yes
11205                                 KRB4_LIBS="-lkrb4"
11206 else
11207   echo "$ac_t""no" 1>&6
11208 have_k425=no
11209 fi
11210
11211
11212                 else
11213                         have_425=no
11214                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11215                 fi
11216
11217                 if test $have_k425 = yes ; then
11218                         ol_with_kerberos=found
11219                         ol_link_krb4=yes
11220
11221                         cat >> confdefs.h <<\EOF
11222 #define HAVE_KRB425 1
11223 EOF
11224
11225                         cat >> confdefs.h <<\EOF
11226 #define HAVE_KRB4 1
11227 EOF
11228
11229
11230                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11231 echo "configure:11232: checking for des_debug in Kerberos libraries" >&5
11232 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11233   echo $ac_n "(cached) $ac_c" 1>&6
11234 else
11235   
11236                                                                 save_LIBS="$LIBS"
11237                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11238                                 cat > conftest.$ac_ext <<EOF
11239 #line 11240 "configure"
11240 #include "confdefs.h"
11241
11242 #include <kerberosIV/krb.h>
11243 #include <kerberosIV/des.h>
11244 extern int des_debug;
11245
11246 int main() {
11247
11248 des_debug = 1;
11249
11250 ; return 0; }
11251 EOF
11252 if { (eval echo configure:11253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11253   rm -rf conftest*
11254   ol_cv_var_des_debug=yes
11255 else
11256   echo "configure: failed program was:" >&5
11257   cat conftest.$ac_ext >&5
11258   rm -rf conftest*
11259   ol_cv_var_des_debug=no
11260 fi
11261 rm -f conftest*
11262                                                                 LIBS="$save_LIBS"
11263                         
11264 fi
11265
11266 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11267
11268                         if test $ol_cv_var_des_debug = yes ; then
11269                                 cat >> confdefs.h <<\EOF
11270 #define HAVE_DES_DEBUG 1
11271 EOF
11272
11273                         fi
11274
11275                         LIBS="$save_LIBS"
11276                 fi
11277         fi
11278 fi
11279
11280 if test $ol_link_krb5 = yes ; then
11281         ol_with_kerberos=found
11282 fi
11283
11284 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11285         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11286
11287         for ac_hdr in krb.h des.h krb-archaeology.h 
11288 do
11289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11291 echo "configure:11292: checking for $ac_hdr" >&5
11292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298 #include <$ac_hdr>
11299 EOF
11300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11301 { (eval echo configure:11302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11303 if test -z "$ac_err"; then
11304   rm -rf conftest*
11305   eval "ac_cv_header_$ac_safe=yes"
11306 else
11307   echo "$ac_err" >&5
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   eval "ac_cv_header_$ac_safe=no"
11312 fi
11313 rm -f conftest*
11314 fi
11315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11316   echo "$ac_t""yes" 1>&6
11317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11318   cat >> confdefs.h <<EOF
11319 #define $ac_tr_hdr 1
11320 EOF
11321  
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325 done
11326
11327
11328         if test $ac_cv_header_krb_h = yes ; then
11329                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11330 echo "configure:11331: checking for main in -lkrb" >&5
11331 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11333   echo $ac_n "(cached) $ac_c" 1>&6
11334 else
11335   ac_save_LIBS="$LIBS"
11336 LIBS="-lkrb -ldes $LIBS"
11337 cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340
11341 int main() {
11342 main()
11343 ; return 0; }
11344 EOF
11345 if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11346   rm -rf conftest*
11347   eval "ac_cv_lib_$ac_lib_var=yes"
11348 else
11349   echo "configure: failed program was:" >&5
11350   cat conftest.$ac_ext >&5
11351   rm -rf conftest*
11352   eval "ac_cv_lib_$ac_lib_var=no"
11353 fi
11354 rm -f conftest*
11355 LIBS="$ac_save_LIBS"
11356
11357 fi
11358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11359   echo "$ac_t""yes" 1>&6
11360   have_k4=yes
11361 else
11362   echo "$ac_t""no" 1>&6
11363 have_k4=no
11364 fi
11365
11366
11367                 if test $have_k4 = yes ; then
11368                         ol_with_kerberos=found
11369                         ol_link_krb4=yes
11370
11371                         cat >> confdefs.h <<\EOF
11372 #define HAVE_KRB4 1
11373 EOF
11374
11375
11376                         KRB4_LIBS="-lkrb -ldes"
11377
11378                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11379                                 cat >> confdefs.h <<\EOF
11380 #define HAVE_KTH_KERBEROS 1
11381 EOF
11382
11383                         fi
11384                 fi
11385         fi
11386 fi
11387
11388 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11389         ol_link_kbind=yes
11390
11391 elif test $ol_enable_kbind = yes ; then
11392         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11393 fi
11394
11395 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11396         cat >> confdefs.h <<\EOF
11397 #define HAVE_KERBEROS 1
11398 EOF
11399
11400
11401 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11402         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11403 fi
11404
11405         
11406 ol_link_tls=no
11407 if test $ol_with_tls != no ; then
11408         for ac_hdr in openssl/ssl.h ssl.h
11409 do
11410 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11411 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11412 echo "configure:11413: checking for $ac_hdr" >&5
11413 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11414   echo $ac_n "(cached) $ac_c" 1>&6
11415 else
11416   cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419 #include <$ac_hdr>
11420 EOF
11421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11422 { (eval echo configure:11423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11424 if test -z "$ac_err"; then
11425   rm -rf conftest*
11426   eval "ac_cv_header_$ac_safe=yes"
11427 else
11428   echo "$ac_err" >&5
11429   echo "configure: failed program was:" >&5
11430   cat conftest.$ac_ext >&5
11431   rm -rf conftest*
11432   eval "ac_cv_header_$ac_safe=no"
11433 fi
11434 rm -f conftest*
11435 fi
11436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11437   echo "$ac_t""yes" 1>&6
11438     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11439   cat >> confdefs.h <<EOF
11440 #define $ac_tr_hdr 1
11441 EOF
11442  
11443 else
11444   echo "$ac_t""no" 1>&6
11445 fi
11446 done
11447
11448
11449         if test $ac_cv_header_openssl_ssl_h = yes \
11450                 -o $ac_cv_header_ssl_h = yes ; then
11451                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11452 echo "configure:11453: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11453 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11454 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11455   echo $ac_n "(cached) $ac_c" 1>&6
11456 else
11457   ac_save_LIBS="$LIBS"
11458 LIBS="-lssl -lcrypto $LIBS"
11459 cat > conftest.$ac_ext <<EOF
11460 #line 11461 "configure"
11461 #include "confdefs.h"
11462 /* Override any gcc2 internal prototype to avoid an error.  */
11463 /* We use char because int might match the return type of a gcc2
11464     builtin and then its argument prototype would still apply.  */
11465 char SSLeay_add_ssl_algorithms();
11466
11467 int main() {
11468 SSLeay_add_ssl_algorithms()
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11472   rm -rf conftest*
11473   eval "ac_cv_lib_$ac_lib_var=yes"
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   eval "ac_cv_lib_$ac_lib_var=no"
11479 fi
11480 rm -f conftest*
11481 LIBS="$ac_save_LIBS"
11482
11483 fi
11484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11485   echo "$ac_t""yes" 1>&6
11486   have_ssleay=yes
11487                         need_rsaref=no
11488 else
11489   echo "$ac_t""no" 1>&6
11490 have_ssleay=no
11491 fi
11492
11493                         
11494                 if test $have_ssleay = no ; then
11495                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11496 echo "configure:11497: checking for SSL_library_init in -lssl" >&5
11497 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11499   echo $ac_n "(cached) $ac_c" 1>&6
11500 else
11501   ac_save_LIBS="$LIBS"
11502 LIBS="-lssl -lcrypto $LIBS"
11503 cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 /* Override any gcc2 internal prototype to avoid an error.  */
11507 /* We use char because int might match the return type of a gcc2
11508     builtin and then its argument prototype would still apply.  */
11509 char SSL_library_init();
11510
11511 int main() {
11512 SSL_library_init()
11513 ; return 0; }
11514 EOF
11515 if { (eval echo configure:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11516   rm -rf conftest*
11517   eval "ac_cv_lib_$ac_lib_var=yes"
11518 else
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -rf conftest*
11522   eval "ac_cv_lib_$ac_lib_var=no"
11523 fi
11524 rm -f conftest*
11525 LIBS="$ac_save_LIBS"
11526
11527 fi
11528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11529   echo "$ac_t""yes" 1>&6
11530   have_ssleay=yes
11531                                 need_rsaref=no
11532 else
11533   echo "$ac_t""no" 1>&6
11534 have_ssleay=no
11535 fi
11536
11537                 fi
11538
11539                 if test $have_ssleay = no ; then
11540                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11541 echo "configure:11542: checking for ssl3_accept in -lssl" >&5
11542 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11544   echo $ac_n "(cached) $ac_c" 1>&6
11545 else
11546   ac_save_LIBS="$LIBS"
11547 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11548 cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551 /* Override any gcc2 internal prototype to avoid an error.  */
11552 /* We use char because int might match the return type of a gcc2
11553     builtin and then its argument prototype would still apply.  */
11554 char ssl3_accept();
11555
11556 int main() {
11557 ssl3_accept()
11558 ; return 0; }
11559 EOF
11560 if { (eval echo configure:11561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11561   rm -rf conftest*
11562   eval "ac_cv_lib_$ac_lib_var=yes"
11563 else
11564   echo "configure: failed program was:" >&5
11565   cat conftest.$ac_ext >&5
11566   rm -rf conftest*
11567   eval "ac_cv_lib_$ac_lib_var=no"
11568 fi
11569 rm -f conftest*
11570 LIBS="$ac_save_LIBS"
11571
11572 fi
11573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11574   echo "$ac_t""yes" 1>&6
11575   have_ssleay=yes
11576                                 need_rsaref=yes
11577 else
11578   echo "$ac_t""no" 1>&6
11579 have_ssleay=no
11580 fi
11581
11582                 fi
11583
11584                 if test $have_ssleay = yes ; then
11585                         ol_with_tls=found
11586                         ol_link_tls=yes
11587
11588                         cat >> confdefs.h <<\EOF
11589 #define HAVE_SSLEAY 1
11590 EOF
11591
11592
11593                         if test $need_rsaref = yes; then
11594                                 cat >> confdefs.h <<\EOF
11595 #define HAVE_RSAREF 1
11596 EOF
11597
11598
11599                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11600                         else
11601                                 TLS_LIBS="-lssl -lcrypto"
11602                         fi
11603                 fi
11604                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11605 echo "configure:11606: checking OpenSSL library version (CRL checking capability)" >&5
11606 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11607   echo $ac_n "(cached) $ac_c" 1>&6
11608 else
11609   
11610         cat > conftest.$ac_ext <<EOF
11611 #line 11612 "configure"
11612 #include "confdefs.h"
11613
11614 #ifdef HAVE_OPENSSL_SSL_H
11615 #include <openssl/ssl.h>
11616 #else
11617 #include <ssl.h>
11618 #endif
11619
11620 /* Require 0.9.7d+ */
11621 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11622         char *__ssl_compat = "0.9.7d";
11623 #endif
11624         
11625 EOF
11626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11627   egrep "__ssl_compat" >/dev/null 2>&1; then
11628   rm -rf conftest*
11629   ol_cv_ssl_crl_compat=yes
11630 else
11631   rm -rf conftest*
11632   ol_cv_ssl_crl_compat=no
11633 fi
11634 rm -f conftest*
11635
11636 fi
11637
11638 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11639
11640                 if test $ol_cv_ssl_crl_compat = no ; then
11641                         ol_link_ssl=no
11642                 else 
11643                         cat >> confdefs.h <<\EOF
11644 #define HAVE_OPENSSL_CRL 1
11645 EOF
11646
11647                 fi
11648         fi
11649
11650 else
11651         echo "configure: warning: TLS data protection not supported!" 1>&2
11652 fi
11653
11654 WITH_TLS=no
11655 if test $ol_link_tls = yes ; then
11656         cat >> confdefs.h <<\EOF
11657 #define HAVE_TLS 1
11658 EOF
11659
11660         WITH_TLS=yes
11661
11662 elif test $ol_with_tls = auto ; then
11663         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11664         echo "configure: warning: TLS data protection not supported!" 1>&2
11665
11666 elif test $ol_with_tls != no ; then
11667         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11668 fi
11669
11670 if test $ol_enable_lmpasswd != no; then
11671         if test $ol_link_tls != yes ; then
11672                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11673         fi
11674
11675         cat >> confdefs.h <<\EOF
11676 #define SLAPD_LMHASH 1
11677 EOF
11678
11679 fi
11680
11681 ol_link_threads=no
11682
11683 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11684         -o $ol_with_threads = nt ; then
11685
11686         
11687         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11688 echo "configure:11689: checking for _beginthread" >&5
11689 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11690   echo $ac_n "(cached) $ac_c" 1>&6
11691 else
11692   cat > conftest.$ac_ext <<EOF
11693 #line 11694 "configure"
11694 #include "confdefs.h"
11695 /* System header to define __stub macros and hopefully few prototypes,
11696     which can conflict with char _beginthread(); below.  */
11697 #include <assert.h>
11698 /* Override any gcc2 internal prototype to avoid an error.  */
11699 /* We use char because int might match the return type of a gcc2
11700     builtin and then its argument prototype would still apply.  */
11701 char _beginthread();
11702 char (*f)();
11703
11704 int main() {
11705
11706 /* The GNU C library defines this for functions which it implements
11707     to always fail with ENOSYS.  Some functions are actually named
11708     something starting with __ and the normal name is an alias.  */
11709 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11710 choke me
11711 #else
11712 f = _beginthread;
11713 #endif
11714
11715 ; return 0; }
11716 EOF
11717 if { (eval echo configure:11718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11718   rm -rf conftest*
11719   eval "ac_cv_func__beginthread=yes"
11720 else
11721   echo "configure: failed program was:" >&5
11722   cat conftest.$ac_ext >&5
11723   rm -rf conftest*
11724   eval "ac_cv_func__beginthread=no"
11725 fi
11726 rm -f conftest*
11727 fi
11728
11729 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11730   echo "$ac_t""yes" 1>&6
11731   :
11732 else
11733   echo "$ac_t""no" 1>&6
11734 fi
11735
11736
11737         if test $ac_cv_func__beginthread = yes ; then
11738                 cat >> confdefs.h <<\EOF
11739 #define HAVE_NT_THREADS 1
11740 EOF
11741
11742                 ol_cv_nt_threads=yes
11743         fi
11744
11745
11746         if test "$ol_cv_nt_threads" = yes ; then
11747                 ol_link_threads=nt
11748                 ol_with_threads=found
11749                 ol_with_yielding_select=yes
11750
11751                 cat >> confdefs.h <<\EOF
11752 #define HAVE_NT_SERVICE_MANAGER 1
11753 EOF
11754
11755                 cat >> confdefs.h <<\EOF
11756 #define HAVE_NT_EVENT_LOG 1
11757 EOF
11758
11759         fi
11760
11761         if test $ol_with_threads = nt ; then
11762                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11763         fi
11764 fi
11765
11766 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11767         -o $ol_with_threads = posix ; then
11768
11769         for ac_hdr in pthread.h
11770 do
11771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11773 echo "configure:11774: checking for $ac_hdr" >&5
11774 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11775   echo $ac_n "(cached) $ac_c" 1>&6
11776 else
11777   cat > conftest.$ac_ext <<EOF
11778 #line 11779 "configure"
11779 #include "confdefs.h"
11780 #include <$ac_hdr>
11781 EOF
11782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11783 { (eval echo configure:11784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11785 if test -z "$ac_err"; then
11786   rm -rf conftest*
11787   eval "ac_cv_header_$ac_safe=yes"
11788 else
11789   echo "$ac_err" >&5
11790   echo "configure: failed program was:" >&5
11791   cat conftest.$ac_ext >&5
11792   rm -rf conftest*
11793   eval "ac_cv_header_$ac_safe=no"
11794 fi
11795 rm -f conftest*
11796 fi
11797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11798   echo "$ac_t""yes" 1>&6
11799     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11800   cat >> confdefs.h <<EOF
11801 #define $ac_tr_hdr 1
11802 EOF
11803  
11804 else
11805   echo "$ac_t""no" 1>&6
11806 fi
11807 done
11808
11809
11810         if test $ac_cv_header_pthread_h = yes ; then
11811                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11812 echo "configure:11813: checking POSIX thread version" >&5
11813 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11814   echo $ac_n "(cached) $ac_c" 1>&6
11815 else
11816   
11817         cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820
11821 #               include <pthread.h>
11822         
11823 int main() {
11824
11825                 int i = PTHREAD_CREATE_JOINABLE;
11826         
11827 ; return 0; }
11828 EOF
11829 if { (eval echo configure:11830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11830   rm -rf conftest*
11831   
11832         cat > conftest.$ac_ext <<EOF
11833 #line 11834 "configure"
11834 #include "confdefs.h"
11835 #include <pthread.h>
11836 EOF
11837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11838   egrep "pthread_detach" >/dev/null 2>&1; then
11839   rm -rf conftest*
11840   ol_cv_pthread_version=10
11841 else
11842   rm -rf conftest*
11843   ol_cv_pthread_version=8
11844 fi
11845 rm -f conftest*
11846
11847 else
11848   echo "configure: failed program was:" >&5
11849   cat conftest.$ac_ext >&5
11850   rm -rf conftest*
11851   
11852         cat > conftest.$ac_ext <<EOF
11853 #line 11854 "configure"
11854 #include "confdefs.h"
11855
11856 #               include <pthread.h>
11857 #               ifdef PTHREAD_CREATE_UNDETACHED
11858                 draft7
11859 #               endif
11860         
11861 EOF
11862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11863   egrep "draft7" >/dev/null 2>&1; then
11864   rm -rf conftest*
11865   ol_cv_pthread_version=7
11866 else
11867   rm -rf conftest*
11868   
11869         cat > conftest.$ac_ext <<EOF
11870 #line 11871 "configure"
11871 #include "confdefs.h"
11872 #include <pthread.h>
11873 EOF
11874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11875   egrep "pthread_attr_init" >/dev/null 2>&1; then
11876   rm -rf conftest*
11877   ol_cv_pthread_version=6
11878 else
11879   rm -rf conftest*
11880   
11881         cat > conftest.$ac_ext <<EOF
11882 #line 11883 "configure"
11883 #include "confdefs.h"
11884
11885 #               include <pthread.h>
11886 #ifdef          PTHREAD_MUTEX_INITIALIZER
11887                 draft5
11888 #endif
11889         
11890 EOF
11891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11892   egrep "draft5" >/dev/null 2>&1; then
11893   rm -rf conftest*
11894   ol_cv_pthread_version=5
11895 else
11896   rm -rf conftest*
11897   ol_cv_pthread_version=4
11898 fi
11899 rm -f conftest*
11900  
11901 fi
11902 rm -f conftest*
11903  
11904 fi
11905 rm -f conftest*
11906  
11907 fi
11908 rm -f conftest*
11909
11910 fi
11911
11912 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11913
11914
11915                 if test $ol_cv_pthread_version != 0 ; then
11916                         cat >> confdefs.h <<EOF
11917 #define HAVE_PTHREADS $ol_cv_pthread_version
11918 EOF
11919
11920                 else
11921                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11922                 fi
11923
11924                 # consider threads found
11925                 ol_with_threads=found
11926
11927                 
11928         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11929 echo "configure:11930: checking for LinuxThreads pthread.h" >&5
11930 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11931   echo $ac_n "(cached) $ac_c" 1>&6
11932 else
11933   cat > conftest.$ac_ext <<EOF
11934 #line 11935 "configure"
11935 #include "confdefs.h"
11936 #include <pthread.h>
11937 EOF
11938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11939   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11940   rm -rf conftest*
11941   ol_cv_header_linux_threads=yes
11942 else
11943   rm -rf conftest*
11944   ol_cv_header_linux_threads=no
11945 fi
11946 rm -f conftest*
11947
11948                 
11949 fi
11950
11951 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11952         if test $ol_cv_header_linux_threads = yes; then
11953                 cat >> confdefs.h <<\EOF
11954 #define HAVE_LINUX_THREADS 1
11955 EOF
11956
11957         fi
11958
11959                 
11960         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11961 echo "configure:11962: checking for GNU Pth pthread.h" >&5
11962 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11963   echo $ac_n "(cached) $ac_c" 1>&6
11964 else
11965   cat > conftest.$ac_ext <<EOF
11966 #line 11967 "configure"
11967 #include "confdefs.h"
11968 #include <pthread.h>
11969 #ifdef _POSIX_THREAD_IS_GNU_PTH
11970         __gnu_pth__;
11971 #endif
11972
11973 EOF
11974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11975   egrep "__gnu_pth__" >/dev/null 2>&1; then
11976   rm -rf conftest*
11977   ol_cv_header_gnu_pth_pthread_h=yes
11978 else
11979   rm -rf conftest*
11980   ol_cv_header_gnu_pth_pthread_h=no
11981 fi
11982 rm -f conftest*
11983
11984                 
11985 fi
11986
11987 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11988
11989
11990                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11991                         for ac_hdr in sched.h
11992 do
11993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11995 echo "configure:11996: checking for $ac_hdr" >&5
11996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11997   echo $ac_n "(cached) $ac_c" 1>&6
11998 else
11999   cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 #include <$ac_hdr>
12003 EOF
12004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12005 { (eval echo configure:12006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12007 if test -z "$ac_err"; then
12008   rm -rf conftest*
12009   eval "ac_cv_header_$ac_safe=yes"
12010 else
12011   echo "$ac_err" >&5
12012   echo "configure: failed program was:" >&5
12013   cat conftest.$ac_ext >&5
12014   rm -rf conftest*
12015   eval "ac_cv_header_$ac_safe=no"
12016 fi
12017 rm -f conftest*
12018 fi
12019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12020   echo "$ac_t""yes" 1>&6
12021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
12022   cat >> confdefs.h <<EOF
12023 #define $ac_tr_hdr 1
12024 EOF
12025  
12026 else
12027   echo "$ac_t""no" 1>&6
12028 fi
12029 done
12030
12031                 fi
12032
12033                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
12034                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
12035 echo "configure:12036: checking for pthread_create in default libraries" >&5
12036 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
12037   echo $ac_n "(cached) $ac_c" 1>&6
12038 else
12039   
12040                 if test "$cross_compiling" = yes; then
12041   cat > conftest.$ac_ext <<EOF
12042 #line 12043 "configure"
12043 #include "confdefs.h"
12044 /* pthread test headers */
12045 #include <pthread.h>
12046 #if HAVE_PTHREADS < 7
12047 #include <errno.h>
12048 #endif
12049 #ifndef NULL
12050 #define NULL (void*)0
12051 #endif
12052
12053 static void *task(p)
12054         void *p;
12055 {
12056         return (void *) (p == NULL);
12057 }
12058
12059 int main() {
12060
12061         /* pthread test function */
12062 #ifndef PTHREAD_CREATE_DETACHED
12063 #define PTHREAD_CREATE_DETACHED 1
12064 #endif
12065         pthread_t t;
12066         int status;
12067         int detach = PTHREAD_CREATE_DETACHED;
12068
12069 #if HAVE_PTHREADS > 4
12070         /* Final pthreads */
12071         pthread_attr_t attr;
12072
12073         status = pthread_attr_init(&attr);
12074         if( status ) return status;
12075
12076 #if HAVE_PTHREADS < 7
12077         status = pthread_attr_setdetachstate(&attr, &detach);
12078         if( status < 0 ) status = errno;
12079 #else
12080         status = pthread_attr_setdetachstate(&attr, detach);
12081 #endif
12082         if( status ) return status;
12083         status = pthread_create( &t, &attr, task, NULL );
12084 #if HAVE_PTHREADS < 7
12085         if( status < 0 ) status = errno;
12086 #endif
12087         if( status ) return status;
12088 #else
12089         /* Draft 4 pthreads */
12090         status = pthread_create( &t, pthread_attr_default, task, NULL );
12091         if( status ) return errno;
12092
12093         /* give thread a chance to complete */
12094         /* it should remain joinable and hence detachable */
12095         sleep( 1 );
12096
12097         status = pthread_detach( &t );
12098         if( status ) return errno;
12099 #endif
12100
12101 #ifdef HAVE_LINUX_THREADS
12102         pthread_kill_other_threads_np();
12103 #endif
12104
12105         return 0;
12106
12107 ; return 0; }
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12110   rm -rf conftest*
12111   ol_cv_pthread_create=yes
12112 else
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -rf conftest*
12116   ol_cv_pthread_create=no
12117 fi
12118 rm -f conftest*
12119 else
12120   cat > conftest.$ac_ext <<EOF
12121 #line 12122 "configure"
12122 #include "confdefs.h"
12123 /* pthread test headers */
12124 #include <pthread.h>
12125 #if HAVE_PTHREADS < 7
12126 #include <errno.h>
12127 #endif
12128 #ifndef NULL
12129 #define NULL (void*)0
12130 #endif
12131
12132 static void *task(p)
12133         void *p;
12134 {
12135         return (void *) (p == NULL);
12136 }
12137
12138
12139 int main(argc, argv)
12140         int argc;
12141         char **argv;
12142 {
12143
12144         /* pthread test function */
12145 #ifndef PTHREAD_CREATE_DETACHED
12146 #define PTHREAD_CREATE_DETACHED 1
12147 #endif
12148         pthread_t t;
12149         int status;
12150         int detach = PTHREAD_CREATE_DETACHED;
12151
12152 #if HAVE_PTHREADS > 4
12153         /* Final pthreads */
12154         pthread_attr_t attr;
12155
12156         status = pthread_attr_init(&attr);
12157         if( status ) return status;
12158
12159 #if HAVE_PTHREADS < 7
12160         status = pthread_attr_setdetachstate(&attr, &detach);
12161         if( status < 0 ) status = errno;
12162 #else
12163         status = pthread_attr_setdetachstate(&attr, detach);
12164 #endif
12165         if( status ) return status;
12166         status = pthread_create( &t, &attr, task, NULL );
12167 #if HAVE_PTHREADS < 7
12168         if( status < 0 ) status = errno;
12169 #endif
12170         if( status ) return status;
12171 #else
12172         /* Draft 4 pthreads */
12173         status = pthread_create( &t, pthread_attr_default, task, NULL );
12174         if( status ) return errno;
12175
12176         /* give thread a chance to complete */
12177         /* it should remain joinable and hence detachable */
12178         sleep( 1 );
12179
12180         status = pthread_detach( &t );
12181         if( status ) return errno;
12182 #endif
12183
12184 #ifdef HAVE_LINUX_THREADS
12185         pthread_kill_other_threads_np();
12186 #endif
12187
12188         return 0;
12189
12190 }
12191
12192 EOF
12193 if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12194 then
12195   ol_cv_pthread_create=yes
12196 else
12197   echo "configure: failed program was:" >&5
12198   cat conftest.$ac_ext >&5
12199   rm -fr conftest*
12200   ol_cv_pthread_create=no
12201 fi
12202 rm -fr conftest*
12203 fi
12204
12205 fi
12206
12207 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12208
12209                 if test $ol_cv_pthread_create != no ; then
12210                         ol_link_threads=posix
12211                         ol_link_pthreads=""
12212                 fi
12213                 
12214                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12215 if test "$ol_link_threads" = no ; then
12216         # try -kthread
12217         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12218 echo "configure:12219: checking for pthread link with -kthread" >&5
12219 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12220   echo $ac_n "(cached) $ac_c" 1>&6
12221 else
12222   
12223                 # save the flags
12224                 ol_LIBS="$LIBS"
12225                 LIBS="-kthread $LIBS"
12226
12227                 if test "$cross_compiling" = yes; then
12228   cat > conftest.$ac_ext <<EOF
12229 #line 12230 "configure"
12230 #include "confdefs.h"
12231 /* pthread test headers */
12232 #include <pthread.h>
12233 #if HAVE_PTHREADS < 7
12234 #include <errno.h>
12235 #endif
12236 #ifndef NULL
12237 #define NULL (void*)0
12238 #endif
12239
12240 static void *task(p)
12241         void *p;
12242 {
12243         return (void *) (p == NULL);
12244 }
12245
12246 int main() {
12247
12248         /* pthread test function */
12249 #ifndef PTHREAD_CREATE_DETACHED
12250 #define PTHREAD_CREATE_DETACHED 1
12251 #endif
12252         pthread_t t;
12253         int status;
12254         int detach = PTHREAD_CREATE_DETACHED;
12255
12256 #if HAVE_PTHREADS > 4
12257         /* Final pthreads */
12258         pthread_attr_t attr;
12259
12260         status = pthread_attr_init(&attr);
12261         if( status ) return status;
12262
12263 #if HAVE_PTHREADS < 7
12264         status = pthread_attr_setdetachstate(&attr, &detach);
12265         if( status < 0 ) status = errno;
12266 #else
12267         status = pthread_attr_setdetachstate(&attr, detach);
12268 #endif
12269         if( status ) return status;
12270         status = pthread_create( &t, &attr, task, NULL );
12271 #if HAVE_PTHREADS < 7
12272         if( status < 0 ) status = errno;
12273 #endif
12274         if( status ) return status;
12275 #else
12276         /* Draft 4 pthreads */
12277         status = pthread_create( &t, pthread_attr_default, task, NULL );
12278         if( status ) return errno;
12279
12280         /* give thread a chance to complete */
12281         /* it should remain joinable and hence detachable */
12282         sleep( 1 );
12283
12284         status = pthread_detach( &t );
12285         if( status ) return errno;
12286 #endif
12287
12288 #ifdef HAVE_LINUX_THREADS
12289         pthread_kill_other_threads_np();
12290 #endif
12291
12292         return 0;
12293
12294 ; return 0; }
12295 EOF
12296 if { (eval echo configure:12297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12297   rm -rf conftest*
12298   ol_cv_pthread_kthread=yes
12299 else
12300   echo "configure: failed program was:" >&5
12301   cat conftest.$ac_ext >&5
12302   rm -rf conftest*
12303   ol_cv_pthread_kthread=no
12304 fi
12305 rm -f conftest*
12306 else
12307   cat > conftest.$ac_ext <<EOF
12308 #line 12309 "configure"
12309 #include "confdefs.h"
12310 /* pthread test headers */
12311 #include <pthread.h>
12312 #if HAVE_PTHREADS < 7
12313 #include <errno.h>
12314 #endif
12315 #ifndef NULL
12316 #define NULL (void*)0
12317 #endif
12318
12319 static void *task(p)
12320         void *p;
12321 {
12322         return (void *) (p == NULL);
12323 }
12324
12325
12326 int main(argc, argv)
12327         int argc;
12328         char **argv;
12329 {
12330
12331         /* pthread test function */
12332 #ifndef PTHREAD_CREATE_DETACHED
12333 #define PTHREAD_CREATE_DETACHED 1
12334 #endif
12335         pthread_t t;
12336         int status;
12337         int detach = PTHREAD_CREATE_DETACHED;
12338
12339 #if HAVE_PTHREADS > 4
12340         /* Final pthreads */
12341         pthread_attr_t attr;
12342
12343         status = pthread_attr_init(&attr);
12344         if( status ) return status;
12345
12346 #if HAVE_PTHREADS < 7
12347         status = pthread_attr_setdetachstate(&attr, &detach);
12348         if( status < 0 ) status = errno;
12349 #else
12350         status = pthread_attr_setdetachstate(&attr, detach);
12351 #endif
12352         if( status ) return status;
12353         status = pthread_create( &t, &attr, task, NULL );
12354 #if HAVE_PTHREADS < 7
12355         if( status < 0 ) status = errno;
12356 #endif
12357         if( status ) return status;
12358 #else
12359         /* Draft 4 pthreads */
12360         status = pthread_create( &t, pthread_attr_default, task, NULL );
12361         if( status ) return errno;
12362
12363         /* give thread a chance to complete */
12364         /* it should remain joinable and hence detachable */
12365         sleep( 1 );
12366
12367         status = pthread_detach( &t );
12368         if( status ) return errno;
12369 #endif
12370
12371 #ifdef HAVE_LINUX_THREADS
12372         pthread_kill_other_threads_np();
12373 #endif
12374
12375         return 0;
12376
12377 }
12378
12379 EOF
12380 if { (eval echo configure:12381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12381 then
12382   ol_cv_pthread_kthread=yes
12383 else
12384   echo "configure: failed program was:" >&5
12385   cat conftest.$ac_ext >&5
12386   rm -fr conftest*
12387   ol_cv_pthread_kthread=no
12388 fi
12389 rm -fr conftest*
12390 fi
12391
12392
12393                 # restore the LIBS
12394                 LIBS="$ol_LIBS"
12395         
12396 fi
12397
12398 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12399
12400         if test $ol_cv_pthread_kthread = yes ; then
12401                 ol_link_pthreads="-kthread"
12402                 ol_link_threads=posix
12403         fi
12404 fi
12405
12406                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12407 if test "$ol_link_threads" = no ; then
12408         # try -pthread
12409         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12410 echo "configure:12411: checking for pthread link with -pthread" >&5
12411 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12412   echo $ac_n "(cached) $ac_c" 1>&6
12413 else
12414   
12415                 # save the flags
12416                 ol_LIBS="$LIBS"
12417                 LIBS="-pthread $LIBS"
12418
12419                 if test "$cross_compiling" = yes; then
12420   cat > conftest.$ac_ext <<EOF
12421 #line 12422 "configure"
12422 #include "confdefs.h"
12423 /* pthread test headers */
12424 #include <pthread.h>
12425 #if HAVE_PTHREADS < 7
12426 #include <errno.h>
12427 #endif
12428 #ifndef NULL
12429 #define NULL (void*)0
12430 #endif
12431
12432 static void *task(p)
12433         void *p;
12434 {
12435         return (void *) (p == NULL);
12436 }
12437
12438 int main() {
12439
12440         /* pthread test function */
12441 #ifndef PTHREAD_CREATE_DETACHED
12442 #define PTHREAD_CREATE_DETACHED 1
12443 #endif
12444         pthread_t t;
12445         int status;
12446         int detach = PTHREAD_CREATE_DETACHED;
12447
12448 #if HAVE_PTHREADS > 4
12449         /* Final pthreads */
12450         pthread_attr_t attr;
12451
12452         status = pthread_attr_init(&attr);
12453         if( status ) return status;
12454
12455 #if HAVE_PTHREADS < 7
12456         status = pthread_attr_setdetachstate(&attr, &detach);
12457         if( status < 0 ) status = errno;
12458 #else
12459         status = pthread_attr_setdetachstate(&attr, detach);
12460 #endif
12461         if( status ) return status;
12462         status = pthread_create( &t, &attr, task, NULL );
12463 #if HAVE_PTHREADS < 7
12464         if( status < 0 ) status = errno;
12465 #endif
12466         if( status ) return status;
12467 #else
12468         /* Draft 4 pthreads */
12469         status = pthread_create( &t, pthread_attr_default, task, NULL );
12470         if( status ) return errno;
12471
12472         /* give thread a chance to complete */
12473         /* it should remain joinable and hence detachable */
12474         sleep( 1 );
12475
12476         status = pthread_detach( &t );
12477         if( status ) return errno;
12478 #endif
12479
12480 #ifdef HAVE_LINUX_THREADS
12481         pthread_kill_other_threads_np();
12482 #endif
12483
12484         return 0;
12485
12486 ; return 0; }
12487 EOF
12488 if { (eval echo configure:12489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12489   rm -rf conftest*
12490   ol_cv_pthread_pthread=yes
12491 else
12492   echo "configure: failed program was:" >&5
12493   cat conftest.$ac_ext >&5
12494   rm -rf conftest*
12495   ol_cv_pthread_pthread=no
12496 fi
12497 rm -f conftest*
12498 else
12499   cat > conftest.$ac_ext <<EOF
12500 #line 12501 "configure"
12501 #include "confdefs.h"
12502 /* pthread test headers */
12503 #include <pthread.h>
12504 #if HAVE_PTHREADS < 7
12505 #include <errno.h>
12506 #endif
12507 #ifndef NULL
12508 #define NULL (void*)0
12509 #endif
12510
12511 static void *task(p)
12512         void *p;
12513 {
12514         return (void *) (p == NULL);
12515 }
12516
12517
12518 int main(argc, argv)
12519         int argc;
12520         char **argv;
12521 {
12522
12523         /* pthread test function */
12524 #ifndef PTHREAD_CREATE_DETACHED
12525 #define PTHREAD_CREATE_DETACHED 1
12526 #endif
12527         pthread_t t;
12528         int status;
12529         int detach = PTHREAD_CREATE_DETACHED;
12530
12531 #if HAVE_PTHREADS > 4
12532         /* Final pthreads */
12533         pthread_attr_t attr;
12534
12535         status = pthread_attr_init(&attr);
12536         if( status ) return status;
12537
12538 #if HAVE_PTHREADS < 7
12539         status = pthread_attr_setdetachstate(&attr, &detach);
12540         if( status < 0 ) status = errno;
12541 #else
12542         status = pthread_attr_setdetachstate(&attr, detach);
12543 #endif
12544         if( status ) return status;
12545         status = pthread_create( &t, &attr, task, NULL );
12546 #if HAVE_PTHREADS < 7
12547         if( status < 0 ) status = errno;
12548 #endif
12549         if( status ) return status;
12550 #else
12551         /* Draft 4 pthreads */
12552         status = pthread_create( &t, pthread_attr_default, task, NULL );
12553         if( status ) return errno;
12554
12555         /* give thread a chance to complete */
12556         /* it should remain joinable and hence detachable */
12557         sleep( 1 );
12558
12559         status = pthread_detach( &t );
12560         if( status ) return errno;
12561 #endif
12562
12563 #ifdef HAVE_LINUX_THREADS
12564         pthread_kill_other_threads_np();
12565 #endif
12566
12567         return 0;
12568
12569 }
12570
12571 EOF
12572 if { (eval echo configure:12573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12573 then
12574   ol_cv_pthread_pthread=yes
12575 else
12576   echo "configure: failed program was:" >&5
12577   cat conftest.$ac_ext >&5
12578   rm -fr conftest*
12579   ol_cv_pthread_pthread=no
12580 fi
12581 rm -fr conftest*
12582 fi
12583
12584
12585                 # restore the LIBS
12586                 LIBS="$ol_LIBS"
12587         
12588 fi
12589
12590 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12591
12592         if test $ol_cv_pthread_pthread = yes ; then
12593                 ol_link_pthreads="-pthread"
12594                 ol_link_threads=posix
12595         fi
12596 fi
12597
12598                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12599 if test "$ol_link_threads" = no ; then
12600         # try -pthreads
12601         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12602 echo "configure:12603: checking for pthread link with -pthreads" >&5
12603 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12604   echo $ac_n "(cached) $ac_c" 1>&6
12605 else
12606   
12607                 # save the flags
12608                 ol_LIBS="$LIBS"
12609                 LIBS="-pthreads $LIBS"
12610
12611                 if test "$cross_compiling" = yes; then
12612   cat > conftest.$ac_ext <<EOF
12613 #line 12614 "configure"
12614 #include "confdefs.h"
12615 /* pthread test headers */
12616 #include <pthread.h>
12617 #if HAVE_PTHREADS < 7
12618 #include <errno.h>
12619 #endif
12620 #ifndef NULL
12621 #define NULL (void*)0
12622 #endif
12623
12624 static void *task(p)
12625         void *p;
12626 {
12627         return (void *) (p == NULL);
12628 }
12629
12630 int main() {
12631
12632         /* pthread test function */
12633 #ifndef PTHREAD_CREATE_DETACHED
12634 #define PTHREAD_CREATE_DETACHED 1
12635 #endif
12636         pthread_t t;
12637         int status;
12638         int detach = PTHREAD_CREATE_DETACHED;
12639
12640 #if HAVE_PTHREADS > 4
12641         /* Final pthreads */
12642         pthread_attr_t attr;
12643
12644         status = pthread_attr_init(&attr);
12645         if( status ) return status;
12646
12647 #if HAVE_PTHREADS < 7
12648         status = pthread_attr_setdetachstate(&attr, &detach);
12649         if( status < 0 ) status = errno;
12650 #else
12651         status = pthread_attr_setdetachstate(&attr, detach);
12652 #endif
12653         if( status ) return status;
12654         status = pthread_create( &t, &attr, task, NULL );
12655 #if HAVE_PTHREADS < 7
12656         if( status < 0 ) status = errno;
12657 #endif
12658         if( status ) return status;
12659 #else
12660         /* Draft 4 pthreads */
12661         status = pthread_create( &t, pthread_attr_default, task, NULL );
12662         if( status ) return errno;
12663
12664         /* give thread a chance to complete */
12665         /* it should remain joinable and hence detachable */
12666         sleep( 1 );
12667
12668         status = pthread_detach( &t );
12669         if( status ) return errno;
12670 #endif
12671
12672 #ifdef HAVE_LINUX_THREADS
12673         pthread_kill_other_threads_np();
12674 #endif
12675
12676         return 0;
12677
12678 ; return 0; }
12679 EOF
12680 if { (eval echo configure:12681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12681   rm -rf conftest*
12682   ol_cv_pthread_pthreads=yes
12683 else
12684   echo "configure: failed program was:" >&5
12685   cat conftest.$ac_ext >&5
12686   rm -rf conftest*
12687   ol_cv_pthread_pthreads=no
12688 fi
12689 rm -f conftest*
12690 else
12691   cat > conftest.$ac_ext <<EOF
12692 #line 12693 "configure"
12693 #include "confdefs.h"
12694 /* pthread test headers */
12695 #include <pthread.h>
12696 #if HAVE_PTHREADS < 7
12697 #include <errno.h>
12698 #endif
12699 #ifndef NULL
12700 #define NULL (void*)0
12701 #endif
12702
12703 static void *task(p)
12704         void *p;
12705 {
12706         return (void *) (p == NULL);
12707 }
12708
12709
12710 int main(argc, argv)
12711         int argc;
12712         char **argv;
12713 {
12714
12715         /* pthread test function */
12716 #ifndef PTHREAD_CREATE_DETACHED
12717 #define PTHREAD_CREATE_DETACHED 1
12718 #endif
12719         pthread_t t;
12720         int status;
12721         int detach = PTHREAD_CREATE_DETACHED;
12722
12723 #if HAVE_PTHREADS > 4
12724         /* Final pthreads */
12725         pthread_attr_t attr;
12726
12727         status = pthread_attr_init(&attr);
12728         if( status ) return status;
12729
12730 #if HAVE_PTHREADS < 7
12731         status = pthread_attr_setdetachstate(&attr, &detach);
12732         if( status < 0 ) status = errno;
12733 #else
12734         status = pthread_attr_setdetachstate(&attr, detach);
12735 #endif
12736         if( status ) return status;
12737         status = pthread_create( &t, &attr, task, NULL );
12738 #if HAVE_PTHREADS < 7
12739         if( status < 0 ) status = errno;
12740 #endif
12741         if( status ) return status;
12742 #else
12743         /* Draft 4 pthreads */
12744         status = pthread_create( &t, pthread_attr_default, task, NULL );
12745         if( status ) return errno;
12746
12747         /* give thread a chance to complete */
12748         /* it should remain joinable and hence detachable */
12749         sleep( 1 );
12750
12751         status = pthread_detach( &t );
12752         if( status ) return errno;
12753 #endif
12754
12755 #ifdef HAVE_LINUX_THREADS
12756         pthread_kill_other_threads_np();
12757 #endif
12758
12759         return 0;
12760
12761 }
12762
12763 EOF
12764 if { (eval echo configure:12765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12765 then
12766   ol_cv_pthread_pthreads=yes
12767 else
12768   echo "configure: failed program was:" >&5
12769   cat conftest.$ac_ext >&5
12770   rm -fr conftest*
12771   ol_cv_pthread_pthreads=no
12772 fi
12773 rm -fr conftest*
12774 fi
12775
12776
12777                 # restore the LIBS
12778                 LIBS="$ol_LIBS"
12779         
12780 fi
12781
12782 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12783
12784         if test $ol_cv_pthread_pthreads = yes ; then
12785                 ol_link_pthreads="-pthreads"
12786                 ol_link_threads=posix
12787         fi
12788 fi
12789
12790                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12791 if test "$ol_link_threads" = no ; then
12792         # try -mthreads
12793         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12794 echo "configure:12795: checking for pthread link with -mthreads" >&5
12795 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12796   echo $ac_n "(cached) $ac_c" 1>&6
12797 else
12798   
12799                 # save the flags
12800                 ol_LIBS="$LIBS"
12801                 LIBS="-mthreads $LIBS"
12802
12803                 if test "$cross_compiling" = yes; then
12804   cat > conftest.$ac_ext <<EOF
12805 #line 12806 "configure"
12806 #include "confdefs.h"
12807 /* pthread test headers */
12808 #include <pthread.h>
12809 #if HAVE_PTHREADS < 7
12810 #include <errno.h>
12811 #endif
12812 #ifndef NULL
12813 #define NULL (void*)0
12814 #endif
12815
12816 static void *task(p)
12817         void *p;
12818 {
12819         return (void *) (p == NULL);
12820 }
12821
12822 int main() {
12823
12824         /* pthread test function */
12825 #ifndef PTHREAD_CREATE_DETACHED
12826 #define PTHREAD_CREATE_DETACHED 1
12827 #endif
12828         pthread_t t;
12829         int status;
12830         int detach = PTHREAD_CREATE_DETACHED;
12831
12832 #if HAVE_PTHREADS > 4
12833         /* Final pthreads */
12834         pthread_attr_t attr;
12835
12836         status = pthread_attr_init(&attr);
12837         if( status ) return status;
12838
12839 #if HAVE_PTHREADS < 7
12840         status = pthread_attr_setdetachstate(&attr, &detach);
12841         if( status < 0 ) status = errno;
12842 #else
12843         status = pthread_attr_setdetachstate(&attr, detach);
12844 #endif
12845         if( status ) return status;
12846         status = pthread_create( &t, &attr, task, NULL );
12847 #if HAVE_PTHREADS < 7
12848         if( status < 0 ) status = errno;
12849 #endif
12850         if( status ) return status;
12851 #else
12852         /* Draft 4 pthreads */
12853         status = pthread_create( &t, pthread_attr_default, task, NULL );
12854         if( status ) return errno;
12855
12856         /* give thread a chance to complete */
12857         /* it should remain joinable and hence detachable */
12858         sleep( 1 );
12859
12860         status = pthread_detach( &t );
12861         if( status ) return errno;
12862 #endif
12863
12864 #ifdef HAVE_LINUX_THREADS
12865         pthread_kill_other_threads_np();
12866 #endif
12867
12868         return 0;
12869
12870 ; return 0; }
12871 EOF
12872 if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12873   rm -rf conftest*
12874   ol_cv_pthread_mthreads=yes
12875 else
12876   echo "configure: failed program was:" >&5
12877   cat conftest.$ac_ext >&5
12878   rm -rf conftest*
12879   ol_cv_pthread_mthreads=no
12880 fi
12881 rm -f conftest*
12882 else
12883   cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886 /* pthread test headers */
12887 #include <pthread.h>
12888 #if HAVE_PTHREADS < 7
12889 #include <errno.h>
12890 #endif
12891 #ifndef NULL
12892 #define NULL (void*)0
12893 #endif
12894
12895 static void *task(p)
12896         void *p;
12897 {
12898         return (void *) (p == NULL);
12899 }
12900
12901
12902 int main(argc, argv)
12903         int argc;
12904         char **argv;
12905 {
12906
12907         /* pthread test function */
12908 #ifndef PTHREAD_CREATE_DETACHED
12909 #define PTHREAD_CREATE_DETACHED 1
12910 #endif
12911         pthread_t t;
12912         int status;
12913         int detach = PTHREAD_CREATE_DETACHED;
12914
12915 #if HAVE_PTHREADS > 4
12916         /* Final pthreads */
12917         pthread_attr_t attr;
12918
12919         status = pthread_attr_init(&attr);
12920         if( status ) return status;
12921
12922 #if HAVE_PTHREADS < 7
12923         status = pthread_attr_setdetachstate(&attr, &detach);
12924         if( status < 0 ) status = errno;
12925 #else
12926         status = pthread_attr_setdetachstate(&attr, detach);
12927 #endif
12928         if( status ) return status;
12929         status = pthread_create( &t, &attr, task, NULL );
12930 #if HAVE_PTHREADS < 7
12931         if( status < 0 ) status = errno;
12932 #endif
12933         if( status ) return status;
12934 #else
12935         /* Draft 4 pthreads */
12936         status = pthread_create( &t, pthread_attr_default, task, NULL );
12937         if( status ) return errno;
12938
12939         /* give thread a chance to complete */
12940         /* it should remain joinable and hence detachable */
12941         sleep( 1 );
12942
12943         status = pthread_detach( &t );
12944         if( status ) return errno;
12945 #endif
12946
12947 #ifdef HAVE_LINUX_THREADS
12948         pthread_kill_other_threads_np();
12949 #endif
12950
12951         return 0;
12952
12953 }
12954
12955 EOF
12956 if { (eval echo configure:12957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
12957 then
12958   ol_cv_pthread_mthreads=yes
12959 else
12960   echo "configure: failed program was:" >&5
12961   cat conftest.$ac_ext >&5
12962   rm -fr conftest*
12963   ol_cv_pthread_mthreads=no
12964 fi
12965 rm -fr conftest*
12966 fi
12967
12968
12969                 # restore the LIBS
12970                 LIBS="$ol_LIBS"
12971         
12972 fi
12973
12974 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12975
12976         if test $ol_cv_pthread_mthreads = yes ; then
12977                 ol_link_pthreads="-mthreads"
12978                 ol_link_threads=posix
12979         fi
12980 fi
12981
12982                 # Pthread try link: -thread (ol_cv_pthread_thread)
12983 if test "$ol_link_threads" = no ; then
12984         # try -thread
12985         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12986 echo "configure:12987: checking for pthread link with -thread" >&5
12987 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12988   echo $ac_n "(cached) $ac_c" 1>&6
12989 else
12990   
12991                 # save the flags
12992                 ol_LIBS="$LIBS"
12993                 LIBS="-thread $LIBS"
12994
12995                 if test "$cross_compiling" = yes; then
12996   cat > conftest.$ac_ext <<EOF
12997 #line 12998 "configure"
12998 #include "confdefs.h"
12999 /* pthread test headers */
13000 #include <pthread.h>
13001 #if HAVE_PTHREADS < 7
13002 #include <errno.h>
13003 #endif
13004 #ifndef NULL
13005 #define NULL (void*)0
13006 #endif
13007
13008 static void *task(p)
13009         void *p;
13010 {
13011         return (void *) (p == NULL);
13012 }
13013
13014 int main() {
13015
13016         /* pthread test function */
13017 #ifndef PTHREAD_CREATE_DETACHED
13018 #define PTHREAD_CREATE_DETACHED 1
13019 #endif
13020         pthread_t t;
13021         int status;
13022         int detach = PTHREAD_CREATE_DETACHED;
13023
13024 #if HAVE_PTHREADS > 4
13025         /* Final pthreads */
13026         pthread_attr_t attr;
13027
13028         status = pthread_attr_init(&attr);
13029         if( status ) return status;
13030
13031 #if HAVE_PTHREADS < 7
13032         status = pthread_attr_setdetachstate(&attr, &detach);
13033         if( status < 0 ) status = errno;
13034 #else
13035         status = pthread_attr_setdetachstate(&attr, detach);
13036 #endif
13037         if( status ) return status;
13038         status = pthread_create( &t, &attr, task, NULL );
13039 #if HAVE_PTHREADS < 7
13040         if( status < 0 ) status = errno;
13041 #endif
13042         if( status ) return status;
13043 #else
13044         /* Draft 4 pthreads */
13045         status = pthread_create( &t, pthread_attr_default, task, NULL );
13046         if( status ) return errno;
13047
13048         /* give thread a chance to complete */
13049         /* it should remain joinable and hence detachable */
13050         sleep( 1 );
13051
13052         status = pthread_detach( &t );
13053         if( status ) return errno;
13054 #endif
13055
13056 #ifdef HAVE_LINUX_THREADS
13057         pthread_kill_other_threads_np();
13058 #endif
13059
13060         return 0;
13061
13062 ; return 0; }
13063 EOF
13064 if { (eval echo configure:13065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13065   rm -rf conftest*
13066   ol_cv_pthread_thread=yes
13067 else
13068   echo "configure: failed program was:" >&5
13069   cat conftest.$ac_ext >&5
13070   rm -rf conftest*
13071   ol_cv_pthread_thread=no
13072 fi
13073 rm -f conftest*
13074 else
13075   cat > conftest.$ac_ext <<EOF
13076 #line 13077 "configure"
13077 #include "confdefs.h"
13078 /* pthread test headers */
13079 #include <pthread.h>
13080 #if HAVE_PTHREADS < 7
13081 #include <errno.h>
13082 #endif
13083 #ifndef NULL
13084 #define NULL (void*)0
13085 #endif
13086
13087 static void *task(p)
13088         void *p;
13089 {
13090         return (void *) (p == NULL);
13091 }
13092
13093
13094 int main(argc, argv)
13095         int argc;
13096         char **argv;
13097 {
13098
13099         /* pthread test function */
13100 #ifndef PTHREAD_CREATE_DETACHED
13101 #define PTHREAD_CREATE_DETACHED 1
13102 #endif
13103         pthread_t t;
13104         int status;
13105         int detach = PTHREAD_CREATE_DETACHED;
13106
13107 #if HAVE_PTHREADS > 4
13108         /* Final pthreads */
13109         pthread_attr_t attr;
13110
13111         status = pthread_attr_init(&attr);
13112         if( status ) return status;
13113
13114 #if HAVE_PTHREADS < 7
13115         status = pthread_attr_setdetachstate(&attr, &detach);
13116         if( status < 0 ) status = errno;
13117 #else
13118         status = pthread_attr_setdetachstate(&attr, detach);
13119 #endif
13120         if( status ) return status;
13121         status = pthread_create( &t, &attr, task, NULL );
13122 #if HAVE_PTHREADS < 7
13123         if( status < 0 ) status = errno;
13124 #endif
13125         if( status ) return status;
13126 #else
13127         /* Draft 4 pthreads */
13128         status = pthread_create( &t, pthread_attr_default, task, NULL );
13129         if( status ) return errno;
13130
13131         /* give thread a chance to complete */
13132         /* it should remain joinable and hence detachable */
13133         sleep( 1 );
13134
13135         status = pthread_detach( &t );
13136         if( status ) return errno;
13137 #endif
13138
13139 #ifdef HAVE_LINUX_THREADS
13140         pthread_kill_other_threads_np();
13141 #endif
13142
13143         return 0;
13144
13145 }
13146
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13149 then
13150   ol_cv_pthread_thread=yes
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -fr conftest*
13155   ol_cv_pthread_thread=no
13156 fi
13157 rm -fr conftest*
13158 fi
13159
13160
13161                 # restore the LIBS
13162                 LIBS="$ol_LIBS"
13163         
13164 fi
13165
13166 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13167
13168         if test $ol_cv_pthread_thread = yes ; then
13169                 ol_link_pthreads="-thread"
13170                 ol_link_threads=posix
13171         fi
13172 fi
13173
13174
13175                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13176 if test "$ol_link_threads" = no ; then
13177         # try -lpthread -lmach -lexc -lc_r
13178         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13179 echo "configure:13180: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13180 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13181   echo $ac_n "(cached) $ac_c" 1>&6
13182 else
13183   
13184                 # save the flags
13185                 ol_LIBS="$LIBS"
13186                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13187
13188                 if test "$cross_compiling" = yes; then
13189   cat > conftest.$ac_ext <<EOF
13190 #line 13191 "configure"
13191 #include "confdefs.h"
13192 /* pthread test headers */
13193 #include <pthread.h>
13194 #if HAVE_PTHREADS < 7
13195 #include <errno.h>
13196 #endif
13197 #ifndef NULL
13198 #define NULL (void*)0
13199 #endif
13200
13201 static void *task(p)
13202         void *p;
13203 {
13204         return (void *) (p == NULL);
13205 }
13206
13207 int main() {
13208
13209         /* pthread test function */
13210 #ifndef PTHREAD_CREATE_DETACHED
13211 #define PTHREAD_CREATE_DETACHED 1
13212 #endif
13213         pthread_t t;
13214         int status;
13215         int detach = PTHREAD_CREATE_DETACHED;
13216
13217 #if HAVE_PTHREADS > 4
13218         /* Final pthreads */
13219         pthread_attr_t attr;
13220
13221         status = pthread_attr_init(&attr);
13222         if( status ) return status;
13223
13224 #if HAVE_PTHREADS < 7
13225         status = pthread_attr_setdetachstate(&attr, &detach);
13226         if( status < 0 ) status = errno;
13227 #else
13228         status = pthread_attr_setdetachstate(&attr, detach);
13229 #endif
13230         if( status ) return status;
13231         status = pthread_create( &t, &attr, task, NULL );
13232 #if HAVE_PTHREADS < 7
13233         if( status < 0 ) status = errno;
13234 #endif
13235         if( status ) return status;
13236 #else
13237         /* Draft 4 pthreads */
13238         status = pthread_create( &t, pthread_attr_default, task, NULL );
13239         if( status ) return errno;
13240
13241         /* give thread a chance to complete */
13242         /* it should remain joinable and hence detachable */
13243         sleep( 1 );
13244
13245         status = pthread_detach( &t );
13246         if( status ) return errno;
13247 #endif
13248
13249 #ifdef HAVE_LINUX_THREADS
13250         pthread_kill_other_threads_np();
13251 #endif
13252
13253         return 0;
13254
13255 ; return 0; }
13256 EOF
13257 if { (eval echo configure:13258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13258   rm -rf conftest*
13259   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13260 else
13261   echo "configure: failed program was:" >&5
13262   cat conftest.$ac_ext >&5
13263   rm -rf conftest*
13264   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13265 fi
13266 rm -f conftest*
13267 else
13268   cat > conftest.$ac_ext <<EOF
13269 #line 13270 "configure"
13270 #include "confdefs.h"
13271 /* pthread test headers */
13272 #include <pthread.h>
13273 #if HAVE_PTHREADS < 7
13274 #include <errno.h>
13275 #endif
13276 #ifndef NULL
13277 #define NULL (void*)0
13278 #endif
13279
13280 static void *task(p)
13281         void *p;
13282 {
13283         return (void *) (p == NULL);
13284 }
13285
13286
13287 int main(argc, argv)
13288         int argc;
13289         char **argv;
13290 {
13291
13292         /* pthread test function */
13293 #ifndef PTHREAD_CREATE_DETACHED
13294 #define PTHREAD_CREATE_DETACHED 1
13295 #endif
13296         pthread_t t;
13297         int status;
13298         int detach = PTHREAD_CREATE_DETACHED;
13299
13300 #if HAVE_PTHREADS > 4
13301         /* Final pthreads */
13302         pthread_attr_t attr;
13303
13304         status = pthread_attr_init(&attr);
13305         if( status ) return status;
13306
13307 #if HAVE_PTHREADS < 7
13308         status = pthread_attr_setdetachstate(&attr, &detach);
13309         if( status < 0 ) status = errno;
13310 #else
13311         status = pthread_attr_setdetachstate(&attr, detach);
13312 #endif
13313         if( status ) return status;
13314         status = pthread_create( &t, &attr, task, NULL );
13315 #if HAVE_PTHREADS < 7
13316         if( status < 0 ) status = errno;
13317 #endif
13318         if( status ) return status;
13319 #else
13320         /* Draft 4 pthreads */
13321         status = pthread_create( &t, pthread_attr_default, task, NULL );
13322         if( status ) return errno;
13323
13324         /* give thread a chance to complete */
13325         /* it should remain joinable and hence detachable */
13326         sleep( 1 );
13327
13328         status = pthread_detach( &t );
13329         if( status ) return errno;
13330 #endif
13331
13332 #ifdef HAVE_LINUX_THREADS
13333         pthread_kill_other_threads_np();
13334 #endif
13335
13336         return 0;
13337
13338 }
13339
13340 EOF
13341 if { (eval echo configure:13342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13342 then
13343   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13344 else
13345   echo "configure: failed program was:" >&5
13346   cat conftest.$ac_ext >&5
13347   rm -fr conftest*
13348   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13349 fi
13350 rm -fr conftest*
13351 fi
13352
13353
13354                 # restore the LIBS
13355                 LIBS="$ol_LIBS"
13356         
13357 fi
13358
13359 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13360
13361         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13362                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13363                 ol_link_threads=posix
13364         fi
13365 fi
13366
13367                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13368 if test "$ol_link_threads" = no ; then
13369         # try -lpthread -lmach -lexc
13370         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13371 echo "configure:13372: checking for pthread link with -lpthread -lmach -lexc" >&5
13372 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13373   echo $ac_n "(cached) $ac_c" 1>&6
13374 else
13375   
13376                 # save the flags
13377                 ol_LIBS="$LIBS"
13378                 LIBS="-lpthread -lmach -lexc $LIBS"
13379
13380                 if test "$cross_compiling" = yes; then
13381   cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 /* pthread test headers */
13385 #include <pthread.h>
13386 #if HAVE_PTHREADS < 7
13387 #include <errno.h>
13388 #endif
13389 #ifndef NULL
13390 #define NULL (void*)0
13391 #endif
13392
13393 static void *task(p)
13394         void *p;
13395 {
13396         return (void *) (p == NULL);
13397 }
13398
13399 int main() {
13400
13401         /* pthread test function */
13402 #ifndef PTHREAD_CREATE_DETACHED
13403 #define PTHREAD_CREATE_DETACHED 1
13404 #endif
13405         pthread_t t;
13406         int status;
13407         int detach = PTHREAD_CREATE_DETACHED;
13408
13409 #if HAVE_PTHREADS > 4
13410         /* Final pthreads */
13411         pthread_attr_t attr;
13412
13413         status = pthread_attr_init(&attr);
13414         if( status ) return status;
13415
13416 #if HAVE_PTHREADS < 7
13417         status = pthread_attr_setdetachstate(&attr, &detach);
13418         if( status < 0 ) status = errno;
13419 #else
13420         status = pthread_attr_setdetachstate(&attr, detach);
13421 #endif
13422         if( status ) return status;
13423         status = pthread_create( &t, &attr, task, NULL );
13424 #if HAVE_PTHREADS < 7
13425         if( status < 0 ) status = errno;
13426 #endif
13427         if( status ) return status;
13428 #else
13429         /* Draft 4 pthreads */
13430         status = pthread_create( &t, pthread_attr_default, task, NULL );
13431         if( status ) return errno;
13432
13433         /* give thread a chance to complete */
13434         /* it should remain joinable and hence detachable */
13435         sleep( 1 );
13436
13437         status = pthread_detach( &t );
13438         if( status ) return errno;
13439 #endif
13440
13441 #ifdef HAVE_LINUX_THREADS
13442         pthread_kill_other_threads_np();
13443 #endif
13444
13445         return 0;
13446
13447 ; return 0; }
13448 EOF
13449 if { (eval echo configure:13450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13450   rm -rf conftest*
13451   ol_cv_pthread_lpthread_lmach_lexc=yes
13452 else
13453   echo "configure: failed program was:" >&5
13454   cat conftest.$ac_ext >&5
13455   rm -rf conftest*
13456   ol_cv_pthread_lpthread_lmach_lexc=no
13457 fi
13458 rm -f conftest*
13459 else
13460   cat > conftest.$ac_ext <<EOF
13461 #line 13462 "configure"
13462 #include "confdefs.h"
13463 /* pthread test headers */
13464 #include <pthread.h>
13465 #if HAVE_PTHREADS < 7
13466 #include <errno.h>
13467 #endif
13468 #ifndef NULL
13469 #define NULL (void*)0
13470 #endif
13471
13472 static void *task(p)
13473         void *p;
13474 {
13475         return (void *) (p == NULL);
13476 }
13477
13478
13479 int main(argc, argv)
13480         int argc;
13481         char **argv;
13482 {
13483
13484         /* pthread test function */
13485 #ifndef PTHREAD_CREATE_DETACHED
13486 #define PTHREAD_CREATE_DETACHED 1
13487 #endif
13488         pthread_t t;
13489         int status;
13490         int detach = PTHREAD_CREATE_DETACHED;
13491
13492 #if HAVE_PTHREADS > 4
13493         /* Final pthreads */
13494         pthread_attr_t attr;
13495
13496         status = pthread_attr_init(&attr);
13497         if( status ) return status;
13498
13499 #if HAVE_PTHREADS < 7
13500         status = pthread_attr_setdetachstate(&attr, &detach);
13501         if( status < 0 ) status = errno;
13502 #else
13503         status = pthread_attr_setdetachstate(&attr, detach);
13504 #endif
13505         if( status ) return status;
13506         status = pthread_create( &t, &attr, task, NULL );
13507 #if HAVE_PTHREADS < 7
13508         if( status < 0 ) status = errno;
13509 #endif
13510         if( status ) return status;
13511 #else
13512         /* Draft 4 pthreads */
13513         status = pthread_create( &t, pthread_attr_default, task, NULL );
13514         if( status ) return errno;
13515
13516         /* give thread a chance to complete */
13517         /* it should remain joinable and hence detachable */
13518         sleep( 1 );
13519
13520         status = pthread_detach( &t );
13521         if( status ) return errno;
13522 #endif
13523
13524 #ifdef HAVE_LINUX_THREADS
13525         pthread_kill_other_threads_np();
13526 #endif
13527
13528         return 0;
13529
13530 }
13531
13532 EOF
13533 if { (eval echo configure:13534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13534 then
13535   ol_cv_pthread_lpthread_lmach_lexc=yes
13536 else
13537   echo "configure: failed program was:" >&5
13538   cat conftest.$ac_ext >&5
13539   rm -fr conftest*
13540   ol_cv_pthread_lpthread_lmach_lexc=no
13541 fi
13542 rm -fr conftest*
13543 fi
13544
13545
13546                 # restore the LIBS
13547                 LIBS="$ol_LIBS"
13548         
13549 fi
13550
13551 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13552
13553         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13554                 ol_link_pthreads="-lpthread -lmach -lexc"
13555                 ol_link_threads=posix
13556         fi
13557 fi
13558
13559
13560                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13561 if test "$ol_link_threads" = no ; then
13562         # try -lpthread -Wl,-woff,85
13563         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13564 echo "configure:13565: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13565 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13566   echo $ac_n "(cached) $ac_c" 1>&6
13567 else
13568   
13569                 # save the flags
13570                 ol_LIBS="$LIBS"
13571                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13572
13573                 if test "$cross_compiling" = yes; then
13574   cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577 /* pthread test headers */
13578 #include <pthread.h>
13579 #if HAVE_PTHREADS < 7
13580 #include <errno.h>
13581 #endif
13582 #ifndef NULL
13583 #define NULL (void*)0
13584 #endif
13585
13586 static void *task(p)
13587         void *p;
13588 {
13589         return (void *) (p == NULL);
13590 }
13591
13592 int main() {
13593
13594         /* pthread test function */
13595 #ifndef PTHREAD_CREATE_DETACHED
13596 #define PTHREAD_CREATE_DETACHED 1
13597 #endif
13598         pthread_t t;
13599         int status;
13600         int detach = PTHREAD_CREATE_DETACHED;
13601
13602 #if HAVE_PTHREADS > 4
13603         /* Final pthreads */
13604         pthread_attr_t attr;
13605
13606         status = pthread_attr_init(&attr);
13607         if( status ) return status;
13608
13609 #if HAVE_PTHREADS < 7
13610         status = pthread_attr_setdetachstate(&attr, &detach);
13611         if( status < 0 ) status = errno;
13612 #else
13613         status = pthread_attr_setdetachstate(&attr, detach);
13614 #endif
13615         if( status ) return status;
13616         status = pthread_create( &t, &attr, task, NULL );
13617 #if HAVE_PTHREADS < 7
13618         if( status < 0 ) status = errno;
13619 #endif
13620         if( status ) return status;
13621 #else
13622         /* Draft 4 pthreads */
13623         status = pthread_create( &t, pthread_attr_default, task, NULL );
13624         if( status ) return errno;
13625
13626         /* give thread a chance to complete */
13627         /* it should remain joinable and hence detachable */
13628         sleep( 1 );
13629
13630         status = pthread_detach( &t );
13631         if( status ) return errno;
13632 #endif
13633
13634 #ifdef HAVE_LINUX_THREADS
13635         pthread_kill_other_threads_np();
13636 #endif
13637
13638         return 0;
13639
13640 ; return 0; }
13641 EOF
13642 if { (eval echo configure:13643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13643   rm -rf conftest*
13644   ol_cv_pthread_lib_lpthread_woff=yes
13645 else
13646   echo "configure: failed program was:" >&5
13647   cat conftest.$ac_ext >&5
13648   rm -rf conftest*
13649   ol_cv_pthread_lib_lpthread_woff=no
13650 fi
13651 rm -f conftest*
13652 else
13653   cat > conftest.$ac_ext <<EOF
13654 #line 13655 "configure"
13655 #include "confdefs.h"
13656 /* pthread test headers */
13657 #include <pthread.h>
13658 #if HAVE_PTHREADS < 7
13659 #include <errno.h>
13660 #endif
13661 #ifndef NULL
13662 #define NULL (void*)0
13663 #endif
13664
13665 static void *task(p)
13666         void *p;
13667 {
13668         return (void *) (p == NULL);
13669 }
13670
13671
13672 int main(argc, argv)
13673         int argc;
13674         char **argv;
13675 {
13676
13677         /* pthread test function */
13678 #ifndef PTHREAD_CREATE_DETACHED
13679 #define PTHREAD_CREATE_DETACHED 1
13680 #endif
13681         pthread_t t;
13682         int status;
13683         int detach = PTHREAD_CREATE_DETACHED;
13684
13685 #if HAVE_PTHREADS > 4
13686         /* Final pthreads */
13687         pthread_attr_t attr;
13688
13689         status = pthread_attr_init(&attr);
13690         if( status ) return status;
13691
13692 #if HAVE_PTHREADS < 7
13693         status = pthread_attr_setdetachstate(&attr, &detach);
13694         if( status < 0 ) status = errno;
13695 #else
13696         status = pthread_attr_setdetachstate(&attr, detach);
13697 #endif
13698         if( status ) return status;
13699         status = pthread_create( &t, &attr, task, NULL );
13700 #if HAVE_PTHREADS < 7
13701         if( status < 0 ) status = errno;
13702 #endif
13703         if( status ) return status;
13704 #else
13705         /* Draft 4 pthreads */
13706         status = pthread_create( &t, pthread_attr_default, task, NULL );
13707         if( status ) return errno;
13708
13709         /* give thread a chance to complete */
13710         /* it should remain joinable and hence detachable */
13711         sleep( 1 );
13712
13713         status = pthread_detach( &t );
13714         if( status ) return errno;
13715 #endif
13716
13717 #ifdef HAVE_LINUX_THREADS
13718         pthread_kill_other_threads_np();
13719 #endif
13720
13721         return 0;
13722
13723 }
13724
13725 EOF
13726 if { (eval echo configure:13727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13727 then
13728   ol_cv_pthread_lib_lpthread_woff=yes
13729 else
13730   echo "configure: failed program was:" >&5
13731   cat conftest.$ac_ext >&5
13732   rm -fr conftest*
13733   ol_cv_pthread_lib_lpthread_woff=no
13734 fi
13735 rm -fr conftest*
13736 fi
13737
13738
13739                 # restore the LIBS
13740                 LIBS="$ol_LIBS"
13741         
13742 fi
13743
13744 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13745
13746         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13747                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13748                 ol_link_threads=posix
13749         fi
13750 fi
13751
13752
13753                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13754 if test "$ol_link_threads" = no ; then
13755         # try -lpthread
13756         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13757 echo "configure:13758: checking for pthread link with -lpthread" >&5
13758 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13759   echo $ac_n "(cached) $ac_c" 1>&6
13760 else
13761   
13762                 # save the flags
13763                 ol_LIBS="$LIBS"
13764                 LIBS="-lpthread $LIBS"
13765
13766                 if test "$cross_compiling" = yes; then
13767   cat > conftest.$ac_ext <<EOF
13768 #line 13769 "configure"
13769 #include "confdefs.h"
13770 /* pthread test headers */
13771 #include <pthread.h>
13772 #if HAVE_PTHREADS < 7
13773 #include <errno.h>
13774 #endif
13775 #ifndef NULL
13776 #define NULL (void*)0
13777 #endif
13778
13779 static void *task(p)
13780         void *p;
13781 {
13782         return (void *) (p == NULL);
13783 }
13784
13785 int main() {
13786
13787         /* pthread test function */
13788 #ifndef PTHREAD_CREATE_DETACHED
13789 #define PTHREAD_CREATE_DETACHED 1
13790 #endif
13791         pthread_t t;
13792         int status;
13793         int detach = PTHREAD_CREATE_DETACHED;
13794
13795 #if HAVE_PTHREADS > 4
13796         /* Final pthreads */
13797         pthread_attr_t attr;
13798
13799         status = pthread_attr_init(&attr);
13800         if( status ) return status;
13801
13802 #if HAVE_PTHREADS < 7
13803         status = pthread_attr_setdetachstate(&attr, &detach);
13804         if( status < 0 ) status = errno;
13805 #else
13806         status = pthread_attr_setdetachstate(&attr, detach);
13807 #endif
13808         if( status ) return status;
13809         status = pthread_create( &t, &attr, task, NULL );
13810 #if HAVE_PTHREADS < 7
13811         if( status < 0 ) status = errno;
13812 #endif
13813         if( status ) return status;
13814 #else
13815         /* Draft 4 pthreads */
13816         status = pthread_create( &t, pthread_attr_default, task, NULL );
13817         if( status ) return errno;
13818
13819         /* give thread a chance to complete */
13820         /* it should remain joinable and hence detachable */
13821         sleep( 1 );
13822
13823         status = pthread_detach( &t );
13824         if( status ) return errno;
13825 #endif
13826
13827 #ifdef HAVE_LINUX_THREADS
13828         pthread_kill_other_threads_np();
13829 #endif
13830
13831         return 0;
13832
13833 ; return 0; }
13834 EOF
13835 if { (eval echo configure:13836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13836   rm -rf conftest*
13837   ol_cv_pthread_lpthread=yes
13838 else
13839   echo "configure: failed program was:" >&5
13840   cat conftest.$ac_ext >&5
13841   rm -rf conftest*
13842   ol_cv_pthread_lpthread=no
13843 fi
13844 rm -f conftest*
13845 else
13846   cat > conftest.$ac_ext <<EOF
13847 #line 13848 "configure"
13848 #include "confdefs.h"
13849 /* pthread test headers */
13850 #include <pthread.h>
13851 #if HAVE_PTHREADS < 7
13852 #include <errno.h>
13853 #endif
13854 #ifndef NULL
13855 #define NULL (void*)0
13856 #endif
13857
13858 static void *task(p)
13859         void *p;
13860 {
13861         return (void *) (p == NULL);
13862 }
13863
13864
13865 int main(argc, argv)
13866         int argc;
13867         char **argv;
13868 {
13869
13870         /* pthread test function */
13871 #ifndef PTHREAD_CREATE_DETACHED
13872 #define PTHREAD_CREATE_DETACHED 1
13873 #endif
13874         pthread_t t;
13875         int status;
13876         int detach = PTHREAD_CREATE_DETACHED;
13877
13878 #if HAVE_PTHREADS > 4
13879         /* Final pthreads */
13880         pthread_attr_t attr;
13881
13882         status = pthread_attr_init(&attr);
13883         if( status ) return status;
13884
13885 #if HAVE_PTHREADS < 7
13886         status = pthread_attr_setdetachstate(&attr, &detach);
13887         if( status < 0 ) status = errno;
13888 #else
13889         status = pthread_attr_setdetachstate(&attr, detach);
13890 #endif
13891         if( status ) return status;
13892         status = pthread_create( &t, &attr, task, NULL );
13893 #if HAVE_PTHREADS < 7
13894         if( status < 0 ) status = errno;
13895 #endif
13896         if( status ) return status;
13897 #else
13898         /* Draft 4 pthreads */
13899         status = pthread_create( &t, pthread_attr_default, task, NULL );
13900         if( status ) return errno;
13901
13902         /* give thread a chance to complete */
13903         /* it should remain joinable and hence detachable */
13904         sleep( 1 );
13905
13906         status = pthread_detach( &t );
13907         if( status ) return errno;
13908 #endif
13909
13910 #ifdef HAVE_LINUX_THREADS
13911         pthread_kill_other_threads_np();
13912 #endif
13913
13914         return 0;
13915
13916 }
13917
13918 EOF
13919 if { (eval echo configure:13920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
13920 then
13921   ol_cv_pthread_lpthread=yes
13922 else
13923   echo "configure: failed program was:" >&5
13924   cat conftest.$ac_ext >&5
13925   rm -fr conftest*
13926   ol_cv_pthread_lpthread=no
13927 fi
13928 rm -fr conftest*
13929 fi
13930
13931
13932                 # restore the LIBS
13933                 LIBS="$ol_LIBS"
13934         
13935 fi
13936
13937 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13938
13939         if test $ol_cv_pthread_lpthread = yes ; then
13940                 ol_link_pthreads="-lpthread"
13941                 ol_link_threads=posix
13942         fi
13943 fi
13944
13945                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13946 if test "$ol_link_threads" = no ; then
13947         # try -lc_r
13948         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13949 echo "configure:13950: checking for pthread link with -lc_r" >&5
13950 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13951   echo $ac_n "(cached) $ac_c" 1>&6
13952 else
13953   
13954                 # save the flags
13955                 ol_LIBS="$LIBS"
13956                 LIBS="-lc_r $LIBS"
13957
13958                 if test "$cross_compiling" = yes; then
13959   cat > conftest.$ac_ext <<EOF
13960 #line 13961 "configure"
13961 #include "confdefs.h"
13962 /* pthread test headers */
13963 #include <pthread.h>
13964 #if HAVE_PTHREADS < 7
13965 #include <errno.h>
13966 #endif
13967 #ifndef NULL
13968 #define NULL (void*)0
13969 #endif
13970
13971 static void *task(p)
13972         void *p;
13973 {
13974         return (void *) (p == NULL);
13975 }
13976
13977 int main() {
13978
13979         /* pthread test function */
13980 #ifndef PTHREAD_CREATE_DETACHED
13981 #define PTHREAD_CREATE_DETACHED 1
13982 #endif
13983         pthread_t t;
13984         int status;
13985         int detach = PTHREAD_CREATE_DETACHED;
13986
13987 #if HAVE_PTHREADS > 4
13988         /* Final pthreads */
13989         pthread_attr_t attr;
13990
13991         status = pthread_attr_init(&attr);
13992         if( status ) return status;
13993
13994 #if HAVE_PTHREADS < 7
13995         status = pthread_attr_setdetachstate(&attr, &detach);
13996         if( status < 0 ) status = errno;
13997 #else
13998         status = pthread_attr_setdetachstate(&attr, detach);
13999 #endif
14000         if( status ) return status;
14001         status = pthread_create( &t, &attr, task, NULL );
14002 #if HAVE_PTHREADS < 7
14003         if( status < 0 ) status = errno;
14004 #endif
14005         if( status ) return status;
14006 #else
14007         /* Draft 4 pthreads */
14008         status = pthread_create( &t, pthread_attr_default, task, NULL );
14009         if( status ) return errno;
14010
14011         /* give thread a chance to complete */
14012         /* it should remain joinable and hence detachable */
14013         sleep( 1 );
14014
14015         status = pthread_detach( &t );
14016         if( status ) return errno;
14017 #endif
14018
14019 #ifdef HAVE_LINUX_THREADS
14020         pthread_kill_other_threads_np();
14021 #endif
14022
14023         return 0;
14024
14025 ; return 0; }
14026 EOF
14027 if { (eval echo configure:14028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14028   rm -rf conftest*
14029   ol_cv_pthread_lc_r=yes
14030 else
14031   echo "configure: failed program was:" >&5
14032   cat conftest.$ac_ext >&5
14033   rm -rf conftest*
14034   ol_cv_pthread_lc_r=no
14035 fi
14036 rm -f conftest*
14037 else
14038   cat > conftest.$ac_ext <<EOF
14039 #line 14040 "configure"
14040 #include "confdefs.h"
14041 /* pthread test headers */
14042 #include <pthread.h>
14043 #if HAVE_PTHREADS < 7
14044 #include <errno.h>
14045 #endif
14046 #ifndef NULL
14047 #define NULL (void*)0
14048 #endif
14049
14050 static void *task(p)
14051         void *p;
14052 {
14053         return (void *) (p == NULL);
14054 }
14055
14056
14057 int main(argc, argv)
14058         int argc;
14059         char **argv;
14060 {
14061
14062         /* pthread test function */
14063 #ifndef PTHREAD_CREATE_DETACHED
14064 #define PTHREAD_CREATE_DETACHED 1
14065 #endif
14066         pthread_t t;
14067         int status;
14068         int detach = PTHREAD_CREATE_DETACHED;
14069
14070 #if HAVE_PTHREADS > 4
14071         /* Final pthreads */
14072         pthread_attr_t attr;
14073
14074         status = pthread_attr_init(&attr);
14075         if( status ) return status;
14076
14077 #if HAVE_PTHREADS < 7
14078         status = pthread_attr_setdetachstate(&attr, &detach);
14079         if( status < 0 ) status = errno;
14080 #else
14081         status = pthread_attr_setdetachstate(&attr, detach);
14082 #endif
14083         if( status ) return status;
14084         status = pthread_create( &t, &attr, task, NULL );
14085 #if HAVE_PTHREADS < 7
14086         if( status < 0 ) status = errno;
14087 #endif
14088         if( status ) return status;
14089 #else
14090         /* Draft 4 pthreads */
14091         status = pthread_create( &t, pthread_attr_default, task, NULL );
14092         if( status ) return errno;
14093
14094         /* give thread a chance to complete */
14095         /* it should remain joinable and hence detachable */
14096         sleep( 1 );
14097
14098         status = pthread_detach( &t );
14099         if( status ) return errno;
14100 #endif
14101
14102 #ifdef HAVE_LINUX_THREADS
14103         pthread_kill_other_threads_np();
14104 #endif
14105
14106         return 0;
14107
14108 }
14109
14110 EOF
14111 if { (eval echo configure:14112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14112 then
14113   ol_cv_pthread_lc_r=yes
14114 else
14115   echo "configure: failed program was:" >&5
14116   cat conftest.$ac_ext >&5
14117   rm -fr conftest*
14118   ol_cv_pthread_lc_r=no
14119 fi
14120 rm -fr conftest*
14121 fi
14122
14123
14124                 # restore the LIBS
14125                 LIBS="$ol_LIBS"
14126         
14127 fi
14128
14129 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14130
14131         if test $ol_cv_pthread_lc_r = yes ; then
14132                 ol_link_pthreads="-lc_r"
14133                 ol_link_threads=posix
14134         fi
14135 fi
14136
14137
14138                 # Pthread try link: -threads (ol_cv_pthread_threads)
14139 if test "$ol_link_threads" = no ; then
14140         # try -threads
14141         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14142 echo "configure:14143: checking for pthread link with -threads" >&5
14143 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14144   echo $ac_n "(cached) $ac_c" 1>&6
14145 else
14146   
14147                 # save the flags
14148                 ol_LIBS="$LIBS"
14149                 LIBS="-threads $LIBS"
14150
14151                 if test "$cross_compiling" = yes; then
14152   cat > conftest.$ac_ext <<EOF
14153 #line 14154 "configure"
14154 #include "confdefs.h"
14155 /* pthread test headers */
14156 #include <pthread.h>
14157 #if HAVE_PTHREADS < 7
14158 #include <errno.h>
14159 #endif
14160 #ifndef NULL
14161 #define NULL (void*)0
14162 #endif
14163
14164 static void *task(p)
14165         void *p;
14166 {
14167         return (void *) (p == NULL);
14168 }
14169
14170 int main() {
14171
14172         /* pthread test function */
14173 #ifndef PTHREAD_CREATE_DETACHED
14174 #define PTHREAD_CREATE_DETACHED 1
14175 #endif
14176         pthread_t t;
14177         int status;
14178         int detach = PTHREAD_CREATE_DETACHED;
14179
14180 #if HAVE_PTHREADS > 4
14181         /* Final pthreads */
14182         pthread_attr_t attr;
14183
14184         status = pthread_attr_init(&attr);
14185         if( status ) return status;
14186
14187 #if HAVE_PTHREADS < 7
14188         status = pthread_attr_setdetachstate(&attr, &detach);
14189         if( status < 0 ) status = errno;
14190 #else
14191         status = pthread_attr_setdetachstate(&attr, detach);
14192 #endif
14193         if( status ) return status;
14194         status = pthread_create( &t, &attr, task, NULL );
14195 #if HAVE_PTHREADS < 7
14196         if( status < 0 ) status = errno;
14197 #endif
14198         if( status ) return status;
14199 #else
14200         /* Draft 4 pthreads */
14201         status = pthread_create( &t, pthread_attr_default, task, NULL );
14202         if( status ) return errno;
14203
14204         /* give thread a chance to complete */
14205         /* it should remain joinable and hence detachable */
14206         sleep( 1 );
14207
14208         status = pthread_detach( &t );
14209         if( status ) return errno;
14210 #endif
14211
14212 #ifdef HAVE_LINUX_THREADS
14213         pthread_kill_other_threads_np();
14214 #endif
14215
14216         return 0;
14217
14218 ; return 0; }
14219 EOF
14220 if { (eval echo configure:14221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14221   rm -rf conftest*
14222   ol_cv_pthread_threads=yes
14223 else
14224   echo "configure: failed program was:" >&5
14225   cat conftest.$ac_ext >&5
14226   rm -rf conftest*
14227   ol_cv_pthread_threads=no
14228 fi
14229 rm -f conftest*
14230 else
14231   cat > conftest.$ac_ext <<EOF
14232 #line 14233 "configure"
14233 #include "confdefs.h"
14234 /* pthread test headers */
14235 #include <pthread.h>
14236 #if HAVE_PTHREADS < 7
14237 #include <errno.h>
14238 #endif
14239 #ifndef NULL
14240 #define NULL (void*)0
14241 #endif
14242
14243 static void *task(p)
14244         void *p;
14245 {
14246         return (void *) (p == NULL);
14247 }
14248
14249
14250 int main(argc, argv)
14251         int argc;
14252         char **argv;
14253 {
14254
14255         /* pthread test function */
14256 #ifndef PTHREAD_CREATE_DETACHED
14257 #define PTHREAD_CREATE_DETACHED 1
14258 #endif
14259         pthread_t t;
14260         int status;
14261         int detach = PTHREAD_CREATE_DETACHED;
14262
14263 #if HAVE_PTHREADS > 4
14264         /* Final pthreads */
14265         pthread_attr_t attr;
14266
14267         status = pthread_attr_init(&attr);
14268         if( status ) return status;
14269
14270 #if HAVE_PTHREADS < 7
14271         status = pthread_attr_setdetachstate(&attr, &detach);
14272         if( status < 0 ) status = errno;
14273 #else
14274         status = pthread_attr_setdetachstate(&attr, detach);
14275 #endif
14276         if( status ) return status;
14277         status = pthread_create( &t, &attr, task, NULL );
14278 #if HAVE_PTHREADS < 7
14279         if( status < 0 ) status = errno;
14280 #endif
14281         if( status ) return status;
14282 #else
14283         /* Draft 4 pthreads */
14284         status = pthread_create( &t, pthread_attr_default, task, NULL );
14285         if( status ) return errno;
14286
14287         /* give thread a chance to complete */
14288         /* it should remain joinable and hence detachable */
14289         sleep( 1 );
14290
14291         status = pthread_detach( &t );
14292         if( status ) return errno;
14293 #endif
14294
14295 #ifdef HAVE_LINUX_THREADS
14296         pthread_kill_other_threads_np();
14297 #endif
14298
14299         return 0;
14300
14301 }
14302
14303 EOF
14304 if { (eval echo configure:14305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14305 then
14306   ol_cv_pthread_threads=yes
14307 else
14308   echo "configure: failed program was:" >&5
14309   cat conftest.$ac_ext >&5
14310   rm -fr conftest*
14311   ol_cv_pthread_threads=no
14312 fi
14313 rm -fr conftest*
14314 fi
14315
14316
14317                 # restore the LIBS
14318                 LIBS="$ol_LIBS"
14319         
14320 fi
14321
14322 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14323
14324         if test $ol_cv_pthread_threads = yes ; then
14325                 ol_link_pthreads="-threads"
14326                 ol_link_threads=posix
14327         fi
14328 fi
14329
14330
14331                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14332 if test "$ol_link_threads" = no ; then
14333         # try -lpthreads -lmach -lexc -lc_r
14334         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14335 echo "configure:14336: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14336 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14337   echo $ac_n "(cached) $ac_c" 1>&6
14338 else
14339   
14340                 # save the flags
14341                 ol_LIBS="$LIBS"
14342                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14343
14344                 if test "$cross_compiling" = yes; then
14345   cat > conftest.$ac_ext <<EOF
14346 #line 14347 "configure"
14347 #include "confdefs.h"
14348 /* pthread test headers */
14349 #include <pthread.h>
14350 #if HAVE_PTHREADS < 7
14351 #include <errno.h>
14352 #endif
14353 #ifndef NULL
14354 #define NULL (void*)0
14355 #endif
14356
14357 static void *task(p)
14358         void *p;
14359 {
14360         return (void *) (p == NULL);
14361 }
14362
14363 int main() {
14364
14365         /* pthread test function */
14366 #ifndef PTHREAD_CREATE_DETACHED
14367 #define PTHREAD_CREATE_DETACHED 1
14368 #endif
14369         pthread_t t;
14370         int status;
14371         int detach = PTHREAD_CREATE_DETACHED;
14372
14373 #if HAVE_PTHREADS > 4
14374         /* Final pthreads */
14375         pthread_attr_t attr;
14376
14377         status = pthread_attr_init(&attr);
14378         if( status ) return status;
14379
14380 #if HAVE_PTHREADS < 7
14381         status = pthread_attr_setdetachstate(&attr, &detach);
14382         if( status < 0 ) status = errno;
14383 #else
14384         status = pthread_attr_setdetachstate(&attr, detach);
14385 #endif
14386         if( status ) return status;
14387         status = pthread_create( &t, &attr, task, NULL );
14388 #if HAVE_PTHREADS < 7
14389         if( status < 0 ) status = errno;
14390 #endif
14391         if( status ) return status;
14392 #else
14393         /* Draft 4 pthreads */
14394         status = pthread_create( &t, pthread_attr_default, task, NULL );
14395         if( status ) return errno;
14396
14397         /* give thread a chance to complete */
14398         /* it should remain joinable and hence detachable */
14399         sleep( 1 );
14400
14401         status = pthread_detach( &t );
14402         if( status ) return errno;
14403 #endif
14404
14405 #ifdef HAVE_LINUX_THREADS
14406         pthread_kill_other_threads_np();
14407 #endif
14408
14409         return 0;
14410
14411 ; return 0; }
14412 EOF
14413 if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14414   rm -rf conftest*
14415   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14416 else
14417   echo "configure: failed program was:" >&5
14418   cat conftest.$ac_ext >&5
14419   rm -rf conftest*
14420   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14421 fi
14422 rm -f conftest*
14423 else
14424   cat > conftest.$ac_ext <<EOF
14425 #line 14426 "configure"
14426 #include "confdefs.h"
14427 /* pthread test headers */
14428 #include <pthread.h>
14429 #if HAVE_PTHREADS < 7
14430 #include <errno.h>
14431 #endif
14432 #ifndef NULL
14433 #define NULL (void*)0
14434 #endif
14435
14436 static void *task(p)
14437         void *p;
14438 {
14439         return (void *) (p == NULL);
14440 }
14441
14442
14443 int main(argc, argv)
14444         int argc;
14445         char **argv;
14446 {
14447
14448         /* pthread test function */
14449 #ifndef PTHREAD_CREATE_DETACHED
14450 #define PTHREAD_CREATE_DETACHED 1
14451 #endif
14452         pthread_t t;
14453         int status;
14454         int detach = PTHREAD_CREATE_DETACHED;
14455
14456 #if HAVE_PTHREADS > 4
14457         /* Final pthreads */
14458         pthread_attr_t attr;
14459
14460         status = pthread_attr_init(&attr);
14461         if( status ) return status;
14462
14463 #if HAVE_PTHREADS < 7
14464         status = pthread_attr_setdetachstate(&attr, &detach);
14465         if( status < 0 ) status = errno;
14466 #else
14467         status = pthread_attr_setdetachstate(&attr, detach);
14468 #endif
14469         if( status ) return status;
14470         status = pthread_create( &t, &attr, task, NULL );
14471 #if HAVE_PTHREADS < 7
14472         if( status < 0 ) status = errno;
14473 #endif
14474         if( status ) return status;
14475 #else
14476         /* Draft 4 pthreads */
14477         status = pthread_create( &t, pthread_attr_default, task, NULL );
14478         if( status ) return errno;
14479
14480         /* give thread a chance to complete */
14481         /* it should remain joinable and hence detachable */
14482         sleep( 1 );
14483
14484         status = pthread_detach( &t );
14485         if( status ) return errno;
14486 #endif
14487
14488 #ifdef HAVE_LINUX_THREADS
14489         pthread_kill_other_threads_np();
14490 #endif
14491
14492         return 0;
14493
14494 }
14495
14496 EOF
14497 if { (eval echo configure:14498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14498 then
14499   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14500 else
14501   echo "configure: failed program was:" >&5
14502   cat conftest.$ac_ext >&5
14503   rm -fr conftest*
14504   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14505 fi
14506 rm -fr conftest*
14507 fi
14508
14509
14510                 # restore the LIBS
14511                 LIBS="$ol_LIBS"
14512         
14513 fi
14514
14515 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14516
14517         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14518                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14519                 ol_link_threads=posix
14520         fi
14521 fi
14522
14523                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14524 if test "$ol_link_threads" = no ; then
14525         # try -lpthreads -lmach -lexc
14526         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14527 echo "configure:14528: checking for pthread link with -lpthreads -lmach -lexc" >&5
14528 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14529   echo $ac_n "(cached) $ac_c" 1>&6
14530 else
14531   
14532                 # save the flags
14533                 ol_LIBS="$LIBS"
14534                 LIBS="-lpthreads -lmach -lexc $LIBS"
14535
14536                 if test "$cross_compiling" = yes; then
14537   cat > conftest.$ac_ext <<EOF
14538 #line 14539 "configure"
14539 #include "confdefs.h"
14540 /* pthread test headers */
14541 #include <pthread.h>
14542 #if HAVE_PTHREADS < 7
14543 #include <errno.h>
14544 #endif
14545 #ifndef NULL
14546 #define NULL (void*)0
14547 #endif
14548
14549 static void *task(p)
14550         void *p;
14551 {
14552         return (void *) (p == NULL);
14553 }
14554
14555 int main() {
14556
14557         /* pthread test function */
14558 #ifndef PTHREAD_CREATE_DETACHED
14559 #define PTHREAD_CREATE_DETACHED 1
14560 #endif
14561         pthread_t t;
14562         int status;
14563         int detach = PTHREAD_CREATE_DETACHED;
14564
14565 #if HAVE_PTHREADS > 4
14566         /* Final pthreads */
14567         pthread_attr_t attr;
14568
14569         status = pthread_attr_init(&attr);
14570         if( status ) return status;
14571
14572 #if HAVE_PTHREADS < 7
14573         status = pthread_attr_setdetachstate(&attr, &detach);
14574         if( status < 0 ) status = errno;
14575 #else
14576         status = pthread_attr_setdetachstate(&attr, detach);
14577 #endif
14578         if( status ) return status;
14579         status = pthread_create( &t, &attr, task, NULL );
14580 #if HAVE_PTHREADS < 7
14581         if( status < 0 ) status = errno;
14582 #endif
14583         if( status ) return status;
14584 #else
14585         /* Draft 4 pthreads */
14586         status = pthread_create( &t, pthread_attr_default, task, NULL );
14587         if( status ) return errno;
14588
14589         /* give thread a chance to complete */
14590         /* it should remain joinable and hence detachable */
14591         sleep( 1 );
14592
14593         status = pthread_detach( &t );
14594         if( status ) return errno;
14595 #endif
14596
14597 #ifdef HAVE_LINUX_THREADS
14598         pthread_kill_other_threads_np();
14599 #endif
14600
14601         return 0;
14602
14603 ; return 0; }
14604 EOF
14605 if { (eval echo configure:14606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14606   rm -rf conftest*
14607   ol_cv_pthread_lpthreads_lmach_lexc=yes
14608 else
14609   echo "configure: failed program was:" >&5
14610   cat conftest.$ac_ext >&5
14611   rm -rf conftest*
14612   ol_cv_pthread_lpthreads_lmach_lexc=no
14613 fi
14614 rm -f conftest*
14615 else
14616   cat > conftest.$ac_ext <<EOF
14617 #line 14618 "configure"
14618 #include "confdefs.h"
14619 /* pthread test headers */
14620 #include <pthread.h>
14621 #if HAVE_PTHREADS < 7
14622 #include <errno.h>
14623 #endif
14624 #ifndef NULL
14625 #define NULL (void*)0
14626 #endif
14627
14628 static void *task(p)
14629         void *p;
14630 {
14631         return (void *) (p == NULL);
14632 }
14633
14634
14635 int main(argc, argv)
14636         int argc;
14637         char **argv;
14638 {
14639
14640         /* pthread test function */
14641 #ifndef PTHREAD_CREATE_DETACHED
14642 #define PTHREAD_CREATE_DETACHED 1
14643 #endif
14644         pthread_t t;
14645         int status;
14646         int detach = PTHREAD_CREATE_DETACHED;
14647
14648 #if HAVE_PTHREADS > 4
14649         /* Final pthreads */
14650         pthread_attr_t attr;
14651
14652         status = pthread_attr_init(&attr);
14653         if( status ) return status;
14654
14655 #if HAVE_PTHREADS < 7
14656         status = pthread_attr_setdetachstate(&attr, &detach);
14657         if( status < 0 ) status = errno;
14658 #else
14659         status = pthread_attr_setdetachstate(&attr, detach);
14660 #endif
14661         if( status ) return status;
14662         status = pthread_create( &t, &attr, task, NULL );
14663 #if HAVE_PTHREADS < 7
14664         if( status < 0 ) status = errno;
14665 #endif
14666         if( status ) return status;
14667 #else
14668         /* Draft 4 pthreads */
14669         status = pthread_create( &t, pthread_attr_default, task, NULL );
14670         if( status ) return errno;
14671
14672         /* give thread a chance to complete */
14673         /* it should remain joinable and hence detachable */
14674         sleep( 1 );
14675
14676         status = pthread_detach( &t );
14677         if( status ) return errno;
14678 #endif
14679
14680 #ifdef HAVE_LINUX_THREADS
14681         pthread_kill_other_threads_np();
14682 #endif
14683
14684         return 0;
14685
14686 }
14687
14688 EOF
14689 if { (eval echo configure:14690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14690 then
14691   ol_cv_pthread_lpthreads_lmach_lexc=yes
14692 else
14693   echo "configure: failed program was:" >&5
14694   cat conftest.$ac_ext >&5
14695   rm -fr conftest*
14696   ol_cv_pthread_lpthreads_lmach_lexc=no
14697 fi
14698 rm -fr conftest*
14699 fi
14700
14701
14702                 # restore the LIBS
14703                 LIBS="$ol_LIBS"
14704         
14705 fi
14706
14707 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14708
14709         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14710                 ol_link_pthreads="-lpthreads -lmach -lexc"
14711                 ol_link_threads=posix
14712         fi
14713 fi
14714
14715                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14716 if test "$ol_link_threads" = no ; then
14717         # try -lpthreads -lexc
14718         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14719 echo "configure:14720: checking for pthread link with -lpthreads -lexc" >&5
14720 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14721   echo $ac_n "(cached) $ac_c" 1>&6
14722 else
14723   
14724                 # save the flags
14725                 ol_LIBS="$LIBS"
14726                 LIBS="-lpthreads -lexc $LIBS"
14727
14728                 if test "$cross_compiling" = yes; then
14729   cat > conftest.$ac_ext <<EOF
14730 #line 14731 "configure"
14731 #include "confdefs.h"
14732 /* pthread test headers */
14733 #include <pthread.h>
14734 #if HAVE_PTHREADS < 7
14735 #include <errno.h>
14736 #endif
14737 #ifndef NULL
14738 #define NULL (void*)0
14739 #endif
14740
14741 static void *task(p)
14742         void *p;
14743 {
14744         return (void *) (p == NULL);
14745 }
14746
14747 int main() {
14748
14749         /* pthread test function */
14750 #ifndef PTHREAD_CREATE_DETACHED
14751 #define PTHREAD_CREATE_DETACHED 1
14752 #endif
14753         pthread_t t;
14754         int status;
14755         int detach = PTHREAD_CREATE_DETACHED;
14756
14757 #if HAVE_PTHREADS > 4
14758         /* Final pthreads */
14759         pthread_attr_t attr;
14760
14761         status = pthread_attr_init(&attr);
14762         if( status ) return status;
14763
14764 #if HAVE_PTHREADS < 7
14765         status = pthread_attr_setdetachstate(&attr, &detach);
14766         if( status < 0 ) status = errno;
14767 #else
14768         status = pthread_attr_setdetachstate(&attr, detach);
14769 #endif
14770         if( status ) return status;
14771         status = pthread_create( &t, &attr, task, NULL );
14772 #if HAVE_PTHREADS < 7
14773         if( status < 0 ) status = errno;
14774 #endif
14775         if( status ) return status;
14776 #else
14777         /* Draft 4 pthreads */
14778         status = pthread_create( &t, pthread_attr_default, task, NULL );
14779         if( status ) return errno;
14780
14781         /* give thread a chance to complete */
14782         /* it should remain joinable and hence detachable */
14783         sleep( 1 );
14784
14785         status = pthread_detach( &t );
14786         if( status ) return errno;
14787 #endif
14788
14789 #ifdef HAVE_LINUX_THREADS
14790         pthread_kill_other_threads_np();
14791 #endif
14792
14793         return 0;
14794
14795 ; return 0; }
14796 EOF
14797 if { (eval echo configure:14798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14798   rm -rf conftest*
14799   ol_cv_pthread_lpthreads_lexc=yes
14800 else
14801   echo "configure: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   rm -rf conftest*
14804   ol_cv_pthread_lpthreads_lexc=no
14805 fi
14806 rm -f conftest*
14807 else
14808   cat > conftest.$ac_ext <<EOF
14809 #line 14810 "configure"
14810 #include "confdefs.h"
14811 /* pthread test headers */
14812 #include <pthread.h>
14813 #if HAVE_PTHREADS < 7
14814 #include <errno.h>
14815 #endif
14816 #ifndef NULL
14817 #define NULL (void*)0
14818 #endif
14819
14820 static void *task(p)
14821         void *p;
14822 {
14823         return (void *) (p == NULL);
14824 }
14825
14826
14827 int main(argc, argv)
14828         int argc;
14829         char **argv;
14830 {
14831
14832         /* pthread test function */
14833 #ifndef PTHREAD_CREATE_DETACHED
14834 #define PTHREAD_CREATE_DETACHED 1
14835 #endif
14836         pthread_t t;
14837         int status;
14838         int detach = PTHREAD_CREATE_DETACHED;
14839
14840 #if HAVE_PTHREADS > 4
14841         /* Final pthreads */
14842         pthread_attr_t attr;
14843
14844         status = pthread_attr_init(&attr);
14845         if( status ) return status;
14846
14847 #if HAVE_PTHREADS < 7
14848         status = pthread_attr_setdetachstate(&attr, &detach);
14849         if( status < 0 ) status = errno;
14850 #else
14851         status = pthread_attr_setdetachstate(&attr, detach);
14852 #endif
14853         if( status ) return status;
14854         status = pthread_create( &t, &attr, task, NULL );
14855 #if HAVE_PTHREADS < 7
14856         if( status < 0 ) status = errno;
14857 #endif
14858         if( status ) return status;
14859 #else
14860         /* Draft 4 pthreads */
14861         status = pthread_create( &t, pthread_attr_default, task, NULL );
14862         if( status ) return errno;
14863
14864         /* give thread a chance to complete */
14865         /* it should remain joinable and hence detachable */
14866         sleep( 1 );
14867
14868         status = pthread_detach( &t );
14869         if( status ) return errno;
14870 #endif
14871
14872 #ifdef HAVE_LINUX_THREADS
14873         pthread_kill_other_threads_np();
14874 #endif
14875
14876         return 0;
14877
14878 }
14879
14880 EOF
14881 if { (eval echo configure:14882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
14882 then
14883   ol_cv_pthread_lpthreads_lexc=yes
14884 else
14885   echo "configure: failed program was:" >&5
14886   cat conftest.$ac_ext >&5
14887   rm -fr conftest*
14888   ol_cv_pthread_lpthreads_lexc=no
14889 fi
14890 rm -fr conftest*
14891 fi
14892
14893
14894                 # restore the LIBS
14895                 LIBS="$ol_LIBS"
14896         
14897 fi
14898
14899 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14900
14901         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14902                 ol_link_pthreads="-lpthreads -lexc"
14903                 ol_link_threads=posix
14904         fi
14905 fi
14906
14907
14908                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14909 if test "$ol_link_threads" = no ; then
14910         # try -lpthreads
14911         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14912 echo "configure:14913: checking for pthread link with -lpthreads" >&5
14913 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14914   echo $ac_n "(cached) $ac_c" 1>&6
14915 else
14916   
14917                 # save the flags
14918                 ol_LIBS="$LIBS"
14919                 LIBS="-lpthreads $LIBS"
14920
14921                 if test "$cross_compiling" = yes; then
14922   cat > conftest.$ac_ext <<EOF
14923 #line 14924 "configure"
14924 #include "confdefs.h"
14925 /* pthread test headers */
14926 #include <pthread.h>
14927 #if HAVE_PTHREADS < 7
14928 #include <errno.h>
14929 #endif
14930 #ifndef NULL
14931 #define NULL (void*)0
14932 #endif
14933
14934 static void *task(p)
14935         void *p;
14936 {
14937         return (void *) (p == NULL);
14938 }
14939
14940 int main() {
14941
14942         /* pthread test function */
14943 #ifndef PTHREAD_CREATE_DETACHED
14944 #define PTHREAD_CREATE_DETACHED 1
14945 #endif
14946         pthread_t t;
14947         int status;
14948         int detach = PTHREAD_CREATE_DETACHED;
14949
14950 #if HAVE_PTHREADS > 4
14951         /* Final pthreads */
14952         pthread_attr_t attr;
14953
14954         status = pthread_attr_init(&attr);
14955         if( status ) return status;
14956
14957 #if HAVE_PTHREADS < 7
14958         status = pthread_attr_setdetachstate(&attr, &detach);
14959         if( status < 0 ) status = errno;
14960 #else
14961         status = pthread_attr_setdetachstate(&attr, detach);
14962 #endif
14963         if( status ) return status;
14964         status = pthread_create( &t, &attr, task, NULL );
14965 #if HAVE_PTHREADS < 7
14966         if( status < 0 ) status = errno;
14967 #endif
14968         if( status ) return status;
14969 #else
14970         /* Draft 4 pthreads */
14971         status = pthread_create( &t, pthread_attr_default, task, NULL );
14972         if( status ) return errno;
14973
14974         /* give thread a chance to complete */
14975         /* it should remain joinable and hence detachable */
14976         sleep( 1 );
14977
14978         status = pthread_detach( &t );
14979         if( status ) return errno;
14980 #endif
14981
14982 #ifdef HAVE_LINUX_THREADS
14983         pthread_kill_other_threads_np();
14984 #endif
14985
14986         return 0;
14987
14988 ; return 0; }
14989 EOF
14990 if { (eval echo configure:14991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14991   rm -rf conftest*
14992   ol_cv_pthread_lib_lpthreads=yes
14993 else
14994   echo "configure: failed program was:" >&5
14995   cat conftest.$ac_ext >&5
14996   rm -rf conftest*
14997   ol_cv_pthread_lib_lpthreads=no
14998 fi
14999 rm -f conftest*
15000 else
15001   cat > conftest.$ac_ext <<EOF
15002 #line 15003 "configure"
15003 #include "confdefs.h"
15004 /* pthread test headers */
15005 #include <pthread.h>
15006 #if HAVE_PTHREADS < 7
15007 #include <errno.h>
15008 #endif
15009 #ifndef NULL
15010 #define NULL (void*)0
15011 #endif
15012
15013 static void *task(p)
15014         void *p;
15015 {
15016         return (void *) (p == NULL);
15017 }
15018
15019
15020 int main(argc, argv)
15021         int argc;
15022         char **argv;
15023 {
15024
15025         /* pthread test function */
15026 #ifndef PTHREAD_CREATE_DETACHED
15027 #define PTHREAD_CREATE_DETACHED 1
15028 #endif
15029         pthread_t t;
15030         int status;
15031         int detach = PTHREAD_CREATE_DETACHED;
15032
15033 #if HAVE_PTHREADS > 4
15034         /* Final pthreads */
15035         pthread_attr_t attr;
15036
15037         status = pthread_attr_init(&attr);
15038         if( status ) return status;
15039
15040 #if HAVE_PTHREADS < 7
15041         status = pthread_attr_setdetachstate(&attr, &detach);
15042         if( status < 0 ) status = errno;
15043 #else
15044         status = pthread_attr_setdetachstate(&attr, detach);
15045 #endif
15046         if( status ) return status;
15047         status = pthread_create( &t, &attr, task, NULL );
15048 #if HAVE_PTHREADS < 7
15049         if( status < 0 ) status = errno;
15050 #endif
15051         if( status ) return status;
15052 #else
15053         /* Draft 4 pthreads */
15054         status = pthread_create( &t, pthread_attr_default, task, NULL );
15055         if( status ) return errno;
15056
15057         /* give thread a chance to complete */
15058         /* it should remain joinable and hence detachable */
15059         sleep( 1 );
15060
15061         status = pthread_detach( &t );
15062         if( status ) return errno;
15063 #endif
15064
15065 #ifdef HAVE_LINUX_THREADS
15066         pthread_kill_other_threads_np();
15067 #endif
15068
15069         return 0;
15070
15071 }
15072
15073 EOF
15074 if { (eval echo configure:15075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15075 then
15076   ol_cv_pthread_lib_lpthreads=yes
15077 else
15078   echo "configure: failed program was:" >&5
15079   cat conftest.$ac_ext >&5
15080   rm -fr conftest*
15081   ol_cv_pthread_lib_lpthreads=no
15082 fi
15083 rm -fr conftest*
15084 fi
15085
15086
15087                 # restore the LIBS
15088                 LIBS="$ol_LIBS"
15089         
15090 fi
15091
15092 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15093
15094         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15095                 ol_link_pthreads="-lpthreads"
15096                 ol_link_threads=posix
15097         fi
15098 fi
15099
15100
15101                 if test $ol_link_threads != no ; then
15102                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15103
15104                                                 save_CPPFLAGS="$CPPFLAGS"
15105                         save_LIBS="$LIBS"
15106                         LIBS="$LTHREAD_LIBS $LIBS"
15107
15108                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
15109 do
15110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15111 echo "configure:15112: checking for $ac_func" >&5
15112 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15113   echo $ac_n "(cached) $ac_c" 1>&6
15114 else
15115   cat > conftest.$ac_ext <<EOF
15116 #line 15117 "configure"
15117 #include "confdefs.h"
15118 /* System header to define __stub macros and hopefully few prototypes,
15119     which can conflict with char $ac_func(); below.  */
15120 #include <assert.h>
15121 /* Override any gcc2 internal prototype to avoid an error.  */
15122 /* We use char because int might match the return type of a gcc2
15123     builtin and then its argument prototype would still apply.  */
15124 char $ac_func();
15125 char (*f)();
15126
15127 int main() {
15128
15129 /* The GNU C library defines this for functions which it implements
15130     to always fail with ENOSYS.  Some functions are actually named
15131     something starting with __ and the normal name is an alias.  */
15132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15133 choke me
15134 #else
15135 f = $ac_func;
15136 #endif
15137
15138 ; return 0; }
15139 EOF
15140 if { (eval echo configure:15141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15141   rm -rf conftest*
15142   eval "ac_cv_func_$ac_func=yes"
15143 else
15144   echo "configure: failed program was:" >&5
15145   cat conftest.$ac_ext >&5
15146   rm -rf conftest*
15147   eval "ac_cv_func_$ac_func=no"
15148 fi
15149 rm -f conftest*
15150 fi
15151
15152 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15153   echo "$ac_t""yes" 1>&6
15154     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15155   cat >> confdefs.h <<EOF
15156 #define $ac_tr_func 1
15157 EOF
15158  
15159 else
15160   echo "$ac_t""no" 1>&6
15161 fi
15162 done
15163
15164
15165                         if test $ac_cv_func_sched_yield = no -a \
15166                                 $ac_cv_func_pthread_yield = no -a \
15167                                 $ac_cv_func_thr_yield = no ; then
15168                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15169 echo "configure:15170: checking for sched_yield in -lrt" >&5
15170 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15172   echo $ac_n "(cached) $ac_c" 1>&6
15173 else
15174   ac_save_LIBS="$LIBS"
15175 LIBS="-lrt  $LIBS"
15176 cat > conftest.$ac_ext <<EOF
15177 #line 15178 "configure"
15178 #include "confdefs.h"
15179 /* Override any gcc2 internal prototype to avoid an error.  */
15180 /* We use char because int might match the return type of a gcc2
15181     builtin and then its argument prototype would still apply.  */
15182 char sched_yield();
15183
15184 int main() {
15185 sched_yield()
15186 ; return 0; }
15187 EOF
15188 if { (eval echo configure:15189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15189   rm -rf conftest*
15190   eval "ac_cv_lib_$ac_lib_var=yes"
15191 else
15192   echo "configure: failed program was:" >&5
15193   cat conftest.$ac_ext >&5
15194   rm -rf conftest*
15195   eval "ac_cv_lib_$ac_lib_var=no"
15196 fi
15197 rm -f conftest*
15198 LIBS="$ac_save_LIBS"
15199
15200 fi
15201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15202   echo "$ac_t""yes" 1>&6
15203   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15204                                         cat >> confdefs.h <<\EOF
15205 #define HAVE_SCHED_YIELD 1
15206 EOF
15207
15208                                         ac_cv_func_sched_yield=yes
15209 else
15210   echo "$ac_t""no" 1>&6
15211 ac_cv_func_sched_yield=no
15212 fi
15213
15214                         fi
15215                         if test $ac_cv_func_sched_yield = no -a \
15216                                 $ac_cv_func_pthread_yield = no -a \
15217                                 "$ac_cv_func_thr_yield" = no ; then
15218                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15219                         fi
15220
15221                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15222 do
15223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15224 echo "configure:15225: checking for $ac_func" >&5
15225 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15226   echo $ac_n "(cached) $ac_c" 1>&6
15227 else
15228   cat > conftest.$ac_ext <<EOF
15229 #line 15230 "configure"
15230 #include "confdefs.h"
15231 /* System header to define __stub macros and hopefully few prototypes,
15232     which can conflict with char $ac_func(); below.  */
15233 #include <assert.h>
15234 /* Override any gcc2 internal prototype to avoid an error.  */
15235 /* We use char because int might match the return type of a gcc2
15236     builtin and then its argument prototype would still apply.  */
15237 char $ac_func();
15238 char (*f)();
15239
15240 int main() {
15241
15242 /* The GNU C library defines this for functions which it implements
15243     to always fail with ENOSYS.  Some functions are actually named
15244     something starting with __ and the normal name is an alias.  */
15245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15246 choke me
15247 #else
15248 f = $ac_func;
15249 #endif
15250
15251 ; return 0; }
15252 EOF
15253 if { (eval echo configure:15254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15254   rm -rf conftest*
15255   eval "ac_cv_func_$ac_func=yes"
15256 else
15257   echo "configure: failed program was:" >&5
15258   cat conftest.$ac_ext >&5
15259   rm -rf conftest*
15260   eval "ac_cv_func_$ac_func=no"
15261 fi
15262 rm -f conftest*
15263 fi
15264
15265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15266   echo "$ac_t""yes" 1>&6
15267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15268   cat >> confdefs.h <<EOF
15269 #define $ac_tr_func 1
15270 EOF
15271  
15272 else
15273   echo "$ac_t""no" 1>&6
15274 fi
15275 done
15276
15277
15278                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15279 echo "configure:15280: checking for pthread_detach with <pthread.h>" >&5
15280 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15281   echo $ac_n "(cached) $ac_c" 1>&6
15282 else
15283   
15284                                                                 cat > conftest.$ac_ext <<EOF
15285 #line 15286 "configure"
15286 #include "confdefs.h"
15287
15288 #include <pthread.h>
15289 #ifndef NULL
15290 #define NULL (void*)0
15291 #endif
15292
15293 int main() {
15294 pthread_detach(NULL);
15295 ; return 0; }
15296 EOF
15297 if { (eval echo configure:15298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15298   rm -rf conftest*
15299   ol_cv_func_pthread_detach=yes
15300 else
15301   echo "configure: failed program was:" >&5
15302   cat conftest.$ac_ext >&5
15303   rm -rf conftest*
15304   ol_cv_func_pthread_detach=no
15305 fi
15306 rm -f conftest*
15307                         
15308 fi
15309
15310 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15311
15312                         if test $ol_cv_func_pthread_detach = no ; then
15313                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15314                         fi
15315
15316                         cat >> confdefs.h <<\EOF
15317 #define HAVE_PTHREAD_DETACH 1
15318 EOF
15319
15320
15321                                                 for ac_func in \
15322                                 pthread_setconcurrency \
15323                                 pthread_getconcurrency \
15324                                 thr_setconcurrency \
15325                                 thr_getconcurrency \
15326                         
15327 do
15328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15329 echo "configure:15330: checking for $ac_func" >&5
15330 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15331   echo $ac_n "(cached) $ac_c" 1>&6
15332 else
15333   cat > conftest.$ac_ext <<EOF
15334 #line 15335 "configure"
15335 #include "confdefs.h"
15336 /* System header to define __stub macros and hopefully few prototypes,
15337     which can conflict with char $ac_func(); below.  */
15338 #include <assert.h>
15339 /* Override any gcc2 internal prototype to avoid an error.  */
15340 /* We use char because int might match the return type of a gcc2
15341     builtin and then its argument prototype would still apply.  */
15342 char $ac_func();
15343 char (*f)();
15344
15345 int main() {
15346
15347 /* The GNU C library defines this for functions which it implements
15348     to always fail with ENOSYS.  Some functions are actually named
15349     something starting with __ and the normal name is an alias.  */
15350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15351 choke me
15352 #else
15353 f = $ac_func;
15354 #endif
15355
15356 ; return 0; }
15357 EOF
15358 if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15359   rm -rf conftest*
15360   eval "ac_cv_func_$ac_func=yes"
15361 else
15362   echo "configure: failed program was:" >&5
15363   cat conftest.$ac_ext >&5
15364   rm -rf conftest*
15365   eval "ac_cv_func_$ac_func=no"
15366 fi
15367 rm -f conftest*
15368 fi
15369
15370 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15371   echo "$ac_t""yes" 1>&6
15372     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15373   cat >> confdefs.h <<EOF
15374 #define $ac_tr_func 1
15375 EOF
15376  
15377 else
15378   echo "$ac_t""no" 1>&6
15379 fi
15380 done
15381
15382
15383                         
15384         for ac_func in pthread_kill_other_threads_np
15385 do
15386 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15387 echo "configure:15388: checking for $ac_func" >&5
15388 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15389   echo $ac_n "(cached) $ac_c" 1>&6
15390 else
15391   cat > conftest.$ac_ext <<EOF
15392 #line 15393 "configure"
15393 #include "confdefs.h"
15394 /* System header to define __stub macros and hopefully few prototypes,
15395     which can conflict with char $ac_func(); below.  */
15396 #include <assert.h>
15397 /* Override any gcc2 internal prototype to avoid an error.  */
15398 /* We use char because int might match the return type of a gcc2
15399     builtin and then its argument prototype would still apply.  */
15400 char $ac_func();
15401 char (*f)();
15402
15403 int main() {
15404
15405 /* The GNU C library defines this for functions which it implements
15406     to always fail with ENOSYS.  Some functions are actually named
15407     something starting with __ and the normal name is an alias.  */
15408 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15409 choke me
15410 #else
15411 f = $ac_func;
15412 #endif
15413
15414 ; return 0; }
15415 EOF
15416 if { (eval echo configure:15417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15417   rm -rf conftest*
15418   eval "ac_cv_func_$ac_func=yes"
15419 else
15420   echo "configure: failed program was:" >&5
15421   cat conftest.$ac_ext >&5
15422   rm -rf conftest*
15423   eval "ac_cv_func_$ac_func=no"
15424 fi
15425 rm -f conftest*
15426 fi
15427
15428 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15429   echo "$ac_t""yes" 1>&6
15430     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15431   cat >> confdefs.h <<EOF
15432 #define $ac_tr_func 1
15433 EOF
15434  
15435 else
15436   echo "$ac_t""no" 1>&6
15437 fi
15438 done
15439
15440         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15441 echo "configure:15442: checking for LinuxThreads implementation" >&5
15442 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15443   echo $ac_n "(cached) $ac_c" 1>&6
15444 else
15445   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15446 fi
15447
15448 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15449
15450                         
15451         
15452         
15453         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15454 echo "configure:15455: checking for LinuxThreads consistency" >&5
15455 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15456   echo $ac_n "(cached) $ac_c" 1>&6
15457 else
15458   
15459                 if test $ol_cv_header_linux_threads = yes -a \
15460                         $ol_cv_sys_linux_threads = yes; then
15461                         ol_cv_linux_threads=yes
15462                 elif test $ol_cv_header_linux_threads = no -a \
15463                         $ol_cv_sys_linux_threads = no; then
15464                         ol_cv_linux_threads=no
15465                 else
15466                         ol_cv_linux_threads=error
15467                 fi
15468         
15469 fi
15470
15471 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15472
15473
15474                         if test $ol_cv_linux_threads = error; then
15475                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15476                         fi
15477
15478                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15479 echo "configure:15480: checking if pthread_create() works" >&5
15480 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15481   echo $ac_n "(cached) $ac_c" 1>&6
15482 else
15483   
15484                         if test "$cross_compiling" = yes; then
15485                                 ol_cv_pthread_create_works=yes
15486 else
15487   cat > conftest.$ac_ext <<EOF
15488 #line 15489 "configure"
15489 #include "confdefs.h"
15490 /* pthread test headers */
15491 #include <pthread.h>
15492 #if HAVE_PTHREADS < 7
15493 #include <errno.h>
15494 #endif
15495 #ifndef NULL
15496 #define NULL (void*)0
15497 #endif
15498
15499 static void *task(p)
15500         void *p;
15501 {
15502         return (void *) (p == NULL);
15503 }
15504
15505
15506 int main(argc, argv)
15507         int argc;
15508         char **argv;
15509 {
15510
15511         /* pthread test function */
15512 #ifndef PTHREAD_CREATE_DETACHED
15513 #define PTHREAD_CREATE_DETACHED 1
15514 #endif
15515         pthread_t t;
15516         int status;
15517         int detach = PTHREAD_CREATE_DETACHED;
15518
15519 #if HAVE_PTHREADS > 4
15520         /* Final pthreads */
15521         pthread_attr_t attr;
15522
15523         status = pthread_attr_init(&attr);
15524         if( status ) return status;
15525
15526 #if HAVE_PTHREADS < 7
15527         status = pthread_attr_setdetachstate(&attr, &detach);
15528         if( status < 0 ) status = errno;
15529 #else
15530         status = pthread_attr_setdetachstate(&attr, detach);
15531 #endif
15532         if( status ) return status;
15533         status = pthread_create( &t, &attr, task, NULL );
15534 #if HAVE_PTHREADS < 7
15535         if( status < 0 ) status = errno;
15536 #endif
15537         if( status ) return status;
15538 #else
15539         /* Draft 4 pthreads */
15540         status = pthread_create( &t, pthread_attr_default, task, NULL );
15541         if( status ) return errno;
15542
15543         /* give thread a chance to complete */
15544         /* it should remain joinable and hence detachable */
15545         sleep( 1 );
15546
15547         status = pthread_detach( &t );
15548         if( status ) return errno;
15549 #endif
15550
15551 #ifdef HAVE_LINUX_THREADS
15552         pthread_kill_other_threads_np();
15553 #endif
15554
15555         return 0;
15556
15557 }
15558
15559 EOF
15560 if { (eval echo configure:15561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15561 then
15562   ol_cv_pthread_create_works=yes
15563 else
15564   echo "configure: failed program was:" >&5
15565   cat conftest.$ac_ext >&5
15566   rm -fr conftest*
15567   ol_cv_pthread_create_works=no
15568 fi
15569 rm -fr conftest*
15570 fi
15571
15572 fi
15573
15574 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15575
15576                         if test $ol_cv_pthread_create_works = no ; then
15577                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15578                         fi
15579
15580                                                 if test $ol_with_yielding_select = auto ; then
15581                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15582 echo "configure:15583: checking if select yields when using pthreads" >&5
15583 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15584   echo $ac_n "(cached) $ac_c" 1>&6
15585 else
15586   
15587                                 if test "$cross_compiling" = yes; then
15588   ol_cv_pthread_select_yields=cross
15589 else
15590   cat > conftest.$ac_ext <<EOF
15591 #line 15592 "configure"
15592 #include "confdefs.h"
15593
15594 #include <sys/types.h>
15595 #include <sys/time.h>
15596 #include <unistd.h>
15597 #include <pthread.h>
15598 #ifndef NULL
15599 #define NULL (void*) 0
15600 #endif
15601
15602 static int fildes[2];
15603
15604 static void *task(p)
15605         void *p;
15606 {
15607         int i;
15608         struct timeval tv;
15609
15610         fd_set rfds;
15611
15612         tv.tv_sec=10;
15613         tv.tv_usec=0;
15614
15615         FD_ZERO(&rfds);
15616         FD_SET(fildes[0], &rfds);
15617
15618         /* we're not interested in any fds */
15619         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15620
15621         if(i < 0) {
15622                 perror("select");
15623                 exit(10);
15624         }
15625
15626         exit(0); /* if we exit here, the select blocked the whole process */
15627 }
15628
15629 int main(argc, argv)
15630         int argc;
15631         char **argv;
15632 {
15633         pthread_t t;
15634
15635         /* create a pipe to select */
15636         if(pipe(&fildes[0])) {
15637                 perror("select");
15638                 exit(1);
15639         }
15640
15641 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15642         (void) pthread_setconcurrency(2);
15643 #else
15644 #ifdef HAVE_THR_SETCONCURRENCY
15645         /* Set Solaris LWP concurrency to 2 */
15646         thr_setconcurrency(2);
15647 #endif
15648 #endif
15649
15650 #if HAVE_PTHREADS < 6
15651         pthread_create(&t, pthread_attr_default, task, NULL);
15652 #else
15653         pthread_create(&t, NULL, task, NULL);
15654 #endif
15655
15656         /* make sure task runs first */
15657 #if HAVE_THR_YIELD
15658         thr_yield();
15659 #elif defined( HAVE_SCHED_YIELD )
15660         sched_yield();
15661 #elif defined( HAVE_PTHREAD_YIELD )
15662         pthread_yield();
15663 #endif
15664
15665         exit(2);
15666 }
15667 EOF
15668 if { (eval echo configure:15669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
15669 then
15670   ol_cv_pthread_select_yields=no
15671 else
15672   echo "configure: failed program was:" >&5
15673   cat conftest.$ac_ext >&5
15674   rm -fr conftest*
15675   ol_cv_pthread_select_yields=yes
15676 fi
15677 rm -fr conftest*
15678 fi
15679
15680 fi
15681
15682 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15683
15684                                 if test $ol_cv_pthread_select_yields = cross ; then
15685                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15686                                 fi
15687
15688                                 if test $ol_cv_pthread_select_yields = yes ; then
15689                                         ol_with_yielding_select=yes
15690                                 fi
15691                         fi
15692
15693                                                 CPPFLAGS="$save_CPPFLAGS"
15694                         LIBS="$save_LIBS"
15695                 else
15696                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15697                 fi
15698         fi
15699
15700         if test $ol_with_threads = posix ; then
15701                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15702         fi
15703 fi
15704
15705 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15706         -o $ol_with_threads = mach ; then
15707
15708                 for ac_hdr in mach/cthreads.h cthreads.h
15709 do
15710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15712 echo "configure:15713: checking for $ac_hdr" >&5
15713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15714   echo $ac_n "(cached) $ac_c" 1>&6
15715 else
15716   cat > conftest.$ac_ext <<EOF
15717 #line 15718 "configure"
15718 #include "confdefs.h"
15719 #include <$ac_hdr>
15720 EOF
15721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15722 { (eval echo configure:15723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15724 if test -z "$ac_err"; then
15725   rm -rf conftest*
15726   eval "ac_cv_header_$ac_safe=yes"
15727 else
15728   echo "$ac_err" >&5
15729   echo "configure: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   rm -rf conftest*
15732   eval "ac_cv_header_$ac_safe=no"
15733 fi
15734 rm -f conftest*
15735 fi
15736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15737   echo "$ac_t""yes" 1>&6
15738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15739   cat >> confdefs.h <<EOF
15740 #define $ac_tr_hdr 1
15741 EOF
15742  
15743 else
15744   echo "$ac_t""no" 1>&6
15745 fi
15746 done
15747
15748         if test $ac_cv_header_mach_cthreads_h = yes ; then
15749                 ol_with_threads=found
15750
15751                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15752 echo "configure:15753: checking for cthread_fork" >&5
15753 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15754   echo $ac_n "(cached) $ac_c" 1>&6
15755 else
15756   cat > conftest.$ac_ext <<EOF
15757 #line 15758 "configure"
15758 #include "confdefs.h"
15759 /* System header to define __stub macros and hopefully few prototypes,
15760     which can conflict with char cthread_fork(); below.  */
15761 #include <assert.h>
15762 /* Override any gcc2 internal prototype to avoid an error.  */
15763 /* We use char because int might match the return type of a gcc2
15764     builtin and then its argument prototype would still apply.  */
15765 char cthread_fork();
15766 char (*f)();
15767
15768 int main() {
15769
15770 /* The GNU C library defines this for functions which it implements
15771     to always fail with ENOSYS.  Some functions are actually named
15772     something starting with __ and the normal name is an alias.  */
15773 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15774 choke me
15775 #else
15776 f = cthread_fork;
15777 #endif
15778
15779 ; return 0; }
15780 EOF
15781 if { (eval echo configure:15782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15782   rm -rf conftest*
15783   eval "ac_cv_func_cthread_fork=yes"
15784 else
15785   echo "configure: failed program was:" >&5
15786   cat conftest.$ac_ext >&5
15787   rm -rf conftest*
15788   eval "ac_cv_func_cthread_fork=no"
15789 fi
15790 rm -f conftest*
15791 fi
15792
15793 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15794   echo "$ac_t""yes" 1>&6
15795   ol_link_threads=yes
15796 else
15797   echo "$ac_t""no" 1>&6
15798 fi
15799
15800
15801                 if test $ol_link_threads = no ; then
15802                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15803 echo "configure:15804: checking for cthread_fork with -all_load" >&5
15804 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15805   echo $ac_n "(cached) $ac_c" 1>&6
15806 else
15807   
15808                                                                 save_LIBS="$LIBS"
15809                                 LIBS="-all_load $LIBS"
15810                                 cat > conftest.$ac_ext <<EOF
15811 #line 15812 "configure"
15812 #include "confdefs.h"
15813 #include <mach/cthreads.h>
15814 int main() {
15815
15816                                         cthread_fork((void *)0, (void *)0);
15817                                         
15818 ; return 0; }
15819 EOF
15820 if { (eval echo configure:15821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15821   rm -rf conftest*
15822   ol_cv_cthread_all_load=yes
15823 else
15824   echo "configure: failed program was:" >&5
15825   cat conftest.$ac_ext >&5
15826   rm -rf conftest*
15827   ol_cv_cthread_all_load=no
15828 fi
15829 rm -f conftest*
15830                                                                 LIBS="$save_LIBS"
15831                         
15832 fi
15833
15834 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15835
15836                         if test $ol_cv_cthread_all_load = yes ; then
15837                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15838                                 ol_link_threads=mach
15839                                 ol_with_threads=found
15840                         fi
15841                 fi
15842
15843         elif test $ac_cv_header_cthreads_h = yes ; then
15844                                 
15845                 ol_with_threads=found
15846  
15847                                 save_LIBS="$LIBS"
15848                 LIBS="$LIBS -lthreads"
15849                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15850 echo "configure:15851: checking for cthread_fork" >&5
15851 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15852   echo $ac_n "(cached) $ac_c" 1>&6
15853 else
15854   cat > conftest.$ac_ext <<EOF
15855 #line 15856 "configure"
15856 #include "confdefs.h"
15857 /* System header to define __stub macros and hopefully few prototypes,
15858     which can conflict with char cthread_fork(); below.  */
15859 #include <assert.h>
15860 /* Override any gcc2 internal prototype to avoid an error.  */
15861 /* We use char because int might match the return type of a gcc2
15862     builtin and then its argument prototype would still apply.  */
15863 char cthread_fork();
15864 char (*f)();
15865
15866 int main() {
15867
15868 /* The GNU C library defines this for functions which it implements
15869     to always fail with ENOSYS.  Some functions are actually named
15870     something starting with __ and the normal name is an alias.  */
15871 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15872 choke me
15873 #else
15874 f = cthread_fork;
15875 #endif
15876
15877 ; return 0; }
15878 EOF
15879 if { (eval echo configure:15880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15880   rm -rf conftest*
15881   eval "ac_cv_func_cthread_fork=yes"
15882 else
15883   echo "configure: failed program was:" >&5
15884   cat conftest.$ac_ext >&5
15885   rm -rf conftest*
15886   eval "ac_cv_func_cthread_fork=no"
15887 fi
15888 rm -f conftest*
15889 fi
15890
15891 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15892   echo "$ac_t""yes" 1>&6
15893   ol_link_threads=yes
15894 else
15895   echo "$ac_t""no" 1>&6
15896 fi
15897
15898                 LIBS="$save_LIBS"
15899
15900                 if test $ol_link_threads = yes ; then
15901                         LTHREAD_LIBS="-lthreads"
15902                         ol_link_threads=mach
15903                         ol_with_threads=found
15904                 else
15905                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15906                 fi
15907
15908         elif test $ol_with_threads = mach ; then
15909                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15910         fi
15911
15912         if test $ol_link_threads = mach ; then
15913                 cat >> confdefs.h <<\EOF
15914 #define HAVE_MACH_CTHREADS 1
15915 EOF
15916
15917         elif test $ol_with_threads = found ; then
15918                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15919         fi
15920 fi
15921
15922 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15923         -o $ol_with_threads = pth ; then
15924
15925         for ac_hdr in pth.h
15926 do
15927 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15928 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15929 echo "configure:15930: checking for $ac_hdr" >&5
15930 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15931   echo $ac_n "(cached) $ac_c" 1>&6
15932 else
15933   cat > conftest.$ac_ext <<EOF
15934 #line 15935 "configure"
15935 #include "confdefs.h"
15936 #include <$ac_hdr>
15937 EOF
15938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15939 { (eval echo configure:15940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15941 if test -z "$ac_err"; then
15942   rm -rf conftest*
15943   eval "ac_cv_header_$ac_safe=yes"
15944 else
15945   echo "$ac_err" >&5
15946   echo "configure: failed program was:" >&5
15947   cat conftest.$ac_ext >&5
15948   rm -rf conftest*
15949   eval "ac_cv_header_$ac_safe=no"
15950 fi
15951 rm -f conftest*
15952 fi
15953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15954   echo "$ac_t""yes" 1>&6
15955     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15956   cat >> confdefs.h <<EOF
15957 #define $ac_tr_hdr 1
15958 EOF
15959  
15960 else
15961   echo "$ac_t""no" 1>&6
15962 fi
15963 done
15964
15965
15966         if test $ac_cv_header_pth_h = yes ; then
15967                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15968 echo "configure:15969: checking for pth_version in -lpth" >&5
15969 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15970 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15971   echo $ac_n "(cached) $ac_c" 1>&6
15972 else
15973   ac_save_LIBS="$LIBS"
15974 LIBS="-lpth  $LIBS"
15975 cat > conftest.$ac_ext <<EOF
15976 #line 15977 "configure"
15977 #include "confdefs.h"
15978 /* Override any gcc2 internal prototype to avoid an error.  */
15979 /* We use char because int might match the return type of a gcc2
15980     builtin and then its argument prototype would still apply.  */
15981 char pth_version();
15982
15983 int main() {
15984 pth_version()
15985 ; return 0; }
15986 EOF
15987 if { (eval echo configure:15988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15988   rm -rf conftest*
15989   eval "ac_cv_lib_$ac_lib_var=yes"
15990 else
15991   echo "configure: failed program was:" >&5
15992   cat conftest.$ac_ext >&5
15993   rm -rf conftest*
15994   eval "ac_cv_lib_$ac_lib_var=no"
15995 fi
15996 rm -f conftest*
15997 LIBS="$ac_save_LIBS"
15998
15999 fi
16000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16001   echo "$ac_t""yes" 1>&6
16002   have_pth=yes
16003 else
16004   echo "$ac_t""no" 1>&6
16005 have_pth=no
16006 fi
16007
16008
16009                 if test $have_pth = yes ; then
16010                         cat >> confdefs.h <<\EOF
16011 #define HAVE_GNU_PTH 1
16012 EOF
16013
16014                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16015                         ol_link_threads=pth
16016                         ol_with_threads=found
16017
16018                         if test $ol_with_yielding_select = auto ; then
16019                                 ol_with_yielding_select=yes
16020                         fi
16021                 fi
16022         fi
16023 fi
16024
16025 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16026         -o $ol_with_threads = lwp ; then
16027
16028                 for ac_hdr in thread.h synch.h
16029 do
16030 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16031 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16032 echo "configure:16033: checking for $ac_hdr" >&5
16033 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16034   echo $ac_n "(cached) $ac_c" 1>&6
16035 else
16036   cat > conftest.$ac_ext <<EOF
16037 #line 16038 "configure"
16038 #include "confdefs.h"
16039 #include <$ac_hdr>
16040 EOF
16041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16042 { (eval echo configure:16043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16044 if test -z "$ac_err"; then
16045   rm -rf conftest*
16046   eval "ac_cv_header_$ac_safe=yes"
16047 else
16048   echo "$ac_err" >&5
16049   echo "configure: failed program was:" >&5
16050   cat conftest.$ac_ext >&5
16051   rm -rf conftest*
16052   eval "ac_cv_header_$ac_safe=no"
16053 fi
16054 rm -f conftest*
16055 fi
16056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16057   echo "$ac_t""yes" 1>&6
16058     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16059   cat >> confdefs.h <<EOF
16060 #define $ac_tr_hdr 1
16061 EOF
16062  
16063 else
16064   echo "$ac_t""no" 1>&6
16065 fi
16066 done
16067
16068         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16069                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16070 echo "configure:16071: checking for thr_create in -lthread" >&5
16071 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16073   echo $ac_n "(cached) $ac_c" 1>&6
16074 else
16075   ac_save_LIBS="$LIBS"
16076 LIBS="-lthread  $LIBS"
16077 cat > conftest.$ac_ext <<EOF
16078 #line 16079 "configure"
16079 #include "confdefs.h"
16080 /* Override any gcc2 internal prototype to avoid an error.  */
16081 /* We use char because int might match the return type of a gcc2
16082     builtin and then its argument prototype would still apply.  */
16083 char thr_create();
16084
16085 int main() {
16086 thr_create()
16087 ; return 0; }
16088 EOF
16089 if { (eval echo configure:16090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16090   rm -rf conftest*
16091   eval "ac_cv_lib_$ac_lib_var=yes"
16092 else
16093   echo "configure: failed program was:" >&5
16094   cat conftest.$ac_ext >&5
16095   rm -rf conftest*
16096   eval "ac_cv_lib_$ac_lib_var=no"
16097 fi
16098 rm -f conftest*
16099 LIBS="$ac_save_LIBS"
16100
16101 fi
16102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16103   echo "$ac_t""yes" 1>&6
16104   have_thr=yes
16105 else
16106   echo "$ac_t""no" 1>&6
16107 have_thr=no
16108 fi
16109
16110
16111                 if test $have_thr = yes ; then
16112                         cat >> confdefs.h <<\EOF
16113 #define HAVE_THR 1
16114 EOF
16115
16116                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16117                         ol_link_threads=thr
16118
16119                         if test $ol_with_yielding_select = auto ; then
16120                                 ol_with_yielding_select=yes
16121                         fi
16122
16123                                                 for ac_func in \
16124                                 thr_setconcurrency \
16125                                 thr_getconcurrency \
16126                         
16127 do
16128 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16129 echo "configure:16130: checking for $ac_func" >&5
16130 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16131   echo $ac_n "(cached) $ac_c" 1>&6
16132 else
16133   cat > conftest.$ac_ext <<EOF
16134 #line 16135 "configure"
16135 #include "confdefs.h"
16136 /* System header to define __stub macros and hopefully few prototypes,
16137     which can conflict with char $ac_func(); below.  */
16138 #include <assert.h>
16139 /* Override any gcc2 internal prototype to avoid an error.  */
16140 /* We use char because int might match the return type of a gcc2
16141     builtin and then its argument prototype would still apply.  */
16142 char $ac_func();
16143 char (*f)();
16144
16145 int main() {
16146
16147 /* The GNU C library defines this for functions which it implements
16148     to always fail with ENOSYS.  Some functions are actually named
16149     something starting with __ and the normal name is an alias.  */
16150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16151 choke me
16152 #else
16153 f = $ac_func;
16154 #endif
16155
16156 ; return 0; }
16157 EOF
16158 if { (eval echo configure:16159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16159   rm -rf conftest*
16160   eval "ac_cv_func_$ac_func=yes"
16161 else
16162   echo "configure: failed program was:" >&5
16163   cat conftest.$ac_ext >&5
16164   rm -rf conftest*
16165   eval "ac_cv_func_$ac_func=no"
16166 fi
16167 rm -f conftest*
16168 fi
16169
16170 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16171   echo "$ac_t""yes" 1>&6
16172     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16173   cat >> confdefs.h <<EOF
16174 #define $ac_tr_func 1
16175 EOF
16176  
16177 else
16178   echo "$ac_t""no" 1>&6
16179 fi
16180 done
16181
16182                 fi
16183         fi
16184
16185                 for ac_hdr in lwp/lwp.h
16186 do
16187 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16188 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16189 echo "configure:16190: checking for $ac_hdr" >&5
16190 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16191   echo $ac_n "(cached) $ac_c" 1>&6
16192 else
16193   cat > conftest.$ac_ext <<EOF
16194 #line 16195 "configure"
16195 #include "confdefs.h"
16196 #include <$ac_hdr>
16197 EOF
16198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16199 { (eval echo configure:16200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16201 if test -z "$ac_err"; then
16202   rm -rf conftest*
16203   eval "ac_cv_header_$ac_safe=yes"
16204 else
16205   echo "$ac_err" >&5
16206   echo "configure: failed program was:" >&5
16207   cat conftest.$ac_ext >&5
16208   rm -rf conftest*
16209   eval "ac_cv_header_$ac_safe=no"
16210 fi
16211 rm -f conftest*
16212 fi
16213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16214   echo "$ac_t""yes" 1>&6
16215     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16216   cat >> confdefs.h <<EOF
16217 #define $ac_tr_hdr 1
16218 EOF
16219  
16220 else
16221   echo "$ac_t""no" 1>&6
16222 fi
16223 done
16224
16225         if test $ac_cv_header_lwp_lwp_h = yes ; then
16226                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16227 echo "configure:16228: checking for lwp_create in -llwp" >&5
16228 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16230   echo $ac_n "(cached) $ac_c" 1>&6
16231 else
16232   ac_save_LIBS="$LIBS"
16233 LIBS="-llwp  $LIBS"
16234 cat > conftest.$ac_ext <<EOF
16235 #line 16236 "configure"
16236 #include "confdefs.h"
16237 /* Override any gcc2 internal prototype to avoid an error.  */
16238 /* We use char because int might match the return type of a gcc2
16239     builtin and then its argument prototype would still apply.  */
16240 char lwp_create();
16241
16242 int main() {
16243 lwp_create()
16244 ; return 0; }
16245 EOF
16246 if { (eval echo configure:16247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16247   rm -rf conftest*
16248   eval "ac_cv_lib_$ac_lib_var=yes"
16249 else
16250   echo "configure: failed program was:" >&5
16251   cat conftest.$ac_ext >&5
16252   rm -rf conftest*
16253   eval "ac_cv_lib_$ac_lib_var=no"
16254 fi
16255 rm -f conftest*
16256 LIBS="$ac_save_LIBS"
16257
16258 fi
16259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16260   echo "$ac_t""yes" 1>&6
16261   have_lwp=yes
16262 else
16263   echo "$ac_t""no" 1>&6
16264 have_lwp=no
16265 fi
16266
16267
16268                 if test $have_lwp = yes ; then
16269                         cat >> confdefs.h <<\EOF
16270 #define HAVE_LWP 1
16271 EOF
16272
16273                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16274                         ol_link_threads=lwp
16275
16276                         if test $ol_with_yielding_select = auto ; then
16277                                 ol_with_yielding_select=no
16278                         fi
16279                 fi
16280         fi
16281 fi
16282
16283 if test $ol_with_yielding_select = yes ; then
16284         cat >> confdefs.h <<\EOF
16285 #define HAVE_YIELDING_SELECT 1
16286 EOF
16287
16288 fi
16289
16290 if test $ol_with_threads = manual ; then
16291                 ol_link_threads=yes
16292
16293         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16294
16295         for ac_hdr in pthread.h sched.h
16296 do
16297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16299 echo "configure:16300: checking for $ac_hdr" >&5
16300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16301   echo $ac_n "(cached) $ac_c" 1>&6
16302 else
16303   cat > conftest.$ac_ext <<EOF
16304 #line 16305 "configure"
16305 #include "confdefs.h"
16306 #include <$ac_hdr>
16307 EOF
16308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16309 { (eval echo configure:16310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16311 if test -z "$ac_err"; then
16312   rm -rf conftest*
16313   eval "ac_cv_header_$ac_safe=yes"
16314 else
16315   echo "$ac_err" >&5
16316   echo "configure: failed program was:" >&5
16317   cat conftest.$ac_ext >&5
16318   rm -rf conftest*
16319   eval "ac_cv_header_$ac_safe=no"
16320 fi
16321 rm -f conftest*
16322 fi
16323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16324   echo "$ac_t""yes" 1>&6
16325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16326   cat >> confdefs.h <<EOF
16327 #define $ac_tr_hdr 1
16328 EOF
16329  
16330 else
16331   echo "$ac_t""no" 1>&6
16332 fi
16333 done
16334
16335         for ac_func in sched_yield pthread_yield
16336 do
16337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16338 echo "configure:16339: checking for $ac_func" >&5
16339 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16340   echo $ac_n "(cached) $ac_c" 1>&6
16341 else
16342   cat > conftest.$ac_ext <<EOF
16343 #line 16344 "configure"
16344 #include "confdefs.h"
16345 /* System header to define __stub macros and hopefully few prototypes,
16346     which can conflict with char $ac_func(); below.  */
16347 #include <assert.h>
16348 /* Override any gcc2 internal prototype to avoid an error.  */
16349 /* We use char because int might match the return type of a gcc2
16350     builtin and then its argument prototype would still apply.  */
16351 char $ac_func();
16352 char (*f)();
16353
16354 int main() {
16355
16356 /* The GNU C library defines this for functions which it implements
16357     to always fail with ENOSYS.  Some functions are actually named
16358     something starting with __ and the normal name is an alias.  */
16359 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16360 choke me
16361 #else
16362 f = $ac_func;
16363 #endif
16364
16365 ; return 0; }
16366 EOF
16367 if { (eval echo configure:16368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16368   rm -rf conftest*
16369   eval "ac_cv_func_$ac_func=yes"
16370 else
16371   echo "configure: failed program was:" >&5
16372   cat conftest.$ac_ext >&5
16373   rm -rf conftest*
16374   eval "ac_cv_func_$ac_func=no"
16375 fi
16376 rm -f conftest*
16377 fi
16378
16379 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16380   echo "$ac_t""yes" 1>&6
16381     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16382   cat >> confdefs.h <<EOF
16383 #define $ac_tr_func 1
16384 EOF
16385  
16386 else
16387   echo "$ac_t""no" 1>&6
16388 fi
16389 done
16390
16391         
16392         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16393 echo "configure:16394: checking for LinuxThreads pthread.h" >&5
16394 if eval "test \"\${ol_cv_header_linux_threads+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 <pthread.h>
16401 EOF
16402 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16403   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16404   rm -rf conftest*
16405   ol_cv_header_linux_threads=yes
16406 else
16407   rm -rf conftest*
16408   ol_cv_header_linux_threads=no
16409 fi
16410 rm -f conftest*
16411
16412                 
16413 fi
16414
16415 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16416         if test $ol_cv_header_linux_threads = yes; then
16417                 cat >> confdefs.h <<\EOF
16418 #define HAVE_LINUX_THREADS 1
16419 EOF
16420
16421         fi
16422
16423
16424         for ac_hdr in mach/cthreads.h
16425 do
16426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16428 echo "configure:16429: checking for $ac_hdr" >&5
16429 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16430   echo $ac_n "(cached) $ac_c" 1>&6
16431 else
16432   cat > conftest.$ac_ext <<EOF
16433 #line 16434 "configure"
16434 #include "confdefs.h"
16435 #include <$ac_hdr>
16436 EOF
16437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16438 { (eval echo configure:16439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16440 if test -z "$ac_err"; then
16441   rm -rf conftest*
16442   eval "ac_cv_header_$ac_safe=yes"
16443 else
16444   echo "$ac_err" >&5
16445   echo "configure: failed program was:" >&5
16446   cat conftest.$ac_ext >&5
16447   rm -rf conftest*
16448   eval "ac_cv_header_$ac_safe=no"
16449 fi
16450 rm -f conftest*
16451 fi
16452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16453   echo "$ac_t""yes" 1>&6
16454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16455   cat >> confdefs.h <<EOF
16456 #define $ac_tr_hdr 1
16457 EOF
16458  
16459 else
16460   echo "$ac_t""no" 1>&6
16461 fi
16462 done
16463
16464         for ac_hdr in lwp/lwp.h
16465 do
16466 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16467 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16468 echo "configure:16469: checking for $ac_hdr" >&5
16469 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16470   echo $ac_n "(cached) $ac_c" 1>&6
16471 else
16472   cat > conftest.$ac_ext <<EOF
16473 #line 16474 "configure"
16474 #include "confdefs.h"
16475 #include <$ac_hdr>
16476 EOF
16477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16478 { (eval echo configure:16479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16480 if test -z "$ac_err"; then
16481   rm -rf conftest*
16482   eval "ac_cv_header_$ac_safe=yes"
16483 else
16484   echo "$ac_err" >&5
16485   echo "configure: failed program was:" >&5
16486   cat conftest.$ac_ext >&5
16487   rm -rf conftest*
16488   eval "ac_cv_header_$ac_safe=no"
16489 fi
16490 rm -f conftest*
16491 fi
16492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16493   echo "$ac_t""yes" 1>&6
16494     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16495   cat >> confdefs.h <<EOF
16496 #define $ac_tr_hdr 1
16497 EOF
16498  
16499 else
16500   echo "$ac_t""no" 1>&6
16501 fi
16502 done
16503
16504         for ac_hdr in thread.h synch.h
16505 do
16506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16508 echo "configure:16509: checking for $ac_hdr" >&5
16509 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16510   echo $ac_n "(cached) $ac_c" 1>&6
16511 else
16512   cat > conftest.$ac_ext <<EOF
16513 #line 16514 "configure"
16514 #include "confdefs.h"
16515 #include <$ac_hdr>
16516 EOF
16517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16518 { (eval echo configure:16519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16520 if test -z "$ac_err"; then
16521   rm -rf conftest*
16522   eval "ac_cv_header_$ac_safe=yes"
16523 else
16524   echo "$ac_err" >&5
16525   echo "configure: failed program was:" >&5
16526   cat conftest.$ac_ext >&5
16527   rm -rf conftest*
16528   eval "ac_cv_header_$ac_safe=no"
16529 fi
16530 rm -f conftest*
16531 fi
16532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16533   echo "$ac_t""yes" 1>&6
16534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16535   cat >> confdefs.h <<EOF
16536 #define $ac_tr_hdr 1
16537 EOF
16538  
16539 else
16540   echo "$ac_t""no" 1>&6
16541 fi
16542 done
16543
16544 fi
16545
16546 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16547                         cat >> confdefs.h <<\EOF
16548 #define REENTRANT 1
16549 EOF
16550
16551         cat >> confdefs.h <<\EOF
16552 #define _REENTRANT 1
16553 EOF
16554
16555         cat >> confdefs.h <<\EOF
16556 #define THREAD_SAFE 1
16557 EOF
16558
16559         cat >> confdefs.h <<\EOF
16560 #define _THREAD_SAFE 1
16561 EOF
16562
16563         cat >> confdefs.h <<\EOF
16564 #define THREADSAFE 1
16565 EOF
16566
16567         cat >> confdefs.h <<\EOF
16568 #define _THREADSAFE 1
16569 EOF
16570
16571         cat >> confdefs.h <<\EOF
16572 #define _SGI_MP_SOURCE 1
16573 EOF
16574
16575
16576                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16577 echo "configure:16578: checking for thread specific errno" >&5
16578 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16579   echo $ac_n "(cached) $ac_c" 1>&6
16580 else
16581   
16582                 cat > conftest.$ac_ext <<EOF
16583 #line 16584 "configure"
16584 #include "confdefs.h"
16585 #include <errno.h>
16586 int main() {
16587 errno = 0;
16588 ; return 0; }
16589 EOF
16590 if { (eval echo configure:16591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16591   rm -rf conftest*
16592   ol_cv_errno_thread_specific=yes
16593 else
16594   echo "configure: failed program was:" >&5
16595   cat conftest.$ac_ext >&5
16596   rm -rf conftest*
16597   ol_cv_errno_thread_specific=no
16598 fi
16599 rm -f conftest*
16600         
16601 fi
16602
16603 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16604
16605                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16606 echo "configure:16607: checking for thread specific h_errno" >&5
16607 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16608   echo $ac_n "(cached) $ac_c" 1>&6
16609 else
16610   
16611                 cat > conftest.$ac_ext <<EOF
16612 #line 16613 "configure"
16613 #include "confdefs.h"
16614 #include <netdb.h>
16615 int main() {
16616 h_errno = 0;
16617 ; return 0; }
16618 EOF
16619 if { (eval echo configure:16620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16620   rm -rf conftest*
16621   ol_cv_h_errno_thread_specific=yes
16622 else
16623   echo "configure: failed program was:" >&5
16624   cat conftest.$ac_ext >&5
16625   rm -rf conftest*
16626   ol_cv_h_errno_thread_specific=no
16627 fi
16628 rm -f conftest*
16629         
16630 fi
16631
16632 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16633
16634         if test $ol_cv_errno_thread_specific != yes \
16635                 -o $ol_cv_h_errno_thread_specific != yes ; then
16636                 LIBS="$LTHREAD_LIBS $LIBS"
16637                 LTHREAD_LIBS=""
16638         fi
16639
16640 fi  
16641
16642 if test $ol_link_threads = no ; then
16643         if test $ol_with_threads = yes ; then
16644                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16645         fi
16646
16647         if test $ol_with_threads = auto ; then
16648                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16649                 ol_with_threads=no
16650         fi
16651
16652         cat >> confdefs.h <<\EOF
16653 #define NO_THREADS 1
16654 EOF
16655
16656         LTHREAD_LIBS=""
16657 fi
16658
16659 if test $ol_link_threads != no ; then
16660         cat >> confdefs.h <<\EOF
16661 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16662 EOF
16663
16664 fi
16665
16666 for ac_func in \
16667         ctime_r                 \
16668         gethostbyname_r gethostbyaddr_r \
16669
16670 do
16671 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16672 echo "configure:16673: checking for $ac_func" >&5
16673 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16674   echo $ac_n "(cached) $ac_c" 1>&6
16675 else
16676   cat > conftest.$ac_ext <<EOF
16677 #line 16678 "configure"
16678 #include "confdefs.h"
16679 /* System header to define __stub macros and hopefully few prototypes,
16680     which can conflict with char $ac_func(); below.  */
16681 #include <assert.h>
16682 /* Override any gcc2 internal prototype to avoid an error.  */
16683 /* We use char because int might match the return type of a gcc2
16684     builtin and then its argument prototype would still apply.  */
16685 char $ac_func();
16686 char (*f)();
16687
16688 int main() {
16689
16690 /* The GNU C library defines this for functions which it implements
16691     to always fail with ENOSYS.  Some functions are actually named
16692     something starting with __ and the normal name is an alias.  */
16693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16694 choke me
16695 #else
16696 f = $ac_func;
16697 #endif
16698
16699 ; return 0; }
16700 EOF
16701 if { (eval echo configure:16702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16702   rm -rf conftest*
16703   eval "ac_cv_func_$ac_func=yes"
16704 else
16705   echo "configure: failed program was:" >&5
16706   cat conftest.$ac_ext >&5
16707   rm -rf conftest*
16708   eval "ac_cv_func_$ac_func=no"
16709 fi
16710 rm -f conftest*
16711 fi
16712
16713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16714   echo "$ac_t""yes" 1>&6
16715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16716   cat >> confdefs.h <<EOF
16717 #define $ac_tr_func 1
16718 EOF
16719  
16720 else
16721   echo "$ac_t""no" 1>&6
16722 fi
16723 done
16724
16725
16726 if test "$ac_cv_func_ctime_r" = no ; then
16727         ol_cv_func_ctime_r_nargs=0
16728 else
16729         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16730 echo "configure:16731: checking number of arguments of ctime_r" >&5
16731 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16732   echo $ac_n "(cached) $ac_c" 1>&6
16733 else
16734   cat > conftest.$ac_ext <<EOF
16735 #line 16736 "configure"
16736 #include "confdefs.h"
16737 #include <time.h>
16738 int main() {
16739 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16740 ; return 0; }
16741 EOF
16742 if { (eval echo configure:16743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16743   rm -rf conftest*
16744   ol_cv_func_ctime_r_nargs3=yes
16745 else
16746   echo "configure: failed program was:" >&5
16747   cat conftest.$ac_ext >&5
16748   rm -rf conftest*
16749   ol_cv_func_ctime_r_nargs3=no
16750 fi
16751 rm -f conftest*
16752
16753         cat > conftest.$ac_ext <<EOF
16754 #line 16755 "configure"
16755 #include "confdefs.h"
16756 #include <time.h>
16757 int main() {
16758 time_t ti; char *buffer; ctime_r(&ti,buffer);
16759 ; return 0; }
16760 EOF
16761 if { (eval echo configure:16762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16762   rm -rf conftest*
16763   ol_cv_func_ctime_r_nargs2=yes
16764 else
16765   echo "configure: failed program was:" >&5
16766   cat conftest.$ac_ext >&5
16767   rm -rf conftest*
16768   ol_cv_func_ctime_r_nargs2=no
16769 fi
16770 rm -f conftest*
16771
16772         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16773                 $ol_cv_func_ctime_r_nargs2 = no ; then
16774
16775                 ol_cv_func_ctime_r_nargs=3
16776
16777         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16778                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16779
16780                 ol_cv_func_ctime_r_nargs=2
16781
16782         else
16783                 ol_cv_func_ctime_r_nargs=0
16784         fi
16785   
16786 fi
16787
16788 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16789
16790   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16791         cat >> confdefs.h <<EOF
16792 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16793 EOF
16794
16795   fi
16796
16797 fi
16798
16799 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16800         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16801 echo "configure:16802: checking number of arguments of gethostbyname_r" >&5
16802 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16803   echo $ac_n "(cached) $ac_c" 1>&6
16804 else
16805   cat > conftest.$ac_ext <<EOF
16806 #line 16807 "configure"
16807 #include "confdefs.h"
16808 #include <sys/types.h>
16809 #include <sys/socket.h>
16810 #include <netinet/in.h>
16811 #include <netdb.h>
16812 #define BUFSIZE (sizeof(struct hostent)+10)
16813 int main() {
16814 struct hostent hent; char buffer[BUFSIZE];
16815                 int bufsize=BUFSIZE;int h_errno;
16816                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16817                         buffer, bufsize, &h_errno);
16818 ; return 0; }
16819 EOF
16820 if { (eval echo configure:16821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16821   rm -rf conftest*
16822   ol_cv_func_gethostbyname_r_nargs5=yes
16823 else
16824   echo "configure: failed program was:" >&5
16825   cat conftest.$ac_ext >&5
16826   rm -rf conftest*
16827   ol_cv_func_gethostbyname_r_nargs5=no
16828 fi
16829 rm -f conftest*
16830
16831         cat > conftest.$ac_ext <<EOF
16832 #line 16833 "configure"
16833 #include "confdefs.h"
16834 #include <sys/types.h>
16835 #include <sys/socket.h>
16836 #include <netinet/in.h>
16837 #include <netdb.h>
16838 #define BUFSIZE (sizeof(struct hostent)+10)
16839 int main() {
16840 struct hostent hent;struct hostent *rhent;
16841                 char buffer[BUFSIZE];
16842                 int bufsize=BUFSIZE;int h_errno;
16843                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16844                         &rhent, &h_errno);
16845 ; return 0; }
16846 EOF
16847 if { (eval echo configure:16848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16848   rm -rf conftest*
16849   ol_cv_func_gethostbyname_r_nargs6=yes
16850 else
16851   echo "configure: failed program was:" >&5
16852   cat conftest.$ac_ext >&5
16853   rm -rf conftest*
16854   ol_cv_func_gethostbyname_r_nargs6=no
16855 fi
16856 rm -f conftest*
16857
16858         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16859                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16860
16861                 ol_cv_func_gethostbyname_r_nargs=5
16862
16863         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16864                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16865
16866                 ol_cv_func_gethostbyname_r_nargs=6
16867
16868         else
16869                 ol_cv_func_gethostbyname_r_nargs=0
16870         fi
16871   
16872 fi
16873
16874 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16875   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16876         cat >> confdefs.h <<EOF
16877 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16878 EOF
16879
16880   fi
16881
16882 else
16883         ol_cv_func_gethostbyname_r_nargs=0
16884 fi
16885  
16886 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16887         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16888 echo "configure:16889: checking number of arguments of gethostbyaddr_r" >&5
16889 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16890   echo $ac_n "(cached) $ac_c" 1>&6
16891 else
16892   cat > conftest.$ac_ext <<EOF
16893 #line 16894 "configure"
16894 #include "confdefs.h"
16895 #include <sys/types.h>
16896 #include <sys/socket.h>
16897 #include <netinet/in.h>
16898 #include <netdb.h>
16899 #define BUFSIZE (sizeof(struct hostent)+10)
16900 int main() {
16901 struct hostent hent; char buffer[BUFSIZE]; 
16902             struct in_addr add;
16903             size_t alen=sizeof(struct in_addr);
16904             int bufsize=BUFSIZE;int h_errno;
16905                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16906                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16907 ; return 0; }
16908 EOF
16909 if { (eval echo configure:16910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16910   rm -rf conftest*
16911   ol_cv_func_gethostbyaddr_r_nargs7=yes
16912 else
16913   echo "configure: failed program was:" >&5
16914   cat conftest.$ac_ext >&5
16915   rm -rf conftest*
16916   ol_cv_func_gethostbyaddr_r_nargs7=no
16917 fi
16918 rm -f conftest*
16919
16920         cat > conftest.$ac_ext <<EOF
16921 #line 16922 "configure"
16922 #include "confdefs.h"
16923 #include <sys/types.h>
16924 #include <sys/socket.h>
16925 #include <netinet/in.h>
16926 #include <netdb.h>
16927 #define BUFSIZE (sizeof(struct hostent)+10)
16928 int main() {
16929 struct hostent hent;
16930                 struct hostent *rhent; char buffer[BUFSIZE]; 
16931                 struct in_addr add;
16932                 size_t alen=sizeof(struct in_addr);
16933                 int bufsize=BUFSIZE;int h_errno;
16934                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16935                         alen, AF_INET, &hent, buffer, bufsize, 
16936                         &rhent, &h_errno);
16937 ; return 0; }
16938 EOF
16939 if { (eval echo configure:16940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16940   rm -rf conftest*
16941   ol_cv_func_gethostbyaddr_r_nargs8=yes
16942 else
16943   echo "configure: failed program was:" >&5
16944   cat conftest.$ac_ext >&5
16945   rm -rf conftest*
16946   ol_cv_func_gethostbyaddr_r_nargs8=no
16947 fi
16948 rm -f conftest*
16949
16950         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16951                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16952
16953                 ol_cv_func_gethostbyaddr_r_nargs=7
16954
16955         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16956                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16957
16958                 ol_cv_func_gethostbyaddr_r_nargs=8
16959
16960         else
16961                 ol_cv_func_gethostbyaddr_r_nargs=0
16962         fi
16963   
16964 fi
16965
16966 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16967   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16968     cat >> confdefs.h <<EOF
16969 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16970 EOF
16971
16972   fi
16973
16974 else
16975         ol_cv_func_gethostbyaddr_r_nargs=0
16976 fi
16977
16978 ol_link_ldbm=no 
16979
16980 if test $ol_with_ldbm_api = auto \
16981         -o $ol_with_ldbm_api = berkeley \
16982         -o $ol_with_ldbm_api = bcompat ; then
16983
16984         if test $ol_with_ldbm_api = bcompat; then \
16985                 for ac_hdr in db_185.h db.h
16986 do
16987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16989 echo "configure:16990: checking for $ac_hdr" >&5
16990 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16991   echo $ac_n "(cached) $ac_c" 1>&6
16992 else
16993   cat > conftest.$ac_ext <<EOF
16994 #line 16995 "configure"
16995 #include "confdefs.h"
16996 #include <$ac_hdr>
16997 EOF
16998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16999 { (eval echo configure:17000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17001 if test -z "$ac_err"; then
17002   rm -rf conftest*
17003   eval "ac_cv_header_$ac_safe=yes"
17004 else
17005   echo "$ac_err" >&5
17006   echo "configure: failed program was:" >&5
17007   cat conftest.$ac_ext >&5
17008   rm -rf conftest*
17009   eval "ac_cv_header_$ac_safe=no"
17010 fi
17011 rm -f conftest*
17012 fi
17013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17014   echo "$ac_t""yes" 1>&6
17015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17016   cat >> confdefs.h <<EOF
17017 #define $ac_tr_hdr 1
17018 EOF
17019  
17020 else
17021   echo "$ac_t""no" 1>&6
17022 fi
17023 done
17024
17025 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17026         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17027 echo "configure:17028: checking if Berkeley DB header compatibility" >&5
17028 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17029   echo $ac_n "(cached) $ac_c" 1>&6
17030 else
17031   
17032                 cat > conftest.$ac_ext <<EOF
17033 #line 17034 "configure"
17034 #include "confdefs.h"
17035
17036 #if HAVE_DB_185_H
17037 #       include <db_185.h>
17038 #else
17039 #       include <db.h>
17040 #endif
17041
17042  /* this check could be improved */
17043 #ifndef DB_VERSION_MAJOR
17044 #       define DB_VERSION_MAJOR 1
17045 #endif
17046
17047 #if DB_VERSION_MAJOR == 1 
17048         __db_version_1
17049 #endif
17050
17051 EOF
17052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17053   egrep "__db_version_1" >/dev/null 2>&1; then
17054   rm -rf conftest*
17055   ol_cv_header_db1=yes
17056 else
17057   rm -rf conftest*
17058   ol_cv_header_db1=no
17059 fi
17060 rm -f conftest*
17061
17062 fi
17063
17064 echo "$ac_t""$ol_cv_header_db1" 1>&6
17065
17066         if test $ol_cv_header_db1 = yes ; then
17067                 ol_cv_lib_db=no
17068 if test $ol_cv_lib_db = no ; then
17069         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17070 echo "configure:17071: checking for Berkeley DB link (default)" >&5
17071 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17072   echo $ac_n "(cached) $ac_c" 1>&6
17073 else
17074   
17075         ol_DB_LIB=
17076         ol_LIBS=$LIBS
17077         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17078
17079         cat > conftest.$ac_ext <<EOF
17080 #line 17081 "configure"
17081 #include "confdefs.h"
17082
17083 #ifdef HAVE_DB_185_H
17084 # include <db_185.h>
17085 #else
17086 # include <db.h>
17087 #endif
17088
17089 #ifndef DB_VERSION_MAJOR
17090 # define DB_VERSION_MAJOR 1
17091 #endif
17092
17093 #ifndef NULL
17094 #define NULL ((void*)0)
17095 #endif
17096
17097 int main() {
17098
17099 #if DB_VERSION_MAJOR > 1
17100         {
17101                 char *version;
17102                 int major, minor, patch;
17103
17104                 version = db_version( &major, &minor, &patch );
17105
17106                 if( major != DB_VERSION_MAJOR ||
17107                         minor < DB_VERSION_MINOR )
17108                 {
17109                         printf("Berkeley DB version mismatch\n"
17110                                 "\theader: %s\n\tlibrary: %s\n",
17111                                 DB_VERSION_STRING, version);
17112                         return 1;
17113                 }
17114         }
17115 #endif
17116
17117 #if DB_VERSION_MAJOR > 2
17118         db_env_create( NULL, 0 );
17119 #elif DB_VERSION_MAJOR > 1
17120         db_appexit( NULL );
17121 #else
17122         (void) dbopen( NULL, 0, 0, 0, NULL);
17123 #endif
17124
17125 ; return 0; }
17126 EOF
17127 if { (eval echo configure:17128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17128   rm -rf conftest*
17129   ol_cv_db_none=yes
17130 else
17131   echo "configure: failed program was:" >&5
17132   cat conftest.$ac_ext >&5
17133   rm -rf conftest*
17134   ol_cv_db_none=no
17135 fi
17136 rm -f conftest*
17137
17138         LIBS="$ol_LIBS"
17139
17140 fi
17141
17142 echo "$ac_t""$ol_cv_db_none" 1>&6
17143
17144         if test $ol_cv_db_none = yes ; then
17145                 ol_cv_lib_db=yes
17146         fi
17147 fi
17148
17149 if test $ol_cv_lib_db = no ; then
17150         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
17151 echo "configure:17152: checking for Berkeley DB link (-ldb43)" >&5
17152 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
17153   echo $ac_n "(cached) $ac_c" 1>&6
17154 else
17155   
17156         ol_DB_LIB=-ldb43
17157         ol_LIBS=$LIBS
17158         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17159
17160         cat > conftest.$ac_ext <<EOF
17161 #line 17162 "configure"
17162 #include "confdefs.h"
17163
17164 #ifdef HAVE_DB_185_H
17165 # include <db_185.h>
17166 #else
17167 # include <db.h>
17168 #endif
17169
17170 #ifndef DB_VERSION_MAJOR
17171 # define DB_VERSION_MAJOR 1
17172 #endif
17173
17174 #ifndef NULL
17175 #define NULL ((void*)0)
17176 #endif
17177
17178 int main() {
17179
17180 #if DB_VERSION_MAJOR > 1
17181         {
17182                 char *version;
17183                 int major, minor, patch;
17184
17185                 version = db_version( &major, &minor, &patch );
17186
17187                 if( major != DB_VERSION_MAJOR ||
17188                         minor < DB_VERSION_MINOR )
17189                 {
17190                         printf("Berkeley DB version mismatch\n"
17191                                 "\theader: %s\n\tlibrary: %s\n",
17192                                 DB_VERSION_STRING, version);
17193                         return 1;
17194                 }
17195         }
17196 #endif
17197
17198 #if DB_VERSION_MAJOR > 2
17199         db_env_create( NULL, 0 );
17200 #elif DB_VERSION_MAJOR > 1
17201         db_appexit( NULL );
17202 #else
17203         (void) dbopen( NULL, 0, 0, 0, NULL);
17204 #endif
17205
17206 ; return 0; }
17207 EOF
17208 if { (eval echo configure:17209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17209   rm -rf conftest*
17210   ol_cv_db_db43=yes
17211 else
17212   echo "configure: failed program was:" >&5
17213   cat conftest.$ac_ext >&5
17214   rm -rf conftest*
17215   ol_cv_db_db43=no
17216 fi
17217 rm -f conftest*
17218
17219         LIBS="$ol_LIBS"
17220
17221 fi
17222
17223 echo "$ac_t""$ol_cv_db_db43" 1>&6
17224
17225         if test $ol_cv_db_db43 = yes ; then
17226                 ol_cv_lib_db=-ldb43
17227         fi
17228 fi
17229
17230 if test $ol_cv_lib_db = no ; then
17231         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
17232 echo "configure:17233: checking for Berkeley DB link (-ldb-43)" >&5
17233 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
17234   echo $ac_n "(cached) $ac_c" 1>&6
17235 else
17236   
17237         ol_DB_LIB=-ldb-43
17238         ol_LIBS=$LIBS
17239         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17240
17241         cat > conftest.$ac_ext <<EOF
17242 #line 17243 "configure"
17243 #include "confdefs.h"
17244
17245 #ifdef HAVE_DB_185_H
17246 # include <db_185.h>
17247 #else
17248 # include <db.h>
17249 #endif
17250
17251 #ifndef DB_VERSION_MAJOR
17252 # define DB_VERSION_MAJOR 1
17253 #endif
17254
17255 #ifndef NULL
17256 #define NULL ((void*)0)
17257 #endif
17258
17259 int main() {
17260
17261 #if DB_VERSION_MAJOR > 1
17262         {
17263                 char *version;
17264                 int major, minor, patch;
17265
17266                 version = db_version( &major, &minor, &patch );
17267
17268                 if( major != DB_VERSION_MAJOR ||
17269                         minor < DB_VERSION_MINOR )
17270                 {
17271                         printf("Berkeley DB version mismatch\n"
17272                                 "\theader: %s\n\tlibrary: %s\n",
17273                                 DB_VERSION_STRING, version);
17274                         return 1;
17275                 }
17276         }
17277 #endif
17278
17279 #if DB_VERSION_MAJOR > 2
17280         db_env_create( NULL, 0 );
17281 #elif DB_VERSION_MAJOR > 1
17282         db_appexit( NULL );
17283 #else
17284         (void) dbopen( NULL, 0, 0, 0, NULL);
17285 #endif
17286
17287 ; return 0; }
17288 EOF
17289 if { (eval echo configure:17290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17290   rm -rf conftest*
17291   ol_cv_db_db_43=yes
17292 else
17293   echo "configure: failed program was:" >&5
17294   cat conftest.$ac_ext >&5
17295   rm -rf conftest*
17296   ol_cv_db_db_43=no
17297 fi
17298 rm -f conftest*
17299
17300         LIBS="$ol_LIBS"
17301
17302 fi
17303
17304 echo "$ac_t""$ol_cv_db_db_43" 1>&6
17305
17306         if test $ol_cv_db_db_43 = yes ; then
17307                 ol_cv_lib_db=-ldb-43
17308         fi
17309 fi
17310
17311 if test $ol_cv_lib_db = no ; then
17312         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
17313 echo "configure:17314: checking for Berkeley DB link (-ldb-4.3)" >&5
17314 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
17315   echo $ac_n "(cached) $ac_c" 1>&6
17316 else
17317   
17318         ol_DB_LIB=-ldb-4.3
17319         ol_LIBS=$LIBS
17320         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17321
17322         cat > conftest.$ac_ext <<EOF
17323 #line 17324 "configure"
17324 #include "confdefs.h"
17325
17326 #ifdef HAVE_DB_185_H
17327 # include <db_185.h>
17328 #else
17329 # include <db.h>
17330 #endif
17331
17332 #ifndef DB_VERSION_MAJOR
17333 # define DB_VERSION_MAJOR 1
17334 #endif
17335
17336 #ifndef NULL
17337 #define NULL ((void*)0)
17338 #endif
17339
17340 int main() {
17341
17342 #if DB_VERSION_MAJOR > 1
17343         {
17344                 char *version;
17345                 int major, minor, patch;
17346
17347                 version = db_version( &major, &minor, &patch );
17348
17349                 if( major != DB_VERSION_MAJOR ||
17350                         minor < DB_VERSION_MINOR )
17351                 {
17352                         printf("Berkeley DB version mismatch\n"
17353                                 "\theader: %s\n\tlibrary: %s\n",
17354                                 DB_VERSION_STRING, version);
17355                         return 1;
17356                 }
17357         }
17358 #endif
17359
17360 #if DB_VERSION_MAJOR > 2
17361         db_env_create( NULL, 0 );
17362 #elif DB_VERSION_MAJOR > 1
17363         db_appexit( NULL );
17364 #else
17365         (void) dbopen( NULL, 0, 0, 0, NULL);
17366 #endif
17367
17368 ; return 0; }
17369 EOF
17370 if { (eval echo configure:17371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17371   rm -rf conftest*
17372   ol_cv_db_db_4_dot_3=yes
17373 else
17374   echo "configure: failed program was:" >&5
17375   cat conftest.$ac_ext >&5
17376   rm -rf conftest*
17377   ol_cv_db_db_4_dot_3=no
17378 fi
17379 rm -f conftest*
17380
17381         LIBS="$ol_LIBS"
17382
17383 fi
17384
17385 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
17386
17387         if test $ol_cv_db_db_4_dot_3 = yes ; then
17388                 ol_cv_lib_db=-ldb-4.3
17389         fi
17390 fi
17391
17392 if test $ol_cv_lib_db = no ; then
17393         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
17394 echo "configure:17395: checking for Berkeley DB link (-ldb-4-3)" >&5
17395 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
17396   echo $ac_n "(cached) $ac_c" 1>&6
17397 else
17398   
17399         ol_DB_LIB=-ldb-4-3
17400         ol_LIBS=$LIBS
17401         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17402
17403         cat > conftest.$ac_ext <<EOF
17404 #line 17405 "configure"
17405 #include "confdefs.h"
17406
17407 #ifdef HAVE_DB_185_H
17408 # include <db_185.h>
17409 #else
17410 # include <db.h>
17411 #endif
17412
17413 #ifndef DB_VERSION_MAJOR
17414 # define DB_VERSION_MAJOR 1
17415 #endif
17416
17417 #ifndef NULL
17418 #define NULL ((void*)0)
17419 #endif
17420
17421 int main() {
17422
17423 #if DB_VERSION_MAJOR > 1
17424         {
17425                 char *version;
17426                 int major, minor, patch;
17427
17428                 version = db_version( &major, &minor, &patch );
17429
17430                 if( major != DB_VERSION_MAJOR ||
17431                         minor < DB_VERSION_MINOR )
17432                 {
17433                         printf("Berkeley DB version mismatch\n"
17434                                 "\theader: %s\n\tlibrary: %s\n",
17435                                 DB_VERSION_STRING, version);
17436                         return 1;
17437                 }
17438         }
17439 #endif
17440
17441 #if DB_VERSION_MAJOR > 2
17442         db_env_create( NULL, 0 );
17443 #elif DB_VERSION_MAJOR > 1
17444         db_appexit( NULL );
17445 #else
17446         (void) dbopen( NULL, 0, 0, 0, NULL);
17447 #endif
17448
17449 ; return 0; }
17450 EOF
17451 if { (eval echo configure:17452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17452   rm -rf conftest*
17453   ol_cv_db_db_4_3=yes
17454 else
17455   echo "configure: failed program was:" >&5
17456   cat conftest.$ac_ext >&5
17457   rm -rf conftest*
17458   ol_cv_db_db_4_3=no
17459 fi
17460 rm -f conftest*
17461
17462         LIBS="$ol_LIBS"
17463
17464 fi
17465
17466 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
17467
17468         if test $ol_cv_db_db_4_3 = yes ; then
17469                 ol_cv_lib_db=-ldb-4-3
17470         fi
17471 fi
17472
17473 if test $ol_cv_lib_db = no ; then
17474         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17475 echo "configure:17476: checking for Berkeley DB link (-ldb42)" >&5
17476 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17477   echo $ac_n "(cached) $ac_c" 1>&6
17478 else
17479   
17480         ol_DB_LIB=-ldb42
17481         ol_LIBS=$LIBS
17482         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17483
17484         cat > conftest.$ac_ext <<EOF
17485 #line 17486 "configure"
17486 #include "confdefs.h"
17487
17488 #ifdef HAVE_DB_185_H
17489 # include <db_185.h>
17490 #else
17491 # include <db.h>
17492 #endif
17493
17494 #ifndef DB_VERSION_MAJOR
17495 # define DB_VERSION_MAJOR 1
17496 #endif
17497
17498 #ifndef NULL
17499 #define NULL ((void*)0)
17500 #endif
17501
17502 int main() {
17503
17504 #if DB_VERSION_MAJOR > 1
17505         {
17506                 char *version;
17507                 int major, minor, patch;
17508
17509                 version = db_version( &major, &minor, &patch );
17510
17511                 if( major != DB_VERSION_MAJOR ||
17512                         minor < DB_VERSION_MINOR )
17513                 {
17514                         printf("Berkeley DB version mismatch\n"
17515                                 "\theader: %s\n\tlibrary: %s\n",
17516                                 DB_VERSION_STRING, version);
17517                         return 1;
17518                 }
17519         }
17520 #endif
17521
17522 #if DB_VERSION_MAJOR > 2
17523         db_env_create( NULL, 0 );
17524 #elif DB_VERSION_MAJOR > 1
17525         db_appexit( NULL );
17526 #else
17527         (void) dbopen( NULL, 0, 0, 0, NULL);
17528 #endif
17529
17530 ; return 0; }
17531 EOF
17532 if { (eval echo configure:17533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17533   rm -rf conftest*
17534   ol_cv_db_db42=yes
17535 else
17536   echo "configure: failed program was:" >&5
17537   cat conftest.$ac_ext >&5
17538   rm -rf conftest*
17539   ol_cv_db_db42=no
17540 fi
17541 rm -f conftest*
17542
17543         LIBS="$ol_LIBS"
17544
17545 fi
17546
17547 echo "$ac_t""$ol_cv_db_db42" 1>&6
17548
17549         if test $ol_cv_db_db42 = yes ; then
17550                 ol_cv_lib_db=-ldb42
17551         fi
17552 fi
17553
17554 if test $ol_cv_lib_db = no ; then
17555         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17556 echo "configure:17557: checking for Berkeley DB link (-ldb-42)" >&5
17557 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17558   echo $ac_n "(cached) $ac_c" 1>&6
17559 else
17560   
17561         ol_DB_LIB=-ldb-42
17562         ol_LIBS=$LIBS
17563         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17564
17565         cat > conftest.$ac_ext <<EOF
17566 #line 17567 "configure"
17567 #include "confdefs.h"
17568
17569 #ifdef HAVE_DB_185_H
17570 # include <db_185.h>
17571 #else
17572 # include <db.h>
17573 #endif
17574
17575 #ifndef DB_VERSION_MAJOR
17576 # define DB_VERSION_MAJOR 1
17577 #endif
17578
17579 #ifndef NULL
17580 #define NULL ((void*)0)
17581 #endif
17582
17583 int main() {
17584
17585 #if DB_VERSION_MAJOR > 1
17586         {
17587                 char *version;
17588                 int major, minor, patch;
17589
17590                 version = db_version( &major, &minor, &patch );
17591
17592                 if( major != DB_VERSION_MAJOR ||
17593                         minor < DB_VERSION_MINOR )
17594                 {
17595                         printf("Berkeley DB version mismatch\n"
17596                                 "\theader: %s\n\tlibrary: %s\n",
17597                                 DB_VERSION_STRING, version);
17598                         return 1;
17599                 }
17600         }
17601 #endif
17602
17603 #if DB_VERSION_MAJOR > 2
17604         db_env_create( NULL, 0 );
17605 #elif DB_VERSION_MAJOR > 1
17606         db_appexit( NULL );
17607 #else
17608         (void) dbopen( NULL, 0, 0, 0, NULL);
17609 #endif
17610
17611 ; return 0; }
17612 EOF
17613 if { (eval echo configure:17614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17614   rm -rf conftest*
17615   ol_cv_db_db_42=yes
17616 else
17617   echo "configure: failed program was:" >&5
17618   cat conftest.$ac_ext >&5
17619   rm -rf conftest*
17620   ol_cv_db_db_42=no
17621 fi
17622 rm -f conftest*
17623
17624         LIBS="$ol_LIBS"
17625
17626 fi
17627
17628 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17629
17630         if test $ol_cv_db_db_42 = yes ; then
17631                 ol_cv_lib_db=-ldb-42
17632         fi
17633 fi
17634
17635 if test $ol_cv_lib_db = no ; then
17636         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17637 echo "configure:17638: checking for Berkeley DB link (-ldb-4.2)" >&5
17638 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17639   echo $ac_n "(cached) $ac_c" 1>&6
17640 else
17641   
17642         ol_DB_LIB=-ldb-4.2
17643         ol_LIBS=$LIBS
17644         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17645
17646         cat > conftest.$ac_ext <<EOF
17647 #line 17648 "configure"
17648 #include "confdefs.h"
17649
17650 #ifdef HAVE_DB_185_H
17651 # include <db_185.h>
17652 #else
17653 # include <db.h>
17654 #endif
17655
17656 #ifndef DB_VERSION_MAJOR
17657 # define DB_VERSION_MAJOR 1
17658 #endif
17659
17660 #ifndef NULL
17661 #define NULL ((void*)0)
17662 #endif
17663
17664 int main() {
17665
17666 #if DB_VERSION_MAJOR > 1
17667         {
17668                 char *version;
17669                 int major, minor, patch;
17670
17671                 version = db_version( &major, &minor, &patch );
17672
17673                 if( major != DB_VERSION_MAJOR ||
17674                         minor < DB_VERSION_MINOR )
17675                 {
17676                         printf("Berkeley DB version mismatch\n"
17677                                 "\theader: %s\n\tlibrary: %s\n",
17678                                 DB_VERSION_STRING, version);
17679                         return 1;
17680                 }
17681         }
17682 #endif
17683
17684 #if DB_VERSION_MAJOR > 2
17685         db_env_create( NULL, 0 );
17686 #elif DB_VERSION_MAJOR > 1
17687         db_appexit( NULL );
17688 #else
17689         (void) dbopen( NULL, 0, 0, 0, NULL);
17690 #endif
17691
17692 ; return 0; }
17693 EOF
17694 if { (eval echo configure:17695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17695   rm -rf conftest*
17696   ol_cv_db_db_4_dot_2=yes
17697 else
17698   echo "configure: failed program was:" >&5
17699   cat conftest.$ac_ext >&5
17700   rm -rf conftest*
17701   ol_cv_db_db_4_dot_2=no
17702 fi
17703 rm -f conftest*
17704
17705         LIBS="$ol_LIBS"
17706
17707 fi
17708
17709 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17710
17711         if test $ol_cv_db_db_4_dot_2 = yes ; then
17712                 ol_cv_lib_db=-ldb-4.2
17713         fi
17714 fi
17715
17716 if test $ol_cv_lib_db = no ; then
17717         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17718 echo "configure:17719: checking for Berkeley DB link (-ldb-4-2)" >&5
17719 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17720   echo $ac_n "(cached) $ac_c" 1>&6
17721 else
17722   
17723         ol_DB_LIB=-ldb-4-2
17724         ol_LIBS=$LIBS
17725         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17726
17727         cat > conftest.$ac_ext <<EOF
17728 #line 17729 "configure"
17729 #include "confdefs.h"
17730
17731 #ifdef HAVE_DB_185_H
17732 # include <db_185.h>
17733 #else
17734 # include <db.h>
17735 #endif
17736
17737 #ifndef DB_VERSION_MAJOR
17738 # define DB_VERSION_MAJOR 1
17739 #endif
17740
17741 #ifndef NULL
17742 #define NULL ((void*)0)
17743 #endif
17744
17745 int main() {
17746
17747 #if DB_VERSION_MAJOR > 1
17748         {
17749                 char *version;
17750                 int major, minor, patch;
17751
17752                 version = db_version( &major, &minor, &patch );
17753
17754                 if( major != DB_VERSION_MAJOR ||
17755                         minor < DB_VERSION_MINOR )
17756                 {
17757                         printf("Berkeley DB version mismatch\n"
17758                                 "\theader: %s\n\tlibrary: %s\n",
17759                                 DB_VERSION_STRING, version);
17760                         return 1;
17761                 }
17762         }
17763 #endif
17764
17765 #if DB_VERSION_MAJOR > 2
17766         db_env_create( NULL, 0 );
17767 #elif DB_VERSION_MAJOR > 1
17768         db_appexit( NULL );
17769 #else
17770         (void) dbopen( NULL, 0, 0, 0, NULL);
17771 #endif
17772
17773 ; return 0; }
17774 EOF
17775 if { (eval echo configure:17776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17776   rm -rf conftest*
17777   ol_cv_db_db_4_2=yes
17778 else
17779   echo "configure: failed program was:" >&5
17780   cat conftest.$ac_ext >&5
17781   rm -rf conftest*
17782   ol_cv_db_db_4_2=no
17783 fi
17784 rm -f conftest*
17785
17786         LIBS="$ol_LIBS"
17787
17788 fi
17789
17790 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17791
17792         if test $ol_cv_db_db_4_2 = yes ; then
17793                 ol_cv_lib_db=-ldb-4-2
17794         fi
17795 fi
17796
17797 if test $ol_cv_lib_db = no ; then
17798         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17799 echo "configure:17800: checking for Berkeley DB link (-ldb-4)" >&5
17800 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17801   echo $ac_n "(cached) $ac_c" 1>&6
17802 else
17803   
17804         ol_DB_LIB=-ldb-4
17805         ol_LIBS=$LIBS
17806         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17807
17808         cat > conftest.$ac_ext <<EOF
17809 #line 17810 "configure"
17810 #include "confdefs.h"
17811
17812 #ifdef HAVE_DB_185_H
17813 # include <db_185.h>
17814 #else
17815 # include <db.h>
17816 #endif
17817
17818 #ifndef DB_VERSION_MAJOR
17819 # define DB_VERSION_MAJOR 1
17820 #endif
17821
17822 #ifndef NULL
17823 #define NULL ((void*)0)
17824 #endif
17825
17826 int main() {
17827
17828 #if DB_VERSION_MAJOR > 1
17829         {
17830                 char *version;
17831                 int major, minor, patch;
17832
17833                 version = db_version( &major, &minor, &patch );
17834
17835                 if( major != DB_VERSION_MAJOR ||
17836                         minor < DB_VERSION_MINOR )
17837                 {
17838                         printf("Berkeley DB version mismatch\n"
17839                                 "\theader: %s\n\tlibrary: %s\n",
17840                                 DB_VERSION_STRING, version);
17841                         return 1;
17842                 }
17843         }
17844 #endif
17845
17846 #if DB_VERSION_MAJOR > 2
17847         db_env_create( NULL, 0 );
17848 #elif DB_VERSION_MAJOR > 1
17849         db_appexit( NULL );
17850 #else
17851         (void) dbopen( NULL, 0, 0, 0, NULL);
17852 #endif
17853
17854 ; return 0; }
17855 EOF
17856 if { (eval echo configure:17857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17857   rm -rf conftest*
17858   ol_cv_db_db_4=yes
17859 else
17860   echo "configure: failed program was:" >&5
17861   cat conftest.$ac_ext >&5
17862   rm -rf conftest*
17863   ol_cv_db_db_4=no
17864 fi
17865 rm -f conftest*
17866
17867         LIBS="$ol_LIBS"
17868
17869 fi
17870
17871 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17872
17873         if test $ol_cv_db_db_4 = yes ; then
17874                 ol_cv_lib_db=-ldb-4
17875         fi
17876 fi
17877
17878 if test $ol_cv_lib_db = no ; then
17879         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17880 echo "configure:17881: checking for Berkeley DB link (-ldb4)" >&5
17881 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17882   echo $ac_n "(cached) $ac_c" 1>&6
17883 else
17884   
17885         ol_DB_LIB=-ldb4
17886         ol_LIBS=$LIBS
17887         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17888
17889         cat > conftest.$ac_ext <<EOF
17890 #line 17891 "configure"
17891 #include "confdefs.h"
17892
17893 #ifdef HAVE_DB_185_H
17894 # include <db_185.h>
17895 #else
17896 # include <db.h>
17897 #endif
17898
17899 #ifndef DB_VERSION_MAJOR
17900 # define DB_VERSION_MAJOR 1
17901 #endif
17902
17903 #ifndef NULL
17904 #define NULL ((void*)0)
17905 #endif
17906
17907 int main() {
17908
17909 #if DB_VERSION_MAJOR > 1
17910         {
17911                 char *version;
17912                 int major, minor, patch;
17913
17914                 version = db_version( &major, &minor, &patch );
17915
17916                 if( major != DB_VERSION_MAJOR ||
17917                         minor < DB_VERSION_MINOR )
17918                 {
17919                         printf("Berkeley DB version mismatch\n"
17920                                 "\theader: %s\n\tlibrary: %s\n",
17921                                 DB_VERSION_STRING, version);
17922                         return 1;
17923                 }
17924         }
17925 #endif
17926
17927 #if DB_VERSION_MAJOR > 2
17928         db_env_create( NULL, 0 );
17929 #elif DB_VERSION_MAJOR > 1
17930         db_appexit( NULL );
17931 #else
17932         (void) dbopen( NULL, 0, 0, 0, NULL);
17933 #endif
17934
17935 ; return 0; }
17936 EOF
17937 if { (eval echo configure:17938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17938   rm -rf conftest*
17939   ol_cv_db_db4=yes
17940 else
17941   echo "configure: failed program was:" >&5
17942   cat conftest.$ac_ext >&5
17943   rm -rf conftest*
17944   ol_cv_db_db4=no
17945 fi
17946 rm -f conftest*
17947
17948         LIBS="$ol_LIBS"
17949
17950 fi
17951
17952 echo "$ac_t""$ol_cv_db_db4" 1>&6
17953
17954         if test $ol_cv_db_db4 = yes ; then
17955                 ol_cv_lib_db=-ldb4
17956         fi
17957 fi
17958
17959 if test $ol_cv_lib_db = no ; then
17960         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17961 echo "configure:17962: checking for Berkeley DB link (-ldb)" >&5
17962 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17963   echo $ac_n "(cached) $ac_c" 1>&6
17964 else
17965   
17966         ol_DB_LIB=-ldb
17967         ol_LIBS=$LIBS
17968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17969
17970         cat > conftest.$ac_ext <<EOF
17971 #line 17972 "configure"
17972 #include "confdefs.h"
17973
17974 #ifdef HAVE_DB_185_H
17975 # include <db_185.h>
17976 #else
17977 # include <db.h>
17978 #endif
17979
17980 #ifndef DB_VERSION_MAJOR
17981 # define DB_VERSION_MAJOR 1
17982 #endif
17983
17984 #ifndef NULL
17985 #define NULL ((void*)0)
17986 #endif
17987
17988 int main() {
17989
17990 #if DB_VERSION_MAJOR > 1
17991         {
17992                 char *version;
17993                 int major, minor, patch;
17994
17995                 version = db_version( &major, &minor, &patch );
17996
17997                 if( major != DB_VERSION_MAJOR ||
17998                         minor < DB_VERSION_MINOR )
17999                 {
18000                         printf("Berkeley DB version mismatch\n"
18001                                 "\theader: %s\n\tlibrary: %s\n",
18002                                 DB_VERSION_STRING, version);
18003                         return 1;
18004                 }
18005         }
18006 #endif
18007
18008 #if DB_VERSION_MAJOR > 2
18009         db_env_create( NULL, 0 );
18010 #elif DB_VERSION_MAJOR > 1
18011         db_appexit( NULL );
18012 #else
18013         (void) dbopen( NULL, 0, 0, 0, NULL);
18014 #endif
18015
18016 ; return 0; }
18017 EOF
18018 if { (eval echo configure:18019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18019   rm -rf conftest*
18020   ol_cv_db_db=yes
18021 else
18022   echo "configure: failed program was:" >&5
18023   cat conftest.$ac_ext >&5
18024   rm -rf conftest*
18025   ol_cv_db_db=no
18026 fi
18027 rm -f conftest*
18028
18029         LIBS="$ol_LIBS"
18030
18031 fi
18032
18033 echo "$ac_t""$ol_cv_db_db" 1>&6
18034
18035         if test $ol_cv_db_db = yes ; then
18036                 ol_cv_lib_db=-ldb
18037         fi
18038 fi
18039
18040 if test $ol_cv_lib_db = no ; then
18041         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18042 echo "configure:18043: checking for Berkeley DB link (-ldb41)" >&5
18043 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18044   echo $ac_n "(cached) $ac_c" 1>&6
18045 else
18046   
18047         ol_DB_LIB=-ldb41
18048         ol_LIBS=$LIBS
18049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18050
18051         cat > conftest.$ac_ext <<EOF
18052 #line 18053 "configure"
18053 #include "confdefs.h"
18054
18055 #ifdef HAVE_DB_185_H
18056 # include <db_185.h>
18057 #else
18058 # include <db.h>
18059 #endif
18060
18061 #ifndef DB_VERSION_MAJOR
18062 # define DB_VERSION_MAJOR 1
18063 #endif
18064
18065 #ifndef NULL
18066 #define NULL ((void*)0)
18067 #endif
18068
18069 int main() {
18070
18071 #if DB_VERSION_MAJOR > 1
18072         {
18073                 char *version;
18074                 int major, minor, patch;
18075
18076                 version = db_version( &major, &minor, &patch );
18077
18078                 if( major != DB_VERSION_MAJOR ||
18079                         minor < DB_VERSION_MINOR )
18080                 {
18081                         printf("Berkeley DB version mismatch\n"
18082                                 "\theader: %s\n\tlibrary: %s\n",
18083                                 DB_VERSION_STRING, version);
18084                         return 1;
18085                 }
18086         }
18087 #endif
18088
18089 #if DB_VERSION_MAJOR > 2
18090         db_env_create( NULL, 0 );
18091 #elif DB_VERSION_MAJOR > 1
18092         db_appexit( NULL );
18093 #else
18094         (void) dbopen( NULL, 0, 0, 0, NULL);
18095 #endif
18096
18097 ; return 0; }
18098 EOF
18099 if { (eval echo configure:18100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18100   rm -rf conftest*
18101   ol_cv_db_db41=yes
18102 else
18103   echo "configure: failed program was:" >&5
18104   cat conftest.$ac_ext >&5
18105   rm -rf conftest*
18106   ol_cv_db_db41=no
18107 fi
18108 rm -f conftest*
18109
18110         LIBS="$ol_LIBS"
18111
18112 fi
18113
18114 echo "$ac_t""$ol_cv_db_db41" 1>&6
18115
18116         if test $ol_cv_db_db41 = yes ; then
18117                 ol_cv_lib_db=-ldb41
18118         fi
18119 fi
18120
18121 if test $ol_cv_lib_db = no ; then
18122         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18123 echo "configure:18124: checking for Berkeley DB link (-ldb-41)" >&5
18124 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18125   echo $ac_n "(cached) $ac_c" 1>&6
18126 else
18127   
18128         ol_DB_LIB=-ldb-41
18129         ol_LIBS=$LIBS
18130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18131
18132         cat > conftest.$ac_ext <<EOF
18133 #line 18134 "configure"
18134 #include "confdefs.h"
18135
18136 #ifdef HAVE_DB_185_H
18137 # include <db_185.h>
18138 #else
18139 # include <db.h>
18140 #endif
18141
18142 #ifndef DB_VERSION_MAJOR
18143 # define DB_VERSION_MAJOR 1
18144 #endif
18145
18146 #ifndef NULL
18147 #define NULL ((void*)0)
18148 #endif
18149
18150 int main() {
18151
18152 #if DB_VERSION_MAJOR > 1
18153         {
18154                 char *version;
18155                 int major, minor, patch;
18156
18157                 version = db_version( &major, &minor, &patch );
18158
18159                 if( major != DB_VERSION_MAJOR ||
18160                         minor < DB_VERSION_MINOR )
18161                 {
18162                         printf("Berkeley DB version mismatch\n"
18163                                 "\theader: %s\n\tlibrary: %s\n",
18164                                 DB_VERSION_STRING, version);
18165                         return 1;
18166                 }
18167         }
18168 #endif
18169
18170 #if DB_VERSION_MAJOR > 2
18171         db_env_create( NULL, 0 );
18172 #elif DB_VERSION_MAJOR > 1
18173         db_appexit( NULL );
18174 #else
18175         (void) dbopen( NULL, 0, 0, 0, NULL);
18176 #endif
18177
18178 ; return 0; }
18179 EOF
18180 if { (eval echo configure:18181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18181   rm -rf conftest*
18182   ol_cv_db_db_41=yes
18183 else
18184   echo "configure: failed program was:" >&5
18185   cat conftest.$ac_ext >&5
18186   rm -rf conftest*
18187   ol_cv_db_db_41=no
18188 fi
18189 rm -f conftest*
18190
18191         LIBS="$ol_LIBS"
18192
18193 fi
18194
18195 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18196
18197         if test $ol_cv_db_db_41 = yes ; then
18198                 ol_cv_lib_db=-ldb-41
18199         fi
18200 fi
18201
18202 if test $ol_cv_lib_db = no ; then
18203         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18204 echo "configure:18205: checking for Berkeley DB link (-ldb-4.1)" >&5
18205 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18206   echo $ac_n "(cached) $ac_c" 1>&6
18207 else
18208   
18209         ol_DB_LIB=-ldb-4.1
18210         ol_LIBS=$LIBS
18211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18212
18213         cat > conftest.$ac_ext <<EOF
18214 #line 18215 "configure"
18215 #include "confdefs.h"
18216
18217 #ifdef HAVE_DB_185_H
18218 # include <db_185.h>
18219 #else
18220 # include <db.h>
18221 #endif
18222
18223 #ifndef DB_VERSION_MAJOR
18224 # define DB_VERSION_MAJOR 1
18225 #endif
18226
18227 #ifndef NULL
18228 #define NULL ((void*)0)
18229 #endif
18230
18231 int main() {
18232
18233 #if DB_VERSION_MAJOR > 1
18234         {
18235                 char *version;
18236                 int major, minor, patch;
18237
18238                 version = db_version( &major, &minor, &patch );
18239
18240                 if( major != DB_VERSION_MAJOR ||
18241                         minor < DB_VERSION_MINOR )
18242                 {
18243                         printf("Berkeley DB version mismatch\n"
18244                                 "\theader: %s\n\tlibrary: %s\n",
18245                                 DB_VERSION_STRING, version);
18246                         return 1;
18247                 }
18248         }
18249 #endif
18250
18251 #if DB_VERSION_MAJOR > 2
18252         db_env_create( NULL, 0 );
18253 #elif DB_VERSION_MAJOR > 1
18254         db_appexit( NULL );
18255 #else
18256         (void) dbopen( NULL, 0, 0, 0, NULL);
18257 #endif
18258
18259 ; return 0; }
18260 EOF
18261 if { (eval echo configure:18262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18262   rm -rf conftest*
18263   ol_cv_db_db_4_dot_1=yes
18264 else
18265   echo "configure: failed program was:" >&5
18266   cat conftest.$ac_ext >&5
18267   rm -rf conftest*
18268   ol_cv_db_db_4_dot_1=no
18269 fi
18270 rm -f conftest*
18271
18272         LIBS="$ol_LIBS"
18273
18274 fi
18275
18276 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18277
18278         if test $ol_cv_db_db_4_dot_1 = yes ; then
18279                 ol_cv_lib_db=-ldb-4.1
18280         fi
18281 fi
18282
18283 if test $ol_cv_lib_db = no ; then
18284         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18285 echo "configure:18286: checking for Berkeley DB link (-ldb-4-1)" >&5
18286 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18287   echo $ac_n "(cached) $ac_c" 1>&6
18288 else
18289   
18290         ol_DB_LIB=-ldb-4-1
18291         ol_LIBS=$LIBS
18292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18293
18294         cat > conftest.$ac_ext <<EOF
18295 #line 18296 "configure"
18296 #include "confdefs.h"
18297
18298 #ifdef HAVE_DB_185_H
18299 # include <db_185.h>
18300 #else
18301 # include <db.h>
18302 #endif
18303
18304 #ifndef DB_VERSION_MAJOR
18305 # define DB_VERSION_MAJOR 1
18306 #endif
18307
18308 #ifndef NULL
18309 #define NULL ((void*)0)
18310 #endif
18311
18312 int main() {
18313
18314 #if DB_VERSION_MAJOR > 1
18315         {
18316                 char *version;
18317                 int major, minor, patch;
18318
18319                 version = db_version( &major, &minor, &patch );
18320
18321                 if( major != DB_VERSION_MAJOR ||
18322                         minor < DB_VERSION_MINOR )
18323                 {
18324                         printf("Berkeley DB version mismatch\n"
18325                                 "\theader: %s\n\tlibrary: %s\n",
18326                                 DB_VERSION_STRING, version);
18327                         return 1;
18328                 }
18329         }
18330 #endif
18331
18332 #if DB_VERSION_MAJOR > 2
18333         db_env_create( NULL, 0 );
18334 #elif DB_VERSION_MAJOR > 1
18335         db_appexit( NULL );
18336 #else
18337         (void) dbopen( NULL, 0, 0, 0, NULL);
18338 #endif
18339
18340 ; return 0; }
18341 EOF
18342 if { (eval echo configure:18343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18343   rm -rf conftest*
18344   ol_cv_db_db_4_1=yes
18345 else
18346   echo "configure: failed program was:" >&5
18347   cat conftest.$ac_ext >&5
18348   rm -rf conftest*
18349   ol_cv_db_db_4_1=no
18350 fi
18351 rm -f conftest*
18352
18353         LIBS="$ol_LIBS"
18354
18355 fi
18356
18357 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18358
18359         if test $ol_cv_db_db_4_1 = yes ; then
18360                 ol_cv_lib_db=-ldb-4-1
18361         fi
18362 fi
18363
18364 if test $ol_cv_lib_db = no ; then
18365         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18366 echo "configure:18367: checking for Berkeley DB link (-ldb3)" >&5
18367 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18368   echo $ac_n "(cached) $ac_c" 1>&6
18369 else
18370   
18371         ol_DB_LIB=-ldb3
18372         ol_LIBS=$LIBS
18373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18374
18375         cat > conftest.$ac_ext <<EOF
18376 #line 18377 "configure"
18377 #include "confdefs.h"
18378
18379 #ifdef HAVE_DB_185_H
18380 # include <db_185.h>
18381 #else
18382 # include <db.h>
18383 #endif
18384
18385 #ifndef DB_VERSION_MAJOR
18386 # define DB_VERSION_MAJOR 1
18387 #endif
18388
18389 #ifndef NULL
18390 #define NULL ((void*)0)
18391 #endif
18392
18393 int main() {
18394
18395 #if DB_VERSION_MAJOR > 1
18396         {
18397                 char *version;
18398                 int major, minor, patch;
18399
18400                 version = db_version( &major, &minor, &patch );
18401
18402                 if( major != DB_VERSION_MAJOR ||
18403                         minor < DB_VERSION_MINOR )
18404                 {
18405                         printf("Berkeley DB version mismatch\n"
18406                                 "\theader: %s\n\tlibrary: %s\n",
18407                                 DB_VERSION_STRING, version);
18408                         return 1;
18409                 }
18410         }
18411 #endif
18412
18413 #if DB_VERSION_MAJOR > 2
18414         db_env_create( NULL, 0 );
18415 #elif DB_VERSION_MAJOR > 1
18416         db_appexit( NULL );
18417 #else
18418         (void) dbopen( NULL, 0, 0, 0, NULL);
18419 #endif
18420
18421 ; return 0; }
18422 EOF
18423 if { (eval echo configure:18424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18424   rm -rf conftest*
18425   ol_cv_db_db3=yes
18426 else
18427   echo "configure: failed program was:" >&5
18428   cat conftest.$ac_ext >&5
18429   rm -rf conftest*
18430   ol_cv_db_db3=no
18431 fi
18432 rm -f conftest*
18433
18434         LIBS="$ol_LIBS"
18435
18436 fi
18437
18438 echo "$ac_t""$ol_cv_db_db3" 1>&6
18439
18440         if test $ol_cv_db_db3 = yes ; then
18441                 ol_cv_lib_db=-ldb3
18442         fi
18443 fi
18444
18445 if test $ol_cv_lib_db = no ; then
18446         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18447 echo "configure:18448: checking for Berkeley DB link (-ldb-3)" >&5
18448 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18449   echo $ac_n "(cached) $ac_c" 1>&6
18450 else
18451   
18452         ol_DB_LIB=-ldb-3
18453         ol_LIBS=$LIBS
18454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18455
18456         cat > conftest.$ac_ext <<EOF
18457 #line 18458 "configure"
18458 #include "confdefs.h"
18459
18460 #ifdef HAVE_DB_185_H
18461 # include <db_185.h>
18462 #else
18463 # include <db.h>
18464 #endif
18465
18466 #ifndef DB_VERSION_MAJOR
18467 # define DB_VERSION_MAJOR 1
18468 #endif
18469
18470 #ifndef NULL
18471 #define NULL ((void*)0)
18472 #endif
18473
18474 int main() {
18475
18476 #if DB_VERSION_MAJOR > 1
18477         {
18478                 char *version;
18479                 int major, minor, patch;
18480
18481                 version = db_version( &major, &minor, &patch );
18482
18483                 if( major != DB_VERSION_MAJOR ||
18484                         minor < DB_VERSION_MINOR )
18485                 {
18486                         printf("Berkeley DB version mismatch\n"
18487                                 "\theader: %s\n\tlibrary: %s\n",
18488                                 DB_VERSION_STRING, version);
18489                         return 1;
18490                 }
18491         }
18492 #endif
18493
18494 #if DB_VERSION_MAJOR > 2
18495         db_env_create( NULL, 0 );
18496 #elif DB_VERSION_MAJOR > 1
18497         db_appexit( NULL );
18498 #else
18499         (void) dbopen( NULL, 0, 0, 0, NULL);
18500 #endif
18501
18502 ; return 0; }
18503 EOF
18504 if { (eval echo configure:18505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18505   rm -rf conftest*
18506   ol_cv_db_db_3=yes
18507 else
18508   echo "configure: failed program was:" >&5
18509   cat conftest.$ac_ext >&5
18510   rm -rf conftest*
18511   ol_cv_db_db_3=no
18512 fi
18513 rm -f conftest*
18514
18515         LIBS="$ol_LIBS"
18516
18517 fi
18518
18519 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18520
18521         if test $ol_cv_db_db_3 = yes ; then
18522                 ol_cv_lib_db=-ldb-3
18523         fi
18524 fi
18525
18526 if test $ol_cv_lib_db = no ; then
18527         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18528 echo "configure:18529: checking for Berkeley DB link (-ldb2)" >&5
18529 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18530   echo $ac_n "(cached) $ac_c" 1>&6
18531 else
18532   
18533         ol_DB_LIB=-ldb2
18534         ol_LIBS=$LIBS
18535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18536
18537         cat > conftest.$ac_ext <<EOF
18538 #line 18539 "configure"
18539 #include "confdefs.h"
18540
18541 #ifdef HAVE_DB_185_H
18542 # include <db_185.h>
18543 #else
18544 # include <db.h>
18545 #endif
18546
18547 #ifndef DB_VERSION_MAJOR
18548 # define DB_VERSION_MAJOR 1
18549 #endif
18550
18551 #ifndef NULL
18552 #define NULL ((void*)0)
18553 #endif
18554
18555 int main() {
18556
18557 #if DB_VERSION_MAJOR > 1
18558         {
18559                 char *version;
18560                 int major, minor, patch;
18561
18562                 version = db_version( &major, &minor, &patch );
18563
18564                 if( major != DB_VERSION_MAJOR ||
18565                         minor < DB_VERSION_MINOR )
18566                 {
18567                         printf("Berkeley DB version mismatch\n"
18568                                 "\theader: %s\n\tlibrary: %s\n",
18569                                 DB_VERSION_STRING, version);
18570                         return 1;
18571                 }
18572         }
18573 #endif
18574
18575 #if DB_VERSION_MAJOR > 2
18576         db_env_create( NULL, 0 );
18577 #elif DB_VERSION_MAJOR > 1
18578         db_appexit( NULL );
18579 #else
18580         (void) dbopen( NULL, 0, 0, 0, NULL);
18581 #endif
18582
18583 ; return 0; }
18584 EOF
18585 if { (eval echo configure:18586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18586   rm -rf conftest*
18587   ol_cv_db_db2=yes
18588 else
18589   echo "configure: failed program was:" >&5
18590   cat conftest.$ac_ext >&5
18591   rm -rf conftest*
18592   ol_cv_db_db2=no
18593 fi
18594 rm -f conftest*
18595
18596         LIBS="$ol_LIBS"
18597
18598 fi
18599
18600 echo "$ac_t""$ol_cv_db_db2" 1>&6
18601
18602         if test $ol_cv_db_db2 = yes ; then
18603                 ol_cv_lib_db=-ldb2
18604         fi
18605 fi
18606
18607 if test $ol_cv_lib_db = no ; then
18608         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18609 echo "configure:18610: checking for Berkeley DB link (-ldb-2)" >&5
18610 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18611   echo $ac_n "(cached) $ac_c" 1>&6
18612 else
18613   
18614         ol_DB_LIB=-ldb-2
18615         ol_LIBS=$LIBS
18616         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18617
18618         cat > conftest.$ac_ext <<EOF
18619 #line 18620 "configure"
18620 #include "confdefs.h"
18621
18622 #ifdef HAVE_DB_185_H
18623 # include <db_185.h>
18624 #else
18625 # include <db.h>
18626 #endif
18627
18628 #ifndef DB_VERSION_MAJOR
18629 # define DB_VERSION_MAJOR 1
18630 #endif
18631
18632 #ifndef NULL
18633 #define NULL ((void*)0)
18634 #endif
18635
18636 int main() {
18637
18638 #if DB_VERSION_MAJOR > 1
18639         {
18640                 char *version;
18641                 int major, minor, patch;
18642
18643                 version = db_version( &major, &minor, &patch );
18644
18645                 if( major != DB_VERSION_MAJOR ||
18646                         minor < DB_VERSION_MINOR )
18647                 {
18648                         printf("Berkeley DB version mismatch\n"
18649                                 "\theader: %s\n\tlibrary: %s\n",
18650                                 DB_VERSION_STRING, version);
18651                         return 1;
18652                 }
18653         }
18654 #endif
18655
18656 #if DB_VERSION_MAJOR > 2
18657         db_env_create( NULL, 0 );
18658 #elif DB_VERSION_MAJOR > 1
18659         db_appexit( NULL );
18660 #else
18661         (void) dbopen( NULL, 0, 0, 0, NULL);
18662 #endif
18663
18664 ; return 0; }
18665 EOF
18666 if { (eval echo configure:18667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18667   rm -rf conftest*
18668   ol_cv_db_db_2=yes
18669 else
18670   echo "configure: failed program was:" >&5
18671   cat conftest.$ac_ext >&5
18672   rm -rf conftest*
18673   ol_cv_db_db_2=no
18674 fi
18675 rm -f conftest*
18676
18677         LIBS="$ol_LIBS"
18678
18679 fi
18680
18681 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18682
18683         if test $ol_cv_db_db_2 = yes ; then
18684                 ol_cv_lib_db=-ldb-2
18685         fi
18686 fi
18687
18688 if test $ol_cv_lib_db = no ; then
18689         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18690 echo "configure:18691: checking for Berkeley DB link (-ldb1)" >&5
18691 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18692   echo $ac_n "(cached) $ac_c" 1>&6
18693 else
18694   
18695         ol_DB_LIB=-ldb1
18696         ol_LIBS=$LIBS
18697         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18698
18699         cat > conftest.$ac_ext <<EOF
18700 #line 18701 "configure"
18701 #include "confdefs.h"
18702
18703 #ifdef HAVE_DB_185_H
18704 # include <db_185.h>
18705 #else
18706 # include <db.h>
18707 #endif
18708
18709 #ifndef DB_VERSION_MAJOR
18710 # define DB_VERSION_MAJOR 1
18711 #endif
18712
18713 #ifndef NULL
18714 #define NULL ((void*)0)
18715 #endif
18716
18717 int main() {
18718
18719 #if DB_VERSION_MAJOR > 1
18720         {
18721                 char *version;
18722                 int major, minor, patch;
18723
18724                 version = db_version( &major, &minor, &patch );
18725
18726                 if( major != DB_VERSION_MAJOR ||
18727                         minor < DB_VERSION_MINOR )
18728                 {
18729                         printf("Berkeley DB version mismatch\n"
18730                                 "\theader: %s\n\tlibrary: %s\n",
18731                                 DB_VERSION_STRING, version);
18732                         return 1;
18733                 }
18734         }
18735 #endif
18736
18737 #if DB_VERSION_MAJOR > 2
18738         db_env_create( NULL, 0 );
18739 #elif DB_VERSION_MAJOR > 1
18740         db_appexit( NULL );
18741 #else
18742         (void) dbopen( NULL, 0, 0, 0, NULL);
18743 #endif
18744
18745 ; return 0; }
18746 EOF
18747 if { (eval echo configure:18748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18748   rm -rf conftest*
18749   ol_cv_db_db1=yes
18750 else
18751   echo "configure: failed program was:" >&5
18752   cat conftest.$ac_ext >&5
18753   rm -rf conftest*
18754   ol_cv_db_db1=no
18755 fi
18756 rm -f conftest*
18757
18758         LIBS="$ol_LIBS"
18759
18760 fi
18761
18762 echo "$ac_t""$ol_cv_db_db1" 1>&6
18763
18764         if test $ol_cv_db_db1 = yes ; then
18765                 ol_cv_lib_db=-ldb1
18766         fi
18767 fi
18768
18769 if test $ol_cv_lib_db = no ; then
18770         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18771 echo "configure:18772: checking for Berkeley DB link (-ldb-1)" >&5
18772 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18773   echo $ac_n "(cached) $ac_c" 1>&6
18774 else
18775   
18776         ol_DB_LIB=-ldb-1
18777         ol_LIBS=$LIBS
18778         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18779
18780         cat > conftest.$ac_ext <<EOF
18781 #line 18782 "configure"
18782 #include "confdefs.h"
18783
18784 #ifdef HAVE_DB_185_H
18785 # include <db_185.h>
18786 #else
18787 # include <db.h>
18788 #endif
18789
18790 #ifndef DB_VERSION_MAJOR
18791 # define DB_VERSION_MAJOR 1
18792 #endif
18793
18794 #ifndef NULL
18795 #define NULL ((void*)0)
18796 #endif
18797
18798 int main() {
18799
18800 #if DB_VERSION_MAJOR > 1
18801         {
18802                 char *version;
18803                 int major, minor, patch;
18804
18805                 version = db_version( &major, &minor, &patch );
18806
18807                 if( major != DB_VERSION_MAJOR ||
18808                         minor < DB_VERSION_MINOR )
18809                 {
18810                         printf("Berkeley DB version mismatch\n"
18811                                 "\theader: %s\n\tlibrary: %s\n",
18812                                 DB_VERSION_STRING, version);
18813                         return 1;
18814                 }
18815         }
18816 #endif
18817
18818 #if DB_VERSION_MAJOR > 2
18819         db_env_create( NULL, 0 );
18820 #elif DB_VERSION_MAJOR > 1
18821         db_appexit( NULL );
18822 #else
18823         (void) dbopen( NULL, 0, 0, 0, NULL);
18824 #endif
18825
18826 ; return 0; }
18827 EOF
18828 if { (eval echo configure:18829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18829   rm -rf conftest*
18830   ol_cv_db_db_1=yes
18831 else
18832   echo "configure: failed program was:" >&5
18833   cat conftest.$ac_ext >&5
18834   rm -rf conftest*
18835   ol_cv_db_db_1=no
18836 fi
18837 rm -f conftest*
18838
18839         LIBS="$ol_LIBS"
18840
18841 fi
18842
18843 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18844
18845         if test $ol_cv_db_db_1 = yes ; then
18846                 ol_cv_lib_db=-ldb-1
18847         fi
18848 fi
18849
18850
18851                 if test "$ol_cv_lib_db" != no ; then
18852                         ol_cv_berkeley_db=yes
18853                 fi
18854         fi
18855 fi
18856
18857         else
18858                 ol_cv_berkeley_db=no
18859 for ac_hdr in db.h
18860 do
18861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18863 echo "configure:18864: checking for $ac_hdr" >&5
18864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18865   echo $ac_n "(cached) $ac_c" 1>&6
18866 else
18867   cat > conftest.$ac_ext <<EOF
18868 #line 18869 "configure"
18869 #include "confdefs.h"
18870 #include <$ac_hdr>
18871 EOF
18872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18873 { (eval echo configure:18874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18875 if test -z "$ac_err"; then
18876   rm -rf conftest*
18877   eval "ac_cv_header_$ac_safe=yes"
18878 else
18879   echo "$ac_err" >&5
18880   echo "configure: failed program was:" >&5
18881   cat conftest.$ac_ext >&5
18882   rm -rf conftest*
18883   eval "ac_cv_header_$ac_safe=no"
18884 fi
18885 rm -f conftest*
18886 fi
18887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18888   echo "$ac_t""yes" 1>&6
18889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18890   cat >> confdefs.h <<EOF
18891 #define $ac_tr_hdr 1
18892 EOF
18893  
18894 else
18895   echo "$ac_t""no" 1>&6
18896 fi
18897 done
18898
18899 if test $ac_cv_header_db_h = yes; then
18900         ol_cv_lib_db=no
18901 if test $ol_cv_lib_db = no ; then
18902         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18903 echo "configure:18904: checking for Berkeley DB link (default)" >&5
18904 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18905   echo $ac_n "(cached) $ac_c" 1>&6
18906 else
18907   
18908         ol_DB_LIB=
18909         ol_LIBS=$LIBS
18910         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18911
18912         cat > conftest.$ac_ext <<EOF
18913 #line 18914 "configure"
18914 #include "confdefs.h"
18915
18916 #ifdef HAVE_DB_185_H
18917 # include <db_185.h>
18918 #else
18919 # include <db.h>
18920 #endif
18921
18922 #ifndef DB_VERSION_MAJOR
18923 # define DB_VERSION_MAJOR 1
18924 #endif
18925
18926 #ifndef NULL
18927 #define NULL ((void*)0)
18928 #endif
18929
18930 int main() {
18931
18932 #if DB_VERSION_MAJOR > 1
18933         {
18934                 char *version;
18935                 int major, minor, patch;
18936
18937                 version = db_version( &major, &minor, &patch );
18938
18939                 if( major != DB_VERSION_MAJOR ||
18940                         minor < DB_VERSION_MINOR )
18941                 {
18942                         printf("Berkeley DB version mismatch\n"
18943                                 "\theader: %s\n\tlibrary: %s\n",
18944                                 DB_VERSION_STRING, version);
18945                         return 1;
18946                 }
18947         }
18948 #endif
18949
18950 #if DB_VERSION_MAJOR > 2
18951         db_env_create( NULL, 0 );
18952 #elif DB_VERSION_MAJOR > 1
18953         db_appexit( NULL );
18954 #else
18955         (void) dbopen( NULL, 0, 0, 0, NULL);
18956 #endif
18957
18958 ; return 0; }
18959 EOF
18960 if { (eval echo configure:18961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18961   rm -rf conftest*
18962   ol_cv_db_none=yes
18963 else
18964   echo "configure: failed program was:" >&5
18965   cat conftest.$ac_ext >&5
18966   rm -rf conftest*
18967   ol_cv_db_none=no
18968 fi
18969 rm -f conftest*
18970
18971         LIBS="$ol_LIBS"
18972
18973 fi
18974
18975 echo "$ac_t""$ol_cv_db_none" 1>&6
18976
18977         if test $ol_cv_db_none = yes ; then
18978                 ol_cv_lib_db=yes
18979         fi
18980 fi
18981
18982 if test $ol_cv_lib_db = no ; then
18983         echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
18984 echo "configure:18985: checking for Berkeley DB link (-ldb43)" >&5
18985 if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
18986   echo $ac_n "(cached) $ac_c" 1>&6
18987 else
18988   
18989         ol_DB_LIB=-ldb43
18990         ol_LIBS=$LIBS
18991         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18992
18993         cat > conftest.$ac_ext <<EOF
18994 #line 18995 "configure"
18995 #include "confdefs.h"
18996
18997 #ifdef HAVE_DB_185_H
18998 # include <db_185.h>
18999 #else
19000 # include <db.h>
19001 #endif
19002
19003 #ifndef DB_VERSION_MAJOR
19004 # define DB_VERSION_MAJOR 1
19005 #endif
19006
19007 #ifndef NULL
19008 #define NULL ((void*)0)
19009 #endif
19010
19011 int main() {
19012
19013 #if DB_VERSION_MAJOR > 1
19014         {
19015                 char *version;
19016                 int major, minor, patch;
19017
19018                 version = db_version( &major, &minor, &patch );
19019
19020                 if( major != DB_VERSION_MAJOR ||
19021                         minor < DB_VERSION_MINOR )
19022                 {
19023                         printf("Berkeley DB version mismatch\n"
19024                                 "\theader: %s\n\tlibrary: %s\n",
19025                                 DB_VERSION_STRING, version);
19026                         return 1;
19027                 }
19028         }
19029 #endif
19030
19031 #if DB_VERSION_MAJOR > 2
19032         db_env_create( NULL, 0 );
19033 #elif DB_VERSION_MAJOR > 1
19034         db_appexit( NULL );
19035 #else
19036         (void) dbopen( NULL, 0, 0, 0, NULL);
19037 #endif
19038
19039 ; return 0; }
19040 EOF
19041 if { (eval echo configure:19042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19042   rm -rf conftest*
19043   ol_cv_db_db43=yes
19044 else
19045   echo "configure: failed program was:" >&5
19046   cat conftest.$ac_ext >&5
19047   rm -rf conftest*
19048   ol_cv_db_db43=no
19049 fi
19050 rm -f conftest*
19051
19052         LIBS="$ol_LIBS"
19053
19054 fi
19055
19056 echo "$ac_t""$ol_cv_db_db43" 1>&6
19057
19058         if test $ol_cv_db_db43 = yes ; then
19059                 ol_cv_lib_db=-ldb43
19060         fi
19061 fi
19062
19063 if test $ol_cv_lib_db = no ; then
19064         echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
19065 echo "configure:19066: checking for Berkeley DB link (-ldb-43)" >&5
19066 if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
19067   echo $ac_n "(cached) $ac_c" 1>&6
19068 else
19069   
19070         ol_DB_LIB=-ldb-43
19071         ol_LIBS=$LIBS
19072         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19073
19074         cat > conftest.$ac_ext <<EOF
19075 #line 19076 "configure"
19076 #include "confdefs.h"
19077
19078 #ifdef HAVE_DB_185_H
19079 # include <db_185.h>
19080 #else
19081 # include <db.h>
19082 #endif
19083
19084 #ifndef DB_VERSION_MAJOR
19085 # define DB_VERSION_MAJOR 1
19086 #endif
19087
19088 #ifndef NULL
19089 #define NULL ((void*)0)
19090 #endif
19091
19092 int main() {
19093
19094 #if DB_VERSION_MAJOR > 1
19095         {
19096                 char *version;
19097                 int major, minor, patch;
19098
19099                 version = db_version( &major, &minor, &patch );
19100
19101                 if( major != DB_VERSION_MAJOR ||
19102                         minor < DB_VERSION_MINOR )
19103                 {
19104                         printf("Berkeley DB version mismatch\n"
19105                                 "\theader: %s\n\tlibrary: %s\n",
19106                                 DB_VERSION_STRING, version);
19107                         return 1;
19108                 }
19109         }
19110 #endif
19111
19112 #if DB_VERSION_MAJOR > 2
19113         db_env_create( NULL, 0 );
19114 #elif DB_VERSION_MAJOR > 1
19115         db_appexit( NULL );
19116 #else
19117         (void) dbopen( NULL, 0, 0, 0, NULL);
19118 #endif
19119
19120 ; return 0; }
19121 EOF
19122 if { (eval echo configure:19123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19123   rm -rf conftest*
19124   ol_cv_db_db_43=yes
19125 else
19126   echo "configure: failed program was:" >&5
19127   cat conftest.$ac_ext >&5
19128   rm -rf conftest*
19129   ol_cv_db_db_43=no
19130 fi
19131 rm -f conftest*
19132
19133         LIBS="$ol_LIBS"
19134
19135 fi
19136
19137 echo "$ac_t""$ol_cv_db_db_43" 1>&6
19138
19139         if test $ol_cv_db_db_43 = yes ; then
19140                 ol_cv_lib_db=-ldb-43
19141         fi
19142 fi
19143
19144 if test $ol_cv_lib_db = no ; then
19145         echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
19146 echo "configure:19147: checking for Berkeley DB link (-ldb-4.3)" >&5
19147 if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
19148   echo $ac_n "(cached) $ac_c" 1>&6
19149 else
19150   
19151         ol_DB_LIB=-ldb-4.3
19152         ol_LIBS=$LIBS
19153         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19154
19155         cat > conftest.$ac_ext <<EOF
19156 #line 19157 "configure"
19157 #include "confdefs.h"
19158
19159 #ifdef HAVE_DB_185_H
19160 # include <db_185.h>
19161 #else
19162 # include <db.h>
19163 #endif
19164
19165 #ifndef DB_VERSION_MAJOR
19166 # define DB_VERSION_MAJOR 1
19167 #endif
19168
19169 #ifndef NULL
19170 #define NULL ((void*)0)
19171 #endif
19172
19173 int main() {
19174
19175 #if DB_VERSION_MAJOR > 1
19176         {
19177                 char *version;
19178                 int major, minor, patch;
19179
19180                 version = db_version( &major, &minor, &patch );
19181
19182                 if( major != DB_VERSION_MAJOR ||
19183                         minor < DB_VERSION_MINOR )
19184                 {
19185                         printf("Berkeley DB version mismatch\n"
19186                                 "\theader: %s\n\tlibrary: %s\n",
19187                                 DB_VERSION_STRING, version);
19188                         return 1;
19189                 }
19190         }
19191 #endif
19192
19193 #if DB_VERSION_MAJOR > 2
19194         db_env_create( NULL, 0 );
19195 #elif DB_VERSION_MAJOR > 1
19196         db_appexit( NULL );
19197 #else
19198         (void) dbopen( NULL, 0, 0, 0, NULL);
19199 #endif
19200
19201 ; return 0; }
19202 EOF
19203 if { (eval echo configure:19204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19204   rm -rf conftest*
19205   ol_cv_db_db_4_dot_3=yes
19206 else
19207   echo "configure: failed program was:" >&5
19208   cat conftest.$ac_ext >&5
19209   rm -rf conftest*
19210   ol_cv_db_db_4_dot_3=no
19211 fi
19212 rm -f conftest*
19213
19214         LIBS="$ol_LIBS"
19215
19216 fi
19217
19218 echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
19219
19220         if test $ol_cv_db_db_4_dot_3 = yes ; then
19221                 ol_cv_lib_db=-ldb-4.3
19222         fi
19223 fi
19224
19225 if test $ol_cv_lib_db = no ; then
19226         echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
19227 echo "configure:19228: checking for Berkeley DB link (-ldb-4-3)" >&5
19228 if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
19229   echo $ac_n "(cached) $ac_c" 1>&6
19230 else
19231   
19232         ol_DB_LIB=-ldb-4-3
19233         ol_LIBS=$LIBS
19234         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19235
19236         cat > conftest.$ac_ext <<EOF
19237 #line 19238 "configure"
19238 #include "confdefs.h"
19239
19240 #ifdef HAVE_DB_185_H
19241 # include <db_185.h>
19242 #else
19243 # include <db.h>
19244 #endif
19245
19246 #ifndef DB_VERSION_MAJOR
19247 # define DB_VERSION_MAJOR 1
19248 #endif
19249
19250 #ifndef NULL
19251 #define NULL ((void*)0)
19252 #endif
19253
19254 int main() {
19255
19256 #if DB_VERSION_MAJOR > 1
19257         {
19258                 char *version;
19259                 int major, minor, patch;
19260
19261                 version = db_version( &major, &minor, &patch );
19262
19263                 if( major != DB_VERSION_MAJOR ||
19264                         minor < DB_VERSION_MINOR )
19265                 {
19266                         printf("Berkeley DB version mismatch\n"
19267                                 "\theader: %s\n\tlibrary: %s\n",
19268                                 DB_VERSION_STRING, version);
19269                         return 1;
19270                 }
19271         }
19272 #endif
19273
19274 #if DB_VERSION_MAJOR > 2
19275         db_env_create( NULL, 0 );
19276 #elif DB_VERSION_MAJOR > 1
19277         db_appexit( NULL );
19278 #else
19279         (void) dbopen( NULL, 0, 0, 0, NULL);
19280 #endif
19281
19282 ; return 0; }
19283 EOF
19284 if { (eval echo configure:19285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19285   rm -rf conftest*
19286   ol_cv_db_db_4_3=yes
19287 else
19288   echo "configure: failed program was:" >&5
19289   cat conftest.$ac_ext >&5
19290   rm -rf conftest*
19291   ol_cv_db_db_4_3=no
19292 fi
19293 rm -f conftest*
19294
19295         LIBS="$ol_LIBS"
19296
19297 fi
19298
19299 echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
19300
19301         if test $ol_cv_db_db_4_3 = yes ; then
19302                 ol_cv_lib_db=-ldb-4-3
19303         fi
19304 fi
19305
19306 if test $ol_cv_lib_db = no ; then
19307         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
19308 echo "configure:19309: checking for Berkeley DB link (-ldb42)" >&5
19309 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
19310   echo $ac_n "(cached) $ac_c" 1>&6
19311 else
19312   
19313         ol_DB_LIB=-ldb42
19314         ol_LIBS=$LIBS
19315         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19316
19317         cat > conftest.$ac_ext <<EOF
19318 #line 19319 "configure"
19319 #include "confdefs.h"
19320
19321 #ifdef HAVE_DB_185_H
19322 # include <db_185.h>
19323 #else
19324 # include <db.h>
19325 #endif
19326
19327 #ifndef DB_VERSION_MAJOR
19328 # define DB_VERSION_MAJOR 1
19329 #endif
19330
19331 #ifndef NULL
19332 #define NULL ((void*)0)
19333 #endif
19334
19335 int main() {
19336
19337 #if DB_VERSION_MAJOR > 1
19338         {
19339                 char *version;
19340                 int major, minor, patch;
19341
19342                 version = db_version( &major, &minor, &patch );
19343
19344                 if( major != DB_VERSION_MAJOR ||
19345                         minor < DB_VERSION_MINOR )
19346                 {
19347                         printf("Berkeley DB version mismatch\n"
19348                                 "\theader: %s\n\tlibrary: %s\n",
19349                                 DB_VERSION_STRING, version);
19350                         return 1;
19351                 }
19352         }
19353 #endif
19354
19355 #if DB_VERSION_MAJOR > 2
19356         db_env_create( NULL, 0 );
19357 #elif DB_VERSION_MAJOR > 1
19358         db_appexit( NULL );
19359 #else
19360         (void) dbopen( NULL, 0, 0, 0, NULL);
19361 #endif
19362
19363 ; return 0; }
19364 EOF
19365 if { (eval echo configure:19366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19366   rm -rf conftest*
19367   ol_cv_db_db42=yes
19368 else
19369   echo "configure: failed program was:" >&5
19370   cat conftest.$ac_ext >&5
19371   rm -rf conftest*
19372   ol_cv_db_db42=no
19373 fi
19374 rm -f conftest*
19375
19376         LIBS="$ol_LIBS"
19377
19378 fi
19379
19380 echo "$ac_t""$ol_cv_db_db42" 1>&6
19381
19382         if test $ol_cv_db_db42 = yes ; then
19383                 ol_cv_lib_db=-ldb42
19384         fi
19385 fi
19386
19387 if test $ol_cv_lib_db = no ; then
19388         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
19389 echo "configure:19390: checking for Berkeley DB link (-ldb-42)" >&5
19390 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
19391   echo $ac_n "(cached) $ac_c" 1>&6
19392 else
19393   
19394         ol_DB_LIB=-ldb-42
19395         ol_LIBS=$LIBS
19396         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19397
19398         cat > conftest.$ac_ext <<EOF
19399 #line 19400 "configure"
19400 #include "confdefs.h"
19401
19402 #ifdef HAVE_DB_185_H
19403 # include <db_185.h>
19404 #else
19405 # include <db.h>
19406 #endif
19407
19408 #ifndef DB_VERSION_MAJOR
19409 # define DB_VERSION_MAJOR 1
19410 #endif
19411
19412 #ifndef NULL
19413 #define NULL ((void*)0)
19414 #endif
19415
19416 int main() {
19417
19418 #if DB_VERSION_MAJOR > 1
19419         {
19420                 char *version;
19421                 int major, minor, patch;
19422
19423                 version = db_version( &major, &minor, &patch );
19424
19425                 if( major != DB_VERSION_MAJOR ||
19426                         minor < DB_VERSION_MINOR )
19427                 {
19428                         printf("Berkeley DB version mismatch\n"
19429                                 "\theader: %s\n\tlibrary: %s\n",
19430                                 DB_VERSION_STRING, version);
19431                         return 1;
19432                 }
19433         }
19434 #endif
19435
19436 #if DB_VERSION_MAJOR > 2
19437         db_env_create( NULL, 0 );
19438 #elif DB_VERSION_MAJOR > 1
19439         db_appexit( NULL );
19440 #else
19441         (void) dbopen( NULL, 0, 0, 0, NULL);
19442 #endif
19443
19444 ; return 0; }
19445 EOF
19446 if { (eval echo configure:19447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19447   rm -rf conftest*
19448   ol_cv_db_db_42=yes
19449 else
19450   echo "configure: failed program was:" >&5
19451   cat conftest.$ac_ext >&5
19452   rm -rf conftest*
19453   ol_cv_db_db_42=no
19454 fi
19455 rm -f conftest*
19456
19457         LIBS="$ol_LIBS"
19458
19459 fi
19460
19461 echo "$ac_t""$ol_cv_db_db_42" 1>&6
19462
19463         if test $ol_cv_db_db_42 = yes ; then
19464                 ol_cv_lib_db=-ldb-42
19465         fi
19466 fi
19467
19468 if test $ol_cv_lib_db = no ; then
19469         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
19470 echo "configure:19471: checking for Berkeley DB link (-ldb-4.2)" >&5
19471 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
19472   echo $ac_n "(cached) $ac_c" 1>&6
19473 else
19474   
19475         ol_DB_LIB=-ldb-4.2
19476         ol_LIBS=$LIBS
19477         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19478
19479         cat > conftest.$ac_ext <<EOF
19480 #line 19481 "configure"
19481 #include "confdefs.h"
19482
19483 #ifdef HAVE_DB_185_H
19484 # include <db_185.h>
19485 #else
19486 # include <db.h>
19487 #endif
19488
19489 #ifndef DB_VERSION_MAJOR
19490 # define DB_VERSION_MAJOR 1
19491 #endif
19492
19493 #ifndef NULL
19494 #define NULL ((void*)0)
19495 #endif
19496
19497 int main() {
19498
19499 #if DB_VERSION_MAJOR > 1
19500         {
19501                 char *version;
19502                 int major, minor, patch;
19503
19504                 version = db_version( &major, &minor, &patch );
19505
19506                 if( major != DB_VERSION_MAJOR ||
19507                         minor < DB_VERSION_MINOR )
19508                 {
19509                         printf("Berkeley DB version mismatch\n"
19510                                 "\theader: %s\n\tlibrary: %s\n",
19511                                 DB_VERSION_STRING, version);
19512                         return 1;
19513                 }
19514         }
19515 #endif
19516
19517 #if DB_VERSION_MAJOR > 2
19518         db_env_create( NULL, 0 );
19519 #elif DB_VERSION_MAJOR > 1
19520         db_appexit( NULL );
19521 #else
19522         (void) dbopen( NULL, 0, 0, 0, NULL);
19523 #endif
19524
19525 ; return 0; }
19526 EOF
19527 if { (eval echo configure:19528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19528   rm -rf conftest*
19529   ol_cv_db_db_4_dot_2=yes
19530 else
19531   echo "configure: failed program was:" >&5
19532   cat conftest.$ac_ext >&5
19533   rm -rf conftest*
19534   ol_cv_db_db_4_dot_2=no
19535 fi
19536 rm -f conftest*
19537
19538         LIBS="$ol_LIBS"
19539
19540 fi
19541
19542 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
19543
19544         if test $ol_cv_db_db_4_dot_2 = yes ; then
19545                 ol_cv_lib_db=-ldb-4.2
19546         fi
19547 fi
19548
19549 if test $ol_cv_lib_db = no ; then
19550         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
19551 echo "configure:19552: checking for Berkeley DB link (-ldb-4-2)" >&5
19552 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
19553   echo $ac_n "(cached) $ac_c" 1>&6
19554 else
19555   
19556         ol_DB_LIB=-ldb-4-2
19557         ol_LIBS=$LIBS
19558         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19559
19560         cat > conftest.$ac_ext <<EOF
19561 #line 19562 "configure"
19562 #include "confdefs.h"
19563
19564 #ifdef HAVE_DB_185_H
19565 # include <db_185.h>
19566 #else
19567 # include <db.h>
19568 #endif
19569
19570 #ifndef DB_VERSION_MAJOR
19571 # define DB_VERSION_MAJOR 1
19572 #endif
19573
19574 #ifndef NULL
19575 #define NULL ((void*)0)
19576 #endif
19577
19578 int main() {
19579
19580 #if DB_VERSION_MAJOR > 1
19581         {
19582                 char *version;
19583                 int major, minor, patch;
19584
19585                 version = db_version( &major, &minor, &patch );
19586
19587                 if( major != DB_VERSION_MAJOR ||
19588                         minor < DB_VERSION_MINOR )
19589                 {
19590                         printf("Berkeley DB version mismatch\n"
19591                                 "\theader: %s\n\tlibrary: %s\n",
19592                                 DB_VERSION_STRING, version);
19593                         return 1;
19594                 }
19595         }
19596 #endif
19597
19598 #if DB_VERSION_MAJOR > 2
19599         db_env_create( NULL, 0 );
19600 #elif DB_VERSION_MAJOR > 1
19601         db_appexit( NULL );
19602 #else
19603         (void) dbopen( NULL, 0, 0, 0, NULL);
19604 #endif
19605
19606 ; return 0; }
19607 EOF
19608 if { (eval echo configure:19609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19609   rm -rf conftest*
19610   ol_cv_db_db_4_2=yes
19611 else
19612   echo "configure: failed program was:" >&5
19613   cat conftest.$ac_ext >&5
19614   rm -rf conftest*
19615   ol_cv_db_db_4_2=no
19616 fi
19617 rm -f conftest*
19618
19619         LIBS="$ol_LIBS"
19620
19621 fi
19622
19623 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
19624
19625         if test $ol_cv_db_db_4_2 = yes ; then
19626                 ol_cv_lib_db=-ldb-4-2
19627         fi
19628 fi
19629
19630 if test $ol_cv_lib_db = no ; then
19631         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19632 echo "configure:19633: checking for Berkeley DB link (-ldb-4)" >&5
19633 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19634   echo $ac_n "(cached) $ac_c" 1>&6
19635 else
19636   
19637         ol_DB_LIB=-ldb-4
19638         ol_LIBS=$LIBS
19639         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19640
19641         cat > conftest.$ac_ext <<EOF
19642 #line 19643 "configure"
19643 #include "confdefs.h"
19644
19645 #ifdef HAVE_DB_185_H
19646 # include <db_185.h>
19647 #else
19648 # include <db.h>
19649 #endif
19650
19651 #ifndef DB_VERSION_MAJOR
19652 # define DB_VERSION_MAJOR 1
19653 #endif
19654
19655 #ifndef NULL
19656 #define NULL ((void*)0)
19657 #endif
19658
19659 int main() {
19660
19661 #if DB_VERSION_MAJOR > 1
19662         {
19663                 char *version;
19664                 int major, minor, patch;
19665
19666                 version = db_version( &major, &minor, &patch );
19667
19668                 if( major != DB_VERSION_MAJOR ||
19669                         minor < DB_VERSION_MINOR )
19670                 {
19671                         printf("Berkeley DB version mismatch\n"
19672                                 "\theader: %s\n\tlibrary: %s\n",
19673                                 DB_VERSION_STRING, version);
19674                         return 1;
19675                 }
19676         }
19677 #endif
19678
19679 #if DB_VERSION_MAJOR > 2
19680         db_env_create( NULL, 0 );
19681 #elif DB_VERSION_MAJOR > 1
19682         db_appexit( NULL );
19683 #else
19684         (void) dbopen( NULL, 0, 0, 0, NULL);
19685 #endif
19686
19687 ; return 0; }
19688 EOF
19689 if { (eval echo configure:19690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19690   rm -rf conftest*
19691   ol_cv_db_db_4=yes
19692 else
19693   echo "configure: failed program was:" >&5
19694   cat conftest.$ac_ext >&5
19695   rm -rf conftest*
19696   ol_cv_db_db_4=no
19697 fi
19698 rm -f conftest*
19699
19700         LIBS="$ol_LIBS"
19701
19702 fi
19703
19704 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19705
19706         if test $ol_cv_db_db_4 = yes ; then
19707                 ol_cv_lib_db=-ldb-4
19708         fi
19709 fi
19710
19711 if test $ol_cv_lib_db = no ; then
19712         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
19713 echo "configure:19714: checking for Berkeley DB link (-ldb4)" >&5
19714 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
19715   echo $ac_n "(cached) $ac_c" 1>&6
19716 else
19717   
19718         ol_DB_LIB=-ldb4
19719         ol_LIBS=$LIBS
19720         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19721
19722         cat > conftest.$ac_ext <<EOF
19723 #line 19724 "configure"
19724 #include "confdefs.h"
19725
19726 #ifdef HAVE_DB_185_H
19727 # include <db_185.h>
19728 #else
19729 # include <db.h>
19730 #endif
19731
19732 #ifndef DB_VERSION_MAJOR
19733 # define DB_VERSION_MAJOR 1
19734 #endif
19735
19736 #ifndef NULL
19737 #define NULL ((void*)0)
19738 #endif
19739
19740 int main() {
19741
19742 #if DB_VERSION_MAJOR > 1
19743         {
19744                 char *version;
19745                 int major, minor, patch;
19746
19747                 version = db_version( &major, &minor, &patch );
19748
19749                 if( major != DB_VERSION_MAJOR ||
19750                         minor < DB_VERSION_MINOR )
19751                 {
19752                         printf("Berkeley DB version mismatch\n"
19753                                 "\theader: %s\n\tlibrary: %s\n",
19754                                 DB_VERSION_STRING, version);
19755                         return 1;
19756                 }
19757         }
19758 #endif
19759
19760 #if DB_VERSION_MAJOR > 2
19761         db_env_create( NULL, 0 );
19762 #elif DB_VERSION_MAJOR > 1
19763         db_appexit( NULL );
19764 #else
19765         (void) dbopen( NULL, 0, 0, 0, NULL);
19766 #endif
19767
19768 ; return 0; }
19769 EOF
19770 if { (eval echo configure:19771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19771   rm -rf conftest*
19772   ol_cv_db_db4=yes
19773 else
19774   echo "configure: failed program was:" >&5
19775   cat conftest.$ac_ext >&5
19776   rm -rf conftest*
19777   ol_cv_db_db4=no
19778 fi
19779 rm -f conftest*
19780
19781         LIBS="$ol_LIBS"
19782
19783 fi
19784
19785 echo "$ac_t""$ol_cv_db_db4" 1>&6
19786
19787         if test $ol_cv_db_db4 = yes ; then
19788                 ol_cv_lib_db=-ldb4
19789         fi
19790 fi
19791
19792 if test $ol_cv_lib_db = no ; then
19793         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19794 echo "configure:19795: checking for Berkeley DB link (-ldb)" >&5
19795 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19796   echo $ac_n "(cached) $ac_c" 1>&6
19797 else
19798   
19799         ol_DB_LIB=-ldb
19800         ol_LIBS=$LIBS
19801         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19802
19803         cat > conftest.$ac_ext <<EOF
19804 #line 19805 "configure"
19805 #include "confdefs.h"
19806
19807 #ifdef HAVE_DB_185_H
19808 # include <db_185.h>
19809 #else
19810 # include <db.h>
19811 #endif
19812
19813 #ifndef DB_VERSION_MAJOR
19814 # define DB_VERSION_MAJOR 1
19815 #endif
19816
19817 #ifndef NULL
19818 #define NULL ((void*)0)
19819 #endif
19820
19821 int main() {
19822
19823 #if DB_VERSION_MAJOR > 1
19824         {
19825                 char *version;
19826                 int major, minor, patch;
19827
19828                 version = db_version( &major, &minor, &patch );
19829
19830                 if( major != DB_VERSION_MAJOR ||
19831                         minor < DB_VERSION_MINOR )
19832                 {
19833                         printf("Berkeley DB version mismatch\n"
19834                                 "\theader: %s\n\tlibrary: %s\n",
19835                                 DB_VERSION_STRING, version);
19836                         return 1;
19837                 }
19838         }
19839 #endif
19840
19841 #if DB_VERSION_MAJOR > 2
19842         db_env_create( NULL, 0 );
19843 #elif DB_VERSION_MAJOR > 1
19844         db_appexit( NULL );
19845 #else
19846         (void) dbopen( NULL, 0, 0, 0, NULL);
19847 #endif
19848
19849 ; return 0; }
19850 EOF
19851 if { (eval echo configure:19852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19852   rm -rf conftest*
19853   ol_cv_db_db=yes
19854 else
19855   echo "configure: failed program was:" >&5
19856   cat conftest.$ac_ext >&5
19857   rm -rf conftest*
19858   ol_cv_db_db=no
19859 fi
19860 rm -f conftest*
19861
19862         LIBS="$ol_LIBS"
19863
19864 fi
19865
19866 echo "$ac_t""$ol_cv_db_db" 1>&6
19867
19868         if test $ol_cv_db_db = yes ; then
19869                 ol_cv_lib_db=-ldb
19870         fi
19871 fi
19872
19873 if test $ol_cv_lib_db = no ; then
19874         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19875 echo "configure:19876: checking for Berkeley DB link (-ldb41)" >&5
19876 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19877   echo $ac_n "(cached) $ac_c" 1>&6
19878 else
19879   
19880         ol_DB_LIB=-ldb41
19881         ol_LIBS=$LIBS
19882         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19883
19884         cat > conftest.$ac_ext <<EOF
19885 #line 19886 "configure"
19886 #include "confdefs.h"
19887
19888 #ifdef HAVE_DB_185_H
19889 # include <db_185.h>
19890 #else
19891 # include <db.h>
19892 #endif
19893
19894 #ifndef DB_VERSION_MAJOR
19895 # define DB_VERSION_MAJOR 1
19896 #endif
19897
19898 #ifndef NULL
19899 #define NULL ((void*)0)
19900 #endif
19901
19902 int main() {
19903
19904 #if DB_VERSION_MAJOR > 1
19905         {
19906                 char *version;
19907                 int major, minor, patch;
19908
19909                 version = db_version( &major, &minor, &patch );
19910
19911                 if( major != DB_VERSION_MAJOR ||
19912                         minor < DB_VERSION_MINOR )
19913                 {
19914                         printf("Berkeley DB version mismatch\n"
19915                                 "\theader: %s\n\tlibrary: %s\n",
19916                                 DB_VERSION_STRING, version);
19917                         return 1;
19918                 }
19919         }
19920 #endif
19921
19922 #if DB_VERSION_MAJOR > 2
19923         db_env_create( NULL, 0 );
19924 #elif DB_VERSION_MAJOR > 1
19925         db_appexit( NULL );
19926 #else
19927         (void) dbopen( NULL, 0, 0, 0, NULL);
19928 #endif
19929
19930 ; return 0; }
19931 EOF
19932 if { (eval echo configure:19933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19933   rm -rf conftest*
19934   ol_cv_db_db41=yes
19935 else
19936   echo "configure: failed program was:" >&5
19937   cat conftest.$ac_ext >&5
19938   rm -rf conftest*
19939   ol_cv_db_db41=no
19940 fi
19941 rm -f conftest*
19942
19943         LIBS="$ol_LIBS"
19944
19945 fi
19946
19947 echo "$ac_t""$ol_cv_db_db41" 1>&6
19948
19949         if test $ol_cv_db_db41 = yes ; then
19950                 ol_cv_lib_db=-ldb41
19951         fi
19952 fi
19953
19954 if test $ol_cv_lib_db = no ; then
19955         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19956 echo "configure:19957: checking for Berkeley DB link (-ldb-41)" >&5
19957 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19958   echo $ac_n "(cached) $ac_c" 1>&6
19959 else
19960   
19961         ol_DB_LIB=-ldb-41
19962         ol_LIBS=$LIBS
19963         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19964
19965         cat > conftest.$ac_ext <<EOF
19966 #line 19967 "configure"
19967 #include "confdefs.h"
19968
19969 #ifdef HAVE_DB_185_H
19970 # include <db_185.h>
19971 #else
19972 # include <db.h>
19973 #endif
19974
19975 #ifndef DB_VERSION_MAJOR
19976 # define DB_VERSION_MAJOR 1
19977 #endif
19978
19979 #ifndef NULL
19980 #define NULL ((void*)0)
19981 #endif
19982
19983 int main() {
19984
19985 #if DB_VERSION_MAJOR > 1
19986         {
19987                 char *version;
19988                 int major, minor, patch;
19989
19990                 version = db_version( &major, &minor, &patch );
19991
19992                 if( major != DB_VERSION_MAJOR ||
19993                         minor < DB_VERSION_MINOR )
19994                 {
19995                         printf("Berkeley DB version mismatch\n"
19996                                 "\theader: %s\n\tlibrary: %s\n",
19997                                 DB_VERSION_STRING, version);
19998                         return 1;
19999                 }
20000         }
20001 #endif
20002
20003 #if DB_VERSION_MAJOR > 2
20004         db_env_create( NULL, 0 );
20005 #elif DB_VERSION_MAJOR > 1
20006         db_appexit( NULL );
20007 #else
20008         (void) dbopen( NULL, 0, 0, 0, NULL);
20009 #endif
20010
20011 ; return 0; }
20012 EOF
20013 if { (eval echo configure:20014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20014   rm -rf conftest*
20015   ol_cv_db_db_41=yes
20016 else
20017   echo "configure: failed program was:" >&5
20018   cat conftest.$ac_ext >&5
20019   rm -rf conftest*
20020   ol_cv_db_db_41=no
20021 fi
20022 rm -f conftest*
20023
20024         LIBS="$ol_LIBS"
20025
20026 fi
20027
20028 echo "$ac_t""$ol_cv_db_db_41" 1>&6
20029
20030         if test $ol_cv_db_db_41 = yes ; then
20031                 ol_cv_lib_db=-ldb-41
20032         fi
20033 fi
20034
20035 if test $ol_cv_lib_db = no ; then
20036         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
20037 echo "configure:20038: checking for Berkeley DB link (-ldb-4.1)" >&5
20038 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
20039   echo $ac_n "(cached) $ac_c" 1>&6
20040 else
20041   
20042         ol_DB_LIB=-ldb-4.1
20043         ol_LIBS=$LIBS
20044         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20045
20046         cat > conftest.$ac_ext <<EOF
20047 #line 20048 "configure"
20048 #include "confdefs.h"
20049
20050 #ifdef HAVE_DB_185_H
20051 # include <db_185.h>
20052 #else
20053 # include <db.h>
20054 #endif
20055
20056 #ifndef DB_VERSION_MAJOR
20057 # define DB_VERSION_MAJOR 1
20058 #endif
20059
20060 #ifndef NULL
20061 #define NULL ((void*)0)
20062 #endif
20063
20064 int main() {
20065
20066 #if DB_VERSION_MAJOR > 1
20067         {
20068                 char *version;
20069                 int major, minor, patch;
20070
20071                 version = db_version( &major, &minor, &patch );
20072
20073                 if( major != DB_VERSION_MAJOR ||
20074                         minor < DB_VERSION_MINOR )
20075                 {
20076                         printf("Berkeley DB version mismatch\n"
20077                                 "\theader: %s\n\tlibrary: %s\n",
20078                                 DB_VERSION_STRING, version);
20079                         return 1;
20080                 }
20081         }
20082 #endif
20083
20084 #if DB_VERSION_MAJOR > 2
20085         db_env_create( NULL, 0 );
20086 #elif DB_VERSION_MAJOR > 1
20087         db_appexit( NULL );
20088 #else
20089         (void) dbopen( NULL, 0, 0, 0, NULL);
20090 #endif
20091
20092 ; return 0; }
20093 EOF
20094 if { (eval echo configure:20095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20095   rm -rf conftest*
20096   ol_cv_db_db_4_dot_1=yes
20097 else
20098   echo "configure: failed program was:" >&5
20099   cat conftest.$ac_ext >&5
20100   rm -rf conftest*
20101   ol_cv_db_db_4_dot_1=no
20102 fi
20103 rm -f conftest*
20104
20105         LIBS="$ol_LIBS"
20106
20107 fi
20108
20109 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
20110
20111         if test $ol_cv_db_db_4_dot_1 = yes ; then
20112                 ol_cv_lib_db=-ldb-4.1
20113         fi
20114 fi
20115
20116 if test $ol_cv_lib_db = no ; then
20117         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
20118 echo "configure:20119: checking for Berkeley DB link (-ldb-4-1)" >&5
20119 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
20120   echo $ac_n "(cached) $ac_c" 1>&6
20121 else
20122   
20123         ol_DB_LIB=-ldb-4-1
20124         ol_LIBS=$LIBS
20125         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20126
20127         cat > conftest.$ac_ext <<EOF
20128 #line 20129 "configure"
20129 #include "confdefs.h"
20130
20131 #ifdef HAVE_DB_185_H
20132 # include <db_185.h>
20133 #else
20134 # include <db.h>
20135 #endif
20136
20137 #ifndef DB_VERSION_MAJOR
20138 # define DB_VERSION_MAJOR 1
20139 #endif
20140
20141 #ifndef NULL
20142 #define NULL ((void*)0)
20143 #endif
20144
20145 int main() {
20146
20147 #if DB_VERSION_MAJOR > 1
20148         {
20149                 char *version;
20150                 int major, minor, patch;
20151
20152                 version = db_version( &major, &minor, &patch );
20153
20154                 if( major != DB_VERSION_MAJOR ||
20155                         minor < DB_VERSION_MINOR )
20156                 {
20157                         printf("Berkeley DB version mismatch\n"
20158                                 "\theader: %s\n\tlibrary: %s\n",
20159                                 DB_VERSION_STRING, version);
20160                         return 1;
20161                 }
20162         }
20163 #endif
20164
20165 #if DB_VERSION_MAJOR > 2
20166         db_env_create( NULL, 0 );
20167 #elif DB_VERSION_MAJOR > 1
20168         db_appexit( NULL );
20169 #else
20170         (void) dbopen( NULL, 0, 0, 0, NULL);
20171 #endif
20172
20173 ; return 0; }
20174 EOF
20175 if { (eval echo configure:20176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20176   rm -rf conftest*
20177   ol_cv_db_db_4_1=yes
20178 else
20179   echo "configure: failed program was:" >&5
20180   cat conftest.$ac_ext >&5
20181   rm -rf conftest*
20182   ol_cv_db_db_4_1=no
20183 fi
20184 rm -f conftest*
20185
20186         LIBS="$ol_LIBS"
20187
20188 fi
20189
20190 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
20191
20192         if test $ol_cv_db_db_4_1 = yes ; then
20193                 ol_cv_lib_db=-ldb-4-1
20194         fi
20195 fi
20196
20197 if test $ol_cv_lib_db = no ; then
20198         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
20199 echo "configure:20200: checking for Berkeley DB link (-ldb3)" >&5
20200 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
20201   echo $ac_n "(cached) $ac_c" 1>&6
20202 else
20203   
20204         ol_DB_LIB=-ldb3
20205         ol_LIBS=$LIBS
20206         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20207
20208         cat > conftest.$ac_ext <<EOF
20209 #line 20210 "configure"
20210 #include "confdefs.h"
20211
20212 #ifdef HAVE_DB_185_H
20213 # include <db_185.h>
20214 #else
20215 # include <db.h>
20216 #endif
20217
20218 #ifndef DB_VERSION_MAJOR
20219 # define DB_VERSION_MAJOR 1
20220 #endif
20221
20222 #ifndef NULL
20223 #define NULL ((void*)0)
20224 #endif
20225
20226 int main() {
20227
20228 #if DB_VERSION_MAJOR > 1
20229         {
20230                 char *version;
20231                 int major, minor, patch;
20232
20233                 version = db_version( &major, &minor, &patch );
20234
20235                 if( major != DB_VERSION_MAJOR ||
20236                         minor < DB_VERSION_MINOR )
20237                 {
20238                         printf("Berkeley DB version mismatch\n"
20239                                 "\theader: %s\n\tlibrary: %s\n",
20240                                 DB_VERSION_STRING, version);
20241                         return 1;
20242                 }
20243         }
20244 #endif
20245
20246 #if DB_VERSION_MAJOR > 2
20247         db_env_create( NULL, 0 );
20248 #elif DB_VERSION_MAJOR > 1
20249         db_appexit( NULL );
20250 #else
20251         (void) dbopen( NULL, 0, 0, 0, NULL);
20252 #endif
20253
20254 ; return 0; }
20255 EOF
20256 if { (eval echo configure:20257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20257   rm -rf conftest*
20258   ol_cv_db_db3=yes
20259 else
20260   echo "configure: failed program was:" >&5
20261   cat conftest.$ac_ext >&5
20262   rm -rf conftest*
20263   ol_cv_db_db3=no
20264 fi
20265 rm -f conftest*
20266
20267         LIBS="$ol_LIBS"
20268
20269 fi
20270
20271 echo "$ac_t""$ol_cv_db_db3" 1>&6
20272
20273         if test $ol_cv_db_db3 = yes ; then
20274                 ol_cv_lib_db=-ldb3
20275         fi
20276 fi
20277
20278 if test $ol_cv_lib_db = no ; then
20279         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
20280 echo "configure:20281: checking for Berkeley DB link (-ldb-3)" >&5
20281 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
20282   echo $ac_n "(cached) $ac_c" 1>&6
20283 else
20284   
20285         ol_DB_LIB=-ldb-3
20286         ol_LIBS=$LIBS
20287         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20288
20289         cat > conftest.$ac_ext <<EOF
20290 #line 20291 "configure"
20291 #include "confdefs.h"
20292
20293 #ifdef HAVE_DB_185_H
20294 # include <db_185.h>
20295 #else
20296 # include <db.h>
20297 #endif
20298
20299 #ifndef DB_VERSION_MAJOR
20300 # define DB_VERSION_MAJOR 1
20301 #endif
20302
20303 #ifndef NULL
20304 #define NULL ((void*)0)
20305 #endif
20306
20307 int main() {
20308
20309 #if DB_VERSION_MAJOR > 1
20310         {
20311                 char *version;
20312                 int major, minor, patch;
20313
20314                 version = db_version( &major, &minor, &patch );
20315
20316                 if( major != DB_VERSION_MAJOR ||
20317                         minor < DB_VERSION_MINOR )
20318                 {
20319                         printf("Berkeley DB version mismatch\n"
20320                                 "\theader: %s\n\tlibrary: %s\n",
20321                                 DB_VERSION_STRING, version);
20322                         return 1;
20323                 }
20324         }
20325 #endif
20326
20327 #if DB_VERSION_MAJOR > 2
20328         db_env_create( NULL, 0 );
20329 #elif DB_VERSION_MAJOR > 1
20330         db_appexit( NULL );
20331 #else
20332         (void) dbopen( NULL, 0, 0, 0, NULL);
20333 #endif
20334
20335 ; return 0; }
20336 EOF
20337 if { (eval echo configure:20338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20338   rm -rf conftest*
20339   ol_cv_db_db_3=yes
20340 else
20341   echo "configure: failed program was:" >&5
20342   cat conftest.$ac_ext >&5
20343   rm -rf conftest*
20344   ol_cv_db_db_3=no
20345 fi
20346 rm -f conftest*
20347
20348         LIBS="$ol_LIBS"
20349
20350 fi
20351
20352 echo "$ac_t""$ol_cv_db_db_3" 1>&6
20353
20354         if test $ol_cv_db_db_3 = yes ; then
20355                 ol_cv_lib_db=-ldb-3
20356         fi
20357 fi
20358
20359 if test $ol_cv_lib_db = no ; then
20360         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
20361 echo "configure:20362: checking for Berkeley DB link (-ldb2)" >&5
20362 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
20363   echo $ac_n "(cached) $ac_c" 1>&6
20364 else
20365   
20366         ol_DB_LIB=-ldb2
20367         ol_LIBS=$LIBS
20368         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20369
20370         cat > conftest.$ac_ext <<EOF
20371 #line 20372 "configure"
20372 #include "confdefs.h"
20373
20374 #ifdef HAVE_DB_185_H
20375 # include <db_185.h>
20376 #else
20377 # include <db.h>
20378 #endif
20379
20380 #ifndef DB_VERSION_MAJOR
20381 # define DB_VERSION_MAJOR 1
20382 #endif
20383
20384 #ifndef NULL
20385 #define NULL ((void*)0)
20386 #endif
20387
20388 int main() {
20389
20390 #if DB_VERSION_MAJOR > 1
20391         {
20392                 char *version;
20393                 int major, minor, patch;
20394
20395                 version = db_version( &major, &minor, &patch );
20396
20397                 if( major != DB_VERSION_MAJOR ||
20398                         minor < DB_VERSION_MINOR )
20399                 {
20400                         printf("Berkeley DB version mismatch\n"
20401                                 "\theader: %s\n\tlibrary: %s\n",
20402                                 DB_VERSION_STRING, version);
20403                         return 1;
20404                 }
20405         }
20406 #endif
20407
20408 #if DB_VERSION_MAJOR > 2
20409         db_env_create( NULL, 0 );
20410 #elif DB_VERSION_MAJOR > 1
20411         db_appexit( NULL );
20412 #else
20413         (void) dbopen( NULL, 0, 0, 0, NULL);
20414 #endif
20415
20416 ; return 0; }
20417 EOF
20418 if { (eval echo configure:20419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20419   rm -rf conftest*
20420   ol_cv_db_db2=yes
20421 else
20422   echo "configure: failed program was:" >&5
20423   cat conftest.$ac_ext >&5
20424   rm -rf conftest*
20425   ol_cv_db_db2=no
20426 fi
20427 rm -f conftest*
20428
20429         LIBS="$ol_LIBS"
20430
20431 fi
20432
20433 echo "$ac_t""$ol_cv_db_db2" 1>&6
20434
20435         if test $ol_cv_db_db2 = yes ; then
20436                 ol_cv_lib_db=-ldb2
20437         fi
20438 fi
20439
20440 if test $ol_cv_lib_db = no ; then
20441         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
20442 echo "configure:20443: checking for Berkeley DB link (-ldb-2)" >&5
20443 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
20444   echo $ac_n "(cached) $ac_c" 1>&6
20445 else
20446   
20447         ol_DB_LIB=-ldb-2
20448         ol_LIBS=$LIBS
20449         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20450
20451         cat > conftest.$ac_ext <<EOF
20452 #line 20453 "configure"
20453 #include "confdefs.h"
20454
20455 #ifdef HAVE_DB_185_H
20456 # include <db_185.h>
20457 #else
20458 # include <db.h>
20459 #endif
20460
20461 #ifndef DB_VERSION_MAJOR
20462 # define DB_VERSION_MAJOR 1
20463 #endif
20464
20465 #ifndef NULL
20466 #define NULL ((void*)0)
20467 #endif
20468
20469 int main() {
20470
20471 #if DB_VERSION_MAJOR > 1
20472         {
20473                 char *version;
20474                 int major, minor, patch;
20475
20476                 version = db_version( &major, &minor, &patch );
20477
20478                 if( major != DB_VERSION_MAJOR ||
20479                         minor < DB_VERSION_MINOR )
20480                 {
20481                         printf("Berkeley DB version mismatch\n"
20482                                 "\theader: %s\n\tlibrary: %s\n",
20483                                 DB_VERSION_STRING, version);
20484                         return 1;
20485                 }
20486         }
20487 #endif
20488
20489 #if DB_VERSION_MAJOR > 2
20490         db_env_create( NULL, 0 );
20491 #elif DB_VERSION_MAJOR > 1
20492         db_appexit( NULL );
20493 #else
20494         (void) dbopen( NULL, 0, 0, 0, NULL);
20495 #endif
20496
20497 ; return 0; }
20498 EOF
20499 if { (eval echo configure:20500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20500   rm -rf conftest*
20501   ol_cv_db_db_2=yes
20502 else
20503   echo "configure: failed program was:" >&5
20504   cat conftest.$ac_ext >&5
20505   rm -rf conftest*
20506   ol_cv_db_db_2=no
20507 fi
20508 rm -f conftest*
20509
20510         LIBS="$ol_LIBS"
20511
20512 fi
20513
20514 echo "$ac_t""$ol_cv_db_db_2" 1>&6
20515
20516         if test $ol_cv_db_db_2 = yes ; then
20517                 ol_cv_lib_db=-ldb-2
20518         fi
20519 fi
20520
20521 if test $ol_cv_lib_db = no ; then
20522         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
20523 echo "configure:20524: checking for Berkeley DB link (-ldb1)" >&5
20524 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
20525   echo $ac_n "(cached) $ac_c" 1>&6
20526 else
20527   
20528         ol_DB_LIB=-ldb1
20529         ol_LIBS=$LIBS
20530         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20531
20532         cat > conftest.$ac_ext <<EOF
20533 #line 20534 "configure"
20534 #include "confdefs.h"
20535
20536 #ifdef HAVE_DB_185_H
20537 # include <db_185.h>
20538 #else
20539 # include <db.h>
20540 #endif
20541
20542 #ifndef DB_VERSION_MAJOR
20543 # define DB_VERSION_MAJOR 1
20544 #endif
20545
20546 #ifndef NULL
20547 #define NULL ((void*)0)
20548 #endif
20549
20550 int main() {
20551
20552 #if DB_VERSION_MAJOR > 1
20553         {
20554                 char *version;
20555                 int major, minor, patch;
20556
20557                 version = db_version( &major, &minor, &patch );
20558
20559                 if( major != DB_VERSION_MAJOR ||
20560                         minor < DB_VERSION_MINOR )
20561                 {
20562                         printf("Berkeley DB version mismatch\n"
20563                                 "\theader: %s\n\tlibrary: %s\n",
20564                                 DB_VERSION_STRING, version);
20565                         return 1;
20566                 }
20567         }
20568 #endif
20569
20570 #if DB_VERSION_MAJOR > 2
20571         db_env_create( NULL, 0 );
20572 #elif DB_VERSION_MAJOR > 1
20573         db_appexit( NULL );
20574 #else
20575         (void) dbopen( NULL, 0, 0, 0, NULL);
20576 #endif
20577
20578 ; return 0; }
20579 EOF
20580 if { (eval echo configure:20581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20581   rm -rf conftest*
20582   ol_cv_db_db1=yes
20583 else
20584   echo "configure: failed program was:" >&5
20585   cat conftest.$ac_ext >&5
20586   rm -rf conftest*
20587   ol_cv_db_db1=no
20588 fi
20589 rm -f conftest*
20590
20591         LIBS="$ol_LIBS"
20592
20593 fi
20594
20595 echo "$ac_t""$ol_cv_db_db1" 1>&6
20596
20597         if test $ol_cv_db_db1 = yes ; then
20598                 ol_cv_lib_db=-ldb1
20599         fi
20600 fi
20601
20602 if test $ol_cv_lib_db = no ; then
20603         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
20604 echo "configure:20605: checking for Berkeley DB link (-ldb-1)" >&5
20605 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
20606   echo $ac_n "(cached) $ac_c" 1>&6
20607 else
20608   
20609         ol_DB_LIB=-ldb-1
20610         ol_LIBS=$LIBS
20611         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20612
20613         cat > conftest.$ac_ext <<EOF
20614 #line 20615 "configure"
20615 #include "confdefs.h"
20616
20617 #ifdef HAVE_DB_185_H
20618 # include <db_185.h>
20619 #else
20620 # include <db.h>
20621 #endif
20622
20623 #ifndef DB_VERSION_MAJOR
20624 # define DB_VERSION_MAJOR 1
20625 #endif
20626
20627 #ifndef NULL
20628 #define NULL ((void*)0)
20629 #endif
20630
20631 int main() {
20632
20633 #if DB_VERSION_MAJOR > 1
20634         {
20635                 char *version;
20636                 int major, minor, patch;
20637
20638                 version = db_version( &major, &minor, &patch );
20639
20640                 if( major != DB_VERSION_MAJOR ||
20641                         minor < DB_VERSION_MINOR )
20642                 {
20643                         printf("Berkeley DB version mismatch\n"
20644                                 "\theader: %s\n\tlibrary: %s\n",
20645                                 DB_VERSION_STRING, version);
20646                         return 1;
20647                 }
20648         }
20649 #endif
20650
20651 #if DB_VERSION_MAJOR > 2
20652         db_env_create( NULL, 0 );
20653 #elif DB_VERSION_MAJOR > 1
20654         db_appexit( NULL );
20655 #else
20656         (void) dbopen( NULL, 0, 0, 0, NULL);
20657 #endif
20658
20659 ; return 0; }
20660 EOF
20661 if { (eval echo configure:20662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20662   rm -rf conftest*
20663   ol_cv_db_db_1=yes
20664 else
20665   echo "configure: failed program was:" >&5
20666   cat conftest.$ac_ext >&5
20667   rm -rf conftest*
20668   ol_cv_db_db_1=no
20669 fi
20670 rm -f conftest*
20671
20672         LIBS="$ol_LIBS"
20673
20674 fi
20675
20676 echo "$ac_t""$ol_cv_db_db_1" 1>&6
20677
20678         if test $ol_cv_db_db_1 = yes ; then
20679                 ol_cv_lib_db=-ldb-1
20680         fi
20681 fi
20682
20683
20684         if test "$ol_cv_lib_db" != no ; then
20685                 ol_cv_berkeley_db=yes
20686                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
20687 echo "configure:20688: checking for Berkeley DB version match" >&5
20688 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
20689   echo $ac_n "(cached) $ac_c" 1>&6
20690 else
20691   
20692         ol_LIBS="$LIBS"
20693         LIBS="$LTHREAD_LIBS $LIBS"
20694         if test $ol_cv_lib_db != yes ; then
20695                 LIBS="$ol_cv_lib_db $LIBS"
20696         fi
20697
20698         if test "$cross_compiling" = yes; then
20699   ol_cv_berkeley_db_version=cross
20700 else
20701   cat > conftest.$ac_ext <<EOF
20702 #line 20703 "configure"
20703 #include "confdefs.h"
20704
20705 #ifdef HAVE_DB_185_H
20706         choke me;
20707 #else
20708 #include <db.h>
20709 #endif
20710 #ifndef DB_VERSION_MAJOR
20711 # define DB_VERSION_MAJOR 1
20712 #endif
20713 #ifndef NULL
20714 #define NULL ((void *)0)
20715 #endif
20716 main()
20717 {
20718 #if DB_VERSION_MAJOR > 1
20719         char *version;
20720         int major, minor, patch;
20721
20722         version = db_version( &major, &minor, &patch );
20723
20724         if( major != DB_VERSION_MAJOR ||
20725                 minor != DB_VERSION_MINOR ||
20726                 patch != DB_VERSION_PATCH )
20727         {
20728                 printf("Berkeley DB version mismatch\n"
20729                         "\theader: %s\n\tlibrary: %s\n",
20730                         DB_VERSION_STRING, version);
20731                 return 1;
20732         }
20733 #endif
20734
20735         return 0;
20736 }
20737 EOF
20738 if { (eval echo configure:20739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20739 then
20740   ol_cv_berkeley_db_version=yes
20741 else
20742   echo "configure: failed program was:" >&5
20743   cat conftest.$ac_ext >&5
20744   rm -fr conftest*
20745   ol_cv_berkeley_db_version=no
20746 fi
20747 rm -fr conftest*
20748 fi
20749
20750
20751         LIBS="$ol_LIBS"
20752
20753 fi
20754
20755 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
20756
20757         if test $ol_cv_berkeley_db_version = no ; then
20758                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
20759         fi
20760
20761                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
20762 echo "configure:20763: checking for Berkeley DB thread support" >&5
20763 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
20764   echo $ac_n "(cached) $ac_c" 1>&6
20765 else
20766   
20767         ol_LIBS="$LIBS"
20768         LIBS="$LTHREAD_LIBS $LIBS"
20769         if test $ol_cv_lib_db != yes ; then
20770                 LIBS="$ol_cv_lib_db $LIBS"
20771         fi
20772
20773         if test "$cross_compiling" = yes; then
20774   ol_cv_berkeley_db_thread=cross
20775 else
20776   cat > conftest.$ac_ext <<EOF
20777 #line 20778 "configure"
20778 #include "confdefs.h"
20779
20780 #ifdef HAVE_DB_185_H
20781         choke me;
20782 #else
20783 #include <db.h>
20784 #endif
20785 #ifndef NULL
20786 #define NULL ((void *)0)
20787 #endif
20788 main()
20789 {
20790         int rc;
20791         u_int32_t flags = DB_CREATE |
20792 #ifdef DB_PRIVATE
20793                 DB_PRIVATE |
20794 #endif
20795                 DB_THREAD;
20796
20797 #if DB_VERSION_MAJOR > 2
20798         DB_ENV *env = NULL;
20799
20800         rc = db_env_create( &env, 0 );
20801
20802         flags |= DB_INIT_MPOOL;
20803 #ifdef DB_MPOOL_PRIVATE
20804         flags |= DB_MPOOL_PRIVATE;
20805 #endif
20806
20807         if( rc ) {
20808                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20809                 return rc;
20810         }
20811
20812 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20813         rc = env->open( env, NULL, flags, 0 );
20814 #else
20815         rc = env->open( env, NULL, NULL, flags, 0 );
20816 #endif
20817
20818         if ( rc == 0 ) {
20819                 rc = env->close( env, 0 );
20820         }
20821
20822         if( rc ) {
20823                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20824                 return rc;
20825         }
20826
20827 #else
20828         DB_ENV env;
20829         memset( &env, '\0', sizeof(env) );
20830
20831         rc = db_appinit( NULL, NULL, &env, flags );
20832
20833         if( rc == 0 ) {
20834                 db_appexit( &env );
20835         }
20836
20837         unlink("__db_mpool.share");
20838         unlink("__db_lock.share");
20839 #endif
20840
20841         return rc;
20842 }
20843 EOF
20844 if { (eval echo configure:20845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
20845 then
20846   ol_cv_berkeley_db_thread=yes
20847 else
20848   echo "configure: failed program was:" >&5
20849   cat conftest.$ac_ext >&5
20850   rm -fr conftest*
20851   ol_cv_berkeley_db_thread=no
20852 fi
20853 rm -fr conftest*
20854 fi
20855
20856
20857         LIBS="$ol_LIBS"
20858
20859 fi
20860
20861 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20862
20863         if test $ol_cv_berkeley_db_thread != no ; then
20864                 cat >> confdefs.h <<\EOF
20865 #define HAVE_BERKELEY_DB_THREAD 1
20866 EOF
20867
20868         fi
20869
20870         fi
20871 fi
20872
20873         fi
20874
20875         if test $ol_cv_berkeley_db != no ; then
20876                 cat >> confdefs.h <<\EOF
20877 #define HAVE_BERKELEY_DB 1
20878 EOF
20879
20880
20881                 ol_link_ldbm=berkeley
20882                 ol_with_ldbm_api=berkeley
20883
20884                 if test $ol_with_ldbm_type = hash ; then
20885                         cat >> confdefs.h <<\EOF
20886 #define LDBM_USE_DBHASH 1
20887 EOF
20888
20889                 else
20890                         cat >> confdefs.h <<\EOF
20891 #define LDBM_USE_DBBTREE 1
20892 EOF
20893
20894                 fi
20895
20896                                                 if test $ol_cv_lib_db != yes ; then
20897                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20898                 fi
20899         fi
20900 fi
20901
20902 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20903         if test $ol_link_ldbm != berkeley ; then
20904                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20905         else
20906                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20907 echo "configure:20908: checking Berkeley DB version for BDB backend" >&5
20908 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20909   echo $ac_n "(cached) $ac_c" 1>&6
20910 else
20911   
20912         cat > conftest.$ac_ext <<EOF
20913 #line 20914 "configure"
20914 #include "confdefs.h"
20915
20916 #include <db.h>
20917
20918  /* this check could be improved */
20919 #ifndef DB_VERSION_MAJOR
20920 #       define DB_VERSION_MAJOR 1
20921 #endif
20922 #ifndef DB_VERSION_MINOR
20923 #       define DB_VERSION_MINOR 0
20924 #endif
20925
20926 /* require 4.2 or later */
20927 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20928         __db_version_compat
20929 #endif
20930         
20931 EOF
20932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20933   egrep "__db_version_compat" >/dev/null 2>&1; then
20934   rm -rf conftest*
20935   ol_cv_bdb_compat=yes
20936 else
20937   rm -rf conftest*
20938   ol_cv_bdb_compat=no
20939 fi
20940 rm -f conftest*
20941
20942 fi
20943
20944 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20945
20946
20947                 if test $ol_cv_bdb_compat != yes ; then
20948                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20949                 fi
20950         fi
20951 fi
20952
20953 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20954         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20955         ol_with_ldbm_api=none
20956 fi
20957
20958 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20959         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20960 echo "configure:20961: checking for MDBM library" >&5
20961 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20962   echo $ac_n "(cached) $ac_c" 1>&6
20963 else
20964         ol_LIBS="$LIBS"
20965         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20966 echo "configure:20967: checking for mdbm_set_chain" >&5
20967 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20968   echo $ac_n "(cached) $ac_c" 1>&6
20969 else
20970   cat > conftest.$ac_ext <<EOF
20971 #line 20972 "configure"
20972 #include "confdefs.h"
20973 /* System header to define __stub macros and hopefully few prototypes,
20974     which can conflict with char mdbm_set_chain(); below.  */
20975 #include <assert.h>
20976 /* Override any gcc2 internal prototype to avoid an error.  */
20977 /* We use char because int might match the return type of a gcc2
20978     builtin and then its argument prototype would still apply.  */
20979 char mdbm_set_chain();
20980 char (*f)();
20981
20982 int main() {
20983
20984 /* The GNU C library defines this for functions which it implements
20985     to always fail with ENOSYS.  Some functions are actually named
20986     something starting with __ and the normal name is an alias.  */
20987 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20988 choke me
20989 #else
20990 f = mdbm_set_chain;
20991 #endif
20992
20993 ; return 0; }
20994 EOF
20995 if { (eval echo configure:20996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20996   rm -rf conftest*
20997   eval "ac_cv_func_mdbm_set_chain=yes"
20998 else
20999   echo "configure: failed program was:" >&5
21000   cat conftest.$ac_ext >&5
21001   rm -rf conftest*
21002   eval "ac_cv_func_mdbm_set_chain=no"
21003 fi
21004 rm -f conftest*
21005 fi
21006
21007 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
21008   echo "$ac_t""yes" 1>&6
21009   ol_cv_lib_mdbm=yes
21010 else
21011   echo "$ac_t""no" 1>&6
21012
21013                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
21014 echo "configure:21015: checking for mdbm_set_chain in -lmdbm" >&5
21015 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
21016 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21017   echo $ac_n "(cached) $ac_c" 1>&6
21018 else
21019   ac_save_LIBS="$LIBS"
21020 LIBS="-lmdbm  $LIBS"
21021 cat > conftest.$ac_ext <<EOF
21022 #line 21023 "configure"
21023 #include "confdefs.h"
21024 /* Override any gcc2 internal prototype to avoid an error.  */
21025 /* We use char because int might match the return type of a gcc2
21026     builtin and then its argument prototype would still apply.  */
21027 char mdbm_set_chain();
21028
21029 int main() {
21030 mdbm_set_chain()
21031 ; return 0; }
21032 EOF
21033 if { (eval echo configure:21034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21034   rm -rf conftest*
21035   eval "ac_cv_lib_$ac_lib_var=yes"
21036 else
21037   echo "configure: failed program was:" >&5
21038   cat conftest.$ac_ext >&5
21039   rm -rf conftest*
21040   eval "ac_cv_lib_$ac_lib_var=no"
21041 fi
21042 rm -f conftest*
21043 LIBS="$ac_save_LIBS"
21044
21045 fi
21046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21047   echo "$ac_t""yes" 1>&6
21048   ol_cv_lib_mdbm=-lmdbm
21049 else
21050   echo "$ac_t""no" 1>&6
21051 ol_cv_lib_mdbm=no
21052 fi
21053
21054         
21055 fi
21056
21057         LIBS="$ol_LIBS"
21058
21059 fi
21060
21061 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
21062
21063
21064  for ac_hdr in mdbm.h
21065 do
21066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21068 echo "configure:21069: checking for $ac_hdr" >&5
21069 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21070   echo $ac_n "(cached) $ac_c" 1>&6
21071 else
21072   cat > conftest.$ac_ext <<EOF
21073 #line 21074 "configure"
21074 #include "confdefs.h"
21075 #include <$ac_hdr>
21076 EOF
21077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21078 { (eval echo configure:21079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21080 if test -z "$ac_err"; then
21081   rm -rf conftest*
21082   eval "ac_cv_header_$ac_safe=yes"
21083 else
21084   echo "$ac_err" >&5
21085   echo "configure: failed program was:" >&5
21086   cat conftest.$ac_ext >&5
21087   rm -rf conftest*
21088   eval "ac_cv_header_$ac_safe=no"
21089 fi
21090 rm -f conftest*
21091 fi
21092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21093   echo "$ac_t""yes" 1>&6
21094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21095   cat >> confdefs.h <<EOF
21096 #define $ac_tr_hdr 1
21097 EOF
21098  
21099 else
21100   echo "$ac_t""no" 1>&6
21101 fi
21102 done
21103
21104  echo $ac_n "checking for db""... $ac_c" 1>&6
21105 echo "configure:21106: checking for db" >&5
21106 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
21107   echo $ac_n "(cached) $ac_c" 1>&6
21108 else
21109   
21110         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
21111                 ol_cv_mdbm=no
21112         else
21113                 ol_cv_mdbm=yes
21114         fi
21115
21116 fi
21117
21118 echo "$ac_t""$ol_cv_mdbm" 1>&6
21119  if test $ol_cv_mdbm = yes ; then
21120         cat >> confdefs.h <<\EOF
21121 #define HAVE_MDBM 1
21122 EOF
21123
21124  fi
21125
21126
21127         if test $ol_cv_mdbm = yes ; then
21128                 ol_link_ldbm=mdbm
21129                 ol_with_ldbm_api=mdbm
21130                 if test $ol_cv_lib_mdbm != yes ; then
21131                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
21132                 fi
21133         fi
21134 fi
21135
21136 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
21137         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
21138 echo "configure:21139: checking for GDBM library" >&5
21139 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
21140   echo $ac_n "(cached) $ac_c" 1>&6
21141 else
21142         ol_LIBS="$LIBS"
21143         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
21144 echo "configure:21145: checking for gdbm_open" >&5
21145 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
21146   echo $ac_n "(cached) $ac_c" 1>&6
21147 else
21148   cat > conftest.$ac_ext <<EOF
21149 #line 21150 "configure"
21150 #include "confdefs.h"
21151 /* System header to define __stub macros and hopefully few prototypes,
21152     which can conflict with char gdbm_open(); below.  */
21153 #include <assert.h>
21154 /* Override any gcc2 internal prototype to avoid an error.  */
21155 /* We use char because int might match the return type of a gcc2
21156     builtin and then its argument prototype would still apply.  */
21157 char gdbm_open();
21158 char (*f)();
21159
21160 int main() {
21161
21162 /* The GNU C library defines this for functions which it implements
21163     to always fail with ENOSYS.  Some functions are actually named
21164     something starting with __ and the normal name is an alias.  */
21165 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
21166 choke me
21167 #else
21168 f = gdbm_open;
21169 #endif
21170
21171 ; return 0; }
21172 EOF
21173 if { (eval echo configure:21174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21174   rm -rf conftest*
21175   eval "ac_cv_func_gdbm_open=yes"
21176 else
21177   echo "configure: failed program was:" >&5
21178   cat conftest.$ac_ext >&5
21179   rm -rf conftest*
21180   eval "ac_cv_func_gdbm_open=no"
21181 fi
21182 rm -f conftest*
21183 fi
21184
21185 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
21186   echo "$ac_t""yes" 1>&6
21187   ol_cv_lib_gdbm=yes
21188 else
21189   echo "$ac_t""no" 1>&6
21190
21191                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
21192 echo "configure:21193: checking for gdbm_open in -lgdbm" >&5
21193 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
21194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21195   echo $ac_n "(cached) $ac_c" 1>&6
21196 else
21197   ac_save_LIBS="$LIBS"
21198 LIBS="-lgdbm  $LIBS"
21199 cat > conftest.$ac_ext <<EOF
21200 #line 21201 "configure"
21201 #include "confdefs.h"
21202 /* Override any gcc2 internal prototype to avoid an error.  */
21203 /* We use char because int might match the return type of a gcc2
21204     builtin and then its argument prototype would still apply.  */
21205 char gdbm_open();
21206
21207 int main() {
21208 gdbm_open()
21209 ; return 0; }
21210 EOF
21211 if { (eval echo configure:21212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21212   rm -rf conftest*
21213   eval "ac_cv_lib_$ac_lib_var=yes"
21214 else
21215   echo "configure: failed program was:" >&5
21216   cat conftest.$ac_ext >&5
21217   rm -rf conftest*
21218   eval "ac_cv_lib_$ac_lib_var=no"
21219 fi
21220 rm -f conftest*
21221 LIBS="$ac_save_LIBS"
21222
21223 fi
21224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21225   echo "$ac_t""yes" 1>&6
21226   ol_cv_lib_gdbm=-lgdbm
21227 else
21228   echo "$ac_t""no" 1>&6
21229 ol_cv_lib_gdbm=no
21230 fi
21231
21232         
21233 fi
21234
21235         LIBS="$ol_LIBS"
21236
21237 fi
21238
21239 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
21240
21241
21242  for ac_hdr in gdbm.h
21243 do
21244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21246 echo "configure:21247: checking for $ac_hdr" >&5
21247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21248   echo $ac_n "(cached) $ac_c" 1>&6
21249 else
21250   cat > conftest.$ac_ext <<EOF
21251 #line 21252 "configure"
21252 #include "confdefs.h"
21253 #include <$ac_hdr>
21254 EOF
21255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21256 { (eval echo configure:21257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21258 if test -z "$ac_err"; then
21259   rm -rf conftest*
21260   eval "ac_cv_header_$ac_safe=yes"
21261 else
21262   echo "$ac_err" >&5
21263   echo "configure: failed program was:" >&5
21264   cat conftest.$ac_ext >&5
21265   rm -rf conftest*
21266   eval "ac_cv_header_$ac_safe=no"
21267 fi
21268 rm -f conftest*
21269 fi
21270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21271   echo "$ac_t""yes" 1>&6
21272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21273   cat >> confdefs.h <<EOF
21274 #define $ac_tr_hdr 1
21275 EOF
21276  
21277 else
21278   echo "$ac_t""no" 1>&6
21279 fi
21280 done
21281
21282  echo $ac_n "checking for db""... $ac_c" 1>&6
21283 echo "configure:21284: checking for db" >&5
21284 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
21285   echo $ac_n "(cached) $ac_c" 1>&6
21286 else
21287   
21288         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
21289                 ol_cv_gdbm=no
21290         else
21291                 ol_cv_gdbm=yes
21292         fi
21293
21294 fi
21295
21296 echo "$ac_t""$ol_cv_gdbm" 1>&6
21297  if test $ol_cv_gdbm = yes ; then
21298         cat >> confdefs.h <<\EOF
21299 #define HAVE_GDBM 1
21300 EOF
21301
21302  fi
21303
21304
21305         if test $ol_cv_gdbm = yes ; then
21306                 ol_link_ldbm=gdbm
21307                 ol_with_ldbm_api=gdbm
21308
21309                 if test $ol_cv_lib_gdbm != yes ; then
21310                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
21311                 fi
21312         fi
21313 fi
21314
21315 if test $ol_with_ldbm_api = ndbm ; then
21316         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
21317 echo "configure:21318: checking for NDBM library" >&5
21318 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
21319   echo $ac_n "(cached) $ac_c" 1>&6
21320 else
21321         ol_LIBS="$LIBS"
21322         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
21323 echo "configure:21324: checking for dbm_open" >&5
21324 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
21325   echo $ac_n "(cached) $ac_c" 1>&6
21326 else
21327   cat > conftest.$ac_ext <<EOF
21328 #line 21329 "configure"
21329 #include "confdefs.h"
21330 /* System header to define __stub macros and hopefully few prototypes,
21331     which can conflict with char dbm_open(); below.  */
21332 #include <assert.h>
21333 /* Override any gcc2 internal prototype to avoid an error.  */
21334 /* We use char because int might match the return type of a gcc2
21335     builtin and then its argument prototype would still apply.  */
21336 char dbm_open();
21337 char (*f)();
21338
21339 int main() {
21340
21341 /* The GNU C library defines this for functions which it implements
21342     to always fail with ENOSYS.  Some functions are actually named
21343     something starting with __ and the normal name is an alias.  */
21344 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
21345 choke me
21346 #else
21347 f = dbm_open;
21348 #endif
21349
21350 ; return 0; }
21351 EOF
21352 if { (eval echo configure:21353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21353   rm -rf conftest*
21354   eval "ac_cv_func_dbm_open=yes"
21355 else
21356   echo "configure: failed program was:" >&5
21357   cat conftest.$ac_ext >&5
21358   rm -rf conftest*
21359   eval "ac_cv_func_dbm_open=no"
21360 fi
21361 rm -f conftest*
21362 fi
21363
21364 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
21365   echo "$ac_t""yes" 1>&6
21366   ol_cv_lib_ndbm=yes
21367 else
21368   echo "$ac_t""no" 1>&6
21369
21370                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
21371 echo "configure:21372: checking for dbm_open in -lndbm" >&5
21372 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21374   echo $ac_n "(cached) $ac_c" 1>&6
21375 else
21376   ac_save_LIBS="$LIBS"
21377 LIBS="-lndbm  $LIBS"
21378 cat > conftest.$ac_ext <<EOF
21379 #line 21380 "configure"
21380 #include "confdefs.h"
21381 /* Override any gcc2 internal prototype to avoid an error.  */
21382 /* We use char because int might match the return type of a gcc2
21383     builtin and then its argument prototype would still apply.  */
21384 char dbm_open();
21385
21386 int main() {
21387 dbm_open()
21388 ; return 0; }
21389 EOF
21390 if { (eval echo configure:21391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21391   rm -rf conftest*
21392   eval "ac_cv_lib_$ac_lib_var=yes"
21393 else
21394   echo "configure: failed program was:" >&5
21395   cat conftest.$ac_ext >&5
21396   rm -rf conftest*
21397   eval "ac_cv_lib_$ac_lib_var=no"
21398 fi
21399 rm -f conftest*
21400 LIBS="$ac_save_LIBS"
21401
21402 fi
21403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21404   echo "$ac_t""yes" 1>&6
21405   ol_cv_lib_ndbm=-lndbm
21406 else
21407   echo "$ac_t""no" 1>&6
21408
21409                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
21410 echo "configure:21411: checking for dbm_open in -ldbm" >&5
21411 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
21412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21413   echo $ac_n "(cached) $ac_c" 1>&6
21414 else
21415   ac_save_LIBS="$LIBS"
21416 LIBS="-ldbm  $LIBS"
21417 cat > conftest.$ac_ext <<EOF
21418 #line 21419 "configure"
21419 #include "confdefs.h"
21420 /* Override any gcc2 internal prototype to avoid an error.  */
21421 /* We use char because int might match the return type of a gcc2
21422     builtin and then its argument prototype would still apply.  */
21423 char dbm_open();
21424
21425 int main() {
21426 dbm_open()
21427 ; return 0; }
21428 EOF
21429 if { (eval echo configure:21430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21430   rm -rf conftest*
21431   eval "ac_cv_lib_$ac_lib_var=yes"
21432 else
21433   echo "configure: failed program was:" >&5
21434   cat conftest.$ac_ext >&5
21435   rm -rf conftest*
21436   eval "ac_cv_lib_$ac_lib_var=no"
21437 fi
21438 rm -f conftest*
21439 LIBS="$ac_save_LIBS"
21440
21441 fi
21442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21443   echo "$ac_t""yes" 1>&6
21444   ol_cv_lib_ndbm=-ldbm
21445 else
21446   echo "$ac_t""no" 1>&6
21447 ol_cv_lib_ndbm=no
21448 fi
21449                 
21450 fi
21451
21452         
21453 fi
21454
21455         LIBS="$ol_LIBS"
21456
21457 fi
21458
21459 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
21460
21461
21462  for ac_hdr in ndbm.h
21463 do
21464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21466 echo "configure:21467: checking for $ac_hdr" >&5
21467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21468   echo $ac_n "(cached) $ac_c" 1>&6
21469 else
21470   cat > conftest.$ac_ext <<EOF
21471 #line 21472 "configure"
21472 #include "confdefs.h"
21473 #include <$ac_hdr>
21474 EOF
21475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21476 { (eval echo configure:21477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21478 if test -z "$ac_err"; then
21479   rm -rf conftest*
21480   eval "ac_cv_header_$ac_safe=yes"
21481 else
21482   echo "$ac_err" >&5
21483   echo "configure: failed program was:" >&5
21484   cat conftest.$ac_ext >&5
21485   rm -rf conftest*
21486   eval "ac_cv_header_$ac_safe=no"
21487 fi
21488 rm -f conftest*
21489 fi
21490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21491   echo "$ac_t""yes" 1>&6
21492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21493   cat >> confdefs.h <<EOF
21494 #define $ac_tr_hdr 1
21495 EOF
21496  
21497 else
21498   echo "$ac_t""no" 1>&6
21499 fi
21500 done
21501
21502  echo $ac_n "checking for db""... $ac_c" 1>&6
21503 echo "configure:21504: checking for db" >&5
21504 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
21505   echo $ac_n "(cached) $ac_c" 1>&6
21506 else
21507   
21508         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
21509                 ol_cv_ndbm=no
21510         else
21511                 ol_cv_ndbm=yes
21512         fi
21513
21514 fi
21515
21516 echo "$ac_t""$ol_cv_ndbm" 1>&6
21517  if test $ol_cv_ndbm = yes ; then
21518         cat >> confdefs.h <<\EOF
21519 #define HAVE_NDBM 1
21520 EOF
21521
21522  fi
21523
21524
21525         if test $ol_cv_ndbm = yes ; then
21526                 ol_link_ldbm=ndbm
21527                 ol_with_ldbm_api=ndbm
21528
21529                 if test $ol_cv_lib_ndbm != yes ; then
21530                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
21531                 fi
21532         fi
21533 fi
21534
21535 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
21536         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
21537 fi
21538
21539 if test $ol_enable_bdb = yes -o \
21540         $ol_enable_hdb = yes -o \
21541         $ol_enable_ldbm = yes ; then
21542         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
21543 fi
21544
21545
21546 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
21547         BUILD_LIBS_DYNAMIC=shared
21548         cat >> confdefs.h <<\EOF
21549 #define LDAP_LIBS_DYNAMIC 1
21550 EOF
21551
21552         LTSTATIC=""
21553 else
21554         BUILD_LIBS_DYNAMIC=static
21555         LTSTATIC="-static"
21556 fi
21557
21558 if test $ol_enable_wrappers != no ; then
21559         for ac_hdr in tcpd.h
21560 do
21561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21563 echo "configure:21564: checking for $ac_hdr" >&5
21564 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21565   echo $ac_n "(cached) $ac_c" 1>&6
21566 else
21567   cat > conftest.$ac_ext <<EOF
21568 #line 21569 "configure"
21569 #include "confdefs.h"
21570 #include <$ac_hdr>
21571 EOF
21572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21573 { (eval echo configure:21574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21575 if test -z "$ac_err"; then
21576   rm -rf conftest*
21577   eval "ac_cv_header_$ac_safe=yes"
21578 else
21579   echo "$ac_err" >&5
21580   echo "configure: failed program was:" >&5
21581   cat conftest.$ac_ext >&5
21582   rm -rf conftest*
21583   eval "ac_cv_header_$ac_safe=no"
21584 fi
21585 rm -f conftest*
21586 fi
21587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21588   echo "$ac_t""yes" 1>&6
21589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21590   cat >> confdefs.h <<EOF
21591 #define $ac_tr_hdr 1
21592 EOF
21593  
21594                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
21595 echo "configure:21596: checking for TCP wrappers library" >&5
21596                 save_LIBS="$LIBS"
21597                 LIBS="$LIBS -lwrap"
21598                 cat > conftest.$ac_ext <<EOF
21599 #line 21600 "configure"
21600 #include "confdefs.h"
21601
21602 #include <tcpd.h>
21603 int allow_severity = 0;
21604 int deny_severity  = 0;
21605
21606 struct request_info *req;
21607                 
21608 int main() {
21609
21610 hosts_access(req)
21611                 
21612 ; return 0; }
21613 EOF
21614 if { (eval echo configure:21615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21615   rm -rf conftest*
21616   echo "$ac_t""-lwrap" 1>&6
21617                 have_wrappers=yes
21618                 LIBS="$save_LIBS"
21619 else
21620   echo "configure: failed program was:" >&5
21621   cat conftest.$ac_ext >&5
21622   rm -rf conftest*
21623   
21624                                 LIBS="$LIBS -lnsl"
21625                 cat > conftest.$ac_ext <<EOF
21626 #line 21627 "configure"
21627 #include "confdefs.h"
21628
21629 #include <tcpd.h>
21630 int allow_severity = 0;
21631 int deny_severity  = 0;
21632
21633 struct request_info *req;
21634                 
21635 int main() {
21636
21637 hosts_access(req)
21638                 
21639 ; return 0; }
21640 EOF
21641 if { (eval echo configure:21642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21642   rm -rf conftest*
21643   echo "$ac_t""-lwrap -lnsl" 1>&6
21644                 have_wrappers=yes
21645                 LIBS="$save_LIBS -lnsl"
21646 else
21647   echo "configure: failed program was:" >&5
21648   cat conftest.$ac_ext >&5
21649   rm -rf conftest*
21650   
21651                 echo "$ac_t""no" 1>&6
21652                 have_wrappers=no
21653                 LIBS=$save_LIBS
21654 fi
21655 rm -f conftest*
21656 fi
21657 rm -f conftest*
21658 else
21659   echo "$ac_t""no" 1>&6
21660 have_wrappers=no
21661 fi
21662 done
21663
21664
21665         if test $have_wrappers = yes ; then
21666                 cat >> confdefs.h <<\EOF
21667 #define HAVE_TCPD 1
21668 EOF
21669
21670                 WRAP_LIBS="-lwrap"
21671         elif test $ol_enable_wrappers = yes ; then
21672                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
21673         else
21674                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
21675                 WRAP_LIBS=""
21676         fi
21677 fi
21678
21679 if test $ol_enable_syslog != no ; then
21680         echo $ac_n "checking for openlog""... $ac_c" 1>&6
21681 echo "configure:21682: checking for openlog" >&5
21682 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
21683   echo $ac_n "(cached) $ac_c" 1>&6
21684 else
21685   cat > conftest.$ac_ext <<EOF
21686 #line 21687 "configure"
21687 #include "confdefs.h"
21688 /* System header to define __stub macros and hopefully few prototypes,
21689     which can conflict with char openlog(); below.  */
21690 #include <assert.h>
21691 /* Override any gcc2 internal prototype to avoid an error.  */
21692 /* We use char because int might match the return type of a gcc2
21693     builtin and then its argument prototype would still apply.  */
21694 char openlog();
21695 char (*f)();
21696
21697 int main() {
21698
21699 /* The GNU C library defines this for functions which it implements
21700     to always fail with ENOSYS.  Some functions are actually named
21701     something starting with __ and the normal name is an alias.  */
21702 #if defined (__stub_openlog) || defined (__stub___openlog)
21703 choke me
21704 #else
21705 f = openlog;
21706 #endif
21707
21708 ; return 0; }
21709 EOF
21710 if { (eval echo configure:21711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21711   rm -rf conftest*
21712   eval "ac_cv_func_openlog=yes"
21713 else
21714   echo "configure: failed program was:" >&5
21715   cat conftest.$ac_ext >&5
21716   rm -rf conftest*
21717   eval "ac_cv_func_openlog=no"
21718 fi
21719 rm -f conftest*
21720 fi
21721
21722 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
21723   echo "$ac_t""yes" 1>&6
21724   :
21725 else
21726   echo "$ac_t""no" 1>&6
21727 fi
21728
21729         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
21730                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
21731         fi
21732         ol_enable_syslog=$ac_cv_func_openlog
21733 fi
21734
21735
21736 ol_link_sql=no
21737 if test $ol_enable_sql != no ; then
21738         for ac_hdr in sql.h sqlext.h
21739 do
21740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21742 echo "configure:21743: checking for $ac_hdr" >&5
21743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21744   echo $ac_n "(cached) $ac_c" 1>&6
21745 else
21746   cat > conftest.$ac_ext <<EOF
21747 #line 21748 "configure"
21748 #include "confdefs.h"
21749 #include <$ac_hdr>
21750 EOF
21751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21752 { (eval echo configure:21753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21754 if test -z "$ac_err"; then
21755   rm -rf conftest*
21756   eval "ac_cv_header_$ac_safe=yes"
21757 else
21758   echo "$ac_err" >&5
21759   echo "configure: failed program was:" >&5
21760   cat conftest.$ac_ext >&5
21761   rm -rf conftest*
21762   eval "ac_cv_header_$ac_safe=no"
21763 fi
21764 rm -f conftest*
21765 fi
21766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21767   echo "$ac_t""yes" 1>&6
21768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21769   cat >> confdefs.h <<EOF
21770 #define $ac_tr_hdr 1
21771 EOF
21772  
21773 else
21774   echo "$ac_t""no" 1>&6
21775 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21776         
21777 fi
21778 done
21779
21780
21781         sql_LIBS="$LIBS"
21782         LIBS="$LTHREAD_LIBS"
21783
21784         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21785 echo "configure:21786: checking for SQLDriverConnect in -liodbc" >&5
21786 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21788   echo $ac_n "(cached) $ac_c" 1>&6
21789 else
21790   ac_save_LIBS="$LIBS"
21791 LIBS="-liodbc  $LIBS"
21792 cat > conftest.$ac_ext <<EOF
21793 #line 21794 "configure"
21794 #include "confdefs.h"
21795 /* Override any gcc2 internal prototype to avoid an error.  */
21796 /* We use char because int might match the return type of a gcc2
21797     builtin and then its argument prototype would still apply.  */
21798 char SQLDriverConnect();
21799
21800 int main() {
21801 SQLDriverConnect()
21802 ; return 0; }
21803 EOF
21804 if { (eval echo configure:21805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21805   rm -rf conftest*
21806   eval "ac_cv_lib_$ac_lib_var=yes"
21807 else
21808   echo "configure: failed program was:" >&5
21809   cat conftest.$ac_ext >&5
21810   rm -rf conftest*
21811   eval "ac_cv_lib_$ac_lib_var=no"
21812 fi
21813 rm -f conftest*
21814 LIBS="$ac_save_LIBS"
21815
21816 fi
21817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21818   echo "$ac_t""yes" 1>&6
21819   have_iodbc=yes
21820 else
21821   echo "$ac_t""no" 1>&6
21822 have_iodbc=no
21823 fi
21824
21825         if test $have_iodbc = yes ; then
21826                 ol_link_sql="-liodbc"
21827         else
21828                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21829 echo "configure:21830: checking for SQLDriverConnect in -lodbc" >&5
21830 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21831 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21832   echo $ac_n "(cached) $ac_c" 1>&6
21833 else
21834   ac_save_LIBS="$LIBS"
21835 LIBS="-lodbc  $LIBS"
21836 cat > conftest.$ac_ext <<EOF
21837 #line 21838 "configure"
21838 #include "confdefs.h"
21839 /* Override any gcc2 internal prototype to avoid an error.  */
21840 /* We use char because int might match the return type of a gcc2
21841     builtin and then its argument prototype would still apply.  */
21842 char SQLDriverConnect();
21843
21844 int main() {
21845 SQLDriverConnect()
21846 ; return 0; }
21847 EOF
21848 if { (eval echo configure:21849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21849   rm -rf conftest*
21850   eval "ac_cv_lib_$ac_lib_var=yes"
21851 else
21852   echo "configure: failed program was:" >&5
21853   cat conftest.$ac_ext >&5
21854   rm -rf conftest*
21855   eval "ac_cv_lib_$ac_lib_var=no"
21856 fi
21857 rm -f conftest*
21858 LIBS="$ac_save_LIBS"
21859
21860 fi
21861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21862   echo "$ac_t""yes" 1>&6
21863   have_odbc=yes
21864 else
21865   echo "$ac_t""no" 1>&6
21866 have_odbc=no
21867 fi
21868
21869                 if test $have_odbc = yes ; then
21870                         ol_link_sql="-lodbc"
21871                 fi
21872         fi
21873
21874         LIBS="$sql_LIBS"
21875
21876         if test $ol_link_sql != no ; then
21877                 SLAPD_SQL_LIBS="$ol_link_sql"
21878
21879         elif test $ol_enable_sql != auto ; then
21880                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21881         fi
21882 fi
21883
21884 WITH_SASL=no
21885 ol_link_sasl=no
21886 ol_link_spasswd=no
21887 if test $ol_with_cyrus_sasl != no ; then
21888         for ac_hdr in sasl/sasl.h sasl.h
21889 do
21890 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21891 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21892 echo "configure:21893: checking for $ac_hdr" >&5
21893 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21894   echo $ac_n "(cached) $ac_c" 1>&6
21895 else
21896   cat > conftest.$ac_ext <<EOF
21897 #line 21898 "configure"
21898 #include "confdefs.h"
21899 #include <$ac_hdr>
21900 EOF
21901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21902 { (eval echo configure:21903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21904 if test -z "$ac_err"; then
21905   rm -rf conftest*
21906   eval "ac_cv_header_$ac_safe=yes"
21907 else
21908   echo "$ac_err" >&5
21909   echo "configure: failed program was:" >&5
21910   cat conftest.$ac_ext >&5
21911   rm -rf conftest*
21912   eval "ac_cv_header_$ac_safe=no"
21913 fi
21914 rm -f conftest*
21915 fi
21916 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21917   echo "$ac_t""yes" 1>&6
21918     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21919   cat >> confdefs.h <<EOF
21920 #define $ac_tr_hdr 1
21921 EOF
21922  
21923 else
21924   echo "$ac_t""no" 1>&6
21925 fi
21926 done
21927
21928
21929         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21930                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21931 echo "configure:21932: checking for sasl_client_init in -lsasl2" >&5
21932 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21933 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21934   echo $ac_n "(cached) $ac_c" 1>&6
21935 else
21936   ac_save_LIBS="$LIBS"
21937 LIBS="-lsasl2  $LIBS"
21938 cat > conftest.$ac_ext <<EOF
21939 #line 21940 "configure"
21940 #include "confdefs.h"
21941 /* Override any gcc2 internal prototype to avoid an error.  */
21942 /* We use char because int might match the return type of a gcc2
21943     builtin and then its argument prototype would still apply.  */
21944 char sasl_client_init();
21945
21946 int main() {
21947 sasl_client_init()
21948 ; return 0; }
21949 EOF
21950 if { (eval echo configure:21951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21951   rm -rf conftest*
21952   eval "ac_cv_lib_$ac_lib_var=yes"
21953 else
21954   echo "configure: failed program was:" >&5
21955   cat conftest.$ac_ext >&5
21956   rm -rf conftest*
21957   eval "ac_cv_lib_$ac_lib_var=no"
21958 fi
21959 rm -f conftest*
21960 LIBS="$ac_save_LIBS"
21961
21962 fi
21963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21964   echo "$ac_t""yes" 1>&6
21965   ol_link_sasl="-lsasl2"
21966 else
21967   echo "$ac_t""no" 1>&6
21968 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21969 echo "configure:21970: checking for sasl_client_init in -lsasl" >&5
21970 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21971 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21972   echo $ac_n "(cached) $ac_c" 1>&6
21973 else
21974   ac_save_LIBS="$LIBS"
21975 LIBS="-lsasl  $LIBS"
21976 cat > conftest.$ac_ext <<EOF
21977 #line 21978 "configure"
21978 #include "confdefs.h"
21979 /* Override any gcc2 internal prototype to avoid an error.  */
21980 /* We use char because int might match the return type of a gcc2
21981     builtin and then its argument prototype would still apply.  */
21982 char sasl_client_init();
21983
21984 int main() {
21985 sasl_client_init()
21986 ; return 0; }
21987 EOF
21988 if { (eval echo configure:21989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21989   rm -rf conftest*
21990   eval "ac_cv_lib_$ac_lib_var=yes"
21991 else
21992   echo "configure: failed program was:" >&5
21993   cat conftest.$ac_ext >&5
21994   rm -rf conftest*
21995   eval "ac_cv_lib_$ac_lib_var=no"
21996 fi
21997 rm -f conftest*
21998 LIBS="$ac_save_LIBS"
21999
22000 fi
22001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22002   echo "$ac_t""yes" 1>&6
22003   ol_link_sasl="-lsasl"
22004 else
22005   echo "$ac_t""no" 1>&6
22006 fi
22007
22008 fi
22009
22010         fi
22011
22012         if test $ol_link_sasl = no ; then
22013                 if test $ol_with_cyrus_sasl != auto ; then
22014                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
22015                 else
22016                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
22017                         echo "configure: warning: SASL authentication not supported!" 1>&2
22018                         if test $ol_link_tls = no ; then
22019                                 echo "configure: warning: Strong authentication not supported!" 1>&2
22020                         fi
22021                 fi
22022         else
22023                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
22024 echo "configure:22025: checking Cyrus SASL library version" >&5
22025 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
22026   echo $ac_n "(cached) $ac_c" 1>&6
22027 else
22028   
22029         cat > conftest.$ac_ext <<EOF
22030 #line 22031 "configure"
22031 #include "confdefs.h"
22032
22033 #ifdef HAVE_SASL_SASL_H
22034 #include <sasl/sasl.h>
22035 #else
22036 #include <sasl.h>
22037 #endif
22038
22039 /* Require 2.1.15+ */
22040 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22041         char *__sasl_compat = "2.2+ or better okay (we guess)";
22042 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22043         && SASL_VERSION_STEP >=15
22044         char *__sasl_compat = "2.1.15+ or better okay";
22045 #endif
22046         
22047 EOF
22048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22049   egrep "__sasl_compat" >/dev/null 2>&1; then
22050   rm -rf conftest*
22051   ol_cv_sasl_compat=yes
22052 else
22053   rm -rf conftest*
22054   ol_cv_sasl_compat=no
22055 fi
22056 rm -f conftest*
22057
22058 fi
22059
22060 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
22061
22062                 if test $ol_cv_sasl_compat = no ; then
22063                         ol_link_sasl=no
22064                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
22065                 fi
22066
22067                 cat >> confdefs.h <<\EOF
22068 #define HAVE_CYRUS_SASL 1
22069 EOF
22070
22071                 SASL_LIBS="$ol_link_sasl"
22072                 if test $ol_enable_spasswd != no ; then
22073                         ol_link_spasswd=yes
22074                 fi
22075
22076                 ac_save_LIBS="$LIBS"
22077                 LIBS="$LIBS $ol_link_sasl"
22078                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
22079 echo "configure:22080: checking for sasl_version" >&5
22080 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
22081   echo $ac_n "(cached) $ac_c" 1>&6
22082 else
22083   cat > conftest.$ac_ext <<EOF
22084 #line 22085 "configure"
22085 #include "confdefs.h"
22086 /* System header to define __stub macros and hopefully few prototypes,
22087     which can conflict with char sasl_version(); below.  */
22088 #include <assert.h>
22089 /* Override any gcc2 internal prototype to avoid an error.  */
22090 /* We use char because int might match the return type of a gcc2
22091     builtin and then its argument prototype would still apply.  */
22092 char sasl_version();
22093 char (*f)();
22094
22095 int main() {
22096
22097 /* The GNU C library defines this for functions which it implements
22098     to always fail with ENOSYS.  Some functions are actually named
22099     something starting with __ and the normal name is an alias.  */
22100 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
22101 choke me
22102 #else
22103 f = sasl_version;
22104 #endif
22105
22106 ; return 0; }
22107 EOF
22108 if { (eval echo configure:22109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22109   rm -rf conftest*
22110   eval "ac_cv_func_sasl_version=yes"
22111 else
22112   echo "configure: failed program was:" >&5
22113   cat conftest.$ac_ext >&5
22114   rm -rf conftest*
22115   eval "ac_cv_func_sasl_version=no"
22116 fi
22117 rm -f conftest*
22118 fi
22119
22120 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
22121   echo "$ac_t""yes" 1>&6
22122   cat >> confdefs.h <<\EOF
22123 #define HAVE_SASL_VERSION 1
22124 EOF
22125
22126 else
22127   echo "$ac_t""no" 1>&6
22128 fi
22129
22130                 LIBS="$ac_save_LIBS"
22131
22132                 WITH_SASL=yes
22133         fi
22134
22135 else
22136         echo "configure: warning: SASL authentication not supported!" 1>&2
22137         if test $ol_link_tls = no ; then
22138                 echo "configure: warning: Strong authentication not supported!" 1>&2
22139         fi
22140 fi
22141
22142 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
22143         dev=no
22144         if test -r /dev/urandom ; then
22145                 dev="/dev/urandom";
22146         elif test -r /idev/urandom ; then
22147                 dev="/idev/urandom";
22148         elif test -r /dev/srandom ; then
22149                 dev="/dev/srandom";
22150         elif test -r /dev/random ; then
22151                 dev="/dev/random";
22152         elif test -r /idev/random ; then
22153                 dev="/idev/random";
22154         fi
22155
22156         if test $dev != no ; then
22157                 cat >> confdefs.h <<EOF
22158 #define URANDOM_DEVICE "$dev"
22159 EOF
22160
22161         fi
22162 fi
22163
22164 ol_link_fetch=no
22165 if test $ol_with_fetch != no ; then
22166         ol_LIBS=$LIBS
22167 LIBS="-lfetch -lcom_err $LIBS"
22168 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
22169 echo "configure:22170: checking fetch(3) library" >&5
22170 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
22171   echo $ac_n "(cached) $ac_c" 1>&6
22172 else
22173   
22174         cat > conftest.$ac_ext <<EOF
22175 #line 22176 "configure"
22176 #include "confdefs.h"
22177
22178 #include <sys/param.h>
22179 #include <stdio.h>
22180 #include <fetch.h>
22181 int main() {
22182 struct url *u = fetchParseURL("file:///"); 
22183 ; return 0; }
22184 EOF
22185 if { (eval echo configure:22186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22186   rm -rf conftest*
22187   ol_cv_lib_fetch=yes
22188 else
22189   echo "configure: failed program was:" >&5
22190   cat conftest.$ac_ext >&5
22191   rm -rf conftest*
22192   ol_cv_lib_fetch=no
22193 fi
22194 rm -f conftest*
22195 fi
22196
22197 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
22198 LIBS=$ol_LIBS
22199 if test $ol_cv_lib_fetch != no ; then
22200         ol_link_fetch="-lfetch -lcom_err"
22201         cat >> confdefs.h <<\EOF
22202 #define HAVE_FETCH 1
22203 EOF
22204
22205 fi
22206
22207
22208         if test $ol_cv_lib_fetch != no ; then
22209                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22210                 ol_link_fetch=freebsd
22211
22212         elif test $ol_with_fetch != auto ; then
22213                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
22214         fi 
22215 fi
22216
22217 if test $ol_enable_crypt != no ; then
22218         save_LIBS="$LIBS"
22219         LIBS="$TLS_LIBS $LIBS"
22220
22221         echo $ac_n "checking for crypt""... $ac_c" 1>&6
22222 echo "configure:22223: checking for crypt" >&5
22223 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
22224   echo $ac_n "(cached) $ac_c" 1>&6
22225 else
22226   cat > conftest.$ac_ext <<EOF
22227 #line 22228 "configure"
22228 #include "confdefs.h"
22229 /* System header to define __stub macros and hopefully few prototypes,
22230     which can conflict with char crypt(); below.  */
22231 #include <assert.h>
22232 /* Override any gcc2 internal prototype to avoid an error.  */
22233 /* We use char because int might match the return type of a gcc2
22234     builtin and then its argument prototype would still apply.  */
22235 char crypt();
22236 char (*f)();
22237
22238 int main() {
22239
22240 /* The GNU C library defines this for functions which it implements
22241     to always fail with ENOSYS.  Some functions are actually named
22242     something starting with __ and the normal name is an alias.  */
22243 #if defined (__stub_crypt) || defined (__stub___crypt)
22244 choke me
22245 #else
22246 f = crypt;
22247 #endif
22248
22249 ; return 0; }
22250 EOF
22251 if { (eval echo configure:22252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22252   rm -rf conftest*
22253   eval "ac_cv_func_crypt=yes"
22254 else
22255   echo "configure: failed program was:" >&5
22256   cat conftest.$ac_ext >&5
22257   rm -rf conftest*
22258   eval "ac_cv_func_crypt=no"
22259 fi
22260 rm -f conftest*
22261 fi
22262
22263 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
22264   echo "$ac_t""yes" 1>&6
22265   have_crypt=yes
22266 else
22267   echo "$ac_t""no" 1>&6
22268
22269                 LIBS="$save_LIBS"
22270                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
22271 echo "configure:22272: checking for crypt in -lcrypt" >&5
22272 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
22273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22274   echo $ac_n "(cached) $ac_c" 1>&6
22275 else
22276   ac_save_LIBS="$LIBS"
22277 LIBS="-lcrypt  $LIBS"
22278 cat > conftest.$ac_ext <<EOF
22279 #line 22280 "configure"
22280 #include "confdefs.h"
22281 /* Override any gcc2 internal prototype to avoid an error.  */
22282 /* We use char because int might match the return type of a gcc2
22283     builtin and then its argument prototype would still apply.  */
22284 char crypt();
22285
22286 int main() {
22287 crypt()
22288 ; return 0; }
22289 EOF
22290 if { (eval echo configure:22291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22291   rm -rf conftest*
22292   eval "ac_cv_lib_$ac_lib_var=yes"
22293 else
22294   echo "configure: failed program was:" >&5
22295   cat conftest.$ac_ext >&5
22296   rm -rf conftest*
22297   eval "ac_cv_lib_$ac_lib_var=no"
22298 fi
22299 rm -f conftest*
22300 LIBS="$ac_save_LIBS"
22301
22302 fi
22303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22304   echo "$ac_t""yes" 1>&6
22305   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22306                         have_crypt=yes
22307 else
22308   echo "$ac_t""no" 1>&6
22309 have_crypt=no
22310 fi
22311
22312 fi
22313
22314
22315         LIBS="$save_LIBS"
22316
22317         if test $have_crypt = yes ; then
22318                 cat >> confdefs.h <<\EOF
22319 #define HAVE_CRYPT 1
22320 EOF
22321
22322         else
22323                 echo "configure: warning: could not find crypt" 1>&2
22324                 if test $ol_enable_crypt = yes ; then
22325                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
22326                 fi
22327
22328                 echo "configure: warning: disabling crypt support" 1>&2
22329                 ol_enable_crypt=no
22330         fi
22331 fi
22332
22333 if test $ol_enable_proctitle != no ; then
22334         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
22335 echo "configure:22336: checking for setproctitle" >&5
22336 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
22337   echo $ac_n "(cached) $ac_c" 1>&6
22338 else
22339   cat > conftest.$ac_ext <<EOF
22340 #line 22341 "configure"
22341 #include "confdefs.h"
22342 /* System header to define __stub macros and hopefully few prototypes,
22343     which can conflict with char setproctitle(); below.  */
22344 #include <assert.h>
22345 /* Override any gcc2 internal prototype to avoid an error.  */
22346 /* We use char because int might match the return type of a gcc2
22347     builtin and then its argument prototype would still apply.  */
22348 char setproctitle();
22349 char (*f)();
22350
22351 int main() {
22352
22353 /* The GNU C library defines this for functions which it implements
22354     to always fail with ENOSYS.  Some functions are actually named
22355     something starting with __ and the normal name is an alias.  */
22356 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
22357 choke me
22358 #else
22359 f = setproctitle;
22360 #endif
22361
22362 ; return 0; }
22363 EOF
22364 if { (eval echo configure:22365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22365   rm -rf conftest*
22366   eval "ac_cv_func_setproctitle=yes"
22367 else
22368   echo "configure: failed program was:" >&5
22369   cat conftest.$ac_ext >&5
22370   rm -rf conftest*
22371   eval "ac_cv_func_setproctitle=no"
22372 fi
22373 rm -f conftest*
22374 fi
22375
22376 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
22377   echo "$ac_t""yes" 1>&6
22378   have_setproctitle=yes
22379 else
22380   echo "$ac_t""no" 1>&6
22381
22382                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
22383 echo "configure:22384: checking for setproctitle in -lutil" >&5
22384 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
22385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22386   echo $ac_n "(cached) $ac_c" 1>&6
22387 else
22388   ac_save_LIBS="$LIBS"
22389 LIBS="-lutil  $LIBS"
22390 cat > conftest.$ac_ext <<EOF
22391 #line 22392 "configure"
22392 #include "confdefs.h"
22393 /* Override any gcc2 internal prototype to avoid an error.  */
22394 /* We use char because int might match the return type of a gcc2
22395     builtin and then its argument prototype would still apply.  */
22396 char setproctitle();
22397
22398 int main() {
22399 setproctitle()
22400 ; return 0; }
22401 EOF
22402 if { (eval echo configure:22403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22403   rm -rf conftest*
22404   eval "ac_cv_lib_$ac_lib_var=yes"
22405 else
22406   echo "configure: failed program was:" >&5
22407   cat conftest.$ac_ext >&5
22408   rm -rf conftest*
22409   eval "ac_cv_lib_$ac_lib_var=no"
22410 fi
22411 rm -f conftest*
22412 LIBS="$ac_save_LIBS"
22413
22414 fi
22415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22416   echo "$ac_t""yes" 1>&6
22417   have_setproctitle=yes
22418                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22419 else
22420   echo "$ac_t""no" 1>&6
22421 have_setproctitle=no
22422                         LIBOBJS="$LIBOBJS setproctitle.o"
22423                         LIBSRCS="$LIBSRCS setproctitle.c"
22424 fi
22425
22426 fi
22427
22428
22429         if test $have_setproctitle = yes ; then
22430                 cat >> confdefs.h <<\EOF
22431 #define HAVE_SETPROCTITLE 1
22432 EOF
22433
22434         fi
22435 fi
22436
22437 if test $ol_enable_slp != no ; then
22438         for ac_hdr in slp.h 
22439 do
22440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22442 echo "configure:22443: checking for $ac_hdr" >&5
22443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22444   echo $ac_n "(cached) $ac_c" 1>&6
22445 else
22446   cat > conftest.$ac_ext <<EOF
22447 #line 22448 "configure"
22448 #include "confdefs.h"
22449 #include <$ac_hdr>
22450 EOF
22451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22452 { (eval echo configure:22453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22454 if test -z "$ac_err"; then
22455   rm -rf conftest*
22456   eval "ac_cv_header_$ac_safe=yes"
22457 else
22458   echo "$ac_err" >&5
22459   echo "configure: failed program was:" >&5
22460   cat conftest.$ac_ext >&5
22461   rm -rf conftest*
22462   eval "ac_cv_header_$ac_safe=no"
22463 fi
22464 rm -f conftest*
22465 fi
22466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22467   echo "$ac_t""yes" 1>&6
22468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22469   cat >> confdefs.h <<EOF
22470 #define $ac_tr_hdr 1
22471 EOF
22472  
22473 else
22474   echo "$ac_t""no" 1>&6
22475 fi
22476 done
22477
22478
22479         if test $ac_cv_header_slp_h = yes ; then
22480                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
22481 echo "configure:22482: checking for SLPOpen in -lslp" >&5
22482 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
22483 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22484   echo $ac_n "(cached) $ac_c" 1>&6
22485 else
22486   ac_save_LIBS="$LIBS"
22487 LIBS="-lslp  $LIBS"
22488 cat > conftest.$ac_ext <<EOF
22489 #line 22490 "configure"
22490 #include "confdefs.h"
22491 /* Override any gcc2 internal prototype to avoid an error.  */
22492 /* We use char because int might match the return type of a gcc2
22493     builtin and then its argument prototype would still apply.  */
22494 char SLPOpen();
22495
22496 int main() {
22497 SLPOpen()
22498 ; return 0; }
22499 EOF
22500 if { (eval echo configure:22501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22501   rm -rf conftest*
22502   eval "ac_cv_lib_$ac_lib_var=yes"
22503 else
22504   echo "configure: failed program was:" >&5
22505   cat conftest.$ac_ext >&5
22506   rm -rf conftest*
22507   eval "ac_cv_lib_$ac_lib_var=no"
22508 fi
22509 rm -f conftest*
22510 LIBS="$ac_save_LIBS"
22511
22512 fi
22513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22514   echo "$ac_t""yes" 1>&6
22515   have_slp=yes
22516 else
22517   echo "$ac_t""no" 1>&6
22518 have_slp=no
22519 fi
22520
22521                 if test $have_slp = yes ; then
22522                         cat >> confdefs.h <<\EOF
22523 #define HAVE_SLP 1
22524 EOF
22525
22526                         SLAPD_SLP_LIBS=-lslp
22527                 fi
22528
22529         elif test $ol_enable_slp = yes ; then
22530                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
22531         fi
22532 fi
22533
22534 if test "$ol_with_multiple_precision" != "no" ; then
22535         ol_have_bignum=no
22536         ol_have_gmp=no
22537
22538         for ac_hdr in openssl/bn.h bn.h
22539 do
22540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22542 echo "configure:22543: checking for $ac_hdr" >&5
22543 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22544   echo $ac_n "(cached) $ac_c" 1>&6
22545 else
22546   cat > conftest.$ac_ext <<EOF
22547 #line 22548 "configure"
22548 #include "confdefs.h"
22549 #include <$ac_hdr>
22550 EOF
22551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22552 { (eval echo configure:22553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22554 if test -z "$ac_err"; then
22555   rm -rf conftest*
22556   eval "ac_cv_header_$ac_safe=yes"
22557 else
22558   echo "$ac_err" >&5
22559   echo "configure: failed program was:" >&5
22560   cat conftest.$ac_ext >&5
22561   rm -rf conftest*
22562   eval "ac_cv_header_$ac_safe=no"
22563 fi
22564 rm -f conftest*
22565 fi
22566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22567   echo "$ac_t""yes" 1>&6
22568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22569   cat >> confdefs.h <<EOF
22570 #define $ac_tr_hdr 1
22571 EOF
22572  
22573 else
22574   echo "$ac_t""no" 1>&6
22575 fi
22576 done
22577
22578         for ac_hdr in openssl/crypto.h crypto.h
22579 do
22580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22582 echo "configure:22583: checking for $ac_hdr" >&5
22583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22584   echo $ac_n "(cached) $ac_c" 1>&6
22585 else
22586   cat > conftest.$ac_ext <<EOF
22587 #line 22588 "configure"
22588 #include "confdefs.h"
22589 #include <$ac_hdr>
22590 EOF
22591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22592 { (eval echo configure:22593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22594 if test -z "$ac_err"; then
22595   rm -rf conftest*
22596   eval "ac_cv_header_$ac_safe=yes"
22597 else
22598   echo "$ac_err" >&5
22599   echo "configure: failed program was:" >&5
22600   cat conftest.$ac_ext >&5
22601   rm -rf conftest*
22602   eval "ac_cv_header_$ac_safe=no"
22603 fi
22604 rm -f conftest*
22605 fi
22606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22607   echo "$ac_t""yes" 1>&6
22608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22609   cat >> confdefs.h <<EOF
22610 #define $ac_tr_hdr 1
22611 EOF
22612  
22613 else
22614   echo "$ac_t""no" 1>&6
22615 fi
22616 done
22617
22618         for ac_hdr in gmp.h 
22619 do
22620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22622 echo "configure:22623: checking for $ac_hdr" >&5
22623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22624   echo $ac_n "(cached) $ac_c" 1>&6
22625 else
22626   cat > conftest.$ac_ext <<EOF
22627 #line 22628 "configure"
22628 #include "confdefs.h"
22629 #include <$ac_hdr>
22630 EOF
22631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22632 { (eval echo configure:22633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22634 if test -z "$ac_err"; then
22635   rm -rf conftest*
22636   eval "ac_cv_header_$ac_safe=yes"
22637 else
22638   echo "$ac_err" >&5
22639   echo "configure: failed program was:" >&5
22640   cat conftest.$ac_ext >&5
22641   rm -rf conftest*
22642   eval "ac_cv_header_$ac_safe=no"
22643 fi
22644 rm -f conftest*
22645 fi
22646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22647   echo "$ac_t""yes" 1>&6
22648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22649   cat >> confdefs.h <<EOF
22650 #define $ac_tr_hdr 1
22651 EOF
22652  
22653 else
22654   echo "$ac_t""no" 1>&6
22655 fi
22656 done
22657
22658
22659         if test "$ol_with_tls" = "found" ; then
22660                 ol_have_bn_h=no
22661                 ol_have_crypto_h=no
22662
22663                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
22664                                 -o "$ac_cv_header_bn_h" = "yes" ; then
22665                         ol_have_bn_h=yes
22666                 fi
22667
22668                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
22669                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
22670                         ol_have_crypto_h=yes
22671                 fi
22672
22673                 if test "$ol_have_bn_h" = "yes" \
22674                                 -a "$ol_have_crypto_h" = "yes" ; then
22675                         ol_have_bignum=yes
22676                 fi
22677         fi
22678
22679         if test $ac_cv_header_gmp_h = yes ; then
22680                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
22681 echo "configure:22682: checking for __gmpz_add_ui in -lgmp" >&5
22682 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
22683 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22684   echo $ac_n "(cached) $ac_c" 1>&6
22685 else
22686   ac_save_LIBS="$LIBS"
22687 LIBS="-lgmp  $LIBS"
22688 cat > conftest.$ac_ext <<EOF
22689 #line 22690 "configure"
22690 #include "confdefs.h"
22691 /* Override any gcc2 internal prototype to avoid an error.  */
22692 /* We use char because int might match the return type of a gcc2
22693     builtin and then its argument prototype would still apply.  */
22694 char __gmpz_add_ui();
22695
22696 int main() {
22697 __gmpz_add_ui()
22698 ; return 0; }
22699 EOF
22700 if { (eval echo configure:22701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22701   rm -rf conftest*
22702   eval "ac_cv_lib_$ac_lib_var=yes"
22703 else
22704   echo "configure: failed program was:" >&5
22705   cat conftest.$ac_ext >&5
22706   rm -rf conftest*
22707   eval "ac_cv_lib_$ac_lib_var=no"
22708 fi
22709 rm -f conftest*
22710 LIBS="$ac_save_LIBS"
22711
22712 fi
22713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22714   echo "$ac_t""yes" 1>&6
22715   have_gmp=yes
22716 else
22717   echo "$ac_t""no" 1>&6
22718 have_gmp=no
22719 fi
22720
22721                 if test $have_gmp = yes ; then
22722                         ol_have_gmp=yes
22723                 fi
22724         fi
22725
22726         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
22727 echo "configure:22728: checking for multiple precision support" >&5
22728
22729         ol_mp_support="none"
22730         case "$ol_with_multiple_precision" in
22731         auto)
22732                                                                                 if test "$ol_have_bignum" = "yes" ; then
22733                         ol_mp_support="bignum"
22734                 else
22735                         if test "$ol_have_gmp" = "yes" ; then
22736                                 ol_mp_support="gmp"
22737                         fi
22738                 fi
22739                 ;;
22740         bignum)
22741                 if test "$ol_have_bignum" != "yes" ; then
22742                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
22743                 fi
22744                 ol_mp_support="bignum"
22745                 ;;
22746         gmp)
22747                 if test "$ol_have_gmp" != "yes" ; then
22748                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
22749                 fi
22750                 ol_mp_support="gmp"
22751                 ;;
22752         yes)
22753                 if test "$ol_have_bignum" = "yes" ; then
22754                         ol_mp_support="bignum"
22755                 elif test "$ol_have_gmp" = "yes" ; then
22756                         ol_mp_support="gmp"
22757                 else
22758                         { echo "configure: error: not available" 1>&2; exit 1; }
22759                 fi
22760                 ;;
22761         esac
22762
22763         case "$ol_mp_support" in
22764         bignum)
22765                 cat >> confdefs.h <<\EOF
22766 #define HAVE_BIGNUM 1
22767 EOF
22768
22769                 ;;
22770         gmp)
22771                 cat >> confdefs.h <<\EOF
22772 #define HAVE_GMP 1
22773 EOF
22774
22775                 SLAPD_GMP_LIBS=-lgmp
22776                 ;;
22777         none)
22778                 ;;
22779         esac
22780
22781         echo "$ac_t""$ol_mp_support" 1>&6
22782 fi
22783
22784
22785 echo $ac_n "checking long long""... $ac_c" 1>&6
22786 echo "configure:22787: checking long long" >&5
22787 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22788   echo $ac_n "(cached) $ac_c" 1>&6
22789 else
22790   
22791         cat > conftest.$ac_ext <<EOF
22792 #line 22793 "configure"
22793 #include "confdefs.h"
22794
22795 int main() {
22796 long long x;
22797 ; return 0; }
22798 EOF
22799 if { (eval echo configure:22800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22800   rm -rf conftest*
22801   ol_cv_type_long_long=yes
22802 else
22803   echo "configure: failed program was:" >&5
22804   cat conftest.$ac_ext >&5
22805   rm -rf conftest*
22806   ol_cv_type_long_long=no
22807 fi
22808 rm -f conftest*
22809 fi
22810
22811 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22812 if test $ol_cv_type_long_long = yes; then
22813         cat >> confdefs.h <<\EOF
22814 #define HAVE_LONG_LONG 1
22815 EOF
22816
22817 fi
22818
22819 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22820 echo "configure:22821: checking for ANSI C header files" >&5
22821 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22822   echo $ac_n "(cached) $ac_c" 1>&6
22823 else
22824   cat > conftest.$ac_ext <<EOF
22825 #line 22826 "configure"
22826 #include "confdefs.h"
22827 #include <stdlib.h>
22828 #include <stdarg.h>
22829 #include <string.h>
22830 #include <float.h>
22831 EOF
22832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22833 { (eval echo configure:22834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22835 if test -z "$ac_err"; then
22836   rm -rf conftest*
22837   ac_cv_header_stdc=yes
22838 else
22839   echo "$ac_err" >&5
22840   echo "configure: failed program was:" >&5
22841   cat conftest.$ac_ext >&5
22842   rm -rf conftest*
22843   ac_cv_header_stdc=no
22844 fi
22845 rm -f conftest*
22846
22847 if test $ac_cv_header_stdc = yes; then
22848   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22849 cat > conftest.$ac_ext <<EOF
22850 #line 22851 "configure"
22851 #include "confdefs.h"
22852 #include <string.h>
22853 EOF
22854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22855   egrep "memchr" >/dev/null 2>&1; then
22856   :
22857 else
22858   rm -rf conftest*
22859   ac_cv_header_stdc=no
22860 fi
22861 rm -f conftest*
22862
22863 fi
22864
22865 if test $ac_cv_header_stdc = yes; then
22866   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22867 cat > conftest.$ac_ext <<EOF
22868 #line 22869 "configure"
22869 #include "confdefs.h"
22870 #include <stdlib.h>
22871 EOF
22872 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22873   egrep "free" >/dev/null 2>&1; then
22874   :
22875 else
22876   rm -rf conftest*
22877   ac_cv_header_stdc=no
22878 fi
22879 rm -f conftest*
22880
22881 fi
22882
22883 if test $ac_cv_header_stdc = yes; then
22884   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22885 if test "$cross_compiling" = yes; then
22886   :
22887 else
22888   cat > conftest.$ac_ext <<EOF
22889 #line 22890 "configure"
22890 #include "confdefs.h"
22891 #include <ctype.h>
22892 #if ((' ' & 0x0FF) == 0x020)
22893 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22894 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22895 #else
22896 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22897  || ('j' <= (c) && (c) <= 'r') \
22898  || ('s' <= (c) && (c) <= 'z'))
22899 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22900 #endif
22901 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22902 int main () { int i; for (i = 0; i < 256; i++)
22903 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22904 exit (0); }
22905
22906 EOF
22907 if { (eval echo configure:22908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
22908 then
22909   :
22910 else
22911   echo "configure: failed program was:" >&5
22912   cat conftest.$ac_ext >&5
22913   rm -fr conftest*
22914   ac_cv_header_stdc=no
22915 fi
22916 rm -fr conftest*
22917 fi
22918
22919 fi
22920 fi
22921
22922 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22923 if test $ac_cv_header_stdc = yes; then
22924   cat >> confdefs.h <<\EOF
22925 #define STDC_HEADERS 1
22926 EOF
22927
22928 fi
22929
22930 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22931 echo "configure:22932: checking for mode_t" >&5
22932 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22933   echo $ac_n "(cached) $ac_c" 1>&6
22934 else
22935   cat > conftest.$ac_ext <<EOF
22936 #line 22937 "configure"
22937 #include "confdefs.h"
22938 #include <sys/types.h>
22939 #if STDC_HEADERS
22940 #include <stdlib.h>
22941 #include <stddef.h>
22942 #endif
22943
22944 EOF
22945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22946   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22947   rm -rf conftest*
22948   eval "ac_cv_type_mode_t=yes"
22949 else
22950   rm -rf conftest*
22951   eval "ac_cv_type_mode_t=no"
22952 fi
22953 rm -f conftest*
22954
22955 fi
22956 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22957   echo "$ac_t""yes" 1>&6
22958 else
22959   echo "$ac_t""no" 1>&6
22960   cat >> confdefs.h <<EOF
22961 #define mode_t int
22962 EOF
22963
22964 fi
22965
22966 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22967 echo "configure:22968: checking for off_t" >&5
22968 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22969   echo $ac_n "(cached) $ac_c" 1>&6
22970 else
22971   cat > conftest.$ac_ext <<EOF
22972 #line 22973 "configure"
22973 #include "confdefs.h"
22974 #include <sys/types.h>
22975 #if STDC_HEADERS
22976 #include <stdlib.h>
22977 #include <stddef.h>
22978 #endif
22979
22980 EOF
22981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22982   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22983   rm -rf conftest*
22984   eval "ac_cv_type_off_t=yes"
22985 else
22986   rm -rf conftest*
22987   eval "ac_cv_type_off_t=no"
22988 fi
22989 rm -f conftest*
22990
22991 fi
22992 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22993   echo "$ac_t""yes" 1>&6
22994 else
22995   echo "$ac_t""no" 1>&6
22996   cat >> confdefs.h <<EOF
22997 #define off_t long
22998 EOF
22999
23000 fi
23001
23002 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
23003 echo "configure:23004: checking for pid_t" >&5
23004 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
23005   echo $ac_n "(cached) $ac_c" 1>&6
23006 else
23007   cat > conftest.$ac_ext <<EOF
23008 #line 23009 "configure"
23009 #include "confdefs.h"
23010 #include <sys/types.h>
23011 #if STDC_HEADERS
23012 #include <stdlib.h>
23013 #include <stddef.h>
23014 #endif
23015
23016 EOF
23017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23018   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23019   rm -rf conftest*
23020   eval "ac_cv_type_pid_t=yes"
23021 else
23022   rm -rf conftest*
23023   eval "ac_cv_type_pid_t=no"
23024 fi
23025 rm -f conftest*
23026
23027 fi
23028 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
23029   echo "$ac_t""yes" 1>&6
23030 else
23031   echo "$ac_t""no" 1>&6
23032   cat >> confdefs.h <<EOF
23033 #define pid_t int
23034 EOF
23035
23036 fi
23037
23038 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
23039 echo "configure:23040: checking for ptrdiff_t" >&5
23040 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
23041   echo $ac_n "(cached) $ac_c" 1>&6
23042 else
23043   cat > conftest.$ac_ext <<EOF
23044 #line 23045 "configure"
23045 #include "confdefs.h"
23046 #include <stddef.h>
23047 int main() {
23048 ptrdiff_t p
23049 ; return 0; }
23050 EOF
23051 if { (eval echo configure:23052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23052   rm -rf conftest*
23053   am_cv_type_ptrdiff_t=yes
23054 else
23055   echo "configure: failed program was:" >&5
23056   cat conftest.$ac_ext >&5
23057   rm -rf conftest*
23058   am_cv_type_ptrdiff_t=no
23059 fi
23060 rm -f conftest*
23061 fi
23062
23063 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
23064    if test $am_cv_type_ptrdiff_t = yes; then
23065      cat >> confdefs.h <<\EOF
23066 #define HAVE_PTRDIFF_T 1
23067 EOF
23068
23069    fi
23070
23071 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
23072 echo "configure:23073: checking return type of signal handlers" >&5
23073 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
23074   echo $ac_n "(cached) $ac_c" 1>&6
23075 else
23076   cat > conftest.$ac_ext <<EOF
23077 #line 23078 "configure"
23078 #include "confdefs.h"
23079 #include <sys/types.h>
23080 #include <signal.h>
23081 #ifdef signal
23082 #undef signal
23083 #endif
23084 #ifdef __cplusplus
23085 extern "C" void (*signal (int, void (*)(int)))(int);
23086 #else
23087 void (*signal ()) ();
23088 #endif
23089
23090 int main() {
23091 int i;
23092 ; return 0; }
23093 EOF
23094 if { (eval echo configure:23095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23095   rm -rf conftest*
23096   ac_cv_type_signal=void
23097 else
23098   echo "configure: failed program was:" >&5
23099   cat conftest.$ac_ext >&5
23100   rm -rf conftest*
23101   ac_cv_type_signal=int
23102 fi
23103 rm -f conftest*
23104 fi
23105
23106 echo "$ac_t""$ac_cv_type_signal" 1>&6
23107 cat >> confdefs.h <<EOF
23108 #define RETSIGTYPE $ac_cv_type_signal
23109 EOF
23110
23111
23112 echo $ac_n "checking for size_t""... $ac_c" 1>&6
23113 echo "configure:23114: checking for size_t" >&5
23114 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
23115   echo $ac_n "(cached) $ac_c" 1>&6
23116 else
23117   cat > conftest.$ac_ext <<EOF
23118 #line 23119 "configure"
23119 #include "confdefs.h"
23120 #include <sys/types.h>
23121 #if STDC_HEADERS
23122 #include <stdlib.h>
23123 #include <stddef.h>
23124 #endif
23125
23126 EOF
23127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23128   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23129   rm -rf conftest*
23130   eval "ac_cv_type_size_t=yes"
23131 else
23132   rm -rf conftest*
23133   eval "ac_cv_type_size_t=no"
23134 fi
23135 rm -f conftest*
23136
23137 fi
23138 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
23139   echo "$ac_t""yes" 1>&6
23140 else
23141   echo "$ac_t""no" 1>&6
23142   cat >> confdefs.h <<EOF
23143 #define size_t unsigned
23144 EOF
23145
23146 fi
23147
23148
23149 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
23150 echo "configure:23151: checking for ssize_t" >&5
23151 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
23152   echo $ac_n "(cached) $ac_c" 1>&6
23153 else
23154   cat > conftest.$ac_ext <<EOF
23155 #line 23156 "configure"
23156 #include "confdefs.h"
23157 #include <sys/types.h>
23158 #if STDC_HEADERS
23159 #include <stdlib.h>
23160 #include <stddef.h>
23161 #endif
23162
23163 EOF
23164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23165   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23166   rm -rf conftest*
23167   eval "ac_cv_type_ssize_t=yes"
23168 else
23169   rm -rf conftest*
23170   eval "ac_cv_type_ssize_t=no"
23171 fi
23172 rm -f conftest*
23173
23174 fi
23175 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
23176   echo "$ac_t""yes" 1>&6
23177 else
23178   echo "$ac_t""no" 1>&6
23179   cat >> confdefs.h <<EOF
23180 #define ssize_t signed int
23181 EOF
23182
23183 fi
23184
23185 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
23186 echo "configure:23187: checking for caddr_t" >&5
23187 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
23188   echo $ac_n "(cached) $ac_c" 1>&6
23189 else
23190   cat > conftest.$ac_ext <<EOF
23191 #line 23192 "configure"
23192 #include "confdefs.h"
23193 #include <sys/types.h>
23194 #if STDC_HEADERS
23195 #include <stdlib.h>
23196 #include <stddef.h>
23197 #endif
23198
23199 EOF
23200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23201   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
23202   rm -rf conftest*
23203   eval "ac_cv_type_caddr_t=yes"
23204 else
23205   rm -rf conftest*
23206   eval "ac_cv_type_caddr_t=no"
23207 fi
23208 rm -f conftest*
23209
23210 fi
23211 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
23212   echo "$ac_t""yes" 1>&6
23213 else
23214   echo "$ac_t""no" 1>&6
23215   cat >> confdefs.h <<EOF
23216 #define caddr_t char *
23217 EOF
23218
23219 fi
23220
23221
23222 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
23223 echo "configure:23224: checking for socklen_t" >&5
23224 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
23225   echo $ac_n "(cached) $ac_c" 1>&6
23226 else
23227   cat > conftest.$ac_ext <<EOF
23228 #line 23229 "configure"
23229 #include "confdefs.h"
23230
23231 #ifdef HAVE_SYS_TYPES_H
23232 #include <sys/types.h>
23233 #endif
23234 #ifdef HAVE_SYS_SOCKET_H
23235 #include <sys/socket.h>
23236 #endif
23237
23238 int main() {
23239 socklen_t len;
23240 ; return 0; }
23241 EOF
23242 if { (eval echo configure:23243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23243   rm -rf conftest*
23244   ol_cv_type_socklen_t=yes
23245 else
23246   echo "configure: failed program was:" >&5
23247   cat conftest.$ac_ext >&5
23248   rm -rf conftest*
23249   ol_cv_type_socklen_t=no
23250 fi
23251 rm -f conftest*
23252 fi
23253
23254 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
23255   if test $ol_cv_type_socklen_t = no; then
23256     cat >> confdefs.h <<\EOF
23257 #define socklen_t int
23258 EOF
23259
23260   fi
23261  
23262 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
23263 echo "configure:23264: checking for member st_blksize in aggregate type struct stat" >&5
23264 if eval "test \"\${ac_cv_c_struct_member_st_blksize+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/stat.h>
23272 int main() {
23273 struct stat foo; foo.st_blksize;
23274 ; return 0; }
23275 EOF
23276 if { (eval echo configure:23277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23277   rm -rf conftest*
23278   ac_cv_c_struct_member_st_blksize=yes
23279 else
23280   echo "configure: failed program was:" >&5
23281   cat conftest.$ac_ext >&5
23282   rm -rf conftest*
23283   ac_cv_c_struct_member_st_blksize=no
23284 fi
23285 rm -f conftest*
23286 fi
23287
23288 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
23289 st_blksize="$ac_cv_c_struct_member_st_blksize"
23290 if test $ac_cv_c_struct_member_st_blksize = yes; then
23291   cat >> confdefs.h <<\EOF
23292 #define HAVE_ST_BLKSIZE 1
23293 EOF
23294
23295 fi
23296
23297 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
23298 echo "configure:23299: checking whether time.h and sys/time.h may both be included" >&5
23299 if eval "test \"\${ac_cv_header_time+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 <sys/time.h>
23307 #include <time.h>
23308 int main() {
23309 struct tm *tp;
23310 ; return 0; }
23311 EOF
23312 if { (eval echo configure:23313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23313   rm -rf conftest*
23314   ac_cv_header_time=yes
23315 else
23316   echo "configure: failed program was:" >&5
23317   cat conftest.$ac_ext >&5
23318   rm -rf conftest*
23319   ac_cv_header_time=no
23320 fi
23321 rm -f conftest*
23322 fi
23323
23324 echo "$ac_t""$ac_cv_header_time" 1>&6
23325 if test $ac_cv_header_time = yes; then
23326   cat >> confdefs.h <<\EOF
23327 #define TIME_WITH_SYS_TIME 1
23328 EOF
23329
23330 fi
23331
23332 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
23333 echo "configure:23334: checking whether struct tm is in sys/time.h or time.h" >&5
23334 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
23335   echo $ac_n "(cached) $ac_c" 1>&6
23336 else
23337   cat > conftest.$ac_ext <<EOF
23338 #line 23339 "configure"
23339 #include "confdefs.h"
23340 #include <sys/types.h>
23341 #include <time.h>
23342 int main() {
23343 struct tm *tp; tp->tm_sec;
23344 ; return 0; }
23345 EOF
23346 if { (eval echo configure:23347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23347   rm -rf conftest*
23348   ac_cv_struct_tm=time.h
23349 else
23350   echo "configure: failed program was:" >&5
23351   cat conftest.$ac_ext >&5
23352   rm -rf conftest*
23353   ac_cv_struct_tm=sys/time.h
23354 fi
23355 rm -f conftest*
23356 fi
23357
23358 echo "$ac_t""$ac_cv_struct_tm" 1>&6
23359 if test $ac_cv_struct_tm = sys/time.h; then
23360   cat >> confdefs.h <<\EOF
23361 #define TM_IN_SYS_TIME 1
23362 EOF
23363
23364 fi
23365
23366 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
23367 echo "configure:23368: checking for uid_t in sys/types.h" >&5
23368 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
23369   echo $ac_n "(cached) $ac_c" 1>&6
23370 else
23371   cat > conftest.$ac_ext <<EOF
23372 #line 23373 "configure"
23373 #include "confdefs.h"
23374 #include <sys/types.h>
23375 EOF
23376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23377   egrep "uid_t" >/dev/null 2>&1; then
23378   rm -rf conftest*
23379   ac_cv_type_uid_t=yes
23380 else
23381   rm -rf conftest*
23382   ac_cv_type_uid_t=no
23383 fi
23384 rm -f conftest*
23385
23386 fi
23387
23388 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
23389 if test $ac_cv_type_uid_t = no; then
23390   cat >> confdefs.h <<\EOF
23391 #define uid_t int
23392 EOF
23393
23394   cat >> confdefs.h <<\EOF
23395 #define gid_t int
23396 EOF
23397
23398 fi
23399
23400 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
23401 echo "configure:23402: checking for sig_atomic_t" >&5
23402 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
23403   echo $ac_n "(cached) $ac_c" 1>&6
23404 else
23405   cat > conftest.$ac_ext <<EOF
23406 #line 23407 "configure"
23407 #include "confdefs.h"
23408 #include <signal.h>
23409 int main() {
23410 sig_atomic_t atomic;
23411 ; return 0; }
23412 EOF
23413 if { (eval echo configure:23414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23414   rm -rf conftest*
23415   ol_cv_type_sig_atomic_t=yes
23416 else
23417   echo "configure: failed program was:" >&5
23418   cat conftest.$ac_ext >&5
23419   rm -rf conftest*
23420   ol_cv_type_sig_atomic_t=no
23421 fi
23422 rm -f conftest*
23423 fi
23424
23425 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
23426   if test $ol_cv_type_sig_atomic_t = no; then
23427     cat >> confdefs.h <<\EOF
23428 #define sig_atomic_t int
23429 EOF
23430
23431   fi
23432  
23433
23434
23435 # test for pw_gecos in struct passwd
23436 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
23437 echo "configure:23438: checking struct passwd for pw_gecos" >&5
23438 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
23439   echo $ac_n "(cached) $ac_c" 1>&6
23440 else
23441   
23442         cat > conftest.$ac_ext <<EOF
23443 #line 23444 "configure"
23444 #include "confdefs.h"
23445 #include <pwd.h>
23446 int main() {
23447
23448         struct passwd pwd;
23449         pwd.pw_gecos = pwd.pw_name;
23450
23451 ; return 0; }
23452 EOF
23453 if { (eval echo configure:23454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23454   rm -rf conftest*
23455   ol_cv_struct_passwd_pw_gecos=yes
23456 else
23457   echo "configure: failed program was:" >&5
23458   cat conftest.$ac_ext >&5
23459   rm -rf conftest*
23460   ol_cv_struct_passwd_pw_gecos=no
23461 fi
23462 rm -f conftest*
23463 fi
23464
23465 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
23466 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
23467         cat >> confdefs.h <<\EOF
23468 #define HAVE_PW_GECOS 1
23469 EOF
23470
23471 fi
23472
23473 # test for pw_passwd in struct passwd
23474 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
23475 echo "configure:23476: checking struct passwd for pw_passwd" >&5
23476 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
23477   echo $ac_n "(cached) $ac_c" 1>&6
23478 else
23479   
23480         cat > conftest.$ac_ext <<EOF
23481 #line 23482 "configure"
23482 #include "confdefs.h"
23483 #include <pwd.h>
23484 int main() {
23485
23486         struct passwd pwd;
23487         pwd.pw_passwd = pwd.pw_name;
23488
23489 ; return 0; }
23490 EOF
23491 if { (eval echo configure:23492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23492   rm -rf conftest*
23493   ol_cv_struct_passwd_pw_passwd=yes
23494 else
23495   echo "configure: failed program was:" >&5
23496   cat conftest.$ac_ext >&5
23497   rm -rf conftest*
23498   ol_cv_struct_passwd_pw_passwd=no
23499 fi
23500 rm -f conftest*
23501 fi
23502
23503 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
23504 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
23505         cat >> confdefs.h <<\EOF
23506 #define HAVE_PW_PASSWD 1
23507 EOF
23508
23509 fi
23510
23511
23512 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
23513 echo "configure:23514: checking if toupper() requires islower()" >&5
23514 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
23515   echo $ac_n "(cached) $ac_c" 1>&6
23516 else
23517   
23518         if test "$cross_compiling" = yes; then
23519   ol_cv_c_upper_lower=safe
23520 else
23521   cat > conftest.$ac_ext <<EOF
23522 #line 23523 "configure"
23523 #include "confdefs.h"
23524
23525 #include <ctype.h>
23526 main()
23527 {
23528         if ('C' == toupper('C'))
23529                 exit(0);
23530         else
23531                 exit(1);
23532 }
23533 EOF
23534 if { (eval echo configure:23535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23535 then
23536   ol_cv_c_upper_lower=no
23537 else
23538   echo "configure: failed program was:" >&5
23539   cat conftest.$ac_ext >&5
23540   rm -fr conftest*
23541   ol_cv_c_upper_lower=yes
23542 fi
23543 rm -fr conftest*
23544 fi
23545
23546 fi
23547
23548 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
23549 if test $ol_cv_c_upper_lower != no ; then
23550         cat >> confdefs.h <<\EOF
23551 #define C_UPPER_LOWER 1
23552 EOF
23553
23554 fi
23555
23556 echo $ac_n "checking for working const""... $ac_c" 1>&6
23557 echo "configure:23558: checking for working const" >&5
23558 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
23559   echo $ac_n "(cached) $ac_c" 1>&6
23560 else
23561   cat > conftest.$ac_ext <<EOF
23562 #line 23563 "configure"
23563 #include "confdefs.h"
23564
23565 int main() {
23566
23567 /* Ultrix mips cc rejects this.  */
23568 typedef int charset[2]; const charset x;
23569 /* SunOS 4.1.1 cc rejects this.  */
23570 char const *const *ccp;
23571 char **p;
23572 /* NEC SVR4.0.2 mips cc rejects this.  */
23573 struct point {int x, y;};
23574 static struct point const zero = {0,0};
23575 /* AIX XL C 1.02.0.0 rejects this.
23576    It does not let you subtract one const X* pointer from another in an arm
23577    of an if-expression whose if-part is not a constant expression */
23578 const char *g = "string";
23579 ccp = &g + (g ? g-g : 0);
23580 /* HPUX 7.0 cc rejects these. */
23581 ++ccp;
23582 p = (char**) ccp;
23583 ccp = (char const *const *) p;
23584 { /* SCO 3.2v4 cc rejects this.  */
23585   char *t;
23586   char const *s = 0 ? (char *) 0 : (char const *) 0;
23587
23588   *t++ = 0;
23589 }
23590 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23591   int x[] = {25, 17};
23592   const int *foo = &x[0];
23593   ++foo;
23594 }
23595 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23596   typedef const int *iptr;
23597   iptr p = 0;
23598   ++p;
23599 }
23600 { /* AIX XL C 1.02.0.0 rejects this saying
23601      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23602   struct s { int j; const int *ap[3]; };
23603   struct s *b; b->j = 5;
23604 }
23605 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23606   const int foo = 10;
23607 }
23608
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   ac_cv_c_const=yes
23614 else
23615   echo "configure: failed program was:" >&5
23616   cat conftest.$ac_ext >&5
23617   rm -rf conftest*
23618   ac_cv_c_const=no
23619 fi
23620 rm -f conftest*
23621 fi
23622
23623 echo "$ac_t""$ac_cv_c_const" 1>&6
23624 if test $ac_cv_c_const = no; then
23625   cat >> confdefs.h <<\EOF
23626 #define const 
23627 EOF
23628
23629 fi
23630
23631 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
23632 echo "configure:23633: checking if compiler understands volatile" >&5
23633 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
23634   echo $ac_n "(cached) $ac_c" 1>&6
23635 else
23636   cat > conftest.$ac_ext <<EOF
23637 #line 23638 "configure"
23638 #include "confdefs.h"
23639 int x, y, z;
23640 int main() {
23641 volatile int a; int * volatile b = x ? &y : &z;
23642       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23643       *b = 0;
23644 ; return 0; }
23645 EOF
23646 if { (eval echo configure:23647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23647   rm -rf conftest*
23648   ol_cv_c_volatile=yes
23649 else
23650   echo "configure: failed program was:" >&5
23651   cat conftest.$ac_ext >&5
23652   rm -rf conftest*
23653   ol_cv_c_volatile=no
23654 fi
23655 rm -f conftest*
23656 fi
23657
23658 echo "$ac_t""$ol_cv_c_volatile" 1>&6
23659   if test $ol_cv_c_volatile = yes; then
23660     : 
23661   else
23662     cat >> confdefs.h <<\EOF
23663 #define volatile 
23664 EOF
23665
23666   fi
23667  
23668
23669 if test $cross_compiling = yes ; then
23670         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
23671         cat >> confdefs.h <<\EOF
23672 #define CROSS_COMPILING 1
23673 EOF
23674
23675 else
23676         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
23677 echo "configure:23678: checking whether byte ordering is bigendian" >&5
23678 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
23679   echo $ac_n "(cached) $ac_c" 1>&6
23680 else
23681   ac_cv_c_bigendian=unknown
23682 # See if sys/param.h defines the BYTE_ORDER macro.
23683 cat > conftest.$ac_ext <<EOF
23684 #line 23685 "configure"
23685 #include "confdefs.h"
23686 #include <sys/types.h>
23687 #include <sys/param.h>
23688 int main() {
23689
23690 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23691  bogus endian macros
23692 #endif
23693 ; return 0; }
23694 EOF
23695 if { (eval echo configure:23696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23696   rm -rf conftest*
23697   # It does; now see whether it defined to BIG_ENDIAN or not.
23698 cat > conftest.$ac_ext <<EOF
23699 #line 23700 "configure"
23700 #include "confdefs.h"
23701 #include <sys/types.h>
23702 #include <sys/param.h>
23703 int main() {
23704
23705 #if BYTE_ORDER != BIG_ENDIAN
23706  not big endian
23707 #endif
23708 ; return 0; }
23709 EOF
23710 if { (eval echo configure:23711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23711   rm -rf conftest*
23712   ac_cv_c_bigendian=yes
23713 else
23714   echo "configure: failed program was:" >&5
23715   cat conftest.$ac_ext >&5
23716   rm -rf conftest*
23717   ac_cv_c_bigendian=no
23718 fi
23719 rm -f conftest*
23720 else
23721   echo "configure: failed program was:" >&5
23722   cat conftest.$ac_ext >&5
23723 fi
23724 rm -f conftest*
23725 if test $ac_cv_c_bigendian = unknown; then
23726 if test "$cross_compiling" = yes; then
23727     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
23728 else
23729   cat > conftest.$ac_ext <<EOF
23730 #line 23731 "configure"
23731 #include "confdefs.h"
23732 main () {
23733   /* Are we little or big endian?  From Harbison&Steele.  */
23734   union
23735   {
23736     long l;
23737     char c[sizeof (long)];
23738   } u;
23739   u.l = 1;
23740   exit (u.c[sizeof (long) - 1] == 1);
23741 }
23742 EOF
23743 if { (eval echo configure:23744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23744 then
23745   ac_cv_c_bigendian=no
23746 else
23747   echo "configure: failed program was:" >&5
23748   cat conftest.$ac_ext >&5
23749   rm -fr conftest*
23750   ac_cv_c_bigendian=yes
23751 fi
23752 rm -fr conftest*
23753 fi
23754
23755 fi
23756 fi
23757
23758 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
23759 if test $ac_cv_c_bigendian = yes; then
23760   cat >> confdefs.h <<\EOF
23761 #define WORDS_BIGENDIAN 1
23762 EOF
23763
23764 fi
23765
23766 fi
23767
23768 echo $ac_n "checking size of short""... $ac_c" 1>&6
23769 echo "configure:23770: checking size of short" >&5 
23770 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
23771   echo $ac_n "(cached) $ac_c" 1>&6
23772 else
23773   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23774   cat > conftest.$ac_ext <<EOF
23775 #line 23776 "configure"
23776 #include "confdefs.h"
23777 #include "confdefs.h" 
23778 #include <stdlib.h>
23779 #include <sys/types.h> 
23780  
23781
23782 int main() {
23783 switch (0) case 0: case (sizeof (short) == $ac_size):;
23784 ; return 0; }
23785 EOF
23786 if { (eval echo configure:23787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23787   rm -rf conftest*
23788   ac_cv_sizeof_short=$ac_size
23789 else
23790   echo "configure: failed program was:" >&5
23791   cat conftest.$ac_ext >&5
23792 fi
23793 rm -f conftest* 
23794   if test x$ac_cv_sizeof_short != x ; then break; fi 
23795 done 
23796
23797 fi
23798  
23799 if test x$ac_cv_sizeof_short = x ; then 
23800   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23801 fi 
23802 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23803 cat >> confdefs.h <<EOF
23804 #define SIZEOF_SHORT $ac_cv_sizeof_short
23805 EOF
23806  
23807  
23808 echo $ac_n "checking size of int""... $ac_c" 1>&6
23809 echo "configure:23810: checking size of int" >&5 
23810 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23811   echo $ac_n "(cached) $ac_c" 1>&6
23812 else
23813   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23814   cat > conftest.$ac_ext <<EOF
23815 #line 23816 "configure"
23816 #include "confdefs.h"
23817 #include "confdefs.h" 
23818 #include <stdlib.h>
23819 #include <sys/types.h> 
23820  
23821
23822 int main() {
23823 switch (0) case 0: case (sizeof (int) == $ac_size):;
23824 ; return 0; }
23825 EOF
23826 if { (eval echo configure:23827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23827   rm -rf conftest*
23828   ac_cv_sizeof_int=$ac_size
23829 else
23830   echo "configure: failed program was:" >&5
23831   cat conftest.$ac_ext >&5
23832 fi
23833 rm -f conftest* 
23834   if test x$ac_cv_sizeof_int != x ; then break; fi 
23835 done 
23836
23837 fi
23838  
23839 if test x$ac_cv_sizeof_int = x ; then 
23840   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23841 fi 
23842 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23843 cat >> confdefs.h <<EOF
23844 #define SIZEOF_INT $ac_cv_sizeof_int
23845 EOF
23846  
23847  
23848 echo $ac_n "checking size of long""... $ac_c" 1>&6
23849 echo "configure:23850: checking size of long" >&5 
23850 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23851   echo $ac_n "(cached) $ac_c" 1>&6
23852 else
23853   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23854   cat > conftest.$ac_ext <<EOF
23855 #line 23856 "configure"
23856 #include "confdefs.h"
23857 #include "confdefs.h" 
23858 #include <stdlib.h>
23859 #include <sys/types.h> 
23860  
23861
23862 int main() {
23863 switch (0) case 0: case (sizeof (long) == $ac_size):;
23864 ; return 0; }
23865 EOF
23866 if { (eval echo configure:23867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23867   rm -rf conftest*
23868   ac_cv_sizeof_long=$ac_size
23869 else
23870   echo "configure: failed program was:" >&5
23871   cat conftest.$ac_ext >&5
23872 fi
23873 rm -f conftest* 
23874   if test x$ac_cv_sizeof_long != x ; then break; fi 
23875 done 
23876
23877 fi
23878  
23879 if test x$ac_cv_sizeof_long = x ; then 
23880   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23881 fi 
23882 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23883 cat >> confdefs.h <<EOF
23884 #define SIZEOF_LONG $ac_cv_sizeof_long
23885 EOF
23886  
23887
23888 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23889 echo "configure:23890: checking size of wchar_t" >&5 
23890 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23891   echo $ac_n "(cached) $ac_c" 1>&6
23892 else
23893   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23894   cat > conftest.$ac_ext <<EOF
23895 #line 23896 "configure"
23896 #include "confdefs.h"
23897 #include "confdefs.h" 
23898 #include <stdlib.h>
23899 #include <sys/types.h> 
23900  
23901
23902 int main() {
23903 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23904 ; return 0; }
23905 EOF
23906 if { (eval echo configure:23907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23907   rm -rf conftest*
23908   ac_cv_sizeof_wchar_t=$ac_size
23909 else
23910   echo "configure: failed program was:" >&5
23911   cat conftest.$ac_ext >&5
23912 fi
23913 rm -f conftest* 
23914   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23915 done 
23916
23917 fi
23918  
23919 if test x$ac_cv_sizeof_wchar_t = x ; then 
23920   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23921 fi 
23922 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23923 cat >> confdefs.h <<EOF
23924 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23925 EOF
23926  
23927
23928
23929 if test "$ac_cv_sizeof_int" -lt 4 ; then
23930         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23931
23932         cat >> confdefs.h <<\EOF
23933 #define LBER_INT_T long
23934 EOF
23935
23936 else
23937         cat >> confdefs.h <<\EOF
23938 #define LBER_INT_T int
23939 EOF
23940
23941 fi
23942
23943 cat >> confdefs.h <<\EOF
23944 #define LBER_LEN_T long
23945 EOF
23946
23947 cat >> confdefs.h <<\EOF
23948 #define LBER_SOCKET_T int
23949 EOF
23950
23951 cat >> confdefs.h <<\EOF
23952 #define LBER_TAG_T long
23953 EOF
23954
23955
23956 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23957 echo "configure:23958: checking for 8-bit clean memcmp" >&5
23958 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23959   echo $ac_n "(cached) $ac_c" 1>&6
23960 else
23961   if test "$cross_compiling" = yes; then
23962   ac_cv_func_memcmp_clean=no
23963 else
23964   cat > conftest.$ac_ext <<EOF
23965 #line 23966 "configure"
23966 #include "confdefs.h"
23967
23968 main()
23969 {
23970   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23971   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23972 }
23973
23974 EOF
23975 if { (eval echo configure:23976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
23976 then
23977   ac_cv_func_memcmp_clean=yes
23978 else
23979   echo "configure: failed program was:" >&5
23980   cat conftest.$ac_ext >&5
23981   rm -fr conftest*
23982   ac_cv_func_memcmp_clean=no
23983 fi
23984 rm -fr conftest*
23985 fi
23986
23987 fi
23988
23989 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23990 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23991
23992
23993 if test $ac_cv_func_memcmp_clean = no ; then
23994         cat >> confdefs.h <<\EOF
23995 #define NEED_MEMCMP_REPLACEMENT 1
23996 EOF
23997
23998 fi
23999
24000 echo $ac_n "checking for strftime""... $ac_c" 1>&6
24001 echo "configure:24002: checking for strftime" >&5
24002 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
24003   echo $ac_n "(cached) $ac_c" 1>&6
24004 else
24005   cat > conftest.$ac_ext <<EOF
24006 #line 24007 "configure"
24007 #include "confdefs.h"
24008 /* System header to define __stub macros and hopefully few prototypes,
24009     which can conflict with char strftime(); below.  */
24010 #include <assert.h>
24011 /* Override any gcc2 internal prototype to avoid an error.  */
24012 /* We use char because int might match the return type of a gcc2
24013     builtin and then its argument prototype would still apply.  */
24014 char strftime();
24015 char (*f)();
24016
24017 int main() {
24018
24019 /* The GNU C library defines this for functions which it implements
24020     to always fail with ENOSYS.  Some functions are actually named
24021     something starting with __ and the normal name is an alias.  */
24022 #if defined (__stub_strftime) || defined (__stub___strftime)
24023 choke me
24024 #else
24025 f = strftime;
24026 #endif
24027
24028 ; return 0; }
24029 EOF
24030 if { (eval echo configure:24031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24031   rm -rf conftest*
24032   eval "ac_cv_func_strftime=yes"
24033 else
24034   echo "configure: failed program was:" >&5
24035   cat conftest.$ac_ext >&5
24036   rm -rf conftest*
24037   eval "ac_cv_func_strftime=no"
24038 fi
24039 rm -f conftest*
24040 fi
24041
24042 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
24043   echo "$ac_t""yes" 1>&6
24044   cat >> confdefs.h <<\EOF
24045 #define HAVE_STRFTIME 1
24046 EOF
24047
24048 else
24049   echo "$ac_t""no" 1>&6
24050 # strftime is in -lintl on SCO UNIX.
24051 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
24052 echo "configure:24053: checking for strftime in -lintl" >&5
24053 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
24054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24055   echo $ac_n "(cached) $ac_c" 1>&6
24056 else
24057   ac_save_LIBS="$LIBS"
24058 LIBS="-lintl  $LIBS"
24059 cat > conftest.$ac_ext <<EOF
24060 #line 24061 "configure"
24061 #include "confdefs.h"
24062 /* Override any gcc2 internal prototype to avoid an error.  */
24063 /* We use char because int might match the return type of a gcc2
24064     builtin and then its argument prototype would still apply.  */
24065 char strftime();
24066
24067 int main() {
24068 strftime()
24069 ; return 0; }
24070 EOF
24071 if { (eval echo configure:24072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24072   rm -rf conftest*
24073   eval "ac_cv_lib_$ac_lib_var=yes"
24074 else
24075   echo "configure: failed program was:" >&5
24076   cat conftest.$ac_ext >&5
24077   rm -rf conftest*
24078   eval "ac_cv_lib_$ac_lib_var=no"
24079 fi
24080 rm -f conftest*
24081 LIBS="$ac_save_LIBS"
24082
24083 fi
24084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24085   echo "$ac_t""yes" 1>&6
24086   cat >> confdefs.h <<\EOF
24087 #define HAVE_STRFTIME 1
24088 EOF
24089
24090 LIBS="-lintl $LIBS"
24091 else
24092   echo "$ac_t""no" 1>&6
24093 fi
24094
24095 fi
24096
24097
24098 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
24099 echo "configure:24100: checking for inet_aton()" >&5
24100 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
24101   echo $ac_n "(cached) $ac_c" 1>&6
24102 else
24103   cat > conftest.$ac_ext <<EOF
24104 #line 24105 "configure"
24105 #include "confdefs.h"
24106
24107 #ifdef HAVE_SYS_TYPES_H
24108 #       include <sys/types.h>
24109 #endif
24110 #ifdef HAVE_SYS_SOCKET_H
24111 #       include <sys/socket.h>
24112 #       ifdef HAVE_SYS_SELECT_H
24113 #               include <sys/select.h>
24114 #       endif
24115 #       include <netinet/in.h>
24116 #       ifdef HAVE_ARPA_INET_H
24117 #               include <arpa/inet.h>
24118 #       endif
24119 #endif
24120
24121 int main() {
24122 struct in_addr in;
24123 int rc = inet_aton( "255.255.255.255", &in );
24124 ; return 0; }
24125 EOF
24126 if { (eval echo configure:24127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24127   rm -rf conftest*
24128   ol_cv_func_inet_aton=yes
24129 else
24130   echo "configure: failed program was:" >&5
24131   cat conftest.$ac_ext >&5
24132   rm -rf conftest*
24133   ol_cv_func_inet_aton=no
24134 fi
24135 rm -f conftest*
24136 fi
24137
24138 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
24139   if test $ol_cv_func_inet_aton != no; then
24140     cat >> confdefs.h <<\EOF
24141 #define HAVE_INET_ATON 1
24142 EOF
24143
24144   fi
24145  
24146
24147 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
24148 echo "configure:24149: checking for _spawnlp" >&5
24149 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
24150   echo $ac_n "(cached) $ac_c" 1>&6
24151 else
24152   cat > conftest.$ac_ext <<EOF
24153 #line 24154 "configure"
24154 #include "confdefs.h"
24155 /* System header to define __stub macros and hopefully few prototypes,
24156     which can conflict with char _spawnlp(); below.  */
24157 #include <assert.h>
24158 /* Override any gcc2 internal prototype to avoid an error.  */
24159 /* We use char because int might match the return type of a gcc2
24160     builtin and then its argument prototype would still apply.  */
24161 char _spawnlp();
24162 char (*f)();
24163
24164 int main() {
24165
24166 /* The GNU C library defines this for functions which it implements
24167     to always fail with ENOSYS.  Some functions are actually named
24168     something starting with __ and the normal name is an alias.  */
24169 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
24170 choke me
24171 #else
24172 f = _spawnlp;
24173 #endif
24174
24175 ; return 0; }
24176 EOF
24177 if { (eval echo configure:24178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24178   rm -rf conftest*
24179   eval "ac_cv_func__spawnlp=yes"
24180 else
24181   echo "configure: failed program was:" >&5
24182   cat conftest.$ac_ext >&5
24183   rm -rf conftest*
24184   eval "ac_cv_func__spawnlp=no"
24185 fi
24186 rm -f conftest*
24187 fi
24188
24189 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
24190   echo "$ac_t""yes" 1>&6
24191   cat >> confdefs.h <<\EOF
24192 #define HAVE_SPAWNLP 1
24193 EOF
24194
24195 else
24196   echo "$ac_t""no" 1>&6
24197 fi
24198
24199
24200 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
24201 echo "configure:24202: checking for _snprintf" >&5
24202 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
24203   echo $ac_n "(cached) $ac_c" 1>&6
24204 else
24205   cat > conftest.$ac_ext <<EOF
24206 #line 24207 "configure"
24207 #include "confdefs.h"
24208 /* System header to define __stub macros and hopefully few prototypes,
24209     which can conflict with char _snprintf(); below.  */
24210 #include <assert.h>
24211 /* Override any gcc2 internal prototype to avoid an error.  */
24212 /* We use char because int might match the return type of a gcc2
24213     builtin and then its argument prototype would still apply.  */
24214 char _snprintf();
24215 char (*f)();
24216
24217 int main() {
24218
24219 /* The GNU C library defines this for functions which it implements
24220     to always fail with ENOSYS.  Some functions are actually named
24221     something starting with __ and the normal name is an alias.  */
24222 #if defined (__stub__snprintf) || defined (__stub____snprintf)
24223 choke me
24224 #else
24225 f = _snprintf;
24226 #endif
24227
24228 ; return 0; }
24229 EOF
24230 if { (eval echo configure:24231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24231   rm -rf conftest*
24232   eval "ac_cv_func__snprintf=yes"
24233 else
24234   echo "configure: failed program was:" >&5
24235   cat conftest.$ac_ext >&5
24236   rm -rf conftest*
24237   eval "ac_cv_func__snprintf=no"
24238 fi
24239 rm -f conftest*
24240 fi
24241
24242 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
24243   echo "$ac_t""yes" 1>&6
24244   ac_cv_func_snprintf=yes
24245         cat >> confdefs.h <<\EOF
24246 #define snprintf _snprintf
24247 EOF
24248
24249
24250 else
24251   echo "$ac_t""no" 1>&6
24252 fi
24253
24254
24255 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
24256 echo "configure:24257: checking for _vsnprintf" >&5
24257 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
24258   echo $ac_n "(cached) $ac_c" 1>&6
24259 else
24260   cat > conftest.$ac_ext <<EOF
24261 #line 24262 "configure"
24262 #include "confdefs.h"
24263 /* System header to define __stub macros and hopefully few prototypes,
24264     which can conflict with char _vsnprintf(); below.  */
24265 #include <assert.h>
24266 /* Override any gcc2 internal prototype to avoid an error.  */
24267 /* We use char because int might match the return type of a gcc2
24268     builtin and then its argument prototype would still apply.  */
24269 char _vsnprintf();
24270 char (*f)();
24271
24272 int main() {
24273
24274 /* The GNU C library defines this for functions which it implements
24275     to always fail with ENOSYS.  Some functions are actually named
24276     something starting with __ and the normal name is an alias.  */
24277 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
24278 choke me
24279 #else
24280 f = _vsnprintf;
24281 #endif
24282
24283 ; return 0; }
24284 EOF
24285 if { (eval echo configure:24286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24286   rm -rf conftest*
24287   eval "ac_cv_func__vsnprintf=yes"
24288 else
24289   echo "configure: failed program was:" >&5
24290   cat conftest.$ac_ext >&5
24291   rm -rf conftest*
24292   eval "ac_cv_func__vsnprintf=no"
24293 fi
24294 rm -f conftest*
24295 fi
24296
24297 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
24298   echo "$ac_t""yes" 1>&6
24299   ac_cv_func_vsnprintf=yes
24300         cat >> confdefs.h <<\EOF
24301 #define vsnprintf _vsnprintf
24302 EOF
24303
24304
24305 else
24306   echo "$ac_t""no" 1>&6
24307 fi
24308
24309
24310 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
24311 echo "configure:24312: checking for vprintf" >&5
24312 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
24313   echo $ac_n "(cached) $ac_c" 1>&6
24314 else
24315   cat > conftest.$ac_ext <<EOF
24316 #line 24317 "configure"
24317 #include "confdefs.h"
24318 /* System header to define __stub macros and hopefully few prototypes,
24319     which can conflict with char vprintf(); below.  */
24320 #include <assert.h>
24321 /* Override any gcc2 internal prototype to avoid an error.  */
24322 /* We use char because int might match the return type of a gcc2
24323     builtin and then its argument prototype would still apply.  */
24324 char vprintf();
24325 char (*f)();
24326
24327 int main() {
24328
24329 /* The GNU C library defines this for functions which it implements
24330     to always fail with ENOSYS.  Some functions are actually named
24331     something starting with __ and the normal name is an alias.  */
24332 #if defined (__stub_vprintf) || defined (__stub___vprintf)
24333 choke me
24334 #else
24335 f = vprintf;
24336 #endif
24337
24338 ; return 0; }
24339 EOF
24340 if { (eval echo configure:24341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24341   rm -rf conftest*
24342   eval "ac_cv_func_vprintf=yes"
24343 else
24344   echo "configure: failed program was:" >&5
24345   cat conftest.$ac_ext >&5
24346   rm -rf conftest*
24347   eval "ac_cv_func_vprintf=no"
24348 fi
24349 rm -f conftest*
24350 fi
24351
24352 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
24353   echo "$ac_t""yes" 1>&6
24354   cat >> confdefs.h <<\EOF
24355 #define HAVE_VPRINTF 1
24356 EOF
24357
24358 else
24359   echo "$ac_t""no" 1>&6
24360 fi
24361
24362 if test "$ac_cv_func_vprintf" != yes; then
24363 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
24364 echo "configure:24365: checking for _doprnt" >&5
24365 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
24366   echo $ac_n "(cached) $ac_c" 1>&6
24367 else
24368   cat > conftest.$ac_ext <<EOF
24369 #line 24370 "configure"
24370 #include "confdefs.h"
24371 /* System header to define __stub macros and hopefully few prototypes,
24372     which can conflict with char _doprnt(); below.  */
24373 #include <assert.h>
24374 /* Override any gcc2 internal prototype to avoid an error.  */
24375 /* We use char because int might match the return type of a gcc2
24376     builtin and then its argument prototype would still apply.  */
24377 char _doprnt();
24378 char (*f)();
24379
24380 int main() {
24381
24382 /* The GNU C library defines this for functions which it implements
24383     to always fail with ENOSYS.  Some functions are actually named
24384     something starting with __ and the normal name is an alias.  */
24385 #if defined (__stub__doprnt) || defined (__stub____doprnt)
24386 choke me
24387 #else
24388 f = _doprnt;
24389 #endif
24390
24391 ; return 0; }
24392 EOF
24393 if { (eval echo configure:24394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24394   rm -rf conftest*
24395   eval "ac_cv_func__doprnt=yes"
24396 else
24397   echo "configure: failed program was:" >&5
24398   cat conftest.$ac_ext >&5
24399   rm -rf conftest*
24400   eval "ac_cv_func__doprnt=no"
24401 fi
24402 rm -f conftest*
24403 fi
24404
24405 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
24406   echo "$ac_t""yes" 1>&6
24407   cat >> confdefs.h <<\EOF
24408 #define HAVE_DOPRNT 1
24409 EOF
24410
24411 else
24412   echo "$ac_t""no" 1>&6
24413 fi
24414
24415 fi
24416
24417
24418 if test $ac_cv_func_vprintf = yes ; then
24419                 for ac_func in snprintf vsnprintf
24420 do
24421 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24422 echo "configure:24423: checking for $ac_func" >&5
24423 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24424   echo $ac_n "(cached) $ac_c" 1>&6
24425 else
24426   cat > conftest.$ac_ext <<EOF
24427 #line 24428 "configure"
24428 #include "confdefs.h"
24429 /* System header to define __stub macros and hopefully few prototypes,
24430     which can conflict with char $ac_func(); below.  */
24431 #include <assert.h>
24432 /* Override any gcc2 internal prototype to avoid an error.  */
24433 /* We use char because int might match the return type of a gcc2
24434     builtin and then its argument prototype would still apply.  */
24435 char $ac_func();
24436 char (*f)();
24437
24438 int main() {
24439
24440 /* The GNU C library defines this for functions which it implements
24441     to always fail with ENOSYS.  Some functions are actually named
24442     something starting with __ and the normal name is an alias.  */
24443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24444 choke me
24445 #else
24446 f = $ac_func;
24447 #endif
24448
24449 ; return 0; }
24450 EOF
24451 if { (eval echo configure:24452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24452   rm -rf conftest*
24453   eval "ac_cv_func_$ac_func=yes"
24454 else
24455   echo "configure: failed program was:" >&5
24456   cat conftest.$ac_ext >&5
24457   rm -rf conftest*
24458   eval "ac_cv_func_$ac_func=no"
24459 fi
24460 rm -f conftest*
24461 fi
24462
24463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24464   echo "$ac_t""yes" 1>&6
24465     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24466   cat >> confdefs.h <<EOF
24467 #define $ac_tr_func 1
24468 EOF
24469  
24470 else
24471   echo "$ac_t""no" 1>&6
24472 fi
24473 done
24474
24475 fi
24476
24477 for ac_func in \
24478         bcopy                   \
24479         closesocket             \
24480         chroot                  \
24481         endgrent                \
24482         endpwent                \
24483         fcntl                   \
24484         flock                   \
24485         fstat                   \
24486         getdtablesize   \
24487         getgrgid                \
24488         gethostname             \
24489         getpass                 \
24490         getpassphrase   \
24491         getpwuid                \
24492         getpwnam                \
24493         getspnam                \
24494         gettimeofday    \
24495         initgroups              \
24496         lockf                   \
24497         memcpy                  \
24498         memmove                 \
24499         mkstemp                 \
24500         mktemp                  \
24501         pipe                    \
24502         read                    \
24503         recv                    \
24504         recvfrom                \
24505         setpwfile               \
24506         setgid                  \
24507         setegid                 \
24508         setsid                  \
24509         setuid                  \
24510         seteuid                 \
24511         signal                  \
24512         strdup                  \
24513         strpbrk                 \
24514         strrchr                 \
24515         strsep                  \
24516         strstr                  \
24517         strtol                  \
24518         strtoul                 \
24519         strtoq                  \
24520         strtouq                 \
24521         strtoll                 \
24522         strspn                  \
24523         sysconf                 \
24524         usleep                  \
24525         waitpid                 \
24526         wait4                   \
24527         write                   \
24528         send                    \
24529         sendmsg                 \
24530         sendto                  \
24531
24532 do
24533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24534 echo "configure:24535: checking for $ac_func" >&5
24535 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24536   echo $ac_n "(cached) $ac_c" 1>&6
24537 else
24538   cat > conftest.$ac_ext <<EOF
24539 #line 24540 "configure"
24540 #include "confdefs.h"
24541 /* System header to define __stub macros and hopefully few prototypes,
24542     which can conflict with char $ac_func(); below.  */
24543 #include <assert.h>
24544 /* Override any gcc2 internal prototype to avoid an error.  */
24545 /* We use char because int might match the return type of a gcc2
24546     builtin and then its argument prototype would still apply.  */
24547 char $ac_func();
24548 char (*f)();
24549
24550 int main() {
24551
24552 /* The GNU C library defines this for functions which it implements
24553     to always fail with ENOSYS.  Some functions are actually named
24554     something starting with __ and the normal name is an alias.  */
24555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24556 choke me
24557 #else
24558 f = $ac_func;
24559 #endif
24560
24561 ; return 0; }
24562 EOF
24563 if { (eval echo configure:24564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24564   rm -rf conftest*
24565   eval "ac_cv_func_$ac_func=yes"
24566 else
24567   echo "configure: failed program was:" >&5
24568   cat conftest.$ac_ext >&5
24569   rm -rf conftest*
24570   eval "ac_cv_func_$ac_func=no"
24571 fi
24572 rm -f conftest*
24573 fi
24574
24575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24576   echo "$ac_t""yes" 1>&6
24577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24578   cat >> confdefs.h <<EOF
24579 #define $ac_tr_func 1
24580 EOF
24581  
24582 else
24583   echo "$ac_t""no" 1>&6
24584 fi
24585 done
24586
24587
24588 for ac_func in getopt getpeereid
24589 do
24590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
24591 echo "configure:24592: checking for $ac_func" >&5
24592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
24593   echo $ac_n "(cached) $ac_c" 1>&6
24594 else
24595   cat > conftest.$ac_ext <<EOF
24596 #line 24597 "configure"
24597 #include "confdefs.h"
24598 /* System header to define __stub macros and hopefully few prototypes,
24599     which can conflict with char $ac_func(); below.  */
24600 #include <assert.h>
24601 /* Override any gcc2 internal prototype to avoid an error.  */
24602 /* We use char because int might match the return type of a gcc2
24603     builtin and then its argument prototype would still apply.  */
24604 char $ac_func();
24605 char (*f)();
24606
24607 int main() {
24608
24609 /* The GNU C library defines this for functions which it implements
24610     to always fail with ENOSYS.  Some functions are actually named
24611     something starting with __ and the normal name is an alias.  */
24612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24613 choke me
24614 #else
24615 f = $ac_func;
24616 #endif
24617
24618 ; return 0; }
24619 EOF
24620 if { (eval echo configure:24621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24621   rm -rf conftest*
24622   eval "ac_cv_func_$ac_func=yes"
24623 else
24624   echo "configure: failed program was:" >&5
24625   cat conftest.$ac_ext >&5
24626   rm -rf conftest*
24627   eval "ac_cv_func_$ac_func=no"
24628 fi
24629 rm -f conftest*
24630 fi
24631
24632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
24633   echo "$ac_t""yes" 1>&6
24634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
24635   cat >> confdefs.h <<EOF
24636 #define $ac_tr_func 1
24637 EOF
24638  
24639 else
24640   echo "$ac_t""no" 1>&6
24641 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
24642 fi
24643 done
24644
24645
24646
24647 if test "$ac_cv_func_getopt" != yes; then
24648         LIBSRCS="$LIBSRCS getopt.c"
24649 fi
24650 if test "$ac_cv_func_getpeereid" != yes; then
24651         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
24652 echo "configure:24653: checking for msg_accrights in msghdr" >&5
24653 if eval "test \"\${ol_cv_msghdr_msg_accrights+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_accrightslen=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_accrights=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_accrights=no
24672 fi
24673 rm -f conftest*
24674         
24675 fi
24676
24677 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
24678   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
24679         cat >> confdefs.h <<\EOF
24680 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
24681 EOF
24682
24683   fi
24684
24685         if test "$ac_cv_func_getpeereid" != yes; then
24686                 echo $ac_n "checking for msg_control in msghdr""... $ac_c" 1>&6
24687 echo "configure:24688: checking for msg_control in msghdr" >&5
24688 if eval "test \"\${ol_cv_msghdr_msg_control+set}\" = set"; then
24689   echo $ac_n "(cached) $ac_c" 1>&6
24690 else
24691   cat > conftest.$ac_ext <<EOF
24692 #line 24693 "configure"
24693 #include "confdefs.h"
24694 #include <sys/socket.h>
24695 int main() {
24696 struct msghdr m; m.msg_control=(struct cmsghdr *)0
24697 ; return 0; }
24698 EOF
24699 if { (eval echo configure:24700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
24700   rm -rf conftest*
24701   ol_cv_msghdr_msg_control=yes
24702 else
24703   echo "configure: failed program was:" >&5
24704   cat conftest.$ac_ext >&5
24705   rm -rf conftest*
24706   ol_cv_msghdr_msg_control=no
24707 fi
24708 rm -f conftest*
24709         
24710 fi
24711
24712 echo "$ac_t""$ol_cv_msghdr_msg_control" 1>&6
24713   if test $ol_cv_msghdr_msg_control = "yes" ; then
24714         cat >> confdefs.h <<\EOF
24715 #define HAVE_MSGHDR_MSG_CONTROL 1
24716 EOF
24717
24718   fi
24719
24720         fi
24721         LIBSRCS="$LIBSRCS getpeereid.c"
24722 fi
24723 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
24724         if test "$ac_cv_func_snprintf" != yes; then
24725                 cat >> confdefs.h <<\EOF
24726 #define snprintf ber_pvt_snprintf
24727 EOF
24728
24729         fi
24730         if test "$ac_cv_func_vsnprintf" != yes; then
24731                 cat >> confdefs.h <<\EOF
24732 #define vsnprintf ber_pvt_vsnprintf
24733 EOF
24734
24735         fi
24736 fi
24737
24738
24739 if test "$ol_enable_slapi" != no ; then
24740                         for ac_hdr in ltdl.h
24741 do
24742 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
24743 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
24744 echo "configure:24745: checking for $ac_hdr" >&5
24745 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
24746   echo $ac_n "(cached) $ac_c" 1>&6
24747 else
24748   cat > conftest.$ac_ext <<EOF
24749 #line 24750 "configure"
24750 #include "confdefs.h"
24751 #include <$ac_hdr>
24752 EOF
24753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
24754 { (eval echo configure:24755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
24755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
24756 if test -z "$ac_err"; then
24757   rm -rf conftest*
24758   eval "ac_cv_header_$ac_safe=yes"
24759 else
24760   echo "$ac_err" >&5
24761   echo "configure: failed program was:" >&5
24762   cat conftest.$ac_ext >&5
24763   rm -rf conftest*
24764   eval "ac_cv_header_$ac_safe=no"
24765 fi
24766 rm -f conftest*
24767 fi
24768 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
24769   echo "$ac_t""yes" 1>&6
24770     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
24771   cat >> confdefs.h <<EOF
24772 #define $ac_tr_hdr 1
24773 EOF
24774  
24775 else
24776   echo "$ac_t""no" 1>&6
24777 fi
24778 done
24779
24780
24781         if test $ac_cv_header_ltdl_h != yes ; then
24782                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
24783         fi
24784         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
24785 echo "configure:24786: checking for lt_dlinit in -lltdl" >&5
24786 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
24787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
24788   echo $ac_n "(cached) $ac_c" 1>&6
24789 else
24790   ac_save_LIBS="$LIBS"
24791 LIBS="-lltdl  $LIBS"
24792 cat > conftest.$ac_ext <<EOF
24793 #line 24794 "configure"
24794 #include "confdefs.h"
24795 /* Override any gcc2 internal prototype to avoid an error.  */
24796 /* We use char because int might match the return type of a gcc2
24797     builtin and then its argument prototype would still apply.  */
24798 char lt_dlinit();
24799
24800 int main() {
24801 lt_dlinit()
24802 ; return 0; }
24803 EOF
24804 if { (eval echo configure:24805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24805   rm -rf conftest*
24806   eval "ac_cv_lib_$ac_lib_var=yes"
24807 else
24808   echo "configure: failed program was:" >&5
24809   cat conftest.$ac_ext >&5
24810   rm -rf conftest*
24811   eval "ac_cv_lib_$ac_lib_var=no"
24812 fi
24813 rm -f conftest*
24814 LIBS="$ac_save_LIBS"
24815
24816 fi
24817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
24818   echo "$ac_t""yes" 1>&6
24819   
24820                 SLAPI_LIBS=-lltdl
24821                 LIBSLAPI=libslapi.a
24822                 LIBSLAPITOOLS=../libslapi.a
24823                 cat >> confdefs.h <<\EOF
24824 #define HAVE_LIBLTDL 1
24825 EOF
24826
24827         
24828 else
24829   echo "$ac_t""no" 1>&6
24830 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24831 fi
24832
24833
24834         cat >> confdefs.h <<\EOF
24835 #define LDAP_SLAPI 1
24836 EOF
24837
24838 fi
24839
24840 if test "$ol_enable_debug" != no ; then
24841         cat >> confdefs.h <<\EOF
24842 #define LDAP_DEBUG 1
24843 EOF
24844
24845 fi
24846 if test "$ol_enable_syslog" = yes ; then
24847         cat >> confdefs.h <<\EOF
24848 #define LDAP_SYSLOG 1
24849 EOF
24850
24851 fi
24852 if test "$ol_link_kbind" != no ; then
24853         cat >> confdefs.h <<\EOF
24854 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24855 EOF
24856
24857 fi
24858 if test "$ol_enable_proctitle" != no ; then
24859         cat >> confdefs.h <<\EOF
24860 #define LDAP_PROCTITLE 1
24861 EOF
24862
24863 fi
24864 if test "$ol_enable_referrals" != no ; then
24865         cat >> confdefs.h <<\EOF
24866 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24867 EOF
24868
24869 fi
24870 if test "$ol_enable_local" != no; then
24871         cat >> confdefs.h <<\EOF
24872 #define LDAP_PF_LOCAL 1
24873 EOF
24874
24875 fi
24876 if test "$ol_link_ipv6" != no; then
24877         cat >> confdefs.h <<\EOF
24878 #define LDAP_PF_INET6 1
24879 EOF
24880
24881 fi
24882 if test "$ol_enable_cleartext" != no ; then
24883         cat >> confdefs.h <<\EOF
24884 #define SLAPD_CLEARTEXT 1
24885 EOF
24886
24887 fi
24888 if test "$ol_enable_crypt" != no ; then
24889         cat >> confdefs.h <<\EOF
24890 #define SLAPD_CRYPT 1
24891 EOF
24892
24893 fi
24894 if test "$ol_link_spasswd" != no ; then
24895         cat >> confdefs.h <<\EOF
24896 #define SLAPD_SPASSWD 1
24897 EOF
24898
24899 fi
24900 if test "$ol_enable_multimaster" != no ; then
24901         cat >> confdefs.h <<\EOF
24902 #define SLAPD_MULTIMASTER 1
24903 EOF
24904
24905 fi
24906 if test "$ol_enable_rlookups" != no ; then
24907         cat >> confdefs.h <<\EOF
24908 #define SLAPD_RLOOKUPS 1
24909 EOF
24910
24911 fi
24912 if test "$ol_enable_aci" != no ; then
24913         cat >> confdefs.h <<\EOF
24914 #define SLAPD_ACI_ENABLED 1
24915 EOF
24916
24917 fi
24918
24919 if test "$ol_link_modules" != no ; then
24920         cat >> confdefs.h <<\EOF
24921 #define SLAPD_MODULES 1
24922 EOF
24923
24924         BUILD_SLAPD=yes
24925         SLAPD_MODULES_LDFLAGS="-dlopen self"
24926 fi
24927
24928 cat >> confdefs.h <<\EOF
24929 #define SLAPD_MOD_STATIC 1
24930 EOF
24931
24932 cat >> confdefs.h <<\EOF
24933 #define SLAPD_MOD_DYNAMIC 2
24934 EOF
24935
24936
24937 if test "$ol_enable_bdb" != no ; then
24938         BUILD_SLAPD=yes
24939         BUILD_BDB=$ol_enable_bdb
24940         if test "$ol_enable_bdb" = mod ; then
24941                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24942                 MFLAG=SLAPD_MOD_DYNAMIC
24943         else
24944                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24945                 MFLAG=SLAPD_MOD_STATIC
24946         fi
24947         cat >> confdefs.h <<EOF
24948 #define SLAPD_BDB $MFLAG
24949 EOF
24950
24951 fi
24952
24953 if test "$ol_enable_dnssrv" != no ; then
24954         BUILD_SLAPD=yes
24955         BUILD_DNSSRV=$ol_enable_dnssrv
24956         if test "$ol_enable_dnssrv" = mod ; then
24957                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24958                 MFLAG=SLAPD_MOD_DYNAMIC
24959         else
24960                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24961                 MFLAG=SLAPD_MOD_STATIC
24962         fi
24963         cat >> confdefs.h <<EOF
24964 #define SLAPD_DNSSRV $MFLAG
24965 EOF
24966
24967 fi
24968
24969 if test "$ol_enable_hdb" != no ; then
24970         BUILD_SLAPD=yes
24971         BUILD_HDB=$ol_enable_hdb
24972         if test "$ol_enable_hdb" = mod ; then
24973                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24974                 MFLAG=SLAPD_MOD_DYNAMIC
24975         else
24976                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24977                 MFLAG=SLAPD_MOD_STATIC
24978         fi
24979         cat >> confdefs.h <<EOF
24980 #define SLAPD_HDB $MFLAG
24981 EOF
24982
24983 fi
24984
24985 if test "$ol_enable_ldap" != no ; then
24986         BUILD_SLAPD=yes
24987         BUILD_LDAP=$ol_enable_ldap
24988         if test "$ol_enable_ldap" = mod ; then
24989                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24990                 MFLAG=SLAPD_MOD_DYNAMIC
24991         else
24992                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24993                 MFLAG=SLAPD_MOD_STATIC
24994         fi
24995         cat >> confdefs.h <<EOF
24996 #define SLAPD_LDAP $MFLAG
24997 EOF
24998
24999 fi
25000
25001 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
25002         BUILD_SLAPD=yes
25003         BUILD_LDBM=$ol_enable_ldbm
25004         if test "$ol_enable_ldbm" = mod ; then
25005                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
25006                 MFLAG=SLAPD_MOD_DYNAMIC
25007         else
25008                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
25009                 MFLAG=SLAPD_MOD_STATIC
25010         fi
25011         cat >> confdefs.h <<EOF
25012 #define SLAPD_LDBM $MFLAG
25013 EOF
25014
25015 fi
25016
25017 if test "$ol_enable_meta" != no ; then
25018         BUILD_SLAPD=yes
25019         BUILD_META=$ol_enable_meta
25020         BUILD_REWRITE=yes
25021         if test "$ol_enable_meta" = mod ; then
25022                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
25023                 MFLAG=SLAPD_MOD_DYNAMIC
25024         else
25025                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
25026                 MFLAG=SLAPD_MOD_STATIC
25027         fi
25028         cat >> confdefs.h <<EOF
25029 #define SLAPD_META $MFLAG
25030 EOF
25031
25032 fi
25033
25034 if test "$ol_enable_monitor" != no ; then
25035         BUILD_SLAPD=yes
25036         BUILD_MONITOR=$ol_enable_monitor
25037         if test "$ol_enable_monitor" = mod ; then
25038                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
25039                 MFLAG=SLAPD_MOD_DYNAMIC
25040         else
25041                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
25042                 MFLAG=SLAPD_MOD_STATIC
25043         fi
25044         cat >> confdefs.h <<EOF
25045 #define SLAPD_MONITOR $MFLAG
25046 EOF
25047
25048 fi
25049
25050 if test "$ol_enable_null" != no ; then
25051         BUILD_SLAPD=yes
25052         BUILD_NULL=$ol_enable_null
25053         if test "$ol_enable_null" = mod ; then
25054                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
25055                 MFLAG=SLAPD_MOD_DYNAMIC
25056         else
25057                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
25058                 MFLAG=SLAPD_MOD_STATIC
25059         fi
25060         cat >> confdefs.h <<EOF
25061 #define SLAPD_NULL $MFLAG
25062 EOF
25063
25064 fi
25065
25066 if test "$ol_enable_passwd" != no ; then
25067         BUILD_SLAPD=yes
25068         BUILD_PASSWD=$ol_enable_passwd
25069         if test "$ol_enable_passwd" = mod ; then
25070                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
25071                 MFLAG=SLAPD_MOD_DYNAMIC
25072         else
25073                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
25074                 MFLAG=SLAPD_MOD_STATIC
25075         fi
25076         cat >> confdefs.h <<EOF
25077 #define SLAPD_PASSWD $MFLAG
25078 EOF
25079
25080 fi
25081
25082 if test "$ol_link_perl" != no ; then
25083         BUILD_SLAPD=yes
25084         BUILD_PERL=$ol_enable_perl
25085         if test "$ol_enable_perl" = mod ; then
25086                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
25087                 MFLAG=SLAPD_MOD_DYNAMIC
25088         else
25089                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
25090                 MFLAG=SLAPD_MOD_STATIC
25091         fi
25092         cat >> confdefs.h <<EOF
25093 #define SLAPD_PERL $MFLAG
25094 EOF
25095
25096 fi
25097
25098 if test "$ol_enable_relay" != no ; then
25099         BUILD_SLAPD=yes
25100         BUILD_RELAY=$ol_enable_relay
25101         if test "$ol_enable_relay" = mod ; then
25102                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
25103                 MFLAG=SLAPD_MOD_DYNAMIC
25104         else
25105                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
25106                 MFLAG=SLAPD_MOD_STATIC
25107         fi
25108         cat >> confdefs.h <<EOF
25109 #define SLAPD_RELAY $MFLAG
25110 EOF
25111
25112 fi
25113
25114 if test "$ol_enable_shell" != no ; then
25115         if test "$ol_link_thread" != no ; then
25116                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
25117         fi
25118         BUILD_SLAPD=yes
25119         BUILD_SHELL=$ol_enable_shell
25120         if test "$ol_enable_shell" = mod ; then
25121                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
25122                 MFLAG=SLAPD_MOD_DYNAMIC
25123         else
25124                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
25125                 MFLAG=SLAPD_MOD_STATIC
25126         fi
25127         cat >> confdefs.h <<EOF
25128 #define SLAPD_SHELL $MFLAG
25129 EOF
25130
25131 fi
25132
25133 if test "$ol_link_sql" != no ; then
25134         BUILD_SLAPD=yes
25135         BUILD_SQL=$ol_enable_sql
25136         if test "$ol_enable_sql" = mod; then
25137                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
25138                 MFLAG=SLAPD_MOD_DYNAMIC
25139         else
25140                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
25141                 MFLAG=SLAPD_MOD_STATIC
25142         fi
25143         cat >> confdefs.h <<EOF
25144 #define SLAPD_SQL $MFLAG
25145 EOF
25146
25147 fi
25148
25149 if test "$ol_enable_accesslog" != no ; then
25150         BUILD_ACCESSLOG=$ol_enable_accesslog
25151         if test "$ol_enable_accesslog" = mod ; then
25152                 MFLAG=SLAPD_MOD_DYNAMIC
25153                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
25154         else
25155                 MFLAG=SLAPD_MOD_STATIC
25156                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
25157         fi
25158         cat >> confdefs.h <<EOF
25159 #define SLAPD_OVER_ACCESSLOG $MFLAG
25160 EOF
25161
25162 fi
25163
25164 if test "$ol_enable_denyop" != no ; then
25165         BUILD_DENYOP=$ol_enable_denyop
25166         if test "$ol_enable_denyop" = mod ; then
25167                 MFLAG=SLAPD_MOD_DYNAMIC
25168                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
25169         else
25170                 MFLAG=SLAPD_MOD_STATIC
25171                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.o"
25172         fi
25173         cat >> confdefs.h <<EOF
25174 #define SLAPD_OVER_DENYOP $MFLAG
25175 EOF
25176
25177 fi
25178
25179 if test "$ol_enable_dyngroup" != no ; then
25180         BUILD_DYNGROUP=$ol_enable_dyngroup
25181         if test "$ol_enable_dyngroup" = mod ; then
25182                 MFLAG=SLAPD_MOD_DYNAMIC
25183                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
25184         else
25185                 MFLAG=SLAPD_MOD_STATIC
25186                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
25187         fi
25188         cat >> confdefs.h <<EOF
25189 #define SLAPD_OVER_DYNGROUP $MFLAG
25190 EOF
25191
25192 fi
25193
25194 if test "$ol_enable_dynlist" != no ; then
25195         BUILD_DYNLIST=$ol_enable_dynlist
25196         if test "$ol_enable_dynlist" = mod ; then
25197                 MFLAG=SLAPD_MOD_DYNAMIC
25198                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
25199         else
25200                 MFLAG=SLAPD_MOD_STATIC
25201                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
25202         fi
25203         cat >> confdefs.h <<EOF
25204 #define SLAPD_OVER_DYNLIST $MFLAG
25205 EOF
25206
25207 fi
25208
25209 if test "$ol_enable_glue" != no ; then
25210         BUILD_GLUE=$ol_enable_glue
25211         if test "$ol_enable_glue" = mod ; then
25212                 MFLAG=SLAPD_MOD_DYNAMIC
25213                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
25214         else
25215                 MFLAG=SLAPD_MOD_STATIC
25216                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.o"
25217         fi
25218         cat >> confdefs.h <<EOF
25219 #define SLAPD_OVER_GLUE $MFLAG
25220 EOF
25221
25222 fi
25223
25224 if test "$ol_enable_lastmod" != no ; then
25225         BUILD_LASTMOD=$ol_enable_lastmod
25226         if test "$ol_enable_lastmod" = mod ; then
25227                 MFLAG=SLAPD_MOD_DYNAMIC
25228                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
25229         else
25230                 MFLAG=SLAPD_MOD_STATIC
25231                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.o"
25232         fi
25233         cat >> confdefs.h <<EOF
25234 #define SLAPD_OVER_LASTMOD $MFLAG
25235 EOF
25236
25237 fi
25238
25239 if test "$ol_enable_ppolicy" != no ; then
25240         BUILD_PPOLICY=$ol_enable_ppolicy
25241         if test "$ol_enable_ppolicy" = mod ; then
25242                 MFLAG=SLAPD_MOD_DYNAMIC
25243                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
25244         else
25245                 MFLAG=SLAPD_MOD_STATIC
25246                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
25247         fi
25248         cat >> confdefs.h <<EOF
25249 #define SLAPD_OVER_PPOLICY $MFLAG
25250 EOF
25251
25252 fi
25253
25254 if test "$ol_enable_proxycache" != no ; then
25255         BUILD_PROXYCACHE=$ol_enable_proxycache
25256         if test "$ol_enable_proxycache" = mod ; then
25257                 MFLAG=SLAPD_MOD_DYNAMIC
25258                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
25259         else
25260                 MFLAG=SLAPD_MOD_STATIC
25261                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
25262         fi
25263         cat >> confdefs.h <<EOF
25264 #define SLAPD_OVER_PROXYCACHE $MFLAG
25265 EOF
25266
25267 fi
25268
25269 if test "$ol_enable_refint" != no ; then
25270         BUILD_REFINT=$ol_enable_refint
25271         if test "$ol_enable_refint" = mod ; then
25272                 MFLAG=SLAPD_MOD_DYNAMIC
25273                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
25274         else
25275                 MFLAG=SLAPD_MOD_STATIC
25276                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
25277         fi
25278         cat >> confdefs.h <<EOF
25279 #define SLAPD_OVER_REFINT $MFLAG
25280 EOF
25281
25282 fi
25283
25284 if test "$ol_enable_rwm" != no ; then
25285         BUILD_REWRITE=yes
25286         BUILD_RWM=$ol_enable_rwm
25287         if test "$ol_enable_rwm" = mod ; then
25288                 MFLAG=SLAPD_MOD_DYNAMIC
25289                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
25290         else
25291                 MFLAG=SLAPD_MOD_STATIC
25292                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25293         fi
25294         cat >> confdefs.h <<EOF
25295 #define SLAPD_OVER_RWM $MFLAG
25296 EOF
25297
25298 fi
25299
25300 if test "$ol_enable_syncprov" != no ; then
25301         BUILD_SYNCPROV=$ol_enable_syncprov
25302         if test "$ol_enable_syncprov" = mod ; then
25303                 MFLAG=SLAPD_MOD_DYNAMIC
25304                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25305         else
25306                 MFLAG=SLAPD_MOD_STATIC
25307                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25308         fi
25309         cat >> confdefs.h <<EOF
25310 #define SLAPD_OVER_SYNCPROV $MFLAG
25311 EOF
25312
25313 fi
25314
25315 if test "$ol_enable_translucent" != no ; then
25316         BUILD_TRANSLUCENT=$ol_enable_translucent
25317         if test "$ol_enable_translucent" = mod ; then
25318                 MFLAG=SLAPD_MOD_DYNAMIC
25319                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25320         else
25321                 MFLAG=SLAPD_MOD_STATIC
25322                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25323         fi
25324         cat >> confdefs.h <<EOF
25325 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25326 EOF
25327
25328 fi
25329
25330 if test "$ol_enable_unique" != no ; then
25331         BUILD_UNIQUE=$ol_enable_unique
25332         if test "$ol_enable_unique" = mod ; then
25333                 MFLAG=SLAPD_MOD_DYNAMIC
25334                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25335         else
25336                 MFLAG=SLAPD_MOD_STATIC
25337                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25338         fi
25339         cat >> confdefs.h <<EOF
25340 #define SLAPD_OVER_UNIQUE $MFLAG
25341 EOF
25342
25343 fi
25344
25345 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
25346         $BUILD_SLAPD = yes ; then
25347         BUILD_SLURPD=yes
25348 fi
25349
25350 if test "$ol_enable_rewrite" != no ; then
25351         cat >> confdefs.h <<\EOF
25352 #define ENABLE_REWRITE 1
25353 EOF
25354
25355         BUILD_REWRITE=yes
25356 fi
25357
25358 if test "$ol_enable_slapi" != no ; then
25359         cat >> confdefs.h <<\EOF
25360 #define ENABLE_SLAPI 1
25361 EOF
25362
25363         BUILD_SLAPI=yes
25364         SLAPD_SLAPI_DEPEND=libslapi.a
25365 fi
25366
25367
25368
25369 if test "$ac_cv_mingw32" = yes ; then
25370         PLAT=NT
25371         SLAPD_MODULES_LDFLAGS=
25372 else
25373         PLAT=UNIX
25374 fi
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
25450
25451
25452 # Check whether --with-xxinstall or --without-xxinstall was given.
25453 if test "${with_xxinstall+set}" = set; then
25454   withval="$with_xxinstall"
25455   :
25456 fi
25457
25458
25459
25460 trap '' 1 2 15
25461
25462 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
25463
25464 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25465 # Let make expand exec_prefix.
25466 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25467
25468 # Any assignment to VPATH causes Sun make to only execute
25469 # the first set of double-colon rules, so remove it if not needed.
25470 # If there is a colon in the path, we need to keep it.
25471 if test "x$srcdir" = x.; then
25472   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
25473 fi
25474
25475 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
25476
25477 DEFS=-DHAVE_CONFIG_H
25478
25479 # Without the "./", some shells look in PATH for config.status.
25480 : ${CONFIG_STATUS=./config.status}
25481
25482 echo creating $CONFIG_STATUS
25483 rm -f $CONFIG_STATUS
25484 cat > $CONFIG_STATUS <<EOF
25485 #! /bin/sh
25486 # Generated automatically by configure.
25487 # Run this file to recreate the current configuration.
25488 # This directory was configured as follows,
25489 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
25490 #
25491 # $0 $ac_configure_args
25492 #
25493 # Compiler output produced by configure, useful for debugging
25494 # configure, is in ./config.log if it exists.
25495
25496 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
25497 for ac_option
25498 do
25499   case "\$ac_option" in
25500   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25501     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
25502     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
25503   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
25504     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
25505     exit 0 ;;
25506   -help | --help | --hel | --he | --h)
25507     echo "\$ac_cs_usage"; exit 0 ;;
25508   *) echo "\$ac_cs_usage"; exit 1 ;;
25509   esac
25510 done
25511
25512 ac_given_srcdir=$srcdir
25513 ac_given_INSTALL="$INSTALL"
25514
25515 trap 'rm -fr `echo "\
25516 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25517 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25518 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25519 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25520 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25521 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25522 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25523 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25524 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25525 include/Makefile:build/top.mk:include/Makefile.in \
25526 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25527 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25528 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25529 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25530 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25531 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25532 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25533 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25534 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25535 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25536 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25537 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25538 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25539 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25540 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25541 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25542 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25543 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25544 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25545 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25546 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25547 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25548 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25549 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25550 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25551 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25552 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25553 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25554 tests/run \
25555 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25556  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
25557 EOF
25558 cat >> $CONFIG_STATUS <<EOF
25559
25560 # Protect against being on the right side of a sed subst in config.status.
25561 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
25562  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
25563 $ac_vpsub
25564 $extrasub
25565 s%@SHELL@%$SHELL%g
25566 s%@CFLAGS@%$CFLAGS%g
25567 s%@CPPFLAGS@%$CPPFLAGS%g
25568 s%@CXXFLAGS@%$CXXFLAGS%g
25569 s%@FFLAGS@%$FFLAGS%g
25570 s%@DEFS@%$DEFS%g
25571 s%@LDFLAGS@%$LDFLAGS%g
25572 s%@LIBS@%$LIBS%g
25573 s%@exec_prefix@%$exec_prefix%g
25574 s%@prefix@%$prefix%g
25575 s%@program_transform_name@%$program_transform_name%g
25576 s%@bindir@%$bindir%g
25577 s%@sbindir@%$sbindir%g
25578 s%@libexecdir@%$libexecdir%g
25579 s%@datadir@%$datadir%g
25580 s%@sysconfdir@%$sysconfdir%g
25581 s%@sharedstatedir@%$sharedstatedir%g
25582 s%@localstatedir@%$localstatedir%g
25583 s%@libdir@%$libdir%g
25584 s%@includedir@%$includedir%g
25585 s%@oldincludedir@%$oldincludedir%g
25586 s%@infodir@%$infodir%g
25587 s%@mandir@%$mandir%g
25588 s%@host@%$host%g
25589 s%@host_alias@%$host_alias%g
25590 s%@host_cpu@%$host_cpu%g
25591 s%@host_vendor@%$host_vendor%g
25592 s%@host_os@%$host_os%g
25593 s%@target@%$target%g
25594 s%@target_alias@%$target_alias%g
25595 s%@target_cpu@%$target_cpu%g
25596 s%@target_vendor@%$target_vendor%g
25597 s%@target_os@%$target_os%g
25598 s%@build@%$build%g
25599 s%@build_alias@%$build_alias%g
25600 s%@build_cpu@%$build_cpu%g
25601 s%@build_vendor@%$build_vendor%g
25602 s%@build_os@%$build_os%g
25603 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
25604 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
25605 s%@INSTALL_DATA@%$INSTALL_DATA%g
25606 s%@PACKAGE@%$PACKAGE%g
25607 s%@VERSION@%$VERSION%g
25608 s%@ACLOCAL@%$ACLOCAL%g
25609 s%@AUTOCONF@%$AUTOCONF%g
25610 s%@AUTOMAKE@%$AUTOMAKE%g
25611 s%@AUTOHEADER@%$AUTOHEADER%g
25612 s%@MAKEINFO@%$MAKEINFO%g
25613 s%@install_sh@%$install_sh%g
25614 s%@AMTAR@%$AMTAR%g
25615 s%@AWK@%$AWK%g
25616 s%@AMTARFLAGS@%$AMTARFLAGS%g
25617 s%@SET_MAKE@%$SET_MAKE%g
25618 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
25619 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
25620 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
25621 s%@top_builddir@%$top_builddir%g
25622 s%@ldap_subdir@%$ldap_subdir%g
25623 s%@CC@%$CC%g
25624 s%@AR@%$AR%g
25625 s%@LN_S@%$LN_S%g
25626 s%@OBJEXT@%$OBJEXT%g
25627 s%@EXEEXT@%$EXEEXT%g
25628 s%@ECHO@%$ECHO%g
25629 s%@RANLIB@%$RANLIB%g
25630 s%@STRIP@%$STRIP%g
25631 s%@DLLTOOL@%$DLLTOOL%g
25632 s%@AS@%$AS%g
25633 s%@OBJDUMP@%$OBJDUMP%g
25634 s%@CPP@%$CPP%g
25635 s%@LIBTOOL@%$LIBTOOL%g
25636 s%@PERLBIN@%$PERLBIN%g
25637 s%@OL_MKDEP@%$OL_MKDEP%g
25638 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
25639 s%@LTSTATIC@%$LTSTATIC%g
25640 s%@LIBOBJS@%$LIBOBJS%g
25641 s%@LIBSRCS@%$LIBSRCS%g
25642 s%@PLAT@%$PLAT%g
25643 s%@WITH_SASL@%$WITH_SASL%g
25644 s%@WITH_TLS@%$WITH_TLS%g
25645 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
25646 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
25647 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
25648 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
25649 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
25650 s%@BUILD_BDB@%$BUILD_BDB%g
25651 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
25652 s%@BUILD_HDB@%$BUILD_HDB%g
25653 s%@BUILD_LDAP@%$BUILD_LDAP%g
25654 s%@BUILD_LDBM@%$BUILD_LDBM%g
25655 s%@BUILD_META@%$BUILD_META%g
25656 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
25657 s%@BUILD_NULL@%$BUILD_NULL%g
25658 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
25659 s%@BUILD_RELAY@%$BUILD_RELAY%g
25660 s%@BUILD_PERL@%$BUILD_PERL%g
25661 s%@BUILD_SHELL@%$BUILD_SHELL%g
25662 s%@BUILD_SQL@%$BUILD_SQL%g
25663 s%@BUILD_ACCESSLOG@%$BUILD_ACCESSLOG%g
25664 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
25665 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
25666 s%@BUILD_DYNLIST@%$BUILD_DYNLIST%g
25667 s%@BUILD_GLUE@%$BUILD_GLUE%g
25668 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
25669 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
25670 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
25671 s%@BUILD_REFINT@%$BUILD_REFINT%g
25672 s%@BUILD_RWM@%$BUILD_RWM%g
25673 s%@BUILD_SYNCPROV@%$BUILD_SYNCPROV%g
25674 s%@BUILD_TRANSLUCENT@%$BUILD_TRANSLUCENT%g
25675 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
25676 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
25677 s%@LDAP_LIBS@%$LDAP_LIBS%g
25678 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
25679 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
25680 s%@LDBM_LIBS@%$LDBM_LIBS%g
25681 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
25682 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
25683 s%@WRAP_LIBS@%$WRAP_LIBS%g
25684 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
25685 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
25686 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
25687 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
25688 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
25689 s%@SLAPD_STATIC_OVERLAYS@%$SLAPD_STATIC_OVERLAYS%g
25690 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
25691 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
25692 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
25693 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
25694 s%@KRB4_LIBS@%$KRB4_LIBS%g
25695 s%@KRB5_LIBS@%$KRB5_LIBS%g
25696 s%@SASL_LIBS@%$SASL_LIBS%g
25697 s%@TLS_LIBS@%$TLS_LIBS%g
25698 s%@MODULES_LIBS@%$MODULES_LIBS%g
25699 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
25700 s%@LIBSLAPI@%$LIBSLAPI%g
25701 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
25702 s%@AUTH_LIBS@%$AUTH_LIBS%g
25703 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
25704 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
25705 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
25706 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
25707 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
25708
25709 CEOF
25710 EOF
25711
25712 cat >> $CONFIG_STATUS <<\EOF
25713
25714 # Split the substitutions into bite-sized pieces for seds with
25715 # small command number limits, like on Digital OSF/1 and HP-UX.
25716 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
25717 ac_file=1 # Number of current file.
25718 ac_beg=1 # First line for current file.
25719 ac_end=$ac_max_sed_cmds # Line after last line for current file.
25720 ac_more_lines=:
25721 ac_sed_cmds=""
25722 while $ac_more_lines; do
25723   if test $ac_beg -gt 1; then
25724     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
25725   else
25726     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
25727   fi
25728   if test ! -s conftest.s$ac_file; then
25729     ac_more_lines=false
25730     rm -f conftest.s$ac_file
25731   else
25732     if test -z "$ac_sed_cmds"; then
25733       ac_sed_cmds="sed -f conftest.s$ac_file"
25734     else
25735       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
25736     fi
25737     ac_file=`expr $ac_file + 1`
25738     ac_beg=$ac_end
25739     ac_end=`expr $ac_end + $ac_max_sed_cmds`
25740   fi
25741 done
25742 if test -z "$ac_sed_cmds"; then
25743   ac_sed_cmds=cat
25744 fi
25745 EOF
25746
25747 cat >> $CONFIG_STATUS <<EOF
25748
25749 CONFIG_FILES=\${CONFIG_FILES-"\
25750 Makefile:build/top.mk:Makefile.in:build/dir.mk \
25751 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
25752 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
25753 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
25754 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
25755 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
25756 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
25757 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
25758 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
25759 include/Makefile:build/top.mk:include/Makefile.in \
25760 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
25761 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25762 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25763 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
25764 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
25765 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
25766 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-shared.mk \
25767 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
25768 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
25769 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
25770 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
25771 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
25772 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
25773 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
25774 servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk \
25775 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
25776 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
25777 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
25778 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
25779 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
25780 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
25781 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
25782 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
25783 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
25784 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
25785 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
25786 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
25787 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
25788 tests/run \
25789 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
25790 "}
25791 EOF
25792 cat >> $CONFIG_STATUS <<\EOF
25793 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
25794   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25795   case "$ac_file" in
25796   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25797        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25798   *) ac_file_in="${ac_file}.in" ;;
25799   esac
25800
25801   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
25802
25803   # Remove last slash and all that follows it.  Not all systems have dirname.
25804   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25805   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25806     # The file is in a subdirectory.
25807     test ! -d "$ac_dir" && mkdir "$ac_dir"
25808     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
25809     # A "../" for each directory in $ac_dir_suffix.
25810     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
25811   else
25812     ac_dir_suffix= ac_dots=
25813   fi
25814
25815   case "$ac_given_srcdir" in
25816   .)  srcdir=.
25817       if test -z "$ac_dots"; then top_srcdir=.
25818       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
25819   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
25820   *) # Relative path.
25821     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
25822     top_srcdir="$ac_dots$ac_given_srcdir" ;;
25823   esac
25824
25825   case "$ac_given_INSTALL" in
25826   [/$]*) INSTALL="$ac_given_INSTALL" ;;
25827   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
25828   esac
25829
25830   echo creating "$ac_file"
25831   rm -f "$ac_file"
25832   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
25833   case "$ac_file" in
25834   *[Mm]akefile*) ac_comsub="1i\\
25835 # $configure_input" ;;
25836   *) ac_comsub= ;;
25837   esac
25838
25839   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25840   sed -e "$ac_comsub
25841 s%@configure_input@%$configure_input%g
25842 s%@srcdir@%$srcdir%g
25843 s%@top_srcdir@%$top_srcdir%g
25844 s%@INSTALL@%$INSTALL%g
25845 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
25846 fi; done
25847 rm -f conftest.s*
25848
25849 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25850 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25851 #
25852 # ac_d sets the value in "#define NAME VALUE" lines.
25853 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25854 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
25855 ac_dC='\3'
25856 ac_dD='%g'
25857 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25858 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25859 ac_uB='\([      ]\)%\1#\2define\3'
25860 ac_uC=' '
25861 ac_uD='\4%g'
25862 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25863 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25864 ac_eB='$%\1#\2define\3'
25865 ac_eC=' '
25866 ac_eD='%g'
25867
25868 if test "${CONFIG_HEADERS+set}" != set; then
25869 EOF
25870 cat >> $CONFIG_STATUS <<EOF
25871   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
25872 EOF
25873 cat >> $CONFIG_STATUS <<\EOF
25874 fi
25875 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
25876   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25877   case "$ac_file" in
25878   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
25879        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25880   *) ac_file_in="${ac_file}.in" ;;
25881   esac
25882
25883   echo creating $ac_file
25884
25885   rm -f conftest.frag conftest.in conftest.out
25886   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
25887   cat $ac_file_inputs > conftest.in
25888
25889 EOF
25890
25891 # Transform confdefs.h into a sed script conftest.vals that substitutes
25892 # the proper values into config.h.in to produce config.h.  And first:
25893 # Protect against being on the right side of a sed subst in config.status.
25894 # Protect against being in an unquoted here document in config.status.
25895 rm -f conftest.vals
25896 cat > conftest.hdr <<\EOF
25897 s/[\\&%]/\\&/g
25898 s%[\\$`]%\\&%g
25899 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25900 s%ac_d%ac_u%gp
25901 s%ac_u%ac_e%gp
25902 EOF
25903 sed -n -f conftest.hdr confdefs.h > conftest.vals
25904 rm -f conftest.hdr
25905
25906 # This sed command replaces #undef with comments.  This is necessary, for
25907 # example, in the case of _POSIX_SOURCE, which is predefined and required
25908 # on some systems where configure will not decide to define it.
25909 cat >> conftest.vals <<\EOF
25910 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25911 EOF
25912
25913 # Break up conftest.vals because some shells have a limit on
25914 # the size of here documents, and old seds have small limits too.
25915
25916 rm -f conftest.tail
25917 while :
25918 do
25919   ac_lines=`grep -c . conftest.vals`
25920   # grep -c gives empty output for an empty file on some AIX systems.
25921   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25922   # Write a limited-size here document to conftest.frag.
25923   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25924   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25925   echo 'CEOF
25926   sed -f conftest.frag conftest.in > conftest.out
25927   rm -f conftest.in
25928   mv conftest.out conftest.in
25929 ' >> $CONFIG_STATUS
25930   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25931   rm -f conftest.vals
25932   mv conftest.tail conftest.vals
25933 done
25934 rm -f conftest.vals
25935
25936 cat >> $CONFIG_STATUS <<\EOF
25937   rm -f conftest.frag conftest.h
25938   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25939   cat conftest.in >> conftest.h
25940   rm -f conftest.in
25941   if cmp -s $ac_file conftest.h 2>/dev/null; then
25942     echo "$ac_file is unchanged"
25943     rm -f conftest.h
25944   else
25945     # Remove last slash and all that follows it.  Not all systems have dirname.
25946       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25947       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25948       # The file is in a subdirectory.
25949       test ! -d "$ac_dir" && mkdir "$ac_dir"
25950     fi
25951     rm -f $ac_file
25952     mv conftest.h $ac_file
25953   fi
25954 fi; done
25955
25956 EOF
25957 cat >> $CONFIG_STATUS <<EOF
25958 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25959 EOF
25960 cat >> $CONFIG_STATUS <<\EOF
25961
25962 chmod +x tests/run
25963 date > stamp-h
25964 BACKENDSC="servers/slapd/backends.c"
25965 echo "Making $BACKENDSC"
25966 rm -f $BACKENDSC
25967 cat > $BACKENDSC << ENDX
25968 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25969  *
25970  * Copyright 1998-2005 The OpenLDAP Foundation.
25971  * All rights reserved.
25972  *
25973  * Redistribution and use in source and binary forms, with or without
25974  * modification, are permitted only as authorized by the OpenLDAP
25975  * Public License.
25976  *
25977  * A copy of this license is available in the file LICENSE in the
25978  * top-level directory of the distribution or, alternatively, at
25979  * <http://www.OpenLDAP.org/license.html>.
25980  */
25981 /* This file is automatically generated by configure; please do not edit. */
25982
25983 #include "portable.h"
25984 #include "slap.h"
25985
25986 ENDX
25987 if test "${STATIC_BACKENDS}"; then
25988         for b in config ${STATIC_BACKENDS}; do
25989                 bb=`echo "${b}" | sed -e 's/back-//'`
25990                 cat >> $BACKENDSC << ENDX
25991 extern BI_init ${bb}_back_initialize;
25992 ENDX
25993         done
25994
25995         cat >> $BACKENDSC << ENDX
25996
25997 BackendInfo slap_binfo[] = {
25998 ENDX
25999
26000         for b in config ${STATIC_BACKENDS}; do
26001                 bb=`echo "${b}" | sed -e 's/back-//'`
26002                 echo "    Add ${bb} ..."
26003                 cat >> $BACKENDSC << ENDX
26004         { "${bb}", ${bb}_back_initialize },
26005 ENDX
26006         done
26007
26008         cat >> $BACKENDSC << ENDX
26009         { NULL, NULL },
26010 };
26011
26012 /* end of generated file */
26013 ENDX
26014 fi
26015
26016 echo Please run \"make depend\" to build dependencies
26017
26018 exit 0
26019 EOF
26020 chmod +x $CONFIG_STATUS
26021 rm -fr confdefs* $ac_clean_files
26022 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
26023