]> git.sur5r.net Git - openldap/blob - configure
Forward parse the uauthzid. A realm cannot be specified unless
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.504 2003/12/07 20:58:41 hallvard Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2003 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-2003 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   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-shell        enable shell backend [no]"
132 ac_help="$ac_help
133     --with-shell-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-sql          enable sql backend [no]"
136 ac_help="$ac_help
137     --with-sql-module     module type static|dynamic [static]"
138 ac_help="$ac_help
139
140 SLAPD Overlay Options:"
141 ac_help="$ac_help
142     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
143 ac_help="$ac_help
144     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
145 ac_help="$ac_help
146
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if test -f $ac_dir/install-sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install-sh -c"
844     break
845   elif test -f $ac_dir/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
876 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
877
878 OPENLDAP_CVS=""
879 if test -d $ac_aux_dir/CVS; then
880         OPENLDAP_CVS="(from CVS sources) "
881 fi
882
883 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
884
885
886 echo $ac_n "checking host system type""... $ac_c" 1>&6
887 echo "configure:888: checking host system type" >&5
888 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
889
890 # Make sure we can run config.sub.
891   if $ac_config_sub sun4 >/dev/null 2>&1; then :
892     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
893   fi
894
895   ac_cv_host_alias=$host
896   case "$ac_cv_host_alias" in
897   NONE)
898     case $nonopt in
899     NONE)
900       if ac_cv_host_alias=`$ac_config_guess`; then :
901       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
902       fi ;;
903     *) ac_cv_host_alias=$nonopt ;;
904     esac ;;
905   esac
906
907   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
908   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
909   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
910   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
911 else
912   echo $ac_n "(cached) $ac_c" 1>&6
913 fi
914
915 echo "$ac_t""$ac_cv_host" 1>&6
916
917 host=$ac_cv_host
918 host_alias=$ac_cv_host_alias
919 host_cpu=$ac_cv_host_cpu
920 host_vendor=$ac_cv_host_vendor
921 host_os=$ac_cv_host_os
922
923
924
925
926
927 echo $ac_n "checking target system type""... $ac_c" 1>&6
928 echo "configure:929: checking target system type" >&5
929 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
930
931 # Make sure we can run config.sub.
932   if $ac_config_sub sun4 >/dev/null 2>&1; then :
933     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
934   fi
935
936   ac_cv_target_alias=$target
937   case "$ac_cv_target_alias" in
938   NONE)
939     case $nonopt in
940     NONE)
941       ac_cv_target_alias=$host_alias ;;
942
943     *) ac_cv_target_alias=$nonopt ;;
944     esac ;;
945   esac
946
947   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
948   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
949   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
950   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
951 else
952   echo $ac_n "(cached) $ac_c" 1>&6
953 fi
954
955 echo "$ac_t""$ac_cv_target" 1>&6
956
957 target=$ac_cv_target
958 target_alias=$ac_cv_target_alias
959 target_cpu=$ac_cv_target_cpu
960 target_vendor=$ac_cv_target_vendor
961 target_os=$ac_cv_target_os
962
963
964
965
966
967 echo $ac_n "checking build system type""... $ac_c" 1>&6
968 echo "configure:969: checking build system type" >&5
969 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
970
971 # Make sure we can run config.sub.
972   if $ac_config_sub sun4 >/dev/null 2>&1; then :
973     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
974   fi
975
976   ac_cv_build_alias=$build
977   case "$ac_cv_build_alias" in
978   NONE)
979     case $nonopt in
980     NONE)
981       ac_cv_build_alias=$host_alias ;;
982
983     *) ac_cv_build_alias=$nonopt ;;
984     esac ;;
985   esac
986
987   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
988   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
989   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
990   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
991 else
992   echo $ac_n "(cached) $ac_c" 1>&6
993 fi
994
995 echo "$ac_t""$ac_cv_build" 1>&6
996
997 build=$ac_cv_build
998 build_alias=$ac_cv_build_alias
999 build_cpu=$ac_cv_build_cpu
1000 build_vendor=$ac_cv_build_vendor
1001 build_os=$ac_cv_build_os
1002
1003
1004
1005
1006
1007 # Do some error checking and defaulting for the host and target type.
1008 # The inputs are:
1009 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1010 #
1011 # The rules are:
1012 # 1. You are not allowed to specify --host, --target, and nonopt at the
1013 #    same time.
1014 # 2. Host defaults to nonopt.
1015 # 3. If nonopt is not specified, then host defaults to the current host,
1016 #    as determined by config.guess.
1017 # 4. Target and build default to nonopt.
1018 # 5. If nonopt is not specified, then target and build default to host.
1019
1020 # The aliases save the names the user supplied, while $host etc.
1021 # will get canonicalized.
1022 case $host---$target---$nonopt in
1023 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1024 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1025 esac
1026
1027 test "$host_alias" != "$target_alias" &&
1028   test "$program_prefix$program_suffix$program_transform_name" = \
1029     NONENONEs,x,x, &&
1030   program_prefix=${target_alias}-
1031
1032
1033 # Find a good install program.  We prefer a C program (faster),
1034 # so one script is as good as another.  But avoid the broken or
1035 # incompatible versions:
1036 # SysV /etc/install, /usr/sbin/install
1037 # SunOS /usr/etc/install
1038 # IRIX /sbin/install
1039 # AIX /bin/install
1040 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1041 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1042 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1043 # ./install, which can be erroneously created by make from ./install.sh.
1044 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1045 echo "configure:1046: checking for a BSD compatible install" >&5
1046 if test -z "$INSTALL"; then
1047 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1048   echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1051   for ac_dir in $PATH; do
1052     # Account for people who put trailing slashes in PATH elements.
1053     case "$ac_dir/" in
1054     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1055     *)
1056       # OSF1 and SCO ODT 3.0 have their own names for install.
1057       # Don't use installbsd from OSF since it installs stuff as root
1058       # by default.
1059       for ac_prog in ginstall scoinst install; do
1060         if test -f $ac_dir/$ac_prog; then
1061           if test $ac_prog = install &&
1062             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1063             # AIX install.  It has an incompatible calling convention.
1064             :
1065           elif test $ac_prog = install &&
1066             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1067             # program-specific install script used by HP pwplus--don't use.
1068             :
1069           else
1070             ac_cv_path_install="$ac_dir/$ac_prog -c"
1071             break 2
1072           fi
1073         fi
1074       done
1075       ;;
1076     esac
1077   done
1078   IFS="$ac_save_IFS"
1079
1080 fi
1081   if test "${ac_cv_path_install+set}" = set; then
1082     INSTALL="$ac_cv_path_install"
1083   else
1084     # As a last resort, use the slow shell script.  We don't cache a
1085     # path for INSTALL within a source directory, because that will
1086     # break other packages using the cache if that directory is
1087     # removed, or if the path is relative.
1088     INSTALL="$ac_install_sh"
1089   fi
1090 fi
1091 echo "$ac_t""$INSTALL" 1>&6
1092
1093 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1094 # It thinks the first close brace ends the variable substitution.
1095 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1096
1097 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1098
1099 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1100
1101 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1102 echo "configure:1103: checking whether build environment is sane" >&5
1103 # Just in case
1104 sleep 1
1105 echo timestamp > conftestfile
1106 # Do `set' in a subshell so we don't clobber the current shell's
1107 # arguments.  Must try -L first in case configure is actually a
1108 # symlink; some systems play weird games with the mod time of symlinks
1109 # (eg FreeBSD returns the mod time of the symlink's containing
1110 # directory).
1111 if (
1112    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1113    if test "$*" = "X"; then
1114       # -L didn't work.
1115       set X `ls -t $srcdir/configure conftestfile`
1116    fi
1117    if test "$*" != "X $srcdir/configure conftestfile" \
1118       && test "$*" != "X conftestfile $srcdir/configure"; then
1119
1120       # If neither matched, then we have a broken ls.  This can happen
1121       # if, for instance, CONFIG_SHELL is bash and it inherits a
1122       # broken ls alias from the environment.  This has actually
1123       # happened.  Such a system could not be considered "sane".
1124       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1125 alias in your environment" 1>&2; exit 1; }
1126    fi
1127
1128    test "$2" = conftestfile
1129    )
1130 then
1131    # Ok.
1132    :
1133 else
1134    { echo "configure: error: newly created file is older than distributed files!
1135 Check your system clock" 1>&2; exit 1; }
1136 fi
1137 rm -f conftest*
1138 echo "$ac_t""yes" 1>&6
1139 if test "$program_transform_name" = s,x,x,; then
1140   program_transform_name=
1141 else
1142   # Double any \ or $.  echo might interpret backslashes.
1143   cat <<\EOF_SED > conftestsed
1144 s,\\,\\\\,g; s,\$,$$,g
1145 EOF_SED
1146   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1147   rm -f conftestsed
1148 fi
1149 test "$program_prefix" != NONE &&
1150   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1151 # Use a double $ so make ignores it.
1152 test "$program_suffix" != NONE &&
1153   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1154
1155 # sed with no file args requires a program.
1156 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1157
1158 for ac_prog in mawk gawk nawk awk
1159 do
1160 # Extract the first word of "$ac_prog", so it can be a program name with args.
1161 set dummy $ac_prog; ac_word=$2
1162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1163 echo "configure:1164: checking for $ac_word" >&5
1164 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1165   echo $ac_n "(cached) $ac_c" 1>&6
1166 else
1167   if test -n "$AWK"; then
1168   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1169 else
1170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1171   ac_dummy="$PATH"
1172   for ac_dir in $ac_dummy; do
1173     test -z "$ac_dir" && ac_dir=.
1174     if test -f $ac_dir/$ac_word; then
1175       ac_cv_prog_AWK="$ac_prog"
1176       break
1177     fi
1178   done
1179   IFS="$ac_save_ifs"
1180 fi
1181 fi
1182 AWK="$ac_cv_prog_AWK"
1183 if test -n "$AWK"; then
1184   echo "$ac_t""$AWK" 1>&6
1185 else
1186   echo "$ac_t""no" 1>&6
1187 fi
1188
1189 test -n "$AWK" && break
1190 done
1191
1192 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether ${MAKE-make} sets \${MAKE}" >&5
1194 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1195 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   cat > conftestmake <<\EOF
1199 all:
1200         @echo 'ac_maketemp="${MAKE}"'
1201 EOF
1202 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1203 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1204 if test -n "$ac_maketemp"; then
1205   eval ac_cv_prog_make_${ac_make}_set=yes
1206 else
1207   eval ac_cv_prog_make_${ac_make}_set=no
1208 fi
1209 rm -f conftestmake
1210 fi
1211 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1212   echo "$ac_t""yes" 1>&6
1213   SET_MAKE=
1214 else
1215   echo "$ac_t""no" 1>&6
1216   SET_MAKE="MAKE=${MAKE-make}"
1217 fi
1218
1219
1220
1221 PACKAGE=$OL_PACKAGE
1222
1223 VERSION=$OL_VERSION
1224
1225 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1226   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1227 fi
1228
1229
1230
1231 missing_dir=`cd $ac_aux_dir && pwd`
1232 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1233 echo "configure:1234: checking for working aclocal" >&5
1234 # Run test in a subshell; some versions of sh will print an error if
1235 # an executable is not found, even if stderr is redirected.
1236 # Redirect stdin to placate older versions of autoconf.  Sigh.
1237 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1238    ACLOCAL=aclocal
1239    echo "$ac_t""found" 1>&6
1240 else
1241    ACLOCAL="$missing_dir/missing aclocal"
1242    echo "$ac_t""missing" 1>&6
1243 fi
1244
1245 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1246 echo "configure:1247: checking for working autoconf" >&5
1247 # Run test in a subshell; some versions of sh will print an error if
1248 # an executable is not found, even if stderr is redirected.
1249 # Redirect stdin to placate older versions of autoconf.  Sigh.
1250 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1251    AUTOCONF=autoconf
1252    echo "$ac_t""found" 1>&6
1253 else
1254    AUTOCONF="$missing_dir/missing autoconf"
1255    echo "$ac_t""missing" 1>&6
1256 fi
1257
1258 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1259 echo "configure:1260: checking for working automake" >&5
1260 # Run test in a subshell; some versions of sh will print an error if
1261 # an executable is not found, even if stderr is redirected.
1262 # Redirect stdin to placate older versions of autoconf.  Sigh.
1263 if (automake --version) < /dev/null > /dev/null 2>&1; then
1264    AUTOMAKE=automake
1265    echo "$ac_t""found" 1>&6
1266 else
1267    AUTOMAKE="$missing_dir/missing automake"
1268    echo "$ac_t""missing" 1>&6
1269 fi
1270
1271 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1272 echo "configure:1273: checking for working autoheader" >&5
1273 # Run test in a subshell; some versions of sh will print an error if
1274 # an executable is not found, even if stderr is redirected.
1275 # Redirect stdin to placate older versions of autoconf.  Sigh.
1276 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1277    AUTOHEADER=autoheader
1278    echo "$ac_t""found" 1>&6
1279 else
1280    AUTOHEADER="$missing_dir/missing autoheader"
1281    echo "$ac_t""missing" 1>&6
1282 fi
1283
1284 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1285 echo "configure:1286: checking for working makeinfo" >&5
1286 # Run test in a subshell; some versions of sh will print an error if
1287 # an executable is not found, even if stderr is redirected.
1288 # Redirect stdin to placate older versions of autoconf.  Sigh.
1289 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1290    MAKEINFO=makeinfo
1291    echo "$ac_t""found" 1>&6
1292 else
1293    MAKEINFO="$missing_dir/missing makeinfo"
1294    echo "$ac_t""missing" 1>&6
1295 fi
1296
1297 install_sh="$missing_dir/install-sh"
1298 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1299
1300 for ac_prog in gnutar gtar tar
1301 do
1302 # Extract the first word of "$ac_prog", so it can be a program name with args.
1303 set dummy $ac_prog; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   if test -n "$AMTAR"; then
1310   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1311 else
1312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1313   ac_dummy="$PATH"
1314   for ac_dir in $ac_dummy; do
1315     test -z "$ac_dir" && ac_dir=.
1316     if test -f $ac_dir/$ac_word; then
1317       ac_cv_prog_AMTAR="$ac_prog"
1318       break
1319     fi
1320   done
1321   IFS="$ac_save_ifs"
1322 fi
1323 fi
1324 AMTAR="$ac_cv_prog_AMTAR"
1325 if test -n "$AMTAR"; then
1326   echo "$ac_t""$AMTAR" 1>&6
1327 else
1328   echo "$ac_t""no" 1>&6
1329 fi
1330
1331 test -n "$AMTAR" && break
1332 done
1333
1334
1335 AMTARFLAGS=
1336 if test -n "$AMTAR"; then
1337   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1338         AMTARFLAGS=o
1339   fi
1340 fi
1341
1342 cat >> confdefs.h <<EOF
1343 #define OPENLDAP_PACKAGE "$PACKAGE"
1344 EOF
1345
1346 cat >> confdefs.h <<EOF
1347 #define OPENLDAP_VERSION "$VERSION"
1348 EOF
1349
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION $OL_API_INC
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1361 EOF
1362
1363 cat >> confdefs.h <<EOF
1364 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1365 EOF
1366
1367
1368 OPENLDAP_LIBVERSION=$OL_API_LIB
1369
1370 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1371
1372
1373
1374 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1375 echo "configure:1376: checking configure arguments" >&5
1376
1377
1378 top_builddir=`pwd`
1379
1380 ldap_subdir="/openldap"
1381
1382 # Check whether --with-subdir or --without-subdir was given.
1383 if test "${with_subdir+set}" = set; then
1384   withval="$with_subdir"
1385   case "$withval" in
1386         no) ldap_subdir=""
1387                 ;;
1388         yes)
1389                 ;;
1390         /*|\\*)
1391                 ldap_subdir="$withval"
1392                 ;;
1393         *)
1394                 ldap_subdir="/$withval"
1395                 ;;
1396 esac
1397
1398 fi
1399
1400
1401 # OpenLDAP --enable-debug
1402         # Check whether --enable-debug or --disable-debug was given.
1403 if test "${enable_debug+set}" = set; then
1404   enableval="$enable_debug"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no ; do
1408                 if test "$enableval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1414         fi
1415         ol_enable_debug="$ol_arg"
1416
1417 else
1418         ol_enable_debug="yes"
1419 fi
1420 # end --enable-debug
1421 # OpenLDAP --enable-dynamic
1422         # Check whether --enable-dynamic or --disable-dynamic was given.
1423 if test "${enable_dynamic+set}" = set; then
1424   enableval="$enable_dynamic"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no ; do
1428                 if test "$enableval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1434         fi
1435         ol_enable_dynamic="$ol_arg"
1436
1437 else
1438         ol_enable_dynamic="no"
1439 fi
1440 # end --enable-dynamic
1441 # OpenLDAP --enable-syslog
1442         # Check whether --enable-syslog or --disable-syslog was given.
1443 if test "${enable_syslog+set}" = set; then
1444   enableval="$enable_syslog"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1454         fi
1455         ol_enable_syslog="$ol_arg"
1456
1457 else
1458         ol_enable_syslog="auto"
1459 fi
1460 # end --enable-syslog
1461 # OpenLDAP --enable-proctitle
1462         # Check whether --enable-proctitle or --disable-proctitle was given.
1463 if test "${enable_proctitle+set}" = set; then
1464   enableval="$enable_proctitle"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1474         fi
1475         ol_enable_proctitle="$ol_arg"
1476
1477 else
1478         ol_enable_proctitle="yes"
1479 fi
1480 # end --enable-proctitle
1481 ol_enable_referrals=${ol_enable_referrals-no}
1482 ol_enable_kbind=${ol_enable_kbind-no}
1483 # OpenLDAP --enable-ipv6
1484         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1485 if test "${enable_ipv6+set}" = set; then
1486   enableval="$enable_ipv6"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto yes no ; do
1490                 if test "$enableval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1496         fi
1497         ol_enable_ipv6="$ol_arg"
1498
1499 else
1500         ol_enable_ipv6="auto"
1501 fi
1502 # end --enable-ipv6
1503 # OpenLDAP --enable-local
1504         # Check whether --enable-local or --disable-local was given.
1505 if test "${enable_local+set}" = set; then
1506   enableval="$enable_local"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1516         fi
1517         ol_enable_local="$ol_arg"
1518
1519 else
1520         ol_enable_local="auto"
1521 fi
1522 # end --enable-local
1523 # OpenLDAP --enable-x_compile
1524         # Check whether --enable-x_compile or --disable-x_compile was given.
1525 if test "${enable_x_compile+set}" = set; then
1526   enableval="$enable_x_compile"
1527   
1528         ol_arg=invalid
1529         for ol_val in yes no ; do
1530                 if test "$enableval" = "$ol_val" ; then
1531                         ol_arg="$ol_val"
1532                 fi
1533         done
1534         if test "$ol_arg" = "invalid" ; then
1535                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1536         fi
1537         ol_enable_x_compile="$ol_arg"
1538
1539 else
1540         ol_enable_x_compile="no"
1541 fi
1542 # end --enable-x_compile
1543
1544
1545 # OpenLDAP --with-cyrus_sasl
1546         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1547 if test "${with_cyrus_sasl+set}" = set; then
1548   withval="$with_cyrus_sasl"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1558         fi
1559         ol_with_cyrus_sasl="$ol_arg"
1560
1561 else
1562         ol_with_cyrus_sasl="auto"
1563 fi
1564 # end --with-cyrus_sasl
1565
1566 # OpenLDAP --with-fetch
1567         # Check whether --with-fetch or --without-fetch was given.
1568 if test "${with_fetch+set}" = set; then
1569   withval="$with_fetch"
1570   
1571         ol_arg=invalid
1572         for ol_val in auto yes no  ; do
1573                 if test "$withval" = "$ol_val" ; then
1574                         ol_arg="$ol_val"
1575                 fi
1576         done
1577         if test "$ol_arg" = "invalid" ; then
1578                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1579         fi
1580         ol_with_fetch="$ol_arg"
1581
1582 else
1583         ol_with_fetch="auto"
1584 fi
1585 # end --with-fetch
1586
1587 ol_with_kerberos=${ol_with_kerberos-auto}
1588 # OpenLDAP --with-threads
1589         # Check whether --with-threads or --without-threads was given.
1590 if test "${with_threads+set}" = set; then
1591   withval="$with_threads"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1595                 if test "$withval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1601         fi
1602         ol_with_threads="$ol_arg"
1603
1604 else
1605         ol_with_threads="auto"
1606 fi
1607 # end --with-threads
1608
1609 # OpenLDAP --with-tls
1610         # Check whether --with-tls or --without-tls was given.
1611 if test "${with_tls+set}" = set; then
1612   withval="$with_tls"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto ssleay openssl yes no  ; do
1616                 if test "$withval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1622         fi
1623         ol_with_tls="$ol_arg"
1624
1625 else
1626         ol_with_tls="auto"
1627 fi
1628 # end --with-tls
1629
1630 # OpenLDAP --with-yielding_select
1631         # Check whether --with-yielding_select or --without-yielding_select was given.
1632 if test "${with_yielding_select+set}" = set; then
1633   withval="$with_yielding_select"
1634   
1635         ol_arg=invalid
1636         for ol_val in auto yes no manual  ; do
1637                 if test "$withval" = "$ol_val" ; then
1638                         ol_arg="$ol_val"
1639                 fi
1640         done
1641         if test "$ol_arg" = "invalid" ; then
1642                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1643         fi
1644         ol_with_yielding_select="$ol_arg"
1645
1646 else
1647         ol_with_yielding_select="auto"
1648 fi
1649 # end --with-yielding_select
1650
1651
1652
1653 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1654 if test "${with_xxslapdoptions+set}" = set; then
1655   withval="$with_xxslapdoptions"
1656   :
1657 fi
1658
1659 # OpenLDAP --enable-slapd
1660         # Check whether --enable-slapd or --disable-slapd was given.
1661 if test "${enable_slapd+set}" = set; then
1662   enableval="$enable_slapd"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no ; do
1666                 if test "$enableval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1672         fi
1673         ol_enable_slapd="$ol_arg"
1674
1675 else
1676         ol_enable_slapd="yes"
1677 fi
1678 # end --enable-slapd
1679 # OpenLDAP --enable-aci
1680         # Check whether --enable-aci or --disable-aci was given.
1681 if test "${enable_aci+set}" = set; then
1682   enableval="$enable_aci"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no ; do
1686                 if test "$enableval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1692         fi
1693         ol_enable_aci="$ol_arg"
1694
1695 else
1696         ol_enable_aci="no"
1697 fi
1698 # end --enable-aci
1699 # OpenLDAP --enable-cleartext
1700         # Check whether --enable-cleartext or --disable-cleartext was given.
1701 if test "${enable_cleartext+set}" = set; then
1702   enableval="$enable_cleartext"
1703   
1704         ol_arg=invalid
1705         for ol_val in auto yes no ; do
1706                 if test "$enableval" = "$ol_val" ; then
1707                         ol_arg="$ol_val"
1708                 fi
1709         done
1710         if test "$ol_arg" = "invalid" ; then
1711                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1712         fi
1713         ol_enable_cleartext="$ol_arg"
1714
1715 else
1716         ol_enable_cleartext="yes"
1717 fi
1718 # end --enable-cleartext
1719 # OpenLDAP --enable-crypt
1720         # Check whether --enable-crypt or --disable-crypt was given.
1721 if test "${enable_crypt+set}" = set; then
1722   enableval="$enable_crypt"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1732         fi
1733         ol_enable_crypt="$ol_arg"
1734
1735 else
1736         ol_enable_crypt="no"
1737 fi
1738 # end --enable-crypt
1739 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1740 # OpenLDAP --enable-lmpasswd
1741         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1742 if test "${enable_lmpasswd+set}" = set; then
1743   enableval="$enable_lmpasswd"
1744   
1745         ol_arg=invalid
1746         for ol_val in auto yes no ; do
1747                 if test "$enableval" = "$ol_val" ; then
1748                         ol_arg="$ol_val"
1749                 fi
1750         done
1751         if test "$ol_arg" = "invalid" ; then
1752                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1753         fi
1754         ol_enable_lmpasswd="$ol_arg"
1755
1756 else
1757         ol_enable_lmpasswd="no"
1758 fi
1759 # end --enable-lmpasswd
1760 # OpenLDAP --enable-spasswd
1761         # Check whether --enable-spasswd or --disable-spasswd was given.
1762 if test "${enable_spasswd+set}" = set; then
1763   enableval="$enable_spasswd"
1764   
1765         ol_arg=invalid
1766         for ol_val in auto yes no ; do
1767                 if test "$enableval" = "$ol_val" ; then
1768                         ol_arg="$ol_val"
1769                 fi
1770         done
1771         if test "$ol_arg" = "invalid" ; then
1772                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1773         fi
1774         ol_enable_spasswd="$ol_arg"
1775
1776 else
1777         ol_enable_spasswd="no"
1778 fi
1779 # end --enable-spasswd
1780 # OpenLDAP --enable-modules
1781         # Check whether --enable-modules or --disable-modules was given.
1782 if test "${enable_modules+set}" = set; then
1783   enableval="$enable_modules"
1784   
1785         ol_arg=invalid
1786         for ol_val in auto yes no ; do
1787                 if test "$enableval" = "$ol_val" ; then
1788                         ol_arg="$ol_val"
1789                 fi
1790         done
1791         if test "$ol_arg" = "invalid" ; then
1792                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1793         fi
1794         ol_enable_modules="$ol_arg"
1795
1796 else
1797         ol_enable_modules="no"
1798 fi
1799 # end --enable-modules
1800 ol_enable_multimaster=${ol_enable_multimaster-no}
1801 # OpenLDAP --enable-rewrite
1802         # Check whether --enable-rewrite or --disable-rewrite was given.
1803 if test "${enable_rewrite+set}" = set; then
1804   enableval="$enable_rewrite"
1805   
1806         ol_arg=invalid
1807         for ol_val in auto yes no ; do
1808                 if test "$enableval" = "$ol_val" ; then
1809                         ol_arg="$ol_val"
1810                 fi
1811         done
1812         if test "$ol_arg" = "invalid" ; then
1813                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1814         fi
1815         ol_enable_rewrite="$ol_arg"
1816
1817 else
1818         ol_enable_rewrite="no"
1819 fi
1820 # end --enable-rewrite
1821 # OpenLDAP --enable-rlookups
1822         # Check whether --enable-rlookups or --disable-rlookups was given.
1823 if test "${enable_rlookups+set}" = set; then
1824   enableval="$enable_rlookups"
1825   
1826         ol_arg=invalid
1827         for ol_val in auto yes no ; do
1828                 if test "$enableval" = "$ol_val" ; then
1829                         ol_arg="$ol_val"
1830                 fi
1831         done
1832         if test "$ol_arg" = "invalid" ; then
1833                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1834         fi
1835         ol_enable_rlookups="$ol_arg"
1836
1837 else
1838         ol_enable_rlookups="no"
1839 fi
1840 # end --enable-rlookups
1841 # OpenLDAP --enable-slapi
1842         # Check whether --enable-slapi or --disable-slapi was given.
1843 if test "${enable_slapi+set}" = set; then
1844   enableval="$enable_slapi"
1845   
1846         ol_arg=invalid
1847         for ol_val in auto yes no ; do
1848                 if test "$enableval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1854         fi
1855         ol_enable_slapi="$ol_arg"
1856
1857 else
1858         ol_enable_slapi="no"
1859 fi
1860 # end --enable-slapi
1861 # OpenLDAP --enable-slp
1862         # Check whether --enable-slp or --disable-slp was given.
1863 if test "${enable_slp+set}" = set; then
1864   enableval="$enable_slp"
1865   
1866         ol_arg=invalid
1867         for ol_val in auto yes no ; do
1868                 if test "$enableval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1874         fi
1875         ol_enable_slp="$ol_arg"
1876
1877 else
1878         ol_enable_slp="no"
1879 fi
1880 # end --enable-slp
1881 # OpenLDAP --enable-wrappers
1882         # Check whether --enable-wrappers or --disable-wrappers was given.
1883 if test "${enable_wrappers+set}" = set; then
1884   enableval="$enable_wrappers"
1885   
1886         ol_arg=invalid
1887         for ol_val in auto yes no ; do
1888                 if test "$enableval" = "$ol_val" ; then
1889                         ol_arg="$ol_val"
1890                 fi
1891         done
1892         if test "$ol_arg" = "invalid" ; then
1893                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1894         fi
1895         ol_enable_wrappers="$ol_arg"
1896
1897 else
1898         ol_enable_wrappers="no"
1899 fi
1900 # end --enable-wrappers
1901
1902
1903 # OpenLDAP --enable-bdb
1904         # Check whether --enable-bdb or --disable-bdb was given.
1905 if test "${enable_bdb+set}" = set; then
1906   enableval="$enable_bdb"
1907   
1908         ol_arg=invalid
1909         for ol_val in auto yes no ; do
1910                 if test "$enableval" = "$ol_val" ; then
1911                         ol_arg="$ol_val"
1912                 fi
1913         done
1914         if test "$ol_arg" = "invalid" ; then
1915                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1916         fi
1917         ol_enable_bdb="$ol_arg"
1918
1919 else
1920         ol_enable_bdb="yes"
1921 fi
1922 # end --enable-bdb
1923 # OpenLDAP --with-bdb_module
1924         # Check whether --with-bdb_module or --without-bdb_module was given.
1925 if test "${with_bdb_module+set}" = set; then
1926   withval="$with_bdb_module"
1927   
1928         ol_arg=invalid
1929         for ol_val in static dynamic ; do
1930                 if test "$withval" = "$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 $withval for --with-bdb_module" 1>&2; exit 1; }
1936         fi
1937         ol_with_bdb_module="$ol_arg"
1938
1939 else
1940         ol_with_bdb_module="static"
1941 fi
1942 # end --with-bdb_module
1943
1944 # OpenLDAP --enable-dnssrv
1945         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1946 if test "${enable_dnssrv+set}" = set; then
1947   enableval="$enable_dnssrv"
1948   
1949         ol_arg=invalid
1950         for ol_val in auto yes no ; do
1951                 if test "$enableval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1957         fi
1958         ol_enable_dnssrv="$ol_arg"
1959
1960 else
1961         ol_enable_dnssrv="no"
1962 fi
1963 # end --enable-dnssrv
1964 # OpenLDAP --with-dnssrv_module
1965         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1966 if test "${with_dnssrv_module+set}" = set; then
1967   withval="$with_dnssrv_module"
1968   
1969         ol_arg=invalid
1970         for ol_val in static dynamic ; do
1971                 if test "$withval" = "$ol_val" ; then
1972                         ol_arg="$ol_val"
1973                 fi
1974         done
1975         if test "$ol_arg" = "invalid" ; then
1976                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1977         fi
1978         ol_with_dnssrv_module="$ol_arg"
1979
1980 else
1981         ol_with_dnssrv_module="static"
1982 fi
1983 # end --with-dnssrv_module
1984
1985 # OpenLDAP --enable-hdb
1986         # Check whether --enable-hdb or --disable-hdb was given.
1987 if test "${enable_hdb+set}" = set; then
1988   enableval="$enable_hdb"
1989   
1990         ol_arg=invalid
1991         for ol_val in auto yes no ; do
1992                 if test "$enableval" = "$ol_val" ; then
1993                         ol_arg="$ol_val"
1994                 fi
1995         done
1996         if test "$ol_arg" = "invalid" ; then
1997                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1998         fi
1999         ol_enable_hdb="$ol_arg"
2000
2001 else
2002         ol_enable_hdb="no"
2003 fi
2004 # end --enable-hdb
2005 # OpenLDAP --with-hdb_module
2006         # Check whether --with-hdb_module or --without-hdb_module was given.
2007 if test "${with_hdb_module+set}" = set; then
2008   withval="$with_hdb_module"
2009   
2010         ol_arg=invalid
2011         for ol_val in static dynamic ; do
2012                 if test "$withval" = "$ol_val" ; then
2013                         ol_arg="$ol_val"
2014                 fi
2015         done
2016         if test "$ol_arg" = "invalid" ; then
2017                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2018         fi
2019         ol_with_hdb_module="$ol_arg"
2020
2021 else
2022         ol_with_hdb_module="static"
2023 fi
2024 # end --with-hdb_module
2025
2026 # OpenLDAP --enable-ldap
2027         # Check whether --enable-ldap or --disable-ldap was given.
2028 if test "${enable_ldap+set}" = set; then
2029   enableval="$enable_ldap"
2030   
2031         ol_arg=invalid
2032         for ol_val in auto yes no ; do
2033                 if test "$enableval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2039         fi
2040         ol_enable_ldap="$ol_arg"
2041
2042 else
2043         ol_enable_ldap="no"
2044 fi
2045 # end --enable-ldap
2046 # OpenLDAP --with-ldap_module
2047         # Check whether --with-ldap_module or --without-ldap_module was given.
2048 if test "${with_ldap_module+set}" = set; then
2049   withval="$with_ldap_module"
2050   
2051         ol_arg=invalid
2052         for ol_val in static dynamic ; do
2053                 if test "$withval" = "$ol_val" ; then
2054                         ol_arg="$ol_val"
2055                 fi
2056         done
2057         if test "$ol_arg" = "invalid" ; then
2058                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2059         fi
2060         ol_with_ldap_module="$ol_arg"
2061
2062 else
2063         ol_with_ldap_module="static"
2064 fi
2065 # end --with-ldap_module
2066
2067 # OpenLDAP --enable-ldbm
2068         # Check whether --enable-ldbm or --disable-ldbm was given.
2069 if test "${enable_ldbm+set}" = set; then
2070   enableval="$enable_ldbm"
2071   
2072         ol_arg=invalid
2073         for ol_val in auto yes no ; do
2074                 if test "$enableval" = "$ol_val" ; then
2075                         ol_arg="$ol_val"
2076                 fi
2077         done
2078         if test "$ol_arg" = "invalid" ; then
2079                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2080         fi
2081         ol_enable_ldbm="$ol_arg"
2082
2083 else
2084         ol_enable_ldbm="no"
2085 fi
2086 # end --enable-ldbm
2087 # OpenLDAP --with-ldbm_api
2088         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2089 if test "${with_ldbm_api+set}" = set; then
2090   withval="$with_ldbm_api"
2091   
2092         ol_arg=invalid
2093         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2094                 if test "$withval" = "$ol_val" ; then
2095                         ol_arg="$ol_val"
2096                 fi
2097         done
2098         if test "$ol_arg" = "invalid" ; then
2099                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2100         fi
2101         ol_with_ldbm_api="$ol_arg"
2102
2103 else
2104         ol_with_ldbm_api="auto"
2105 fi
2106 # end --with-ldbm_api
2107
2108 # OpenLDAP --with-ldbm_module
2109         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2110 if test "${with_ldbm_module+set}" = set; then
2111   withval="$with_ldbm_module"
2112   
2113         ol_arg=invalid
2114         for ol_val in static dynamic ; do
2115                 if test "$withval" = "$ol_val" ; then
2116                         ol_arg="$ol_val"
2117                 fi
2118         done
2119         if test "$ol_arg" = "invalid" ; then
2120                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2121         fi
2122         ol_with_ldbm_module="$ol_arg"
2123
2124 else
2125         ol_with_ldbm_module="static"
2126 fi
2127 # end --with-ldbm_module
2128
2129 # OpenLDAP --with-ldbm_type
2130         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2131 if test "${with_ldbm_type+set}" = set; then
2132   withval="$with_ldbm_type"
2133   
2134         ol_arg=invalid
2135         for ol_val in auto btree hash ; do
2136                 if test "$withval" = "$ol_val" ; then
2137                         ol_arg="$ol_val"
2138                 fi
2139         done
2140         if test "$ol_arg" = "invalid" ; then
2141                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2142         fi
2143         ol_with_ldbm_type="$ol_arg"
2144
2145 else
2146         ol_with_ldbm_type="auto"
2147 fi
2148 # end --with-ldbm_type
2149
2150 # OpenLDAP --enable-meta
2151         # Check whether --enable-meta or --disable-meta was given.
2152 if test "${enable_meta+set}" = set; then
2153   enableval="$enable_meta"
2154   
2155         ol_arg=invalid
2156         for ol_val in auto yes no ; do
2157                 if test "$enableval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2163         fi
2164         ol_enable_meta="$ol_arg"
2165
2166 else
2167         ol_enable_meta="no"
2168 fi
2169 # end --enable-meta
2170 # OpenLDAP --with-meta_module
2171         # Check whether --with-meta_module or --without-meta_module was given.
2172 if test "${with_meta_module+set}" = set; then
2173   withval="$with_meta_module"
2174   
2175         ol_arg=invalid
2176         for ol_val in static dynamic ; do
2177                 if test "$withval" = "$ol_val" ; then
2178                         ol_arg="$ol_val"
2179                 fi
2180         done
2181         if test "$ol_arg" = "invalid" ; then
2182                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2183         fi
2184         ol_with_meta_module="$ol_arg"
2185
2186 else
2187         ol_with_meta_module="static"
2188 fi
2189 # end --with-meta_module
2190
2191 # OpenLDAP --enable-monitor
2192         # Check whether --enable-monitor or --disable-monitor was given.
2193 if test "${enable_monitor+set}" = set; then
2194   enableval="$enable_monitor"
2195   
2196         ol_arg=invalid
2197         for ol_val in auto yes no ; do
2198                 if test "$enableval" = "$ol_val" ; then
2199                         ol_arg="$ol_val"
2200                 fi
2201         done
2202         if test "$ol_arg" = "invalid" ; then
2203                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2204         fi
2205         ol_enable_monitor="$ol_arg"
2206
2207 else
2208         ol_enable_monitor="yes"
2209 fi
2210 # end --enable-monitor
2211 # OpenLDAP --with-monitor_module
2212         # Check whether --with-monitor_module or --without-monitor_module was given.
2213 if test "${with_monitor_module+set}" = set; then
2214   withval="$with_monitor_module"
2215   
2216         ol_arg=invalid
2217         for ol_val in static dynamic ; do
2218                 if test "$withval" = "$ol_val" ; then
2219                         ol_arg="$ol_val"
2220                 fi
2221         done
2222         if test "$ol_arg" = "invalid" ; then
2223                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2224         fi
2225         ol_with_monitor_module="$ol_arg"
2226
2227 else
2228         ol_with_monitor_module="static"
2229 fi
2230 # end --with-monitor_module
2231
2232 # OpenLDAP --enable-null
2233         # Check whether --enable-null or --disable-null was given.
2234 if test "${enable_null+set}" = set; then
2235   enableval="$enable_null"
2236   
2237         ol_arg=invalid
2238         for ol_val in auto yes no ; do
2239                 if test "$enableval" = "$ol_val" ; then
2240                         ol_arg="$ol_val"
2241                 fi
2242         done
2243         if test "$ol_arg" = "invalid" ; then
2244                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2245         fi
2246         ol_enable_null="$ol_arg"
2247
2248 else
2249         ol_enable_null="no"
2250 fi
2251 # end --enable-null
2252 # OpenLDAP --with-null_module
2253         # Check whether --with-null_module or --without-null_module was given.
2254 if test "${with_null_module+set}" = set; then
2255   withval="$with_null_module"
2256   
2257         ol_arg=invalid
2258         for ol_val in static dynamic ; do
2259                 if test "$withval" = "$ol_val" ; then
2260                         ol_arg="$ol_val"
2261                 fi
2262         done
2263         if test "$ol_arg" = "invalid" ; then
2264                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2265         fi
2266         ol_with_null_module="$ol_arg"
2267
2268 else
2269         ol_with_null_module="static"
2270 fi
2271 # end --with-null_module
2272
2273 # OpenLDAP --enable-passwd
2274         # Check whether --enable-passwd or --disable-passwd was given.
2275 if test "${enable_passwd+set}" = set; then
2276   enableval="$enable_passwd"
2277   
2278         ol_arg=invalid
2279         for ol_val in auto yes no ; do
2280                 if test "$enableval" = "$ol_val" ; then
2281                         ol_arg="$ol_val"
2282                 fi
2283         done
2284         if test "$ol_arg" = "invalid" ; then
2285                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2286         fi
2287         ol_enable_passwd="$ol_arg"
2288
2289 else
2290         ol_enable_passwd="no"
2291 fi
2292 # end --enable-passwd
2293 # OpenLDAP --with-passwd_module
2294         # Check whether --with-passwd_module or --without-passwd_module was given.
2295 if test "${with_passwd_module+set}" = set; then
2296   withval="$with_passwd_module"
2297   
2298         ol_arg=invalid
2299         for ol_val in static dynamic ; do
2300                 if test "$withval" = "$ol_val" ; then
2301                         ol_arg="$ol_val"
2302                 fi
2303         done
2304         if test "$ol_arg" = "invalid" ; then
2305                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2306         fi
2307         ol_with_passwd_module="$ol_arg"
2308
2309 else
2310         ol_with_passwd_module="static"
2311 fi
2312 # end --with-passwd_module
2313
2314 # OpenLDAP --enable-perl
2315         # Check whether --enable-perl or --disable-perl was given.
2316 if test "${enable_perl+set}" = set; then
2317   enableval="$enable_perl"
2318   
2319         ol_arg=invalid
2320         for ol_val in auto yes no ; do
2321                 if test "$enableval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2327         fi
2328         ol_enable_perl="$ol_arg"
2329
2330 else
2331         ol_enable_perl="no"
2332 fi
2333 # end --enable-perl
2334 # OpenLDAP --with-perl_module
2335         # Check whether --with-perl_module or --without-perl_module was given.
2336 if test "${with_perl_module+set}" = set; then
2337   withval="$with_perl_module"
2338   
2339         ol_arg=invalid
2340         for ol_val in static dynamic ; do
2341                 if test "$withval" = "$ol_val" ; then
2342                         ol_arg="$ol_val"
2343                 fi
2344         done
2345         if test "$ol_arg" = "invalid" ; then
2346                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2347         fi
2348         ol_with_perl_module="$ol_arg"
2349
2350 else
2351         ol_with_perl_module="static"
2352 fi
2353 # end --with-perl_module
2354
2355 # OpenLDAP --enable-shell
2356         # Check whether --enable-shell or --disable-shell was given.
2357 if test "${enable_shell+set}" = set; then
2358   enableval="$enable_shell"
2359   
2360         ol_arg=invalid
2361         for ol_val in auto yes no ; do
2362                 if test "$enableval" = "$ol_val" ; then
2363                         ol_arg="$ol_val"
2364                 fi
2365         done
2366         if test "$ol_arg" = "invalid" ; then
2367                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2368         fi
2369         ol_enable_shell="$ol_arg"
2370
2371 else
2372         ol_enable_shell="no"
2373 fi
2374 # end --enable-shell
2375 # OpenLDAP --with-shell_module
2376         # Check whether --with-shell_module or --without-shell_module was given.
2377 if test "${with_shell_module+set}" = set; then
2378   withval="$with_shell_module"
2379   
2380         ol_arg=invalid
2381         for ol_val in static dynamic ; do
2382                 if test "$withval" = "$ol_val" ; then
2383                         ol_arg="$ol_val"
2384                 fi
2385         done
2386         if test "$ol_arg" = "invalid" ; then
2387                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2388         fi
2389         ol_with_shell_module="$ol_arg"
2390
2391 else
2392         ol_with_shell_module="static"
2393 fi
2394 # end --with-shell_module
2395
2396 # OpenLDAP --enable-sql
2397         # Check whether --enable-sql or --disable-sql was given.
2398 if test "${enable_sql+set}" = set; then
2399   enableval="$enable_sql"
2400   
2401         ol_arg=invalid
2402         for ol_val in auto yes no ; do
2403                 if test "$enableval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2409         fi
2410         ol_enable_sql="$ol_arg"
2411
2412 else
2413         ol_enable_sql="no"
2414 fi
2415 # end --enable-sql
2416 # OpenLDAP --with-sql_module
2417         # Check whether --with-sql_module or --without-sql_module was given.
2418 if test "${with_sql_module+set}" = set; then
2419   withval="$with_sql_module"
2420   
2421         ol_arg=invalid
2422         for ol_val in static dynamic ; do
2423                 if test "$withval" = "$ol_val" ; then
2424                         ol_arg="$ol_val"
2425                 fi
2426         done
2427         if test "$ol_arg" = "invalid" ; then
2428                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2429         fi
2430         ol_with_sql_module="$ol_arg"
2431
2432 else
2433         ol_with_sql_module="static"
2434 fi
2435 # end --with-sql_module
2436
2437
2438 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2439 if test "${with_xxslapoverlays+set}" = set; then
2440   withval="$with_xxslapoverlays"
2441   :
2442 fi
2443
2444 # OpenLDAP --with-dyngroup
2445         # Check whether --with-dyngroup or --without-dyngroup was given.
2446 if test "${with_dyngroup+set}" = set; then
2447   withval="$with_dyngroup"
2448   
2449         ol_arg=invalid
2450         for ol_val in no yes mod ; do
2451                 if test "$withval" = "$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 $withval for --with-dyngroup" 1>&2; exit 1; }
2457         fi
2458         ol_with_dyngroup="$ol_arg"
2459
2460 else
2461         ol_with_dyngroup="no"
2462 fi
2463 # end --with-dyngroup
2464
2465 # OpenLDAP --with-proxycache
2466         # Check whether --with-proxycache or --without-proxycache was given.
2467 if test "${with_proxycache+set}" = set; then
2468   withval="$with_proxycache"
2469   
2470         ol_arg=invalid
2471         for ol_val in no yes mod ; do
2472                 if test "$withval" = "$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 $withval for --with-proxycache" 1>&2; exit 1; }
2478         fi
2479         ol_with_proxycache="$ol_arg"
2480
2481 else
2482         ol_with_proxycache="no"
2483 fi
2484 # end --with-proxycache
2485
2486
2487 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2488 if test "${with_xxslurpdoptions+set}" = set; then
2489   withval="$with_xxslurpdoptions"
2490   :
2491 fi
2492
2493 # OpenLDAP --enable-slurpd
2494         # Check whether --enable-slurpd or --disable-slurpd was given.
2495 if test "${enable_slurpd+set}" = set; then
2496   enableval="$enable_slurpd"
2497   
2498         ol_arg=invalid
2499         for ol_val in auto yes no ; do
2500                 if test "$enableval" = "$ol_val" ; then
2501                         ol_arg="$ol_val"
2502                 fi
2503         done
2504         if test "$ol_arg" = "invalid" ; then
2505                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2506         fi
2507         ol_enable_slurpd="$ol_arg"
2508
2509 else
2510         ol_enable_slurpd="auto"
2511 fi
2512 # end --enable-slurpd
2513
2514 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2515 if test "${with_xxliboptions+set}" = set; then
2516   withval="$with_xxliboptions"
2517   :
2518 fi
2519
2520 # Check whether --enable-static or --disable-static was given.
2521 if test "${enable_static+set}" = set; then
2522   enableval="$enable_static"
2523   p=${PACKAGE-default}
2524 case $enableval in
2525 yes) enable_static=yes ;;
2526 no) enable_static=no ;;
2527 *)
2528   enable_static=no
2529   # Look at the argument we got.  We use all the common list separators.
2530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2531   for pkg in $enableval; do
2532     if test "X$pkg" = "X$p"; then
2533       enable_static=yes
2534     fi
2535   done
2536   IFS="$ac_save_ifs"
2537   ;;
2538 esac
2539 else
2540   enable_static=yes
2541 fi
2542
2543 # Check whether --enable-shared or --disable-shared was given.
2544 if test "${enable_shared+set}" = set; then
2545   enableval="$enable_shared"
2546   p=${PACKAGE-default}
2547 case $enableval in
2548 yes) enable_shared=yes ;;
2549 no) enable_shared=no ;;
2550 *)
2551   enable_shared=no
2552   # Look at the argument we got.  We use all the common list separators.
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2554   for pkg in $enableval; do
2555     if test "X$pkg" = "X$p"; then
2556       enable_shared=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_shared=yes
2564 fi
2565
2566
2567
2568 # validate options
2569 if test $ol_enable_slapd = no ; then
2570                 if test $ol_enable_slapi = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2572         fi
2573         if test $ol_enable_bdb = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2575         fi
2576         if test $ol_enable_dnssrv = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2578         fi
2579         if test $ol_enable_hdb = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2581         fi
2582         if test $ol_enable_ldap = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2584         fi
2585         if test $ol_enable_ldbm = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2587         fi
2588         if test $ol_enable_meta = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2590         fi
2591         if test $ol_enable_monitor = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2593         fi
2594         if test $ol_enable_null = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2596         fi
2597         if test $ol_enable_passwd = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2599         fi
2600         if test $ol_enable_perl = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2602         fi
2603         if test $ol_enable_shell = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2605         fi
2606         if test $ol_enable_sql = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2608         fi
2609         if test $ol_enable_modules = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2611         fi
2612         if test $ol_enable_multimaster = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2614         fi
2615         if test $ol_enable_wrappers = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2617         fi
2618         if test $ol_enable_rlookups = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2620         fi
2621         if test $ol_enable_aci = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2623         fi
2624         if test $ol_with_ldbm_api != auto ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2626         fi
2627         if test $ol_with_ldbm_type != auto ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2629         fi
2630         if test $ol_with_bdb_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2632         fi
2633         if test $ol_with_dnssrv_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2635         fi
2636         if test $ol_with_hdb_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2638         fi
2639         if test $ol_with_ldap_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2641         fi
2642         if test $ol_with_ldbm_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2644         fi
2645         if test $ol_with_meta_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2647         fi
2648         if test $ol_with_monitor_module != static ; then
2649                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2650         fi
2651         if test $ol_with_null_module != static ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2653         fi
2654         if test $ol_with_passwd_module != static ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2656         fi
2657         if test $ol_with_perl_module != static ; then
2658                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2659         fi
2660         if test $ol_with_shell_module != static ; then
2661                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2662         fi
2663         if test $ol_with_sql_module != static ; then
2664                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2665         fi
2666         if test $ol_enable_slurpd = yes ; then
2667                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2668         fi
2669         if test $ol_enable_rewrite = yes ; then
2670                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2671         fi
2672         if test $ol_with_dyngroup != no ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2674         fi
2675         if test $ol_with_proxycache != no ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2677         fi
2678
2679         # force settings to no
2680         ol_enable_slapi=no
2681         ol_enable_bdb=no
2682         ol_enable_dnssrv=no
2683         ol_enable_hdb=no
2684         ol_enable_ldap=no
2685         ol_enable_ldbm=no
2686         ol_enable_meta=no
2687         ol_enable_monitor=no
2688         ol_enable_null=no
2689         ol_enable_passwd=no
2690         ol_enable_perl=no
2691         ol_enable_shell=no
2692         ol_enable_sql=no
2693
2694         ol_enable_modules=no
2695         ol_enable_multimaster=no
2696         ol_enable_rlookups=no
2697         ol_enable_aci=no
2698         ol_enable_wrappers=no
2699
2700         ol_with_ldbm_api=no
2701         ol_with_ldbm_type=no
2702
2703         ol_with_bdb_module=static
2704         ol_with_dnssrv_module=static
2705         ol_with_hdb_module=static
2706         ol_with_ldap_module=static
2707         ol_with_ldbm_module=static
2708         ol_with_meta_module=static
2709         ol_with_monitor_module=static
2710         ol_with_null_module=static
2711         ol_with_passwd_module=static
2712         ol_with_perl_module=static
2713         ol_with_shell_module=static
2714         ol_with_sql_module=static
2715
2716         ol_enable_slurpd=no
2717
2718         ol_enable_rewrite=no
2719
2720         ol_with_dyngroup=no
2721         ol_with_proxycache=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_with_ldbm_module != static ; then
2734                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2735         fi
2736
2737         if test $ol_enable_modules != yes -a \
2738                 $ol_enable_bdb = no -a \
2739                 $ol_enable_dnssrv = no -a \
2740                 $ol_enable_hdb = no -a \
2741                 $ol_enable_ldap = no -a \
2742                 $ol_enable_meta = no -a \
2743                 $ol_enable_monitor = no -a \
2744                 $ol_enable_null = no -a \
2745                 $ol_enable_passwd = no -a \
2746                 $ol_enable_perl = no -a \
2747                 $ol_enable_shell = no -a \
2748                 $ol_enable_sql = no ; then
2749
2750                 if test $ol_enable_slapd = yes ; then
2751                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2752                 else
2753                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2754                         ol_enable_slapd=no
2755                 fi
2756         fi
2757
2758         ol_with_ldbm_api=no
2759         ol_with_ldbm_type=no
2760         ol_with_ldbm_module=static
2761
2762         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2763                 ol_with_ldbm_api=berkeley
2764         fi
2765
2766 else
2767                 if test $ol_with_ldbm_api = gdbm -a \
2768                 $ol_with_ldbm_type = btree ; then
2769                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2770         fi
2771         if test $ol_with_ldbm_api = mdbm -a \
2772                 $ol_with_ldbm_type = btree ; then
2773                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2774         fi
2775         if test $ol_with_ldbm_api = ndbm -a \
2776                 $ol_with_ldbm_type = btree ; then
2777                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2778         fi
2779
2780         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2781                 if test $ol_with_ldbm_api = auto ; then
2782                         ol_with_ldbm_api=berkeley
2783                 elif test $ol_with_ldbm_api != berkeley ; then
2784                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2785                 fi
2786
2787         elif test $ol_enable_bdb = auto ; then
2788                 if test $ol_with_ldbm_api != berkeley \
2789                         -o $ol_with_ldbm_api != auto ; then
2790                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2791                         ol_enable_bdb=no
2792                 fi
2793         fi
2794 fi
2795
2796 if test $ol_enable_slurpd = yes ; then
2797                 if test $ol_with_threads = no ; then
2798                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2799         fi
2800 fi
2801
2802 if test $ol_enable_lmpasswd = yes ; then
2803         if test $ol_with_tls = no ; then
2804                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2805         fi
2806 fi
2807
2808 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2809         if test $ol_with_kerberos = no ; then
2810                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2811         elif test $ol_with_kerberos = auto ; then
2812                 ol_with_kerberos=yes
2813         fi
2814
2815 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2816         if test $ol_with_kerberos = auto ; then
2817                 ol_with_kerberos=no
2818         elif test $ol_with_kerberos != no ; then
2819                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2820                 ol_with_kerberos=no
2821         fi
2822 fi
2823
2824 if test $ol_enable_spasswd = yes ; then
2825         if test $ol_with_cyrus_sasl = no ; then
2826                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2827         fi
2828         ol_with_cyrus_sasl=yes
2829 fi
2830
2831 echo "$ac_t""done" 1>&6
2832
2833 LDAP_LIBS=
2834 LDBM_LIBS=
2835 LTHREAD_LIBS=
2836 LUTIL_LIBS=
2837
2838 SLAPD_LIBS=
2839 SLURPD_LIBS=
2840
2841 BUILD_SLAPD=no
2842 BUILD_SLURPD=no
2843
2844 BUILD_THREAD=no
2845
2846 BUILD_SLAPI=no
2847 SLAPD_SLAPI_DEPEND=
2848
2849 BUILD_BDB=no
2850 BUILD_DNSSRV=no
2851 BUILD_HDB=no
2852 BUILD_LDAP=no
2853 BUILD_LDBM=no
2854 BUILD_META=no
2855 BUILD_MONITOR=no
2856 BUILD_NULL=no
2857 BUILD_PASSWD=no
2858 BUILD_PERL=no
2859 BUILD_SHELL=no
2860 BUILD_SQL=no
2861
2862 BUILD_BDB_DYNAMIC=static
2863 BUILD_DNSSRV_DYNAMIC=static
2864 BUILD_HDB_DYNAMIC=static
2865 BUILD_LDAP_DYNAMIC=static
2866 BUILD_LDBM_DYNAMIC=static
2867 BUILD_META_DYNAMIC=static
2868 BUILD_MONITOR_DYNAMIC=static
2869 BUILD_NULL_DYNAMIC=static
2870 BUILD_PASSWD_DYNAMIC=static
2871 BUILD_PERL_DYNAMIC=static
2872 BUILD_SHELL_DYNAMIC=static
2873 BUILD_SQL_DYNAMIC=static
2874
2875 BUILD_DYNGROUP=no
2876 BUILD_PROXYCACHE=no
2877
2878 SLAPD_DYNAMIC_OVERLAYS=
2879
2880 SLAPD_MODULES_LDFLAGS=
2881 SLAPD_MODULES_CPPFLAGS=
2882
2883 SLAPD_STATIC_BACKENDS=
2884 SLAPD_DYNAMIC_BACKENDS=
2885
2886 SLAPD_PERL_LDFLAGS=
2887 MOD_PERL_LDFLAGS=
2888 PERL_CPPFLAGS=
2889
2890 SLAPD_SQL_LDFLAGS=
2891 SLAPD_SQL_LIBS=
2892 SLAPD_SQL_INCLUDES=
2893
2894 KRB4_LIBS=
2895 KRB5_LIBS=
2896 SASL_LIBS=
2897 TLS_LIBS=
2898 MODULES_LIBS=
2899 SLAPI_LIBS=
2900 LIBSLAPI=
2901 LIBSLAPITOOLS=
2902 AUTH_LIBS=
2903
2904 SLAPD_SLP_LIBS=
2905
2906
2907 # Find a good install program.  We prefer a C program (faster),
2908 # so one script is as good as another.  But avoid the broken or
2909 # incompatible versions:
2910 # SysV /etc/install, /usr/sbin/install
2911 # SunOS /usr/etc/install
2912 # IRIX /sbin/install
2913 # AIX /bin/install
2914 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2915 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2916 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2917 # ./install, which can be erroneously created by make from ./install.sh.
2918 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2919 echo "configure:2920: checking for a BSD compatible install" >&5
2920 if test -z "$INSTALL"; then
2921 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2922   echo $ac_n "(cached) $ac_c" 1>&6
2923 else
2924     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2925   for ac_dir in $PATH; do
2926     # Account for people who put trailing slashes in PATH elements.
2927     case "$ac_dir/" in
2928     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2929     *)
2930       # OSF1 and SCO ODT 3.0 have their own names for install.
2931       # Don't use installbsd from OSF since it installs stuff as root
2932       # by default.
2933       for ac_prog in ginstall scoinst install; do
2934         if test -f $ac_dir/$ac_prog; then
2935           if test $ac_prog = install &&
2936             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2937             # AIX install.  It has an incompatible calling convention.
2938             :
2939           elif test $ac_prog = install &&
2940             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2941             # program-specific install script used by HP pwplus--don't use.
2942             :
2943           else
2944             ac_cv_path_install="$ac_dir/$ac_prog -c"
2945             break 2
2946           fi
2947         fi
2948       done
2949       ;;
2950     esac
2951   done
2952   IFS="$ac_save_IFS"
2953
2954 fi
2955   if test "${ac_cv_path_install+set}" = set; then
2956     INSTALL="$ac_cv_path_install"
2957   else
2958     # As a last resort, use the slow shell script.  We don't cache a
2959     # path for INSTALL within a source directory, because that will
2960     # break other packages using the cache if that directory is
2961     # removed, or if the path is relative.
2962     INSTALL="$ac_install_sh"
2963   fi
2964 fi
2965 echo "$ac_t""$INSTALL" 1>&6
2966
2967 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2968 # It thinks the first close brace ends the variable substitution.
2969 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2970
2971 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2972
2973 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2974
2975
2976 cat >> confdefs.h <<\EOF
2977 #define HAVE_MKVERSION 1
2978 EOF
2979
2980
2981
2982
2983 ol_aix_threads=no
2984 case "$target" in
2985 *-*-aix*)       if test -z "$CC" ; then
2986                 case "$ol_with_threads" in
2987                 auto | yes |  posix) ol_aix_threads=yes ;;
2988                 esac
2989         fi
2990 ;;
2991 esac
2992
2993 if test $ol_aix_threads = yes ; then
2994         if test -z "${CC}" ; then
2995                 for ac_prog in cc_r xlc_r cc
2996 do
2997 # Extract the first word of "$ac_prog", so it can be a program name with args.
2998 set dummy $ac_prog; ac_word=$2
2999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3000 echo "configure:3001: checking for $ac_word" >&5
3001 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3002   echo $ac_n "(cached) $ac_c" 1>&6
3003 else
3004   if test -n "$CC"; then
3005   ac_cv_prog_CC="$CC" # Let the user override the test.
3006 else
3007   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3008   ac_dummy="$PATH"
3009   for ac_dir in $ac_dummy; do
3010     test -z "$ac_dir" && ac_dir=.
3011     if test -f $ac_dir/$ac_word; then
3012       ac_cv_prog_CC="$ac_prog"
3013       break
3014     fi
3015   done
3016   IFS="$ac_save_ifs"
3017 fi
3018 fi
3019 CC="$ac_cv_prog_CC"
3020 if test -n "$CC"; then
3021   echo "$ac_t""$CC" 1>&6
3022 else
3023   echo "$ac_t""no" 1>&6
3024 fi
3025
3026 test -n "$CC" && break
3027 done
3028
3029
3030                 if test "$CC" = cc ; then
3031                                                 if test $ol_with_threads != auto ; then
3032                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3033                         else
3034                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3035                         fi
3036                         ol_with_threads=no
3037                 fi
3038         fi
3039
3040         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3041                 ol_with_threads=posix
3042                 ol_cv_pthread_create=yes
3043         fi
3044 fi
3045
3046 if test -z "${CC}"; then
3047         for ac_prog in cc gcc
3048 do
3049 # Extract the first word of "$ac_prog", so it can be a program name with args.
3050 set dummy $ac_prog; ac_word=$2
3051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3052 echo "configure:3053: checking for $ac_word" >&5
3053 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3054   echo $ac_n "(cached) $ac_c" 1>&6
3055 else
3056   if test -n "$CC"; then
3057   ac_cv_prog_CC="$CC" # Let the user override the test.
3058 else
3059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3060   ac_dummy="$PATH"
3061   for ac_dir in $ac_dummy; do
3062     test -z "$ac_dir" && ac_dir=.
3063     if test -f $ac_dir/$ac_word; then
3064       ac_cv_prog_CC="$ac_prog"
3065       break
3066     fi
3067   done
3068   IFS="$ac_save_ifs"
3069 fi
3070 fi
3071 CC="$ac_cv_prog_CC"
3072 if test -n "$CC"; then
3073   echo "$ac_t""$CC" 1>&6
3074 else
3075   echo "$ac_t""no" 1>&6
3076 fi
3077
3078 test -n "$CC" && break
3079 done
3080 test -n "$CC" || CC="missing"
3081
3082
3083         if test "${CC}" = "missing" ; then
3084                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3085         fi
3086 fi
3087
3088 if test -z "${AR}"; then
3089         for ac_prog in ar gar
3090 do
3091 # Extract the first word of "$ac_prog", so it can be a program name with args.
3092 set dummy $ac_prog; ac_word=$2
3093 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3094 echo "configure:3095: checking for $ac_word" >&5
3095 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   if test -n "$AR"; then
3099   ac_cv_prog_AR="$AR" # Let the user override the test.
3100 else
3101   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3102   ac_dummy="$PATH"
3103   for ac_dir in $ac_dummy; do
3104     test -z "$ac_dir" && ac_dir=.
3105     if test -f $ac_dir/$ac_word; then
3106       ac_cv_prog_AR="$ac_prog"
3107       break
3108     fi
3109   done
3110   IFS="$ac_save_ifs"
3111 fi
3112 fi
3113 AR="$ac_cv_prog_AR"
3114 if test -n "$AR"; then
3115   echo "$ac_t""$AR" 1>&6
3116 else
3117   echo "$ac_t""no" 1>&6
3118 fi
3119
3120 test -n "$AR" && break
3121 done
3122 test -n "$AR" || AR="missing"
3123
3124
3125         if test "${AR}" = "missing" ; then
3126                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3127         fi
3128 fi
3129
3130
3131
3132 # Find the correct PATH separator.  Usually this is `:', but
3133 # DJGPP uses `;' like DOS.
3134 if test "X${PATH_SEPARATOR+set}" != Xset; then
3135   UNAME=${UNAME-`uname 2>/dev/null`}
3136   case X$UNAME in
3137     *-DOS) lt_cv_sys_path_separator=';' ;;
3138     *)     lt_cv_sys_path_separator=':' ;;
3139   esac
3140   PATH_SEPARATOR=$lt_cv_sys_path_separator
3141 fi
3142
3143 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3144 echo "configure:3145: checking for Cygwin environment" >&5
3145 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151
3152 int main() {
3153
3154 #ifndef __CYGWIN__
3155 #define __CYGWIN__ __CYGWIN32__
3156 #endif
3157 return __CYGWIN__;
3158 ; return 0; }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3161   rm -rf conftest*
3162   ac_cv_cygwin=yes
3163 else
3164   echo "configure: failed program was:" >&5
3165   cat conftest.$ac_ext >&5
3166   rm -rf conftest*
3167   ac_cv_cygwin=no
3168 fi
3169 rm -f conftest*
3170 fi
3171
3172 echo "$ac_t""$ac_cv_cygwin" 1>&6
3173 CYGWIN=
3174 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3175 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3176 echo "configure:3177: checking for mingw32 environment" >&5
3177 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185 return __MINGW32__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_mingw32=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_mingw32=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_mingw32" 1>&6
3201 MINGW32=
3202 test "$ac_cv_mingw32" = yes && MINGW32=yes
3203 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for EMX OS/2 environment" >&5
3205 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __EMX__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_emxos2=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_emxos2=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_emxos2" 1>&6
3229 EMXOS2=
3230 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3231 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3232 echo "configure:3233: checking how to run the C preprocessor" >&5
3233 # On Suns, sometimes $CPP names a directory.
3234 if test -n "$CPP" && test -d "$CPP"; then
3235   CPP=
3236 fi
3237 if test -z "$CPP"; then
3238 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3239   echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241     # This must be in double quotes, not single quotes, because CPP may get
3242   # substituted into the Makefile and "${CC-cc}" will confuse make.
3243   CPP="${CC-cc} -E"
3244   # On the NeXT, cc -E runs the code through the compiler's parser,
3245   # not just through cpp.
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249 #include <assert.h>
3250 Syntax Error
3251 EOF
3252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3253 { (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3255 if test -z "$ac_err"; then
3256   :
3257 else
3258   echo "$ac_err" >&5
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261   rm -rf conftest*
3262   CPP="${CC-cc} -E -traditional-cpp"
3263   cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 #include <assert.h>
3267 Syntax Error
3268 EOF
3269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3270 { (eval echo configure:3271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3272 if test -z "$ac_err"; then
3273   :
3274 else
3275   echo "$ac_err" >&5
3276   echo "configure: failed program was:" >&5
3277   cat conftest.$ac_ext >&5
3278   rm -rf conftest*
3279   CPP="${CC-cc} -nologo -E"
3280   cat > conftest.$ac_ext <<EOF
3281 #line 3282 "configure"
3282 #include "confdefs.h"
3283 #include <assert.h>
3284 Syntax Error
3285 EOF
3286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3287 { (eval echo configure:3288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3289 if test -z "$ac_err"; then
3290   :
3291 else
3292   echo "$ac_err" >&5
3293   echo "configure: failed program was:" >&5
3294   cat conftest.$ac_ext >&5
3295   rm -rf conftest*
3296   CPP=/lib/cpp
3297 fi
3298 rm -f conftest*
3299 fi
3300 rm -f conftest*
3301 fi
3302 rm -f conftest*
3303   ac_cv_prog_CPP="$CPP"
3304 fi
3305   CPP="$ac_cv_prog_CPP"
3306 else
3307   ac_cv_prog_CPP="$CPP"
3308 fi
3309 echo "$ac_t""$CPP" 1>&6
3310
3311 # Check whether --enable-fast-install or --disable-fast-install was given.
3312 if test "${enable_fast_install+set}" = set; then
3313   enableval="$enable_fast_install"
3314   p=${PACKAGE-default}
3315 case $enableval in
3316 yes) enable_fast_install=yes ;;
3317 no) enable_fast_install=no ;;
3318 *)
3319   enable_fast_install=no
3320   # Look at the argument we got.  We use all the common list separators.
3321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3322   for pkg in $enableval; do
3323     if test "X$pkg" = "X$p"; then
3324       enable_fast_install=yes
3325     fi
3326   done
3327   IFS="$ac_save_ifs"
3328   ;;
3329 esac
3330 else
3331   enable_fast_install=yes
3332 fi
3333
3334 # Extract the first word of "gcc", so it can be a program name with args.
3335 set dummy gcc; ac_word=$2
3336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3337 echo "configure:3338: checking for $ac_word" >&5
3338 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   if test -n "$CC"; then
3342   ac_cv_prog_CC="$CC" # Let the user override the test.
3343 else
3344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3345   ac_dummy="$PATH"
3346   for ac_dir in $ac_dummy; do
3347     test -z "$ac_dir" && ac_dir=.
3348     if test -f $ac_dir/$ac_word; then
3349       ac_cv_prog_CC="gcc"
3350       break
3351     fi
3352   done
3353   IFS="$ac_save_ifs"
3354 fi
3355 fi
3356 CC="$ac_cv_prog_CC"
3357 if test -n "$CC"; then
3358   echo "$ac_t""$CC" 1>&6
3359 else
3360   echo "$ac_t""no" 1>&6
3361 fi
3362
3363 if test -z "$CC"; then
3364   # Extract the first word of "cc", so it can be a program name with args.
3365 set dummy cc; ac_word=$2
3366 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3367 echo "configure:3368: checking for $ac_word" >&5
3368 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   if test -n "$CC"; then
3372   ac_cv_prog_CC="$CC" # Let the user override the test.
3373 else
3374   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3375   ac_prog_rejected=no
3376   ac_dummy="$PATH"
3377   for ac_dir in $ac_dummy; do
3378     test -z "$ac_dir" && ac_dir=.
3379     if test -f $ac_dir/$ac_word; then
3380       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3381         ac_prog_rejected=yes
3382         continue
3383       fi
3384       ac_cv_prog_CC="cc"
3385       break
3386     fi
3387   done
3388   IFS="$ac_save_ifs"
3389 if test $ac_prog_rejected = yes; then
3390   # We found a bogon in the path, so make sure we never use it.
3391   set dummy $ac_cv_prog_CC
3392   shift
3393   if test $# -gt 0; then
3394     # We chose a different compiler from the bogus one.
3395     # However, it has the same basename, so the bogon will be chosen
3396     # first if we set CC to just the basename; use the full file name.
3397     shift
3398     set dummy "$ac_dir/$ac_word" "$@"
3399     shift
3400     ac_cv_prog_CC="$@"
3401   fi
3402 fi
3403 fi
3404 fi
3405 CC="$ac_cv_prog_CC"
3406 if test -n "$CC"; then
3407   echo "$ac_t""$CC" 1>&6
3408 else
3409   echo "$ac_t""no" 1>&6
3410 fi
3411
3412   if test -z "$CC"; then
3413     case "`uname -s`" in
3414     *win32* | *WIN32* | *CYGWIN*)
3415       # Extract the first word of "cl", so it can be a program name with args.
3416 set dummy cl; ac_word=$2
3417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3418 echo "configure:3419: checking for $ac_word" >&5
3419 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3420   echo $ac_n "(cached) $ac_c" 1>&6
3421 else
3422   if test -n "$CC"; then
3423   ac_cv_prog_CC="$CC" # Let the user override the test.
3424 else
3425   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3426   ac_dummy="$PATH"
3427   for ac_dir in $ac_dummy; do
3428     test -z "$ac_dir" && ac_dir=.
3429     if test -f $ac_dir/$ac_word; then
3430       ac_cv_prog_CC="cl"
3431       break
3432     fi
3433   done
3434   IFS="$ac_save_ifs"
3435 fi
3436 fi
3437 CC="$ac_cv_prog_CC"
3438 if test -n "$CC"; then
3439   echo "$ac_t""$CC" 1>&6
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443  ;;
3444     esac
3445   fi
3446   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3447 fi
3448
3449 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3450 echo "configure:3451: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3451
3452 ac_ext=c
3453 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3454 ac_cpp='$CPP $CPPFLAGS'
3455 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3456 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3457 cross_compiling=$ac_cv_prog_cc_cross
3458
3459 cat > conftest.$ac_ext << EOF
3460
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463
3464 main(){return(0);}
3465 EOF
3466 if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3467   ac_cv_prog_cc_works=yes
3468   # If we can't run a trivial program, we are probably using a cross compiler.
3469   if (./conftest; exit) 2>/dev/null; then
3470     ac_cv_prog_cc_cross=no
3471   else
3472     ac_cv_prog_cc_cross=yes
3473   fi
3474 else
3475   echo "configure: failed program was:" >&5
3476   cat conftest.$ac_ext >&5
3477   ac_cv_prog_cc_works=no
3478 fi
3479 rm -fr conftest*
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3488 if test $ac_cv_prog_cc_works = no; then
3489   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3490 fi
3491 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3492 echo "configure:3493: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3493 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3494 cross_compiling=$ac_cv_prog_cc_cross
3495
3496 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3497 echo "configure:3498: checking whether we are using GNU C" >&5
3498 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   cat > conftest.c <<EOF
3502 #ifdef __GNUC__
3503   yes;
3504 #endif
3505 EOF
3506 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3507   ac_cv_prog_gcc=yes
3508 else
3509   ac_cv_prog_gcc=no
3510 fi
3511 fi
3512
3513 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3514
3515 if test $ac_cv_prog_gcc = yes; then
3516   GCC=yes
3517 else
3518   GCC=
3519 fi
3520
3521 ac_test_CFLAGS="${CFLAGS+set}"
3522 ac_save_CFLAGS="$CFLAGS"
3523 CFLAGS=
3524 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether ${CC-cc} accepts -g" >&5
3526 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   echo 'void f(){}' > conftest.c
3530 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3531   ac_cv_prog_cc_g=yes
3532 else
3533   ac_cv_prog_cc_g=no
3534 fi
3535 rm -f conftest*
3536
3537 fi
3538
3539 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3540 if test "$ac_test_CFLAGS" = set; then
3541   CFLAGS="$ac_save_CFLAGS"
3542 elif test $ac_cv_prog_cc_g = yes; then
3543   if test "$GCC" = yes; then
3544     CFLAGS="-g -O2"
3545   else
3546     CFLAGS="-g"
3547   fi
3548 else
3549   if test "$GCC" = yes; then
3550     CFLAGS="-O2"
3551   else
3552     CFLAGS=
3553   fi
3554 fi
3555
3556 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3557 if test "${with_gnu_ld+set}" = set; then
3558   withval="$with_gnu_ld"
3559   test "$withval" = no || with_gnu_ld=yes
3560 else
3561   with_gnu_ld=no
3562 fi
3563
3564 ac_prog=ld
3565 if test "$GCC" = yes; then
3566   # Check if gcc -print-prog-name=ld gives a path.
3567   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3568 echo "configure:3569: checking for ld used by GCC" >&5
3569   case $host in
3570   *-*-mingw*)
3571     # gcc leaves a trailing carriage return which upsets mingw
3572     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3573   *)
3574     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3575   esac
3576   case $ac_prog in
3577     # Accept absolute paths.
3578     [\\/]* | [A-Za-z]:[\\/]*)
3579       re_direlt='/[^/][^/]*/\.\./'
3580       # Canonicalize the path of ld
3581       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3582       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3583         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3584       done
3585       test -z "$LD" && LD="$ac_prog"
3586       ;;
3587   "")
3588     # If it fails, then pretend we aren't using GCC.
3589     ac_prog=ld
3590     ;;
3591   *)
3592     # If it is relative, then search for the first ld in PATH.
3593     with_gnu_ld=unknown
3594     ;;
3595   esac
3596 elif test "$with_gnu_ld" = yes; then
3597   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3598 echo "configure:3599: checking for GNU ld" >&5
3599 else
3600   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3601 echo "configure:3602: checking for non-GNU ld" >&5
3602 fi
3603 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   if test -z "$LD"; then
3607   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3608   for ac_dir in $PATH; do
3609     test -z "$ac_dir" && ac_dir=.
3610     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3611       lt_cv_path_LD="$ac_dir/$ac_prog"
3612       # Check to see if the program is GNU ld.  I'd rather use --version,
3613       # but apparently some GNU ld's only accept -v.
3614       # Break only if it was the GNU/non-GNU ld that we prefer.
3615       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3616         test "$with_gnu_ld" != no && break
3617       else
3618         test "$with_gnu_ld" != yes && break
3619       fi
3620     fi
3621   done
3622   IFS="$ac_save_ifs"
3623 else
3624   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3625 fi
3626 fi
3627
3628 LD="$lt_cv_path_LD"
3629 if test -n "$LD"; then
3630   echo "$ac_t""$LD" 1>&6
3631 else
3632   echo "$ac_t""no" 1>&6
3633 fi
3634 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3635 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3636 echo "configure:3637: checking if the linker ($LD) is GNU ld" >&5
3637 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3638   echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3641 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3642   lt_cv_prog_gnu_ld=yes
3643 else
3644   lt_cv_prog_gnu_ld=no
3645 fi
3646 fi
3647
3648 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3649 with_gnu_ld=$lt_cv_prog_gnu_ld
3650
3651
3652 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3653 echo "configure:3654: checking for $LD option to reload object files" >&5
3654 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   lt_cv_ld_reload_flag='-r'
3658 fi
3659
3660 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3661 reload_flag=$lt_cv_ld_reload_flag
3662 test -n "$reload_flag" && reload_flag=" $reload_flag"
3663
3664 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3665 echo "configure:3666: checking for BSD-compatible nm" >&5
3666 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   if test -n "$NM"; then
3670   # Let the user override the test.
3671   lt_cv_path_NM="$NM"
3672 else
3673   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3674   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3675     test -z "$ac_dir" && ac_dir=.
3676     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3677     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3678       # Check to see if the nm accepts a BSD-compat flag.
3679       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3680       #   nm: unknown option "B" ignored
3681       # Tru64's nm complains that /dev/null is an invalid object file
3682       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3683         lt_cv_path_NM="$tmp_nm -B"
3684         break
3685       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3686         lt_cv_path_NM="$tmp_nm -p"
3687         break
3688       else
3689         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3690         continue # so that we can try to find one that supports BSD flags
3691       fi
3692     fi
3693   done
3694   IFS="$ac_save_ifs"
3695   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3696 fi
3697 fi
3698
3699 NM="$lt_cv_path_NM"
3700 echo "$ac_t""$NM" 1>&6
3701
3702 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3703 echo "configure:3704: checking for a sed that does not truncate output" >&5
3704 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   # Loop through the user's path and test for sed and gsed.
3708 # Then use that list of sed's as ones to test for truncation.
3709 as_executable_p="test -f"
3710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711 for as_dir in $PATH
3712 do
3713   IFS=$as_save_IFS
3714   test -z "$as_dir" && as_dir=.
3715   for ac_prog in sed gsed; do
3716     for ac_exec_ext in '' $ac_executable_extensions; do
3717       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3718         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3719       fi
3720     done
3721   done
3722 done
3723
3724   # Create a temporary directory, and hook for its removal unless debugging.
3725 $debug ||
3726 {
3727   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3728   trap '{ (exit 1); exit 1; }' 1 2 13 15
3729 }
3730
3731 # Create a (secure) tmp directory for tmp files.
3732 : ${TMPDIR=/tmp}
3733 {
3734   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3735   test -n "$tmp" && test -d "$tmp"
3736 }  ||
3737 {
3738   tmp=$TMPDIR/sed$$-$RANDOM
3739   (umask 077 && mkdir $tmp)
3740 } ||
3741 {
3742    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3743    { (exit 1); exit 1; }
3744 }
3745   _max=0
3746   _count=0
3747   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3748   # along with /bin/sed that truncates output.
3749   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3750     test ! -f ${_sed} && break
3751     cat /dev/null > "$tmp/sed.in"
3752     _count=0
3753     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3754     # Check for GNU sed and select it if it is found.
3755     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3756       lt_cv_path_SED=${_sed}
3757       break
3758     fi
3759     while true; do
3760       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3761       mv "$tmp/sed.tmp" "$tmp/sed.in"
3762       cp "$tmp/sed.in" "$tmp/sed.nl"
3763       echo >>"$tmp/sed.nl"
3764       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3765       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3766       # 40000 chars as input seems more than enough
3767       test $_count -gt 10 && break
3768       _count=`expr $_count + 1`
3769       if test $_count -gt $_max; then
3770         _max=$_count
3771         lt_cv_path_SED=$_sed
3772       fi
3773     done
3774   done
3775   rm -rf "$tmp"
3776
3777 fi
3778
3779 if test "X$SED" != "X"; then
3780   lt_cv_path_SED=$SED
3781 else
3782   SED=$lt_cv_path_SED
3783 fi
3784 echo "$ac_t""$SED" 1>&6
3785
3786 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3787 echo "configure:3788: checking whether ln -s works" >&5
3788 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   rm -f conftestdata
3792 if ln -s X conftestdata 2>/dev/null
3793 then
3794   rm -f conftestdata
3795   ac_cv_prog_LN_S="ln -s"
3796 else
3797   ac_cv_prog_LN_S=ln
3798 fi
3799 fi
3800 LN_S="$ac_cv_prog_LN_S"
3801 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3802   echo "$ac_t""yes" 1>&6
3803 else
3804   echo "$ac_t""no" 1>&6
3805 fi
3806
3807 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3808 echo "configure:3809: checking how to recognise dependent libraries" >&5
3809 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   lt_cv_file_magic_cmd='$MAGIC_CMD'
3813 lt_cv_file_magic_test_file=
3814 lt_cv_deplibs_check_method='unknown'
3815 # Need to set the preceding variable on all platforms that support
3816 # interlibrary dependencies.
3817 # 'none' -- dependencies not supported.
3818 # `unknown' -- same as none, but documents that we really don't know.
3819 # 'pass_all' -- all dependencies passed with no checks.
3820 # 'test_compile' -- check by making test program.
3821 # 'file_magic [[regex]]' -- check by looking for files in library path
3822 # which responds to the $file_magic_cmd with a given egrep regex.
3823 # If you have `file' or equivalent on your system and you're not sure
3824 # whether `pass_all' will *always* work, you probably want this one.
3825
3826 case $host_os in
3827 aix4* | aix5*)
3828   lt_cv_deplibs_check_method=pass_all
3829   ;;
3830
3831 beos*)
3832   lt_cv_deplibs_check_method=pass_all
3833   ;;
3834
3835 bsdi4*)
3836   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3837   lt_cv_file_magic_cmd='/usr/bin/file -L'
3838   lt_cv_file_magic_test_file=/shlib/libc.so
3839   ;;
3840
3841 cygwin* | mingw* | pw32*)
3842   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3843   lt_cv_file_magic_cmd='$OBJDUMP -f'
3844   ;;
3845
3846 darwin* | rhapsody*)
3847   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3848   lt_cv_file_magic_cmd='/usr/bin/file -L'
3849   case "$host_os" in
3850   rhapsody* | darwin1.[012])
3851     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3852     ;;
3853   *) # Darwin 1.3 on
3854     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3855     ;;
3856   esac
3857   ;;
3858
3859 freebsd*)
3860   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3861     case $host_cpu in
3862     i*86 )
3863       # Not sure whether the presence of OpenBSD here was a mistake.
3864       # Let's accept both of them until this is cleared up.
3865       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3866       lt_cv_file_magic_cmd=/usr/bin/file
3867       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3868       ;;
3869     esac
3870   else
3871     lt_cv_deplibs_check_method=pass_all
3872   fi
3873   ;;
3874
3875 gnu*)
3876   lt_cv_deplibs_check_method=pass_all
3877   ;;
3878
3879 hpux10.20*|hpux11*)
3880   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3881   lt_cv_file_magic_cmd=/usr/bin/file
3882   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3883   ;;
3884
3885 irix5* | irix6* | nonstopux*)
3886   case $host_os in
3887   irix5* | nonstopux*)
3888     # this will be overridden with pass_all, but let us keep it just in case
3889     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3890     ;;
3891   *)
3892     case $LD in
3893     *-32|*"-32 ") libmagic=32-bit;;
3894     *-n32|*"-n32 ") libmagic=N32;;
3895     *-64|*"-64 ") libmagic=64-bit;;
3896     *) libmagic=never-match;;
3897     esac
3898     # this will be overridden with pass_all, but let us keep it just in case
3899     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3900     ;;
3901   esac
3902   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3903   lt_cv_deplibs_check_method=pass_all
3904   ;;
3905
3906 # This must be Linux ELF.
3907 linux-gnu*)
3908   case $host_cpu in
3909   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3910     lt_cv_deplibs_check_method=pass_all ;;
3911   *)
3912     # glibc up to 2.1.1 does not perform some relocations on ARM
3913     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3914   esac
3915   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3916   ;;
3917
3918 netbsd*)
3919   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3920     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3921   else
3922     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3923   fi
3924   ;;
3925
3926 newos6*)
3927   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3928   lt_cv_file_magic_cmd=/usr/bin/file
3929   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3930   ;;
3931
3932 openbsd*)
3933   lt_cv_file_magic_cmd=/usr/bin/file
3934   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3935   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3936     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3937   else
3938     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3939   fi
3940   ;;
3941
3942 osf3* | osf4* | osf5*)
3943   # this will be overridden with pass_all, but let us keep it just in case
3944   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3945   lt_cv_file_magic_test_file=/shlib/libc.so
3946   lt_cv_deplibs_check_method=pass_all
3947   ;;
3948
3949 sco3.2v5*)
3950   lt_cv_deplibs_check_method=pass_all
3951   ;;
3952
3953 solaris*)
3954   lt_cv_deplibs_check_method=pass_all
3955   lt_cv_file_magic_test_file=/lib/libc.so
3956   ;;
3957
3958 sysv5uw[78]* | sysv4*uw2*)
3959   lt_cv_deplibs_check_method=pass_all
3960   ;;
3961
3962 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3963   case $host_vendor in
3964   motorola)
3965     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]'
3966     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3967     ;;
3968   ncr)
3969     lt_cv_deplibs_check_method=pass_all
3970     ;;
3971   sequent)
3972     lt_cv_file_magic_cmd='/bin/file'
3973     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3974     ;;
3975   sni)
3976     lt_cv_file_magic_cmd='/bin/file'
3977     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3978     lt_cv_file_magic_test_file=/lib/libc.so
3979     ;;
3980   siemens)
3981     lt_cv_deplibs_check_method=pass_all
3982     ;;
3983   esac
3984   ;;
3985 esac
3986
3987 fi
3988
3989 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3990 file_magic_cmd=$lt_cv_file_magic_cmd
3991 deplibs_check_method=$lt_cv_deplibs_check_method
3992
3993 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3994 echo "configure:3995: checking for object suffix" >&5
3995 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   rm -f conftest*
3999 echo 'int i = 1;' > conftest.$ac_ext
4000 if { (eval echo configure:4001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4001   for ac_file in conftest.*; do
4002     case $ac_file in
4003     *.c) ;;
4004     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4005     esac
4006   done
4007 else
4008   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4009 fi
4010 rm -f conftest*
4011 fi
4012
4013 echo "$ac_t""$ac_cv_objext" 1>&6
4014 OBJEXT=$ac_cv_objext
4015 ac_objext=$ac_cv_objext
4016
4017
4018
4019
4020 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4021 echo "configure:4022: checking for executable suffix" >&5
4022 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4023   echo $ac_n "(cached) $ac_c" 1>&6
4024 else
4025   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4026   ac_cv_exeext=.exe
4027 else
4028   rm -f conftest*
4029   echo 'int main () { return 0; }' > conftest.$ac_ext
4030   ac_cv_exeext=
4031   if { (eval echo configure:4032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4032     for file in conftest.*; do
4033       case $file in
4034       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4035       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4036       esac
4037     done
4038   else
4039     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4040   fi
4041   rm -f conftest*
4042   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4043 fi
4044 fi
4045
4046 EXEEXT=""
4047 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4048 echo "$ac_t""${ac_cv_exeext}" 1>&6
4049 ac_exeext=$EXEEXT
4050
4051 if test $host != $build; then
4052   ac_tool_prefix=${host_alias}-
4053 else
4054   ac_tool_prefix=
4055 fi
4056
4057
4058
4059
4060 # Check for command to grab the raw symbol name followed by C symbol from nm.
4061 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4062 echo "configure:4063: checking command to parse $NM output" >&5
4063 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4064   echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066   
4067 # These are sane defaults that work on at least a few old systems.
4068 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4069
4070 # Character class describing NM global symbol codes.
4071 symcode='[BCDEGRST]'
4072
4073 # Regexp to match symbols that can be accessed directly from C.
4074 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4075
4076 # Transform the above into a raw symbol and a C symbol.
4077 symxfrm='\1 \2\3 \3'
4078
4079 # Transform an extracted symbol line into a proper C declaration
4080 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4081
4082 # Transform an extracted symbol line into symbol name and symbol address
4083 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'"
4084
4085 # Define system-specific variables.
4086 case $host_os in
4087 aix*)
4088   symcode='[BCDT]'
4089   ;;
4090 cygwin* | mingw* | pw32*)
4091   symcode='[ABCDGISTW]'
4092   ;;
4093 hpux*) # Its linker distinguishes data from code symbols
4094   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4095   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'"
4096   ;;
4097 irix* | nonstopux*)
4098   symcode='[BCDEGRST]'
4099   ;;
4100 osf*)
4101   symcode='[BCDEGQRST]'
4102   ;;
4103 solaris* | sysv5*)
4104   symcode='[BDT]'
4105   ;;
4106 sysv4)
4107   symcode='[DFNSTU]'
4108   ;;
4109 esac
4110
4111 # Handle CRLF in mingw tool chain
4112 opt_cr=
4113 case $host_os in
4114 mingw*)
4115   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4116   ;;
4117 esac
4118
4119 # If we're using GNU nm, then use its standard symbol codes.
4120 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4121   symcode='[ABCDGISTW]'
4122 fi
4123
4124 # Try without a prefix undercore, then with it.
4125 for ac_symprfx in "" "_"; do
4126
4127   # Write the raw and C identifiers.
4128 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4129
4130   # Check to see that the pipe works correctly.
4131   pipe_works=no
4132   rm -f conftest*
4133   cat > conftest.$ac_ext <<EOF
4134 #ifdef __cplusplus
4135 extern "C" {
4136 #endif
4137 char nm_test_var;
4138 void nm_test_func(){}
4139 #ifdef __cplusplus
4140 }
4141 #endif
4142 int main(){nm_test_var='a';nm_test_func();return(0);}
4143 EOF
4144
4145   if { (eval echo configure:4146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146     # Now try to grab the symbols.
4147     nlist=conftest.nm
4148     if { (eval echo configure:4149: \"$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
4149       # Try sorting and uniquifying the output.
4150       if sort "$nlist" | uniq > "$nlist"T; then
4151         mv -f "$nlist"T "$nlist"
4152       else
4153         rm -f "$nlist"T
4154       fi
4155
4156       # Make sure that we snagged all the symbols we need.
4157       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4158         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4159           cat <<EOF > conftest.$ac_ext
4160 #ifdef __cplusplus
4161 extern "C" {
4162 #endif
4163
4164 EOF
4165           # Now generate the symbol file.
4166           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4167
4168           cat <<EOF >> conftest.$ac_ext
4169 #if defined (__STDC__) && __STDC__
4170 # define lt_ptr void *
4171 #else
4172 # define lt_ptr char *
4173 # define const
4174 #endif
4175
4176 /* The mapping between symbol names and symbols. */
4177 const struct {
4178   const char *name;
4179   lt_ptr address;
4180 }
4181 lt_preloaded_symbols[] =
4182 {
4183 EOF
4184           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4185           cat <<\EOF >> conftest.$ac_ext
4186   {0, (lt_ptr) 0}
4187 };
4188
4189 #ifdef __cplusplus
4190 }
4191 #endif
4192 EOF
4193           # Now try linking the two files.
4194           mv conftest.$ac_objext conftstm.$ac_objext
4195           save_LIBS="$LIBS"
4196           save_CFLAGS="$CFLAGS"
4197           LIBS="conftstm.$ac_objext"
4198           CFLAGS="$CFLAGS$no_builtin_flag"
4199           if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4200             pipe_works=yes
4201           fi
4202           LIBS="$save_LIBS"
4203           CFLAGS="$save_CFLAGS"
4204         else
4205           echo "cannot find nm_test_func in $nlist" >&5
4206         fi
4207       else
4208         echo "cannot find nm_test_var in $nlist" >&5
4209       fi
4210     else
4211       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4212     fi
4213   else
4214     echo "$progname: failed program was:" >&5
4215     cat conftest.$ac_ext >&5
4216   fi
4217   rm -f conftest* conftst*
4218
4219   # Do not use the global_symbol_pipe unless it works.
4220   if test "$pipe_works" = yes; then
4221     break
4222   else
4223     lt_cv_sys_global_symbol_pipe=
4224   fi
4225 done
4226
4227 fi
4228
4229 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4230 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4231   global_symbol_to_cdecl=
4232   global_symbol_to_c_name_address=
4233 else
4234   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4235   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4236 fi
4237 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4238 then
4239   echo "$ac_t""failed" 1>&6
4240 else
4241   echo "$ac_t""ok" 1>&6
4242 fi
4243
4244 for ac_hdr in dlfcn.h
4245 do
4246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4248 echo "configure:4249: checking for $ac_hdr" >&5
4249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4250   echo $ac_n "(cached) $ac_c" 1>&6
4251 else
4252   cat > conftest.$ac_ext <<EOF
4253 #line 4254 "configure"
4254 #include "confdefs.h"
4255 #include <$ac_hdr>
4256 EOF
4257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4258 { (eval echo configure:4259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4260 if test -z "$ac_err"; then
4261   rm -rf conftest*
4262   eval "ac_cv_header_$ac_safe=yes"
4263 else
4264   echo "$ac_err" >&5
4265   echo "configure: failed program was:" >&5
4266   cat conftest.$ac_ext >&5
4267   rm -rf conftest*
4268   eval "ac_cv_header_$ac_safe=no"
4269 fi
4270 rm -f conftest*
4271 fi
4272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4273   echo "$ac_t""yes" 1>&6
4274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4275   cat >> confdefs.h <<EOF
4276 #define $ac_tr_hdr 1
4277 EOF
4278  
4279 else
4280   echo "$ac_t""no" 1>&6
4281 fi
4282 done
4283
4284
4285
4286
4287
4288
4289 # Only perform the check for file, if the check method requires it
4290 case $deplibs_check_method in
4291 file_magic*)
4292   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4293     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4294 echo "configure:4295: checking for ${ac_tool_prefix}file" >&5
4295 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4296   echo $ac_n "(cached) $ac_c" 1>&6
4297 else
4298   case $MAGIC_CMD in
4299   /*)
4300   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4301   ;;
4302   ?:/*)
4303   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4304   ;;
4305   *)
4306   ac_save_MAGIC_CMD="$MAGIC_CMD"
4307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4308   ac_dummy="/usr/bin:$PATH"
4309   for ac_dir in $ac_dummy; do
4310     test -z "$ac_dir" && ac_dir=.
4311     if test -f $ac_dir/${ac_tool_prefix}file; then
4312       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4313       if test -n "$file_magic_test_file"; then
4314         case $deplibs_check_method in
4315         "file_magic "*)
4316           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4317           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4318           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4319             egrep "$file_magic_regex" > /dev/null; then
4320             :
4321           else
4322             cat <<EOF 1>&2
4323
4324 *** Warning: the command libtool uses to detect shared libraries,
4325 *** $file_magic_cmd, produces output that libtool cannot recognize.
4326 *** The result is that libtool may fail to recognize shared libraries
4327 *** as such.  This will affect the creation of libtool libraries that
4328 *** depend on shared libraries, but programs linked with such libtool
4329 *** libraries will work regardless of this problem.  Nevertheless, you
4330 *** may want to report the problem to your system manager and/or to
4331 *** bug-libtool@gnu.org
4332
4333 EOF
4334           fi ;;
4335         esac
4336       fi
4337       break
4338     fi
4339   done
4340   IFS="$ac_save_ifs"
4341   MAGIC_CMD="$ac_save_MAGIC_CMD"
4342   ;;
4343 esac
4344 fi
4345
4346 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4347 if test -n "$MAGIC_CMD"; then
4348   echo "$ac_t""$MAGIC_CMD" 1>&6
4349 else
4350   echo "$ac_t""no" 1>&6
4351 fi
4352
4353 if test -z "$lt_cv_path_MAGIC_CMD"; then
4354   if test -n "$ac_tool_prefix"; then
4355     echo $ac_n "checking for file""... $ac_c" 1>&6
4356 echo "configure:4357: checking for file" >&5
4357 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4358   echo $ac_n "(cached) $ac_c" 1>&6
4359 else
4360   case $MAGIC_CMD in
4361   /*)
4362   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4363   ;;
4364   ?:/*)
4365   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4366   ;;
4367   *)
4368   ac_save_MAGIC_CMD="$MAGIC_CMD"
4369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4370   ac_dummy="/usr/bin:$PATH"
4371   for ac_dir in $ac_dummy; do
4372     test -z "$ac_dir" && ac_dir=.
4373     if test -f $ac_dir/file; then
4374       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4375       if test -n "$file_magic_test_file"; then
4376         case $deplibs_check_method in
4377         "file_magic "*)
4378           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4379           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4380           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4381             egrep "$file_magic_regex" > /dev/null; then
4382             :
4383           else
4384             cat <<EOF 1>&2
4385
4386 *** Warning: the command libtool uses to detect shared libraries,
4387 *** $file_magic_cmd, produces output that libtool cannot recognize.
4388 *** The result is that libtool may fail to recognize shared libraries
4389 *** as such.  This will affect the creation of libtool libraries that
4390 *** depend on shared libraries, but programs linked with such libtool
4391 *** libraries will work regardless of this problem.  Nevertheless, you
4392 *** may want to report the problem to your system manager and/or to
4393 *** bug-libtool@gnu.org
4394
4395 EOF
4396           fi ;;
4397         esac
4398       fi
4399       break
4400     fi
4401   done
4402   IFS="$ac_save_ifs"
4403   MAGIC_CMD="$ac_save_MAGIC_CMD"
4404   ;;
4405 esac
4406 fi
4407
4408 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4409 if test -n "$MAGIC_CMD"; then
4410   echo "$ac_t""$MAGIC_CMD" 1>&6
4411 else
4412   echo "$ac_t""no" 1>&6
4413 fi
4414
4415   else
4416     MAGIC_CMD=:
4417   fi
4418 fi
4419
4420   fi
4421   ;;
4422 esac
4423
4424 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4425 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4426 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4427 echo "configure:4428: checking for $ac_word" >&5
4428 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4429   echo $ac_n "(cached) $ac_c" 1>&6
4430 else
4431   if test -n "$RANLIB"; then
4432   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4433 else
4434   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4435   ac_dummy="$PATH"
4436   for ac_dir in $ac_dummy; do
4437     test -z "$ac_dir" && ac_dir=.
4438     if test -f $ac_dir/$ac_word; then
4439       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4440       break
4441     fi
4442   done
4443   IFS="$ac_save_ifs"
4444 fi
4445 fi
4446 RANLIB="$ac_cv_prog_RANLIB"
4447 if test -n "$RANLIB"; then
4448   echo "$ac_t""$RANLIB" 1>&6
4449 else
4450   echo "$ac_t""no" 1>&6
4451 fi
4452
4453
4454 if test -z "$ac_cv_prog_RANLIB"; then
4455 if test -n "$ac_tool_prefix"; then
4456   # Extract the first word of "ranlib", so it can be a program name with args.
4457 set dummy ranlib; ac_word=$2
4458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4459 echo "configure:4460: checking for $ac_word" >&5
4460 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4461   echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463   if test -n "$RANLIB"; then
4464   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4465 else
4466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4467   ac_dummy="$PATH"
4468   for ac_dir in $ac_dummy; do
4469     test -z "$ac_dir" && ac_dir=.
4470     if test -f $ac_dir/$ac_word; then
4471       ac_cv_prog_RANLIB="ranlib"
4472       break
4473     fi
4474   done
4475   IFS="$ac_save_ifs"
4476   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4477 fi
4478 fi
4479 RANLIB="$ac_cv_prog_RANLIB"
4480 if test -n "$RANLIB"; then
4481   echo "$ac_t""$RANLIB" 1>&6
4482 else
4483   echo "$ac_t""no" 1>&6
4484 fi
4485
4486 else
4487   RANLIB=":"
4488 fi
4489 fi
4490
4491 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4492 set dummy ${ac_tool_prefix}strip; ac_word=$2
4493 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4494 echo "configure:4495: checking for $ac_word" >&5
4495 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4496   echo $ac_n "(cached) $ac_c" 1>&6
4497 else
4498   if test -n "$STRIP"; then
4499   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4500 else
4501   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4502   ac_dummy="$PATH"
4503   for ac_dir in $ac_dummy; do
4504     test -z "$ac_dir" && ac_dir=.
4505     if test -f $ac_dir/$ac_word; then
4506       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4507       break
4508     fi
4509   done
4510   IFS="$ac_save_ifs"
4511 fi
4512 fi
4513 STRIP="$ac_cv_prog_STRIP"
4514 if test -n "$STRIP"; then
4515   echo "$ac_t""$STRIP" 1>&6
4516 else
4517   echo "$ac_t""no" 1>&6
4518 fi
4519
4520
4521 if test -z "$ac_cv_prog_STRIP"; then
4522 if test -n "$ac_tool_prefix"; then
4523   # Extract the first word of "strip", so it can be a program name with args.
4524 set dummy strip; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$STRIP"; then
4531   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_STRIP="strip"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4544 fi
4545 fi
4546 STRIP="$ac_cv_prog_STRIP"
4547 if test -n "$STRIP"; then
4548   echo "$ac_t""$STRIP" 1>&6
4549 else
4550   echo "$ac_t""no" 1>&6
4551 fi
4552
4553 else
4554   STRIP=":"
4555 fi
4556 fi
4557
4558
4559 enable_dlopen=yes
4560 enable_win32_dll=yes
4561
4562 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4563 if test "${enable_libtool_lock+set}" = set; then
4564   enableval="$enable_libtool_lock"
4565   :
4566 fi
4567
4568 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4569
4570 # Some flags need to be propagated to the compiler or linker for good
4571 # libtool support.
4572 case $host in
4573 *-*-irix6*)
4574   # Find out which ABI we are using.
4575   echo '#line 4576 "configure"' > conftest.$ac_ext
4576   if { (eval echo configure:4577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4577     case `/usr/bin/file conftest.$ac_objext` in
4578     *32-bit*)
4579       LD="${LD-ld} -32"
4580       ;;
4581     *N32*)
4582       LD="${LD-ld} -n32"
4583       ;;
4584     *64-bit*)
4585       LD="${LD-ld} -64"
4586       ;;
4587     esac
4588   fi
4589   rm -rf conftest*
4590   ;;
4591
4592 *-*-sco3.2v5*)
4593   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4594   SAVE_CFLAGS="$CFLAGS"
4595   CFLAGS="$CFLAGS -belf"
4596   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4597 echo "configure:4598: checking whether the C compiler needs -belf" >&5
4598 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4599   echo $ac_n "(cached) $ac_c" 1>&6
4600 else
4601   
4602      ac_ext=c
4603 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4604 ac_cpp='$CPP $CPPFLAGS'
4605 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4606 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4607 cross_compiling=$ac_cv_prog_cc_cross
4608
4609      cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612
4613 int main() {
4614
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618   rm -rf conftest*
4619   lt_cv_cc_needs_belf=yes
4620 else
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   lt_cv_cc_needs_belf=no
4625 fi
4626 rm -f conftest*
4627      ac_ext=c
4628 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4629 ac_cpp='$CPP $CPPFLAGS'
4630 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4631 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4632 cross_compiling=$ac_cv_prog_cc_cross
4633
4634 fi
4635
4636 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4637   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4638     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4639     CFLAGS="$SAVE_CFLAGS"
4640   fi
4641   ;;
4642
4643 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4644   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4645 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4647 echo "configure:4648: checking for $ac_word" >&5
4648 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4649   echo $ac_n "(cached) $ac_c" 1>&6
4650 else
4651   if test -n "$DLLTOOL"; then
4652   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4653 else
4654   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4655   ac_dummy="$PATH"
4656   for ac_dir in $ac_dummy; do
4657     test -z "$ac_dir" && ac_dir=.
4658     if test -f $ac_dir/$ac_word; then
4659       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4660       break
4661     fi
4662   done
4663   IFS="$ac_save_ifs"
4664 fi
4665 fi
4666 DLLTOOL="$ac_cv_prog_DLLTOOL"
4667 if test -n "$DLLTOOL"; then
4668   echo "$ac_t""$DLLTOOL" 1>&6
4669 else
4670   echo "$ac_t""no" 1>&6
4671 fi
4672
4673
4674 if test -z "$ac_cv_prog_DLLTOOL"; then
4675 if test -n "$ac_tool_prefix"; then
4676   # Extract the first word of "dlltool", so it can be a program name with args.
4677 set dummy dlltool; ac_word=$2
4678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4679 echo "configure:4680: checking for $ac_word" >&5
4680 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4681   echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683   if test -n "$DLLTOOL"; then
4684   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4685 else
4686   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4687   ac_dummy="$PATH"
4688   for ac_dir in $ac_dummy; do
4689     test -z "$ac_dir" && ac_dir=.
4690     if test -f $ac_dir/$ac_word; then
4691       ac_cv_prog_DLLTOOL="dlltool"
4692       break
4693     fi
4694   done
4695   IFS="$ac_save_ifs"
4696   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4697 fi
4698 fi
4699 DLLTOOL="$ac_cv_prog_DLLTOOL"
4700 if test -n "$DLLTOOL"; then
4701   echo "$ac_t""$DLLTOOL" 1>&6
4702 else
4703   echo "$ac_t""no" 1>&6
4704 fi
4705
4706 else
4707   DLLTOOL="false"
4708 fi
4709 fi
4710
4711   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4712 set dummy ${ac_tool_prefix}as; ac_word=$2
4713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4714 echo "configure:4715: checking for $ac_word" >&5
4715 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4716   echo $ac_n "(cached) $ac_c" 1>&6
4717 else
4718   if test -n "$AS"; then
4719   ac_cv_prog_AS="$AS" # Let the user override the test.
4720 else
4721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4722   ac_dummy="$PATH"
4723   for ac_dir in $ac_dummy; do
4724     test -z "$ac_dir" && ac_dir=.
4725     if test -f $ac_dir/$ac_word; then
4726       ac_cv_prog_AS="${ac_tool_prefix}as"
4727       break
4728     fi
4729   done
4730   IFS="$ac_save_ifs"
4731 fi
4732 fi
4733 AS="$ac_cv_prog_AS"
4734 if test -n "$AS"; then
4735   echo "$ac_t""$AS" 1>&6
4736 else
4737   echo "$ac_t""no" 1>&6
4738 fi
4739
4740
4741 if test -z "$ac_cv_prog_AS"; then
4742 if test -n "$ac_tool_prefix"; then
4743   # Extract the first word of "as", so it can be a program name with args.
4744 set dummy as; ac_word=$2
4745 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4746 echo "configure:4747: checking for $ac_word" >&5
4747 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4748   echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750   if test -n "$AS"; then
4751   ac_cv_prog_AS="$AS" # Let the user override the test.
4752 else
4753   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4754   ac_dummy="$PATH"
4755   for ac_dir in $ac_dummy; do
4756     test -z "$ac_dir" && ac_dir=.
4757     if test -f $ac_dir/$ac_word; then
4758       ac_cv_prog_AS="as"
4759       break
4760     fi
4761   done
4762   IFS="$ac_save_ifs"
4763   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4764 fi
4765 fi
4766 AS="$ac_cv_prog_AS"
4767 if test -n "$AS"; then
4768   echo "$ac_t""$AS" 1>&6
4769 else
4770   echo "$ac_t""no" 1>&6
4771 fi
4772
4773 else
4774   AS="false"
4775 fi
4776 fi
4777
4778   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4779 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_word" >&5
4782 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   if test -n "$OBJDUMP"; then
4786   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4787 else
4788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4789   ac_dummy="$PATH"
4790   for ac_dir in $ac_dummy; do
4791     test -z "$ac_dir" && ac_dir=.
4792     if test -f $ac_dir/$ac_word; then
4793       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4794       break
4795     fi
4796   done
4797   IFS="$ac_save_ifs"
4798 fi
4799 fi
4800 OBJDUMP="$ac_cv_prog_OBJDUMP"
4801 if test -n "$OBJDUMP"; then
4802   echo "$ac_t""$OBJDUMP" 1>&6
4803 else
4804   echo "$ac_t""no" 1>&6
4805 fi
4806
4807
4808 if test -z "$ac_cv_prog_OBJDUMP"; then
4809 if test -n "$ac_tool_prefix"; then
4810   # Extract the first word of "objdump", so it can be a program name with args.
4811 set dummy objdump; ac_word=$2
4812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4813 echo "configure:4814: checking for $ac_word" >&5
4814 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4815   echo $ac_n "(cached) $ac_c" 1>&6
4816 else
4817   if test -n "$OBJDUMP"; then
4818   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4819 else
4820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4821   ac_dummy="$PATH"
4822   for ac_dir in $ac_dummy; do
4823     test -z "$ac_dir" && ac_dir=.
4824     if test -f $ac_dir/$ac_word; then
4825       ac_cv_prog_OBJDUMP="objdump"
4826       break
4827     fi
4828   done
4829   IFS="$ac_save_ifs"
4830   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4831 fi
4832 fi
4833 OBJDUMP="$ac_cv_prog_OBJDUMP"
4834 if test -n "$OBJDUMP"; then
4835   echo "$ac_t""$OBJDUMP" 1>&6
4836 else
4837   echo "$ac_t""no" 1>&6
4838 fi
4839
4840 else
4841   OBJDUMP="false"
4842 fi
4843 fi
4844
4845
4846   # recent cygwin and mingw systems supply a stub DllMain which the user
4847   # can override, but on older systems we have to supply one
4848   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4849 echo "configure:4850: checking if libtool should supply DllMain function" >&5
4850 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4851   echo $ac_n "(cached) $ac_c" 1>&6
4852 else
4853   cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4856
4857 int main() {
4858 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4859       DllMain (0, 0, 0);
4860 ; return 0; }
4861 EOF
4862 if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4863   rm -rf conftest*
4864   lt_cv_need_dllmain=no
4865 else
4866   echo "configure: failed program was:" >&5
4867   cat conftest.$ac_ext >&5
4868   rm -rf conftest*
4869   lt_cv_need_dllmain=yes
4870 fi
4871 rm -f conftest*
4872 fi
4873
4874 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4875
4876   case $host/$CC in
4877   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4878     # old mingw systems require "-dll" to link a DLL, while more recent ones
4879     # require "-mdll"
4880     SAVE_CFLAGS="$CFLAGS"
4881     CFLAGS="$CFLAGS -mdll"
4882     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4883 echo "configure:4884: checking how to link DLLs" >&5
4884 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4885   echo $ac_n "(cached) $ac_c" 1>&6
4886 else
4887   cat > conftest.$ac_ext <<EOF
4888 #line 4889 "configure"
4889 #include "confdefs.h"
4890
4891 int main() {
4892
4893 ; return 0; }
4894 EOF
4895 if { (eval echo configure:4896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4896   rm -rf conftest*
4897   lt_cv_cc_dll_switch=-mdll
4898 else
4899   echo "configure: failed program was:" >&5
4900   cat conftest.$ac_ext >&5
4901   rm -rf conftest*
4902   lt_cv_cc_dll_switch=-dll
4903 fi
4904 rm -f conftest*
4905 fi
4906
4907 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4908     CFLAGS="$SAVE_CFLAGS" ;;
4909   *-*-cygwin* | *-*-pw32*)
4910     # cygwin systems need to pass --dll to the linker, and not link
4911     # crt.o which will require a WinMain@16 definition.
4912     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4913   esac
4914   ;;
4915   
4916 esac
4917
4918 # Sed substitution that helps us do robust quoting.  It backslashifies
4919 # metacharacters that are still active within double-quoted strings.
4920 Xsed='sed -e s/^X//'
4921 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4922
4923 # Same as above, but do not quote variable references.
4924 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4925
4926 # Sed substitution to delay expansion of an escaped shell variable in a
4927 # double_quote_subst'ed string.
4928 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4929
4930 # Constants:
4931 rm="rm -f"
4932
4933 # Global variables:
4934 default_ofile=libtool
4935 can_build_shared=yes
4936
4937 # All known linkers require a `.a' archive for static linking (except M$VC,
4938 # which needs '.lib').
4939 libext=a
4940 ltmain="$ac_aux_dir/ltmain.sh"
4941 ofile="$default_ofile"
4942 with_gnu_ld="$lt_cv_prog_gnu_ld"
4943 need_locks="$enable_libtool_lock"
4944
4945 old_CC="$CC"
4946 old_CFLAGS="$CFLAGS"
4947
4948 # Set sane defaults for various variables
4949 test -z "$AR" && AR=ar
4950 test -z "$AR_FLAGS" && AR_FLAGS=cru
4951 test -z "$AS" && AS=as
4952 test -z "$CC" && CC=cc
4953 test -z "$DLLTOOL" && DLLTOOL=dlltool
4954 test -z "$LD" && LD=ld
4955 test -z "$LN_S" && LN_S="ln -s"
4956 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4957 test -z "$NM" && NM=nm
4958 test -z "$OBJDUMP" && OBJDUMP=objdump
4959 test -z "$RANLIB" && RANLIB=:
4960 test -z "$STRIP" && STRIP=:
4961 test -z "$ac_objext" && ac_objext=o
4962
4963 if test x"$host" != x"$build"; then
4964   ac_tool_prefix=${host_alias}-
4965 else
4966   ac_tool_prefix=
4967 fi
4968
4969 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4970 case $host_os in
4971 linux-gnu*) ;;
4972 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4973 esac
4974
4975 case $host_os in
4976 aix3*)
4977   # AIX sometimes has problems with the GCC collect2 program.  For some
4978   # reason, if we set the COLLECT_NAMES environment variable, the problems
4979   # vanish in a puff of smoke.
4980   if test "X${COLLECT_NAMES+set}" != Xset; then
4981     COLLECT_NAMES=
4982     export COLLECT_NAMES
4983   fi
4984   ;;
4985 esac
4986
4987 # Determine commands to create old-style static archives.
4988 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4989 old_postinstall_cmds='chmod 644 $oldlib'
4990 old_postuninstall_cmds=
4991
4992 if test -n "$RANLIB"; then
4993   case $host_os in
4994   openbsd*)
4995     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4996     ;;
4997   *)
4998     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4999     ;;
5000   esac
5001   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5002 fi
5003
5004 # Allow CC to be a program name with arguments.
5005 set dummy $CC
5006 compiler="$2"
5007
5008 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5009 echo "configure:5010: checking for objdir" >&5
5010 rm -f .libs 2>/dev/null
5011 mkdir .libs 2>/dev/null
5012 if test -d .libs; then
5013   objdir=.libs
5014 else
5015   # MS-DOS does not allow filenames that begin with a dot.
5016   objdir=_libs
5017 fi
5018 rmdir .libs 2>/dev/null
5019 echo "$ac_t""$objdir" 1>&6
5020
5021
5022 # Check whether --with-pic or --without-pic was given.
5023 if test "${with_pic+set}" = set; then
5024   withval="$with_pic"
5025   pic_mode="$withval"
5026 else
5027   pic_mode=default
5028 fi
5029
5030 test -z "$pic_mode" && pic_mode=default
5031
5032 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5033 # in isolation, and that seeing it set (from the cache) indicates that
5034 # the associated values are set (in the cache) correctly too.
5035 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5036 echo "configure:5037: checking for $compiler option to produce PIC" >&5
5037 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5038   echo $ac_n "(cached) $ac_c" 1>&6
5039 else
5040    lt_cv_prog_cc_pic=
5041   lt_cv_prog_cc_shlib=
5042   lt_cv_prog_cc_wl=
5043   lt_cv_prog_cc_static=
5044   lt_cv_prog_cc_no_builtin=
5045   lt_cv_prog_cc_can_build_shared=$can_build_shared
5046
5047   if test "$GCC" = yes; then
5048     lt_cv_prog_cc_wl='-Wl,'
5049     lt_cv_prog_cc_static='-static'
5050
5051     case $host_os in
5052     aix*)
5053       # Below there is a dirty hack to force normal static linking with -ldl
5054       # The problem is because libdl dynamically linked with both libc and
5055       # libC (AIX C++ library), which obviously doesn't included in libraries
5056       # list by gcc. This cause undefined symbols with -static flags.
5057       # This hack allows C programs to be linked with "-static -ldl", but
5058       # not sure about C++ programs.
5059       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5060       ;;
5061     amigaos*)
5062       # FIXME: we need at least 68020 code to build shared libraries, but
5063       # adding the `-m68020' flag to GCC prevents building anything better,
5064       # like `-m68040'.
5065       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5066       ;;
5067     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5068       # PIC is the default for these OSes.
5069       ;;
5070     darwin* | rhapsody*)
5071       # PIC is the default on this platform
5072       # Common symbols not allowed in MH_DYLIB files
5073       lt_cv_prog_cc_pic='-fno-common'
5074       ;;
5075     cygwin* | mingw* | pw32* | os2*)
5076       # This hack is so that the source file can tell whether it is being
5077       # built for inclusion in a dll (and should export symbols for example).
5078       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5079       ;;
5080     sysv4*MP*)
5081       if test -d /usr/nec; then
5082          lt_cv_prog_cc_pic=-Kconform_pic
5083       fi
5084       ;;
5085     *)
5086       lt_cv_prog_cc_pic='-fPIC'
5087       ;;
5088     esac
5089   else
5090     # PORTME Check for PIC flags for the system compiler.
5091     case $host_os in
5092     aix3* | aix4* | aix5*)
5093       lt_cv_prog_cc_wl='-Wl,'
5094       # All AIX code is PIC.
5095       if test "$host_cpu" = ia64; then
5096         # AIX 5 now supports IA64 processor
5097         lt_cv_prog_cc_static='-Bstatic'
5098       else
5099         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5100       fi
5101       ;;
5102
5103     hpux9* | hpux10* | hpux11*)
5104       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5105       lt_cv_prog_cc_wl='-Wl,'
5106       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5107       lt_cv_prog_cc_pic='+Z'
5108       ;;
5109
5110     irix5* | irix6* | nonstopux*)
5111       lt_cv_prog_cc_wl='-Wl,'
5112       lt_cv_prog_cc_static='-non_shared'
5113       # PIC (with -KPIC) is the default.
5114       ;;
5115
5116     cygwin* | mingw* | pw32* | os2*)
5117       # This hack is so that the source file can tell whether it is being
5118       # built for inclusion in a dll (and should export symbols for example).
5119       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5120       ;;
5121
5122     newsos6)
5123       lt_cv_prog_cc_pic='-KPIC'
5124       lt_cv_prog_cc_static='-Bstatic'
5125       ;;
5126
5127     osf3* | osf4* | osf5*)
5128       # All OSF/1 code is PIC.
5129       lt_cv_prog_cc_wl='-Wl,'
5130       lt_cv_prog_cc_static='-non_shared'
5131       ;;
5132
5133     sco3.2v5*)
5134       lt_cv_prog_cc_pic='-Kpic'
5135       lt_cv_prog_cc_static='-dn'
5136       lt_cv_prog_cc_shlib='-belf'
5137       ;;
5138
5139     solaris*)
5140       lt_cv_prog_cc_pic='-KPIC'
5141       lt_cv_prog_cc_static='-Bstatic'
5142       lt_cv_prog_cc_wl='-Wl,'
5143       ;;
5144
5145     sunos4*)
5146       lt_cv_prog_cc_pic='-PIC'
5147       lt_cv_prog_cc_static='-Bstatic'
5148       lt_cv_prog_cc_wl='-Qoption ld '
5149       ;;
5150
5151     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5152       lt_cv_prog_cc_pic='-KPIC'
5153       lt_cv_prog_cc_static='-Bstatic'
5154       lt_cv_prog_cc_wl='-Wl,'
5155       ;;
5156
5157     uts4*)
5158       lt_cv_prog_cc_pic='-pic'
5159       lt_cv_prog_cc_static='-Bstatic'
5160       ;;
5161
5162     sysv4*MP*)
5163       if test -d /usr/nec ;then
5164         lt_cv_prog_cc_pic='-Kconform_pic'
5165         lt_cv_prog_cc_static='-Bstatic'
5166       fi
5167       ;;
5168
5169     *)
5170       lt_cv_prog_cc_can_build_shared=no
5171       ;;
5172     esac
5173   fi
5174
5175 fi
5176
5177 if test -z "$lt_cv_prog_cc_pic"; then
5178   echo "$ac_t""none" 1>&6
5179 else
5180   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5181
5182   # Check to make sure the pic_flag actually works.
5183   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5184 echo "configure:5185: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5185   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5186   echo $ac_n "(cached) $ac_c" 1>&6
5187 else
5188       save_CFLAGS="$CFLAGS"
5189     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
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_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199   rm -rf conftest*
5200         case $host_os in
5201       hpux9* | hpux10* | hpux11*)
5202         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5203         # they create non-PIC objects.  So, if there were any warnings, we
5204         # assume that PIC is not supported.
5205         if test -s conftest.err; then
5206           lt_cv_prog_cc_pic_works=no
5207         else
5208           lt_cv_prog_cc_pic_works=yes
5209         fi
5210         ;;
5211       *)
5212         lt_cv_prog_cc_pic_works=yes
5213         ;;
5214       esac
5215     
5216 else
5217   echo "configure: failed program was:" >&5
5218   cat conftest.$ac_ext >&5
5219   rm -rf conftest*
5220         lt_cv_prog_cc_pic_works=no
5221     
5222 fi
5223 rm -f conftest*
5224     CFLAGS="$save_CFLAGS"
5225   
5226 fi
5227
5228
5229   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5230     lt_cv_prog_cc_pic=
5231     lt_cv_prog_cc_can_build_shared=no
5232   else
5233     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5234   fi
5235
5236   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5237 fi
5238
5239 # Check for any special shared library compilation flags.
5240 if test -n "$lt_cv_prog_cc_shlib"; then
5241   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5242   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5243   else
5244    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5245     lt_cv_prog_cc_can_build_shared=no
5246   fi
5247 fi
5248
5249 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5250 echo "configure:5251: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5251 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5252   echo $ac_n "(cached) $ac_c" 1>&6
5253 else
5254     lt_cv_prog_cc_static_works=no
5255   save_LDFLAGS="$LDFLAGS"
5256   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5257   cat > conftest.$ac_ext <<EOF
5258 #line 5259 "configure"
5259 #include "confdefs.h"
5260
5261 int main() {
5262
5263 ; return 0; }
5264 EOF
5265 if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266   rm -rf conftest*
5267   lt_cv_prog_cc_static_works=yes
5268 else
5269   echo "configure: failed program was:" >&5
5270   cat conftest.$ac_ext >&5
5271 fi
5272 rm -f conftest*
5273   LDFLAGS="$save_LDFLAGS"
5274
5275 fi
5276
5277
5278 # Belt *and* braces to stop my trousers falling down:
5279 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5280 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5281
5282 pic_flag="$lt_cv_prog_cc_pic"
5283 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5284 wl="$lt_cv_prog_cc_wl"
5285 link_static_flag="$lt_cv_prog_cc_static"
5286 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5287 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5288
5289
5290 # Check to see if options -o and -c are simultaneously supported by compiler
5291 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5292 echo "configure:5293: checking if $compiler supports -c -o file.$ac_objext" >&5
5293 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   
5297 $rm -r conftest 2>/dev/null
5298 mkdir conftest
5299 cd conftest
5300 echo "int some_variable = 0;" > conftest.$ac_ext
5301 mkdir out
5302 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5303 # that will create temporary files in the current directory regardless of
5304 # the output directory.  Thus, making CWD read-only will cause this test
5305 # to fail, enabling locking or at least warning the user not to do parallel
5306 # builds.
5307 chmod -w .
5308 save_CFLAGS="$CFLAGS"
5309 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5310 compiler_c_o=no
5311 if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5312   # The compiler can only warn and ignore the option if not recognized
5313   # So say no if there are warnings
5314   if test -s out/conftest.err; then
5315     lt_cv_compiler_c_o=no
5316   else
5317     lt_cv_compiler_c_o=yes
5318   fi
5319 else
5320   # Append any errors to the config.log.
5321   cat out/conftest.err 1>&5
5322   lt_cv_compiler_c_o=no
5323 fi
5324 CFLAGS="$save_CFLAGS"
5325 chmod u+w .
5326 $rm conftest* out/*
5327 rmdir out
5328 cd ..
5329 rmdir conftest
5330 $rm -r conftest 2>/dev/null
5331
5332 fi
5333
5334 compiler_c_o=$lt_cv_compiler_c_o
5335 echo "$ac_t""$compiler_c_o" 1>&6
5336
5337 if test x"$compiler_c_o" = x"yes"; then
5338   # Check to see if we can write to a .lo
5339   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5340 echo "configure:5341: checking if $compiler supports -c -o file.lo" >&5
5341   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5342   echo $ac_n "(cached) $ac_c" 1>&6
5343 else
5344   
5345   lt_cv_compiler_o_lo=no
5346   save_CFLAGS="$CFLAGS"
5347   CFLAGS="$CFLAGS -c -o conftest.lo"
5348   save_objext="$ac_objext"
5349   ac_objext=lo
5350   cat > conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5352 #include "confdefs.h"
5353
5354 int main() {
5355 int some_variable = 0;
5356 ; return 0; }
5357 EOF
5358 if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5359   rm -rf conftest*
5360       # The compiler can only warn and ignore the option if not recognized
5361     # So say no if there are warnings
5362     if test -s conftest.err; then
5363       lt_cv_compiler_o_lo=no
5364     else
5365       lt_cv_compiler_o_lo=yes
5366     fi
5367   
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371 fi
5372 rm -f conftest*
5373   ac_objext="$save_objext"
5374   CFLAGS="$save_CFLAGS"
5375   
5376 fi
5377
5378   compiler_o_lo=$lt_cv_compiler_o_lo
5379   echo "$ac_t""$compiler_o_lo" 1>&6
5380 else
5381   compiler_o_lo=no
5382 fi
5383
5384 # Check to see if we can do hard links to lock some files if needed
5385 hard_links="nottested"
5386 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5387   # do not overwrite the value of need_locks provided by the user
5388   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5389 echo "configure:5390: checking if we can lock with hard links" >&5
5390   hard_links=yes
5391   $rm conftest*
5392   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5393   touch conftest.a
5394   ln conftest.a conftest.b 2>&5 || hard_links=no
5395   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5396   echo "$ac_t""$hard_links" 1>&6
5397   if test "$hard_links" = no; then
5398     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5399     need_locks=warn
5400   fi
5401 else
5402   need_locks=no
5403 fi
5404
5405 if test "$GCC" = yes; then
5406   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5407   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5408 echo "configure:5409: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5409   echo "int some_variable = 0;" > conftest.$ac_ext
5410   save_CFLAGS="$CFLAGS"
5411   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5412   compiler_rtti_exceptions=no
5413   cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416
5417 int main() {
5418 int some_variable = 0;
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5422   rm -rf conftest*
5423       # The compiler can only warn and ignore the option if not recognized
5424     # So say no if there are warnings
5425     if test -s conftest.err; then
5426       compiler_rtti_exceptions=no
5427     else
5428       compiler_rtti_exceptions=yes
5429     fi
5430   
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434 fi
5435 rm -f conftest*
5436   CFLAGS="$save_CFLAGS"
5437   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5438
5439   if test "$compiler_rtti_exceptions" = "yes"; then
5440     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5441   else
5442     no_builtin_flag=' -fno-builtin'
5443   fi
5444 fi
5445
5446 # See if the linker supports building shared libraries.
5447 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5448 echo "configure:5449: checking whether the linker ($LD) supports shared libraries" >&5
5449
5450 allow_undefined_flag=
5451 no_undefined_flag=
5452 need_lib_prefix=unknown
5453 need_version=unknown
5454 # when you set need_version to no, make sure it does not cause -set_version
5455 # flags to be left without arguments
5456 archive_cmds=
5457 archive_expsym_cmds=
5458 old_archive_from_new_cmds=
5459 old_archive_from_expsyms_cmds=
5460 export_dynamic_flag_spec=
5461 whole_archive_flag_spec=
5462 thread_safe_flag_spec=
5463 hardcode_into_libs=no
5464 hardcode_libdir_flag_spec=
5465 hardcode_libdir_separator=
5466 hardcode_direct=no
5467 hardcode_minus_L=no
5468 hardcode_shlibpath_var=unsupported
5469 runpath_var=
5470 link_all_deplibs=unknown
5471 always_export_symbols=no
5472 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5473 # include_expsyms should be a list of space-separated symbols to be *always*
5474 # included in the symbol list
5475 include_expsyms=
5476 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5477 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5478 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5479 # as well as any symbol that contains `d'.
5480 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5481 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5482 # platforms (ab)use it in PIC code, but their linkers get confused if
5483 # the symbol is explicitly referenced.  Since portable code cannot
5484 # rely on this symbol name, it's probably fine to never include it in
5485 # preloaded symbol tables.
5486 extract_expsyms_cmds=
5487
5488 case $host_os in
5489 cygwin* | mingw* | pw32*)
5490   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5491   # When not using gcc, we currently assume that we are using
5492   # Microsoft Visual C++.
5493   if test "$GCC" != yes; then
5494     with_gnu_ld=no
5495   fi
5496   ;;
5497 openbsd*)
5498   with_gnu_ld=no
5499   ;;
5500 esac
5501
5502 ld_shlibs=yes
5503 if test "$with_gnu_ld" = yes; then
5504   # If archive_cmds runs LD, not CC, wlarc should be empty
5505   wlarc='${wl}'
5506
5507   # See if GNU ld supports shared libraries.
5508   case $host_os in
5509   aix3* | aix4* | aix5*)
5510     # On AIX, the GNU linker is very broken
5511     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5512     ld_shlibs=no
5513     cat <<EOF 1>&2
5514
5515 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5516 *** to be unable to reliably create shared libraries on AIX.
5517 *** Therefore, libtool is disabling shared libraries support.  If you
5518 *** really care for shared libraries, you may want to modify your PATH
5519 *** so that a non-GNU linker is found, and then restart.
5520
5521 EOF
5522     ;;
5523
5524   amigaos*)
5525     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)'
5526     hardcode_libdir_flag_spec='-L$libdir'
5527     hardcode_minus_L=yes
5528
5529     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5530     # that the semantics of dynamic libraries on AmigaOS, at least up
5531     # to version 4, is to share data among multiple programs linked
5532     # with the same dynamic library.  Since this doesn't match the
5533     # behavior of shared libraries on other platforms, we can use
5534     # them.
5535     ld_shlibs=no
5536     ;;
5537
5538   beos*)
5539     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5540       allow_undefined_flag=unsupported
5541       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5542       # support --undefined.  This deserves some investigation.  FIXME
5543       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5544     else
5545       ld_shlibs=no
5546     fi
5547     ;;
5548
5549   cygwin* | mingw* | pw32*)
5550     # hardcode_libdir_flag_spec is actually meaningless, as there is
5551     # no search path for DLLs.
5552     hardcode_libdir_flag_spec='-L$libdir'
5553     allow_undefined_flag=unsupported
5554     always_export_symbols=yes
5555
5556     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5557       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5558       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5559       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5560       else $CC -o impgen impgen.c ; fi)~
5561       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5562
5563     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5564
5565     # cygwin and mingw dlls have different entry points and sets of symbols
5566     # to exclude.
5567     # FIXME: what about values for MSVC?
5568     dll_entry=__cygwin_dll_entry@12
5569     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5570     case $host_os in
5571     mingw*)
5572       # mingw values
5573       dll_entry=_DllMainCRTStartup@12
5574       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5575       ;;
5576     esac
5577
5578     # mingw and cygwin differ, and it's simplest to just exclude the union
5579     # of the two symbol sets.
5580     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5581
5582     # recent cygwin and mingw systems supply a stub DllMain which the user
5583     # can override, but on older systems we have to supply one (in ltdll.c)
5584     if test "x$lt_cv_need_dllmain" = "xyes"; then
5585       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5586       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~
5587         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5588     else
5589       ltdll_obj=
5590       ltdll_cmds=
5591     fi
5592
5593     # Extract the symbol export list from an `--export-all' def file,
5594     # then regenerate the def file from the symbol export list, so that
5595     # the compiled dll only exports the symbol export list.
5596     # Be careful not to strip the DATA tag left be newer dlltools.
5597     export_symbols_cmds="$ltdll_cmds"'
5598       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5599       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5600
5601     # If the export-symbols file already is a .def file (1st line
5602     # is EXPORTS), use it as is.
5603     # If DATA tags from a recent dlltool are present, honour them!
5604     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5605         cp $export_symbols $output_objdir/$soname-def;
5606       else
5607         echo EXPORTS > $output_objdir/$soname-def;
5608         _lt_hint=1;
5609         cat $export_symbols | while read symbol; do
5610          set dummy \$symbol;
5611          case \$# in
5612            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5613            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5614            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5615          esac;
5616          _lt_hint=`expr 1 + \$_lt_hint`;
5617         done;
5618       fi~
5619       '"$ltdll_cmds"'
5620       $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~
5621       $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~
5622       $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~
5623       $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~
5624       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5625     ;;
5626
5627   netbsd*)
5628     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5629       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5630       wlarc=
5631     else
5632       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5633       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5634     fi
5635     ;;
5636
5637   solaris* | sysv5*)
5638     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5639       ld_shlibs=no
5640       cat <<EOF 1>&2
5641
5642 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5643 *** create shared libraries on Solaris systems.  Therefore, libtool
5644 *** is disabling shared libraries support.  We urge you to upgrade GNU
5645 *** binutils to release 2.9.1 or newer.  Another option is to modify
5646 *** your PATH or compiler configuration so that the native linker is
5647 *** used, and then restart.
5648
5649 EOF
5650     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5651       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5652       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5653     else
5654       ld_shlibs=no
5655     fi
5656     ;;
5657
5658   sunos4*)
5659     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5660     wlarc=
5661     hardcode_direct=yes
5662     hardcode_shlibpath_var=no
5663     ;;
5664
5665   *)
5666     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5667       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5668       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5669     else
5670       ld_shlibs=no
5671     fi
5672     ;;
5673   esac
5674
5675   if test "$ld_shlibs" = yes; then
5676     runpath_var=LD_RUN_PATH
5677     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5678     export_dynamic_flag_spec='${wl}--export-dynamic'
5679     case $host_os in
5680     cygwin* | mingw* | pw32*)
5681       # dlltool doesn't understand --whole-archive et. al.
5682       whole_archive_flag_spec=
5683       ;;
5684     *)
5685       # ancient GNU ld didn't support --whole-archive et. al.
5686       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5687         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5688       else
5689         whole_archive_flag_spec=
5690       fi
5691       ;;
5692     esac
5693   fi
5694 else
5695   # PORTME fill in a description of your system's linker (not GNU ld)
5696   case $host_os in
5697   aix3*)
5698     allow_undefined_flag=unsupported
5699     always_export_symbols=yes
5700     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'
5701     # Note: this linker hardcodes the directories in LIBPATH if there
5702     # are no directories specified by -L.
5703     hardcode_minus_L=yes
5704     if test "$GCC" = yes && test -z "$link_static_flag"; then
5705       # Neither direct hardcoding nor static linking is supported with a
5706       # broken collect2.
5707       hardcode_direct=unsupported
5708     fi
5709     ;;
5710
5711   aix4* | aix5*)
5712     if test "$host_cpu" = ia64; then
5713       # On IA64, the linker does run time linking by default, so we don't
5714       # have to do anything special.
5715       aix_use_runtimelinking=no
5716       exp_sym_flag='-Bexport'
5717       no_entry_flag=""
5718     else
5719       aix_use_runtimelinking=no
5720
5721       # Test if we are trying to use run time linking or normal
5722       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5723       # need to do runtime linking.
5724       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5725         for ld_flag in $LDFLAGS; do
5726           case $ld_flag in
5727           *-brtl*)
5728             aix_use_runtimelinking=yes
5729             break
5730           ;;
5731           esac
5732         done
5733       esac
5734
5735       exp_sym_flag='-bexport'
5736       no_entry_flag='-bnoentry'
5737     fi
5738
5739     # When large executables or shared objects are built, AIX ld can
5740     # have problems creating the table of contents.  If linking a library
5741     # or program results in "error TOC overflow" add -mminimal-toc to
5742     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5743     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5744
5745     hardcode_direct=yes
5746     archive_cmds=''
5747     hardcode_libdir_separator=':'
5748     if test "$GCC" = yes; then
5749       case $host_os in aix4.[012]|aix4.[012].*)
5750         collect2name=`${CC} -print-prog-name=collect2`
5751         if test -f "$collect2name" && \
5752           strings "$collect2name" | grep resolve_lib_name >/dev/null
5753         then
5754           # We have reworked collect2
5755           hardcode_direct=yes
5756         else
5757           # We have old collect2
5758           hardcode_direct=unsupported
5759           # It fails to find uninstalled libraries when the uninstalled
5760           # path is not listed in the libpath.  Setting hardcode_minus_L
5761           # to unsupported forces relinking
5762           hardcode_minus_L=yes
5763           hardcode_libdir_flag_spec='-L$libdir'
5764           hardcode_libdir_separator=
5765         fi
5766       esac
5767
5768       shared_flag='-shared'
5769     else
5770       # not using gcc
5771       if test "$host_cpu" = ia64; then
5772         shared_flag='${wl}-G'
5773       else
5774         if test "$aix_use_runtimelinking" = yes; then
5775           shared_flag='${wl}-G'
5776         else
5777           shared_flag='${wl}-bM:SRE'
5778         fi
5779       fi
5780     fi
5781
5782     # It seems that -bexpall can do strange things, so it is better to
5783     # generate a list of symbols to export.
5784     always_export_symbols=yes
5785     if test "$aix_use_runtimelinking" = yes; then
5786       # Warning - without using the other runtime loading flags (-brtl),
5787       # -berok will link without error, but may produce a broken library.
5788       allow_undefined_flag='-berok'
5789       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5790       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"
5791     else
5792       if test "$host_cpu" = ia64; then
5793         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5794         allow_undefined_flag="-z nodefs"
5795         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"
5796       else
5797         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5798         # Warning - without using the other run time loading flags,
5799         # -berok will link without error, but may produce a broken library.
5800         allow_undefined_flag='${wl}-berok'
5801         # This is a bit strange, but is similar to how AIX traditionally builds
5802         # it's shared libraries.
5803         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'
5804       fi
5805     fi
5806     ;;
5807
5808   amigaos*)
5809     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)'
5810     hardcode_libdir_flag_spec='-L$libdir'
5811     hardcode_minus_L=yes
5812     # see comment about different semantics on the GNU ld section
5813     ld_shlibs=no
5814     ;;
5815
5816   cygwin* | mingw* | pw32*)
5817     # When not using gcc, we currently assume that we are using
5818     # Microsoft Visual C++.
5819     # hardcode_libdir_flag_spec is actually meaningless, as there is
5820     # no search path for DLLs.
5821     hardcode_libdir_flag_spec=' '
5822     allow_undefined_flag=unsupported
5823     # Tell ltmain to make .lib files, not .a files.
5824     libext=lib
5825     # FIXME: Setting linknames here is a bad hack.
5826     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5827     # The linker will automatically build a .lib file if we build a DLL.
5828     old_archive_from_new_cmds='true'
5829     # FIXME: Should let the user specify the lib program.
5830     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5831     fix_srcfile_path='`cygpath -w "$srcfile"`'
5832     ;;
5833
5834   darwin* | rhapsody*)
5835     case "$host_os" in
5836     rhapsody* | darwin1.[012])
5837       allow_undefined_flag='-undefined suppress'
5838       ;;
5839     *) # Darwin 1.3 on
5840       allow_undefined_flag='-flat_namespace -undefined suppress'
5841       ;;
5842     esac
5843     # FIXME: Relying on posixy $() will cause problems for
5844     #        cross-compilation, but unfortunately the echo tests do not
5845     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5846     #        `"' quotes if we put them in here... so don't!
5847     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)'
5848     # We need to add '_' to the symbols in $export_symbols first
5849     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5850     hardcode_direct=yes
5851     hardcode_shlibpath_var=no
5852     whole_archive_flag_spec='-all_load $convenience'
5853     ;;
5854
5855   freebsd1*)
5856     ld_shlibs=no
5857     ;;
5858
5859   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5860   # support.  Future versions do this automatically, but an explicit c++rt0.o
5861   # does not break anything, and helps significantly (at the cost of a little
5862   # extra space).
5863   freebsd2.2*)
5864     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5865     hardcode_libdir_flag_spec='-R$libdir'
5866     hardcode_direct=yes
5867     hardcode_shlibpath_var=no
5868     ;;
5869
5870   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5871   freebsd2*)
5872     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5873     hardcode_direct=yes
5874     hardcode_minus_L=yes
5875     hardcode_shlibpath_var=no
5876     ;;
5877
5878   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5879   freebsd*)
5880     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5881     hardcode_libdir_flag_spec='-R$libdir'
5882     hardcode_direct=yes
5883     hardcode_shlibpath_var=no
5884     ;;
5885
5886   hpux9* | hpux10* | hpux11*)
5887     case $host_os in
5888     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' ;;
5889     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5890     esac
5891     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5892     hardcode_libdir_separator=:
5893     hardcode_direct=yes
5894     hardcode_minus_L=yes # Not in the search PATH, but as the default
5895                          # location of the library.
5896     export_dynamic_flag_spec='${wl}-E'
5897     ;;
5898
5899   irix5* | irix6* | nonstopux*)
5900     if test "$GCC" = yes; then
5901       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'
5902       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5903     else
5904       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'
5905       hardcode_libdir_flag_spec='-rpath $libdir'
5906     fi
5907     hardcode_libdir_separator=:
5908     link_all_deplibs=yes
5909     ;;
5910
5911   netbsd*)
5912     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5913       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5914     else
5915       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5916     fi
5917     hardcode_libdir_flag_spec='-R$libdir'
5918     hardcode_direct=yes
5919     hardcode_shlibpath_var=no
5920     ;;
5921
5922   newsos6)
5923     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5924     hardcode_direct=yes
5925     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5926     hardcode_libdir_separator=:
5927     hardcode_shlibpath_var=no
5928     ;;
5929
5930   openbsd*)
5931     hardcode_direct=yes
5932     hardcode_shlibpath_var=no
5933     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5934       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5935       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5936       export_dynamic_flag_spec='${wl}-E'
5937     else
5938       case "$host_os" in
5939       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5940         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5941         hardcode_libdir_flag_spec='-R$libdir'
5942         ;;
5943       *)
5944         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5945         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5946         ;;
5947       esac
5948     fi
5949     ;;
5950
5951   os2*)
5952     hardcode_libdir_flag_spec='-L$libdir'
5953     hardcode_minus_L=yes
5954     allow_undefined_flag=unsupported
5955     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'
5956     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5957     ;;
5958
5959   osf3*)
5960     if test "$GCC" = yes; then
5961       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5962       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'
5963     else
5964       allow_undefined_flag=' -expect_unresolved \*'
5965       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'
5966     fi
5967     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5968     hardcode_libdir_separator=:
5969     ;;
5970
5971   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5972     if test "$GCC" = yes; then
5973       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5974       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'
5975       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5976     else
5977       allow_undefined_flag=' -expect_unresolved \*'
5978       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'
5979       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5980       $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'
5981
5982       #Both c and cxx compiler support -rpath directly
5983       hardcode_libdir_flag_spec='-rpath $libdir'
5984     fi
5985     hardcode_libdir_separator=:
5986     ;;
5987
5988   sco3.2v5*)
5989     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990     hardcode_shlibpath_var=no
5991     runpath_var=LD_RUN_PATH
5992     hardcode_runpath_var=yes
5993     export_dynamic_flag_spec='${wl}-Bexport'
5994     ;;
5995
5996   solaris*)
5997     # gcc --version < 3.0 without binutils cannot create self contained
5998     # shared libraries reliably, requiring libgcc.a to resolve some of
5999     # the object symbols generated in some cases.  Libraries that use
6000     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6001     # a copy of libgcc.a into every shared library to guarantee resolving
6002     # such symbols causes other problems:  According to Tim Van Holder
6003     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6004     # (to the application) exception stack for one thing.
6005     no_undefined_flag=' -z defs'
6006     if test "$GCC" = yes; then
6007       case `$CC --version 2>/dev/null` in
6008       [12].*)
6009         cat <<EOF 1>&2
6010
6011 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6012 *** create self contained shared libraries on Solaris systems, without
6013 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6014 *** -no-undefined support, which will at least allow you to build shared
6015 *** libraries.  However, you may find that when you link such libraries
6016 *** into an application without using GCC, you have to manually add
6017 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6018 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6019 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6020
6021 EOF
6022         no_undefined_flag=
6023         ;;
6024       esac
6025     fi
6026     # $CC -shared without GNU ld will not create a library from C++
6027     # object files and a static libstdc++, better avoid it by now
6028     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6029     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6030                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6031     hardcode_libdir_flag_spec='-R$libdir'
6032     hardcode_shlibpath_var=no
6033     case $host_os in
6034     solaris2.[0-5] | solaris2.[0-5].*) ;;
6035     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6036       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6037     esac
6038     link_all_deplibs=yes
6039     ;;
6040
6041   sunos4*)
6042     if test "x$host_vendor" = xsequent; then
6043       # Use $CC to link under sequent, because it throws in some extra .o
6044       # files that make .init and .fini sections work.
6045       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6046     else
6047       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6048     fi
6049     hardcode_libdir_flag_spec='-L$libdir'
6050     hardcode_direct=yes
6051     hardcode_minus_L=yes
6052     hardcode_shlibpath_var=no
6053     ;;
6054
6055   sysv4)
6056     case $host_vendor in
6057       sni)
6058         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6059         hardcode_direct=yes # is this really true???
6060         ;;
6061       siemens)
6062         ## LD is ld it makes a PLAMLIB
6063         ## CC just makes a GrossModule.
6064         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6065         reload_cmds='$CC -r -o $output$reload_objs'
6066         hardcode_direct=no
6067         ;;
6068       motorola)
6069         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6070         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6071         ;;
6072     esac
6073     runpath_var='LD_RUN_PATH'
6074     hardcode_shlibpath_var=no
6075     ;;
6076
6077   sysv4.3*)
6078     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6079     hardcode_shlibpath_var=no
6080     export_dynamic_flag_spec='-Bexport'
6081     ;;
6082
6083   sysv5*)
6084     no_undefined_flag=' -z text'
6085     # $CC -shared without GNU ld will not create a library from C++
6086     # object files and a static libstdc++, better avoid it by now
6087     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6088     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6089                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6090     hardcode_libdir_flag_spec=
6091     hardcode_shlibpath_var=no
6092     runpath_var='LD_RUN_PATH'
6093     ;;
6094
6095   uts4*)
6096     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6097     hardcode_libdir_flag_spec='-L$libdir'
6098     hardcode_shlibpath_var=no
6099     ;;
6100
6101   dgux*)
6102     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6103     hardcode_libdir_flag_spec='-L$libdir'
6104     hardcode_shlibpath_var=no
6105     ;;
6106
6107   sysv4*MP*)
6108     if test -d /usr/nec; then
6109       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6110       hardcode_shlibpath_var=no
6111       runpath_var=LD_RUN_PATH
6112       hardcode_runpath_var=yes
6113       ld_shlibs=yes
6114     fi
6115     ;;
6116
6117   sysv4.2uw2*)
6118     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6119     hardcode_direct=yes
6120     hardcode_minus_L=no
6121     hardcode_shlibpath_var=no
6122     hardcode_runpath_var=yes
6123     runpath_var=LD_RUN_PATH
6124     ;;
6125
6126   sysv5uw7* | unixware7*)
6127     no_undefined_flag='${wl}-z ${wl}text'
6128     if test "$GCC" = yes; then
6129       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6130     else
6131       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6132     fi
6133     runpath_var='LD_RUN_PATH'
6134     hardcode_shlibpath_var=no
6135     ;;
6136
6137   *)
6138     ld_shlibs=no
6139     ;;
6140   esac
6141 fi
6142 echo "$ac_t""$ld_shlibs" 1>&6
6143 test "$ld_shlibs" = no && can_build_shared=no
6144
6145 # Check hardcoding attributes.
6146 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6147 echo "configure:6148: checking how to hardcode library paths into programs" >&5
6148 hardcode_action=
6149 if test -n "$hardcode_libdir_flag_spec" || \
6150    test -n "$runpath_var"; then
6151
6152   # We can hardcode non-existant directories.
6153   if test "$hardcode_direct" != no &&
6154      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6155      # have to relink, otherwise we might link with an installed library
6156      # when we should be linking with a yet-to-be-installed one
6157      ## test "$hardcode_shlibpath_var" != no &&
6158      test "$hardcode_minus_L" != no; then
6159     # Linking always hardcodes the temporary library directory.
6160     hardcode_action=relink
6161   else
6162     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6163     hardcode_action=immediate
6164   fi
6165 else
6166   # We cannot hardcode anything, or else we can only hardcode existing
6167   # directories.
6168   hardcode_action=unsupported
6169 fi
6170 echo "$ac_t""$hardcode_action" 1>&6
6171
6172 striplib=
6173 old_striplib=
6174 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6175 echo "configure:6176: checking whether stripping libraries is possible" >&5
6176 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6177   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6178   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6179   echo "$ac_t""yes" 1>&6
6180 else
6181   echo "$ac_t""no" 1>&6
6182 fi
6183
6184 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6185 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6186
6187 # PORTME Fill in your ld.so characteristics
6188 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6189 echo "configure:6190: checking dynamic linker characteristics" >&5
6190 library_names_spec=
6191 libname_spec='lib$name'
6192 soname_spec=
6193 postinstall_cmds=
6194 postuninstall_cmds=
6195 finish_cmds=
6196 finish_eval=
6197 shlibpath_var=
6198 shlibpath_overrides_runpath=unknown
6199 version_type=none
6200 dynamic_linker="$host_os ld.so"
6201 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6202 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6203
6204 case $host_os in
6205 aix3*)
6206   version_type=linux
6207   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6208   shlibpath_var=LIBPATH
6209
6210   # AIX has no versioning support, so we append a major version to the name.
6211   soname_spec='${libname}${release}.so$major'
6212   ;;
6213
6214 aix4* | aix5*)
6215   version_type=linux
6216   need_lib_prefix=no
6217   need_version=no
6218   hardcode_into_libs=yes
6219   if test "$host_cpu" = ia64; then
6220     # AIX 5 supports IA64
6221     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6222     shlibpath_var=LD_LIBRARY_PATH
6223   else
6224     # With GCC up to 2.95.x, collect2 would create an import file
6225     # for dependence libraries.  The import file would start with
6226     # the line `#! .'.  This would cause the generated library to
6227     # depend on `.', always an invalid library.  This was fixed in
6228     # development snapshots of GCC prior to 3.0.
6229     case $host_os in
6230       aix4 | aix4.[01] | aix4.[01].*)
6231         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6232              echo ' yes '
6233              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6234           :
6235         else
6236           can_build_shared=no
6237         fi
6238         ;;
6239     esac
6240     # AIX (on Power*) has no versioning support, so currently we can
6241     # not hardcode correct soname into executable. Probably we can
6242     # add versioning support to collect2, so additional links can
6243     # be useful in future.
6244     if test "$aix_use_runtimelinking" = yes; then
6245       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6246       # instead of lib<name>.a to let people know that these are not
6247       # typical AIX shared libraries.
6248       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6249     else
6250       # We preserve .a as extension for shared libraries through AIX4.2
6251       # and later when we are not doing run time linking.
6252       library_names_spec='${libname}${release}.a $libname.a'
6253       soname_spec='${libname}${release}.so$major'
6254     fi
6255     shlibpath_var=LIBPATH
6256   fi
6257   hardcode_into_libs=yes
6258   ;;
6259
6260 amigaos*)
6261   library_names_spec='$libname.ixlibrary $libname.a'
6262   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6263   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'
6264   ;;
6265
6266 beos*)
6267   library_names_spec='${libname}.so'
6268   dynamic_linker="$host_os ld.so"
6269   shlibpath_var=LIBRARY_PATH
6270   ;;
6271
6272 bsdi4*)
6273   version_type=linux
6274   need_version=no
6275   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6276   soname_spec='${libname}${release}.so$major'
6277   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6278   shlibpath_var=LD_LIBRARY_PATH
6279   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6280   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6281   export_dynamic_flag_spec=-rdynamic
6282   # the default ld.so.conf also contains /usr/contrib/lib and
6283   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6284   # libtool to hard-code these into programs
6285   ;;
6286
6287 cygwin* | mingw* | pw32*)
6288   version_type=windows
6289   need_version=no
6290   need_lib_prefix=no
6291   case $GCC,$host_os in
6292   yes,cygwin*)
6293     library_names_spec='$libname.dll.a'
6294     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6295     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6296       dldir=$destdir/`dirname \$dlpath`~
6297       test -d \$dldir || mkdir -p \$dldir~
6298       $install_prog .libs/$dlname \$dldir/$dlname'
6299     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6300       dlpath=$dir/\$dldll~
6301        $rm \$dlpath'
6302     ;;
6303   yes,mingw*)
6304     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6305     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6306     ;;
6307   yes,pw32*)
6308     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6309     ;;
6310   *)
6311     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6312     ;;
6313   esac
6314   dynamic_linker='Win32 ld.exe'
6315   # FIXME: first we should search . and the directory the executable is in
6316   shlibpath_var=PATH
6317   ;;
6318
6319 darwin* | rhapsody*)
6320   dynamic_linker="$host_os dyld"
6321   version_type=darwin
6322   need_lib_prefix=no
6323   need_version=no
6324   # FIXME: Relying on posixy $() will cause problems for
6325   #        cross-compilation, but unfortunately the echo tests do not
6326   #        yet detect zsh echo's removal of \ escapes.
6327   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)'
6328   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6329   shlibpath_overrides_runpath=yes
6330   shlibpath_var=DYLD_LIBRARY_PATH
6331   ;;
6332
6333 freebsd1*)
6334   dynamic_linker=no
6335   ;;
6336
6337 freebsd*)
6338   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6339   version_type=freebsd-$objformat
6340   case $version_type in
6341     freebsd-elf*)
6342       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6343       need_version=no
6344       need_lib_prefix=no
6345       ;;
6346     freebsd-*)
6347       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6348       need_version=yes
6349       ;;
6350   esac
6351   shlibpath_var=LD_LIBRARY_PATH
6352   case $host_os in
6353   freebsd2*)
6354     shlibpath_overrides_runpath=yes
6355     ;;
6356   *)
6357     shlibpath_overrides_runpath=no
6358     hardcode_into_libs=yes
6359     ;;
6360   esac
6361   ;;
6362
6363 gnu*)
6364   version_type=linux
6365   need_lib_prefix=no
6366   need_version=no
6367   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6368   soname_spec='${libname}${release}.so$major'
6369   shlibpath_var=LD_LIBRARY_PATH
6370   hardcode_into_libs=yes
6371   ;;
6372
6373 hpux9* | hpux10* | hpux11*)
6374   # Give a soname corresponding to the major version so that dld.sl refuses to
6375   # link against other versions.
6376   dynamic_linker="$host_os dld.sl"
6377   version_type=sunos
6378   need_lib_prefix=no
6379   need_version=no
6380   shlibpath_var=SHLIB_PATH
6381   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6382   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6383   soname_spec='${libname}${release}.sl$major'
6384   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6385   postinstall_cmds='chmod 555 $lib'
6386   ;;
6387
6388 irix5* | irix6* | nonstopux*)
6389   case $host_os in
6390     nonstopux*) version_type=nonstopux ;;
6391     *)          version_type=irix ;;
6392   esac
6393   need_lib_prefix=no
6394   need_version=no
6395   soname_spec='${libname}${release}.so$major'
6396   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6397   case $host_os in
6398   irix5* | nonstopux*)
6399     libsuff= shlibsuff=
6400     ;;
6401   *)
6402     case $LD in # libtool.m4 will add one of these switches to LD
6403     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6404     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6405     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6406     *) libsuff= shlibsuff= libmagic=never-match;;
6407     esac
6408     ;;
6409   esac
6410   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6411   shlibpath_overrides_runpath=no
6412   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6413   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6414   ;;
6415
6416 # No shared lib support for Linux oldld, aout, or coff.
6417 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6418   dynamic_linker=no
6419   ;;
6420
6421 # This must be Linux ELF.
6422 linux-gnu*)
6423   version_type=linux
6424   need_lib_prefix=no
6425   need_version=no
6426   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6427   soname_spec='${libname}${release}.so$major'
6428   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6429   shlibpath_var=LD_LIBRARY_PATH
6430   shlibpath_overrides_runpath=no
6431   # This implies no fast_install, which is unacceptable.
6432   # Some rework will be needed to allow for fast_install
6433   # before this can be enabled.
6434   hardcode_into_libs=yes
6435
6436   # We used to test for /lib/ld.so.1 and disable shared libraries on
6437   # powerpc, because MkLinux only supported shared libraries with the
6438   # GNU dynamic linker.  Since this was broken with cross compilers,
6439   # most powerpc-linux boxes support dynamic linking these days and
6440   # people can always --disable-shared, the test was removed, and we
6441   # assume the GNU/Linux dynamic linker is in use.
6442   dynamic_linker='GNU/Linux ld.so'
6443   ;;
6444
6445 netbsd*)
6446   version_type=sunos
6447   need_lib_prefix=no
6448   need_version=no
6449   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6450     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6451     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6452     dynamic_linker='NetBSD (a.out) ld.so'
6453   else
6454     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6455     soname_spec='${libname}${release}.so$major'
6456     dynamic_linker='NetBSD ld.elf_so'
6457   fi
6458   shlibpath_var=LD_LIBRARY_PATH
6459   shlibpath_overrides_runpath=yes
6460   hardcode_into_libs=yes
6461   ;;
6462
6463 newsos6)
6464   version_type=linux
6465   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6466   shlibpath_var=LD_LIBRARY_PATH
6467   shlibpath_overrides_runpath=yes
6468   ;;
6469
6470 openbsd*)
6471   version_type=sunos
6472   need_lib_prefix=no
6473   need_version=no
6474   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6475     case "$host_os" in
6476     openbsd2.[89] | openbsd2.[89].*)
6477       shlibpath_overrides_runpath=no
6478       ;;
6479     *)
6480       shlibpath_overrides_runpath=yes
6481       ;;
6482     esac
6483   else
6484     shlibpath_overrides_runpath=yes
6485   fi
6486   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6487   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6488   shlibpath_var=LD_LIBRARY_PATH
6489   ;;
6490
6491 os2*)
6492   libname_spec='$name'
6493   need_lib_prefix=no
6494   library_names_spec='$libname.dll $libname.a'
6495   dynamic_linker='OS/2 ld.exe'
6496   shlibpath_var=LIBPATH
6497   ;;
6498
6499 osf3* | osf4* | osf5*)
6500   version_type=osf
6501   need_version=no
6502   soname_spec='${libname}${release}.so$major'
6503   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6504   shlibpath_var=LD_LIBRARY_PATH
6505   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6506   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6507   hardcode_into_libs=yes
6508   ;;
6509
6510 sco3.2v5*)
6511   version_type=osf
6512   soname_spec='${libname}${release}.so$major'
6513   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6514   shlibpath_var=LD_LIBRARY_PATH
6515   ;;
6516
6517 solaris*)
6518   version_type=linux
6519   need_lib_prefix=no
6520   need_version=no
6521   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6522   soname_spec='${libname}${release}.so$major'
6523   shlibpath_var=LD_LIBRARY_PATH
6524   shlibpath_overrides_runpath=yes
6525   hardcode_into_libs=yes
6526   # ldd complains unless libraries are executable
6527   postinstall_cmds='chmod +x $lib'
6528   ;;
6529
6530 sunos4*)
6531   version_type=sunos
6532   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6533   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6534   shlibpath_var=LD_LIBRARY_PATH
6535   shlibpath_overrides_runpath=yes
6536   if test "$with_gnu_ld" = yes; then
6537     need_lib_prefix=no
6538   fi
6539   need_version=yes
6540   ;;
6541
6542 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6543   version_type=linux
6544   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6545   soname_spec='${libname}${release}.so$major'
6546   shlibpath_var=LD_LIBRARY_PATH
6547   case $host_vendor in
6548     sni)
6549       shlibpath_overrides_runpath=no
6550       need_lib_prefix=no
6551       export_dynamic_flag_spec='${wl}-Blargedynsym'
6552       runpath_var=LD_RUN_PATH
6553       ;;
6554     siemens)
6555       need_lib_prefix=no
6556       ;;
6557     motorola)
6558       need_lib_prefix=no
6559       need_version=no
6560       shlibpath_overrides_runpath=no
6561       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6562       ;;
6563   esac
6564   ;;
6565
6566 uts4*)
6567   version_type=linux
6568   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6569   soname_spec='${libname}${release}.so$major'
6570   shlibpath_var=LD_LIBRARY_PATH
6571   ;;
6572
6573 dgux*)
6574   version_type=linux
6575   need_lib_prefix=no
6576   need_version=no
6577   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6578   soname_spec='${libname}${release}.so$major'
6579   shlibpath_var=LD_LIBRARY_PATH
6580   ;;
6581
6582 sysv4*MP*)
6583   if test -d /usr/nec ;then
6584     version_type=linux
6585     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6586     soname_spec='$libname.so.$major'
6587     shlibpath_var=LD_LIBRARY_PATH
6588   fi
6589   ;;
6590
6591 *)
6592   dynamic_linker=no
6593   ;;
6594 esac
6595 echo "$ac_t""$dynamic_linker" 1>&6
6596 test "$dynamic_linker" = no && can_build_shared=no
6597
6598 # Report the final consequences.
6599 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6600 echo "configure:6601: checking if libtool supports shared libraries" >&5
6601 echo "$ac_t""$can_build_shared" 1>&6
6602
6603 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6604 echo "configure:6605: checking whether to build shared libraries" >&5
6605 test "$can_build_shared" = "no" && enable_shared=no
6606
6607 # On AIX, shared libraries and static libraries use the same namespace, and
6608 # are all built from PIC.
6609 case "$host_os" in
6610 aix3*)
6611   test "$enable_shared" = yes && enable_static=no
6612   if test -n "$RANLIB"; then
6613     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6614     postinstall_cmds='$RANLIB $lib'
6615   fi
6616   ;;
6617
6618 aix4*)
6619   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6620     test "$enable_shared" = yes && enable_static=no
6621   fi
6622   ;;
6623 esac
6624 echo "$ac_t""$enable_shared" 1>&6
6625
6626 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6627 echo "configure:6628: checking whether to build static libraries" >&5
6628 # Make sure either enable_shared or enable_static is yes.
6629 test "$enable_shared" = yes || enable_static=yes
6630 echo "$ac_t""$enable_static" 1>&6
6631
6632 if test "$hardcode_action" = relink; then
6633   # Fast installation is not supported
6634   enable_fast_install=no
6635 elif test "$shlibpath_overrides_runpath" = yes ||
6636      test "$enable_shared" = no; then
6637   # Fast installation is not necessary
6638   enable_fast_install=needless
6639 fi
6640
6641 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6642 if test "$GCC" = yes; then
6643   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6644 fi
6645
6646 if test "x$enable_dlopen" != xyes; then
6647   enable_dlopen=unknown
6648   enable_dlopen_self=unknown
6649   enable_dlopen_self_static=unknown
6650 else
6651   lt_cv_dlopen=no
6652   lt_cv_dlopen_libs=
6653
6654   case $host_os in
6655   beos*)
6656     lt_cv_dlopen="load_add_on"
6657     lt_cv_dlopen_libs=
6658     lt_cv_dlopen_self=yes
6659     ;;
6660
6661   cygwin* | mingw* | pw32*)
6662     lt_cv_dlopen="LoadLibrary"
6663     lt_cv_dlopen_libs=
6664    ;;
6665
6666   *)
6667     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6668 echo "configure:6669: checking for shl_load" >&5
6669 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6670   echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672   cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 /* System header to define __stub macros and hopefully few prototypes,
6676     which can conflict with char shl_load(); below.  */
6677 #include <assert.h>
6678 /* Override any gcc2 internal prototype to avoid an error.  */
6679 /* We use char because int might match the return type of a gcc2
6680     builtin and then its argument prototype would still apply.  */
6681 char shl_load();
6682 char (*f)();
6683
6684 int main() {
6685
6686 /* The GNU C library defines this for functions which it implements
6687     to always fail with ENOSYS.  Some functions are actually named
6688     something starting with __ and the normal name is an alias.  */
6689 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6690 choke me
6691 #else
6692 f = shl_load;
6693 #endif
6694
6695 ; return 0; }
6696 EOF
6697 if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6698   rm -rf conftest*
6699   eval "ac_cv_func_shl_load=yes"
6700 else
6701   echo "configure: failed program was:" >&5
6702   cat conftest.$ac_ext >&5
6703   rm -rf conftest*
6704   eval "ac_cv_func_shl_load=no"
6705 fi
6706 rm -f conftest*
6707 fi
6708
6709 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6710   echo "$ac_t""yes" 1>&6
6711   lt_cv_dlopen="shl_load"
6712 else
6713   echo "$ac_t""no" 1>&6
6714 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6715 echo "configure:6716: checking for shl_load in -ldld" >&5
6716 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6718   echo $ac_n "(cached) $ac_c" 1>&6
6719 else
6720   ac_save_LIBS="$LIBS"
6721 LIBS="-ldld  $LIBS"
6722 cat > conftest.$ac_ext <<EOF
6723 #line 6724 "configure"
6724 #include "confdefs.h"
6725 /* Override any gcc2 internal prototype to avoid an error.  */
6726 /* We use char because int might match the return type of a gcc2
6727     builtin and then its argument prototype would still apply.  */
6728 char shl_load();
6729
6730 int main() {
6731 shl_load()
6732 ; return 0; }
6733 EOF
6734 if { (eval echo configure:6735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6735   rm -rf conftest*
6736   eval "ac_cv_lib_$ac_lib_var=yes"
6737 else
6738   echo "configure: failed program was:" >&5
6739   cat conftest.$ac_ext >&5
6740   rm -rf conftest*
6741   eval "ac_cv_lib_$ac_lib_var=no"
6742 fi
6743 rm -f conftest*
6744 LIBS="$ac_save_LIBS"
6745
6746 fi
6747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6748   echo "$ac_t""yes" 1>&6
6749   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6750 else
6751   echo "$ac_t""no" 1>&6
6752 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6753 echo "configure:6754: checking for dlopen" >&5
6754 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6755   echo $ac_n "(cached) $ac_c" 1>&6
6756 else
6757   cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 /* System header to define __stub macros and hopefully few prototypes,
6761     which can conflict with char dlopen(); below.  */
6762 #include <assert.h>
6763 /* Override any gcc2 internal prototype to avoid an error.  */
6764 /* We use char because int might match the return type of a gcc2
6765     builtin and then its argument prototype would still apply.  */
6766 char dlopen();
6767 char (*f)();
6768
6769 int main() {
6770
6771 /* The GNU C library defines this for functions which it implements
6772     to always fail with ENOSYS.  Some functions are actually named
6773     something starting with __ and the normal name is an alias.  */
6774 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6775 choke me
6776 #else
6777 f = dlopen;
6778 #endif
6779
6780 ; return 0; }
6781 EOF
6782 if { (eval echo configure:6783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6783   rm -rf conftest*
6784   eval "ac_cv_func_dlopen=yes"
6785 else
6786   echo "configure: failed program was:" >&5
6787   cat conftest.$ac_ext >&5
6788   rm -rf conftest*
6789   eval "ac_cv_func_dlopen=no"
6790 fi
6791 rm -f conftest*
6792 fi
6793
6794 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6795   echo "$ac_t""yes" 1>&6
6796   lt_cv_dlopen="dlopen"
6797 else
6798   echo "$ac_t""no" 1>&6
6799 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6800 echo "configure:6801: checking for dlopen in -ldl" >&5
6801 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6803   echo $ac_n "(cached) $ac_c" 1>&6
6804 else
6805   ac_save_LIBS="$LIBS"
6806 LIBS="-ldl  $LIBS"
6807 cat > conftest.$ac_ext <<EOF
6808 #line 6809 "configure"
6809 #include "confdefs.h"
6810 /* Override any gcc2 internal prototype to avoid an error.  */
6811 /* We use char because int might match the return type of a gcc2
6812     builtin and then its argument prototype would still apply.  */
6813 char dlopen();
6814
6815 int main() {
6816 dlopen()
6817 ; return 0; }
6818 EOF
6819 if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6820   rm -rf conftest*
6821   eval "ac_cv_lib_$ac_lib_var=yes"
6822 else
6823   echo "configure: failed program was:" >&5
6824   cat conftest.$ac_ext >&5
6825   rm -rf conftest*
6826   eval "ac_cv_lib_$ac_lib_var=no"
6827 fi
6828 rm -f conftest*
6829 LIBS="$ac_save_LIBS"
6830
6831 fi
6832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6833   echo "$ac_t""yes" 1>&6
6834   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6835 else
6836   echo "$ac_t""no" 1>&6
6837 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6838 echo "configure:6839: checking for dlopen in -lsvld" >&5
6839 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6840 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6841   echo $ac_n "(cached) $ac_c" 1>&6
6842 else
6843   ac_save_LIBS="$LIBS"
6844 LIBS="-lsvld  $LIBS"
6845 cat > conftest.$ac_ext <<EOF
6846 #line 6847 "configure"
6847 #include "confdefs.h"
6848 /* Override any gcc2 internal prototype to avoid an error.  */
6849 /* We use char because int might match the return type of a gcc2
6850     builtin and then its argument prototype would still apply.  */
6851 char dlopen();
6852
6853 int main() {
6854 dlopen()
6855 ; return 0; }
6856 EOF
6857 if { (eval echo configure:6858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6858   rm -rf conftest*
6859   eval "ac_cv_lib_$ac_lib_var=yes"
6860 else
6861   echo "configure: failed program was:" >&5
6862   cat conftest.$ac_ext >&5
6863   rm -rf conftest*
6864   eval "ac_cv_lib_$ac_lib_var=no"
6865 fi
6866 rm -f conftest*
6867 LIBS="$ac_save_LIBS"
6868
6869 fi
6870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6871   echo "$ac_t""yes" 1>&6
6872   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6873 else
6874   echo "$ac_t""no" 1>&6
6875 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6876 echo "configure:6877: checking for dld_link in -ldld" >&5
6877 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6878 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6879   echo $ac_n "(cached) $ac_c" 1>&6
6880 else
6881   ac_save_LIBS="$LIBS"
6882 LIBS="-ldld  $LIBS"
6883 cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 /* Override any gcc2 internal prototype to avoid an error.  */
6887 /* We use char because int might match the return type of a gcc2
6888     builtin and then its argument prototype would still apply.  */
6889 char dld_link();
6890
6891 int main() {
6892 dld_link()
6893 ; return 0; }
6894 EOF
6895 if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6896   rm -rf conftest*
6897   eval "ac_cv_lib_$ac_lib_var=yes"
6898 else
6899   echo "configure: failed program was:" >&5
6900   cat conftest.$ac_ext >&5
6901   rm -rf conftest*
6902   eval "ac_cv_lib_$ac_lib_var=no"
6903 fi
6904 rm -f conftest*
6905 LIBS="$ac_save_LIBS"
6906
6907 fi
6908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6909   echo "$ac_t""yes" 1>&6
6910   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6911 else
6912   echo "$ac_t""no" 1>&6
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 # test for ln hardlink support
7771 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7772 echo "configure:7773: checking whether ln works" >&5
7773 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7774   echo $ac_n "(cached) $ac_c" 1>&6
7775 else
7776   rm -f conftest.src conftest.dst
7777 echo "conftest" > conftest.src
7778 if ln conftest.src conftest.dst 2>/dev/null
7779 then
7780   ol_cv_prog_LN_H="ln"
7781 else
7782   ol_cv_prog_LN_H="cp"
7783 fi
7784 rm -f conftest.src conftest.dst
7785
7786 fi
7787 LN_H="$ol_cv_prog_LN_H"
7788 if test "$ol_cv_prog_LN_H" = "ln"; then
7789         echo "$ac_t""yes" 1>&6
7790 else
7791         echo "$ac_t""no" 1>&6
7792 fi
7793
7794 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7795 echo "configure:7796: checking whether ln -s works" >&5
7796 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799   rm -f conftestdata
7800 if ln -s X conftestdata 2>/dev/null
7801 then
7802   rm -f conftestdata
7803   ac_cv_prog_LN_S="ln -s"
7804 else
7805   ac_cv_prog_LN_S=ln
7806 fi
7807 fi
7808 LN_S="$ac_cv_prog_LN_S"
7809 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7810   echo "$ac_t""yes" 1>&6
7811 else
7812   echo "$ac_t""no" 1>&6
7813 fi
7814
7815
7816 ol_link_perl=no
7817 if test $ol_enable_perl != no ; then
7818         # Extract the first word of "perl", so it can be a program name with args.
7819 set dummy perl; ac_word=$2
7820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7821 echo "configure:7822: checking for $ac_word" >&5
7822 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7823   echo $ac_n "(cached) $ac_c" 1>&6
7824 else
7825   case "$PERLBIN" in
7826   /*)
7827   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7828   ;;
7829   ?:/*)
7830   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7831   ;;
7832   *)
7833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7834   ac_dummy="$PATH"
7835   for ac_dir in $ac_dummy; do 
7836     test -z "$ac_dir" && ac_dir=.
7837     if test -f $ac_dir/$ac_word; then
7838       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7839       break
7840     fi
7841   done
7842   IFS="$ac_save_ifs"
7843   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7844   ;;
7845 esac
7846 fi
7847 PERLBIN="$ac_cv_path_PERLBIN"
7848 if test -n "$PERLBIN"; then
7849   echo "$ac_t""$PERLBIN" 1>&6
7850 else
7851   echo "$ac_t""no" 1>&6
7852 fi
7853
7854
7855         if test "no$PERLBIN" = "no" ; then
7856                 if test $ol_enable_perl = yes ; then
7857                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7858                 fi
7859
7860         else
7861                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7862                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7863
7864                 if test x"$ol_with_perl_module" = "xstatic" ; then
7865                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7866                 else
7867                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7868                 fi
7869                                 ol_link_perl=yes
7870         fi
7871 fi
7872
7873 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7874 echo "configure:7875: checking how to run the C preprocessor" >&5
7875 # On Suns, sometimes $CPP names a directory.
7876 if test -n "$CPP" && test -d "$CPP"; then
7877   CPP=
7878 fi
7879 if test -z "$CPP"; then
7880 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7881   echo $ac_n "(cached) $ac_c" 1>&6
7882 else
7883     # This must be in double quotes, not single quotes, because CPP may get
7884   # substituted into the Makefile and "${CC-cc}" will confuse make.
7885   CPP="${CC-cc} -E"
7886   # On the NeXT, cc -E runs the code through the compiler's parser,
7887   # not just through cpp.
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 #include <assert.h>
7892 Syntax Error
7893 EOF
7894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7895 { (eval echo configure:7896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7897 if test -z "$ac_err"; then
7898   :
7899 else
7900   echo "$ac_err" >&5
7901   echo "configure: failed program was:" >&5
7902   cat conftest.$ac_ext >&5
7903   rm -rf conftest*
7904   CPP="${CC-cc} -E -traditional-cpp"
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 #include <assert.h>
7909 Syntax Error
7910 EOF
7911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7912 { (eval echo configure:7913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7914 if test -z "$ac_err"; then
7915   :
7916 else
7917   echo "$ac_err" >&5
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921   CPP="${CC-cc} -nologo -E"
7922   cat > conftest.$ac_ext <<EOF
7923 #line 7924 "configure"
7924 #include "confdefs.h"
7925 #include <assert.h>
7926 Syntax Error
7927 EOF
7928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7929 { (eval echo configure:7930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7931 if test -z "$ac_err"; then
7932   :
7933 else
7934   echo "$ac_err" >&5
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   CPP=/lib/cpp
7939 fi
7940 rm -f conftest*
7941 fi
7942 rm -f conftest*
7943 fi
7944 rm -f conftest*
7945   ac_cv_prog_CPP="$CPP"
7946 fi
7947   CPP="$ac_cv_prog_CPP"
7948 else
7949   ac_cv_prog_CPP="$CPP"
7950 fi
7951 echo "$ac_t""$CPP" 1>&6
7952
7953
7954 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7955         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7956
7957 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7958         echo "configure: warning: programs compiled here do run here..." 1>&2
7959         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7960
7961 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7962         echo "configure: warning: programs compiled here do not run here..." 1>&2
7963         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7964 fi
7965
7966
7967 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7968 echo "configure:7969: checking for Cygwin environment" >&5
7969 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7970   echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972   cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975
7976 int main() {
7977
7978 #ifndef __CYGWIN__
7979 #define __CYGWIN__ __CYGWIN32__
7980 #endif
7981 return __CYGWIN__;
7982 ; return 0; }
7983 EOF
7984 if { (eval echo configure:7985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7985   rm -rf conftest*
7986   ac_cv_cygwin=yes
7987 else
7988   echo "configure: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   rm -rf conftest*
7991   ac_cv_cygwin=no
7992 fi
7993 rm -f conftest*
7994 fi
7995
7996 echo "$ac_t""$ac_cv_cygwin" 1>&6
7997 CYGWIN=
7998 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7999 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8000 echo "configure:8001: checking for mingw32 environment" >&5
8001 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007
8008 int main() {
8009 return __MINGW32__;
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8013   rm -rf conftest*
8014   ac_cv_mingw32=yes
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   ac_cv_mingw32=no
8020 fi
8021 rm -f conftest*
8022 fi
8023
8024 echo "$ac_t""$ac_cv_mingw32" 1>&6
8025 MINGW32=
8026 test "$ac_cv_mingw32" = yes && MINGW32=yes
8027
8028
8029
8030 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8031 echo "configure:8032: checking for executable suffix" >&5
8032 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8036   ac_cv_exeext=.exe
8037 else
8038   rm -f conftest*
8039   echo 'int main () { return 0; }' > conftest.$ac_ext
8040   ac_cv_exeext=
8041   if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8042     for file in conftest.*; do
8043       case $file in
8044       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8045       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8046       esac
8047     done
8048   else
8049     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8050   fi
8051   rm -f conftest*
8052   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8053 fi
8054 fi
8055
8056 EXEEXT=""
8057 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8058 echo "$ac_t""${ac_cv_exeext}" 1>&6
8059 ac_exeext=$EXEEXT
8060
8061 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8062 echo "configure:8063: checking for object suffix" >&5
8063 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   rm -f conftest*
8067 echo 'int i = 1;' > conftest.$ac_ext
8068 if { (eval echo configure:8069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8069   for ac_file in conftest.*; do
8070     case $ac_file in
8071     *.c) ;;
8072     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8073     esac
8074   done
8075 else
8076   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8077 fi
8078 rm -f conftest*
8079 fi
8080
8081 echo "$ac_t""$ac_cv_objext" 1>&6
8082 OBJEXT=$ac_cv_objext
8083 ac_objext=$ac_cv_objext
8084
8085
8086 cat >> confdefs.h <<EOF
8087 #define EXEEXT "${EXEEXT}"
8088 EOF
8089
8090
8091 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8092 echo "configure:8093: checking for be_app in -lbe" >&5
8093 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097   ac_save_LIBS="$LIBS"
8098 LIBS="-lbe -lroot -lnet $LIBS"
8099 cat > conftest.$ac_ext <<EOF
8100 #line 8101 "configure"
8101 #include "confdefs.h"
8102 /* Override any gcc2 internal prototype to avoid an error.  */
8103 /* We use char because int might match the return type of a gcc2
8104     builtin and then its argument prototype would still apply.  */
8105 char be_app();
8106
8107 int main() {
8108 be_app()
8109 ; return 0; }
8110 EOF
8111 if { (eval echo configure:8112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8112   rm -rf conftest*
8113   eval "ac_cv_lib_$ac_lib_var=yes"
8114 else
8115   echo "configure: failed program was:" >&5
8116   cat conftest.$ac_ext >&5
8117   rm -rf conftest*
8118   eval "ac_cv_lib_$ac_lib_var=no"
8119 fi
8120 rm -f conftest*
8121 LIBS="$ac_save_LIBS"
8122
8123 fi
8124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8125   echo "$ac_t""yes" 1>&6
8126   LIBS="$LIBS -lbe -lroot -lnet"
8127 else
8128   echo "$ac_t""no" 1>&6
8129 :
8130 fi
8131
8132
8133
8134
8135
8136 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8137 echo "configure:8138: checking for ${CC-cc} option to accept ANSI C" >&5
8138 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8139   echo $ac_n "(cached) $ac_c" 1>&6
8140 else
8141   am_cv_prog_cc_stdc=no
8142 ac_save_CC="$CC"
8143 # Don't try gcc -ansi; that turns off useful extensions and
8144 # breaks some systems' header files.
8145 # AIX                   -qlanglvl=ansi
8146 # Ultrix and OSF/1      -std1
8147 # HP-UX 10.20 and later -Ae
8148 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8149 # SVR4                  -Xc -D__EXTENSIONS__
8150 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8151 do
8152   CC="$ac_save_CC $ac_arg"
8153   cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156 #include <stdarg.h>
8157 #include <stdio.h>
8158 #include <sys/types.h>
8159 #include <sys/stat.h>
8160 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8161 struct buf { int x; };
8162 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8163 static char *e (p, i)
8164      char **p;
8165      int i;
8166 {
8167   return p[i];
8168 }
8169 static char *f (char * (*g) (char **, int), char **p, ...)
8170 {
8171   char *s;
8172   va_list v;
8173   va_start (v,p);
8174   s = g (p, va_arg (v,int));
8175   va_end (v);
8176   return s;
8177 }
8178 int test (int i, double x);
8179 struct s1 {int (*f) (int a);};
8180 struct s2 {int (*f) (double a);};
8181 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8182 int argc;
8183 char **argv;
8184
8185 int main() {
8186
8187 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8188
8189 ; return 0; }
8190 EOF
8191 if { (eval echo configure:8192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8192   rm -rf conftest*
8193   am_cv_prog_cc_stdc="$ac_arg"; break
8194 else
8195   echo "configure: failed program was:" >&5
8196   cat conftest.$ac_ext >&5
8197 fi
8198 rm -f conftest*
8199 done
8200 CC="$ac_save_CC"
8201
8202 fi
8203
8204 if test -z "$am_cv_prog_cc_stdc"; then
8205   echo "$ac_t""none needed" 1>&6
8206 else
8207   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8208 fi
8209 case "x$am_cv_prog_cc_stdc" in
8210   x|xno) ;;
8211   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8212 esac
8213
8214 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8215         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8216 fi
8217
8218 # test for make depend flag
8219 OL_MKDEP=
8220 OL_MKDEP_FLAGS=
8221 if test -z "${MKDEP}"; then
8222         OL_MKDEP="${CC-cc}"
8223         if test -z "${MKDEP_FLAGS}"; then
8224                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8225 echo "configure:8226: checking for ${OL_MKDEP} depend flag" >&5
8226 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8227   echo $ac_n "(cached) $ac_c" 1>&6
8228 else
8229   
8230                         ol_cv_mkdep=no
8231                         for flag in "-M" "-xM"; do
8232                                 cat > conftest.c <<EOF
8233  noCode;
8234 EOF
8235                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8236                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8237                                 then
8238                                         if test ! -f conftest."${ac_object}" ; then
8239                                                 ol_cv_mkdep=$flag
8240                                                 OL_MKDEP_FLAGS="$flag"
8241                                                 break
8242                                         fi
8243                                 fi
8244                         done
8245                         rm -f conftest*
8246                 
8247 fi
8248
8249 echo "$ac_t""$ol_cv_mkdep" 1>&6
8250         else
8251                 cc_cv_mkdep=yes
8252                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8253         fi
8254 else
8255         cc_cv_mkdep=yes
8256         OL_MKDEP="${MKDEP}"
8257         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8258 fi
8259
8260
8261
8262 if test "${ol_cv_mkdep}" = no ; then
8263         # this will soon become an error
8264         echo "configure: warning: do not know how to generate dependencies" 1>&2
8265 fi
8266
8267 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8268 echo "configure:8269: checking for afopen in -ls" >&5
8269 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8271   echo $ac_n "(cached) $ac_c" 1>&6
8272 else
8273   ac_save_LIBS="$LIBS"
8274 LIBS="-ls  $LIBS"
8275 cat > conftest.$ac_ext <<EOF
8276 #line 8277 "configure"
8277 #include "confdefs.h"
8278 /* Override any gcc2 internal prototype to avoid an error.  */
8279 /* We use char because int might match the return type of a gcc2
8280     builtin and then its argument prototype would still apply.  */
8281 char afopen();
8282
8283 int main() {
8284 afopen()
8285 ; return 0; }
8286 EOF
8287 if { (eval echo configure:8288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8288   rm -rf conftest*
8289   eval "ac_cv_lib_$ac_lib_var=yes"
8290 else
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -rf conftest*
8294   eval "ac_cv_lib_$ac_lib_var=no"
8295 fi
8296 rm -f conftest*
8297 LIBS="$ac_save_LIBS"
8298
8299 fi
8300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302   
8303         AUTH_LIBS=-ls
8304         cat >> confdefs.h <<\EOF
8305 #define HAVE_AIX_SECURITY 1
8306 EOF
8307
8308
8309 else
8310   echo "$ac_t""no" 1>&6
8311 fi
8312
8313
8314 case "$target" in
8315 *-ibm-openedition)
8316         ac_cv_func_getopt=no
8317         cat >> confdefs.h <<\EOF
8318 #define BOTH_STRINGS_H 1
8319 EOF
8320
8321         ;;
8322 esac
8323
8324 ol_link_modules=no
8325 if test $ol_enable_modules != no ; then
8326         for ac_hdr in ltdl.h
8327 do
8328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8330 echo "configure:8331: checking for $ac_hdr" >&5
8331 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8332   echo $ac_n "(cached) $ac_c" 1>&6
8333 else
8334   cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 #include <$ac_hdr>
8338 EOF
8339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8340 { (eval echo configure:8341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8342 if test -z "$ac_err"; then
8343   rm -rf conftest*
8344   eval "ac_cv_header_$ac_safe=yes"
8345 else
8346   echo "$ac_err" >&5
8347   echo "configure: failed program was:" >&5
8348   cat conftest.$ac_ext >&5
8349   rm -rf conftest*
8350   eval "ac_cv_header_$ac_safe=no"
8351 fi
8352 rm -f conftest*
8353 fi
8354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8355   echo "$ac_t""yes" 1>&6
8356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8357   cat >> confdefs.h <<EOF
8358 #define $ac_tr_hdr 1
8359 EOF
8360  
8361 else
8362   echo "$ac_t""no" 1>&6
8363 fi
8364 done
8365
8366
8367         if test $ac_cv_header_ltdl_h = no ; then
8368                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8369         fi
8370
8371         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8372 echo "configure:8373: checking for lt_dlinit in -lltdl" >&5
8373 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8375   echo $ac_n "(cached) $ac_c" 1>&6
8376 else
8377   ac_save_LIBS="$LIBS"
8378 LIBS="-lltdl  $LIBS"
8379 cat > conftest.$ac_ext <<EOF
8380 #line 8381 "configure"
8381 #include "confdefs.h"
8382 /* Override any gcc2 internal prototype to avoid an error.  */
8383 /* We use char because int might match the return type of a gcc2
8384     builtin and then its argument prototype would still apply.  */
8385 char lt_dlinit();
8386
8387 int main() {
8388 lt_dlinit()
8389 ; return 0; }
8390 EOF
8391 if { (eval echo configure:8392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8392   rm -rf conftest*
8393   eval "ac_cv_lib_$ac_lib_var=yes"
8394 else
8395   echo "configure: failed program was:" >&5
8396   cat conftest.$ac_ext >&5
8397   rm -rf conftest*
8398   eval "ac_cv_lib_$ac_lib_var=no"
8399 fi
8400 rm -f conftest*
8401 LIBS="$ac_save_LIBS"
8402
8403 fi
8404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8405   echo "$ac_t""yes" 1>&6
8406   
8407                 MODULES_LIBS=-lltdl
8408                 cat >> confdefs.h <<\EOF
8409 #define HAVE_LIBLTDL 1
8410 EOF
8411
8412         
8413 else
8414   echo "$ac_t""no" 1>&6
8415 fi
8416
8417
8418         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8419                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8420         fi
8421         ol_link_modules=yes
8422 else
8423         ol_with_bdb_module=static
8424         ol_with_dnssrv_module=static
8425         ol_with_hdb_module=static
8426         ol_with_ldap_module=static
8427         ol_with_ldbm_module=static
8428         ol_with_meta_module=static
8429         ol_with_monitor_module=static
8430         ol_with_null_module=static
8431         ol_with_passwd_module=static
8432         ol_with_perl_module=static
8433         ol_with_shell_module=static
8434         ol_with_sql_module=static
8435         if test $ol_with_dyngroup = mod ; then
8436                 echo "configure: warning: building static dyngroup overlay" 1>&2
8437                 ol_with_dyngroup = yes
8438         fi
8439         if test $ol_with_proxycache = mod ; then
8440                 echo "configure: warning: building static proxycache overlay" 1>&2
8441                 ol_with_proxycache = yes
8442         fi
8443 fi
8444
8445 # test for EBCDIC
8446 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8447 echo "configure:8448: checking for EBCDIC" >&5
8448 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8449   echo $ac_n "(cached) $ac_c" 1>&6
8450 else
8451   
8452         cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455
8456 #if !('M' == 0xd4)
8457 #include <__ASCII__/generate_error.h>
8458 #endif
8459
8460 EOF
8461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8462 { (eval echo configure:8463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8464 if test -z "$ac_err"; then
8465   rm -rf conftest*
8466   ol_cv_cpp_ebcdic=yes
8467 else
8468   echo "$ac_err" >&5
8469   echo "configure: failed program was:" >&5
8470   cat conftest.$ac_ext >&5
8471   rm -rf conftest*
8472   ol_cv_cpp_ebcdic=no
8473 fi
8474 rm -f conftest*
8475 fi
8476
8477 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8478 if test $ol_cv_cpp_ebcdic = yes ; then
8479         cat >> confdefs.h <<\EOF
8480 #define HAVE_EBCDIC 1
8481 EOF
8482
8483 fi
8484
8485 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8486 echo "configure:8487: checking for ANSI C header files" >&5
8487 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8488   echo $ac_n "(cached) $ac_c" 1>&6
8489 else
8490   cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493 #include <stdlib.h>
8494 #include <stdarg.h>
8495 #include <string.h>
8496 #include <float.h>
8497 EOF
8498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8499 { (eval echo configure:8500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8501 if test -z "$ac_err"; then
8502   rm -rf conftest*
8503   ol_cv_header_stdc=yes
8504 else
8505   echo "$ac_err" >&5
8506   echo "configure: failed program was:" >&5
8507   cat conftest.$ac_ext >&5
8508   rm -rf conftest*
8509   ol_cv_header_stdc=no
8510 fi
8511 rm -f conftest*
8512
8513 if test $ol_cv_header_stdc = yes; then
8514   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8515 cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 #include <string.h>
8519 EOF
8520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8521   egrep "memchr" >/dev/null 2>&1; then
8522   :
8523 else
8524   rm -rf conftest*
8525   ol_cv_header_stdc=no
8526 fi
8527 rm -f conftest*
8528
8529 fi
8530
8531 if test $ol_cv_header_stdc = yes; then
8532   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8533 cat > conftest.$ac_ext <<EOF
8534 #line 8535 "configure"
8535 #include "confdefs.h"
8536 #include <stdlib.h>
8537 EOF
8538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8539   egrep "free" >/dev/null 2>&1; then
8540   :
8541 else
8542   rm -rf conftest*
8543   ol_cv_header_stdc=no
8544 fi
8545 rm -f conftest*
8546
8547 fi
8548
8549 if test $ol_cv_header_stdc = yes; then
8550   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8551 if test "$cross_compiling" = yes; then
8552   :
8553 else
8554   cat > conftest.$ac_ext <<EOF
8555 #line 8556 "configure"
8556 #include "confdefs.h"
8557 #include <ctype.h>
8558 #ifndef HAVE_EBCDIC
8559 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8560 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8561 #else
8562 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8563                 || ('j' <= (c) && (c) <= 'r') \
8564                 || ('s' <= (c) && (c) <= 'z'))
8565 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8566 #endif
8567 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8568 int main () { int i; for (i = 0; i < 256; i++)
8569 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8570 exit (0); }
8571
8572 EOF
8573 if { (eval echo configure:8574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8574 then
8575   :
8576 else
8577   echo "configure: failed program was:" >&5
8578   cat conftest.$ac_ext >&5
8579   rm -fr conftest*
8580   ol_cv_header_stdc=no
8581 fi
8582 rm -fr conftest*
8583 fi
8584
8585 fi
8586 fi
8587
8588 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8589 if test $ol_cv_header_stdc = yes; then
8590   cat >> confdefs.h <<\EOF
8591 #define STDC_HEADERS 1
8592 EOF
8593
8594 fi
8595 ac_cv_header_stdc=disable
8596
8597
8598 if test $ol_cv_header_stdc != yes; then
8599         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8600 fi
8601
8602 ac_header_dirent=no
8603 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8604 do
8605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8606 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8607 echo "configure:8608: checking for $ac_hdr that defines DIR" >&5
8608 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8609   echo $ac_n "(cached) $ac_c" 1>&6
8610 else
8611   cat > conftest.$ac_ext <<EOF
8612 #line 8613 "configure"
8613 #include "confdefs.h"
8614 #include <sys/types.h>
8615 #include <$ac_hdr>
8616 int main() {
8617 DIR *dirp = 0;
8618 ; return 0; }
8619 EOF
8620 if { (eval echo configure:8621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8621   rm -rf conftest*
8622   eval "ac_cv_header_dirent_$ac_safe=yes"
8623 else
8624   echo "configure: failed program was:" >&5
8625   cat conftest.$ac_ext >&5
8626   rm -rf conftest*
8627   eval "ac_cv_header_dirent_$ac_safe=no"
8628 fi
8629 rm -f conftest*
8630 fi
8631 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8632   echo "$ac_t""yes" 1>&6
8633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8634   cat >> confdefs.h <<EOF
8635 #define $ac_tr_hdr 1
8636 EOF
8637  ac_header_dirent=$ac_hdr; break
8638 else
8639   echo "$ac_t""no" 1>&6
8640 fi
8641 done
8642 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8643 if test $ac_header_dirent = dirent.h; then
8644 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8645 echo "configure:8646: checking for opendir in -ldir" >&5
8646 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8647 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8648   echo $ac_n "(cached) $ac_c" 1>&6
8649 else
8650   ac_save_LIBS="$LIBS"
8651 LIBS="-ldir  $LIBS"
8652 cat > conftest.$ac_ext <<EOF
8653 #line 8654 "configure"
8654 #include "confdefs.h"
8655 /* Override any gcc2 internal prototype to avoid an error.  */
8656 /* We use char because int might match the return type of a gcc2
8657     builtin and then its argument prototype would still apply.  */
8658 char opendir();
8659
8660 int main() {
8661 opendir()
8662 ; return 0; }
8663 EOF
8664 if { (eval echo configure:8665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8665   rm -rf conftest*
8666   eval "ac_cv_lib_$ac_lib_var=yes"
8667 else
8668   echo "configure: failed program was:" >&5
8669   cat conftest.$ac_ext >&5
8670   rm -rf conftest*
8671   eval "ac_cv_lib_$ac_lib_var=no"
8672 fi
8673 rm -f conftest*
8674 LIBS="$ac_save_LIBS"
8675
8676 fi
8677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8678   echo "$ac_t""yes" 1>&6
8679   LIBS="$LIBS -ldir"
8680 else
8681   echo "$ac_t""no" 1>&6
8682 fi
8683
8684 else
8685 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8686 echo "configure:8687: checking for opendir in -lx" >&5
8687 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8689   echo $ac_n "(cached) $ac_c" 1>&6
8690 else
8691   ac_save_LIBS="$LIBS"
8692 LIBS="-lx  $LIBS"
8693 cat > conftest.$ac_ext <<EOF
8694 #line 8695 "configure"
8695 #include "confdefs.h"
8696 /* Override any gcc2 internal prototype to avoid an error.  */
8697 /* We use char because int might match the return type of a gcc2
8698     builtin and then its argument prototype would still apply.  */
8699 char opendir();
8700
8701 int main() {
8702 opendir()
8703 ; return 0; }
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8706   rm -rf conftest*
8707   eval "ac_cv_lib_$ac_lib_var=yes"
8708 else
8709   echo "configure: failed program was:" >&5
8710   cat conftest.$ac_ext >&5
8711   rm -rf conftest*
8712   eval "ac_cv_lib_$ac_lib_var=no"
8713 fi
8714 rm -f conftest*
8715 LIBS="$ac_save_LIBS"
8716
8717 fi
8718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8719   echo "$ac_t""yes" 1>&6
8720   LIBS="$LIBS -lx"
8721 else
8722   echo "$ac_t""no" 1>&6
8723 fi
8724
8725 fi
8726
8727 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8728 echo "configure:8729: checking for sys/wait.h that is POSIX.1 compatible" >&5
8729 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8730   echo $ac_n "(cached) $ac_c" 1>&6
8731 else
8732   cat > conftest.$ac_ext <<EOF
8733 #line 8734 "configure"
8734 #include "confdefs.h"
8735 #include <sys/types.h>
8736 #include <sys/wait.h>
8737 #ifndef WEXITSTATUS
8738 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8739 #endif
8740 #ifndef WIFEXITED
8741 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8742 #endif
8743 int main() {
8744 int s;
8745 wait (&s);
8746 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8747 ; return 0; }
8748 EOF
8749 if { (eval echo configure:8750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8750   rm -rf conftest*
8751   ac_cv_header_sys_wait_h=yes
8752 else
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -rf conftest*
8756   ac_cv_header_sys_wait_h=no
8757 fi
8758 rm -f conftest*
8759 fi
8760
8761 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8762 if test $ac_cv_header_sys_wait_h = yes; then
8763   cat >> confdefs.h <<\EOF
8764 #define HAVE_SYS_WAIT_H 1
8765 EOF
8766
8767 fi
8768
8769 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8770 echo "configure:8771: checking POSIX termios" >&5
8771 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8772   echo $ac_n "(cached) $ac_c" 1>&6
8773 else
8774   cat > conftest.$ac_ext <<EOF
8775 #line 8776 "configure"
8776 #include "confdefs.h"
8777 #include <sys/types.h>
8778 #include <unistd.h>
8779 #include <termios.h>
8780 int main() {
8781 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8782    tcgetattr(0, 0);
8783 ; return 0; }
8784 EOF
8785 if { (eval echo configure:8786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8786   rm -rf conftest*
8787   am_cv_sys_posix_termios=yes
8788 else
8789   echo "configure: failed program was:" >&5
8790   cat conftest.$ac_ext >&5
8791   rm -rf conftest*
8792   am_cv_sys_posix_termios=no
8793 fi
8794 rm -f conftest*
8795 fi
8796
8797 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8798
8799
8800  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8801 echo "configure:8802: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8802 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8803   echo $ac_n "(cached) $ac_c" 1>&6
8804 else
8805   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8806
8807   gwinsz_in_termios_h=no
8808   if test $am_cv_sys_posix_termios = yes; then
8809     cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <sys/types.h>
8813 #     include <termios.h>
8814 #     ifdef TIOCGWINSZ
8815         yes
8816 #     endif
8817     
8818 EOF
8819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8820   egrep "yes" >/dev/null 2>&1; then
8821   rm -rf conftest*
8822   gwinsz_in_termios_h=yes
8823 fi
8824 rm -f conftest*
8825
8826   fi
8827
8828   if test $gwinsz_in_termios_h = no; then
8829     cat > conftest.$ac_ext <<EOF
8830 #line 8831 "configure"
8831 #include "confdefs.h"
8832 #include <sys/types.h>
8833 #     include <sys/ioctl.h>
8834 #     ifdef TIOCGWINSZ
8835         yes
8836 #     endif
8837     
8838 EOF
8839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8840   egrep "yes" >/dev/null 2>&1; then
8841   rm -rf conftest*
8842   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8843 fi
8844 rm -f conftest*
8845
8846   fi
8847   
8848 fi
8849
8850 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8851   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8852     cat >> confdefs.h <<\EOF
8853 #define GWINSZ_IN_SYS_IOCTL 1
8854 EOF
8855
8856   fi
8857
8858 if test $am_cv_sys_posix_termios = yes ; then
8859         cat >> confdefs.h <<\EOF
8860 #define HAVE_POSIX_TERMIOS 1
8861 EOF
8862
8863 fi
8864
8865 for ac_hdr in \
8866         arpa/inet.h             \
8867         arpa/nameser.h  \
8868         assert.h                \
8869         conio.h                 \
8870         crypt.h                 \
8871         direct.h                \
8872         errno.h                 \
8873         fcntl.h                 \
8874         filio.h                 \
8875         getopt.h                \
8876         grp.h                   \
8877         io.h                    \
8878         libutil.h               \
8879         limits.h                \
8880         locale.h                \
8881         netinet/tcp.h   \
8882         malloc.h                \
8883         memory.h                \
8884         psap.h                  \
8885         pwd.h                   \
8886         process.h               \
8887         resolv.h                \
8888         sgtty.h                 \
8889         shadow.h                \
8890         stddef.h                \
8891         string.h                \
8892         strings.h               \
8893         sysexits.h              \
8894         sys/file.h              \
8895         sys/filio.h             \
8896         sys/errno.h             \
8897         sys/ioctl.h             \
8898         sys/param.h             \
8899         sys/resource.h  \
8900         sys/select.h    \
8901         sys/socket.h    \
8902         sys/stat.h              \
8903         sys/syslog.h    \
8904         sys/time.h              \
8905         sys/types.h             \
8906         sys/ucred.h             \
8907         sys/uio.h               \
8908         syslog.h                \
8909         termios.h               \
8910         unistd.h                \
8911         winsock.h               \
8912         winsock2.h              \
8913
8914 do
8915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8917 echo "configure:8918: checking for $ac_hdr" >&5
8918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8919   echo $ac_n "(cached) $ac_c" 1>&6
8920 else
8921   cat > conftest.$ac_ext <<EOF
8922 #line 8923 "configure"
8923 #include "confdefs.h"
8924 #include <$ac_hdr>
8925 EOF
8926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8927 { (eval echo configure:8928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8929 if test -z "$ac_err"; then
8930   rm -rf conftest*
8931   eval "ac_cv_header_$ac_safe=yes"
8932 else
8933   echo "$ac_err" >&5
8934   echo "configure: failed program was:" >&5
8935   cat conftest.$ac_ext >&5
8936   rm -rf conftest*
8937   eval "ac_cv_header_$ac_safe=no"
8938 fi
8939 rm -f conftest*
8940 fi
8941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8944   cat >> confdefs.h <<EOF
8945 #define $ac_tr_hdr 1
8946 EOF
8947  
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951 done
8952
8953
8954
8955
8956 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8957 echo "configure:8958: checking for dlopen" >&5
8958 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8959   echo $ac_n "(cached) $ac_c" 1>&6
8960 else
8961   cat > conftest.$ac_ext <<EOF
8962 #line 8963 "configure"
8963 #include "confdefs.h"
8964 /* System header to define __stub macros and hopefully few prototypes,
8965     which can conflict with char dlopen(); below.  */
8966 #include <assert.h>
8967 /* Override any gcc2 internal prototype to avoid an error.  */
8968 /* We use char because int might match the return type of a gcc2
8969     builtin and then its argument prototype would still apply.  */
8970 char dlopen();
8971 char (*f)();
8972
8973 int main() {
8974
8975 /* The GNU C library defines this for functions which it implements
8976     to always fail with ENOSYS.  Some functions are actually named
8977     something starting with __ and the normal name is an alias.  */
8978 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8979 choke me
8980 #else
8981 f = dlopen;
8982 #endif
8983
8984 ; return 0; }
8985 EOF
8986 if { (eval echo configure:8987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8987   rm -rf conftest*
8988   eval "ac_cv_func_dlopen=yes"
8989 else
8990   echo "configure: failed program was:" >&5
8991   cat conftest.$ac_ext >&5
8992   rm -rf conftest*
8993   eval "ac_cv_func_dlopen=no"
8994 fi
8995 rm -f conftest*
8996 fi
8997
8998 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8999   echo "$ac_t""yes" 1>&6
9000   :
9001 else
9002   echo "$ac_t""no" 1>&6
9003 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9004 echo "configure:9005: checking for dlopen in -ldl" >&5
9005 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9006 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9007   echo $ac_n "(cached) $ac_c" 1>&6
9008 else
9009   ac_save_LIBS="$LIBS"
9010 LIBS="-ldl  $LIBS"
9011 cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 /* Override any gcc2 internal prototype to avoid an error.  */
9015 /* We use char because int might match the return type of a gcc2
9016     builtin and then its argument prototype would still apply.  */
9017 char dlopen();
9018
9019 int main() {
9020 dlopen()
9021 ; return 0; }
9022 EOF
9023 if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9024   rm -rf conftest*
9025   eval "ac_cv_lib_$ac_lib_var=yes"
9026 else
9027   echo "configure: failed program was:" >&5
9028   cat conftest.$ac_ext >&5
9029   rm -rf conftest*
9030   eval "ac_cv_lib_$ac_lib_var=no"
9031 fi
9032 rm -f conftest*
9033 LIBS="$ac_save_LIBS"
9034
9035 fi
9036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9037   echo "$ac_t""yes" 1>&6
9038     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9039     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9040   cat >> confdefs.h <<EOF
9041 #define $ac_tr_lib 1
9042 EOF
9043
9044   LIBS="-ldl $LIBS"
9045
9046 else
9047   echo "$ac_t""no" 1>&6
9048 fi
9049
9050 fi
9051
9052
9053 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9054 echo "configure:9055: checking for sigset in -lV3" >&5
9055 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9056 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9057   echo $ac_n "(cached) $ac_c" 1>&6
9058 else
9059   ac_save_LIBS="$LIBS"
9060 LIBS="-lV3  $LIBS"
9061 cat > conftest.$ac_ext <<EOF
9062 #line 9063 "configure"
9063 #include "confdefs.h"
9064 /* Override any gcc2 internal prototype to avoid an error.  */
9065 /* We use char because int might match the return type of a gcc2
9066     builtin and then its argument prototype would still apply.  */
9067 char sigset();
9068
9069 int main() {
9070 sigset()
9071 ; return 0; }
9072 EOF
9073 if { (eval echo configure:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9074   rm -rf conftest*
9075   eval "ac_cv_lib_$ac_lib_var=yes"
9076 else
9077   echo "configure: failed program was:" >&5
9078   cat conftest.$ac_ext >&5
9079   rm -rf conftest*
9080   eval "ac_cv_lib_$ac_lib_var=no"
9081 fi
9082 rm -f conftest*
9083 LIBS="$ac_save_LIBS"
9084
9085 fi
9086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9087   echo "$ac_t""yes" 1>&6
9088     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9089     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9090   cat >> confdefs.h <<EOF
9091 #define $ac_tr_lib 1
9092 EOF
9093
9094   LIBS="-lV3 $LIBS"
9095
9096 else
9097   echo "$ac_t""no" 1>&6
9098 fi
9099
9100
9101 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9102 echo "configure:9103: checking for winsock" >&5
9103 save_LIBS="$LIBS"
9104 for curlib in ws2_32 wsock32; do
9105         LIBS="$LIBS -l$curlib"
9106         cat > conftest.$ac_ext <<EOF
9107 #line 9108 "configure"
9108 #include "confdefs.h"
9109
9110                         char socket@12();
9111                         char select@20();
9112                         char closesocket@4();
9113                         char gethostname@8();
9114                         
9115 int main() {
9116
9117                         socket@12();
9118                         select@20();
9119                         closesocket@4();
9120                         gethostname@8();
9121                         
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125   rm -rf conftest*
9126   have_winsock=yes
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -rf conftest*
9131   have_winsock=no
9132 fi
9133 rm -f conftest*
9134
9135         if test $have_winsock = yes; then
9136                 cat >> confdefs.h <<\EOF
9137 #define HAVE_WINSOCK 1
9138 EOF
9139
9140                 ac_cv_func_socket=yes
9141                 ac_cv_func_select=yes
9142                 ac_cv_func_closesocket=yes
9143                 ac_cv_func_gethostname=yes
9144                 if test $curlib = ws2_32; then
9145                         have_winsock=winsock2
9146                         cat >> confdefs.h <<\EOF
9147 #define HAVE_WINSOCK2 1
9148 EOF
9149
9150                 fi
9151                 break
9152         fi
9153         LIBS="$save_LIBS"
9154 done
9155 echo "$ac_t""$have_winsock" 1>&6
9156
9157
9158 echo $ac_n "checking for socket""... $ac_c" 1>&6
9159 echo "configure:9160: checking for socket" >&5
9160 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9161   echo $ac_n "(cached) $ac_c" 1>&6
9162 else
9163   cat > conftest.$ac_ext <<EOF
9164 #line 9165 "configure"
9165 #include "confdefs.h"
9166 /* System header to define __stub macros and hopefully few prototypes,
9167     which can conflict with char socket(); below.  */
9168 #include <assert.h>
9169 /* Override any gcc2 internal prototype to avoid an error.  */
9170 /* We use char because int might match the return type of a gcc2
9171     builtin and then its argument prototype would still apply.  */
9172 char socket();
9173 char (*f)();
9174
9175 int main() {
9176
9177 /* The GNU C library defines this for functions which it implements
9178     to always fail with ENOSYS.  Some functions are actually named
9179     something starting with __ and the normal name is an alias.  */
9180 #if defined (__stub_socket) || defined (__stub___socket)
9181 choke me
9182 #else
9183 f = socket;
9184 #endif
9185
9186 ; return 0; }
9187 EOF
9188 if { (eval echo configure:9189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9189   rm -rf conftest*
9190   eval "ac_cv_func_socket=yes"
9191 else
9192   echo "configure: failed program was:" >&5
9193   cat conftest.$ac_ext >&5
9194   rm -rf conftest*
9195   eval "ac_cv_func_socket=no"
9196 fi
9197 rm -f conftest*
9198 fi
9199
9200 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9201   echo "$ac_t""yes" 1>&6
9202   :
9203 else
9204   echo "$ac_t""no" 1>&6
9205         
9206         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9207 echo "configure:9208: checking for main in -lsocket" >&5
9208 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9210   echo $ac_n "(cached) $ac_c" 1>&6
9211 else
9212   ac_save_LIBS="$LIBS"
9213 LIBS="-lsocket  $LIBS"
9214 cat > conftest.$ac_ext <<EOF
9215 #line 9216 "configure"
9216 #include "confdefs.h"
9217
9218 int main() {
9219 main()
9220 ; return 0; }
9221 EOF
9222 if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9223   rm -rf conftest*
9224   eval "ac_cv_lib_$ac_lib_var=yes"
9225 else
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -rf conftest*
9229   eval "ac_cv_lib_$ac_lib_var=no"
9230 fi
9231 rm -f conftest*
9232 LIBS="$ac_save_LIBS"
9233
9234 fi
9235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9236   echo "$ac_t""yes" 1>&6
9237     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9239   cat >> confdefs.h <<EOF
9240 #define $ac_tr_lib 1
9241 EOF
9242
9243   LIBS="-lsocket $LIBS"
9244
9245 else
9246   echo "$ac_t""no" 1>&6
9247 fi
9248
9249         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9250 echo "configure:9251: checking for main in -lnet" >&5
9251 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9253   echo $ac_n "(cached) $ac_c" 1>&6
9254 else
9255   ac_save_LIBS="$LIBS"
9256 LIBS="-lnet  $LIBS"
9257 cat > conftest.$ac_ext <<EOF
9258 #line 9259 "configure"
9259 #include "confdefs.h"
9260
9261 int main() {
9262 main()
9263 ; return 0; }
9264 EOF
9265 if { (eval echo configure:9266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9266   rm -rf conftest*
9267   eval "ac_cv_lib_$ac_lib_var=yes"
9268 else
9269   echo "configure: failed program was:" >&5
9270   cat conftest.$ac_ext >&5
9271   rm -rf conftest*
9272   eval "ac_cv_lib_$ac_lib_var=no"
9273 fi
9274 rm -f conftest*
9275 LIBS="$ac_save_LIBS"
9276
9277 fi
9278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9279   echo "$ac_t""yes" 1>&6
9280     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9281     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9282   cat >> confdefs.h <<EOF
9283 #define $ac_tr_lib 1
9284 EOF
9285
9286   LIBS="-lnet $LIBS"
9287
9288 else
9289   echo "$ac_t""no" 1>&6
9290 fi
9291
9292         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9293 echo "configure:9294: checking for main in -lnsl_s" >&5
9294 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9295 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9296   echo $ac_n "(cached) $ac_c" 1>&6
9297 else
9298   ac_save_LIBS="$LIBS"
9299 LIBS="-lnsl_s  $LIBS"
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303
9304 int main() {
9305 main()
9306 ; return 0; }
9307 EOF
9308 if { (eval echo configure:9309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9309   rm -rf conftest*
9310   eval "ac_cv_lib_$ac_lib_var=yes"
9311 else
9312   echo "configure: failed program was:" >&5
9313   cat conftest.$ac_ext >&5
9314   rm -rf conftest*
9315   eval "ac_cv_lib_$ac_lib_var=no"
9316 fi
9317 rm -f conftest*
9318 LIBS="$ac_save_LIBS"
9319
9320 fi
9321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9322   echo "$ac_t""yes" 1>&6
9323     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9324     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9325   cat >> confdefs.h <<EOF
9326 #define $ac_tr_lib 1
9327 EOF
9328
9329   LIBS="-lnsl_s $LIBS"
9330
9331 else
9332   echo "$ac_t""no" 1>&6
9333 fi
9334
9335         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9336 echo "configure:9337: checking for main in -lnsl" >&5
9337 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9339   echo $ac_n "(cached) $ac_c" 1>&6
9340 else
9341   ac_save_LIBS="$LIBS"
9342 LIBS="-lnsl  $LIBS"
9343 cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9346
9347 int main() {
9348 main()
9349 ; return 0; }
9350 EOF
9351 if { (eval echo configure:9352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9352   rm -rf conftest*
9353   eval "ac_cv_lib_$ac_lib_var=yes"
9354 else
9355   echo "configure: failed program was:" >&5
9356   cat conftest.$ac_ext >&5
9357   rm -rf conftest*
9358   eval "ac_cv_lib_$ac_lib_var=no"
9359 fi
9360 rm -f conftest*
9361 LIBS="$ac_save_LIBS"
9362
9363 fi
9364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9365   echo "$ac_t""yes" 1>&6
9366     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9367     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9368   cat >> confdefs.h <<EOF
9369 #define $ac_tr_lib 1
9370 EOF
9371
9372   LIBS="-lnsl $LIBS"
9373
9374 else
9375   echo "$ac_t""no" 1>&6
9376 fi
9377
9378         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9379 echo "configure:9380: checking for socket in -linet" >&5
9380 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9381 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9382   echo $ac_n "(cached) $ac_c" 1>&6
9383 else
9384   ac_save_LIBS="$LIBS"
9385 LIBS="-linet  $LIBS"
9386 cat > conftest.$ac_ext <<EOF
9387 #line 9388 "configure"
9388 #include "confdefs.h"
9389 /* Override any gcc2 internal prototype to avoid an error.  */
9390 /* We use char because int might match the return type of a gcc2
9391     builtin and then its argument prototype would still apply.  */
9392 char socket();
9393
9394 int main() {
9395 socket()
9396 ; return 0; }
9397 EOF
9398 if { (eval echo configure:9399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9399   rm -rf conftest*
9400   eval "ac_cv_lib_$ac_lib_var=yes"
9401 else
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -rf conftest*
9405   eval "ac_cv_lib_$ac_lib_var=no"
9406 fi
9407 rm -f conftest*
9408 LIBS="$ac_save_LIBS"
9409
9410 fi
9411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9412   echo "$ac_t""yes" 1>&6
9413     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9414     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9415   cat >> confdefs.h <<EOF
9416 #define $ac_tr_lib 1
9417 EOF
9418
9419   LIBS="-linet $LIBS"
9420
9421 else
9422   echo "$ac_t""no" 1>&6
9423 fi
9424
9425         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9426 echo "configure:9427: checking for main in -lgen" >&5
9427 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9428 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9429   echo $ac_n "(cached) $ac_c" 1>&6
9430 else
9431   ac_save_LIBS="$LIBS"
9432 LIBS="-lgen  $LIBS"
9433 cat > conftest.$ac_ext <<EOF
9434 #line 9435 "configure"
9435 #include "confdefs.h"
9436
9437 int main() {
9438 main()
9439 ; return 0; }
9440 EOF
9441 if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9442   rm -rf conftest*
9443   eval "ac_cv_lib_$ac_lib_var=yes"
9444 else
9445   echo "configure: failed program was:" >&5
9446   cat conftest.$ac_ext >&5
9447   rm -rf conftest*
9448   eval "ac_cv_lib_$ac_lib_var=no"
9449 fi
9450 rm -f conftest*
9451 LIBS="$ac_save_LIBS"
9452
9453 fi
9454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9455   echo "$ac_t""yes" 1>&6
9456     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9457     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9458   cat >> confdefs.h <<EOF
9459 #define $ac_tr_lib 1
9460 EOF
9461
9462   LIBS="-lgen $LIBS"
9463
9464 else
9465   echo "$ac_t""no" 1>&6
9466 fi
9467
9468
9469 fi
9470
9471
9472 echo $ac_n "checking for select""... $ac_c" 1>&6
9473 echo "configure:9474: checking for select" >&5
9474 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9475   echo $ac_n "(cached) $ac_c" 1>&6
9476 else
9477   cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480 /* System header to define __stub macros and hopefully few prototypes,
9481     which can conflict with char select(); below.  */
9482 #include <assert.h>
9483 /* Override any gcc2 internal prototype to avoid an error.  */
9484 /* We use char because int might match the return type of a gcc2
9485     builtin and then its argument prototype would still apply.  */
9486 char select();
9487 char (*f)();
9488
9489 int main() {
9490
9491 /* The GNU C library defines this for functions which it implements
9492     to always fail with ENOSYS.  Some functions are actually named
9493     something starting with __ and the normal name is an alias.  */
9494 #if defined (__stub_select) || defined (__stub___select)
9495 choke me
9496 #else
9497 f = select;
9498 #endif
9499
9500 ; return 0; }
9501 EOF
9502 if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9503   rm -rf conftest*
9504   eval "ac_cv_func_select=yes"
9505 else
9506   echo "configure: failed program was:" >&5
9507   cat conftest.$ac_ext >&5
9508   rm -rf conftest*
9509   eval "ac_cv_func_select=no"
9510 fi
9511 rm -f conftest*
9512 fi
9513
9514 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9515   echo "$ac_t""yes" 1>&6
9516   :
9517 else
9518   echo "$ac_t""no" 1>&6
9519 { echo "configure: error: select() required." 1>&2; exit 1; }
9520 fi
9521
9522
9523 if test "${ac_cv_header_winsock_h}" != yes; then
9524                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9525 echo "configure:9526: checking types of arguments for select()" >&5
9526  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9530   echo $ac_n "(cached) $ac_c" 1>&6
9531 else
9532     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9533   echo $ac_n "(cached) $ac_c" 1>&6
9534 else
9535      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9536      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9537       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9538        cat > conftest.$ac_ext <<EOF
9539 #line 9540 "configure"
9540 #include "confdefs.h"
9541 #ifdef HAVE_SYS_TYPES_H
9542 #include <sys/types.h>
9543 #endif
9544 #ifdef HAVE_SYS_TIME_H
9545 #include <sys/time.h>
9546 #endif
9547 #ifdef HAVE_SYS_SELECT_H
9548 #include <sys/select.h>
9549 #endif
9550 #ifdef HAVE_SYS_SOCKET_H
9551 #include <sys/socket.h>
9552 #endif
9553 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);
9554 int main() {
9555
9556 ; return 0; }
9557 EOF
9558 if { (eval echo configure:9559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9559   rm -rf conftest*
9560           ac_not_found=no ; break 3
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -rf conftest*
9565   ac_not_found=yes
9566 fi
9567 rm -f conftest*
9568       done
9569      done
9570     done
9571    
9572 fi
9573   
9574 fi
9575  
9576 fi
9577  if test "$ac_not_found" = yes; then
9578   ac_cv_func_select_arg1=int 
9579   ac_cv_func_select_arg234='int *' 
9580   ac_cv_func_select_arg5='struct timeval *'
9581  fi
9582  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9583  cat >> confdefs.h <<EOF
9584 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9585 EOF
9586
9587  cat >> confdefs.h <<EOF
9588 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9589 EOF
9590
9591  cat >> confdefs.h <<EOF
9592 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9593 EOF
9594
9595
9596 fi
9597
9598
9599 for ac_hdr in regex.h 
9600 do
9601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9603 echo "configure:9604: checking for $ac_hdr" >&5
9604 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9605   echo $ac_n "(cached) $ac_c" 1>&6
9606 else
9607   cat > conftest.$ac_ext <<EOF
9608 #line 9609 "configure"
9609 #include "confdefs.h"
9610 #include <$ac_hdr>
9611 EOF
9612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9613 { (eval echo configure:9614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9615 if test -z "$ac_err"; then
9616   rm -rf conftest*
9617   eval "ac_cv_header_$ac_safe=yes"
9618 else
9619   echo "$ac_err" >&5
9620   echo "configure: failed program was:" >&5
9621   cat conftest.$ac_ext >&5
9622   rm -rf conftest*
9623   eval "ac_cv_header_$ac_safe=no"
9624 fi
9625 rm -f conftest*
9626 fi
9627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9628   echo "$ac_t""yes" 1>&6
9629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9630   cat >> confdefs.h <<EOF
9631 #define $ac_tr_hdr 1
9632 EOF
9633  
9634 else
9635   echo "$ac_t""no" 1>&6
9636 fi
9637 done
9638
9639 if test "$ac_cv_header_regex_h" != yes ; then
9640         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9641 fi
9642
9643 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9644 echo "configure:9645: checking for library containing regfree" >&5
9645 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9646   echo $ac_n "(cached) $ac_c" 1>&6
9647 else
9648   ac_func_search_save_LIBS="$LIBS"
9649 ac_cv_search_regfree="no"
9650 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 /* Override any gcc2 internal prototype to avoid an error.  */
9654 /* We use char because int might match the return type of a gcc2
9655     builtin and then its argument prototype would still apply.  */
9656 char regfree();
9657
9658 int main() {
9659 regfree()
9660 ; return 0; }
9661 EOF
9662 if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9663   rm -rf conftest*
9664   ac_cv_search_regfree="none required"
9665 else
9666   echo "configure: failed program was:" >&5
9667   cat conftest.$ac_ext >&5
9668 fi
9669 rm -f conftest*
9670 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9671 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9672 cat > conftest.$ac_ext <<EOF
9673 #line 9674 "configure"
9674 #include "confdefs.h"
9675 /* Override any gcc2 internal prototype to avoid an error.  */
9676 /* We use char because int might match the return type of a gcc2
9677     builtin and then its argument prototype would still apply.  */
9678 char regfree();
9679
9680 int main() {
9681 regfree()
9682 ; return 0; }
9683 EOF
9684 if { (eval echo configure:9685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9685   rm -rf conftest*
9686   ac_cv_search_regfree="-l$ac_lib"
9687 break
9688 else
9689   echo "configure: failed program was:" >&5
9690   cat conftest.$ac_ext >&5
9691 fi
9692 rm -f conftest*
9693 done
9694 LIBS="$ac_func_search_save_LIBS"
9695 fi
9696
9697 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9698 if test "$ac_cv_search_regfree" != "no"; then
9699   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9700   :
9701 else :
9702   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9703 fi
9704
9705
9706 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9707 echo "configure:9708: checking for compatible POSIX regex" >&5
9708 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9709   echo $ac_n "(cached) $ac_c" 1>&6
9710 else
9711   
9712         if test "$cross_compiling" = yes; then
9713   ol_cv_c_posix_regex=cross
9714 else
9715   cat > conftest.$ac_ext <<EOF
9716 #line 9717 "configure"
9717 #include "confdefs.h"
9718
9719 #include <sys/types.h>
9720 #include <regex.h>
9721 static char *pattern, *string;
9722 main()
9723 {
9724         int rc;
9725         regex_t re;
9726
9727         pattern = "^A";
9728
9729         if(regcomp(&re, pattern, 0)) {
9730                 return -1;
9731         }
9732         
9733         string = "ALL MATCH";
9734         
9735         rc = regexec(&re, string, 0, (void*)0, 0);
9736
9737         regfree(&re);
9738
9739         return rc;
9740 }
9741 EOF
9742 if { (eval echo configure:9743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9743 then
9744   ol_cv_c_posix_regex=yes
9745 else
9746   echo "configure: failed program was:" >&5
9747   cat conftest.$ac_ext >&5
9748   rm -fr conftest*
9749   ol_cv_c_posix_regex=no
9750 fi
9751 rm -fr conftest*
9752 fi
9753
9754 fi
9755
9756 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9757
9758 if test "$ol_cv_c_posix_regex" = no ; then
9759         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9760 fi
9761
9762
9763 have_uuid=no
9764 for ac_hdr in sys/uuid.h
9765 do
9766 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9767 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9768 echo "configure:9769: checking for $ac_hdr" >&5
9769 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9770   echo $ac_n "(cached) $ac_c" 1>&6
9771 else
9772   cat > conftest.$ac_ext <<EOF
9773 #line 9774 "configure"
9774 #include "confdefs.h"
9775 #include <$ac_hdr>
9776 EOF
9777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9778 { (eval echo configure:9779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9780 if test -z "$ac_err"; then
9781   rm -rf conftest*
9782   eval "ac_cv_header_$ac_safe=yes"
9783 else
9784   echo "$ac_err" >&5
9785   echo "configure: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787   rm -rf conftest*
9788   eval "ac_cv_header_$ac_safe=no"
9789 fi
9790 rm -f conftest*
9791 fi
9792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9793   echo "$ac_t""yes" 1>&6
9794     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9795   cat >> confdefs.h <<EOF
9796 #define $ac_tr_hdr 1
9797 EOF
9798  
9799 else
9800   echo "$ac_t""no" 1>&6
9801 fi
9802 done
9803
9804 if test $ac_cv_header_sys_uuid_h = yes ; then
9805         save_LIBS="$LIBS"
9806         
9807 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9808 echo "configure:9809: checking for library containing uuid_to_str" >&5
9809 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9810   echo $ac_n "(cached) $ac_c" 1>&6
9811 else
9812   ac_func_search_save_LIBS="$LIBS"
9813 ac_cv_search_uuid_to_str="no"
9814 cat > conftest.$ac_ext <<EOF
9815 #line 9816 "configure"
9816 #include "confdefs.h"
9817 /* Override any gcc2 internal prototype to avoid an error.  */
9818 /* We use char because int might match the return type of a gcc2
9819     builtin and then its argument prototype would still apply.  */
9820 char uuid_to_str();
9821
9822 int main() {
9823 uuid_to_str()
9824 ; return 0; }
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9827   rm -rf conftest*
9828   ac_cv_search_uuid_to_str="none required"
9829 else
9830   echo "configure: failed program was:" >&5
9831   cat conftest.$ac_ext >&5
9832 fi
9833 rm -f conftest*
9834 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9835 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9836 cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839 /* Override any gcc2 internal prototype to avoid an error.  */
9840 /* We use char because int might match the return type of a gcc2
9841     builtin and then its argument prototype would still apply.  */
9842 char uuid_to_str();
9843
9844 int main() {
9845 uuid_to_str()
9846 ; return 0; }
9847 EOF
9848 if { (eval echo configure:9849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9849   rm -rf conftest*
9850   ac_cv_search_uuid_to_str="-l$ac_lib"
9851 break
9852 else
9853   echo "configure: failed program was:" >&5
9854   cat conftest.$ac_ext >&5
9855 fi
9856 rm -f conftest*
9857 done
9858 LIBS="$ac_func_search_save_LIBS"
9859 fi
9860
9861 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9862 if test "$ac_cv_search_uuid_to_str" != "no"; then
9863   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9864   have_uuid=yes
9865 else :
9866   :
9867 fi
9868         LIBS="$save_LIBS"
9869
9870         if test have_uuid = yes ; then
9871                 cat >> confdefs.h <<\EOF
9872 #define HAVE_UUID_TO_STR 1
9873 EOF
9874
9875
9876                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9877                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9878         fi
9879 fi
9880
9881 if test $have_uuid = no ; then
9882         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9883 echo "configure:9884: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9884         save_LIBS="$LIBS"
9885         LIBS="$LIBS -lrpcrt4"
9886         cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889
9890                 char UuidCreate@4();
9891                 char UuidToStringA@8();
9892                 
9893 int main() {
9894
9895                 UuidCreate@4();
9896                 UuidToStringA@8();
9897                 
9898 ; return 0; }
9899 EOF
9900 if { (eval echo configure:9901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9901   rm -rf conftest*
9902   need_rpcrt=yes
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906   rm -rf conftest*
9907   need_rpcrt=no
9908 fi
9909 rm -f conftest*
9910         if test $need_rpcrt = yes; then
9911                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9912         fi
9913         LIBS="$save_LIBS"
9914         echo "$ac_t""$need_rpcrt" 1>&6
9915 fi
9916
9917 ol_link_dnssrv=no
9918 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9919 echo "configure:9920: checking for res_query" >&5
9920 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9921   echo $ac_n "(cached) $ac_c" 1>&6
9922 else
9923   cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 /* System header to define __stub macros and hopefully few prototypes,
9927     which can conflict with char res_query(); below.  */
9928 #include <assert.h>
9929 /* Override any gcc2 internal prototype to avoid an error.  */
9930 /* We use char because int might match the return type of a gcc2
9931     builtin and then its argument prototype would still apply.  */
9932 char res_query();
9933 char (*f)();
9934
9935 int main() {
9936
9937 /* The GNU C library defines this for functions which it implements
9938     to always fail with ENOSYS.  Some functions are actually named
9939     something starting with __ and the normal name is an alias.  */
9940 #if defined (__stub_res_query) || defined (__stub___res_query)
9941 choke me
9942 #else
9943 f = res_query;
9944 #endif
9945
9946 ; return 0; }
9947 EOF
9948 if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9949   rm -rf conftest*
9950   eval "ac_cv_func_res_query=yes"
9951 else
9952   echo "configure: failed program was:" >&5
9953   cat conftest.$ac_ext >&5
9954   rm -rf conftest*
9955   eval "ac_cv_func_res_query=no"
9956 fi
9957 rm -f conftest*
9958 fi
9959
9960 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9961   echo "$ac_t""yes" 1>&6
9962   :
9963 else
9964   echo "$ac_t""no" 1>&6
9965 fi
9966
9967 if test $ac_cv_func_res_query = no ; then 
9968         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9969 echo "configure:9970: checking for __res_query" >&5
9970 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   cat > conftest.$ac_ext <<EOF
9974 #line 9975 "configure"
9975 #include "confdefs.h"
9976 /* System header to define __stub macros and hopefully few prototypes,
9977     which can conflict with char __res_query(); below.  */
9978 #include <assert.h>
9979 /* Override any gcc2 internal prototype to avoid an error.  */
9980 /* We use char because int might match the return type of a gcc2
9981     builtin and then its argument prototype would still apply.  */
9982 char __res_query();
9983 char (*f)();
9984
9985 int main() {
9986
9987 /* The GNU C library defines this for functions which it implements
9988     to always fail with ENOSYS.  Some functions are actually named
9989     something starting with __ and the normal name is an alias.  */
9990 #if defined (__stub___res_query) || defined (__stub_____res_query)
9991 choke me
9992 #else
9993 f = __res_query;
9994 #endif
9995
9996 ; return 0; }
9997 EOF
9998 if { (eval echo configure:9999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9999   rm -rf conftest*
10000   eval "ac_cv_func___res_query=yes"
10001 else
10002   echo "configure: failed program was:" >&5
10003   cat conftest.$ac_ext >&5
10004   rm -rf conftest*
10005   eval "ac_cv_func___res_query=no"
10006 fi
10007 rm -f conftest*
10008 fi
10009
10010 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10011   echo "$ac_t""yes" 1>&6
10012   :
10013 else
10014   echo "$ac_t""no" 1>&6
10015 fi
10016
10017         ac_cv_func_res_query=$ac_cv_func___res_query
10018 fi
10019
10020 if test $ac_cv_func_res_query = no ; then 
10021         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10022 echo "configure:10023: checking for res_query in -lbind" >&5
10023 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10025   echo $ac_n "(cached) $ac_c" 1>&6
10026 else
10027   ac_save_LIBS="$LIBS"
10028 LIBS="-lbind  $LIBS"
10029 cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032 /* Override any gcc2 internal prototype to avoid an error.  */
10033 /* We use char because int might match the return type of a gcc2
10034     builtin and then its argument prototype would still apply.  */
10035 char res_query();
10036
10037 int main() {
10038 res_query()
10039 ; return 0; }
10040 EOF
10041 if { (eval echo configure:10042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=yes"
10044 else
10045   echo "configure: failed program was:" >&5
10046   cat conftest.$ac_ext >&5
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=no"
10049 fi
10050 rm -f conftest*
10051 LIBS="$ac_save_LIBS"
10052
10053 fi
10054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10055   echo "$ac_t""yes" 1>&6
10056     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10057     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10058   cat >> confdefs.h <<EOF
10059 #define $ac_tr_lib 1
10060 EOF
10061
10062   LIBS="-lbind $LIBS"
10063
10064 else
10065   echo "$ac_t""no" 1>&6
10066 fi
10067
10068         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10069 fi
10070
10071 if test $ac_cv_func_res_query = no ; then 
10072         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10073 echo "configure:10074: checking for __res_query in -lbind" >&5
10074 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10076   echo $ac_n "(cached) $ac_c" 1>&6
10077 else
10078   ac_save_LIBS="$LIBS"
10079 LIBS="-lbind  $LIBS"
10080 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083 /* Override any gcc2 internal prototype to avoid an error.  */
10084 /* We use char because int might match the return type of a gcc2
10085     builtin and then its argument prototype would still apply.  */
10086 char __res_query();
10087
10088 int main() {
10089 __res_query()
10090 ; return 0; }
10091 EOF
10092 if { (eval echo configure:10093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10093   rm -rf conftest*
10094   eval "ac_cv_lib_$ac_lib_var=yes"
10095 else
10096   echo "configure: failed program was:" >&5
10097   cat conftest.$ac_ext >&5
10098   rm -rf conftest*
10099   eval "ac_cv_lib_$ac_lib_var=no"
10100 fi
10101 rm -f conftest*
10102 LIBS="$ac_save_LIBS"
10103
10104 fi
10105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10106   echo "$ac_t""yes" 1>&6
10107     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10109   cat >> confdefs.h <<EOF
10110 #define $ac_tr_lib 1
10111 EOF
10112
10113   LIBS="-lbind $LIBS"
10114
10115 else
10116   echo "$ac_t""no" 1>&6
10117 fi
10118
10119         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10120 fi
10121
10122 if test $ac_cv_func_res_query = no ; then 
10123         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10124 echo "configure:10125: checking for res_query in -lresolv" >&5
10125 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10127   echo $ac_n "(cached) $ac_c" 1>&6
10128 else
10129   ac_save_LIBS="$LIBS"
10130 LIBS="-lresolv  $LIBS"
10131 cat > conftest.$ac_ext <<EOF
10132 #line 10133 "configure"
10133 #include "confdefs.h"
10134 /* Override any gcc2 internal prototype to avoid an error.  */
10135 /* We use char because int might match the return type of a gcc2
10136     builtin and then its argument prototype would still apply.  */
10137 char res_query();
10138
10139 int main() {
10140 res_query()
10141 ; return 0; }
10142 EOF
10143 if { (eval echo configure:10144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10144   rm -rf conftest*
10145   eval "ac_cv_lib_$ac_lib_var=yes"
10146 else
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -rf conftest*
10150   eval "ac_cv_lib_$ac_lib_var=no"
10151 fi
10152 rm -f conftest*
10153 LIBS="$ac_save_LIBS"
10154
10155 fi
10156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10157   echo "$ac_t""yes" 1>&6
10158     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10159     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10160   cat >> confdefs.h <<EOF
10161 #define $ac_tr_lib 1
10162 EOF
10163
10164   LIBS="-lresolv $LIBS"
10165
10166 else
10167   echo "$ac_t""no" 1>&6
10168 fi
10169
10170         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10171 fi
10172
10173 if test $ac_cv_func_res_query = no ; then 
10174         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10175 echo "configure:10176: checking for __res_query in -lresolv" >&5
10176 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10178   echo $ac_n "(cached) $ac_c" 1>&6
10179 else
10180   ac_save_LIBS="$LIBS"
10181 LIBS="-lresolv  $LIBS"
10182 cat > conftest.$ac_ext <<EOF
10183 #line 10184 "configure"
10184 #include "confdefs.h"
10185 /* Override any gcc2 internal prototype to avoid an error.  */
10186 /* We use char because int might match the return type of a gcc2
10187     builtin and then its argument prototype would still apply.  */
10188 char __res_query();
10189
10190 int main() {
10191 __res_query()
10192 ; return 0; }
10193 EOF
10194 if { (eval echo configure:10195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=yes"
10197 else
10198   echo "configure: failed program was:" >&5
10199   cat conftest.$ac_ext >&5
10200   rm -rf conftest*
10201   eval "ac_cv_lib_$ac_lib_var=no"
10202 fi
10203 rm -f conftest*
10204 LIBS="$ac_save_LIBS"
10205
10206 fi
10207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10208   echo "$ac_t""yes" 1>&6
10209     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10210     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10211   cat >> confdefs.h <<EOF
10212 #define $ac_tr_lib 1
10213 EOF
10214
10215   LIBS="-lresolv $LIBS"
10216
10217 else
10218   echo "$ac_t""no" 1>&6
10219 fi
10220
10221         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10222 fi
10223
10224 if test "$ac_cv_func_res_query" = yes ; then
10225         cat >> confdefs.h <<\EOF
10226 #define HAVE_RES_QUERY 1
10227 EOF
10228
10229
10230         if test $ol_enable_dnssrv != no ; then
10231                 ol_link_dnssrv=yes
10232         fi
10233 fi
10234
10235 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10236         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10237 fi
10238
10239 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10240 do
10241 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10242 echo "configure:10243: checking for $ac_func" >&5
10243 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10244   echo $ac_n "(cached) $ac_c" 1>&6
10245 else
10246   cat > conftest.$ac_ext <<EOF
10247 #line 10248 "configure"
10248 #include "confdefs.h"
10249 /* System header to define __stub macros and hopefully few prototypes,
10250     which can conflict with char $ac_func(); below.  */
10251 #include <assert.h>
10252 /* Override any gcc2 internal prototype to avoid an error.  */
10253 /* We use char because int might match the return type of a gcc2
10254     builtin and then its argument prototype would still apply.  */
10255 char $ac_func();
10256 char (*f)();
10257
10258 int main() {
10259
10260 /* The GNU C library defines this for functions which it implements
10261     to always fail with ENOSYS.  Some functions are actually named
10262     something starting with __ and the normal name is an alias.  */
10263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10264 choke me
10265 #else
10266 f = $ac_func;
10267 #endif
10268
10269 ; return 0; }
10270 EOF
10271 if { (eval echo configure:10272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10272   rm -rf conftest*
10273   eval "ac_cv_func_$ac_func=yes"
10274 else
10275   echo "configure: failed program was:" >&5
10276   cat conftest.$ac_ext >&5
10277   rm -rf conftest*
10278   eval "ac_cv_func_$ac_func=no"
10279 fi
10280 rm -f conftest*
10281 fi
10282
10283 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10284   echo "$ac_t""yes" 1>&6
10285     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10286   cat >> confdefs.h <<EOF
10287 #define $ac_tr_func 1
10288 EOF
10289  
10290 else
10291   echo "$ac_t""no" 1>&6
10292 fi
10293 done
10294
10295
10296 ol_link_ipv6=no
10297 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10298         if test $ol_enable_ipv6 = yes ; then
10299                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10300         fi
10301 elif test $ol_enable_ipv6 != no ; then
10302         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10303 echo "configure:10304: checking INET6_ADDRSTRLEN" >&5
10304 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10305   echo $ac_n "(cached) $ac_c" 1>&6
10306 else
10307   
10308                 cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311
10312 #                       include <netinet/in.h>
10313 #                       ifdef INET6_ADDRSTRLEN
10314                                 __has_inet6_addrstrlen__;
10315 #                       endif
10316                 
10317 EOF
10318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10319   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10320   rm -rf conftest*
10321   ol_cv_inet6_addrstrlen=yes
10322 else
10323   rm -rf conftest*
10324   ol_cv_inet6_addrstrlen=no
10325 fi
10326 rm -f conftest*
10327
10328 fi
10329
10330 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10331
10332
10333         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10334 echo "configure:10335: checking struct sockaddr_storage" >&5
10335 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10336   echo $ac_n "(cached) $ac_c" 1>&6
10337 else
10338   
10339                 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342
10343 #include <sys/types.h>
10344 #include <sys/socket.h>
10345
10346 int main() {
10347
10348                         struct sockaddr_storage ss;
10349
10350 ; return 0; }
10351 EOF
10352 if { (eval echo configure:10353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10353   rm -rf conftest*
10354   ol_cv_struct_sockaddr_storage=yes
10355 else
10356   echo "configure: failed program was:" >&5
10357   cat conftest.$ac_ext >&5
10358   rm -rf conftest*
10359   ol_cv_struct_sockaddr_storage=no
10360 fi
10361 rm -f conftest*
10362 fi
10363
10364 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10365
10366         if test $ol_cv_inet6_addrstrlen = yes \
10367                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10368                 ol_link_ipv6=yes
10369         elif test $ol_enable_ipv6 = yes \
10370                         -a $ol_cv_inet6_addrstrlen = no ; then
10371                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10372         elif test $ol_enable_ipv6 = yes \
10373                         -a $ol_cv_struct_sockaddr_storage = no ; then
10374                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10375         fi
10376 fi
10377
10378 if test $ol_enable_local != no ; then
10379         for ac_hdr in sys/un.h 
10380 do
10381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10383 echo "configure:10384: checking for $ac_hdr" >&5
10384 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10385   echo $ac_n "(cached) $ac_c" 1>&6
10386 else
10387   cat > conftest.$ac_ext <<EOF
10388 #line 10389 "configure"
10389 #include "confdefs.h"
10390 #include <$ac_hdr>
10391 EOF
10392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10393 { (eval echo configure:10394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10395 if test -z "$ac_err"; then
10396   rm -rf conftest*
10397   eval "ac_cv_header_$ac_safe=yes"
10398 else
10399   echo "$ac_err" >&5
10400   echo "configure: failed program was:" >&5
10401   cat conftest.$ac_ext >&5
10402   rm -rf conftest*
10403   eval "ac_cv_header_$ac_safe=no"
10404 fi
10405 rm -f conftest*
10406 fi
10407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10408   echo "$ac_t""yes" 1>&6
10409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10410   cat >> confdefs.h <<EOF
10411 #define $ac_tr_hdr 1
10412 EOF
10413  
10414 else
10415   echo "$ac_t""no" 1>&6
10416 fi
10417 done
10418
10419
10420         if test $ol_enable_local = auto ; then
10421                 ol_enable_local=$ac_cv_header_sys_un_h
10422         elif test $ac_cv_header_sys_un_h = no ; then
10423                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10424         fi
10425 fi
10426
10427 ol_link_kbind=no
10428 ol_link_kpasswd=no
10429 ol_link_krb5=no
10430 ol_link_krb4=no
10431
10432 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10433         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10434         -o $ol_with_kerberos = k425 ; then
10435
10436         for ac_hdr in krb5.h
10437 do
10438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10440 echo "configure:10441: checking for $ac_hdr" >&5
10441 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10442   echo $ac_n "(cached) $ac_c" 1>&6
10443 else
10444   cat > conftest.$ac_ext <<EOF
10445 #line 10446 "configure"
10446 #include "confdefs.h"
10447 #include <$ac_hdr>
10448 EOF
10449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10450 { (eval echo configure:10451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10452 if test -z "$ac_err"; then
10453   rm -rf conftest*
10454   eval "ac_cv_header_$ac_safe=yes"
10455 else
10456   echo "$ac_err" >&5
10457   echo "configure: failed program was:" >&5
10458   cat conftest.$ac_ext >&5
10459   rm -rf conftest*
10460   eval "ac_cv_header_$ac_safe=no"
10461 fi
10462 rm -f conftest*
10463 fi
10464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10465   echo "$ac_t""yes" 1>&6
10466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10467   cat >> confdefs.h <<EOF
10468 #define $ac_tr_hdr 1
10469 EOF
10470  
10471 else
10472   echo "$ac_t""no" 1>&6
10473 fi
10474 done
10475
10476
10477         if test $ac_cv_header_krb5_h = yes ; then
10478                                 for ac_hdr in heim_err.h
10479 do
10480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10482 echo "configure:10483: checking for $ac_hdr" >&5
10483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   cat > conftest.$ac_ext <<EOF
10487 #line 10488 "configure"
10488 #include "confdefs.h"
10489 #include <$ac_hdr>
10490 EOF
10491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10492 { (eval echo configure:10493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10494 if test -z "$ac_err"; then
10495   rm -rf conftest*
10496   eval "ac_cv_header_$ac_safe=yes"
10497 else
10498   echo "$ac_err" >&5
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   eval "ac_cv_header_$ac_safe=no"
10503 fi
10504 rm -f conftest*
10505 fi
10506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10507   echo "$ac_t""yes" 1>&6
10508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10509   cat >> confdefs.h <<EOF
10510 #define $ac_tr_hdr 1
10511 EOF
10512  
10513 else
10514   echo "$ac_t""no" 1>&6
10515 fi
10516 done
10517
10518                 if test $ac_cv_header_heim_err_h = yes ; then
10519                         krb5_impl=heimdal
10520                 else
10521                         krb5_impl=mit
10522                 fi
10523
10524                 if test $krb5_impl = mit; then
10525                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10526 echo "configure:10527: checking for main in -lk5crypto" >&5
10527 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10529   echo $ac_n "(cached) $ac_c" 1>&6
10530 else
10531   ac_save_LIBS="$LIBS"
10532 LIBS="-lk5crypto  $LIBS"
10533 cat > conftest.$ac_ext <<EOF
10534 #line 10535 "configure"
10535 #include "confdefs.h"
10536
10537 int main() {
10538 main()
10539 ; return 0; }
10540 EOF
10541 if { (eval echo configure:10542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10542   rm -rf conftest*
10543   eval "ac_cv_lib_$ac_lib_var=yes"
10544 else
10545   echo "configure: failed program was:" >&5
10546   cat conftest.$ac_ext >&5
10547   rm -rf conftest*
10548   eval "ac_cv_lib_$ac_lib_var=no"
10549 fi
10550 rm -f conftest*
10551 LIBS="$ac_save_LIBS"
10552
10553 fi
10554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10555   echo "$ac_t""yes" 1>&6
10556   krb5crypto=k5crypto
10557 else
10558   echo "$ac_t""no" 1>&6
10559 krb5crypto=crypto
10560 fi
10561
10562
10563                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10564 echo "configure:10565: checking for main in -lkrb5" >&5
10565 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10566 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   ac_save_LIBS="$LIBS"
10570 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10571 cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574
10575 int main() {
10576 main()
10577 ; return 0; }
10578 EOF
10579 if { (eval echo configure:10580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=yes"
10582 else
10583   echo "configure: failed program was:" >&5
10584   cat conftest.$ac_ext >&5
10585   rm -rf conftest*
10586   eval "ac_cv_lib_$ac_lib_var=no"
10587 fi
10588 rm -f conftest*
10589 LIBS="$ac_save_LIBS"
10590
10591 fi
10592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10593   echo "$ac_t""yes" 1>&6
10594   have_krb5=yes
10595                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10596 else
10597   echo "$ac_t""no" 1>&6
10598 have_krb5=no
10599 fi
10600
10601
10602                 elif test $krb5_impl = heimdal; then
10603                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10604 echo "configure:10605: checking for main in -ldes" >&5
10605 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10607   echo $ac_n "(cached) $ac_c" 1>&6
10608 else
10609   ac_save_LIBS="$LIBS"
10610 LIBS="-ldes  $LIBS"
10611 cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614
10615 int main() {
10616 main()
10617 ; return 0; }
10618 EOF
10619 if { (eval echo configure:10620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10620   rm -rf conftest*
10621   eval "ac_cv_lib_$ac_lib_var=yes"
10622 else
10623   echo "configure: failed program was:" >&5
10624   cat conftest.$ac_ext >&5
10625   rm -rf conftest*
10626   eval "ac_cv_lib_$ac_lib_var=no"
10627 fi
10628 rm -f conftest*
10629 LIBS="$ac_save_LIBS"
10630
10631 fi
10632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10633   echo "$ac_t""yes" 1>&6
10634   krb5crypto=des
10635 else
10636   echo "$ac_t""no" 1>&6
10637 krb5crypto=crypto
10638 fi
10639
10640
10641                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10642 echo "configure:10643: checking for main in -lkrb5" >&5
10643 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10645   echo $ac_n "(cached) $ac_c" 1>&6
10646 else
10647   ac_save_LIBS="$LIBS"
10648 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10649 cat > conftest.$ac_ext <<EOF
10650 #line 10651 "configure"
10651 #include "confdefs.h"
10652
10653 int main() {
10654 main()
10655 ; return 0; }
10656 EOF
10657 if { (eval echo configure:10658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10658   rm -rf conftest*
10659   eval "ac_cv_lib_$ac_lib_var=yes"
10660 else
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_lib_$ac_lib_var=no"
10665 fi
10666 rm -f conftest*
10667 LIBS="$ac_save_LIBS"
10668
10669 fi
10670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10671   echo "$ac_t""yes" 1>&6
10672   have_krb5=yes
10673                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10674 else
10675   echo "$ac_t""no" 1>&6
10676 have_krb5=no
10677 fi
10678
10679
10680                         cat >> confdefs.h <<\EOF
10681 #define HAVE_HEIMDAL_KERBEROS 1
10682 EOF
10683
10684
10685                 else
10686                         have_krb5=no
10687                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10688                 fi
10689
10690                 if test $have_krb5 = yes ; then
10691                         ol_link_krb5=yes
10692
10693                         cat >> confdefs.h <<\EOF
10694 #define HAVE_KRB5 1
10695 EOF
10696
10697
10698                         if test $ol_enable_kpasswd != no ; then
10699                                 ol_link_kpasswd=yes;
10700                         fi
10701
10702                         if test $ol_with_kerberos = k5only ; then
10703                                 ol_with_kerberos=found
10704                         fi
10705
10706                 elif test $ol_with_kerberos != auto ; then
10707                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10708                 fi
10709
10710         fi
10711 fi
10712
10713 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10714         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10715
10716         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10717 do
10718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10720 echo "configure:10721: checking for $ac_hdr" >&5
10721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10722   echo $ac_n "(cached) $ac_c" 1>&6
10723 else
10724   cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727 #include <$ac_hdr>
10728 EOF
10729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10730 { (eval echo configure:10731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10732 if test -z "$ac_err"; then
10733   rm -rf conftest*
10734   eval "ac_cv_header_$ac_safe=yes"
10735 else
10736   echo "$ac_err" >&5
10737   echo "configure: failed program was:" >&5
10738   cat conftest.$ac_ext >&5
10739   rm -rf conftest*
10740   eval "ac_cv_header_$ac_safe=no"
10741 fi
10742 rm -f conftest*
10743 fi
10744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10745   echo "$ac_t""yes" 1>&6
10746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10747   cat >> confdefs.h <<EOF
10748 #define $ac_tr_hdr 1
10749 EOF
10750  
10751 else
10752   echo "$ac_t""no" 1>&6
10753 fi
10754 done
10755
10756
10757         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10758                 if test $krb5_impl = mit; then
10759                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10760 echo "configure:10761: checking for main in -lkrb4" >&5
10761 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10763   echo $ac_n "(cached) $ac_c" 1>&6
10764 else
10765   ac_save_LIBS="$LIBS"
10766 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10767 cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770
10771 int main() {
10772 main()
10773 ; return 0; }
10774 EOF
10775 if { (eval echo configure:10776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10776   rm -rf conftest*
10777   eval "ac_cv_lib_$ac_lib_var=yes"
10778 else
10779   echo "configure: failed program was:" >&5
10780   cat conftest.$ac_ext >&5
10781   rm -rf conftest*
10782   eval "ac_cv_lib_$ac_lib_var=no"
10783 fi
10784 rm -f conftest*
10785 LIBS="$ac_save_LIBS"
10786
10787 fi
10788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10789   echo "$ac_t""yes" 1>&6
10790   have_k425=yes
10791                                 KRB4_LIBS="-lkrb4 -ldes425"
10792 else
10793   echo "$ac_t""no" 1>&6
10794 have_k425=no
10795 fi
10796
10797
10798                 elif test $krb5_impl = heimdal; then
10799                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10800 echo "configure:10801: checking for main in -lkrb4" >&5
10801 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10803   echo $ac_n "(cached) $ac_c" 1>&6
10804 else
10805   ac_save_LIBS="$LIBS"
10806 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10807 cat > conftest.$ac_ext <<EOF
10808 #line 10809 "configure"
10809 #include "confdefs.h"
10810
10811 int main() {
10812 main()
10813 ; return 0; }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10816   rm -rf conftest*
10817   eval "ac_cv_lib_$ac_lib_var=yes"
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   eval "ac_cv_lib_$ac_lib_var=no"
10823 fi
10824 rm -f conftest*
10825 LIBS="$ac_save_LIBS"
10826
10827 fi
10828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10829   echo "$ac_t""yes" 1>&6
10830   have_k425=yes
10831                                 KRB4_LIBS="-lkrb4"
10832 else
10833   echo "$ac_t""no" 1>&6
10834 have_k425=no
10835 fi
10836
10837
10838                 else
10839                         have_425=no
10840                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10841                 fi
10842
10843                 if test $have_k425 = yes ; then
10844                         ol_with_kerberos=found
10845                         ol_link_krb4=yes
10846
10847                         cat >> confdefs.h <<\EOF
10848 #define HAVE_KRB425 1
10849 EOF
10850
10851                         cat >> confdefs.h <<\EOF
10852 #define HAVE_KRB4 1
10853 EOF
10854
10855
10856                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10857 echo "configure:10858: checking for des_debug in Kerberos libraries" >&5
10858 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10859   echo $ac_n "(cached) $ac_c" 1>&6
10860 else
10861   
10862                                                                 save_LIBS="$LIBS"
10863                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10864                                 cat > conftest.$ac_ext <<EOF
10865 #line 10866 "configure"
10866 #include "confdefs.h"
10867
10868 #include <kerberosIV/krb.h>
10869 #include <kerberosIV/des.h>
10870 extern int des_debug;
10871
10872 int main() {
10873
10874 des_debug = 1;
10875
10876 ; return 0; }
10877 EOF
10878 if { (eval echo configure:10879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10879   rm -rf conftest*
10880   ol_cv_var_des_debug=yes
10881 else
10882   echo "configure: failed program was:" >&5
10883   cat conftest.$ac_ext >&5
10884   rm -rf conftest*
10885   ol_cv_var_des_debug=no
10886 fi
10887 rm -f conftest*
10888                                                                 LIBS="$save_LIBS"
10889                         
10890 fi
10891
10892 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10893
10894                         if test $ol_cv_var_des_debug = yes ; then
10895                                 cat >> confdefs.h <<\EOF
10896 #define HAVE_DES_DEBUG 1
10897 EOF
10898
10899                         fi
10900
10901                         LIBS="$save_LIBS"
10902                 fi
10903         fi
10904 fi
10905
10906 if test $ol_link_krb5 = yes ; then
10907         ol_with_kerberos=found
10908 fi
10909
10910 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10911         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10912
10913         for ac_hdr in krb.h des.h krb-archaeology.h 
10914 do
10915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10917 echo "configure:10918: checking for $ac_hdr" >&5
10918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10919   echo $ac_n "(cached) $ac_c" 1>&6
10920 else
10921   cat > conftest.$ac_ext <<EOF
10922 #line 10923 "configure"
10923 #include "confdefs.h"
10924 #include <$ac_hdr>
10925 EOF
10926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10927 { (eval echo configure:10928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10929 if test -z "$ac_err"; then
10930   rm -rf conftest*
10931   eval "ac_cv_header_$ac_safe=yes"
10932 else
10933   echo "$ac_err" >&5
10934   echo "configure: failed program was:" >&5
10935   cat conftest.$ac_ext >&5
10936   rm -rf conftest*
10937   eval "ac_cv_header_$ac_safe=no"
10938 fi
10939 rm -f conftest*
10940 fi
10941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10942   echo "$ac_t""yes" 1>&6
10943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10944   cat >> confdefs.h <<EOF
10945 #define $ac_tr_hdr 1
10946 EOF
10947  
10948 else
10949   echo "$ac_t""no" 1>&6
10950 fi
10951 done
10952
10953
10954         if test $ac_cv_header_krb_h = yes ; then
10955                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10956 echo "configure:10957: checking for main in -lkrb" >&5
10957 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10958 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10959   echo $ac_n "(cached) $ac_c" 1>&6
10960 else
10961   ac_save_LIBS="$LIBS"
10962 LIBS="-lkrb -ldes $LIBS"
10963 cat > conftest.$ac_ext <<EOF
10964 #line 10965 "configure"
10965 #include "confdefs.h"
10966
10967 int main() {
10968 main()
10969 ; return 0; }
10970 EOF
10971 if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10972   rm -rf conftest*
10973   eval "ac_cv_lib_$ac_lib_var=yes"
10974 else
10975   echo "configure: failed program was:" >&5
10976   cat conftest.$ac_ext >&5
10977   rm -rf conftest*
10978   eval "ac_cv_lib_$ac_lib_var=no"
10979 fi
10980 rm -f conftest*
10981 LIBS="$ac_save_LIBS"
10982
10983 fi
10984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10985   echo "$ac_t""yes" 1>&6
10986   have_k4=yes
10987 else
10988   echo "$ac_t""no" 1>&6
10989 have_k4=no
10990 fi
10991
10992
10993                 if test $have_k4 = yes ; then
10994                         ol_with_kerberos=found
10995                         ol_link_krb4=yes
10996
10997                         cat >> confdefs.h <<\EOF
10998 #define HAVE_KRB4 1
10999 EOF
11000
11001
11002                         KRB4_LIBS="-lkrb -ldes"
11003
11004                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11005                                 cat >> confdefs.h <<\EOF
11006 #define HAVE_KTH_KERBEROS 1
11007 EOF
11008
11009                         fi
11010                 fi
11011         fi
11012 fi
11013
11014 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11015         ol_link_kpasswd=yes
11016 fi
11017
11018 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11019         ol_link_kbind=yes
11020
11021 elif test $ol_enable_kbind = yes ; then
11022         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11023 fi
11024
11025 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11026         cat >> confdefs.h <<\EOF
11027 #define HAVE_KERBEROS 1
11028 EOF
11029
11030
11031 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11032         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11033 fi
11034
11035 ol_link_tls=no
11036 if test $ol_with_tls != no ; then
11037         for ac_hdr in openssl/ssl.h ssl.h
11038 do
11039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11041 echo "configure:11042: checking for $ac_hdr" >&5
11042 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11043   echo $ac_n "(cached) $ac_c" 1>&6
11044 else
11045   cat > conftest.$ac_ext <<EOF
11046 #line 11047 "configure"
11047 #include "confdefs.h"
11048 #include <$ac_hdr>
11049 EOF
11050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11051 { (eval echo configure:11052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11053 if test -z "$ac_err"; then
11054   rm -rf conftest*
11055   eval "ac_cv_header_$ac_safe=yes"
11056 else
11057   echo "$ac_err" >&5
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   eval "ac_cv_header_$ac_safe=no"
11062 fi
11063 rm -f conftest*
11064 fi
11065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11066   echo "$ac_t""yes" 1>&6
11067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11068   cat >> confdefs.h <<EOF
11069 #define $ac_tr_hdr 1
11070 EOF
11071  
11072 else
11073   echo "$ac_t""no" 1>&6
11074 fi
11075 done
11076
11077         
11078         if test $ac_cv_header_openssl_ssl_h = yes \
11079                 -o $ac_cv_header_ssl_h = yes ; then
11080                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11081 echo "configure:11082: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11082 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11083 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11084   echo $ac_n "(cached) $ac_c" 1>&6
11085 else
11086   ac_save_LIBS="$LIBS"
11087 LIBS="-lssl -lcrypto $LIBS"
11088 cat > conftest.$ac_ext <<EOF
11089 #line 11090 "configure"
11090 #include "confdefs.h"
11091 /* Override any gcc2 internal prototype to avoid an error.  */
11092 /* We use char because int might match the return type of a gcc2
11093     builtin and then its argument prototype would still apply.  */
11094 char SSLeay_add_ssl_algorithms();
11095
11096 int main() {
11097 SSLeay_add_ssl_algorithms()
11098 ; return 0; }
11099 EOF
11100 if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=yes"
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=no"
11108 fi
11109 rm -f conftest*
11110 LIBS="$ac_save_LIBS"
11111
11112 fi
11113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11114   echo "$ac_t""yes" 1>&6
11115   have_ssleay=yes
11116                         need_rsaref=no
11117 else
11118   echo "$ac_t""no" 1>&6
11119 have_ssleay=no
11120 fi
11121
11122                         
11123                 if test $have_ssleay = no ; then
11124                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11125 echo "configure:11126: checking for SSL_library_init in -lssl" >&5
11126 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11127 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11128   echo $ac_n "(cached) $ac_c" 1>&6
11129 else
11130   ac_save_LIBS="$LIBS"
11131 LIBS="-lssl -lcrypto $LIBS"
11132 cat > conftest.$ac_ext <<EOF
11133 #line 11134 "configure"
11134 #include "confdefs.h"
11135 /* Override any gcc2 internal prototype to avoid an error.  */
11136 /* We use char because int might match the return type of a gcc2
11137     builtin and then its argument prototype would still apply.  */
11138 char SSL_library_init();
11139
11140 int main() {
11141 SSL_library_init()
11142 ; return 0; }
11143 EOF
11144 if { (eval echo configure:11145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11145   rm -rf conftest*
11146   eval "ac_cv_lib_$ac_lib_var=yes"
11147 else
11148   echo "configure: failed program was:" >&5
11149   cat conftest.$ac_ext >&5
11150   rm -rf conftest*
11151   eval "ac_cv_lib_$ac_lib_var=no"
11152 fi
11153 rm -f conftest*
11154 LIBS="$ac_save_LIBS"
11155
11156 fi
11157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11158   echo "$ac_t""yes" 1>&6
11159   have_ssleay=yes
11160                                 need_rsaref=no
11161 else
11162   echo "$ac_t""no" 1>&6
11163 have_ssleay=no
11164 fi
11165
11166                 fi
11167
11168                 if test $have_ssleay = no ; then
11169                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11170 echo "configure:11171: checking for ssl3_accept in -lssl" >&5
11171 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11172 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11173   echo $ac_n "(cached) $ac_c" 1>&6
11174 else
11175   ac_save_LIBS="$LIBS"
11176 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11177 cat > conftest.$ac_ext <<EOF
11178 #line 11179 "configure"
11179 #include "confdefs.h"
11180 /* Override any gcc2 internal prototype to avoid an error.  */
11181 /* We use char because int might match the return type of a gcc2
11182     builtin and then its argument prototype would still apply.  */
11183 char ssl3_accept();
11184
11185 int main() {
11186 ssl3_accept()
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_ssleay=yes
11205                                 need_rsaref=yes
11206 else
11207   echo "$ac_t""no" 1>&6
11208 have_ssleay=no
11209 fi
11210
11211                 fi
11212
11213                 if test $have_ssleay = yes ; then
11214                         ol_with_tls=found
11215                         ol_link_tls=yes
11216
11217                         cat >> confdefs.h <<\EOF
11218 #define HAVE_SSLEAY 1
11219 EOF
11220
11221
11222                         if test $need_rsaref = yes; then
11223                                 cat >> confdefs.h <<\EOF
11224 #define HAVE_RSAREF 1
11225 EOF
11226
11227
11228                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11229                         else
11230                                 TLS_LIBS="-lssl -lcrypto"
11231                         fi
11232                 fi
11233         fi
11234
11235 else
11236         echo "configure: warning: TLS data protection not supported!" 1>&2
11237 fi
11238
11239 WITH_TLS=no
11240 if test $ol_link_tls = yes ; then
11241         cat >> confdefs.h <<\EOF
11242 #define HAVE_TLS 1
11243 EOF
11244
11245         WITH_TLS=yes
11246
11247 elif test $ol_with_tls = auto ; then
11248         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11249         echo "configure: warning: TLS data protection not supported!" 1>&2
11250
11251 elif test $ol_with_tls != no ; then
11252         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11253 fi
11254
11255 if test $ol_enable_lmpasswd != no; then
11256         if test $ol_link_tls != yes ; then
11257                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11258         fi
11259
11260         cat >> confdefs.h <<\EOF
11261 #define SLAPD_LMHASH 1
11262 EOF
11263
11264 fi
11265
11266 ol_link_threads=no
11267
11268 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11269         -o $ol_with_threads = nt ; then
11270
11271         
11272         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11273 echo "configure:11274: checking for _beginthread" >&5
11274 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11275   echo $ac_n "(cached) $ac_c" 1>&6
11276 else
11277   cat > conftest.$ac_ext <<EOF
11278 #line 11279 "configure"
11279 #include "confdefs.h"
11280 /* System header to define __stub macros and hopefully few prototypes,
11281     which can conflict with char _beginthread(); below.  */
11282 #include <assert.h>
11283 /* Override any gcc2 internal prototype to avoid an error.  */
11284 /* We use char because int might match the return type of a gcc2
11285     builtin and then its argument prototype would still apply.  */
11286 char _beginthread();
11287 char (*f)();
11288
11289 int main() {
11290
11291 /* The GNU C library defines this for functions which it implements
11292     to always fail with ENOSYS.  Some functions are actually named
11293     something starting with __ and the normal name is an alias.  */
11294 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11295 choke me
11296 #else
11297 f = _beginthread;
11298 #endif
11299
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11303   rm -rf conftest*
11304   eval "ac_cv_func__beginthread=yes"
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   eval "ac_cv_func__beginthread=no"
11310 fi
11311 rm -f conftest*
11312 fi
11313
11314 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11315   echo "$ac_t""yes" 1>&6
11316   :
11317 else
11318   echo "$ac_t""no" 1>&6
11319 fi
11320
11321
11322         if test $ac_cv_func__beginthread = yes ; then
11323                 cat >> confdefs.h <<\EOF
11324 #define HAVE_NT_THREADS 1
11325 EOF
11326
11327                 ol_cv_nt_threads=yes
11328         fi
11329
11330
11331         if test "$ol_cv_nt_threads" = yes ; then
11332                 ol_link_threads=nt
11333                 ol_with_threads=found
11334                 ol_with_yielding_select=yes
11335
11336                 cat >> confdefs.h <<\EOF
11337 #define HAVE_NT_SERVICE_MANAGER 1
11338 EOF
11339
11340                 cat >> confdefs.h <<\EOF
11341 #define HAVE_NT_EVENT_LOG 1
11342 EOF
11343
11344         fi
11345
11346         if test $ol_with_threads = nt ; then
11347                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11348         fi
11349 fi
11350
11351 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11352         -o $ol_with_threads = posix ; then
11353
11354         for ac_hdr in pthread.h
11355 do
11356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11358 echo "configure:11359: checking for $ac_hdr" >&5
11359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11360   echo $ac_n "(cached) $ac_c" 1>&6
11361 else
11362   cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365 #include <$ac_hdr>
11366 EOF
11367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11368 { (eval echo configure:11369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11370 if test -z "$ac_err"; then
11371   rm -rf conftest*
11372   eval "ac_cv_header_$ac_safe=yes"
11373 else
11374   echo "$ac_err" >&5
11375   echo "configure: failed program was:" >&5
11376   cat conftest.$ac_ext >&5
11377   rm -rf conftest*
11378   eval "ac_cv_header_$ac_safe=no"
11379 fi
11380 rm -f conftest*
11381 fi
11382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11383   echo "$ac_t""yes" 1>&6
11384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11385   cat >> confdefs.h <<EOF
11386 #define $ac_tr_hdr 1
11387 EOF
11388  
11389 else
11390   echo "$ac_t""no" 1>&6
11391 fi
11392 done
11393
11394
11395         if test $ac_cv_header_pthread_h = yes ; then
11396                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11397 echo "configure:11398: checking POSIX thread version" >&5
11398 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11399   echo $ac_n "(cached) $ac_c" 1>&6
11400 else
11401   
11402         cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405
11406 #               include <pthread.h>
11407         
11408 int main() {
11409
11410                 int i = PTHREAD_CREATE_JOINABLE;
11411         
11412 ; return 0; }
11413 EOF
11414 if { (eval echo configure:11415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11415   rm -rf conftest*
11416   
11417         cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420 #include <pthread.h>
11421 EOF
11422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11423   egrep "pthread_detach" >/dev/null 2>&1; then
11424   rm -rf conftest*
11425   ol_cv_pthread_version=10
11426 else
11427   rm -rf conftest*
11428   ol_cv_pthread_version=8
11429 fi
11430 rm -f conftest*
11431
11432 else
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -rf conftest*
11436   
11437         cat > conftest.$ac_ext <<EOF
11438 #line 11439 "configure"
11439 #include "confdefs.h"
11440
11441 #               include <pthread.h>
11442 #               ifdef PTHREAD_CREATE_UNDETACHED
11443                 draft7
11444 #               endif
11445         
11446 EOF
11447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11448   egrep "draft7" >/dev/null 2>&1; then
11449   rm -rf conftest*
11450   ol_cv_pthread_version=7
11451 else
11452   rm -rf conftest*
11453   
11454         cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 #include <pthread.h>
11458 EOF
11459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11460   egrep "pthread_attr_init" >/dev/null 2>&1; then
11461   rm -rf conftest*
11462   ol_cv_pthread_version=6
11463 else
11464   rm -rf conftest*
11465   
11466         cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469
11470 #               include <pthread.h>
11471 #ifdef          PTHREAD_MUTEX_INITIALIZER
11472                 draft5
11473 #endif
11474         
11475 EOF
11476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11477   egrep "draft5" >/dev/null 2>&1; then
11478   rm -rf conftest*
11479   ol_cv_pthread_version=5
11480 else
11481   rm -rf conftest*
11482   ol_cv_pthread_version=4
11483 fi
11484 rm -f conftest*
11485  
11486 fi
11487 rm -f conftest*
11488  
11489 fi
11490 rm -f conftest*
11491  
11492 fi
11493 rm -f conftest*
11494
11495 fi
11496
11497 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11498
11499
11500                 if test $ol_cv_pthread_version != 0 ; then
11501                         cat >> confdefs.h <<EOF
11502 #define HAVE_PTHREADS $ol_cv_pthread_version
11503 EOF
11504
11505                 else
11506                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11507                 fi
11508
11509                 # consider threads found
11510                 ol_with_threads=found
11511
11512                 
11513         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11514 echo "configure:11515: checking for LinuxThreads pthread.h" >&5
11515 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11516   echo $ac_n "(cached) $ac_c" 1>&6
11517 else
11518   cat > conftest.$ac_ext <<EOF
11519 #line 11520 "configure"
11520 #include "confdefs.h"
11521 #include <pthread.h>
11522 EOF
11523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11524   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11525   rm -rf conftest*
11526   ol_cv_header_linux_threads=yes
11527 else
11528   rm -rf conftest*
11529   ol_cv_header_linux_threads=no
11530 fi
11531 rm -f conftest*
11532
11533                 
11534 fi
11535
11536 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11537         if test $ol_cv_header_linux_threads = yes; then
11538                 cat >> confdefs.h <<\EOF
11539 #define HAVE_LINUX_THREADS 1
11540 EOF
11541
11542         fi
11543
11544                 
11545         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11546 echo "configure:11547: checking for GNU Pth pthread.h" >&5
11547 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11548   echo $ac_n "(cached) $ac_c" 1>&6
11549 else
11550   cat > conftest.$ac_ext <<EOF
11551 #line 11552 "configure"
11552 #include "confdefs.h"
11553 #include <pthread.h>
11554 #ifdef _POSIX_THREAD_IS_GNU_PTH
11555         __gnu_pth__;
11556 #endif
11557
11558 EOF
11559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11560   egrep "__gnu_pth__" >/dev/null 2>&1; then
11561   rm -rf conftest*
11562   ol_cv_header_gnu_pth_pthread_h=yes
11563 else
11564   rm -rf conftest*
11565   ol_cv_header_gnu_pth_pthread_h=no
11566 fi
11567 rm -f conftest*
11568
11569                 
11570 fi
11571
11572 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11573
11574
11575                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11576                         for ac_hdr in sched.h
11577 do
11578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11580 echo "configure:11581: checking for $ac_hdr" >&5
11581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 #include <$ac_hdr>
11588 EOF
11589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11590 { (eval echo configure:11591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11592 if test -z "$ac_err"; then
11593   rm -rf conftest*
11594   eval "ac_cv_header_$ac_safe=yes"
11595 else
11596   echo "$ac_err" >&5
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -rf conftest*
11600   eval "ac_cv_header_$ac_safe=no"
11601 fi
11602 rm -f conftest*
11603 fi
11604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11605   echo "$ac_t""yes" 1>&6
11606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11607   cat >> confdefs.h <<EOF
11608 #define $ac_tr_hdr 1
11609 EOF
11610  
11611 else
11612   echo "$ac_t""no" 1>&6
11613 fi
11614 done
11615
11616                 fi
11617
11618                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11619                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11620 echo "configure:11621: checking for pthread_create in default libraries" >&5
11621 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11622   echo $ac_n "(cached) $ac_c" 1>&6
11623 else
11624   
11625                 if test "$cross_compiling" = yes; then
11626   cat > conftest.$ac_ext <<EOF
11627 #line 11628 "configure"
11628 #include "confdefs.h"
11629 /* pthread test headers */
11630 #include <pthread.h>
11631 #if HAVE_PTHREADS < 7
11632 #include <errno.h>
11633 #endif
11634 #ifndef NULL
11635 #define NULL (void*)0
11636 #endif
11637
11638 static void *task(p)
11639         void *p;
11640 {
11641         return (void *) (p == NULL);
11642 }
11643
11644 int main() {
11645
11646         /* pthread test function */
11647 #ifndef PTHREAD_CREATE_DETACHED
11648 #define PTHREAD_CREATE_DETACHED 1
11649 #endif
11650         pthread_t t;
11651         int status;
11652         int detach = PTHREAD_CREATE_DETACHED;
11653
11654 #if HAVE_PTHREADS > 4
11655         /* Final pthreads */
11656         pthread_attr_t attr;
11657
11658         status = pthread_attr_init(&attr);
11659         if( status ) return status;
11660
11661 #if HAVE_PTHREADS < 7
11662         status = pthread_attr_setdetachstate(&attr, &detach);
11663         if( status < 0 ) status = errno;
11664 #else
11665         status = pthread_attr_setdetachstate(&attr, detach);
11666 #endif
11667         if( status ) return status;
11668         status = pthread_create( &t, &attr, task, NULL );
11669 #if HAVE_PTHREADS < 7
11670         if( status < 0 ) status = errno;
11671 #endif
11672         if( status ) return status;
11673 #else
11674         /* Draft 4 pthreads */
11675         status = pthread_create( &t, pthread_attr_default, task, NULL );
11676         if( status ) return errno;
11677
11678         /* give thread a chance to complete */
11679         /* it should remain joinable and hence detachable */
11680         sleep( 1 );
11681
11682         status = pthread_detach( &t );
11683         if( status ) return errno;
11684 #endif
11685
11686 #ifdef HAVE_LINUX_THREADS
11687         pthread_kill_other_threads_np();
11688 #endif
11689
11690         return 0;
11691
11692 ; return 0; }
11693 EOF
11694 if { (eval echo configure:11695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11695   rm -rf conftest*
11696   ol_cv_pthread_create=yes
11697 else
11698   echo "configure: failed program was:" >&5
11699   cat conftest.$ac_ext >&5
11700   rm -rf conftest*
11701   ol_cv_pthread_create=no
11702 fi
11703 rm -f conftest*
11704 else
11705   cat > conftest.$ac_ext <<EOF
11706 #line 11707 "configure"
11707 #include "confdefs.h"
11708 /* pthread test headers */
11709 #include <pthread.h>
11710 #if HAVE_PTHREADS < 7
11711 #include <errno.h>
11712 #endif
11713 #ifndef NULL
11714 #define NULL (void*)0
11715 #endif
11716
11717 static void *task(p)
11718         void *p;
11719 {
11720         return (void *) (p == NULL);
11721 }
11722
11723
11724 int main(argc, argv)
11725         int argc;
11726         char **argv;
11727 {
11728
11729         /* pthread test function */
11730 #ifndef PTHREAD_CREATE_DETACHED
11731 #define PTHREAD_CREATE_DETACHED 1
11732 #endif
11733         pthread_t t;
11734         int status;
11735         int detach = PTHREAD_CREATE_DETACHED;
11736
11737 #if HAVE_PTHREADS > 4
11738         /* Final pthreads */
11739         pthread_attr_t attr;
11740
11741         status = pthread_attr_init(&attr);
11742         if( status ) return status;
11743
11744 #if HAVE_PTHREADS < 7
11745         status = pthread_attr_setdetachstate(&attr, &detach);
11746         if( status < 0 ) status = errno;
11747 #else
11748         status = pthread_attr_setdetachstate(&attr, detach);
11749 #endif
11750         if( status ) return status;
11751         status = pthread_create( &t, &attr, task, NULL );
11752 #if HAVE_PTHREADS < 7
11753         if( status < 0 ) status = errno;
11754 #endif
11755         if( status ) return status;
11756 #else
11757         /* Draft 4 pthreads */
11758         status = pthread_create( &t, pthread_attr_default, task, NULL );
11759         if( status ) return errno;
11760
11761         /* give thread a chance to complete */
11762         /* it should remain joinable and hence detachable */
11763         sleep( 1 );
11764
11765         status = pthread_detach( &t );
11766         if( status ) return errno;
11767 #endif
11768
11769 #ifdef HAVE_LINUX_THREADS
11770         pthread_kill_other_threads_np();
11771 #endif
11772
11773         return 0;
11774
11775 }
11776
11777 EOF
11778 if { (eval echo configure:11779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11779 then
11780   ol_cv_pthread_create=yes
11781 else
11782   echo "configure: failed program was:" >&5
11783   cat conftest.$ac_ext >&5
11784   rm -fr conftest*
11785   ol_cv_pthread_create=no
11786 fi
11787 rm -fr conftest*
11788 fi
11789
11790 fi
11791
11792 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11793
11794                 if test $ol_cv_pthread_create != no ; then
11795                         ol_link_threads=posix
11796                         ol_link_pthreads=""
11797                 fi
11798                 
11799                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11800 if test "$ol_link_threads" = no ; then
11801         # try -kthread
11802         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11803 echo "configure:11804: checking for pthread link with -kthread" >&5
11804 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11805   echo $ac_n "(cached) $ac_c" 1>&6
11806 else
11807   
11808                 # save the flags
11809                 ol_LIBS="$LIBS"
11810                 LIBS="-kthread $LIBS"
11811
11812                 if test "$cross_compiling" = yes; then
11813   cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 /* pthread test headers */
11817 #include <pthread.h>
11818 #if HAVE_PTHREADS < 7
11819 #include <errno.h>
11820 #endif
11821 #ifndef NULL
11822 #define NULL (void*)0
11823 #endif
11824
11825 static void *task(p)
11826         void *p;
11827 {
11828         return (void *) (p == NULL);
11829 }
11830
11831 int main() {
11832
11833         /* pthread test function */
11834 #ifndef PTHREAD_CREATE_DETACHED
11835 #define PTHREAD_CREATE_DETACHED 1
11836 #endif
11837         pthread_t t;
11838         int status;
11839         int detach = PTHREAD_CREATE_DETACHED;
11840
11841 #if HAVE_PTHREADS > 4
11842         /* Final pthreads */
11843         pthread_attr_t attr;
11844
11845         status = pthread_attr_init(&attr);
11846         if( status ) return status;
11847
11848 #if HAVE_PTHREADS < 7
11849         status = pthread_attr_setdetachstate(&attr, &detach);
11850         if( status < 0 ) status = errno;
11851 #else
11852         status = pthread_attr_setdetachstate(&attr, detach);
11853 #endif
11854         if( status ) return status;
11855         status = pthread_create( &t, &attr, task, NULL );
11856 #if HAVE_PTHREADS < 7
11857         if( status < 0 ) status = errno;
11858 #endif
11859         if( status ) return status;
11860 #else
11861         /* Draft 4 pthreads */
11862         status = pthread_create( &t, pthread_attr_default, task, NULL );
11863         if( status ) return errno;
11864
11865         /* give thread a chance to complete */
11866         /* it should remain joinable and hence detachable */
11867         sleep( 1 );
11868
11869         status = pthread_detach( &t );
11870         if( status ) return errno;
11871 #endif
11872
11873 #ifdef HAVE_LINUX_THREADS
11874         pthread_kill_other_threads_np();
11875 #endif
11876
11877         return 0;
11878
11879 ; return 0; }
11880 EOF
11881 if { (eval echo configure:11882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11882   rm -rf conftest*
11883   ol_cv_pthread_kthread=yes
11884 else
11885   echo "configure: failed program was:" >&5
11886   cat conftest.$ac_ext >&5
11887   rm -rf conftest*
11888   ol_cv_pthread_kthread=no
11889 fi
11890 rm -f conftest*
11891 else
11892   cat > conftest.$ac_ext <<EOF
11893 #line 11894 "configure"
11894 #include "confdefs.h"
11895 /* pthread test headers */
11896 #include <pthread.h>
11897 #if HAVE_PTHREADS < 7
11898 #include <errno.h>
11899 #endif
11900 #ifndef NULL
11901 #define NULL (void*)0
11902 #endif
11903
11904 static void *task(p)
11905         void *p;
11906 {
11907         return (void *) (p == NULL);
11908 }
11909
11910
11911 int main(argc, argv)
11912         int argc;
11913         char **argv;
11914 {
11915
11916         /* pthread test function */
11917 #ifndef PTHREAD_CREATE_DETACHED
11918 #define PTHREAD_CREATE_DETACHED 1
11919 #endif
11920         pthread_t t;
11921         int status;
11922         int detach = PTHREAD_CREATE_DETACHED;
11923
11924 #if HAVE_PTHREADS > 4
11925         /* Final pthreads */
11926         pthread_attr_t attr;
11927
11928         status = pthread_attr_init(&attr);
11929         if( status ) return status;
11930
11931 #if HAVE_PTHREADS < 7
11932         status = pthread_attr_setdetachstate(&attr, &detach);
11933         if( status < 0 ) status = errno;
11934 #else
11935         status = pthread_attr_setdetachstate(&attr, detach);
11936 #endif
11937         if( status ) return status;
11938         status = pthread_create( &t, &attr, task, NULL );
11939 #if HAVE_PTHREADS < 7
11940         if( status < 0 ) status = errno;
11941 #endif
11942         if( status ) return status;
11943 #else
11944         /* Draft 4 pthreads */
11945         status = pthread_create( &t, pthread_attr_default, task, NULL );
11946         if( status ) return errno;
11947
11948         /* give thread a chance to complete */
11949         /* it should remain joinable and hence detachable */
11950         sleep( 1 );
11951
11952         status = pthread_detach( &t );
11953         if( status ) return errno;
11954 #endif
11955
11956 #ifdef HAVE_LINUX_THREADS
11957         pthread_kill_other_threads_np();
11958 #endif
11959
11960         return 0;
11961
11962 }
11963
11964 EOF
11965 if { (eval echo configure:11966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11966 then
11967   ol_cv_pthread_kthread=yes
11968 else
11969   echo "configure: failed program was:" >&5
11970   cat conftest.$ac_ext >&5
11971   rm -fr conftest*
11972   ol_cv_pthread_kthread=no
11973 fi
11974 rm -fr conftest*
11975 fi
11976
11977
11978                 # restore the LIBS
11979                 LIBS="$ol_LIBS"
11980         
11981 fi
11982
11983 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11984
11985         if test $ol_cv_pthread_kthread = yes ; then
11986                 ol_link_pthreads="-kthread"
11987                 ol_link_threads=posix
11988         fi
11989 fi
11990
11991                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11992 if test "$ol_link_threads" = no ; then
11993         # try -pthread
11994         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11995 echo "configure:11996: checking for pthread link with -pthread" >&5
11996 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11997   echo $ac_n "(cached) $ac_c" 1>&6
11998 else
11999   
12000                 # save the flags
12001                 ol_LIBS="$LIBS"
12002                 LIBS="-pthread $LIBS"
12003
12004                 if test "$cross_compiling" = yes; then
12005   cat > conftest.$ac_ext <<EOF
12006 #line 12007 "configure"
12007 #include "confdefs.h"
12008 /* pthread test headers */
12009 #include <pthread.h>
12010 #if HAVE_PTHREADS < 7
12011 #include <errno.h>
12012 #endif
12013 #ifndef NULL
12014 #define NULL (void*)0
12015 #endif
12016
12017 static void *task(p)
12018         void *p;
12019 {
12020         return (void *) (p == NULL);
12021 }
12022
12023 int main() {
12024
12025         /* pthread test function */
12026 #ifndef PTHREAD_CREATE_DETACHED
12027 #define PTHREAD_CREATE_DETACHED 1
12028 #endif
12029         pthread_t t;
12030         int status;
12031         int detach = PTHREAD_CREATE_DETACHED;
12032
12033 #if HAVE_PTHREADS > 4
12034         /* Final pthreads */
12035         pthread_attr_t attr;
12036
12037         status = pthread_attr_init(&attr);
12038         if( status ) return status;
12039
12040 #if HAVE_PTHREADS < 7
12041         status = pthread_attr_setdetachstate(&attr, &detach);
12042         if( status < 0 ) status = errno;
12043 #else
12044         status = pthread_attr_setdetachstate(&attr, detach);
12045 #endif
12046         if( status ) return status;
12047         status = pthread_create( &t, &attr, task, NULL );
12048 #if HAVE_PTHREADS < 7
12049         if( status < 0 ) status = errno;
12050 #endif
12051         if( status ) return status;
12052 #else
12053         /* Draft 4 pthreads */
12054         status = pthread_create( &t, pthread_attr_default, task, NULL );
12055         if( status ) return errno;
12056
12057         /* give thread a chance to complete */
12058         /* it should remain joinable and hence detachable */
12059         sleep( 1 );
12060
12061         status = pthread_detach( &t );
12062         if( status ) return errno;
12063 #endif
12064
12065 #ifdef HAVE_LINUX_THREADS
12066         pthread_kill_other_threads_np();
12067 #endif
12068
12069         return 0;
12070
12071 ; return 0; }
12072 EOF
12073 if { (eval echo configure:12074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12074   rm -rf conftest*
12075   ol_cv_pthread_pthread=yes
12076 else
12077   echo "configure: failed program was:" >&5
12078   cat conftest.$ac_ext >&5
12079   rm -rf conftest*
12080   ol_cv_pthread_pthread=no
12081 fi
12082 rm -f conftest*
12083 else
12084   cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087 /* pthread test headers */
12088 #include <pthread.h>
12089 #if HAVE_PTHREADS < 7
12090 #include <errno.h>
12091 #endif
12092 #ifndef NULL
12093 #define NULL (void*)0
12094 #endif
12095
12096 static void *task(p)
12097         void *p;
12098 {
12099         return (void *) (p == NULL);
12100 }
12101
12102
12103 int main(argc, argv)
12104         int argc;
12105         char **argv;
12106 {
12107
12108         /* pthread test function */
12109 #ifndef PTHREAD_CREATE_DETACHED
12110 #define PTHREAD_CREATE_DETACHED 1
12111 #endif
12112         pthread_t t;
12113         int status;
12114         int detach = PTHREAD_CREATE_DETACHED;
12115
12116 #if HAVE_PTHREADS > 4
12117         /* Final pthreads */
12118         pthread_attr_t attr;
12119
12120         status = pthread_attr_init(&attr);
12121         if( status ) return status;
12122
12123 #if HAVE_PTHREADS < 7
12124         status = pthread_attr_setdetachstate(&attr, &detach);
12125         if( status < 0 ) status = errno;
12126 #else
12127         status = pthread_attr_setdetachstate(&attr, detach);
12128 #endif
12129         if( status ) return status;
12130         status = pthread_create( &t, &attr, task, NULL );
12131 #if HAVE_PTHREADS < 7
12132         if( status < 0 ) status = errno;
12133 #endif
12134         if( status ) return status;
12135 #else
12136         /* Draft 4 pthreads */
12137         status = pthread_create( &t, pthread_attr_default, task, NULL );
12138         if( status ) return errno;
12139
12140         /* give thread a chance to complete */
12141         /* it should remain joinable and hence detachable */
12142         sleep( 1 );
12143
12144         status = pthread_detach( &t );
12145         if( status ) return errno;
12146 #endif
12147
12148 #ifdef HAVE_LINUX_THREADS
12149         pthread_kill_other_threads_np();
12150 #endif
12151
12152         return 0;
12153
12154 }
12155
12156 EOF
12157 if { (eval echo configure:12158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12158 then
12159   ol_cv_pthread_pthread=yes
12160 else
12161   echo "configure: failed program was:" >&5
12162   cat conftest.$ac_ext >&5
12163   rm -fr conftest*
12164   ol_cv_pthread_pthread=no
12165 fi
12166 rm -fr conftest*
12167 fi
12168
12169
12170                 # restore the LIBS
12171                 LIBS="$ol_LIBS"
12172         
12173 fi
12174
12175 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12176
12177         if test $ol_cv_pthread_pthread = yes ; then
12178                 ol_link_pthreads="-pthread"
12179                 ol_link_threads=posix
12180         fi
12181 fi
12182
12183                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12184 if test "$ol_link_threads" = no ; then
12185         # try -pthreads
12186         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12187 echo "configure:12188: checking for pthread link with -pthreads" >&5
12188 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12189   echo $ac_n "(cached) $ac_c" 1>&6
12190 else
12191   
12192                 # save the flags
12193                 ol_LIBS="$LIBS"
12194                 LIBS="-pthreads $LIBS"
12195
12196                 if test "$cross_compiling" = yes; then
12197   cat > conftest.$ac_ext <<EOF
12198 #line 12199 "configure"
12199 #include "confdefs.h"
12200 /* pthread test headers */
12201 #include <pthread.h>
12202 #if HAVE_PTHREADS < 7
12203 #include <errno.h>
12204 #endif
12205 #ifndef NULL
12206 #define NULL (void*)0
12207 #endif
12208
12209 static void *task(p)
12210         void *p;
12211 {
12212         return (void *) (p == NULL);
12213 }
12214
12215 int main() {
12216
12217         /* pthread test function */
12218 #ifndef PTHREAD_CREATE_DETACHED
12219 #define PTHREAD_CREATE_DETACHED 1
12220 #endif
12221         pthread_t t;
12222         int status;
12223         int detach = PTHREAD_CREATE_DETACHED;
12224
12225 #if HAVE_PTHREADS > 4
12226         /* Final pthreads */
12227         pthread_attr_t attr;
12228
12229         status = pthread_attr_init(&attr);
12230         if( status ) return status;
12231
12232 #if HAVE_PTHREADS < 7
12233         status = pthread_attr_setdetachstate(&attr, &detach);
12234         if( status < 0 ) status = errno;
12235 #else
12236         status = pthread_attr_setdetachstate(&attr, detach);
12237 #endif
12238         if( status ) return status;
12239         status = pthread_create( &t, &attr, task, NULL );
12240 #if HAVE_PTHREADS < 7
12241         if( status < 0 ) status = errno;
12242 #endif
12243         if( status ) return status;
12244 #else
12245         /* Draft 4 pthreads */
12246         status = pthread_create( &t, pthread_attr_default, task, NULL );
12247         if( status ) return errno;
12248
12249         /* give thread a chance to complete */
12250         /* it should remain joinable and hence detachable */
12251         sleep( 1 );
12252
12253         status = pthread_detach( &t );
12254         if( status ) return errno;
12255 #endif
12256
12257 #ifdef HAVE_LINUX_THREADS
12258         pthread_kill_other_threads_np();
12259 #endif
12260
12261         return 0;
12262
12263 ; return 0; }
12264 EOF
12265 if { (eval echo configure:12266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12266   rm -rf conftest*
12267   ol_cv_pthread_pthreads=yes
12268 else
12269   echo "configure: failed program was:" >&5
12270   cat conftest.$ac_ext >&5
12271   rm -rf conftest*
12272   ol_cv_pthread_pthreads=no
12273 fi
12274 rm -f conftest*
12275 else
12276   cat > conftest.$ac_ext <<EOF
12277 #line 12278 "configure"
12278 #include "confdefs.h"
12279 /* pthread test headers */
12280 #include <pthread.h>
12281 #if HAVE_PTHREADS < 7
12282 #include <errno.h>
12283 #endif
12284 #ifndef NULL
12285 #define NULL (void*)0
12286 #endif
12287
12288 static void *task(p)
12289         void *p;
12290 {
12291         return (void *) (p == NULL);
12292 }
12293
12294
12295 int main(argc, argv)
12296         int argc;
12297         char **argv;
12298 {
12299
12300         /* pthread test function */
12301 #ifndef PTHREAD_CREATE_DETACHED
12302 #define PTHREAD_CREATE_DETACHED 1
12303 #endif
12304         pthread_t t;
12305         int status;
12306         int detach = PTHREAD_CREATE_DETACHED;
12307
12308 #if HAVE_PTHREADS > 4
12309         /* Final pthreads */
12310         pthread_attr_t attr;
12311
12312         status = pthread_attr_init(&attr);
12313         if( status ) return status;
12314
12315 #if HAVE_PTHREADS < 7
12316         status = pthread_attr_setdetachstate(&attr, &detach);
12317         if( status < 0 ) status = errno;
12318 #else
12319         status = pthread_attr_setdetachstate(&attr, detach);
12320 #endif
12321         if( status ) return status;
12322         status = pthread_create( &t, &attr, task, NULL );
12323 #if HAVE_PTHREADS < 7
12324         if( status < 0 ) status = errno;
12325 #endif
12326         if( status ) return status;
12327 #else
12328         /* Draft 4 pthreads */
12329         status = pthread_create( &t, pthread_attr_default, task, NULL );
12330         if( status ) return errno;
12331
12332         /* give thread a chance to complete */
12333         /* it should remain joinable and hence detachable */
12334         sleep( 1 );
12335
12336         status = pthread_detach( &t );
12337         if( status ) return errno;
12338 #endif
12339
12340 #ifdef HAVE_LINUX_THREADS
12341         pthread_kill_other_threads_np();
12342 #endif
12343
12344         return 0;
12345
12346 }
12347
12348 EOF
12349 if { (eval echo configure:12350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12350 then
12351   ol_cv_pthread_pthreads=yes
12352 else
12353   echo "configure: failed program was:" >&5
12354   cat conftest.$ac_ext >&5
12355   rm -fr conftest*
12356   ol_cv_pthread_pthreads=no
12357 fi
12358 rm -fr conftest*
12359 fi
12360
12361
12362                 # restore the LIBS
12363                 LIBS="$ol_LIBS"
12364         
12365 fi
12366
12367 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12368
12369         if test $ol_cv_pthread_pthreads = yes ; then
12370                 ol_link_pthreads="-pthreads"
12371                 ol_link_threads=posix
12372         fi
12373 fi
12374
12375                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12376 if test "$ol_link_threads" = no ; then
12377         # try -mthreads
12378         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12379 echo "configure:12380: checking for pthread link with -mthreads" >&5
12380 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12381   echo $ac_n "(cached) $ac_c" 1>&6
12382 else
12383   
12384                 # save the flags
12385                 ol_LIBS="$LIBS"
12386                 LIBS="-mthreads $LIBS"
12387
12388                 if test "$cross_compiling" = yes; then
12389   cat > conftest.$ac_ext <<EOF
12390 #line 12391 "configure"
12391 #include "confdefs.h"
12392 /* pthread test headers */
12393 #include <pthread.h>
12394 #if HAVE_PTHREADS < 7
12395 #include <errno.h>
12396 #endif
12397 #ifndef NULL
12398 #define NULL (void*)0
12399 #endif
12400
12401 static void *task(p)
12402         void *p;
12403 {
12404         return (void *) (p == NULL);
12405 }
12406
12407 int main() {
12408
12409         /* pthread test function */
12410 #ifndef PTHREAD_CREATE_DETACHED
12411 #define PTHREAD_CREATE_DETACHED 1
12412 #endif
12413         pthread_t t;
12414         int status;
12415         int detach = PTHREAD_CREATE_DETACHED;
12416
12417 #if HAVE_PTHREADS > 4
12418         /* Final pthreads */
12419         pthread_attr_t attr;
12420
12421         status = pthread_attr_init(&attr);
12422         if( status ) return status;
12423
12424 #if HAVE_PTHREADS < 7
12425         status = pthread_attr_setdetachstate(&attr, &detach);
12426         if( status < 0 ) status = errno;
12427 #else
12428         status = pthread_attr_setdetachstate(&attr, detach);
12429 #endif
12430         if( status ) return status;
12431         status = pthread_create( &t, &attr, task, NULL );
12432 #if HAVE_PTHREADS < 7
12433         if( status < 0 ) status = errno;
12434 #endif
12435         if( status ) return status;
12436 #else
12437         /* Draft 4 pthreads */
12438         status = pthread_create( &t, pthread_attr_default, task, NULL );
12439         if( status ) return errno;
12440
12441         /* give thread a chance to complete */
12442         /* it should remain joinable and hence detachable */
12443         sleep( 1 );
12444
12445         status = pthread_detach( &t );
12446         if( status ) return errno;
12447 #endif
12448
12449 #ifdef HAVE_LINUX_THREADS
12450         pthread_kill_other_threads_np();
12451 #endif
12452
12453         return 0;
12454
12455 ; return 0; }
12456 EOF
12457 if { (eval echo configure:12458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12458   rm -rf conftest*
12459   ol_cv_pthread_mthreads=yes
12460 else
12461   echo "configure: failed program was:" >&5
12462   cat conftest.$ac_ext >&5
12463   rm -rf conftest*
12464   ol_cv_pthread_mthreads=no
12465 fi
12466 rm -f conftest*
12467 else
12468   cat > conftest.$ac_ext <<EOF
12469 #line 12470 "configure"
12470 #include "confdefs.h"
12471 /* pthread test headers */
12472 #include <pthread.h>
12473 #if HAVE_PTHREADS < 7
12474 #include <errno.h>
12475 #endif
12476 #ifndef NULL
12477 #define NULL (void*)0
12478 #endif
12479
12480 static void *task(p)
12481         void *p;
12482 {
12483         return (void *) (p == NULL);
12484 }
12485
12486
12487 int main(argc, argv)
12488         int argc;
12489         char **argv;
12490 {
12491
12492         /* pthread test function */
12493 #ifndef PTHREAD_CREATE_DETACHED
12494 #define PTHREAD_CREATE_DETACHED 1
12495 #endif
12496         pthread_t t;
12497         int status;
12498         int detach = PTHREAD_CREATE_DETACHED;
12499
12500 #if HAVE_PTHREADS > 4
12501         /* Final pthreads */
12502         pthread_attr_t attr;
12503
12504         status = pthread_attr_init(&attr);
12505         if( status ) return status;
12506
12507 #if HAVE_PTHREADS < 7
12508         status = pthread_attr_setdetachstate(&attr, &detach);
12509         if( status < 0 ) status = errno;
12510 #else
12511         status = pthread_attr_setdetachstate(&attr, detach);
12512 #endif
12513         if( status ) return status;
12514         status = pthread_create( &t, &attr, task, NULL );
12515 #if HAVE_PTHREADS < 7
12516         if( status < 0 ) status = errno;
12517 #endif
12518         if( status ) return status;
12519 #else
12520         /* Draft 4 pthreads */
12521         status = pthread_create( &t, pthread_attr_default, task, NULL );
12522         if( status ) return errno;
12523
12524         /* give thread a chance to complete */
12525         /* it should remain joinable and hence detachable */
12526         sleep( 1 );
12527
12528         status = pthread_detach( &t );
12529         if( status ) return errno;
12530 #endif
12531
12532 #ifdef HAVE_LINUX_THREADS
12533         pthread_kill_other_threads_np();
12534 #endif
12535
12536         return 0;
12537
12538 }
12539
12540 EOF
12541 if { (eval echo configure:12542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12542 then
12543   ol_cv_pthread_mthreads=yes
12544 else
12545   echo "configure: failed program was:" >&5
12546   cat conftest.$ac_ext >&5
12547   rm -fr conftest*
12548   ol_cv_pthread_mthreads=no
12549 fi
12550 rm -fr conftest*
12551 fi
12552
12553
12554                 # restore the LIBS
12555                 LIBS="$ol_LIBS"
12556         
12557 fi
12558
12559 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12560
12561         if test $ol_cv_pthread_mthreads = yes ; then
12562                 ol_link_pthreads="-mthreads"
12563                 ol_link_threads=posix
12564         fi
12565 fi
12566
12567                 # Pthread try link: -thread (ol_cv_pthread_thread)
12568 if test "$ol_link_threads" = no ; then
12569         # try -thread
12570         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12571 echo "configure:12572: checking for pthread link with -thread" >&5
12572 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12573   echo $ac_n "(cached) $ac_c" 1>&6
12574 else
12575   
12576                 # save the flags
12577                 ol_LIBS="$LIBS"
12578                 LIBS="-thread $LIBS"
12579
12580                 if test "$cross_compiling" = yes; then
12581   cat > conftest.$ac_ext <<EOF
12582 #line 12583 "configure"
12583 #include "confdefs.h"
12584 /* pthread test headers */
12585 #include <pthread.h>
12586 #if HAVE_PTHREADS < 7
12587 #include <errno.h>
12588 #endif
12589 #ifndef NULL
12590 #define NULL (void*)0
12591 #endif
12592
12593 static void *task(p)
12594         void *p;
12595 {
12596         return (void *) (p == NULL);
12597 }
12598
12599 int main() {
12600
12601         /* pthread test function */
12602 #ifndef PTHREAD_CREATE_DETACHED
12603 #define PTHREAD_CREATE_DETACHED 1
12604 #endif
12605         pthread_t t;
12606         int status;
12607         int detach = PTHREAD_CREATE_DETACHED;
12608
12609 #if HAVE_PTHREADS > 4
12610         /* Final pthreads */
12611         pthread_attr_t attr;
12612
12613         status = pthread_attr_init(&attr);
12614         if( status ) return status;
12615
12616 #if HAVE_PTHREADS < 7
12617         status = pthread_attr_setdetachstate(&attr, &detach);
12618         if( status < 0 ) status = errno;
12619 #else
12620         status = pthread_attr_setdetachstate(&attr, detach);
12621 #endif
12622         if( status ) return status;
12623         status = pthread_create( &t, &attr, task, NULL );
12624 #if HAVE_PTHREADS < 7
12625         if( status < 0 ) status = errno;
12626 #endif
12627         if( status ) return status;
12628 #else
12629         /* Draft 4 pthreads */
12630         status = pthread_create( &t, pthread_attr_default, task, NULL );
12631         if( status ) return errno;
12632
12633         /* give thread a chance to complete */
12634         /* it should remain joinable and hence detachable */
12635         sleep( 1 );
12636
12637         status = pthread_detach( &t );
12638         if( status ) return errno;
12639 #endif
12640
12641 #ifdef HAVE_LINUX_THREADS
12642         pthread_kill_other_threads_np();
12643 #endif
12644
12645         return 0;
12646
12647 ; return 0; }
12648 EOF
12649 if { (eval echo configure:12650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12650   rm -rf conftest*
12651   ol_cv_pthread_thread=yes
12652 else
12653   echo "configure: failed program was:" >&5
12654   cat conftest.$ac_ext >&5
12655   rm -rf conftest*
12656   ol_cv_pthread_thread=no
12657 fi
12658 rm -f conftest*
12659 else
12660   cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 /* pthread test headers */
12664 #include <pthread.h>
12665 #if HAVE_PTHREADS < 7
12666 #include <errno.h>
12667 #endif
12668 #ifndef NULL
12669 #define NULL (void*)0
12670 #endif
12671
12672 static void *task(p)
12673         void *p;
12674 {
12675         return (void *) (p == NULL);
12676 }
12677
12678
12679 int main(argc, argv)
12680         int argc;
12681         char **argv;
12682 {
12683
12684         /* pthread test function */
12685 #ifndef PTHREAD_CREATE_DETACHED
12686 #define PTHREAD_CREATE_DETACHED 1
12687 #endif
12688         pthread_t t;
12689         int status;
12690         int detach = PTHREAD_CREATE_DETACHED;
12691
12692 #if HAVE_PTHREADS > 4
12693         /* Final pthreads */
12694         pthread_attr_t attr;
12695
12696         status = pthread_attr_init(&attr);
12697         if( status ) return status;
12698
12699 #if HAVE_PTHREADS < 7
12700         status = pthread_attr_setdetachstate(&attr, &detach);
12701         if( status < 0 ) status = errno;
12702 #else
12703         status = pthread_attr_setdetachstate(&attr, detach);
12704 #endif
12705         if( status ) return status;
12706         status = pthread_create( &t, &attr, task, NULL );
12707 #if HAVE_PTHREADS < 7
12708         if( status < 0 ) status = errno;
12709 #endif
12710         if( status ) return status;
12711 #else
12712         /* Draft 4 pthreads */
12713         status = pthread_create( &t, pthread_attr_default, task, NULL );
12714         if( status ) return errno;
12715
12716         /* give thread a chance to complete */
12717         /* it should remain joinable and hence detachable */
12718         sleep( 1 );
12719
12720         status = pthread_detach( &t );
12721         if( status ) return errno;
12722 #endif
12723
12724 #ifdef HAVE_LINUX_THREADS
12725         pthread_kill_other_threads_np();
12726 #endif
12727
12728         return 0;
12729
12730 }
12731
12732 EOF
12733 if { (eval echo configure:12734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12734 then
12735   ol_cv_pthread_thread=yes
12736 else
12737   echo "configure: failed program was:" >&5
12738   cat conftest.$ac_ext >&5
12739   rm -fr conftest*
12740   ol_cv_pthread_thread=no
12741 fi
12742 rm -fr conftest*
12743 fi
12744
12745
12746                 # restore the LIBS
12747                 LIBS="$ol_LIBS"
12748         
12749 fi
12750
12751 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12752
12753         if test $ol_cv_pthread_thread = yes ; then
12754                 ol_link_pthreads="-thread"
12755                 ol_link_threads=posix
12756         fi
12757 fi
12758
12759
12760                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12761 if test "$ol_link_threads" = no ; then
12762         # try -lpthread -lmach -lexc -lc_r
12763         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12764 echo "configure:12765: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12765 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12766   echo $ac_n "(cached) $ac_c" 1>&6
12767 else
12768   
12769                 # save the flags
12770                 ol_LIBS="$LIBS"
12771                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12772
12773                 if test "$cross_compiling" = yes; then
12774   cat > conftest.$ac_ext <<EOF
12775 #line 12776 "configure"
12776 #include "confdefs.h"
12777 /* pthread test headers */
12778 #include <pthread.h>
12779 #if HAVE_PTHREADS < 7
12780 #include <errno.h>
12781 #endif
12782 #ifndef NULL
12783 #define NULL (void*)0
12784 #endif
12785
12786 static void *task(p)
12787         void *p;
12788 {
12789         return (void *) (p == NULL);
12790 }
12791
12792 int main() {
12793
12794         /* pthread test function */
12795 #ifndef PTHREAD_CREATE_DETACHED
12796 #define PTHREAD_CREATE_DETACHED 1
12797 #endif
12798         pthread_t t;
12799         int status;
12800         int detach = PTHREAD_CREATE_DETACHED;
12801
12802 #if HAVE_PTHREADS > 4
12803         /* Final pthreads */
12804         pthread_attr_t attr;
12805
12806         status = pthread_attr_init(&attr);
12807         if( status ) return status;
12808
12809 #if HAVE_PTHREADS < 7
12810         status = pthread_attr_setdetachstate(&attr, &detach);
12811         if( status < 0 ) status = errno;
12812 #else
12813         status = pthread_attr_setdetachstate(&attr, detach);
12814 #endif
12815         if( status ) return status;
12816         status = pthread_create( &t, &attr, task, NULL );
12817 #if HAVE_PTHREADS < 7
12818         if( status < 0 ) status = errno;
12819 #endif
12820         if( status ) return status;
12821 #else
12822         /* Draft 4 pthreads */
12823         status = pthread_create( &t, pthread_attr_default, task, NULL );
12824         if( status ) return errno;
12825
12826         /* give thread a chance to complete */
12827         /* it should remain joinable and hence detachable */
12828         sleep( 1 );
12829
12830         status = pthread_detach( &t );
12831         if( status ) return errno;
12832 #endif
12833
12834 #ifdef HAVE_LINUX_THREADS
12835         pthread_kill_other_threads_np();
12836 #endif
12837
12838         return 0;
12839
12840 ; return 0; }
12841 EOF
12842 if { (eval echo configure:12843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12843   rm -rf conftest*
12844   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12845 else
12846   echo "configure: failed program was:" >&5
12847   cat conftest.$ac_ext >&5
12848   rm -rf conftest*
12849   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12850 fi
12851 rm -f conftest*
12852 else
12853   cat > conftest.$ac_ext <<EOF
12854 #line 12855 "configure"
12855 #include "confdefs.h"
12856 /* pthread test headers */
12857 #include <pthread.h>
12858 #if HAVE_PTHREADS < 7
12859 #include <errno.h>
12860 #endif
12861 #ifndef NULL
12862 #define NULL (void*)0
12863 #endif
12864
12865 static void *task(p)
12866         void *p;
12867 {
12868         return (void *) (p == NULL);
12869 }
12870
12871
12872 int main(argc, argv)
12873         int argc;
12874         char **argv;
12875 {
12876
12877         /* pthread test function */
12878 #ifndef PTHREAD_CREATE_DETACHED
12879 #define PTHREAD_CREATE_DETACHED 1
12880 #endif
12881         pthread_t t;
12882         int status;
12883         int detach = PTHREAD_CREATE_DETACHED;
12884
12885 #if HAVE_PTHREADS > 4
12886         /* Final pthreads */
12887         pthread_attr_t attr;
12888
12889         status = pthread_attr_init(&attr);
12890         if( status ) return status;
12891
12892 #if HAVE_PTHREADS < 7
12893         status = pthread_attr_setdetachstate(&attr, &detach);
12894         if( status < 0 ) status = errno;
12895 #else
12896         status = pthread_attr_setdetachstate(&attr, detach);
12897 #endif
12898         if( status ) return status;
12899         status = pthread_create( &t, &attr, task, NULL );
12900 #if HAVE_PTHREADS < 7
12901         if( status < 0 ) status = errno;
12902 #endif
12903         if( status ) return status;
12904 #else
12905         /* Draft 4 pthreads */
12906         status = pthread_create( &t, pthread_attr_default, task, NULL );
12907         if( status ) return errno;
12908
12909         /* give thread a chance to complete */
12910         /* it should remain joinable and hence detachable */
12911         sleep( 1 );
12912
12913         status = pthread_detach( &t );
12914         if( status ) return errno;
12915 #endif
12916
12917 #ifdef HAVE_LINUX_THREADS
12918         pthread_kill_other_threads_np();
12919 #endif
12920
12921         return 0;
12922
12923 }
12924
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12927 then
12928   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -fr conftest*
12933   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12934 fi
12935 rm -fr conftest*
12936 fi
12937
12938
12939                 # restore the LIBS
12940                 LIBS="$ol_LIBS"
12941         
12942 fi
12943
12944 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12945
12946         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12947                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12948                 ol_link_threads=posix
12949         fi
12950 fi
12951
12952                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12953 if test "$ol_link_threads" = no ; then
12954         # try -lpthread -lmach -lexc
12955         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12956 echo "configure:12957: checking for pthread link with -lpthread -lmach -lexc" >&5
12957 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12958   echo $ac_n "(cached) $ac_c" 1>&6
12959 else
12960   
12961                 # save the flags
12962                 ol_LIBS="$LIBS"
12963                 LIBS="-lpthread -lmach -lexc $LIBS"
12964
12965                 if test "$cross_compiling" = yes; then
12966   cat > conftest.$ac_ext <<EOF
12967 #line 12968 "configure"
12968 #include "confdefs.h"
12969 /* pthread test headers */
12970 #include <pthread.h>
12971 #if HAVE_PTHREADS < 7
12972 #include <errno.h>
12973 #endif
12974 #ifndef NULL
12975 #define NULL (void*)0
12976 #endif
12977
12978 static void *task(p)
12979         void *p;
12980 {
12981         return (void *) (p == NULL);
12982 }
12983
12984 int main() {
12985
12986         /* pthread test function */
12987 #ifndef PTHREAD_CREATE_DETACHED
12988 #define PTHREAD_CREATE_DETACHED 1
12989 #endif
12990         pthread_t t;
12991         int status;
12992         int detach = PTHREAD_CREATE_DETACHED;
12993
12994 #if HAVE_PTHREADS > 4
12995         /* Final pthreads */
12996         pthread_attr_t attr;
12997
12998         status = pthread_attr_init(&attr);
12999         if( status ) return status;
13000
13001 #if HAVE_PTHREADS < 7
13002         status = pthread_attr_setdetachstate(&attr, &detach);
13003         if( status < 0 ) status = errno;
13004 #else
13005         status = pthread_attr_setdetachstate(&attr, detach);
13006 #endif
13007         if( status ) return status;
13008         status = pthread_create( &t, &attr, task, NULL );
13009 #if HAVE_PTHREADS < 7
13010         if( status < 0 ) status = errno;
13011 #endif
13012         if( status ) return status;
13013 #else
13014         /* Draft 4 pthreads */
13015         status = pthread_create( &t, pthread_attr_default, task, NULL );
13016         if( status ) return errno;
13017
13018         /* give thread a chance to complete */
13019         /* it should remain joinable and hence detachable */
13020         sleep( 1 );
13021
13022         status = pthread_detach( &t );
13023         if( status ) return errno;
13024 #endif
13025
13026 #ifdef HAVE_LINUX_THREADS
13027         pthread_kill_other_threads_np();
13028 #endif
13029
13030         return 0;
13031
13032 ; return 0; }
13033 EOF
13034 if { (eval echo configure:13035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13035   rm -rf conftest*
13036   ol_cv_pthread_lpthread_lmach_lexc=yes
13037 else
13038   echo "configure: failed program was:" >&5
13039   cat conftest.$ac_ext >&5
13040   rm -rf conftest*
13041   ol_cv_pthread_lpthread_lmach_lexc=no
13042 fi
13043 rm -f conftest*
13044 else
13045   cat > conftest.$ac_ext <<EOF
13046 #line 13047 "configure"
13047 #include "confdefs.h"
13048 /* pthread test headers */
13049 #include <pthread.h>
13050 #if HAVE_PTHREADS < 7
13051 #include <errno.h>
13052 #endif
13053 #ifndef NULL
13054 #define NULL (void*)0
13055 #endif
13056
13057 static void *task(p)
13058         void *p;
13059 {
13060         return (void *) (p == NULL);
13061 }
13062
13063
13064 int main(argc, argv)
13065         int argc;
13066         char **argv;
13067 {
13068
13069         /* pthread test function */
13070 #ifndef PTHREAD_CREATE_DETACHED
13071 #define PTHREAD_CREATE_DETACHED 1
13072 #endif
13073         pthread_t t;
13074         int status;
13075         int detach = PTHREAD_CREATE_DETACHED;
13076
13077 #if HAVE_PTHREADS > 4
13078         /* Final pthreads */
13079         pthread_attr_t attr;
13080
13081         status = pthread_attr_init(&attr);
13082         if( status ) return status;
13083
13084 #if HAVE_PTHREADS < 7
13085         status = pthread_attr_setdetachstate(&attr, &detach);
13086         if( status < 0 ) status = errno;
13087 #else
13088         status = pthread_attr_setdetachstate(&attr, detach);
13089 #endif
13090         if( status ) return status;
13091         status = pthread_create( &t, &attr, task, NULL );
13092 #if HAVE_PTHREADS < 7
13093         if( status < 0 ) status = errno;
13094 #endif
13095         if( status ) return status;
13096 #else
13097         /* Draft 4 pthreads */
13098         status = pthread_create( &t, pthread_attr_default, task, NULL );
13099         if( status ) return errno;
13100
13101         /* give thread a chance to complete */
13102         /* it should remain joinable and hence detachable */
13103         sleep( 1 );
13104
13105         status = pthread_detach( &t );
13106         if( status ) return errno;
13107 #endif
13108
13109 #ifdef HAVE_LINUX_THREADS
13110         pthread_kill_other_threads_np();
13111 #endif
13112
13113         return 0;
13114
13115 }
13116
13117 EOF
13118 if { (eval echo configure:13119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13119 then
13120   ol_cv_pthread_lpthread_lmach_lexc=yes
13121 else
13122   echo "configure: failed program was:" >&5
13123   cat conftest.$ac_ext >&5
13124   rm -fr conftest*
13125   ol_cv_pthread_lpthread_lmach_lexc=no
13126 fi
13127 rm -fr conftest*
13128 fi
13129
13130
13131                 # restore the LIBS
13132                 LIBS="$ol_LIBS"
13133         
13134 fi
13135
13136 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13137
13138         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13139                 ol_link_pthreads="-lpthread -lmach -lexc"
13140                 ol_link_threads=posix
13141         fi
13142 fi
13143
13144
13145                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13146 if test "$ol_link_threads" = no ; then
13147         # try -lpthread -Wl,-woff,85
13148         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13149 echo "configure:13150: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13150 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13151   echo $ac_n "(cached) $ac_c" 1>&6
13152 else
13153   
13154                 # save the flags
13155                 ol_LIBS="$LIBS"
13156                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13157
13158                 if test "$cross_compiling" = yes; then
13159   cat > conftest.$ac_ext <<EOF
13160 #line 13161 "configure"
13161 #include "confdefs.h"
13162 /* pthread test headers */
13163 #include <pthread.h>
13164 #if HAVE_PTHREADS < 7
13165 #include <errno.h>
13166 #endif
13167 #ifndef NULL
13168 #define NULL (void*)0
13169 #endif
13170
13171 static void *task(p)
13172         void *p;
13173 {
13174         return (void *) (p == NULL);
13175 }
13176
13177 int main() {
13178
13179         /* pthread test function */
13180 #ifndef PTHREAD_CREATE_DETACHED
13181 #define PTHREAD_CREATE_DETACHED 1
13182 #endif
13183         pthread_t t;
13184         int status;
13185         int detach = PTHREAD_CREATE_DETACHED;
13186
13187 #if HAVE_PTHREADS > 4
13188         /* Final pthreads */
13189         pthread_attr_t attr;
13190
13191         status = pthread_attr_init(&attr);
13192         if( status ) return status;
13193
13194 #if HAVE_PTHREADS < 7
13195         status = pthread_attr_setdetachstate(&attr, &detach);
13196         if( status < 0 ) status = errno;
13197 #else
13198         status = pthread_attr_setdetachstate(&attr, detach);
13199 #endif
13200         if( status ) return status;
13201         status = pthread_create( &t, &attr, task, NULL );
13202 #if HAVE_PTHREADS < 7
13203         if( status < 0 ) status = errno;
13204 #endif
13205         if( status ) return status;
13206 #else
13207         /* Draft 4 pthreads */
13208         status = pthread_create( &t, pthread_attr_default, task, NULL );
13209         if( status ) return errno;
13210
13211         /* give thread a chance to complete */
13212         /* it should remain joinable and hence detachable */
13213         sleep( 1 );
13214
13215         status = pthread_detach( &t );
13216         if( status ) return errno;
13217 #endif
13218
13219 #ifdef HAVE_LINUX_THREADS
13220         pthread_kill_other_threads_np();
13221 #endif
13222
13223         return 0;
13224
13225 ; return 0; }
13226 EOF
13227 if { (eval echo configure:13228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13228   rm -rf conftest*
13229   ol_cv_pthread_lib_lpthread_woff=yes
13230 else
13231   echo "configure: failed program was:" >&5
13232   cat conftest.$ac_ext >&5
13233   rm -rf conftest*
13234   ol_cv_pthread_lib_lpthread_woff=no
13235 fi
13236 rm -f conftest*
13237 else
13238   cat > conftest.$ac_ext <<EOF
13239 #line 13240 "configure"
13240 #include "confdefs.h"
13241 /* pthread test headers */
13242 #include <pthread.h>
13243 #if HAVE_PTHREADS < 7
13244 #include <errno.h>
13245 #endif
13246 #ifndef NULL
13247 #define NULL (void*)0
13248 #endif
13249
13250 static void *task(p)
13251         void *p;
13252 {
13253         return (void *) (p == NULL);
13254 }
13255
13256
13257 int main(argc, argv)
13258         int argc;
13259         char **argv;
13260 {
13261
13262         /* pthread test function */
13263 #ifndef PTHREAD_CREATE_DETACHED
13264 #define PTHREAD_CREATE_DETACHED 1
13265 #endif
13266         pthread_t t;
13267         int status;
13268         int detach = PTHREAD_CREATE_DETACHED;
13269
13270 #if HAVE_PTHREADS > 4
13271         /* Final pthreads */
13272         pthread_attr_t attr;
13273
13274         status = pthread_attr_init(&attr);
13275         if( status ) return status;
13276
13277 #if HAVE_PTHREADS < 7
13278         status = pthread_attr_setdetachstate(&attr, &detach);
13279         if( status < 0 ) status = errno;
13280 #else
13281         status = pthread_attr_setdetachstate(&attr, detach);
13282 #endif
13283         if( status ) return status;
13284         status = pthread_create( &t, &attr, task, NULL );
13285 #if HAVE_PTHREADS < 7
13286         if( status < 0 ) status = errno;
13287 #endif
13288         if( status ) return status;
13289 #else
13290         /* Draft 4 pthreads */
13291         status = pthread_create( &t, pthread_attr_default, task, NULL );
13292         if( status ) return errno;
13293
13294         /* give thread a chance to complete */
13295         /* it should remain joinable and hence detachable */
13296         sleep( 1 );
13297
13298         status = pthread_detach( &t );
13299         if( status ) return errno;
13300 #endif
13301
13302 #ifdef HAVE_LINUX_THREADS
13303         pthread_kill_other_threads_np();
13304 #endif
13305
13306         return 0;
13307
13308 }
13309
13310 EOF
13311 if { (eval echo configure:13312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13312 then
13313   ol_cv_pthread_lib_lpthread_woff=yes
13314 else
13315   echo "configure: failed program was:" >&5
13316   cat conftest.$ac_ext >&5
13317   rm -fr conftest*
13318   ol_cv_pthread_lib_lpthread_woff=no
13319 fi
13320 rm -fr conftest*
13321 fi
13322
13323
13324                 # restore the LIBS
13325                 LIBS="$ol_LIBS"
13326         
13327 fi
13328
13329 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13330
13331         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13332                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13333                 ol_link_threads=posix
13334         fi
13335 fi
13336
13337
13338                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13339 if test "$ol_link_threads" = no ; then
13340         # try -lpthread
13341         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13342 echo "configure:13343: checking for pthread link with -lpthread" >&5
13343 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13344   echo $ac_n "(cached) $ac_c" 1>&6
13345 else
13346   
13347                 # save the flags
13348                 ol_LIBS="$LIBS"
13349                 LIBS="-lpthread $LIBS"
13350
13351                 if test "$cross_compiling" = yes; then
13352   cat > conftest.$ac_ext <<EOF
13353 #line 13354 "configure"
13354 #include "confdefs.h"
13355 /* pthread test headers */
13356 #include <pthread.h>
13357 #if HAVE_PTHREADS < 7
13358 #include <errno.h>
13359 #endif
13360 #ifndef NULL
13361 #define NULL (void*)0
13362 #endif
13363
13364 static void *task(p)
13365         void *p;
13366 {
13367         return (void *) (p == NULL);
13368 }
13369
13370 int main() {
13371
13372         /* pthread test function */
13373 #ifndef PTHREAD_CREATE_DETACHED
13374 #define PTHREAD_CREATE_DETACHED 1
13375 #endif
13376         pthread_t t;
13377         int status;
13378         int detach = PTHREAD_CREATE_DETACHED;
13379
13380 #if HAVE_PTHREADS > 4
13381         /* Final pthreads */
13382         pthread_attr_t attr;
13383
13384         status = pthread_attr_init(&attr);
13385         if( status ) return status;
13386
13387 #if HAVE_PTHREADS < 7
13388         status = pthread_attr_setdetachstate(&attr, &detach);
13389         if( status < 0 ) status = errno;
13390 #else
13391         status = pthread_attr_setdetachstate(&attr, detach);
13392 #endif
13393         if( status ) return status;
13394         status = pthread_create( &t, &attr, task, NULL );
13395 #if HAVE_PTHREADS < 7
13396         if( status < 0 ) status = errno;
13397 #endif
13398         if( status ) return status;
13399 #else
13400         /* Draft 4 pthreads */
13401         status = pthread_create( &t, pthread_attr_default, task, NULL );
13402         if( status ) return errno;
13403
13404         /* give thread a chance to complete */
13405         /* it should remain joinable and hence detachable */
13406         sleep( 1 );
13407
13408         status = pthread_detach( &t );
13409         if( status ) return errno;
13410 #endif
13411
13412 #ifdef HAVE_LINUX_THREADS
13413         pthread_kill_other_threads_np();
13414 #endif
13415
13416         return 0;
13417
13418 ; return 0; }
13419 EOF
13420 if { (eval echo configure:13421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13421   rm -rf conftest*
13422   ol_cv_pthread_lpthread=yes
13423 else
13424   echo "configure: failed program was:" >&5
13425   cat conftest.$ac_ext >&5
13426   rm -rf conftest*
13427   ol_cv_pthread_lpthread=no
13428 fi
13429 rm -f conftest*
13430 else
13431   cat > conftest.$ac_ext <<EOF
13432 #line 13433 "configure"
13433 #include "confdefs.h"
13434 /* pthread test headers */
13435 #include <pthread.h>
13436 #if HAVE_PTHREADS < 7
13437 #include <errno.h>
13438 #endif
13439 #ifndef NULL
13440 #define NULL (void*)0
13441 #endif
13442
13443 static void *task(p)
13444         void *p;
13445 {
13446         return (void *) (p == NULL);
13447 }
13448
13449
13450 int main(argc, argv)
13451         int argc;
13452         char **argv;
13453 {
13454
13455         /* pthread test function */
13456 #ifndef PTHREAD_CREATE_DETACHED
13457 #define PTHREAD_CREATE_DETACHED 1
13458 #endif
13459         pthread_t t;
13460         int status;
13461         int detach = PTHREAD_CREATE_DETACHED;
13462
13463 #if HAVE_PTHREADS > 4
13464         /* Final pthreads */
13465         pthread_attr_t attr;
13466
13467         status = pthread_attr_init(&attr);
13468         if( status ) return status;
13469
13470 #if HAVE_PTHREADS < 7
13471         status = pthread_attr_setdetachstate(&attr, &detach);
13472         if( status < 0 ) status = errno;
13473 #else
13474         status = pthread_attr_setdetachstate(&attr, detach);
13475 #endif
13476         if( status ) return status;
13477         status = pthread_create( &t, &attr, task, NULL );
13478 #if HAVE_PTHREADS < 7
13479         if( status < 0 ) status = errno;
13480 #endif
13481         if( status ) return status;
13482 #else
13483         /* Draft 4 pthreads */
13484         status = pthread_create( &t, pthread_attr_default, task, NULL );
13485         if( status ) return errno;
13486
13487         /* give thread a chance to complete */
13488         /* it should remain joinable and hence detachable */
13489         sleep( 1 );
13490
13491         status = pthread_detach( &t );
13492         if( status ) return errno;
13493 #endif
13494
13495 #ifdef HAVE_LINUX_THREADS
13496         pthread_kill_other_threads_np();
13497 #endif
13498
13499         return 0;
13500
13501 }
13502
13503 EOF
13504 if { (eval echo configure:13505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13505 then
13506   ol_cv_pthread_lpthread=yes
13507 else
13508   echo "configure: failed program was:" >&5
13509   cat conftest.$ac_ext >&5
13510   rm -fr conftest*
13511   ol_cv_pthread_lpthread=no
13512 fi
13513 rm -fr conftest*
13514 fi
13515
13516
13517                 # restore the LIBS
13518                 LIBS="$ol_LIBS"
13519         
13520 fi
13521
13522 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13523
13524         if test $ol_cv_pthread_lpthread = yes ; then
13525                 ol_link_pthreads="-lpthread"
13526                 ol_link_threads=posix
13527         fi
13528 fi
13529
13530                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13531 if test "$ol_link_threads" = no ; then
13532         # try -lc_r
13533         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13534 echo "configure:13535: checking for pthread link with -lc_r" >&5
13535 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13536   echo $ac_n "(cached) $ac_c" 1>&6
13537 else
13538   
13539                 # save the flags
13540                 ol_LIBS="$LIBS"
13541                 LIBS="-lc_r $LIBS"
13542
13543                 if test "$cross_compiling" = yes; then
13544   cat > conftest.$ac_ext <<EOF
13545 #line 13546 "configure"
13546 #include "confdefs.h"
13547 /* pthread test headers */
13548 #include <pthread.h>
13549 #if HAVE_PTHREADS < 7
13550 #include <errno.h>
13551 #endif
13552 #ifndef NULL
13553 #define NULL (void*)0
13554 #endif
13555
13556 static void *task(p)
13557         void *p;
13558 {
13559         return (void *) (p == NULL);
13560 }
13561
13562 int main() {
13563
13564         /* pthread test function */
13565 #ifndef PTHREAD_CREATE_DETACHED
13566 #define PTHREAD_CREATE_DETACHED 1
13567 #endif
13568         pthread_t t;
13569         int status;
13570         int detach = PTHREAD_CREATE_DETACHED;
13571
13572 #if HAVE_PTHREADS > 4
13573         /* Final pthreads */
13574         pthread_attr_t attr;
13575
13576         status = pthread_attr_init(&attr);
13577         if( status ) return status;
13578
13579 #if HAVE_PTHREADS < 7
13580         status = pthread_attr_setdetachstate(&attr, &detach);
13581         if( status < 0 ) status = errno;
13582 #else
13583         status = pthread_attr_setdetachstate(&attr, detach);
13584 #endif
13585         if( status ) return status;
13586         status = pthread_create( &t, &attr, task, NULL );
13587 #if HAVE_PTHREADS < 7
13588         if( status < 0 ) status = errno;
13589 #endif
13590         if( status ) return status;
13591 #else
13592         /* Draft 4 pthreads */
13593         status = pthread_create( &t, pthread_attr_default, task, NULL );
13594         if( status ) return errno;
13595
13596         /* give thread a chance to complete */
13597         /* it should remain joinable and hence detachable */
13598         sleep( 1 );
13599
13600         status = pthread_detach( &t );
13601         if( status ) return errno;
13602 #endif
13603
13604 #ifdef HAVE_LINUX_THREADS
13605         pthread_kill_other_threads_np();
13606 #endif
13607
13608         return 0;
13609
13610 ; return 0; }
13611 EOF
13612 if { (eval echo configure:13613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13613   rm -rf conftest*
13614   ol_cv_pthread_lc_r=yes
13615 else
13616   echo "configure: failed program was:" >&5
13617   cat conftest.$ac_ext >&5
13618   rm -rf conftest*
13619   ol_cv_pthread_lc_r=no
13620 fi
13621 rm -f conftest*
13622 else
13623   cat > conftest.$ac_ext <<EOF
13624 #line 13625 "configure"
13625 #include "confdefs.h"
13626 /* pthread test headers */
13627 #include <pthread.h>
13628 #if HAVE_PTHREADS < 7
13629 #include <errno.h>
13630 #endif
13631 #ifndef NULL
13632 #define NULL (void*)0
13633 #endif
13634
13635 static void *task(p)
13636         void *p;
13637 {
13638         return (void *) (p == NULL);
13639 }
13640
13641
13642 int main(argc, argv)
13643         int argc;
13644         char **argv;
13645 {
13646
13647         /* pthread test function */
13648 #ifndef PTHREAD_CREATE_DETACHED
13649 #define PTHREAD_CREATE_DETACHED 1
13650 #endif
13651         pthread_t t;
13652         int status;
13653         int detach = PTHREAD_CREATE_DETACHED;
13654
13655 #if HAVE_PTHREADS > 4
13656         /* Final pthreads */
13657         pthread_attr_t attr;
13658
13659         status = pthread_attr_init(&attr);
13660         if( status ) return status;
13661
13662 #if HAVE_PTHREADS < 7
13663         status = pthread_attr_setdetachstate(&attr, &detach);
13664         if( status < 0 ) status = errno;
13665 #else
13666         status = pthread_attr_setdetachstate(&attr, detach);
13667 #endif
13668         if( status ) return status;
13669         status = pthread_create( &t, &attr, task, NULL );
13670 #if HAVE_PTHREADS < 7
13671         if( status < 0 ) status = errno;
13672 #endif
13673         if( status ) return status;
13674 #else
13675         /* Draft 4 pthreads */
13676         status = pthread_create( &t, pthread_attr_default, task, NULL );
13677         if( status ) return errno;
13678
13679         /* give thread a chance to complete */
13680         /* it should remain joinable and hence detachable */
13681         sleep( 1 );
13682
13683         status = pthread_detach( &t );
13684         if( status ) return errno;
13685 #endif
13686
13687 #ifdef HAVE_LINUX_THREADS
13688         pthread_kill_other_threads_np();
13689 #endif
13690
13691         return 0;
13692
13693 }
13694
13695 EOF
13696 if { (eval echo configure:13697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13697 then
13698   ol_cv_pthread_lc_r=yes
13699 else
13700   echo "configure: failed program was:" >&5
13701   cat conftest.$ac_ext >&5
13702   rm -fr conftest*
13703   ol_cv_pthread_lc_r=no
13704 fi
13705 rm -fr conftest*
13706 fi
13707
13708
13709                 # restore the LIBS
13710                 LIBS="$ol_LIBS"
13711         
13712 fi
13713
13714 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13715
13716         if test $ol_cv_pthread_lc_r = yes ; then
13717                 ol_link_pthreads="-lc_r"
13718                 ol_link_threads=posix
13719         fi
13720 fi
13721
13722
13723                 # Pthread try link: -threads (ol_cv_pthread_threads)
13724 if test "$ol_link_threads" = no ; then
13725         # try -threads
13726         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13727 echo "configure:13728: checking for pthread link with -threads" >&5
13728 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13729   echo $ac_n "(cached) $ac_c" 1>&6
13730 else
13731   
13732                 # save the flags
13733                 ol_LIBS="$LIBS"
13734                 LIBS="-threads $LIBS"
13735
13736                 if test "$cross_compiling" = yes; then
13737   cat > conftest.$ac_ext <<EOF
13738 #line 13739 "configure"
13739 #include "confdefs.h"
13740 /* pthread test headers */
13741 #include <pthread.h>
13742 #if HAVE_PTHREADS < 7
13743 #include <errno.h>
13744 #endif
13745 #ifndef NULL
13746 #define NULL (void*)0
13747 #endif
13748
13749 static void *task(p)
13750         void *p;
13751 {
13752         return (void *) (p == NULL);
13753 }
13754
13755 int main() {
13756
13757         /* pthread test function */
13758 #ifndef PTHREAD_CREATE_DETACHED
13759 #define PTHREAD_CREATE_DETACHED 1
13760 #endif
13761         pthread_t t;
13762         int status;
13763         int detach = PTHREAD_CREATE_DETACHED;
13764
13765 #if HAVE_PTHREADS > 4
13766         /* Final pthreads */
13767         pthread_attr_t attr;
13768
13769         status = pthread_attr_init(&attr);
13770         if( status ) return status;
13771
13772 #if HAVE_PTHREADS < 7
13773         status = pthread_attr_setdetachstate(&attr, &detach);
13774         if( status < 0 ) status = errno;
13775 #else
13776         status = pthread_attr_setdetachstate(&attr, detach);
13777 #endif
13778         if( status ) return status;
13779         status = pthread_create( &t, &attr, task, NULL );
13780 #if HAVE_PTHREADS < 7
13781         if( status < 0 ) status = errno;
13782 #endif
13783         if( status ) return status;
13784 #else
13785         /* Draft 4 pthreads */
13786         status = pthread_create( &t, pthread_attr_default, task, NULL );
13787         if( status ) return errno;
13788
13789         /* give thread a chance to complete */
13790         /* it should remain joinable and hence detachable */
13791         sleep( 1 );
13792
13793         status = pthread_detach( &t );
13794         if( status ) return errno;
13795 #endif
13796
13797 #ifdef HAVE_LINUX_THREADS
13798         pthread_kill_other_threads_np();
13799 #endif
13800
13801         return 0;
13802
13803 ; return 0; }
13804 EOF
13805 if { (eval echo configure:13806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13806   rm -rf conftest*
13807   ol_cv_pthread_threads=yes
13808 else
13809   echo "configure: failed program was:" >&5
13810   cat conftest.$ac_ext >&5
13811   rm -rf conftest*
13812   ol_cv_pthread_threads=no
13813 fi
13814 rm -f conftest*
13815 else
13816   cat > conftest.$ac_ext <<EOF
13817 #line 13818 "configure"
13818 #include "confdefs.h"
13819 /* pthread test headers */
13820 #include <pthread.h>
13821 #if HAVE_PTHREADS < 7
13822 #include <errno.h>
13823 #endif
13824 #ifndef NULL
13825 #define NULL (void*)0
13826 #endif
13827
13828 static void *task(p)
13829         void *p;
13830 {
13831         return (void *) (p == NULL);
13832 }
13833
13834
13835 int main(argc, argv)
13836         int argc;
13837         char **argv;
13838 {
13839
13840         /* pthread test function */
13841 #ifndef PTHREAD_CREATE_DETACHED
13842 #define PTHREAD_CREATE_DETACHED 1
13843 #endif
13844         pthread_t t;
13845         int status;
13846         int detach = PTHREAD_CREATE_DETACHED;
13847
13848 #if HAVE_PTHREADS > 4
13849         /* Final pthreads */
13850         pthread_attr_t attr;
13851
13852         status = pthread_attr_init(&attr);
13853         if( status ) return status;
13854
13855 #if HAVE_PTHREADS < 7
13856         status = pthread_attr_setdetachstate(&attr, &detach);
13857         if( status < 0 ) status = errno;
13858 #else
13859         status = pthread_attr_setdetachstate(&attr, detach);
13860 #endif
13861         if( status ) return status;
13862         status = pthread_create( &t, &attr, task, NULL );
13863 #if HAVE_PTHREADS < 7
13864         if( status < 0 ) status = errno;
13865 #endif
13866         if( status ) return status;
13867 #else
13868         /* Draft 4 pthreads */
13869         status = pthread_create( &t, pthread_attr_default, task, NULL );
13870         if( status ) return errno;
13871
13872         /* give thread a chance to complete */
13873         /* it should remain joinable and hence detachable */
13874         sleep( 1 );
13875
13876         status = pthread_detach( &t );
13877         if( status ) return errno;
13878 #endif
13879
13880 #ifdef HAVE_LINUX_THREADS
13881         pthread_kill_other_threads_np();
13882 #endif
13883
13884         return 0;
13885
13886 }
13887
13888 EOF
13889 if { (eval echo configure:13890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13890 then
13891   ol_cv_pthread_threads=yes
13892 else
13893   echo "configure: failed program was:" >&5
13894   cat conftest.$ac_ext >&5
13895   rm -fr conftest*
13896   ol_cv_pthread_threads=no
13897 fi
13898 rm -fr conftest*
13899 fi
13900
13901
13902                 # restore the LIBS
13903                 LIBS="$ol_LIBS"
13904         
13905 fi
13906
13907 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13908
13909         if test $ol_cv_pthread_threads = yes ; then
13910                 ol_link_pthreads="-threads"
13911                 ol_link_threads=posix
13912         fi
13913 fi
13914
13915
13916                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13917 if test "$ol_link_threads" = no ; then
13918         # try -lpthreads -lmach -lexc -lc_r
13919         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13920 echo "configure:13921: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13921 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13922   echo $ac_n "(cached) $ac_c" 1>&6
13923 else
13924   
13925                 # save the flags
13926                 ol_LIBS="$LIBS"
13927                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13928
13929                 if test "$cross_compiling" = yes; then
13930   cat > conftest.$ac_ext <<EOF
13931 #line 13932 "configure"
13932 #include "confdefs.h"
13933 /* pthread test headers */
13934 #include <pthread.h>
13935 #if HAVE_PTHREADS < 7
13936 #include <errno.h>
13937 #endif
13938 #ifndef NULL
13939 #define NULL (void*)0
13940 #endif
13941
13942 static void *task(p)
13943         void *p;
13944 {
13945         return (void *) (p == NULL);
13946 }
13947
13948 int main() {
13949
13950         /* pthread test function */
13951 #ifndef PTHREAD_CREATE_DETACHED
13952 #define PTHREAD_CREATE_DETACHED 1
13953 #endif
13954         pthread_t t;
13955         int status;
13956         int detach = PTHREAD_CREATE_DETACHED;
13957
13958 #if HAVE_PTHREADS > 4
13959         /* Final pthreads */
13960         pthread_attr_t attr;
13961
13962         status = pthread_attr_init(&attr);
13963         if( status ) return status;
13964
13965 #if HAVE_PTHREADS < 7
13966         status = pthread_attr_setdetachstate(&attr, &detach);
13967         if( status < 0 ) status = errno;
13968 #else
13969         status = pthread_attr_setdetachstate(&attr, detach);
13970 #endif
13971         if( status ) return status;
13972         status = pthread_create( &t, &attr, task, NULL );
13973 #if HAVE_PTHREADS < 7
13974         if( status < 0 ) status = errno;
13975 #endif
13976         if( status ) return status;
13977 #else
13978         /* Draft 4 pthreads */
13979         status = pthread_create( &t, pthread_attr_default, task, NULL );
13980         if( status ) return errno;
13981
13982         /* give thread a chance to complete */
13983         /* it should remain joinable and hence detachable */
13984         sleep( 1 );
13985
13986         status = pthread_detach( &t );
13987         if( status ) return errno;
13988 #endif
13989
13990 #ifdef HAVE_LINUX_THREADS
13991         pthread_kill_other_threads_np();
13992 #endif
13993
13994         return 0;
13995
13996 ; return 0; }
13997 EOF
13998 if { (eval echo configure:13999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13999   rm -rf conftest*
14000   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14001 else
14002   echo "configure: failed program was:" >&5
14003   cat conftest.$ac_ext >&5
14004   rm -rf conftest*
14005   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14006 fi
14007 rm -f conftest*
14008 else
14009   cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012 /* pthread test headers */
14013 #include <pthread.h>
14014 #if HAVE_PTHREADS < 7
14015 #include <errno.h>
14016 #endif
14017 #ifndef NULL
14018 #define NULL (void*)0
14019 #endif
14020
14021 static void *task(p)
14022         void *p;
14023 {
14024         return (void *) (p == NULL);
14025 }
14026
14027
14028 int main(argc, argv)
14029         int argc;
14030         char **argv;
14031 {
14032
14033         /* pthread test function */
14034 #ifndef PTHREAD_CREATE_DETACHED
14035 #define PTHREAD_CREATE_DETACHED 1
14036 #endif
14037         pthread_t t;
14038         int status;
14039         int detach = PTHREAD_CREATE_DETACHED;
14040
14041 #if HAVE_PTHREADS > 4
14042         /* Final pthreads */
14043         pthread_attr_t attr;
14044
14045         status = pthread_attr_init(&attr);
14046         if( status ) return status;
14047
14048 #if HAVE_PTHREADS < 7
14049         status = pthread_attr_setdetachstate(&attr, &detach);
14050         if( status < 0 ) status = errno;
14051 #else
14052         status = pthread_attr_setdetachstate(&attr, detach);
14053 #endif
14054         if( status ) return status;
14055         status = pthread_create( &t, &attr, task, NULL );
14056 #if HAVE_PTHREADS < 7
14057         if( status < 0 ) status = errno;
14058 #endif
14059         if( status ) return status;
14060 #else
14061         /* Draft 4 pthreads */
14062         status = pthread_create( &t, pthread_attr_default, task, NULL );
14063         if( status ) return errno;
14064
14065         /* give thread a chance to complete */
14066         /* it should remain joinable and hence detachable */
14067         sleep( 1 );
14068
14069         status = pthread_detach( &t );
14070         if( status ) return errno;
14071 #endif
14072
14073 #ifdef HAVE_LINUX_THREADS
14074         pthread_kill_other_threads_np();
14075 #endif
14076
14077         return 0;
14078
14079 }
14080
14081 EOF
14082 if { (eval echo configure:14083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14083 then
14084   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14085 else
14086   echo "configure: failed program was:" >&5
14087   cat conftest.$ac_ext >&5
14088   rm -fr conftest*
14089   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14090 fi
14091 rm -fr conftest*
14092 fi
14093
14094
14095                 # restore the LIBS
14096                 LIBS="$ol_LIBS"
14097         
14098 fi
14099
14100 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14101
14102         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14103                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14104                 ol_link_threads=posix
14105         fi
14106 fi
14107
14108                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14109 if test "$ol_link_threads" = no ; then
14110         # try -lpthreads -lmach -lexc
14111         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14112 echo "configure:14113: checking for pthread link with -lpthreads -lmach -lexc" >&5
14113 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14114   echo $ac_n "(cached) $ac_c" 1>&6
14115 else
14116   
14117                 # save the flags
14118                 ol_LIBS="$LIBS"
14119                 LIBS="-lpthreads -lmach -lexc $LIBS"
14120
14121                 if test "$cross_compiling" = yes; then
14122   cat > conftest.$ac_ext <<EOF
14123 #line 14124 "configure"
14124 #include "confdefs.h"
14125 /* pthread test headers */
14126 #include <pthread.h>
14127 #if HAVE_PTHREADS < 7
14128 #include <errno.h>
14129 #endif
14130 #ifndef NULL
14131 #define NULL (void*)0
14132 #endif
14133
14134 static void *task(p)
14135         void *p;
14136 {
14137         return (void *) (p == NULL);
14138 }
14139
14140 int main() {
14141
14142         /* pthread test function */
14143 #ifndef PTHREAD_CREATE_DETACHED
14144 #define PTHREAD_CREATE_DETACHED 1
14145 #endif
14146         pthread_t t;
14147         int status;
14148         int detach = PTHREAD_CREATE_DETACHED;
14149
14150 #if HAVE_PTHREADS > 4
14151         /* Final pthreads */
14152         pthread_attr_t attr;
14153
14154         status = pthread_attr_init(&attr);
14155         if( status ) return status;
14156
14157 #if HAVE_PTHREADS < 7
14158         status = pthread_attr_setdetachstate(&attr, &detach);
14159         if( status < 0 ) status = errno;
14160 #else
14161         status = pthread_attr_setdetachstate(&attr, detach);
14162 #endif
14163         if( status ) return status;
14164         status = pthread_create( &t, &attr, task, NULL );
14165 #if HAVE_PTHREADS < 7
14166         if( status < 0 ) status = errno;
14167 #endif
14168         if( status ) return status;
14169 #else
14170         /* Draft 4 pthreads */
14171         status = pthread_create( &t, pthread_attr_default, task, NULL );
14172         if( status ) return errno;
14173
14174         /* give thread a chance to complete */
14175         /* it should remain joinable and hence detachable */
14176         sleep( 1 );
14177
14178         status = pthread_detach( &t );
14179         if( status ) return errno;
14180 #endif
14181
14182 #ifdef HAVE_LINUX_THREADS
14183         pthread_kill_other_threads_np();
14184 #endif
14185
14186         return 0;
14187
14188 ; return 0; }
14189 EOF
14190 if { (eval echo configure:14191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14191   rm -rf conftest*
14192   ol_cv_pthread_lpthreads_lmach_lexc=yes
14193 else
14194   echo "configure: failed program was:" >&5
14195   cat conftest.$ac_ext >&5
14196   rm -rf conftest*
14197   ol_cv_pthread_lpthreads_lmach_lexc=no
14198 fi
14199 rm -f conftest*
14200 else
14201   cat > conftest.$ac_ext <<EOF
14202 #line 14203 "configure"
14203 #include "confdefs.h"
14204 /* pthread test headers */
14205 #include <pthread.h>
14206 #if HAVE_PTHREADS < 7
14207 #include <errno.h>
14208 #endif
14209 #ifndef NULL
14210 #define NULL (void*)0
14211 #endif
14212
14213 static void *task(p)
14214         void *p;
14215 {
14216         return (void *) (p == NULL);
14217 }
14218
14219
14220 int main(argc, argv)
14221         int argc;
14222         char **argv;
14223 {
14224
14225         /* pthread test function */
14226 #ifndef PTHREAD_CREATE_DETACHED
14227 #define PTHREAD_CREATE_DETACHED 1
14228 #endif
14229         pthread_t t;
14230         int status;
14231         int detach = PTHREAD_CREATE_DETACHED;
14232
14233 #if HAVE_PTHREADS > 4
14234         /* Final pthreads */
14235         pthread_attr_t attr;
14236
14237         status = pthread_attr_init(&attr);
14238         if( status ) return status;
14239
14240 #if HAVE_PTHREADS < 7
14241         status = pthread_attr_setdetachstate(&attr, &detach);
14242         if( status < 0 ) status = errno;
14243 #else
14244         status = pthread_attr_setdetachstate(&attr, detach);
14245 #endif
14246         if( status ) return status;
14247         status = pthread_create( &t, &attr, task, NULL );
14248 #if HAVE_PTHREADS < 7
14249         if( status < 0 ) status = errno;
14250 #endif
14251         if( status ) return status;
14252 #else
14253         /* Draft 4 pthreads */
14254         status = pthread_create( &t, pthread_attr_default, task, NULL );
14255         if( status ) return errno;
14256
14257         /* give thread a chance to complete */
14258         /* it should remain joinable and hence detachable */
14259         sleep( 1 );
14260
14261         status = pthread_detach( &t );
14262         if( status ) return errno;
14263 #endif
14264
14265 #ifdef HAVE_LINUX_THREADS
14266         pthread_kill_other_threads_np();
14267 #endif
14268
14269         return 0;
14270
14271 }
14272
14273 EOF
14274 if { (eval echo configure:14275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14275 then
14276   ol_cv_pthread_lpthreads_lmach_lexc=yes
14277 else
14278   echo "configure: failed program was:" >&5
14279   cat conftest.$ac_ext >&5
14280   rm -fr conftest*
14281   ol_cv_pthread_lpthreads_lmach_lexc=no
14282 fi
14283 rm -fr conftest*
14284 fi
14285
14286
14287                 # restore the LIBS
14288                 LIBS="$ol_LIBS"
14289         
14290 fi
14291
14292 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14293
14294         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14295                 ol_link_pthreads="-lpthreads -lmach -lexc"
14296                 ol_link_threads=posix
14297         fi
14298 fi
14299
14300                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14301 if test "$ol_link_threads" = no ; then
14302         # try -lpthreads -lexc
14303         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14304 echo "configure:14305: checking for pthread link with -lpthreads -lexc" >&5
14305 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14306   echo $ac_n "(cached) $ac_c" 1>&6
14307 else
14308   
14309                 # save the flags
14310                 ol_LIBS="$LIBS"
14311                 LIBS="-lpthreads -lexc $LIBS"
14312
14313                 if test "$cross_compiling" = yes; then
14314   cat > conftest.$ac_ext <<EOF
14315 #line 14316 "configure"
14316 #include "confdefs.h"
14317 /* pthread test headers */
14318 #include <pthread.h>
14319 #if HAVE_PTHREADS < 7
14320 #include <errno.h>
14321 #endif
14322 #ifndef NULL
14323 #define NULL (void*)0
14324 #endif
14325
14326 static void *task(p)
14327         void *p;
14328 {
14329         return (void *) (p == NULL);
14330 }
14331
14332 int main() {
14333
14334         /* pthread test function */
14335 #ifndef PTHREAD_CREATE_DETACHED
14336 #define PTHREAD_CREATE_DETACHED 1
14337 #endif
14338         pthread_t t;
14339         int status;
14340         int detach = PTHREAD_CREATE_DETACHED;
14341
14342 #if HAVE_PTHREADS > 4
14343         /* Final pthreads */
14344         pthread_attr_t attr;
14345
14346         status = pthread_attr_init(&attr);
14347         if( status ) return status;
14348
14349 #if HAVE_PTHREADS < 7
14350         status = pthread_attr_setdetachstate(&attr, &detach);
14351         if( status < 0 ) status = errno;
14352 #else
14353         status = pthread_attr_setdetachstate(&attr, detach);
14354 #endif
14355         if( status ) return status;
14356         status = pthread_create( &t, &attr, task, NULL );
14357 #if HAVE_PTHREADS < 7
14358         if( status < 0 ) status = errno;
14359 #endif
14360         if( status ) return status;
14361 #else
14362         /* Draft 4 pthreads */
14363         status = pthread_create( &t, pthread_attr_default, task, NULL );
14364         if( status ) return errno;
14365
14366         /* give thread a chance to complete */
14367         /* it should remain joinable and hence detachable */
14368         sleep( 1 );
14369
14370         status = pthread_detach( &t );
14371         if( status ) return errno;
14372 #endif
14373
14374 #ifdef HAVE_LINUX_THREADS
14375         pthread_kill_other_threads_np();
14376 #endif
14377
14378         return 0;
14379
14380 ; return 0; }
14381 EOF
14382 if { (eval echo configure:14383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14383   rm -rf conftest*
14384   ol_cv_pthread_lpthreads_lexc=yes
14385 else
14386   echo "configure: failed program was:" >&5
14387   cat conftest.$ac_ext >&5
14388   rm -rf conftest*
14389   ol_cv_pthread_lpthreads_lexc=no
14390 fi
14391 rm -f conftest*
14392 else
14393   cat > conftest.$ac_ext <<EOF
14394 #line 14395 "configure"
14395 #include "confdefs.h"
14396 /* pthread test headers */
14397 #include <pthread.h>
14398 #if HAVE_PTHREADS < 7
14399 #include <errno.h>
14400 #endif
14401 #ifndef NULL
14402 #define NULL (void*)0
14403 #endif
14404
14405 static void *task(p)
14406         void *p;
14407 {
14408         return (void *) (p == NULL);
14409 }
14410
14411
14412 int main(argc, argv)
14413         int argc;
14414         char **argv;
14415 {
14416
14417         /* pthread test function */
14418 #ifndef PTHREAD_CREATE_DETACHED
14419 #define PTHREAD_CREATE_DETACHED 1
14420 #endif
14421         pthread_t t;
14422         int status;
14423         int detach = PTHREAD_CREATE_DETACHED;
14424
14425 #if HAVE_PTHREADS > 4
14426         /* Final pthreads */
14427         pthread_attr_t attr;
14428
14429         status = pthread_attr_init(&attr);
14430         if( status ) return status;
14431
14432 #if HAVE_PTHREADS < 7
14433         status = pthread_attr_setdetachstate(&attr, &detach);
14434         if( status < 0 ) status = errno;
14435 #else
14436         status = pthread_attr_setdetachstate(&attr, detach);
14437 #endif
14438         if( status ) return status;
14439         status = pthread_create( &t, &attr, task, NULL );
14440 #if HAVE_PTHREADS < 7
14441         if( status < 0 ) status = errno;
14442 #endif
14443         if( status ) return status;
14444 #else
14445         /* Draft 4 pthreads */
14446         status = pthread_create( &t, pthread_attr_default, task, NULL );
14447         if( status ) return errno;
14448
14449         /* give thread a chance to complete */
14450         /* it should remain joinable and hence detachable */
14451         sleep( 1 );
14452
14453         status = pthread_detach( &t );
14454         if( status ) return errno;
14455 #endif
14456
14457 #ifdef HAVE_LINUX_THREADS
14458         pthread_kill_other_threads_np();
14459 #endif
14460
14461         return 0;
14462
14463 }
14464
14465 EOF
14466 if { (eval echo configure:14467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14467 then
14468   ol_cv_pthread_lpthreads_lexc=yes
14469 else
14470   echo "configure: failed program was:" >&5
14471   cat conftest.$ac_ext >&5
14472   rm -fr conftest*
14473   ol_cv_pthread_lpthreads_lexc=no
14474 fi
14475 rm -fr conftest*
14476 fi
14477
14478
14479                 # restore the LIBS
14480                 LIBS="$ol_LIBS"
14481         
14482 fi
14483
14484 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14485
14486         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14487                 ol_link_pthreads="-lpthreads -lexc"
14488                 ol_link_threads=posix
14489         fi
14490 fi
14491
14492
14493                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14494 if test "$ol_link_threads" = no ; then
14495         # try -lpthreads
14496         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14497 echo "configure:14498: checking for pthread link with -lpthreads" >&5
14498 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14499   echo $ac_n "(cached) $ac_c" 1>&6
14500 else
14501   
14502                 # save the flags
14503                 ol_LIBS="$LIBS"
14504                 LIBS="-lpthreads $LIBS"
14505
14506                 if test "$cross_compiling" = yes; then
14507   cat > conftest.$ac_ext <<EOF
14508 #line 14509 "configure"
14509 #include "confdefs.h"
14510 /* pthread test headers */
14511 #include <pthread.h>
14512 #if HAVE_PTHREADS < 7
14513 #include <errno.h>
14514 #endif
14515 #ifndef NULL
14516 #define NULL (void*)0
14517 #endif
14518
14519 static void *task(p)
14520         void *p;
14521 {
14522         return (void *) (p == NULL);
14523 }
14524
14525 int main() {
14526
14527         /* pthread test function */
14528 #ifndef PTHREAD_CREATE_DETACHED
14529 #define PTHREAD_CREATE_DETACHED 1
14530 #endif
14531         pthread_t t;
14532         int status;
14533         int detach = PTHREAD_CREATE_DETACHED;
14534
14535 #if HAVE_PTHREADS > 4
14536         /* Final pthreads */
14537         pthread_attr_t attr;
14538
14539         status = pthread_attr_init(&attr);
14540         if( status ) return status;
14541
14542 #if HAVE_PTHREADS < 7
14543         status = pthread_attr_setdetachstate(&attr, &detach);
14544         if( status < 0 ) status = errno;
14545 #else
14546         status = pthread_attr_setdetachstate(&attr, detach);
14547 #endif
14548         if( status ) return status;
14549         status = pthread_create( &t, &attr, task, NULL );
14550 #if HAVE_PTHREADS < 7
14551         if( status < 0 ) status = errno;
14552 #endif
14553         if( status ) return status;
14554 #else
14555         /* Draft 4 pthreads */
14556         status = pthread_create( &t, pthread_attr_default, task, NULL );
14557         if( status ) return errno;
14558
14559         /* give thread a chance to complete */
14560         /* it should remain joinable and hence detachable */
14561         sleep( 1 );
14562
14563         status = pthread_detach( &t );
14564         if( status ) return errno;
14565 #endif
14566
14567 #ifdef HAVE_LINUX_THREADS
14568         pthread_kill_other_threads_np();
14569 #endif
14570
14571         return 0;
14572
14573 ; return 0; }
14574 EOF
14575 if { (eval echo configure:14576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14576   rm -rf conftest*
14577   ol_cv_pthread_lib_lpthreads=yes
14578 else
14579   echo "configure: failed program was:" >&5
14580   cat conftest.$ac_ext >&5
14581   rm -rf conftest*
14582   ol_cv_pthread_lib_lpthreads=no
14583 fi
14584 rm -f conftest*
14585 else
14586   cat > conftest.$ac_ext <<EOF
14587 #line 14588 "configure"
14588 #include "confdefs.h"
14589 /* pthread test headers */
14590 #include <pthread.h>
14591 #if HAVE_PTHREADS < 7
14592 #include <errno.h>
14593 #endif
14594 #ifndef NULL
14595 #define NULL (void*)0
14596 #endif
14597
14598 static void *task(p)
14599         void *p;
14600 {
14601         return (void *) (p == NULL);
14602 }
14603
14604
14605 int main(argc, argv)
14606         int argc;
14607         char **argv;
14608 {
14609
14610         /* pthread test function */
14611 #ifndef PTHREAD_CREATE_DETACHED
14612 #define PTHREAD_CREATE_DETACHED 1
14613 #endif
14614         pthread_t t;
14615         int status;
14616         int detach = PTHREAD_CREATE_DETACHED;
14617
14618 #if HAVE_PTHREADS > 4
14619         /* Final pthreads */
14620         pthread_attr_t attr;
14621
14622         status = pthread_attr_init(&attr);
14623         if( status ) return status;
14624
14625 #if HAVE_PTHREADS < 7
14626         status = pthread_attr_setdetachstate(&attr, &detach);
14627         if( status < 0 ) status = errno;
14628 #else
14629         status = pthread_attr_setdetachstate(&attr, detach);
14630 #endif
14631         if( status ) return status;
14632         status = pthread_create( &t, &attr, task, NULL );
14633 #if HAVE_PTHREADS < 7
14634         if( status < 0 ) status = errno;
14635 #endif
14636         if( status ) return status;
14637 #else
14638         /* Draft 4 pthreads */
14639         status = pthread_create( &t, pthread_attr_default, task, NULL );
14640         if( status ) return errno;
14641
14642         /* give thread a chance to complete */
14643         /* it should remain joinable and hence detachable */
14644         sleep( 1 );
14645
14646         status = pthread_detach( &t );
14647         if( status ) return errno;
14648 #endif
14649
14650 #ifdef HAVE_LINUX_THREADS
14651         pthread_kill_other_threads_np();
14652 #endif
14653
14654         return 0;
14655
14656 }
14657
14658 EOF
14659 if { (eval echo configure:14660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14660 then
14661   ol_cv_pthread_lib_lpthreads=yes
14662 else
14663   echo "configure: failed program was:" >&5
14664   cat conftest.$ac_ext >&5
14665   rm -fr conftest*
14666   ol_cv_pthread_lib_lpthreads=no
14667 fi
14668 rm -fr conftest*
14669 fi
14670
14671
14672                 # restore the LIBS
14673                 LIBS="$ol_LIBS"
14674         
14675 fi
14676
14677 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14678
14679         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14680                 ol_link_pthreads="-lpthreads"
14681                 ol_link_threads=posix
14682         fi
14683 fi
14684
14685
14686                 if test $ol_link_threads != no ; then
14687                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14688
14689                                                 save_CPPFLAGS="$CPPFLAGS"
14690                         save_LIBS="$LIBS"
14691                         LIBS="$LTHREAD_LIBS $LIBS"
14692
14693                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14694 do
14695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14696 echo "configure:14697: checking for $ac_func" >&5
14697 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14698   echo $ac_n "(cached) $ac_c" 1>&6
14699 else
14700   cat > conftest.$ac_ext <<EOF
14701 #line 14702 "configure"
14702 #include "confdefs.h"
14703 /* System header to define __stub macros and hopefully few prototypes,
14704     which can conflict with char $ac_func(); below.  */
14705 #include <assert.h>
14706 /* Override any gcc2 internal prototype to avoid an error.  */
14707 /* We use char because int might match the return type of a gcc2
14708     builtin and then its argument prototype would still apply.  */
14709 char $ac_func();
14710 char (*f)();
14711
14712 int main() {
14713
14714 /* The GNU C library defines this for functions which it implements
14715     to always fail with ENOSYS.  Some functions are actually named
14716     something starting with __ and the normal name is an alias.  */
14717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14718 choke me
14719 #else
14720 f = $ac_func;
14721 #endif
14722
14723 ; return 0; }
14724 EOF
14725 if { (eval echo configure:14726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14726   rm -rf conftest*
14727   eval "ac_cv_func_$ac_func=yes"
14728 else
14729   echo "configure: failed program was:" >&5
14730   cat conftest.$ac_ext >&5
14731   rm -rf conftest*
14732   eval "ac_cv_func_$ac_func=no"
14733 fi
14734 rm -f conftest*
14735 fi
14736
14737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14738   echo "$ac_t""yes" 1>&6
14739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14740   cat >> confdefs.h <<EOF
14741 #define $ac_tr_func 1
14742 EOF
14743  
14744 else
14745   echo "$ac_t""no" 1>&6
14746 fi
14747 done
14748
14749
14750                         if test $ac_cv_func_sched_yield = no -a \
14751                                 $ac_cv_func_pthread_yield = no -a \
14752                                 $ac_cv_func_thr_yield = no ; then
14753                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14754 echo "configure:14755: checking for sched_yield in -lrt" >&5
14755 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14757   echo $ac_n "(cached) $ac_c" 1>&6
14758 else
14759   ac_save_LIBS="$LIBS"
14760 LIBS="-lrt  $LIBS"
14761 cat > conftest.$ac_ext <<EOF
14762 #line 14763 "configure"
14763 #include "confdefs.h"
14764 /* Override any gcc2 internal prototype to avoid an error.  */
14765 /* We use char because int might match the return type of a gcc2
14766     builtin and then its argument prototype would still apply.  */
14767 char sched_yield();
14768
14769 int main() {
14770 sched_yield()
14771 ; return 0; }
14772 EOF
14773 if { (eval echo configure:14774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14774   rm -rf conftest*
14775   eval "ac_cv_lib_$ac_lib_var=yes"
14776 else
14777   echo "configure: failed program was:" >&5
14778   cat conftest.$ac_ext >&5
14779   rm -rf conftest*
14780   eval "ac_cv_lib_$ac_lib_var=no"
14781 fi
14782 rm -f conftest*
14783 LIBS="$ac_save_LIBS"
14784
14785 fi
14786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14787   echo "$ac_t""yes" 1>&6
14788   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14789                                         cat >> confdefs.h <<\EOF
14790 #define HAVE_SCHED_YIELD 1
14791 EOF
14792
14793                                         ac_cv_func_sched_yield=yes
14794 else
14795   echo "$ac_t""no" 1>&6
14796 ac_cv_func_sched_yield=no
14797 fi
14798
14799                         fi
14800                         if test $ac_cv_func_sched_yield = no -a \
14801                                 $ac_cv_func_pthread_yield = no -a \
14802                                 "$ac_cv_func_thr_yield" = no ; then
14803                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14804                         fi
14805
14806                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14807 do
14808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14809 echo "configure:14810: checking for $ac_func" >&5
14810 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14811   echo $ac_n "(cached) $ac_c" 1>&6
14812 else
14813   cat > conftest.$ac_ext <<EOF
14814 #line 14815 "configure"
14815 #include "confdefs.h"
14816 /* System header to define __stub macros and hopefully few prototypes,
14817     which can conflict with char $ac_func(); below.  */
14818 #include <assert.h>
14819 /* Override any gcc2 internal prototype to avoid an error.  */
14820 /* We use char because int might match the return type of a gcc2
14821     builtin and then its argument prototype would still apply.  */
14822 char $ac_func();
14823 char (*f)();
14824
14825 int main() {
14826
14827 /* The GNU C library defines this for functions which it implements
14828     to always fail with ENOSYS.  Some functions are actually named
14829     something starting with __ and the normal name is an alias.  */
14830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14831 choke me
14832 #else
14833 f = $ac_func;
14834 #endif
14835
14836 ; return 0; }
14837 EOF
14838 if { (eval echo configure:14839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14839   rm -rf conftest*
14840   eval "ac_cv_func_$ac_func=yes"
14841 else
14842   echo "configure: failed program was:" >&5
14843   cat conftest.$ac_ext >&5
14844   rm -rf conftest*
14845   eval "ac_cv_func_$ac_func=no"
14846 fi
14847 rm -f conftest*
14848 fi
14849
14850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14851   echo "$ac_t""yes" 1>&6
14852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14853   cat >> confdefs.h <<EOF
14854 #define $ac_tr_func 1
14855 EOF
14856  
14857 else
14858   echo "$ac_t""no" 1>&6
14859 fi
14860 done
14861
14862
14863                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14864 echo "configure:14865: checking for pthread_detach with <pthread.h>" >&5
14865 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14866   echo $ac_n "(cached) $ac_c" 1>&6
14867 else
14868   
14869                                                                 cat > conftest.$ac_ext <<EOF
14870 #line 14871 "configure"
14871 #include "confdefs.h"
14872
14873 #include <pthread.h>
14874 #ifndef NULL
14875 #define NULL (void*)0
14876 #endif
14877
14878 int main() {
14879 pthread_detach(NULL);
14880 ; return 0; }
14881 EOF
14882 if { (eval echo configure:14883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14883   rm -rf conftest*
14884   ol_cv_func_pthread_detach=yes
14885 else
14886   echo "configure: failed program was:" >&5
14887   cat conftest.$ac_ext >&5
14888   rm -rf conftest*
14889   ol_cv_func_pthread_detach=no
14890 fi
14891 rm -f conftest*
14892                         
14893 fi
14894
14895 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14896
14897                         if test $ol_cv_func_pthread_detach = no ; then
14898                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14899                         fi
14900
14901                         cat >> confdefs.h <<\EOF
14902 #define HAVE_PTHREAD_DETACH 1
14903 EOF
14904
14905
14906                                                 for ac_func in \
14907                                 pthread_setconcurrency \
14908                                 pthread_getconcurrency \
14909                                 thr_setconcurrency \
14910                                 thr_getconcurrency \
14911                         
14912 do
14913 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14914 echo "configure:14915: checking for $ac_func" >&5
14915 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14916   echo $ac_n "(cached) $ac_c" 1>&6
14917 else
14918   cat > conftest.$ac_ext <<EOF
14919 #line 14920 "configure"
14920 #include "confdefs.h"
14921 /* System header to define __stub macros and hopefully few prototypes,
14922     which can conflict with char $ac_func(); below.  */
14923 #include <assert.h>
14924 /* Override any gcc2 internal prototype to avoid an error.  */
14925 /* We use char because int might match the return type of a gcc2
14926     builtin and then its argument prototype would still apply.  */
14927 char $ac_func();
14928 char (*f)();
14929
14930 int main() {
14931
14932 /* The GNU C library defines this for functions which it implements
14933     to always fail with ENOSYS.  Some functions are actually named
14934     something starting with __ and the normal name is an alias.  */
14935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14936 choke me
14937 #else
14938 f = $ac_func;
14939 #endif
14940
14941 ; return 0; }
14942 EOF
14943 if { (eval echo configure:14944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14944   rm -rf conftest*
14945   eval "ac_cv_func_$ac_func=yes"
14946 else
14947   echo "configure: failed program was:" >&5
14948   cat conftest.$ac_ext >&5
14949   rm -rf conftest*
14950   eval "ac_cv_func_$ac_func=no"
14951 fi
14952 rm -f conftest*
14953 fi
14954
14955 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14956   echo "$ac_t""yes" 1>&6
14957     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14958   cat >> confdefs.h <<EOF
14959 #define $ac_tr_func 1
14960 EOF
14961  
14962 else
14963   echo "$ac_t""no" 1>&6
14964 fi
14965 done
14966
14967
14968                         
14969         for ac_func in pthread_kill_other_threads_np
14970 do
14971 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14972 echo "configure:14973: checking for $ac_func" >&5
14973 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14974   echo $ac_n "(cached) $ac_c" 1>&6
14975 else
14976   cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 /* System header to define __stub macros and hopefully few prototypes,
14980     which can conflict with char $ac_func(); below.  */
14981 #include <assert.h>
14982 /* Override any gcc2 internal prototype to avoid an error.  */
14983 /* We use char because int might match the return type of a gcc2
14984     builtin and then its argument prototype would still apply.  */
14985 char $ac_func();
14986 char (*f)();
14987
14988 int main() {
14989
14990 /* The GNU C library defines this for functions which it implements
14991     to always fail with ENOSYS.  Some functions are actually named
14992     something starting with __ and the normal name is an alias.  */
14993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14994 choke me
14995 #else
14996 f = $ac_func;
14997 #endif
14998
14999 ; return 0; }
15000 EOF
15001 if { (eval echo configure:15002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15002   rm -rf conftest*
15003   eval "ac_cv_func_$ac_func=yes"
15004 else
15005   echo "configure: failed program was:" >&5
15006   cat conftest.$ac_ext >&5
15007   rm -rf conftest*
15008   eval "ac_cv_func_$ac_func=no"
15009 fi
15010 rm -f conftest*
15011 fi
15012
15013 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15014   echo "$ac_t""yes" 1>&6
15015     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15016   cat >> confdefs.h <<EOF
15017 #define $ac_tr_func 1
15018 EOF
15019  
15020 else
15021   echo "$ac_t""no" 1>&6
15022 fi
15023 done
15024
15025         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15026 echo "configure:15027: checking for LinuxThreads implementation" >&5
15027 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15028   echo $ac_n "(cached) $ac_c" 1>&6
15029 else
15030   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15031 fi
15032
15033 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15034
15035                         
15036         
15037         
15038         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15039 echo "configure:15040: checking for LinuxThreads consistency" >&5
15040 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   
15044                 if test $ol_cv_header_linux_threads = yes -a \
15045                         $ol_cv_sys_linux_threads = yes; then
15046                         ol_cv_linux_threads=yes
15047                 elif test $ol_cv_header_linux_threads = no -a \
15048                         $ol_cv_sys_linux_threads = no; then
15049                         ol_cv_linux_threads=no
15050                 else
15051                         ol_cv_linux_threads=error
15052                 fi
15053         
15054 fi
15055
15056 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15057
15058
15059                         if test $ol_cv_linux_threads = error; then
15060                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15061                         fi
15062
15063                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15064 echo "configure:15065: checking if pthread_create() works" >&5
15065 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15066   echo $ac_n "(cached) $ac_c" 1>&6
15067 else
15068   
15069                         if test "$cross_compiling" = yes; then
15070                                 ol_cv_pthread_create_works=yes
15071 else
15072   cat > conftest.$ac_ext <<EOF
15073 #line 15074 "configure"
15074 #include "confdefs.h"
15075 /* pthread test headers */
15076 #include <pthread.h>
15077 #if HAVE_PTHREADS < 7
15078 #include <errno.h>
15079 #endif
15080 #ifndef NULL
15081 #define NULL (void*)0
15082 #endif
15083
15084 static void *task(p)
15085         void *p;
15086 {
15087         return (void *) (p == NULL);
15088 }
15089
15090
15091 int main(argc, argv)
15092         int argc;
15093         char **argv;
15094 {
15095
15096         /* pthread test function */
15097 #ifndef PTHREAD_CREATE_DETACHED
15098 #define PTHREAD_CREATE_DETACHED 1
15099 #endif
15100         pthread_t t;
15101         int status;
15102         int detach = PTHREAD_CREATE_DETACHED;
15103
15104 #if HAVE_PTHREADS > 4
15105         /* Final pthreads */
15106         pthread_attr_t attr;
15107
15108         status = pthread_attr_init(&attr);
15109         if( status ) return status;
15110
15111 #if HAVE_PTHREADS < 7
15112         status = pthread_attr_setdetachstate(&attr, &detach);
15113         if( status < 0 ) status = errno;
15114 #else
15115         status = pthread_attr_setdetachstate(&attr, detach);
15116 #endif
15117         if( status ) return status;
15118         status = pthread_create( &t, &attr, task, NULL );
15119 #if HAVE_PTHREADS < 7
15120         if( status < 0 ) status = errno;
15121 #endif
15122         if( status ) return status;
15123 #else
15124         /* Draft 4 pthreads */
15125         status = pthread_create( &t, pthread_attr_default, task, NULL );
15126         if( status ) return errno;
15127
15128         /* give thread a chance to complete */
15129         /* it should remain joinable and hence detachable */
15130         sleep( 1 );
15131
15132         status = pthread_detach( &t );
15133         if( status ) return errno;
15134 #endif
15135
15136 #ifdef HAVE_LINUX_THREADS
15137         pthread_kill_other_threads_np();
15138 #endif
15139
15140         return 0;
15141
15142 }
15143
15144 EOF
15145 if { (eval echo configure:15146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15146 then
15147   ol_cv_pthread_create_works=yes
15148 else
15149   echo "configure: failed program was:" >&5
15150   cat conftest.$ac_ext >&5
15151   rm -fr conftest*
15152   ol_cv_pthread_create_works=no
15153 fi
15154 rm -fr conftest*
15155 fi
15156
15157 fi
15158
15159 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15160
15161                         if test $ol_cv_pthread_create_works = no ; then
15162                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15163                         fi
15164
15165                                                 if test $ol_with_yielding_select = auto ; then
15166                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15167 echo "configure:15168: checking if select yields when using pthreads" >&5
15168 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15169   echo $ac_n "(cached) $ac_c" 1>&6
15170 else
15171   
15172                                 if test "$cross_compiling" = yes; then
15173   ol_cv_pthread_select_yields=cross
15174 else
15175   cat > conftest.$ac_ext <<EOF
15176 #line 15177 "configure"
15177 #include "confdefs.h"
15178
15179 #include <sys/types.h>
15180 #include <sys/time.h>
15181 #include <unistd.h>
15182 #include <pthread.h>
15183 #ifndef NULL
15184 #define NULL (void*) 0
15185 #endif
15186
15187 static int fildes[2];
15188
15189 static void *task(p)
15190         void *p;
15191 {
15192         int i;
15193         struct timeval tv;
15194
15195         fd_set rfds;
15196
15197         tv.tv_sec=10;
15198         tv.tv_usec=0;
15199
15200         FD_ZERO(&rfds);
15201         FD_SET(fildes[0], &rfds);
15202
15203         /* we're not interested in any fds */
15204         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15205
15206         if(i < 0) {
15207                 perror("select");
15208                 exit(10);
15209         }
15210
15211         exit(0); /* if we exit here, the select blocked the whole process */
15212 }
15213
15214 int main(argc, argv)
15215         int argc;
15216         char **argv;
15217 {
15218         pthread_t t;
15219
15220         /* create a pipe to select */
15221         if(pipe(&fildes[0])) {
15222                 perror("select");
15223                 exit(1);
15224         }
15225
15226 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15227         (void) pthread_setconcurrency(2);
15228 #else
15229 #ifdef HAVE_THR_SETCONCURRENCY
15230         /* Set Solaris LWP concurrency to 2 */
15231         thr_setconcurrency(2);
15232 #endif
15233 #endif
15234
15235 #if HAVE_PTHREADS < 6
15236         pthread_create(&t, pthread_attr_default, task, NULL);
15237 #else
15238         pthread_create(&t, NULL, task, NULL);
15239 #endif
15240
15241         /* make sure task runs first */
15242 #if HAVE_THR_YIELD
15243         thr_yield();
15244 #elif defined( HAVE_SCHED_YIELD )
15245         sched_yield();
15246 #elif defined( HAVE_PTHREAD_YIELD )
15247         pthread_yield();
15248 #endif
15249
15250         exit(2);
15251 }
15252 EOF
15253 if { (eval echo configure:15254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15254 then
15255   ol_cv_pthread_select_yields=no
15256 else
15257   echo "configure: failed program was:" >&5
15258   cat conftest.$ac_ext >&5
15259   rm -fr conftest*
15260   ol_cv_pthread_select_yields=yes
15261 fi
15262 rm -fr conftest*
15263 fi
15264
15265 fi
15266
15267 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15268
15269                                 if test $ol_cv_pthread_select_yields = cross ; then
15270                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15271                                 fi
15272
15273                                 if test $ol_cv_pthread_select_yields = yes ; then
15274                                         ol_with_yielding_select=yes
15275                                 fi
15276                         fi
15277
15278                                                 CPPFLAGS="$save_CPPFLAGS"
15279                         LIBS="$save_LIBS"
15280                 else
15281                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15282                 fi
15283         fi
15284
15285         if test $ol_with_threads = posix ; then
15286                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15287         fi
15288 fi
15289
15290 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15291         -o $ol_with_threads = mach ; then
15292
15293                 for ac_hdr in mach/cthreads.h cthreads.h
15294 do
15295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15297 echo "configure:15298: checking for $ac_hdr" >&5
15298 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15299   echo $ac_n "(cached) $ac_c" 1>&6
15300 else
15301   cat > conftest.$ac_ext <<EOF
15302 #line 15303 "configure"
15303 #include "confdefs.h"
15304 #include <$ac_hdr>
15305 EOF
15306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15307 { (eval echo configure:15308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15309 if test -z "$ac_err"; then
15310   rm -rf conftest*
15311   eval "ac_cv_header_$ac_safe=yes"
15312 else
15313   echo "$ac_err" >&5
15314   echo "configure: failed program was:" >&5
15315   cat conftest.$ac_ext >&5
15316   rm -rf conftest*
15317   eval "ac_cv_header_$ac_safe=no"
15318 fi
15319 rm -f conftest*
15320 fi
15321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15322   echo "$ac_t""yes" 1>&6
15323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15324   cat >> confdefs.h <<EOF
15325 #define $ac_tr_hdr 1
15326 EOF
15327  
15328 else
15329   echo "$ac_t""no" 1>&6
15330 fi
15331 done
15332
15333         if test $ac_cv_header_mach_cthreads_h = yes ; then
15334                 ol_with_threads=found
15335
15336                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15337 echo "configure:15338: checking for cthread_fork" >&5
15338 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15339   echo $ac_n "(cached) $ac_c" 1>&6
15340 else
15341   cat > conftest.$ac_ext <<EOF
15342 #line 15343 "configure"
15343 #include "confdefs.h"
15344 /* System header to define __stub macros and hopefully few prototypes,
15345     which can conflict with char cthread_fork(); below.  */
15346 #include <assert.h>
15347 /* Override any gcc2 internal prototype to avoid an error.  */
15348 /* We use char because int might match the return type of a gcc2
15349     builtin and then its argument prototype would still apply.  */
15350 char cthread_fork();
15351 char (*f)();
15352
15353 int main() {
15354
15355 /* The GNU C library defines this for functions which it implements
15356     to always fail with ENOSYS.  Some functions are actually named
15357     something starting with __ and the normal name is an alias.  */
15358 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15359 choke me
15360 #else
15361 f = cthread_fork;
15362 #endif
15363
15364 ; return 0; }
15365 EOF
15366 if { (eval echo configure:15367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15367   rm -rf conftest*
15368   eval "ac_cv_func_cthread_fork=yes"
15369 else
15370   echo "configure: failed program was:" >&5
15371   cat conftest.$ac_ext >&5
15372   rm -rf conftest*
15373   eval "ac_cv_func_cthread_fork=no"
15374 fi
15375 rm -f conftest*
15376 fi
15377
15378 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15379   echo "$ac_t""yes" 1>&6
15380   ol_link_threads=yes
15381 else
15382   echo "$ac_t""no" 1>&6
15383 fi
15384
15385
15386                 if test $ol_link_threads = no ; then
15387                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15388 echo "configure:15389: checking for cthread_fork with -all_load" >&5
15389 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15390   echo $ac_n "(cached) $ac_c" 1>&6
15391 else
15392   
15393                                                                 save_LIBS="$LIBS"
15394                                 LIBS="-all_load $LIBS"
15395                                 cat > conftest.$ac_ext <<EOF
15396 #line 15397 "configure"
15397 #include "confdefs.h"
15398 #include <mach/cthreads.h>
15399 int main() {
15400
15401                                         cthread_fork((void *)0, (void *)0);
15402                                         
15403 ; return 0; }
15404 EOF
15405 if { (eval echo configure:15406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15406   rm -rf conftest*
15407   ol_cv_cthread_all_load=yes
15408 else
15409   echo "configure: failed program was:" >&5
15410   cat conftest.$ac_ext >&5
15411   rm -rf conftest*
15412   ol_cv_cthread_all_load=no
15413 fi
15414 rm -f conftest*
15415                                                                 LIBS="$save_LIBS"
15416                         
15417 fi
15418
15419 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15420
15421                         if test $ol_cv_cthread_all_load = yes ; then
15422                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15423                                 ol_link_threads=mach
15424                                 ol_with_threads=found
15425                         fi
15426                 fi
15427
15428         elif test $ac_cv_header_cthreads_h = yes ; then
15429                                 
15430                 ol_with_threads=found
15431  
15432                                 save_LIBS="$LIBS"
15433                 LIBS="$LIBS -lthreads"
15434                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15435 echo "configure:15436: checking for cthread_fork" >&5
15436 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15437   echo $ac_n "(cached) $ac_c" 1>&6
15438 else
15439   cat > conftest.$ac_ext <<EOF
15440 #line 15441 "configure"
15441 #include "confdefs.h"
15442 /* System header to define __stub macros and hopefully few prototypes,
15443     which can conflict with char cthread_fork(); below.  */
15444 #include <assert.h>
15445 /* Override any gcc2 internal prototype to avoid an error.  */
15446 /* We use char because int might match the return type of a gcc2
15447     builtin and then its argument prototype would still apply.  */
15448 char cthread_fork();
15449 char (*f)();
15450
15451 int main() {
15452
15453 /* The GNU C library defines this for functions which it implements
15454     to always fail with ENOSYS.  Some functions are actually named
15455     something starting with __ and the normal name is an alias.  */
15456 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15457 choke me
15458 #else
15459 f = cthread_fork;
15460 #endif
15461
15462 ; return 0; }
15463 EOF
15464 if { (eval echo configure:15465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15465   rm -rf conftest*
15466   eval "ac_cv_func_cthread_fork=yes"
15467 else
15468   echo "configure: failed program was:" >&5
15469   cat conftest.$ac_ext >&5
15470   rm -rf conftest*
15471   eval "ac_cv_func_cthread_fork=no"
15472 fi
15473 rm -f conftest*
15474 fi
15475
15476 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15477   echo "$ac_t""yes" 1>&6
15478   ol_link_threads=yes
15479 else
15480   echo "$ac_t""no" 1>&6
15481 fi
15482
15483                 LIBS="$save_LIBS"
15484
15485                 if test $ol_link_threads = yes ; then
15486                         LTHREAD_LIBS="-lthreads"
15487                         ol_link_threads=mach
15488                         ol_with_threads=found
15489                 else
15490                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15491                 fi
15492
15493         elif test $ol_with_threads = mach ; then
15494                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15495         fi
15496
15497         if test $ol_link_threads = mach ; then
15498                 cat >> confdefs.h <<\EOF
15499 #define HAVE_MACH_CTHREADS 1
15500 EOF
15501
15502         elif test $ol_with_threads = found ; then
15503                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15504         fi
15505 fi
15506
15507 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15508         -o $ol_with_threads = pth ; then
15509
15510         for ac_hdr in pth.h
15511 do
15512 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15513 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15514 echo "configure:15515: checking for $ac_hdr" >&5
15515 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15516   echo $ac_n "(cached) $ac_c" 1>&6
15517 else
15518   cat > conftest.$ac_ext <<EOF
15519 #line 15520 "configure"
15520 #include "confdefs.h"
15521 #include <$ac_hdr>
15522 EOF
15523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15524 { (eval echo configure:15525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15526 if test -z "$ac_err"; then
15527   rm -rf conftest*
15528   eval "ac_cv_header_$ac_safe=yes"
15529 else
15530   echo "$ac_err" >&5
15531   echo "configure: failed program was:" >&5
15532   cat conftest.$ac_ext >&5
15533   rm -rf conftest*
15534   eval "ac_cv_header_$ac_safe=no"
15535 fi
15536 rm -f conftest*
15537 fi
15538 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15539   echo "$ac_t""yes" 1>&6
15540     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15541   cat >> confdefs.h <<EOF
15542 #define $ac_tr_hdr 1
15543 EOF
15544  
15545 else
15546   echo "$ac_t""no" 1>&6
15547 fi
15548 done
15549
15550
15551         if test $ac_cv_header_pth_h = yes ; then
15552                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15553 echo "configure:15554: checking for pth_version in -lpth" >&5
15554 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15556   echo $ac_n "(cached) $ac_c" 1>&6
15557 else
15558   ac_save_LIBS="$LIBS"
15559 LIBS="-lpth  $LIBS"
15560 cat > conftest.$ac_ext <<EOF
15561 #line 15562 "configure"
15562 #include "confdefs.h"
15563 /* Override any gcc2 internal prototype to avoid an error.  */
15564 /* We use char because int might match the return type of a gcc2
15565     builtin and then its argument prototype would still apply.  */
15566 char pth_version();
15567
15568 int main() {
15569 pth_version()
15570 ; return 0; }
15571 EOF
15572 if { (eval echo configure:15573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15573   rm -rf conftest*
15574   eval "ac_cv_lib_$ac_lib_var=yes"
15575 else
15576   echo "configure: failed program was:" >&5
15577   cat conftest.$ac_ext >&5
15578   rm -rf conftest*
15579   eval "ac_cv_lib_$ac_lib_var=no"
15580 fi
15581 rm -f conftest*
15582 LIBS="$ac_save_LIBS"
15583
15584 fi
15585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15586   echo "$ac_t""yes" 1>&6
15587   have_pth=yes
15588 else
15589   echo "$ac_t""no" 1>&6
15590 have_pth=no
15591 fi
15592
15593
15594                 if test $have_pth = yes ; then
15595                         cat >> confdefs.h <<\EOF
15596 #define HAVE_GNU_PTH 1
15597 EOF
15598
15599                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15600                         ol_link_threads=pth
15601                         ol_with_threads=found
15602
15603                         if test $ol_with_yielding_select = auto ; then
15604                                 ol_with_yielding_select=yes
15605                         fi
15606                 fi
15607         fi
15608 fi
15609
15610 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15611         -o $ol_with_threads = lwp ; then
15612
15613                 for ac_hdr in thread.h synch.h
15614 do
15615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15617 echo "configure:15618: checking for $ac_hdr" >&5
15618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15619   echo $ac_n "(cached) $ac_c" 1>&6
15620 else
15621   cat > conftest.$ac_ext <<EOF
15622 #line 15623 "configure"
15623 #include "confdefs.h"
15624 #include <$ac_hdr>
15625 EOF
15626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15627 { (eval echo configure:15628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15629 if test -z "$ac_err"; then
15630   rm -rf conftest*
15631   eval "ac_cv_header_$ac_safe=yes"
15632 else
15633   echo "$ac_err" >&5
15634   echo "configure: failed program was:" >&5
15635   cat conftest.$ac_ext >&5
15636   rm -rf conftest*
15637   eval "ac_cv_header_$ac_safe=no"
15638 fi
15639 rm -f conftest*
15640 fi
15641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15642   echo "$ac_t""yes" 1>&6
15643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15644   cat >> confdefs.h <<EOF
15645 #define $ac_tr_hdr 1
15646 EOF
15647  
15648 else
15649   echo "$ac_t""no" 1>&6
15650 fi
15651 done
15652
15653         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15654                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15655 echo "configure:15656: checking for thr_create in -lthread" >&5
15656 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15657 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15658   echo $ac_n "(cached) $ac_c" 1>&6
15659 else
15660   ac_save_LIBS="$LIBS"
15661 LIBS="-lthread  $LIBS"
15662 cat > conftest.$ac_ext <<EOF
15663 #line 15664 "configure"
15664 #include "confdefs.h"
15665 /* Override any gcc2 internal prototype to avoid an error.  */
15666 /* We use char because int might match the return type of a gcc2
15667     builtin and then its argument prototype would still apply.  */
15668 char thr_create();
15669
15670 int main() {
15671 thr_create()
15672 ; return 0; }
15673 EOF
15674 if { (eval echo configure:15675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15675   rm -rf conftest*
15676   eval "ac_cv_lib_$ac_lib_var=yes"
15677 else
15678   echo "configure: failed program was:" >&5
15679   cat conftest.$ac_ext >&5
15680   rm -rf conftest*
15681   eval "ac_cv_lib_$ac_lib_var=no"
15682 fi
15683 rm -f conftest*
15684 LIBS="$ac_save_LIBS"
15685
15686 fi
15687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15688   echo "$ac_t""yes" 1>&6
15689   have_thr=yes
15690 else
15691   echo "$ac_t""no" 1>&6
15692 have_thr=no
15693 fi
15694
15695
15696                 if test $have_thr = yes ; then
15697                         cat >> confdefs.h <<\EOF
15698 #define HAVE_THR 1
15699 EOF
15700
15701                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15702                         ol_link_threads=thr
15703
15704                         if test $ol_with_yielding_select = auto ; then
15705                                 ol_with_yielding_select=yes
15706                         fi
15707
15708                                                 for ac_func in \
15709                                 thr_setconcurrency \
15710                                 thr_getconcurrency \
15711                         
15712 do
15713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15714 echo "configure:15715: checking for $ac_func" >&5
15715 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15716   echo $ac_n "(cached) $ac_c" 1>&6
15717 else
15718   cat > conftest.$ac_ext <<EOF
15719 #line 15720 "configure"
15720 #include "confdefs.h"
15721 /* System header to define __stub macros and hopefully few prototypes,
15722     which can conflict with char $ac_func(); below.  */
15723 #include <assert.h>
15724 /* Override any gcc2 internal prototype to avoid an error.  */
15725 /* We use char because int might match the return type of a gcc2
15726     builtin and then its argument prototype would still apply.  */
15727 char $ac_func();
15728 char (*f)();
15729
15730 int main() {
15731
15732 /* The GNU C library defines this for functions which it implements
15733     to always fail with ENOSYS.  Some functions are actually named
15734     something starting with __ and the normal name is an alias.  */
15735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15736 choke me
15737 #else
15738 f = $ac_func;
15739 #endif
15740
15741 ; return 0; }
15742 EOF
15743 if { (eval echo configure:15744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15744   rm -rf conftest*
15745   eval "ac_cv_func_$ac_func=yes"
15746 else
15747   echo "configure: failed program was:" >&5
15748   cat conftest.$ac_ext >&5
15749   rm -rf conftest*
15750   eval "ac_cv_func_$ac_func=no"
15751 fi
15752 rm -f conftest*
15753 fi
15754
15755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15756   echo "$ac_t""yes" 1>&6
15757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15758   cat >> confdefs.h <<EOF
15759 #define $ac_tr_func 1
15760 EOF
15761  
15762 else
15763   echo "$ac_t""no" 1>&6
15764 fi
15765 done
15766
15767                 fi
15768         fi
15769
15770                 for ac_hdr in lwp/lwp.h
15771 do
15772 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15773 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15774 echo "configure:15775: checking for $ac_hdr" >&5
15775 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15776   echo $ac_n "(cached) $ac_c" 1>&6
15777 else
15778   cat > conftest.$ac_ext <<EOF
15779 #line 15780 "configure"
15780 #include "confdefs.h"
15781 #include <$ac_hdr>
15782 EOF
15783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15784 { (eval echo configure:15785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15786 if test -z "$ac_err"; then
15787   rm -rf conftest*
15788   eval "ac_cv_header_$ac_safe=yes"
15789 else
15790   echo "$ac_err" >&5
15791   echo "configure: failed program was:" >&5
15792   cat conftest.$ac_ext >&5
15793   rm -rf conftest*
15794   eval "ac_cv_header_$ac_safe=no"
15795 fi
15796 rm -f conftest*
15797 fi
15798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15799   echo "$ac_t""yes" 1>&6
15800     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15801   cat >> confdefs.h <<EOF
15802 #define $ac_tr_hdr 1
15803 EOF
15804  
15805 else
15806   echo "$ac_t""no" 1>&6
15807 fi
15808 done
15809
15810         if test $ac_cv_header_lwp_lwp_h = yes ; then
15811                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15812 echo "configure:15813: checking for lwp_create in -llwp" >&5
15813 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15815   echo $ac_n "(cached) $ac_c" 1>&6
15816 else
15817   ac_save_LIBS="$LIBS"
15818 LIBS="-llwp  $LIBS"
15819 cat > conftest.$ac_ext <<EOF
15820 #line 15821 "configure"
15821 #include "confdefs.h"
15822 /* Override any gcc2 internal prototype to avoid an error.  */
15823 /* We use char because int might match the return type of a gcc2
15824     builtin and then its argument prototype would still apply.  */
15825 char lwp_create();
15826
15827 int main() {
15828 lwp_create()
15829 ; return 0; }
15830 EOF
15831 if { (eval echo configure:15832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15832   rm -rf conftest*
15833   eval "ac_cv_lib_$ac_lib_var=yes"
15834 else
15835   echo "configure: failed program was:" >&5
15836   cat conftest.$ac_ext >&5
15837   rm -rf conftest*
15838   eval "ac_cv_lib_$ac_lib_var=no"
15839 fi
15840 rm -f conftest*
15841 LIBS="$ac_save_LIBS"
15842
15843 fi
15844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15845   echo "$ac_t""yes" 1>&6
15846   have_lwp=yes
15847 else
15848   echo "$ac_t""no" 1>&6
15849 have_lwp=no
15850 fi
15851
15852
15853                 if test $have_lwp = yes ; then
15854                         cat >> confdefs.h <<\EOF
15855 #define HAVE_LWP 1
15856 EOF
15857
15858                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15859                         ol_link_threads=lwp
15860
15861                         if test $ol_with_yielding_select = auto ; then
15862                                 ol_with_yielding_select=no
15863                         fi
15864                 fi
15865         fi
15866 fi
15867
15868 if test $ol_with_yielding_select = yes ; then
15869         cat >> confdefs.h <<\EOF
15870 #define HAVE_YIELDING_SELECT 1
15871 EOF
15872
15873 fi
15874
15875 if test $ol_with_threads = manual ; then
15876                 ol_link_threads=yes
15877
15878         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15879
15880         for ac_hdr in pthread.h sched.h
15881 do
15882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15884 echo "configure:15885: checking for $ac_hdr" >&5
15885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15886   echo $ac_n "(cached) $ac_c" 1>&6
15887 else
15888   cat > conftest.$ac_ext <<EOF
15889 #line 15890 "configure"
15890 #include "confdefs.h"
15891 #include <$ac_hdr>
15892 EOF
15893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15894 { (eval echo configure:15895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15896 if test -z "$ac_err"; then
15897   rm -rf conftest*
15898   eval "ac_cv_header_$ac_safe=yes"
15899 else
15900   echo "$ac_err" >&5
15901   echo "configure: failed program was:" >&5
15902   cat conftest.$ac_ext >&5
15903   rm -rf conftest*
15904   eval "ac_cv_header_$ac_safe=no"
15905 fi
15906 rm -f conftest*
15907 fi
15908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15909   echo "$ac_t""yes" 1>&6
15910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15911   cat >> confdefs.h <<EOF
15912 #define $ac_tr_hdr 1
15913 EOF
15914  
15915 else
15916   echo "$ac_t""no" 1>&6
15917 fi
15918 done
15919
15920         for ac_func in sched_yield pthread_yield
15921 do
15922 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15923 echo "configure:15924: checking for $ac_func" >&5
15924 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15925   echo $ac_n "(cached) $ac_c" 1>&6
15926 else
15927   cat > conftest.$ac_ext <<EOF
15928 #line 15929 "configure"
15929 #include "confdefs.h"
15930 /* System header to define __stub macros and hopefully few prototypes,
15931     which can conflict with char $ac_func(); below.  */
15932 #include <assert.h>
15933 /* Override any gcc2 internal prototype to avoid an error.  */
15934 /* We use char because int might match the return type of a gcc2
15935     builtin and then its argument prototype would still apply.  */
15936 char $ac_func();
15937 char (*f)();
15938
15939 int main() {
15940
15941 /* The GNU C library defines this for functions which it implements
15942     to always fail with ENOSYS.  Some functions are actually named
15943     something starting with __ and the normal name is an alias.  */
15944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15945 choke me
15946 #else
15947 f = $ac_func;
15948 #endif
15949
15950 ; return 0; }
15951 EOF
15952 if { (eval echo configure:15953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15953   rm -rf conftest*
15954   eval "ac_cv_func_$ac_func=yes"
15955 else
15956   echo "configure: failed program was:" >&5
15957   cat conftest.$ac_ext >&5
15958   rm -rf conftest*
15959   eval "ac_cv_func_$ac_func=no"
15960 fi
15961 rm -f conftest*
15962 fi
15963
15964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15965   echo "$ac_t""yes" 1>&6
15966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15967   cat >> confdefs.h <<EOF
15968 #define $ac_tr_func 1
15969 EOF
15970  
15971 else
15972   echo "$ac_t""no" 1>&6
15973 fi
15974 done
15975
15976         
15977         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15978 echo "configure:15979: checking for LinuxThreads pthread.h" >&5
15979 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15980   echo $ac_n "(cached) $ac_c" 1>&6
15981 else
15982   cat > conftest.$ac_ext <<EOF
15983 #line 15984 "configure"
15984 #include "confdefs.h"
15985 #include <pthread.h>
15986 EOF
15987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15988   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15989   rm -rf conftest*
15990   ol_cv_header_linux_threads=yes
15991 else
15992   rm -rf conftest*
15993   ol_cv_header_linux_threads=no
15994 fi
15995 rm -f conftest*
15996
15997                 
15998 fi
15999
16000 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16001         if test $ol_cv_header_linux_threads = yes; then
16002                 cat >> confdefs.h <<\EOF
16003 #define HAVE_LINUX_THREADS 1
16004 EOF
16005
16006         fi
16007
16008
16009         for ac_hdr in mach/cthreads.h
16010 do
16011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16013 echo "configure:16014: checking for $ac_hdr" >&5
16014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16015   echo $ac_n "(cached) $ac_c" 1>&6
16016 else
16017   cat > conftest.$ac_ext <<EOF
16018 #line 16019 "configure"
16019 #include "confdefs.h"
16020 #include <$ac_hdr>
16021 EOF
16022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16023 { (eval echo configure:16024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16025 if test -z "$ac_err"; then
16026   rm -rf conftest*
16027   eval "ac_cv_header_$ac_safe=yes"
16028 else
16029   echo "$ac_err" >&5
16030   echo "configure: failed program was:" >&5
16031   cat conftest.$ac_ext >&5
16032   rm -rf conftest*
16033   eval "ac_cv_header_$ac_safe=no"
16034 fi
16035 rm -f conftest*
16036 fi
16037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16038   echo "$ac_t""yes" 1>&6
16039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16040   cat >> confdefs.h <<EOF
16041 #define $ac_tr_hdr 1
16042 EOF
16043  
16044 else
16045   echo "$ac_t""no" 1>&6
16046 fi
16047 done
16048
16049         for ac_hdr in lwp/lwp.h
16050 do
16051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16053 echo "configure:16054: checking for $ac_hdr" >&5
16054 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16055   echo $ac_n "(cached) $ac_c" 1>&6
16056 else
16057   cat > conftest.$ac_ext <<EOF
16058 #line 16059 "configure"
16059 #include "confdefs.h"
16060 #include <$ac_hdr>
16061 EOF
16062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16063 { (eval echo configure:16064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16065 if test -z "$ac_err"; then
16066   rm -rf conftest*
16067   eval "ac_cv_header_$ac_safe=yes"
16068 else
16069   echo "$ac_err" >&5
16070   echo "configure: failed program was:" >&5
16071   cat conftest.$ac_ext >&5
16072   rm -rf conftest*
16073   eval "ac_cv_header_$ac_safe=no"
16074 fi
16075 rm -f conftest*
16076 fi
16077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16078   echo "$ac_t""yes" 1>&6
16079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16080   cat >> confdefs.h <<EOF
16081 #define $ac_tr_hdr 1
16082 EOF
16083  
16084 else
16085   echo "$ac_t""no" 1>&6
16086 fi
16087 done
16088
16089         for ac_hdr in thread.h synch.h
16090 do
16091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16093 echo "configure:16094: checking for $ac_hdr" >&5
16094 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16095   echo $ac_n "(cached) $ac_c" 1>&6
16096 else
16097   cat > conftest.$ac_ext <<EOF
16098 #line 16099 "configure"
16099 #include "confdefs.h"
16100 #include <$ac_hdr>
16101 EOF
16102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16103 { (eval echo configure:16104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16105 if test -z "$ac_err"; then
16106   rm -rf conftest*
16107   eval "ac_cv_header_$ac_safe=yes"
16108 else
16109   echo "$ac_err" >&5
16110   echo "configure: failed program was:" >&5
16111   cat conftest.$ac_ext >&5
16112   rm -rf conftest*
16113   eval "ac_cv_header_$ac_safe=no"
16114 fi
16115 rm -f conftest*
16116 fi
16117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16118   echo "$ac_t""yes" 1>&6
16119     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16120   cat >> confdefs.h <<EOF
16121 #define $ac_tr_hdr 1
16122 EOF
16123  
16124 else
16125   echo "$ac_t""no" 1>&6
16126 fi
16127 done
16128
16129 fi
16130
16131 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16132                         cat >> confdefs.h <<\EOF
16133 #define REENTRANT 1
16134 EOF
16135
16136         cat >> confdefs.h <<\EOF
16137 #define _REENTRANT 1
16138 EOF
16139
16140         cat >> confdefs.h <<\EOF
16141 #define THREAD_SAFE 1
16142 EOF
16143
16144         cat >> confdefs.h <<\EOF
16145 #define _THREAD_SAFE 1
16146 EOF
16147
16148         cat >> confdefs.h <<\EOF
16149 #define THREADSAFE 1
16150 EOF
16151
16152         cat >> confdefs.h <<\EOF
16153 #define _THREADSAFE 1
16154 EOF
16155
16156         cat >> confdefs.h <<\EOF
16157 #define _SGI_MP_SOURCE 1
16158 EOF
16159
16160
16161                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16162 echo "configure:16163: checking for thread specific errno" >&5
16163 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16164   echo $ac_n "(cached) $ac_c" 1>&6
16165 else
16166   
16167                 cat > conftest.$ac_ext <<EOF
16168 #line 16169 "configure"
16169 #include "confdefs.h"
16170 #include <errno.h>
16171 int main() {
16172 errno = 0;
16173 ; return 0; }
16174 EOF
16175 if { (eval echo configure:16176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16176   rm -rf conftest*
16177   ol_cv_errno_thread_specific=yes
16178 else
16179   echo "configure: failed program was:" >&5
16180   cat conftest.$ac_ext >&5
16181   rm -rf conftest*
16182   ol_cv_errno_thread_specific=no
16183 fi
16184 rm -f conftest*
16185         
16186 fi
16187
16188 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16189
16190                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16191 echo "configure:16192: checking for thread specific h_errno" >&5
16192 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16193   echo $ac_n "(cached) $ac_c" 1>&6
16194 else
16195   
16196                 cat > conftest.$ac_ext <<EOF
16197 #line 16198 "configure"
16198 #include "confdefs.h"
16199 #include <netdb.h>
16200 int main() {
16201 h_errno = 0;
16202 ; return 0; }
16203 EOF
16204 if { (eval echo configure:16205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16205   rm -rf conftest*
16206   ol_cv_h_errno_thread_specific=yes
16207 else
16208   echo "configure: failed program was:" >&5
16209   cat conftest.$ac_ext >&5
16210   rm -rf conftest*
16211   ol_cv_h_errno_thread_specific=no
16212 fi
16213 rm -f conftest*
16214         
16215 fi
16216
16217 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16218
16219         if test $ol_cv_errno_thread_specific != yes \
16220                 -o $ol_cv_h_errno_thread_specific != yes ; then
16221                 LIBS="$LTHREAD_LIBS $LIBS"
16222                 LTHREAD_LIBS=""
16223         fi
16224
16225 fi  
16226
16227 if test $ol_link_threads = no ; then
16228         if test $ol_with_threads = yes ; then
16229                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16230         fi
16231
16232         if test $ol_with_threads = auto ; then
16233                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16234                 ol_with_threads=no
16235         fi
16236
16237         cat >> confdefs.h <<\EOF
16238 #define NO_THREADS 1
16239 EOF
16240
16241         LTHREAD_LIBS=""
16242 fi
16243
16244 if test $ol_link_threads != no ; then
16245         cat >> confdefs.h <<\EOF
16246 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16247 EOF
16248
16249 fi
16250
16251 for ac_func in \
16252         ctime_r                 \
16253         gethostbyname_r gethostbyaddr_r \
16254
16255 do
16256 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16257 echo "configure:16258: checking for $ac_func" >&5
16258 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16259   echo $ac_n "(cached) $ac_c" 1>&6
16260 else
16261   cat > conftest.$ac_ext <<EOF
16262 #line 16263 "configure"
16263 #include "confdefs.h"
16264 /* System header to define __stub macros and hopefully few prototypes,
16265     which can conflict with char $ac_func(); below.  */
16266 #include <assert.h>
16267 /* Override any gcc2 internal prototype to avoid an error.  */
16268 /* We use char because int might match the return type of a gcc2
16269     builtin and then its argument prototype would still apply.  */
16270 char $ac_func();
16271 char (*f)();
16272
16273 int main() {
16274
16275 /* The GNU C library defines this for functions which it implements
16276     to always fail with ENOSYS.  Some functions are actually named
16277     something starting with __ and the normal name is an alias.  */
16278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16279 choke me
16280 #else
16281 f = $ac_func;
16282 #endif
16283
16284 ; return 0; }
16285 EOF
16286 if { (eval echo configure:16287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16287   rm -rf conftest*
16288   eval "ac_cv_func_$ac_func=yes"
16289 else
16290   echo "configure: failed program was:" >&5
16291   cat conftest.$ac_ext >&5
16292   rm -rf conftest*
16293   eval "ac_cv_func_$ac_func=no"
16294 fi
16295 rm -f conftest*
16296 fi
16297
16298 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16299   echo "$ac_t""yes" 1>&6
16300     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16301   cat >> confdefs.h <<EOF
16302 #define $ac_tr_func 1
16303 EOF
16304  
16305 else
16306   echo "$ac_t""no" 1>&6
16307 fi
16308 done
16309
16310
16311 if test "$ac_cv_func_ctime_r" = no ; then
16312         ol_cv_func_ctime_r_nargs=0
16313 else
16314         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16315 echo "configure:16316: checking number of arguments of ctime_r" >&5
16316 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16317   echo $ac_n "(cached) $ac_c" 1>&6
16318 else
16319   cat > conftest.$ac_ext <<EOF
16320 #line 16321 "configure"
16321 #include "confdefs.h"
16322 #include <time.h>
16323 int main() {
16324 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16325 ; return 0; }
16326 EOF
16327 if { (eval echo configure:16328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16328   rm -rf conftest*
16329   ol_cv_func_ctime_r_nargs3=yes
16330 else
16331   echo "configure: failed program was:" >&5
16332   cat conftest.$ac_ext >&5
16333   rm -rf conftest*
16334   ol_cv_func_ctime_r_nargs3=no
16335 fi
16336 rm -f conftest*
16337
16338         cat > conftest.$ac_ext <<EOF
16339 #line 16340 "configure"
16340 #include "confdefs.h"
16341 #include <time.h>
16342 int main() {
16343 time_t ti; char *buffer; ctime_r(&ti,buffer);
16344 ; return 0; }
16345 EOF
16346 if { (eval echo configure:16347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16347   rm -rf conftest*
16348   ol_cv_func_ctime_r_nargs2=yes
16349 else
16350   echo "configure: failed program was:" >&5
16351   cat conftest.$ac_ext >&5
16352   rm -rf conftest*
16353   ol_cv_func_ctime_r_nargs2=no
16354 fi
16355 rm -f conftest*
16356
16357         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16358                 $ol_cv_func_ctime_r_nargs2 = no ; then
16359
16360                 ol_cv_func_ctime_r_nargs=3
16361
16362         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16363                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16364
16365                 ol_cv_func_ctime_r_nargs=2
16366
16367         else
16368                 ol_cv_func_ctime_r_nargs=0
16369         fi
16370   
16371 fi
16372
16373 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16374
16375   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16376         cat >> confdefs.h <<EOF
16377 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16378 EOF
16379
16380   fi
16381
16382 fi
16383
16384 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16385         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16386 echo "configure:16387: checking number of arguments of gethostbyname_r" >&5
16387 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16388   echo $ac_n "(cached) $ac_c" 1>&6
16389 else
16390   cat > conftest.$ac_ext <<EOF
16391 #line 16392 "configure"
16392 #include "confdefs.h"
16393 #include <sys/types.h>
16394 #include <sys/socket.h>
16395 #include <netinet/in.h>
16396 #include <netdb.h>
16397 #define BUFSIZE (sizeof(struct hostent)+10)
16398 int main() {
16399 struct hostent hent; char buffer[BUFSIZE];
16400                 int bufsize=BUFSIZE;int h_errno;
16401                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16402                         buffer, bufsize, &h_errno);
16403 ; return 0; }
16404 EOF
16405 if { (eval echo configure:16406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16406   rm -rf conftest*
16407   ol_cv_func_gethostbyname_r_nargs5=yes
16408 else
16409   echo "configure: failed program was:" >&5
16410   cat conftest.$ac_ext >&5
16411   rm -rf conftest*
16412   ol_cv_func_gethostbyname_r_nargs5=no
16413 fi
16414 rm -f conftest*
16415
16416         cat > conftest.$ac_ext <<EOF
16417 #line 16418 "configure"
16418 #include "confdefs.h"
16419 #include <sys/types.h>
16420 #include <sys/socket.h>
16421 #include <netinet/in.h>
16422 #include <netdb.h>
16423 #define BUFSIZE (sizeof(struct hostent)+10)
16424 int main() {
16425 struct hostent hent;struct hostent *rhent;
16426                 char buffer[BUFSIZE];
16427                 int bufsize=BUFSIZE;int h_errno;
16428                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16429                         &rhent, &h_errno);
16430 ; return 0; }
16431 EOF
16432 if { (eval echo configure:16433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16433   rm -rf conftest*
16434   ol_cv_func_gethostbyname_r_nargs6=yes
16435 else
16436   echo "configure: failed program was:" >&5
16437   cat conftest.$ac_ext >&5
16438   rm -rf conftest*
16439   ol_cv_func_gethostbyname_r_nargs6=no
16440 fi
16441 rm -f conftest*
16442
16443         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16444                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16445
16446                 ol_cv_func_gethostbyname_r_nargs=5
16447
16448         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16449                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16450
16451                 ol_cv_func_gethostbyname_r_nargs=6
16452
16453         else
16454                 ol_cv_func_gethostbyname_r_nargs=0
16455         fi
16456   
16457 fi
16458
16459 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16460   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16461         cat >> confdefs.h <<EOF
16462 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16463 EOF
16464
16465   fi
16466
16467 else
16468         ol_cv_func_gethostbyname_r_nargs=0
16469 fi
16470  
16471 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16472         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16473 echo "configure:16474: checking number of arguments of gethostbyaddr_r" >&5
16474 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16475   echo $ac_n "(cached) $ac_c" 1>&6
16476 else
16477   cat > conftest.$ac_ext <<EOF
16478 #line 16479 "configure"
16479 #include "confdefs.h"
16480 #include <sys/types.h>
16481 #include <sys/socket.h>
16482 #include <netinet/in.h>
16483 #include <netdb.h>
16484 #define BUFSIZE (sizeof(struct hostent)+10)
16485 int main() {
16486 struct hostent hent; char buffer[BUFSIZE]; 
16487             struct in_addr add;
16488             size_t alen=sizeof(struct in_addr);
16489             int bufsize=BUFSIZE;int h_errno;
16490                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16491                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16492 ; return 0; }
16493 EOF
16494 if { (eval echo configure:16495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16495   rm -rf conftest*
16496   ol_cv_func_gethostbyaddr_r_nargs7=yes
16497 else
16498   echo "configure: failed program was:" >&5
16499   cat conftest.$ac_ext >&5
16500   rm -rf conftest*
16501   ol_cv_func_gethostbyaddr_r_nargs7=no
16502 fi
16503 rm -f conftest*
16504
16505         cat > conftest.$ac_ext <<EOF
16506 #line 16507 "configure"
16507 #include "confdefs.h"
16508 #include <sys/types.h>
16509 #include <sys/socket.h>
16510 #include <netinet/in.h>
16511 #include <netdb.h>
16512 #define BUFSIZE (sizeof(struct hostent)+10)
16513 int main() {
16514 struct hostent hent;
16515                 struct hostent *rhent; char buffer[BUFSIZE]; 
16516                 struct in_addr add;
16517                 size_t alen=sizeof(struct in_addr);
16518                 int bufsize=BUFSIZE;int h_errno;
16519                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16520                         alen, AF_INET, &hent, buffer, bufsize, 
16521                         &rhent, &h_errno);
16522 ; return 0; }
16523 EOF
16524 if { (eval echo configure:16525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16525   rm -rf conftest*
16526   ol_cv_func_gethostbyaddr_r_nargs8=yes
16527 else
16528   echo "configure: failed program was:" >&5
16529   cat conftest.$ac_ext >&5
16530   rm -rf conftest*
16531   ol_cv_func_gethostbyaddr_r_nargs8=no
16532 fi
16533 rm -f conftest*
16534
16535         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16536                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16537
16538                 ol_cv_func_gethostbyaddr_r_nargs=7
16539
16540         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16541                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16542
16543                 ol_cv_func_gethostbyaddr_r_nargs=8
16544
16545         else
16546                 ol_cv_func_gethostbyaddr_r_nargs=0
16547         fi
16548   
16549 fi
16550
16551 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16552   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16553     cat >> confdefs.h <<EOF
16554 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16555 EOF
16556
16557   fi
16558
16559 else
16560         ol_cv_func_gethostbyaddr_r_nargs=0
16561 fi
16562
16563 ol_link_ldbm=no 
16564
16565 if test $ol_with_ldbm_api = auto \
16566         -o $ol_with_ldbm_api = berkeley \
16567         -o $ol_with_ldbm_api = bcompat ; then
16568
16569         if test $ol_with_ldbm_api = bcompat; then \
16570                 for ac_hdr in db_185.h db.h
16571 do
16572 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16573 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16574 echo "configure:16575: checking for $ac_hdr" >&5
16575 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16576   echo $ac_n "(cached) $ac_c" 1>&6
16577 else
16578   cat > conftest.$ac_ext <<EOF
16579 #line 16580 "configure"
16580 #include "confdefs.h"
16581 #include <$ac_hdr>
16582 EOF
16583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16584 { (eval echo configure:16585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16586 if test -z "$ac_err"; then
16587   rm -rf conftest*
16588   eval "ac_cv_header_$ac_safe=yes"
16589 else
16590   echo "$ac_err" >&5
16591   echo "configure: failed program was:" >&5
16592   cat conftest.$ac_ext >&5
16593   rm -rf conftest*
16594   eval "ac_cv_header_$ac_safe=no"
16595 fi
16596 rm -f conftest*
16597 fi
16598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16599   echo "$ac_t""yes" 1>&6
16600     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16601   cat >> confdefs.h <<EOF
16602 #define $ac_tr_hdr 1
16603 EOF
16604  
16605 else
16606   echo "$ac_t""no" 1>&6
16607 fi
16608 done
16609
16610 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16611         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16612 echo "configure:16613: checking if Berkeley DB header compatibility" >&5
16613 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16614   echo $ac_n "(cached) $ac_c" 1>&6
16615 else
16616   
16617                 cat > conftest.$ac_ext <<EOF
16618 #line 16619 "configure"
16619 #include "confdefs.h"
16620
16621 #if HAVE_DB_185_H
16622 #       include <db_185.h>
16623 #else
16624 #       include <db.h>
16625 #endif
16626
16627  /* this check could be improved */
16628 #ifndef DB_VERSION_MAJOR
16629 #       define DB_VERSION_MAJOR 1
16630 #endif
16631
16632 #if DB_VERSION_MAJOR == 1 
16633         __db_version_1
16634 #endif
16635
16636 EOF
16637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16638   egrep "__db_version_1" >/dev/null 2>&1; then
16639   rm -rf conftest*
16640   ol_cv_header_db1=yes
16641 else
16642   rm -rf conftest*
16643   ol_cv_header_db1=no
16644 fi
16645 rm -f conftest*
16646
16647 fi
16648
16649 echo "$ac_t""$ol_cv_header_db1" 1>&6
16650
16651         if test $ol_cv_header_db1 = yes ; then
16652                 ol_cv_lib_db=no
16653 if test $ol_cv_lib_db = no ; then
16654         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16655 echo "configure:16656: checking for Berkeley DB link (default)" >&5
16656 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16657   echo $ac_n "(cached) $ac_c" 1>&6
16658 else
16659   
16660         ol_DB_LIB=
16661         ol_LIBS=$LIBS
16662         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16663
16664         cat > conftest.$ac_ext <<EOF
16665 #line 16666 "configure"
16666 #include "confdefs.h"
16667
16668 #ifdef HAVE_DB_185_H
16669 # include <db_185.h>
16670 #else
16671 # include <db.h>
16672 #endif
16673
16674 #ifndef DB_VERSION_MAJOR
16675 # define DB_VERSION_MAJOR 1
16676 #endif
16677
16678 #ifndef NULL
16679 #define NULL ((void*)0)
16680 #endif
16681
16682 int main() {
16683
16684 #if DB_VERSION_MAJOR > 1
16685         {
16686                 char *version;
16687                 int major, minor, patch;
16688
16689                 version = db_version( &major, &minor, &patch );
16690
16691                 if( major != DB_VERSION_MAJOR ||
16692                         minor < DB_VERSION_MINOR )
16693                 {
16694                         printf("Berkeley DB version mismatch\n"
16695                                 "\texpected: %s\n\tgot: %s\n",
16696                                 DB_VERSION_STRING, version);
16697                         return 1;
16698                 }
16699         }
16700 #endif
16701
16702 #if DB_VERSION_MAJOR > 2
16703         db_env_create( NULL, 0 );
16704 #elif DB_VERSION_MAJOR > 1
16705         db_appexit( NULL );
16706 #else
16707         (void) dbopen( NULL, 0, 0, 0, NULL);
16708 #endif
16709
16710 ; return 0; }
16711 EOF
16712 if { (eval echo configure:16713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16713   rm -rf conftest*
16714   ol_cv_db_none=yes
16715 else
16716   echo "configure: failed program was:" >&5
16717   cat conftest.$ac_ext >&5
16718   rm -rf conftest*
16719   ol_cv_db_none=no
16720 fi
16721 rm -f conftest*
16722
16723         LIBS="$ol_LIBS"
16724
16725 fi
16726
16727 echo "$ac_t""$ol_cv_db_none" 1>&6
16728
16729         if test $ol_cv_db_none = yes ; then
16730                 ol_cv_lib_db=yes
16731         fi
16732 fi
16733
16734 if test $ol_cv_lib_db = no ; then
16735         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16736 echo "configure:16737: checking for Berkeley DB link (-ldb42)" >&5
16737 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16738   echo $ac_n "(cached) $ac_c" 1>&6
16739 else
16740   
16741         ol_DB_LIB=-ldb42
16742         ol_LIBS=$LIBS
16743         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16744
16745         cat > conftest.$ac_ext <<EOF
16746 #line 16747 "configure"
16747 #include "confdefs.h"
16748
16749 #ifdef HAVE_DB_185_H
16750 # include <db_185.h>
16751 #else
16752 # include <db.h>
16753 #endif
16754
16755 #ifndef DB_VERSION_MAJOR
16756 # define DB_VERSION_MAJOR 1
16757 #endif
16758
16759 #ifndef NULL
16760 #define NULL ((void*)0)
16761 #endif
16762
16763 int main() {
16764
16765 #if DB_VERSION_MAJOR > 1
16766         {
16767                 char *version;
16768                 int major, minor, patch;
16769
16770                 version = db_version( &major, &minor, &patch );
16771
16772                 if( major != DB_VERSION_MAJOR ||
16773                         minor < DB_VERSION_MINOR )
16774                 {
16775                         printf("Berkeley DB version mismatch\n"
16776                                 "\texpected: %s\n\tgot: %s\n",
16777                                 DB_VERSION_STRING, version);
16778                         return 1;
16779                 }
16780         }
16781 #endif
16782
16783 #if DB_VERSION_MAJOR > 2
16784         db_env_create( NULL, 0 );
16785 #elif DB_VERSION_MAJOR > 1
16786         db_appexit( NULL );
16787 #else
16788         (void) dbopen( NULL, 0, 0, 0, NULL);
16789 #endif
16790
16791 ; return 0; }
16792 EOF
16793 if { (eval echo configure:16794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16794   rm -rf conftest*
16795   ol_cv_db_db42=yes
16796 else
16797   echo "configure: failed program was:" >&5
16798   cat conftest.$ac_ext >&5
16799   rm -rf conftest*
16800   ol_cv_db_db42=no
16801 fi
16802 rm -f conftest*
16803
16804         LIBS="$ol_LIBS"
16805
16806 fi
16807
16808 echo "$ac_t""$ol_cv_db_db42" 1>&6
16809
16810         if test $ol_cv_db_db42 = yes ; then
16811                 ol_cv_lib_db=-ldb42
16812         fi
16813 fi
16814
16815 if test $ol_cv_lib_db = no ; then
16816         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16817 echo "configure:16818: checking for Berkeley DB link (-ldb-42)" >&5
16818 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16819   echo $ac_n "(cached) $ac_c" 1>&6
16820 else
16821   
16822         ol_DB_LIB=-ldb-42
16823         ol_LIBS=$LIBS
16824         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16825
16826         cat > conftest.$ac_ext <<EOF
16827 #line 16828 "configure"
16828 #include "confdefs.h"
16829
16830 #ifdef HAVE_DB_185_H
16831 # include <db_185.h>
16832 #else
16833 # include <db.h>
16834 #endif
16835
16836 #ifndef DB_VERSION_MAJOR
16837 # define DB_VERSION_MAJOR 1
16838 #endif
16839
16840 #ifndef NULL
16841 #define NULL ((void*)0)
16842 #endif
16843
16844 int main() {
16845
16846 #if DB_VERSION_MAJOR > 1
16847         {
16848                 char *version;
16849                 int major, minor, patch;
16850
16851                 version = db_version( &major, &minor, &patch );
16852
16853                 if( major != DB_VERSION_MAJOR ||
16854                         minor < DB_VERSION_MINOR )
16855                 {
16856                         printf("Berkeley DB version mismatch\n"
16857                                 "\texpected: %s\n\tgot: %s\n",
16858                                 DB_VERSION_STRING, version);
16859                         return 1;
16860                 }
16861         }
16862 #endif
16863
16864 #if DB_VERSION_MAJOR > 2
16865         db_env_create( NULL, 0 );
16866 #elif DB_VERSION_MAJOR > 1
16867         db_appexit( NULL );
16868 #else
16869         (void) dbopen( NULL, 0, 0, 0, NULL);
16870 #endif
16871
16872 ; return 0; }
16873 EOF
16874 if { (eval echo configure:16875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16875   rm -rf conftest*
16876   ol_cv_db_db_42=yes
16877 else
16878   echo "configure: failed program was:" >&5
16879   cat conftest.$ac_ext >&5
16880   rm -rf conftest*
16881   ol_cv_db_db_42=no
16882 fi
16883 rm -f conftest*
16884
16885         LIBS="$ol_LIBS"
16886
16887 fi
16888
16889 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16890
16891         if test $ol_cv_db_db_42 = yes ; then
16892                 ol_cv_lib_db=-ldb-42
16893         fi
16894 fi
16895
16896 if test $ol_cv_lib_db = no ; then
16897         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16898 echo "configure:16899: checking for Berkeley DB link (-ldb-4.2)" >&5
16899 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16900   echo $ac_n "(cached) $ac_c" 1>&6
16901 else
16902   
16903         ol_DB_LIB=-ldb-4.2
16904         ol_LIBS=$LIBS
16905         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16906
16907         cat > conftest.$ac_ext <<EOF
16908 #line 16909 "configure"
16909 #include "confdefs.h"
16910
16911 #ifdef HAVE_DB_185_H
16912 # include <db_185.h>
16913 #else
16914 # include <db.h>
16915 #endif
16916
16917 #ifndef DB_VERSION_MAJOR
16918 # define DB_VERSION_MAJOR 1
16919 #endif
16920
16921 #ifndef NULL
16922 #define NULL ((void*)0)
16923 #endif
16924
16925 int main() {
16926
16927 #if DB_VERSION_MAJOR > 1
16928         {
16929                 char *version;
16930                 int major, minor, patch;
16931
16932                 version = db_version( &major, &minor, &patch );
16933
16934                 if( major != DB_VERSION_MAJOR ||
16935                         minor < DB_VERSION_MINOR )
16936                 {
16937                         printf("Berkeley DB version mismatch\n"
16938                                 "\texpected: %s\n\tgot: %s\n",
16939                                 DB_VERSION_STRING, version);
16940                         return 1;
16941                 }
16942         }
16943 #endif
16944
16945 #if DB_VERSION_MAJOR > 2
16946         db_env_create( NULL, 0 );
16947 #elif DB_VERSION_MAJOR > 1
16948         db_appexit( NULL );
16949 #else
16950         (void) dbopen( NULL, 0, 0, 0, NULL);
16951 #endif
16952
16953 ; return 0; }
16954 EOF
16955 if { (eval echo configure:16956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16956   rm -rf conftest*
16957   ol_cv_db_db_4_dot_2=yes
16958 else
16959   echo "configure: failed program was:" >&5
16960   cat conftest.$ac_ext >&5
16961   rm -rf conftest*
16962   ol_cv_db_db_4_dot_2=no
16963 fi
16964 rm -f conftest*
16965
16966         LIBS="$ol_LIBS"
16967
16968 fi
16969
16970 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16971
16972         if test $ol_cv_db_db_4_dot_2 = yes ; then
16973                 ol_cv_lib_db=-ldb-4.2
16974         fi
16975 fi
16976
16977 if test $ol_cv_lib_db = no ; then
16978         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16979 echo "configure:16980: checking for Berkeley DB link (-ldb-4-2)" >&5
16980 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16981   echo $ac_n "(cached) $ac_c" 1>&6
16982 else
16983   
16984         ol_DB_LIB=-ldb-4-2
16985         ol_LIBS=$LIBS
16986         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16987
16988         cat > conftest.$ac_ext <<EOF
16989 #line 16990 "configure"
16990 #include "confdefs.h"
16991
16992 #ifdef HAVE_DB_185_H
16993 # include <db_185.h>
16994 #else
16995 # include <db.h>
16996 #endif
16997
16998 #ifndef DB_VERSION_MAJOR
16999 # define DB_VERSION_MAJOR 1
17000 #endif
17001
17002 #ifndef NULL
17003 #define NULL ((void*)0)
17004 #endif
17005
17006 int main() {
17007
17008 #if DB_VERSION_MAJOR > 1
17009         {
17010                 char *version;
17011                 int major, minor, patch;
17012
17013                 version = db_version( &major, &minor, &patch );
17014
17015                 if( major != DB_VERSION_MAJOR ||
17016                         minor < DB_VERSION_MINOR )
17017                 {
17018                         printf("Berkeley DB version mismatch\n"
17019                                 "\texpected: %s\n\tgot: %s\n",
17020                                 DB_VERSION_STRING, version);
17021                         return 1;
17022                 }
17023         }
17024 #endif
17025
17026 #if DB_VERSION_MAJOR > 2
17027         db_env_create( NULL, 0 );
17028 #elif DB_VERSION_MAJOR > 1
17029         db_appexit( NULL );
17030 #else
17031         (void) dbopen( NULL, 0, 0, 0, NULL);
17032 #endif
17033
17034 ; return 0; }
17035 EOF
17036 if { (eval echo configure:17037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17037   rm -rf conftest*
17038   ol_cv_db_db_4_2=yes
17039 else
17040   echo "configure: failed program was:" >&5
17041   cat conftest.$ac_ext >&5
17042   rm -rf conftest*
17043   ol_cv_db_db_4_2=no
17044 fi
17045 rm -f conftest*
17046
17047         LIBS="$ol_LIBS"
17048
17049 fi
17050
17051 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17052
17053         if test $ol_cv_db_db_4_2 = yes ; then
17054                 ol_cv_lib_db=-ldb-4-2
17055         fi
17056 fi
17057
17058 if test $ol_cv_lib_db = no ; then
17059         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17060 echo "configure:17061: checking for Berkeley DB link (-ldb-4)" >&5
17061 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17062   echo $ac_n "(cached) $ac_c" 1>&6
17063 else
17064   
17065         ol_DB_LIB=-ldb-4
17066         ol_LIBS=$LIBS
17067         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17068
17069         cat > conftest.$ac_ext <<EOF
17070 #line 17071 "configure"
17071 #include "confdefs.h"
17072
17073 #ifdef HAVE_DB_185_H
17074 # include <db_185.h>
17075 #else
17076 # include <db.h>
17077 #endif
17078
17079 #ifndef DB_VERSION_MAJOR
17080 # define DB_VERSION_MAJOR 1
17081 #endif
17082
17083 #ifndef NULL
17084 #define NULL ((void*)0)
17085 #endif
17086
17087 int main() {
17088
17089 #if DB_VERSION_MAJOR > 1
17090         {
17091                 char *version;
17092                 int major, minor, patch;
17093
17094                 version = db_version( &major, &minor, &patch );
17095
17096                 if( major != DB_VERSION_MAJOR ||
17097                         minor < DB_VERSION_MINOR )
17098                 {
17099                         printf("Berkeley DB version mismatch\n"
17100                                 "\texpected: %s\n\tgot: %s\n",
17101                                 DB_VERSION_STRING, version);
17102                         return 1;
17103                 }
17104         }
17105 #endif
17106
17107 #if DB_VERSION_MAJOR > 2
17108         db_env_create( NULL, 0 );
17109 #elif DB_VERSION_MAJOR > 1
17110         db_appexit( NULL );
17111 #else
17112         (void) dbopen( NULL, 0, 0, 0, NULL);
17113 #endif
17114
17115 ; return 0; }
17116 EOF
17117 if { (eval echo configure:17118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17118   rm -rf conftest*
17119   ol_cv_db_db_4=yes
17120 else
17121   echo "configure: failed program was:" >&5
17122   cat conftest.$ac_ext >&5
17123   rm -rf conftest*
17124   ol_cv_db_db_4=no
17125 fi
17126 rm -f conftest*
17127
17128         LIBS="$ol_LIBS"
17129
17130 fi
17131
17132 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17133
17134         if test $ol_cv_db_db_4 = yes ; then
17135                 ol_cv_lib_db=-ldb-4
17136         fi
17137 fi
17138
17139 if test $ol_cv_lib_db = no ; then
17140         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17141 echo "configure:17142: checking for Berkeley DB link (-ldb4)" >&5
17142 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17143   echo $ac_n "(cached) $ac_c" 1>&6
17144 else
17145   
17146         ol_DB_LIB=-ldb4
17147         ol_LIBS=$LIBS
17148         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17149
17150         cat > conftest.$ac_ext <<EOF
17151 #line 17152 "configure"
17152 #include "confdefs.h"
17153
17154 #ifdef HAVE_DB_185_H
17155 # include <db_185.h>
17156 #else
17157 # include <db.h>
17158 #endif
17159
17160 #ifndef DB_VERSION_MAJOR
17161 # define DB_VERSION_MAJOR 1
17162 #endif
17163
17164 #ifndef NULL
17165 #define NULL ((void*)0)
17166 #endif
17167
17168 int main() {
17169
17170 #if DB_VERSION_MAJOR > 1
17171         {
17172                 char *version;
17173                 int major, minor, patch;
17174
17175                 version = db_version( &major, &minor, &patch );
17176
17177                 if( major != DB_VERSION_MAJOR ||
17178                         minor < DB_VERSION_MINOR )
17179                 {
17180                         printf("Berkeley DB version mismatch\n"
17181                                 "\texpected: %s\n\tgot: %s\n",
17182                                 DB_VERSION_STRING, version);
17183                         return 1;
17184                 }
17185         }
17186 #endif
17187
17188 #if DB_VERSION_MAJOR > 2
17189         db_env_create( NULL, 0 );
17190 #elif DB_VERSION_MAJOR > 1
17191         db_appexit( NULL );
17192 #else
17193         (void) dbopen( NULL, 0, 0, 0, NULL);
17194 #endif
17195
17196 ; return 0; }
17197 EOF
17198 if { (eval echo configure:17199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17199   rm -rf conftest*
17200   ol_cv_db_db4=yes
17201 else
17202   echo "configure: failed program was:" >&5
17203   cat conftest.$ac_ext >&5
17204   rm -rf conftest*
17205   ol_cv_db_db4=no
17206 fi
17207 rm -f conftest*
17208
17209         LIBS="$ol_LIBS"
17210
17211 fi
17212
17213 echo "$ac_t""$ol_cv_db_db4" 1>&6
17214
17215         if test $ol_cv_db_db4 = yes ; then
17216                 ol_cv_lib_db=-ldb4
17217         fi
17218 fi
17219
17220 if test $ol_cv_lib_db = no ; then
17221         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17222 echo "configure:17223: checking for Berkeley DB link (-ldb)" >&5
17223 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17224   echo $ac_n "(cached) $ac_c" 1>&6
17225 else
17226   
17227         ol_DB_LIB=-ldb
17228         ol_LIBS=$LIBS
17229         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17230
17231         cat > conftest.$ac_ext <<EOF
17232 #line 17233 "configure"
17233 #include "confdefs.h"
17234
17235 #ifdef HAVE_DB_185_H
17236 # include <db_185.h>
17237 #else
17238 # include <db.h>
17239 #endif
17240
17241 #ifndef DB_VERSION_MAJOR
17242 # define DB_VERSION_MAJOR 1
17243 #endif
17244
17245 #ifndef NULL
17246 #define NULL ((void*)0)
17247 #endif
17248
17249 int main() {
17250
17251 #if DB_VERSION_MAJOR > 1
17252         {
17253                 char *version;
17254                 int major, minor, patch;
17255
17256                 version = db_version( &major, &minor, &patch );
17257
17258                 if( major != DB_VERSION_MAJOR ||
17259                         minor < DB_VERSION_MINOR )
17260                 {
17261                         printf("Berkeley DB version mismatch\n"
17262                                 "\texpected: %s\n\tgot: %s\n",
17263                                 DB_VERSION_STRING, version);
17264                         return 1;
17265                 }
17266         }
17267 #endif
17268
17269 #if DB_VERSION_MAJOR > 2
17270         db_env_create( NULL, 0 );
17271 #elif DB_VERSION_MAJOR > 1
17272         db_appexit( NULL );
17273 #else
17274         (void) dbopen( NULL, 0, 0, 0, NULL);
17275 #endif
17276
17277 ; return 0; }
17278 EOF
17279 if { (eval echo configure:17280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17280   rm -rf conftest*
17281   ol_cv_db_db=yes
17282 else
17283   echo "configure: failed program was:" >&5
17284   cat conftest.$ac_ext >&5
17285   rm -rf conftest*
17286   ol_cv_db_db=no
17287 fi
17288 rm -f conftest*
17289
17290         LIBS="$ol_LIBS"
17291
17292 fi
17293
17294 echo "$ac_t""$ol_cv_db_db" 1>&6
17295
17296         if test $ol_cv_db_db = yes ; then
17297                 ol_cv_lib_db=-ldb
17298         fi
17299 fi
17300
17301 if test $ol_cv_lib_db = no ; then
17302         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17303 echo "configure:17304: checking for Berkeley DB link (-ldb41)" >&5
17304 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17305   echo $ac_n "(cached) $ac_c" 1>&6
17306 else
17307   
17308         ol_DB_LIB=-ldb41
17309         ol_LIBS=$LIBS
17310         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17311
17312         cat > conftest.$ac_ext <<EOF
17313 #line 17314 "configure"
17314 #include "confdefs.h"
17315
17316 #ifdef HAVE_DB_185_H
17317 # include <db_185.h>
17318 #else
17319 # include <db.h>
17320 #endif
17321
17322 #ifndef DB_VERSION_MAJOR
17323 # define DB_VERSION_MAJOR 1
17324 #endif
17325
17326 #ifndef NULL
17327 #define NULL ((void*)0)
17328 #endif
17329
17330 int main() {
17331
17332 #if DB_VERSION_MAJOR > 1
17333         {
17334                 char *version;
17335                 int major, minor, patch;
17336
17337                 version = db_version( &major, &minor, &patch );
17338
17339                 if( major != DB_VERSION_MAJOR ||
17340                         minor < DB_VERSION_MINOR )
17341                 {
17342                         printf("Berkeley DB version mismatch\n"
17343                                 "\texpected: %s\n\tgot: %s\n",
17344                                 DB_VERSION_STRING, version);
17345                         return 1;
17346                 }
17347         }
17348 #endif
17349
17350 #if DB_VERSION_MAJOR > 2
17351         db_env_create( NULL, 0 );
17352 #elif DB_VERSION_MAJOR > 1
17353         db_appexit( NULL );
17354 #else
17355         (void) dbopen( NULL, 0, 0, 0, NULL);
17356 #endif
17357
17358 ; return 0; }
17359 EOF
17360 if { (eval echo configure:17361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17361   rm -rf conftest*
17362   ol_cv_db_db41=yes
17363 else
17364   echo "configure: failed program was:" >&5
17365   cat conftest.$ac_ext >&5
17366   rm -rf conftest*
17367   ol_cv_db_db41=no
17368 fi
17369 rm -f conftest*
17370
17371         LIBS="$ol_LIBS"
17372
17373 fi
17374
17375 echo "$ac_t""$ol_cv_db_db41" 1>&6
17376
17377         if test $ol_cv_db_db41 = yes ; then
17378                 ol_cv_lib_db=-ldb41
17379         fi
17380 fi
17381
17382 if test $ol_cv_lib_db = no ; then
17383         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17384 echo "configure:17385: checking for Berkeley DB link (-ldb-41)" >&5
17385 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17386   echo $ac_n "(cached) $ac_c" 1>&6
17387 else
17388   
17389         ol_DB_LIB=-ldb-41
17390         ol_LIBS=$LIBS
17391         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17392
17393         cat > conftest.$ac_ext <<EOF
17394 #line 17395 "configure"
17395 #include "confdefs.h"
17396
17397 #ifdef HAVE_DB_185_H
17398 # include <db_185.h>
17399 #else
17400 # include <db.h>
17401 #endif
17402
17403 #ifndef DB_VERSION_MAJOR
17404 # define DB_VERSION_MAJOR 1
17405 #endif
17406
17407 #ifndef NULL
17408 #define NULL ((void*)0)
17409 #endif
17410
17411 int main() {
17412
17413 #if DB_VERSION_MAJOR > 1
17414         {
17415                 char *version;
17416                 int major, minor, patch;
17417
17418                 version = db_version( &major, &minor, &patch );
17419
17420                 if( major != DB_VERSION_MAJOR ||
17421                         minor < DB_VERSION_MINOR )
17422                 {
17423                         printf("Berkeley DB version mismatch\n"
17424                                 "\texpected: %s\n\tgot: %s\n",
17425                                 DB_VERSION_STRING, version);
17426                         return 1;
17427                 }
17428         }
17429 #endif
17430
17431 #if DB_VERSION_MAJOR > 2
17432         db_env_create( NULL, 0 );
17433 #elif DB_VERSION_MAJOR > 1
17434         db_appexit( NULL );
17435 #else
17436         (void) dbopen( NULL, 0, 0, 0, NULL);
17437 #endif
17438
17439 ; return 0; }
17440 EOF
17441 if { (eval echo configure:17442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17442   rm -rf conftest*
17443   ol_cv_db_db_41=yes
17444 else
17445   echo "configure: failed program was:" >&5
17446   cat conftest.$ac_ext >&5
17447   rm -rf conftest*
17448   ol_cv_db_db_41=no
17449 fi
17450 rm -f conftest*
17451
17452         LIBS="$ol_LIBS"
17453
17454 fi
17455
17456 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17457
17458         if test $ol_cv_db_db_41 = yes ; then
17459                 ol_cv_lib_db=-ldb-41
17460         fi
17461 fi
17462
17463 if test $ol_cv_lib_db = no ; then
17464         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17465 echo "configure:17466: checking for Berkeley DB link (-ldb-4.1)" >&5
17466 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17467   echo $ac_n "(cached) $ac_c" 1>&6
17468 else
17469   
17470         ol_DB_LIB=-ldb-4.1
17471         ol_LIBS=$LIBS
17472         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17473
17474         cat > conftest.$ac_ext <<EOF
17475 #line 17476 "configure"
17476 #include "confdefs.h"
17477
17478 #ifdef HAVE_DB_185_H
17479 # include <db_185.h>
17480 #else
17481 # include <db.h>
17482 #endif
17483
17484 #ifndef DB_VERSION_MAJOR
17485 # define DB_VERSION_MAJOR 1
17486 #endif
17487
17488 #ifndef NULL
17489 #define NULL ((void*)0)
17490 #endif
17491
17492 int main() {
17493
17494 #if DB_VERSION_MAJOR > 1
17495         {
17496                 char *version;
17497                 int major, minor, patch;
17498
17499                 version = db_version( &major, &minor, &patch );
17500
17501                 if( major != DB_VERSION_MAJOR ||
17502                         minor < DB_VERSION_MINOR )
17503                 {
17504                         printf("Berkeley DB version mismatch\n"
17505                                 "\texpected: %s\n\tgot: %s\n",
17506                                 DB_VERSION_STRING, version);
17507                         return 1;
17508                 }
17509         }
17510 #endif
17511
17512 #if DB_VERSION_MAJOR > 2
17513         db_env_create( NULL, 0 );
17514 #elif DB_VERSION_MAJOR > 1
17515         db_appexit( NULL );
17516 #else
17517         (void) dbopen( NULL, 0, 0, 0, NULL);
17518 #endif
17519
17520 ; return 0; }
17521 EOF
17522 if { (eval echo configure:17523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17523   rm -rf conftest*
17524   ol_cv_db_db_4_dot_1=yes
17525 else
17526   echo "configure: failed program was:" >&5
17527   cat conftest.$ac_ext >&5
17528   rm -rf conftest*
17529   ol_cv_db_db_4_dot_1=no
17530 fi
17531 rm -f conftest*
17532
17533         LIBS="$ol_LIBS"
17534
17535 fi
17536
17537 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17538
17539         if test $ol_cv_db_db_4_dot_1 = yes ; then
17540                 ol_cv_lib_db=-ldb-4.1
17541         fi
17542 fi
17543
17544 if test $ol_cv_lib_db = no ; then
17545         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17546 echo "configure:17547: checking for Berkeley DB link (-ldb-4-1)" >&5
17547 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17548   echo $ac_n "(cached) $ac_c" 1>&6
17549 else
17550   
17551         ol_DB_LIB=-ldb-4-1
17552         ol_LIBS=$LIBS
17553         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17554
17555         cat > conftest.$ac_ext <<EOF
17556 #line 17557 "configure"
17557 #include "confdefs.h"
17558
17559 #ifdef HAVE_DB_185_H
17560 # include <db_185.h>
17561 #else
17562 # include <db.h>
17563 #endif
17564
17565 #ifndef DB_VERSION_MAJOR
17566 # define DB_VERSION_MAJOR 1
17567 #endif
17568
17569 #ifndef NULL
17570 #define NULL ((void*)0)
17571 #endif
17572
17573 int main() {
17574
17575 #if DB_VERSION_MAJOR > 1
17576         {
17577                 char *version;
17578                 int major, minor, patch;
17579
17580                 version = db_version( &major, &minor, &patch );
17581
17582                 if( major != DB_VERSION_MAJOR ||
17583                         minor < DB_VERSION_MINOR )
17584                 {
17585                         printf("Berkeley DB version mismatch\n"
17586                                 "\texpected: %s\n\tgot: %s\n",
17587                                 DB_VERSION_STRING, version);
17588                         return 1;
17589                 }
17590         }
17591 #endif
17592
17593 #if DB_VERSION_MAJOR > 2
17594         db_env_create( NULL, 0 );
17595 #elif DB_VERSION_MAJOR > 1
17596         db_appexit( NULL );
17597 #else
17598         (void) dbopen( NULL, 0, 0, 0, NULL);
17599 #endif
17600
17601 ; return 0; }
17602 EOF
17603 if { (eval echo configure:17604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17604   rm -rf conftest*
17605   ol_cv_db_db_4_1=yes
17606 else
17607   echo "configure: failed program was:" >&5
17608   cat conftest.$ac_ext >&5
17609   rm -rf conftest*
17610   ol_cv_db_db_4_1=no
17611 fi
17612 rm -f conftest*
17613
17614         LIBS="$ol_LIBS"
17615
17616 fi
17617
17618 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17619
17620         if test $ol_cv_db_db_4_1 = yes ; then
17621                 ol_cv_lib_db=-ldb-4-1
17622         fi
17623 fi
17624
17625 if test $ol_cv_lib_db = no ; then
17626         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17627 echo "configure:17628: checking for Berkeley DB link (-ldb3)" >&5
17628 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17629   echo $ac_n "(cached) $ac_c" 1>&6
17630 else
17631   
17632         ol_DB_LIB=-ldb3
17633         ol_LIBS=$LIBS
17634         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17635
17636         cat > conftest.$ac_ext <<EOF
17637 #line 17638 "configure"
17638 #include "confdefs.h"
17639
17640 #ifdef HAVE_DB_185_H
17641 # include <db_185.h>
17642 #else
17643 # include <db.h>
17644 #endif
17645
17646 #ifndef DB_VERSION_MAJOR
17647 # define DB_VERSION_MAJOR 1
17648 #endif
17649
17650 #ifndef NULL
17651 #define NULL ((void*)0)
17652 #endif
17653
17654 int main() {
17655
17656 #if DB_VERSION_MAJOR > 1
17657         {
17658                 char *version;
17659                 int major, minor, patch;
17660
17661                 version = db_version( &major, &minor, &patch );
17662
17663                 if( major != DB_VERSION_MAJOR ||
17664                         minor < DB_VERSION_MINOR )
17665                 {
17666                         printf("Berkeley DB version mismatch\n"
17667                                 "\texpected: %s\n\tgot: %s\n",
17668                                 DB_VERSION_STRING, version);
17669                         return 1;
17670                 }
17671         }
17672 #endif
17673
17674 #if DB_VERSION_MAJOR > 2
17675         db_env_create( NULL, 0 );
17676 #elif DB_VERSION_MAJOR > 1
17677         db_appexit( NULL );
17678 #else
17679         (void) dbopen( NULL, 0, 0, 0, NULL);
17680 #endif
17681
17682 ; return 0; }
17683 EOF
17684 if { (eval echo configure:17685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17685   rm -rf conftest*
17686   ol_cv_db_db3=yes
17687 else
17688   echo "configure: failed program was:" >&5
17689   cat conftest.$ac_ext >&5
17690   rm -rf conftest*
17691   ol_cv_db_db3=no
17692 fi
17693 rm -f conftest*
17694
17695         LIBS="$ol_LIBS"
17696
17697 fi
17698
17699 echo "$ac_t""$ol_cv_db_db3" 1>&6
17700
17701         if test $ol_cv_db_db3 = yes ; then
17702                 ol_cv_lib_db=-ldb3
17703         fi
17704 fi
17705
17706 if test $ol_cv_lib_db = no ; then
17707         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17708 echo "configure:17709: checking for Berkeley DB link (-ldb-3)" >&5
17709 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17710   echo $ac_n "(cached) $ac_c" 1>&6
17711 else
17712   
17713         ol_DB_LIB=-ldb-3
17714         ol_LIBS=$LIBS
17715         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17716
17717         cat > conftest.$ac_ext <<EOF
17718 #line 17719 "configure"
17719 #include "confdefs.h"
17720
17721 #ifdef HAVE_DB_185_H
17722 # include <db_185.h>
17723 #else
17724 # include <db.h>
17725 #endif
17726
17727 #ifndef DB_VERSION_MAJOR
17728 # define DB_VERSION_MAJOR 1
17729 #endif
17730
17731 #ifndef NULL
17732 #define NULL ((void*)0)
17733 #endif
17734
17735 int main() {
17736
17737 #if DB_VERSION_MAJOR > 1
17738         {
17739                 char *version;
17740                 int major, minor, patch;
17741
17742                 version = db_version( &major, &minor, &patch );
17743
17744                 if( major != DB_VERSION_MAJOR ||
17745                         minor < DB_VERSION_MINOR )
17746                 {
17747                         printf("Berkeley DB version mismatch\n"
17748                                 "\texpected: %s\n\tgot: %s\n",
17749                                 DB_VERSION_STRING, version);
17750                         return 1;
17751                 }
17752         }
17753 #endif
17754
17755 #if DB_VERSION_MAJOR > 2
17756         db_env_create( NULL, 0 );
17757 #elif DB_VERSION_MAJOR > 1
17758         db_appexit( NULL );
17759 #else
17760         (void) dbopen( NULL, 0, 0, 0, NULL);
17761 #endif
17762
17763 ; return 0; }
17764 EOF
17765 if { (eval echo configure:17766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17766   rm -rf conftest*
17767   ol_cv_db_db_3=yes
17768 else
17769   echo "configure: failed program was:" >&5
17770   cat conftest.$ac_ext >&5
17771   rm -rf conftest*
17772   ol_cv_db_db_3=no
17773 fi
17774 rm -f conftest*
17775
17776         LIBS="$ol_LIBS"
17777
17778 fi
17779
17780 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17781
17782         if test $ol_cv_db_db_3 = yes ; then
17783                 ol_cv_lib_db=-ldb-3
17784         fi
17785 fi
17786
17787 if test $ol_cv_lib_db = no ; then
17788         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17789 echo "configure:17790: checking for Berkeley DB link (-ldb2)" >&5
17790 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17791   echo $ac_n "(cached) $ac_c" 1>&6
17792 else
17793   
17794         ol_DB_LIB=-ldb2
17795         ol_LIBS=$LIBS
17796         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17797
17798         cat > conftest.$ac_ext <<EOF
17799 #line 17800 "configure"
17800 #include "confdefs.h"
17801
17802 #ifdef HAVE_DB_185_H
17803 # include <db_185.h>
17804 #else
17805 # include <db.h>
17806 #endif
17807
17808 #ifndef DB_VERSION_MAJOR
17809 # define DB_VERSION_MAJOR 1
17810 #endif
17811
17812 #ifndef NULL
17813 #define NULL ((void*)0)
17814 #endif
17815
17816 int main() {
17817
17818 #if DB_VERSION_MAJOR > 1
17819         {
17820                 char *version;
17821                 int major, minor, patch;
17822
17823                 version = db_version( &major, &minor, &patch );
17824
17825                 if( major != DB_VERSION_MAJOR ||
17826                         minor < DB_VERSION_MINOR )
17827                 {
17828                         printf("Berkeley DB version mismatch\n"
17829                                 "\texpected: %s\n\tgot: %s\n",
17830                                 DB_VERSION_STRING, version);
17831                         return 1;
17832                 }
17833         }
17834 #endif
17835
17836 #if DB_VERSION_MAJOR > 2
17837         db_env_create( NULL, 0 );
17838 #elif DB_VERSION_MAJOR > 1
17839         db_appexit( NULL );
17840 #else
17841         (void) dbopen( NULL, 0, 0, 0, NULL);
17842 #endif
17843
17844 ; return 0; }
17845 EOF
17846 if { (eval echo configure:17847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17847   rm -rf conftest*
17848   ol_cv_db_db2=yes
17849 else
17850   echo "configure: failed program was:" >&5
17851   cat conftest.$ac_ext >&5
17852   rm -rf conftest*
17853   ol_cv_db_db2=no
17854 fi
17855 rm -f conftest*
17856
17857         LIBS="$ol_LIBS"
17858
17859 fi
17860
17861 echo "$ac_t""$ol_cv_db_db2" 1>&6
17862
17863         if test $ol_cv_db_db2 = yes ; then
17864                 ol_cv_lib_db=-ldb2
17865         fi
17866 fi
17867
17868 if test $ol_cv_lib_db = no ; then
17869         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17870 echo "configure:17871: checking for Berkeley DB link (-ldb-2)" >&5
17871 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17872   echo $ac_n "(cached) $ac_c" 1>&6
17873 else
17874   
17875         ol_DB_LIB=-ldb-2
17876         ol_LIBS=$LIBS
17877         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17878
17879         cat > conftest.$ac_ext <<EOF
17880 #line 17881 "configure"
17881 #include "confdefs.h"
17882
17883 #ifdef HAVE_DB_185_H
17884 # include <db_185.h>
17885 #else
17886 # include <db.h>
17887 #endif
17888
17889 #ifndef DB_VERSION_MAJOR
17890 # define DB_VERSION_MAJOR 1
17891 #endif
17892
17893 #ifndef NULL
17894 #define NULL ((void*)0)
17895 #endif
17896
17897 int main() {
17898
17899 #if DB_VERSION_MAJOR > 1
17900         {
17901                 char *version;
17902                 int major, minor, patch;
17903
17904                 version = db_version( &major, &minor, &patch );
17905
17906                 if( major != DB_VERSION_MAJOR ||
17907                         minor < DB_VERSION_MINOR )
17908                 {
17909                         printf("Berkeley DB version mismatch\n"
17910                                 "\texpected: %s\n\tgot: %s\n",
17911                                 DB_VERSION_STRING, version);
17912                         return 1;
17913                 }
17914         }
17915 #endif
17916
17917 #if DB_VERSION_MAJOR > 2
17918         db_env_create( NULL, 0 );
17919 #elif DB_VERSION_MAJOR > 1
17920         db_appexit( NULL );
17921 #else
17922         (void) dbopen( NULL, 0, 0, 0, NULL);
17923 #endif
17924
17925 ; return 0; }
17926 EOF
17927 if { (eval echo configure:17928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17928   rm -rf conftest*
17929   ol_cv_db_db_2=yes
17930 else
17931   echo "configure: failed program was:" >&5
17932   cat conftest.$ac_ext >&5
17933   rm -rf conftest*
17934   ol_cv_db_db_2=no
17935 fi
17936 rm -f conftest*
17937
17938         LIBS="$ol_LIBS"
17939
17940 fi
17941
17942 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17943
17944         if test $ol_cv_db_db_2 = yes ; then
17945                 ol_cv_lib_db=-ldb-2
17946         fi
17947 fi
17948
17949 if test $ol_cv_lib_db = no ; then
17950         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17951 echo "configure:17952: checking for Berkeley DB link (-ldb1)" >&5
17952 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17953   echo $ac_n "(cached) $ac_c" 1>&6
17954 else
17955   
17956         ol_DB_LIB=-ldb1
17957         ol_LIBS=$LIBS
17958         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17959
17960         cat > conftest.$ac_ext <<EOF
17961 #line 17962 "configure"
17962 #include "confdefs.h"
17963
17964 #ifdef HAVE_DB_185_H
17965 # include <db_185.h>
17966 #else
17967 # include <db.h>
17968 #endif
17969
17970 #ifndef DB_VERSION_MAJOR
17971 # define DB_VERSION_MAJOR 1
17972 #endif
17973
17974 #ifndef NULL
17975 #define NULL ((void*)0)
17976 #endif
17977
17978 int main() {
17979
17980 #if DB_VERSION_MAJOR > 1
17981         {
17982                 char *version;
17983                 int major, minor, patch;
17984
17985                 version = db_version( &major, &minor, &patch );
17986
17987                 if( major != DB_VERSION_MAJOR ||
17988                         minor < DB_VERSION_MINOR )
17989                 {
17990                         printf("Berkeley DB version mismatch\n"
17991                                 "\texpected: %s\n\tgot: %s\n",
17992                                 DB_VERSION_STRING, version);
17993                         return 1;
17994                 }
17995         }
17996 #endif
17997
17998 #if DB_VERSION_MAJOR > 2
17999         db_env_create( NULL, 0 );
18000 #elif DB_VERSION_MAJOR > 1
18001         db_appexit( NULL );
18002 #else
18003         (void) dbopen( NULL, 0, 0, 0, NULL);
18004 #endif
18005
18006 ; return 0; }
18007 EOF
18008 if { (eval echo configure:18009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18009   rm -rf conftest*
18010   ol_cv_db_db1=yes
18011 else
18012   echo "configure: failed program was:" >&5
18013   cat conftest.$ac_ext >&5
18014   rm -rf conftest*
18015   ol_cv_db_db1=no
18016 fi
18017 rm -f conftest*
18018
18019         LIBS="$ol_LIBS"
18020
18021 fi
18022
18023 echo "$ac_t""$ol_cv_db_db1" 1>&6
18024
18025         if test $ol_cv_db_db1 = yes ; then
18026                 ol_cv_lib_db=-ldb1
18027         fi
18028 fi
18029
18030 if test $ol_cv_lib_db = no ; then
18031         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18032 echo "configure:18033: checking for Berkeley DB link (-ldb-1)" >&5
18033 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18034   echo $ac_n "(cached) $ac_c" 1>&6
18035 else
18036   
18037         ol_DB_LIB=-ldb-1
18038         ol_LIBS=$LIBS
18039         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18040
18041         cat > conftest.$ac_ext <<EOF
18042 #line 18043 "configure"
18043 #include "confdefs.h"
18044
18045 #ifdef HAVE_DB_185_H
18046 # include <db_185.h>
18047 #else
18048 # include <db.h>
18049 #endif
18050
18051 #ifndef DB_VERSION_MAJOR
18052 # define DB_VERSION_MAJOR 1
18053 #endif
18054
18055 #ifndef NULL
18056 #define NULL ((void*)0)
18057 #endif
18058
18059 int main() {
18060
18061 #if DB_VERSION_MAJOR > 1
18062         {
18063                 char *version;
18064                 int major, minor, patch;
18065
18066                 version = db_version( &major, &minor, &patch );
18067
18068                 if( major != DB_VERSION_MAJOR ||
18069                         minor < DB_VERSION_MINOR )
18070                 {
18071                         printf("Berkeley DB version mismatch\n"
18072                                 "\texpected: %s\n\tgot: %s\n",
18073                                 DB_VERSION_STRING, version);
18074                         return 1;
18075                 }
18076         }
18077 #endif
18078
18079 #if DB_VERSION_MAJOR > 2
18080         db_env_create( NULL, 0 );
18081 #elif DB_VERSION_MAJOR > 1
18082         db_appexit( NULL );
18083 #else
18084         (void) dbopen( NULL, 0, 0, 0, NULL);
18085 #endif
18086
18087 ; return 0; }
18088 EOF
18089 if { (eval echo configure:18090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18090   rm -rf conftest*
18091   ol_cv_db_db_1=yes
18092 else
18093   echo "configure: failed program was:" >&5
18094   cat conftest.$ac_ext >&5
18095   rm -rf conftest*
18096   ol_cv_db_db_1=no
18097 fi
18098 rm -f conftest*
18099
18100         LIBS="$ol_LIBS"
18101
18102 fi
18103
18104 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18105
18106         if test $ol_cv_db_db_1 = yes ; then
18107                 ol_cv_lib_db=-ldb-1
18108         fi
18109 fi
18110
18111
18112                 if test "$ol_cv_lib_db" != no ; then
18113                         ol_cv_berkeley_db=yes
18114                 fi
18115         fi
18116 fi
18117
18118         else
18119                 ol_cv_berkeley_db=no
18120 for ac_hdr in db.h
18121 do
18122 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18123 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18124 echo "configure:18125: checking for $ac_hdr" >&5
18125 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18126   echo $ac_n "(cached) $ac_c" 1>&6
18127 else
18128   cat > conftest.$ac_ext <<EOF
18129 #line 18130 "configure"
18130 #include "confdefs.h"
18131 #include <$ac_hdr>
18132 EOF
18133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18134 { (eval echo configure:18135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18136 if test -z "$ac_err"; then
18137   rm -rf conftest*
18138   eval "ac_cv_header_$ac_safe=yes"
18139 else
18140   echo "$ac_err" >&5
18141   echo "configure: failed program was:" >&5
18142   cat conftest.$ac_ext >&5
18143   rm -rf conftest*
18144   eval "ac_cv_header_$ac_safe=no"
18145 fi
18146 rm -f conftest*
18147 fi
18148 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18149   echo "$ac_t""yes" 1>&6
18150     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18151   cat >> confdefs.h <<EOF
18152 #define $ac_tr_hdr 1
18153 EOF
18154  
18155 else
18156   echo "$ac_t""no" 1>&6
18157 fi
18158 done
18159
18160 if test $ac_cv_header_db_h = yes; then
18161         ol_cv_lib_db=no
18162 if test $ol_cv_lib_db = no ; then
18163         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18164 echo "configure:18165: checking for Berkeley DB link (default)" >&5
18165 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18166   echo $ac_n "(cached) $ac_c" 1>&6
18167 else
18168   
18169         ol_DB_LIB=
18170         ol_LIBS=$LIBS
18171         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18172
18173         cat > conftest.$ac_ext <<EOF
18174 #line 18175 "configure"
18175 #include "confdefs.h"
18176
18177 #ifdef HAVE_DB_185_H
18178 # include <db_185.h>
18179 #else
18180 # include <db.h>
18181 #endif
18182
18183 #ifndef DB_VERSION_MAJOR
18184 # define DB_VERSION_MAJOR 1
18185 #endif
18186
18187 #ifndef NULL
18188 #define NULL ((void*)0)
18189 #endif
18190
18191 int main() {
18192
18193 #if DB_VERSION_MAJOR > 1
18194         {
18195                 char *version;
18196                 int major, minor, patch;
18197
18198                 version = db_version( &major, &minor, &patch );
18199
18200                 if( major != DB_VERSION_MAJOR ||
18201                         minor < DB_VERSION_MINOR )
18202                 {
18203                         printf("Berkeley DB version mismatch\n"
18204                                 "\texpected: %s\n\tgot: %s\n",
18205                                 DB_VERSION_STRING, version);
18206                         return 1;
18207                 }
18208         }
18209 #endif
18210
18211 #if DB_VERSION_MAJOR > 2
18212         db_env_create( NULL, 0 );
18213 #elif DB_VERSION_MAJOR > 1
18214         db_appexit( NULL );
18215 #else
18216         (void) dbopen( NULL, 0, 0, 0, NULL);
18217 #endif
18218
18219 ; return 0; }
18220 EOF
18221 if { (eval echo configure:18222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18222   rm -rf conftest*
18223   ol_cv_db_none=yes
18224 else
18225   echo "configure: failed program was:" >&5
18226   cat conftest.$ac_ext >&5
18227   rm -rf conftest*
18228   ol_cv_db_none=no
18229 fi
18230 rm -f conftest*
18231
18232         LIBS="$ol_LIBS"
18233
18234 fi
18235
18236 echo "$ac_t""$ol_cv_db_none" 1>&6
18237
18238         if test $ol_cv_db_none = yes ; then
18239                 ol_cv_lib_db=yes
18240         fi
18241 fi
18242
18243 if test $ol_cv_lib_db = no ; then
18244         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18245 echo "configure:18246: checking for Berkeley DB link (-ldb42)" >&5
18246 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18247   echo $ac_n "(cached) $ac_c" 1>&6
18248 else
18249   
18250         ol_DB_LIB=-ldb42
18251         ol_LIBS=$LIBS
18252         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18253
18254         cat > conftest.$ac_ext <<EOF
18255 #line 18256 "configure"
18256 #include "confdefs.h"
18257
18258 #ifdef HAVE_DB_185_H
18259 # include <db_185.h>
18260 #else
18261 # include <db.h>
18262 #endif
18263
18264 #ifndef DB_VERSION_MAJOR
18265 # define DB_VERSION_MAJOR 1
18266 #endif
18267
18268 #ifndef NULL
18269 #define NULL ((void*)0)
18270 #endif
18271
18272 int main() {
18273
18274 #if DB_VERSION_MAJOR > 1
18275         {
18276                 char *version;
18277                 int major, minor, patch;
18278
18279                 version = db_version( &major, &minor, &patch );
18280
18281                 if( major != DB_VERSION_MAJOR ||
18282                         minor < DB_VERSION_MINOR )
18283                 {
18284                         printf("Berkeley DB version mismatch\n"
18285                                 "\texpected: %s\n\tgot: %s\n",
18286                                 DB_VERSION_STRING, version);
18287                         return 1;
18288                 }
18289         }
18290 #endif
18291
18292 #if DB_VERSION_MAJOR > 2
18293         db_env_create( NULL, 0 );
18294 #elif DB_VERSION_MAJOR > 1
18295         db_appexit( NULL );
18296 #else
18297         (void) dbopen( NULL, 0, 0, 0, NULL);
18298 #endif
18299
18300 ; return 0; }
18301 EOF
18302 if { (eval echo configure:18303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18303   rm -rf conftest*
18304   ol_cv_db_db42=yes
18305 else
18306   echo "configure: failed program was:" >&5
18307   cat conftest.$ac_ext >&5
18308   rm -rf conftest*
18309   ol_cv_db_db42=no
18310 fi
18311 rm -f conftest*
18312
18313         LIBS="$ol_LIBS"
18314
18315 fi
18316
18317 echo "$ac_t""$ol_cv_db_db42" 1>&6
18318
18319         if test $ol_cv_db_db42 = yes ; then
18320                 ol_cv_lib_db=-ldb42
18321         fi
18322 fi
18323
18324 if test $ol_cv_lib_db = no ; then
18325         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18326 echo "configure:18327: checking for Berkeley DB link (-ldb-42)" >&5
18327 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18328   echo $ac_n "(cached) $ac_c" 1>&6
18329 else
18330   
18331         ol_DB_LIB=-ldb-42
18332         ol_LIBS=$LIBS
18333         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18334
18335         cat > conftest.$ac_ext <<EOF
18336 #line 18337 "configure"
18337 #include "confdefs.h"
18338
18339 #ifdef HAVE_DB_185_H
18340 # include <db_185.h>
18341 #else
18342 # include <db.h>
18343 #endif
18344
18345 #ifndef DB_VERSION_MAJOR
18346 # define DB_VERSION_MAJOR 1
18347 #endif
18348
18349 #ifndef NULL
18350 #define NULL ((void*)0)
18351 #endif
18352
18353 int main() {
18354
18355 #if DB_VERSION_MAJOR > 1
18356         {
18357                 char *version;
18358                 int major, minor, patch;
18359
18360                 version = db_version( &major, &minor, &patch );
18361
18362                 if( major != DB_VERSION_MAJOR ||
18363                         minor < DB_VERSION_MINOR )
18364                 {
18365                         printf("Berkeley DB version mismatch\n"
18366                                 "\texpected: %s\n\tgot: %s\n",
18367                                 DB_VERSION_STRING, version);
18368                         return 1;
18369                 }
18370         }
18371 #endif
18372
18373 #if DB_VERSION_MAJOR > 2
18374         db_env_create( NULL, 0 );
18375 #elif DB_VERSION_MAJOR > 1
18376         db_appexit( NULL );
18377 #else
18378         (void) dbopen( NULL, 0, 0, 0, NULL);
18379 #endif
18380
18381 ; return 0; }
18382 EOF
18383 if { (eval echo configure:18384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18384   rm -rf conftest*
18385   ol_cv_db_db_42=yes
18386 else
18387   echo "configure: failed program was:" >&5
18388   cat conftest.$ac_ext >&5
18389   rm -rf conftest*
18390   ol_cv_db_db_42=no
18391 fi
18392 rm -f conftest*
18393
18394         LIBS="$ol_LIBS"
18395
18396 fi
18397
18398 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18399
18400         if test $ol_cv_db_db_42 = yes ; then
18401                 ol_cv_lib_db=-ldb-42
18402         fi
18403 fi
18404
18405 if test $ol_cv_lib_db = no ; then
18406         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18407 echo "configure:18408: checking for Berkeley DB link (-ldb-4.2)" >&5
18408 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18409   echo $ac_n "(cached) $ac_c" 1>&6
18410 else
18411   
18412         ol_DB_LIB=-ldb-4.2
18413         ol_LIBS=$LIBS
18414         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18415
18416         cat > conftest.$ac_ext <<EOF
18417 #line 18418 "configure"
18418 #include "confdefs.h"
18419
18420 #ifdef HAVE_DB_185_H
18421 # include <db_185.h>
18422 #else
18423 # include <db.h>
18424 #endif
18425
18426 #ifndef DB_VERSION_MAJOR
18427 # define DB_VERSION_MAJOR 1
18428 #endif
18429
18430 #ifndef NULL
18431 #define NULL ((void*)0)
18432 #endif
18433
18434 int main() {
18435
18436 #if DB_VERSION_MAJOR > 1
18437         {
18438                 char *version;
18439                 int major, minor, patch;
18440
18441                 version = db_version( &major, &minor, &patch );
18442
18443                 if( major != DB_VERSION_MAJOR ||
18444                         minor < DB_VERSION_MINOR )
18445                 {
18446                         printf("Berkeley DB version mismatch\n"
18447                                 "\texpected: %s\n\tgot: %s\n",
18448                                 DB_VERSION_STRING, version);
18449                         return 1;
18450                 }
18451         }
18452 #endif
18453
18454 #if DB_VERSION_MAJOR > 2
18455         db_env_create( NULL, 0 );
18456 #elif DB_VERSION_MAJOR > 1
18457         db_appexit( NULL );
18458 #else
18459         (void) dbopen( NULL, 0, 0, 0, NULL);
18460 #endif
18461
18462 ; return 0; }
18463 EOF
18464 if { (eval echo configure:18465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18465   rm -rf conftest*
18466   ol_cv_db_db_4_dot_2=yes
18467 else
18468   echo "configure: failed program was:" >&5
18469   cat conftest.$ac_ext >&5
18470   rm -rf conftest*
18471   ol_cv_db_db_4_dot_2=no
18472 fi
18473 rm -f conftest*
18474
18475         LIBS="$ol_LIBS"
18476
18477 fi
18478
18479 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18480
18481         if test $ol_cv_db_db_4_dot_2 = yes ; then
18482                 ol_cv_lib_db=-ldb-4.2
18483         fi
18484 fi
18485
18486 if test $ol_cv_lib_db = no ; then
18487         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18488 echo "configure:18489: checking for Berkeley DB link (-ldb-4-2)" >&5
18489 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18490   echo $ac_n "(cached) $ac_c" 1>&6
18491 else
18492   
18493         ol_DB_LIB=-ldb-4-2
18494         ol_LIBS=$LIBS
18495         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18496
18497         cat > conftest.$ac_ext <<EOF
18498 #line 18499 "configure"
18499 #include "confdefs.h"
18500
18501 #ifdef HAVE_DB_185_H
18502 # include <db_185.h>
18503 #else
18504 # include <db.h>
18505 #endif
18506
18507 #ifndef DB_VERSION_MAJOR
18508 # define DB_VERSION_MAJOR 1
18509 #endif
18510
18511 #ifndef NULL
18512 #define NULL ((void*)0)
18513 #endif
18514
18515 int main() {
18516
18517 #if DB_VERSION_MAJOR > 1
18518         {
18519                 char *version;
18520                 int major, minor, patch;
18521
18522                 version = db_version( &major, &minor, &patch );
18523
18524                 if( major != DB_VERSION_MAJOR ||
18525                         minor < DB_VERSION_MINOR )
18526                 {
18527                         printf("Berkeley DB version mismatch\n"
18528                                 "\texpected: %s\n\tgot: %s\n",
18529                                 DB_VERSION_STRING, version);
18530                         return 1;
18531                 }
18532         }
18533 #endif
18534
18535 #if DB_VERSION_MAJOR > 2
18536         db_env_create( NULL, 0 );
18537 #elif DB_VERSION_MAJOR > 1
18538         db_appexit( NULL );
18539 #else
18540         (void) dbopen( NULL, 0, 0, 0, NULL);
18541 #endif
18542
18543 ; return 0; }
18544 EOF
18545 if { (eval echo configure:18546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18546   rm -rf conftest*
18547   ol_cv_db_db_4_2=yes
18548 else
18549   echo "configure: failed program was:" >&5
18550   cat conftest.$ac_ext >&5
18551   rm -rf conftest*
18552   ol_cv_db_db_4_2=no
18553 fi
18554 rm -f conftest*
18555
18556         LIBS="$ol_LIBS"
18557
18558 fi
18559
18560 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18561
18562         if test $ol_cv_db_db_4_2 = yes ; then
18563                 ol_cv_lib_db=-ldb-4-2
18564         fi
18565 fi
18566
18567 if test $ol_cv_lib_db = no ; then
18568         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18569 echo "configure:18570: checking for Berkeley DB link (-ldb-4)" >&5
18570 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18571   echo $ac_n "(cached) $ac_c" 1>&6
18572 else
18573   
18574         ol_DB_LIB=-ldb-4
18575         ol_LIBS=$LIBS
18576         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18577
18578         cat > conftest.$ac_ext <<EOF
18579 #line 18580 "configure"
18580 #include "confdefs.h"
18581
18582 #ifdef HAVE_DB_185_H
18583 # include <db_185.h>
18584 #else
18585 # include <db.h>
18586 #endif
18587
18588 #ifndef DB_VERSION_MAJOR
18589 # define DB_VERSION_MAJOR 1
18590 #endif
18591
18592 #ifndef NULL
18593 #define NULL ((void*)0)
18594 #endif
18595
18596 int main() {
18597
18598 #if DB_VERSION_MAJOR > 1
18599         {
18600                 char *version;
18601                 int major, minor, patch;
18602
18603                 version = db_version( &major, &minor, &patch );
18604
18605                 if( major != DB_VERSION_MAJOR ||
18606                         minor < DB_VERSION_MINOR )
18607                 {
18608                         printf("Berkeley DB version mismatch\n"
18609                                 "\texpected: %s\n\tgot: %s\n",
18610                                 DB_VERSION_STRING, version);
18611                         return 1;
18612                 }
18613         }
18614 #endif
18615
18616 #if DB_VERSION_MAJOR > 2
18617         db_env_create( NULL, 0 );
18618 #elif DB_VERSION_MAJOR > 1
18619         db_appexit( NULL );
18620 #else
18621         (void) dbopen( NULL, 0, 0, 0, NULL);
18622 #endif
18623
18624 ; return 0; }
18625 EOF
18626 if { (eval echo configure:18627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18627   rm -rf conftest*
18628   ol_cv_db_db_4=yes
18629 else
18630   echo "configure: failed program was:" >&5
18631   cat conftest.$ac_ext >&5
18632   rm -rf conftest*
18633   ol_cv_db_db_4=no
18634 fi
18635 rm -f conftest*
18636
18637         LIBS="$ol_LIBS"
18638
18639 fi
18640
18641 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18642
18643         if test $ol_cv_db_db_4 = yes ; then
18644                 ol_cv_lib_db=-ldb-4
18645         fi
18646 fi
18647
18648 if test $ol_cv_lib_db = no ; then
18649         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18650 echo "configure:18651: checking for Berkeley DB link (-ldb4)" >&5
18651 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18652   echo $ac_n "(cached) $ac_c" 1>&6
18653 else
18654   
18655         ol_DB_LIB=-ldb4
18656         ol_LIBS=$LIBS
18657         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18658
18659         cat > conftest.$ac_ext <<EOF
18660 #line 18661 "configure"
18661 #include "confdefs.h"
18662
18663 #ifdef HAVE_DB_185_H
18664 # include <db_185.h>
18665 #else
18666 # include <db.h>
18667 #endif
18668
18669 #ifndef DB_VERSION_MAJOR
18670 # define DB_VERSION_MAJOR 1
18671 #endif
18672
18673 #ifndef NULL
18674 #define NULL ((void*)0)
18675 #endif
18676
18677 int main() {
18678
18679 #if DB_VERSION_MAJOR > 1
18680         {
18681                 char *version;
18682                 int major, minor, patch;
18683
18684                 version = db_version( &major, &minor, &patch );
18685
18686                 if( major != DB_VERSION_MAJOR ||
18687                         minor < DB_VERSION_MINOR )
18688                 {
18689                         printf("Berkeley DB version mismatch\n"
18690                                 "\texpected: %s\n\tgot: %s\n",
18691                                 DB_VERSION_STRING, version);
18692                         return 1;
18693                 }
18694         }
18695 #endif
18696
18697 #if DB_VERSION_MAJOR > 2
18698         db_env_create( NULL, 0 );
18699 #elif DB_VERSION_MAJOR > 1
18700         db_appexit( NULL );
18701 #else
18702         (void) dbopen( NULL, 0, 0, 0, NULL);
18703 #endif
18704
18705 ; return 0; }
18706 EOF
18707 if { (eval echo configure:18708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18708   rm -rf conftest*
18709   ol_cv_db_db4=yes
18710 else
18711   echo "configure: failed program was:" >&5
18712   cat conftest.$ac_ext >&5
18713   rm -rf conftest*
18714   ol_cv_db_db4=no
18715 fi
18716 rm -f conftest*
18717
18718         LIBS="$ol_LIBS"
18719
18720 fi
18721
18722 echo "$ac_t""$ol_cv_db_db4" 1>&6
18723
18724         if test $ol_cv_db_db4 = yes ; then
18725                 ol_cv_lib_db=-ldb4
18726         fi
18727 fi
18728
18729 if test $ol_cv_lib_db = no ; then
18730         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18731 echo "configure:18732: checking for Berkeley DB link (-ldb)" >&5
18732 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18733   echo $ac_n "(cached) $ac_c" 1>&6
18734 else
18735   
18736         ol_DB_LIB=-ldb
18737         ol_LIBS=$LIBS
18738         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18739
18740         cat > conftest.$ac_ext <<EOF
18741 #line 18742 "configure"
18742 #include "confdefs.h"
18743
18744 #ifdef HAVE_DB_185_H
18745 # include <db_185.h>
18746 #else
18747 # include <db.h>
18748 #endif
18749
18750 #ifndef DB_VERSION_MAJOR
18751 # define DB_VERSION_MAJOR 1
18752 #endif
18753
18754 #ifndef NULL
18755 #define NULL ((void*)0)
18756 #endif
18757
18758 int main() {
18759
18760 #if DB_VERSION_MAJOR > 1
18761         {
18762                 char *version;
18763                 int major, minor, patch;
18764
18765                 version = db_version( &major, &minor, &patch );
18766
18767                 if( major != DB_VERSION_MAJOR ||
18768                         minor < DB_VERSION_MINOR )
18769                 {
18770                         printf("Berkeley DB version mismatch\n"
18771                                 "\texpected: %s\n\tgot: %s\n",
18772                                 DB_VERSION_STRING, version);
18773                         return 1;
18774                 }
18775         }
18776 #endif
18777
18778 #if DB_VERSION_MAJOR > 2
18779         db_env_create( NULL, 0 );
18780 #elif DB_VERSION_MAJOR > 1
18781         db_appexit( NULL );
18782 #else
18783         (void) dbopen( NULL, 0, 0, 0, NULL);
18784 #endif
18785
18786 ; return 0; }
18787 EOF
18788 if { (eval echo configure:18789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18789   rm -rf conftest*
18790   ol_cv_db_db=yes
18791 else
18792   echo "configure: failed program was:" >&5
18793   cat conftest.$ac_ext >&5
18794   rm -rf conftest*
18795   ol_cv_db_db=no
18796 fi
18797 rm -f conftest*
18798
18799         LIBS="$ol_LIBS"
18800
18801 fi
18802
18803 echo "$ac_t""$ol_cv_db_db" 1>&6
18804
18805         if test $ol_cv_db_db = yes ; then
18806                 ol_cv_lib_db=-ldb
18807         fi
18808 fi
18809
18810 if test $ol_cv_lib_db = no ; then
18811         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18812 echo "configure:18813: checking for Berkeley DB link (-ldb41)" >&5
18813 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18814   echo $ac_n "(cached) $ac_c" 1>&6
18815 else
18816   
18817         ol_DB_LIB=-ldb41
18818         ol_LIBS=$LIBS
18819         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18820
18821         cat > conftest.$ac_ext <<EOF
18822 #line 18823 "configure"
18823 #include "confdefs.h"
18824
18825 #ifdef HAVE_DB_185_H
18826 # include <db_185.h>
18827 #else
18828 # include <db.h>
18829 #endif
18830
18831 #ifndef DB_VERSION_MAJOR
18832 # define DB_VERSION_MAJOR 1
18833 #endif
18834
18835 #ifndef NULL
18836 #define NULL ((void*)0)
18837 #endif
18838
18839 int main() {
18840
18841 #if DB_VERSION_MAJOR > 1
18842         {
18843                 char *version;
18844                 int major, minor, patch;
18845
18846                 version = db_version( &major, &minor, &patch );
18847
18848                 if( major != DB_VERSION_MAJOR ||
18849                         minor < DB_VERSION_MINOR )
18850                 {
18851                         printf("Berkeley DB version mismatch\n"
18852                                 "\texpected: %s\n\tgot: %s\n",
18853                                 DB_VERSION_STRING, version);
18854                         return 1;
18855                 }
18856         }
18857 #endif
18858
18859 #if DB_VERSION_MAJOR > 2
18860         db_env_create( NULL, 0 );
18861 #elif DB_VERSION_MAJOR > 1
18862         db_appexit( NULL );
18863 #else
18864         (void) dbopen( NULL, 0, 0, 0, NULL);
18865 #endif
18866
18867 ; return 0; }
18868 EOF
18869 if { (eval echo configure:18870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18870   rm -rf conftest*
18871   ol_cv_db_db41=yes
18872 else
18873   echo "configure: failed program was:" >&5
18874   cat conftest.$ac_ext >&5
18875   rm -rf conftest*
18876   ol_cv_db_db41=no
18877 fi
18878 rm -f conftest*
18879
18880         LIBS="$ol_LIBS"
18881
18882 fi
18883
18884 echo "$ac_t""$ol_cv_db_db41" 1>&6
18885
18886         if test $ol_cv_db_db41 = yes ; then
18887                 ol_cv_lib_db=-ldb41
18888         fi
18889 fi
18890
18891 if test $ol_cv_lib_db = no ; then
18892         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18893 echo "configure:18894: checking for Berkeley DB link (-ldb-41)" >&5
18894 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18895   echo $ac_n "(cached) $ac_c" 1>&6
18896 else
18897   
18898         ol_DB_LIB=-ldb-41
18899         ol_LIBS=$LIBS
18900         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18901
18902         cat > conftest.$ac_ext <<EOF
18903 #line 18904 "configure"
18904 #include "confdefs.h"
18905
18906 #ifdef HAVE_DB_185_H
18907 # include <db_185.h>
18908 #else
18909 # include <db.h>
18910 #endif
18911
18912 #ifndef DB_VERSION_MAJOR
18913 # define DB_VERSION_MAJOR 1
18914 #endif
18915
18916 #ifndef NULL
18917 #define NULL ((void*)0)
18918 #endif
18919
18920 int main() {
18921
18922 #if DB_VERSION_MAJOR > 1
18923         {
18924                 char *version;
18925                 int major, minor, patch;
18926
18927                 version = db_version( &major, &minor, &patch );
18928
18929                 if( major != DB_VERSION_MAJOR ||
18930                         minor < DB_VERSION_MINOR )
18931                 {
18932                         printf("Berkeley DB version mismatch\n"
18933                                 "\texpected: %s\n\tgot: %s\n",
18934                                 DB_VERSION_STRING, version);
18935                         return 1;
18936                 }
18937         }
18938 #endif
18939
18940 #if DB_VERSION_MAJOR > 2
18941         db_env_create( NULL, 0 );
18942 #elif DB_VERSION_MAJOR > 1
18943         db_appexit( NULL );
18944 #else
18945         (void) dbopen( NULL, 0, 0, 0, NULL);
18946 #endif
18947
18948 ; return 0; }
18949 EOF
18950 if { (eval echo configure:18951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18951   rm -rf conftest*
18952   ol_cv_db_db_41=yes
18953 else
18954   echo "configure: failed program was:" >&5
18955   cat conftest.$ac_ext >&5
18956   rm -rf conftest*
18957   ol_cv_db_db_41=no
18958 fi
18959 rm -f conftest*
18960
18961         LIBS="$ol_LIBS"
18962
18963 fi
18964
18965 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18966
18967         if test $ol_cv_db_db_41 = yes ; then
18968                 ol_cv_lib_db=-ldb-41
18969         fi
18970 fi
18971
18972 if test $ol_cv_lib_db = no ; then
18973         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18974 echo "configure:18975: checking for Berkeley DB link (-ldb-4.1)" >&5
18975 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18976   echo $ac_n "(cached) $ac_c" 1>&6
18977 else
18978   
18979         ol_DB_LIB=-ldb-4.1
18980         ol_LIBS=$LIBS
18981         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18982
18983         cat > conftest.$ac_ext <<EOF
18984 #line 18985 "configure"
18985 #include "confdefs.h"
18986
18987 #ifdef HAVE_DB_185_H
18988 # include <db_185.h>
18989 #else
18990 # include <db.h>
18991 #endif
18992
18993 #ifndef DB_VERSION_MAJOR
18994 # define DB_VERSION_MAJOR 1
18995 #endif
18996
18997 #ifndef NULL
18998 #define NULL ((void*)0)
18999 #endif
19000
19001 int main() {
19002
19003 #if DB_VERSION_MAJOR > 1
19004         {
19005                 char *version;
19006                 int major, minor, patch;
19007
19008                 version = db_version( &major, &minor, &patch );
19009
19010                 if( major != DB_VERSION_MAJOR ||
19011                         minor < DB_VERSION_MINOR )
19012                 {
19013                         printf("Berkeley DB version mismatch\n"
19014                                 "\texpected: %s\n\tgot: %s\n",
19015                                 DB_VERSION_STRING, version);
19016                         return 1;
19017                 }
19018         }
19019 #endif
19020
19021 #if DB_VERSION_MAJOR > 2
19022         db_env_create( NULL, 0 );
19023 #elif DB_VERSION_MAJOR > 1
19024         db_appexit( NULL );
19025 #else
19026         (void) dbopen( NULL, 0, 0, 0, NULL);
19027 #endif
19028
19029 ; return 0; }
19030 EOF
19031 if { (eval echo configure:19032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19032   rm -rf conftest*
19033   ol_cv_db_db_4_dot_1=yes
19034 else
19035   echo "configure: failed program was:" >&5
19036   cat conftest.$ac_ext >&5
19037   rm -rf conftest*
19038   ol_cv_db_db_4_dot_1=no
19039 fi
19040 rm -f conftest*
19041
19042         LIBS="$ol_LIBS"
19043
19044 fi
19045
19046 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19047
19048         if test $ol_cv_db_db_4_dot_1 = yes ; then
19049                 ol_cv_lib_db=-ldb-4.1
19050         fi
19051 fi
19052
19053 if test $ol_cv_lib_db = no ; then
19054         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19055 echo "configure:19056: checking for Berkeley DB link (-ldb-4-1)" >&5
19056 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19057   echo $ac_n "(cached) $ac_c" 1>&6
19058 else
19059   
19060         ol_DB_LIB=-ldb-4-1
19061         ol_LIBS=$LIBS
19062         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19063
19064         cat > conftest.$ac_ext <<EOF
19065 #line 19066 "configure"
19066 #include "confdefs.h"
19067
19068 #ifdef HAVE_DB_185_H
19069 # include <db_185.h>
19070 #else
19071 # include <db.h>
19072 #endif
19073
19074 #ifndef DB_VERSION_MAJOR
19075 # define DB_VERSION_MAJOR 1
19076 #endif
19077
19078 #ifndef NULL
19079 #define NULL ((void*)0)
19080 #endif
19081
19082 int main() {
19083
19084 #if DB_VERSION_MAJOR > 1
19085         {
19086                 char *version;
19087                 int major, minor, patch;
19088
19089                 version = db_version( &major, &minor, &patch );
19090
19091                 if( major != DB_VERSION_MAJOR ||
19092                         minor < DB_VERSION_MINOR )
19093                 {
19094                         printf("Berkeley DB version mismatch\n"
19095                                 "\texpected: %s\n\tgot: %s\n",
19096                                 DB_VERSION_STRING, version);
19097                         return 1;
19098                 }
19099         }
19100 #endif
19101
19102 #if DB_VERSION_MAJOR > 2
19103         db_env_create( NULL, 0 );
19104 #elif DB_VERSION_MAJOR > 1
19105         db_appexit( NULL );
19106 #else
19107         (void) dbopen( NULL, 0, 0, 0, NULL);
19108 #endif
19109
19110 ; return 0; }
19111 EOF
19112 if { (eval echo configure:19113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19113   rm -rf conftest*
19114   ol_cv_db_db_4_1=yes
19115 else
19116   echo "configure: failed program was:" >&5
19117   cat conftest.$ac_ext >&5
19118   rm -rf conftest*
19119   ol_cv_db_db_4_1=no
19120 fi
19121 rm -f conftest*
19122
19123         LIBS="$ol_LIBS"
19124
19125 fi
19126
19127 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19128
19129         if test $ol_cv_db_db_4_1 = yes ; then
19130                 ol_cv_lib_db=-ldb-4-1
19131         fi
19132 fi
19133
19134 if test $ol_cv_lib_db = no ; then
19135         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19136 echo "configure:19137: checking for Berkeley DB link (-ldb3)" >&5
19137 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19138   echo $ac_n "(cached) $ac_c" 1>&6
19139 else
19140   
19141         ol_DB_LIB=-ldb3
19142         ol_LIBS=$LIBS
19143         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19144
19145         cat > conftest.$ac_ext <<EOF
19146 #line 19147 "configure"
19147 #include "confdefs.h"
19148
19149 #ifdef HAVE_DB_185_H
19150 # include <db_185.h>
19151 #else
19152 # include <db.h>
19153 #endif
19154
19155 #ifndef DB_VERSION_MAJOR
19156 # define DB_VERSION_MAJOR 1
19157 #endif
19158
19159 #ifndef NULL
19160 #define NULL ((void*)0)
19161 #endif
19162
19163 int main() {
19164
19165 #if DB_VERSION_MAJOR > 1
19166         {
19167                 char *version;
19168                 int major, minor, patch;
19169
19170                 version = db_version( &major, &minor, &patch );
19171
19172                 if( major != DB_VERSION_MAJOR ||
19173                         minor < DB_VERSION_MINOR )
19174                 {
19175                         printf("Berkeley DB version mismatch\n"
19176                                 "\texpected: %s\n\tgot: %s\n",
19177                                 DB_VERSION_STRING, version);
19178                         return 1;
19179                 }
19180         }
19181 #endif
19182
19183 #if DB_VERSION_MAJOR > 2
19184         db_env_create( NULL, 0 );
19185 #elif DB_VERSION_MAJOR > 1
19186         db_appexit( NULL );
19187 #else
19188         (void) dbopen( NULL, 0, 0, 0, NULL);
19189 #endif
19190
19191 ; return 0; }
19192 EOF
19193 if { (eval echo configure:19194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19194   rm -rf conftest*
19195   ol_cv_db_db3=yes
19196 else
19197   echo "configure: failed program was:" >&5
19198   cat conftest.$ac_ext >&5
19199   rm -rf conftest*
19200   ol_cv_db_db3=no
19201 fi
19202 rm -f conftest*
19203
19204         LIBS="$ol_LIBS"
19205
19206 fi
19207
19208 echo "$ac_t""$ol_cv_db_db3" 1>&6
19209
19210         if test $ol_cv_db_db3 = yes ; then
19211                 ol_cv_lib_db=-ldb3
19212         fi
19213 fi
19214
19215 if test $ol_cv_lib_db = no ; then
19216         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19217 echo "configure:19218: checking for Berkeley DB link (-ldb-3)" >&5
19218 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19219   echo $ac_n "(cached) $ac_c" 1>&6
19220 else
19221   
19222         ol_DB_LIB=-ldb-3
19223         ol_LIBS=$LIBS
19224         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19225
19226         cat > conftest.$ac_ext <<EOF
19227 #line 19228 "configure"
19228 #include "confdefs.h"
19229
19230 #ifdef HAVE_DB_185_H
19231 # include <db_185.h>
19232 #else
19233 # include <db.h>
19234 #endif
19235
19236 #ifndef DB_VERSION_MAJOR
19237 # define DB_VERSION_MAJOR 1
19238 #endif
19239
19240 #ifndef NULL
19241 #define NULL ((void*)0)
19242 #endif
19243
19244 int main() {
19245
19246 #if DB_VERSION_MAJOR > 1
19247         {
19248                 char *version;
19249                 int major, minor, patch;
19250
19251                 version = db_version( &major, &minor, &patch );
19252
19253                 if( major != DB_VERSION_MAJOR ||
19254                         minor < DB_VERSION_MINOR )
19255                 {
19256                         printf("Berkeley DB version mismatch\n"
19257                                 "\texpected: %s\n\tgot: %s\n",
19258                                 DB_VERSION_STRING, version);
19259                         return 1;
19260                 }
19261         }
19262 #endif
19263
19264 #if DB_VERSION_MAJOR > 2
19265         db_env_create( NULL, 0 );
19266 #elif DB_VERSION_MAJOR > 1
19267         db_appexit( NULL );
19268 #else
19269         (void) dbopen( NULL, 0, 0, 0, NULL);
19270 #endif
19271
19272 ; return 0; }
19273 EOF
19274 if { (eval echo configure:19275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19275   rm -rf conftest*
19276   ol_cv_db_db_3=yes
19277 else
19278   echo "configure: failed program was:" >&5
19279   cat conftest.$ac_ext >&5
19280   rm -rf conftest*
19281   ol_cv_db_db_3=no
19282 fi
19283 rm -f conftest*
19284
19285         LIBS="$ol_LIBS"
19286
19287 fi
19288
19289 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19290
19291         if test $ol_cv_db_db_3 = yes ; then
19292                 ol_cv_lib_db=-ldb-3
19293         fi
19294 fi
19295
19296 if test $ol_cv_lib_db = no ; then
19297         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19298 echo "configure:19299: checking for Berkeley DB link (-ldb2)" >&5
19299 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19300   echo $ac_n "(cached) $ac_c" 1>&6
19301 else
19302   
19303         ol_DB_LIB=-ldb2
19304         ol_LIBS=$LIBS
19305         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19306
19307         cat > conftest.$ac_ext <<EOF
19308 #line 19309 "configure"
19309 #include "confdefs.h"
19310
19311 #ifdef HAVE_DB_185_H
19312 # include <db_185.h>
19313 #else
19314 # include <db.h>
19315 #endif
19316
19317 #ifndef DB_VERSION_MAJOR
19318 # define DB_VERSION_MAJOR 1
19319 #endif
19320
19321 #ifndef NULL
19322 #define NULL ((void*)0)
19323 #endif
19324
19325 int main() {
19326
19327 #if DB_VERSION_MAJOR > 1
19328         {
19329                 char *version;
19330                 int major, minor, patch;
19331
19332                 version = db_version( &major, &minor, &patch );
19333
19334                 if( major != DB_VERSION_MAJOR ||
19335                         minor < DB_VERSION_MINOR )
19336                 {
19337                         printf("Berkeley DB version mismatch\n"
19338                                 "\texpected: %s\n\tgot: %s\n",
19339                                 DB_VERSION_STRING, version);
19340                         return 1;
19341                 }
19342         }
19343 #endif
19344
19345 #if DB_VERSION_MAJOR > 2
19346         db_env_create( NULL, 0 );
19347 #elif DB_VERSION_MAJOR > 1
19348         db_appexit( NULL );
19349 #else
19350         (void) dbopen( NULL, 0, 0, 0, NULL);
19351 #endif
19352
19353 ; return 0; }
19354 EOF
19355 if { (eval echo configure:19356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19356   rm -rf conftest*
19357   ol_cv_db_db2=yes
19358 else
19359   echo "configure: failed program was:" >&5
19360   cat conftest.$ac_ext >&5
19361   rm -rf conftest*
19362   ol_cv_db_db2=no
19363 fi
19364 rm -f conftest*
19365
19366         LIBS="$ol_LIBS"
19367
19368 fi
19369
19370 echo "$ac_t""$ol_cv_db_db2" 1>&6
19371
19372         if test $ol_cv_db_db2 = yes ; then
19373                 ol_cv_lib_db=-ldb2
19374         fi
19375 fi
19376
19377 if test $ol_cv_lib_db = no ; then
19378         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19379 echo "configure:19380: checking for Berkeley DB link (-ldb-2)" >&5
19380 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19381   echo $ac_n "(cached) $ac_c" 1>&6
19382 else
19383   
19384         ol_DB_LIB=-ldb-2
19385         ol_LIBS=$LIBS
19386         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19387
19388         cat > conftest.$ac_ext <<EOF
19389 #line 19390 "configure"
19390 #include "confdefs.h"
19391
19392 #ifdef HAVE_DB_185_H
19393 # include <db_185.h>
19394 #else
19395 # include <db.h>
19396 #endif
19397
19398 #ifndef DB_VERSION_MAJOR
19399 # define DB_VERSION_MAJOR 1
19400 #endif
19401
19402 #ifndef NULL
19403 #define NULL ((void*)0)
19404 #endif
19405
19406 int main() {
19407
19408 #if DB_VERSION_MAJOR > 1
19409         {
19410                 char *version;
19411                 int major, minor, patch;
19412
19413                 version = db_version( &major, &minor, &patch );
19414
19415                 if( major != DB_VERSION_MAJOR ||
19416                         minor < DB_VERSION_MINOR )
19417                 {
19418                         printf("Berkeley DB version mismatch\n"
19419                                 "\texpected: %s\n\tgot: %s\n",
19420                                 DB_VERSION_STRING, version);
19421                         return 1;
19422                 }
19423         }
19424 #endif
19425
19426 #if DB_VERSION_MAJOR > 2
19427         db_env_create( NULL, 0 );
19428 #elif DB_VERSION_MAJOR > 1
19429         db_appexit( NULL );
19430 #else
19431         (void) dbopen( NULL, 0, 0, 0, NULL);
19432 #endif
19433
19434 ; return 0; }
19435 EOF
19436 if { (eval echo configure:19437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19437   rm -rf conftest*
19438   ol_cv_db_db_2=yes
19439 else
19440   echo "configure: failed program was:" >&5
19441   cat conftest.$ac_ext >&5
19442   rm -rf conftest*
19443   ol_cv_db_db_2=no
19444 fi
19445 rm -f conftest*
19446
19447         LIBS="$ol_LIBS"
19448
19449 fi
19450
19451 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19452
19453         if test $ol_cv_db_db_2 = yes ; then
19454                 ol_cv_lib_db=-ldb-2
19455         fi
19456 fi
19457
19458 if test $ol_cv_lib_db = no ; then
19459         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19460 echo "configure:19461: checking for Berkeley DB link (-ldb1)" >&5
19461 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19462   echo $ac_n "(cached) $ac_c" 1>&6
19463 else
19464   
19465         ol_DB_LIB=-ldb1
19466         ol_LIBS=$LIBS
19467         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19468
19469         cat > conftest.$ac_ext <<EOF
19470 #line 19471 "configure"
19471 #include "confdefs.h"
19472
19473 #ifdef HAVE_DB_185_H
19474 # include <db_185.h>
19475 #else
19476 # include <db.h>
19477 #endif
19478
19479 #ifndef DB_VERSION_MAJOR
19480 # define DB_VERSION_MAJOR 1
19481 #endif
19482
19483 #ifndef NULL
19484 #define NULL ((void*)0)
19485 #endif
19486
19487 int main() {
19488
19489 #if DB_VERSION_MAJOR > 1
19490         {
19491                 char *version;
19492                 int major, minor, patch;
19493
19494                 version = db_version( &major, &minor, &patch );
19495
19496                 if( major != DB_VERSION_MAJOR ||
19497                         minor < DB_VERSION_MINOR )
19498                 {
19499                         printf("Berkeley DB version mismatch\n"
19500                                 "\texpected: %s\n\tgot: %s\n",
19501                                 DB_VERSION_STRING, version);
19502                         return 1;
19503                 }
19504         }
19505 #endif
19506
19507 #if DB_VERSION_MAJOR > 2
19508         db_env_create( NULL, 0 );
19509 #elif DB_VERSION_MAJOR > 1
19510         db_appexit( NULL );
19511 #else
19512         (void) dbopen( NULL, 0, 0, 0, NULL);
19513 #endif
19514
19515 ; return 0; }
19516 EOF
19517 if { (eval echo configure:19518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19518   rm -rf conftest*
19519   ol_cv_db_db1=yes
19520 else
19521   echo "configure: failed program was:" >&5
19522   cat conftest.$ac_ext >&5
19523   rm -rf conftest*
19524   ol_cv_db_db1=no
19525 fi
19526 rm -f conftest*
19527
19528         LIBS="$ol_LIBS"
19529
19530 fi
19531
19532 echo "$ac_t""$ol_cv_db_db1" 1>&6
19533
19534         if test $ol_cv_db_db1 = yes ; then
19535                 ol_cv_lib_db=-ldb1
19536         fi
19537 fi
19538
19539 if test $ol_cv_lib_db = no ; then
19540         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19541 echo "configure:19542: checking for Berkeley DB link (-ldb-1)" >&5
19542 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19543   echo $ac_n "(cached) $ac_c" 1>&6
19544 else
19545   
19546         ol_DB_LIB=-ldb-1
19547         ol_LIBS=$LIBS
19548         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19549
19550         cat > conftest.$ac_ext <<EOF
19551 #line 19552 "configure"
19552 #include "confdefs.h"
19553
19554 #ifdef HAVE_DB_185_H
19555 # include <db_185.h>
19556 #else
19557 # include <db.h>
19558 #endif
19559
19560 #ifndef DB_VERSION_MAJOR
19561 # define DB_VERSION_MAJOR 1
19562 #endif
19563
19564 #ifndef NULL
19565 #define NULL ((void*)0)
19566 #endif
19567
19568 int main() {
19569
19570 #if DB_VERSION_MAJOR > 1
19571         {
19572                 char *version;
19573                 int major, minor, patch;
19574
19575                 version = db_version( &major, &minor, &patch );
19576
19577                 if( major != DB_VERSION_MAJOR ||
19578                         minor < DB_VERSION_MINOR )
19579                 {
19580                         printf("Berkeley DB version mismatch\n"
19581                                 "\texpected: %s\n\tgot: %s\n",
19582                                 DB_VERSION_STRING, version);
19583                         return 1;
19584                 }
19585         }
19586 #endif
19587
19588 #if DB_VERSION_MAJOR > 2
19589         db_env_create( NULL, 0 );
19590 #elif DB_VERSION_MAJOR > 1
19591         db_appexit( NULL );
19592 #else
19593         (void) dbopen( NULL, 0, 0, 0, NULL);
19594 #endif
19595
19596 ; return 0; }
19597 EOF
19598 if { (eval echo configure:19599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19599   rm -rf conftest*
19600   ol_cv_db_db_1=yes
19601 else
19602   echo "configure: failed program was:" >&5
19603   cat conftest.$ac_ext >&5
19604   rm -rf conftest*
19605   ol_cv_db_db_1=no
19606 fi
19607 rm -f conftest*
19608
19609         LIBS="$ol_LIBS"
19610
19611 fi
19612
19613 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19614
19615         if test $ol_cv_db_db_1 = yes ; then
19616                 ol_cv_lib_db=-ldb-1
19617         fi
19618 fi
19619
19620
19621         if test "$ol_cv_lib_db" != no ; then
19622                 ol_cv_berkeley_db=yes
19623                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19624 echo "configure:19625: checking for Berkeley DB thread support" >&5
19625 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19626   echo $ac_n "(cached) $ac_c" 1>&6
19627 else
19628   
19629         ol_LIBS="$LIBS"
19630         LIBS="$LTHREAD_LIBS $LIBS"
19631         if test $ol_cv_lib_db != yes ; then
19632                 LIBS="$ol_cv_lib_db $LIBS"
19633         fi
19634
19635         if test "$cross_compiling" = yes; then
19636   ol_cv_berkeley_db_thread=cross
19637 else
19638   cat > conftest.$ac_ext <<EOF
19639 #line 19640 "configure"
19640 #include "confdefs.h"
19641
19642 #ifdef HAVE_DB_185_H
19643         choke me;
19644 #else
19645 #include <db.h>
19646 #endif
19647 #ifndef NULL
19648 #define NULL ((void *)0)
19649 #endif
19650 main()
19651 {
19652         int rc;
19653         u_int32_t flags = DB_CREATE |
19654 #ifdef DB_PRIVATE
19655                 DB_PRIVATE |
19656 #endif
19657                 DB_THREAD;
19658
19659 #if DB_VERSION_MAJOR > 2
19660         DB_ENV *env = NULL;
19661
19662         rc = db_env_create( &env, 0 );
19663
19664         flags |= DB_INIT_MPOOL;
19665 #ifdef DB_MPOOL_PRIVATE
19666         flags |= DB_MPOOL_PRIVATE;
19667 #endif
19668
19669         if( rc ) {
19670                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19671                 return rc;
19672         }
19673
19674 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19675         rc = env->open( env, NULL, flags, 0 );
19676 #else
19677         rc = env->open( env, NULL, NULL, flags, 0 );
19678 #endif
19679
19680         if ( rc == 0 ) {
19681                 rc = env->close( env, 0 );
19682         }
19683
19684         if( rc ) {
19685                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19686                 return rc;
19687         }
19688
19689 #else
19690         DB_ENV env;
19691         memset( &env, '\0', sizeof(env) );
19692
19693         rc = db_appinit( NULL, NULL, &env, flags );
19694
19695         if( rc == 0 ) {
19696                 db_appexit( &env );
19697         }
19698
19699         unlink("__db_mpool.share");
19700         unlink("__db_lock.share");
19701 #endif
19702
19703         return rc;
19704 }
19705 EOF
19706 if { (eval echo configure:19707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19707 then
19708   ol_cv_berkeley_db_thread=yes
19709 else
19710   echo "configure: failed program was:" >&5
19711   cat conftest.$ac_ext >&5
19712   rm -fr conftest*
19713   ol_cv_berkeley_db_thread=no
19714 fi
19715 rm -fr conftest*
19716 fi
19717
19718
19719         LIBS="$ol_LIBS"
19720
19721 fi
19722
19723 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19724
19725         if test $ol_cv_berkeley_db_thread != no ; then
19726                 cat >> confdefs.h <<\EOF
19727 #define HAVE_BERKELEY_DB_THREAD 1
19728 EOF
19729
19730         fi
19731
19732         fi
19733 fi
19734
19735         fi
19736
19737         if test $ol_cv_berkeley_db != no ; then
19738                 cat >> confdefs.h <<\EOF
19739 #define HAVE_BERKELEY_DB 1
19740 EOF
19741
19742
19743                 ol_link_ldbm=berkeley
19744                 ol_with_ldbm_api=berkeley
19745
19746                 if test $ol_with_ldbm_type = hash ; then
19747                         cat >> confdefs.h <<\EOF
19748 #define LDBM_USE_DBHASH 1
19749 EOF
19750
19751                 else
19752                         cat >> confdefs.h <<\EOF
19753 #define LDBM_USE_DBBTREE 1
19754 EOF
19755
19756                 fi
19757
19758                                                 if test $ol_cv_lib_db != yes ; then
19759                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19760                 fi
19761         fi
19762 fi
19763
19764 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19765         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19766 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19767         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19768 echo "configure:19769: checking Berkeley DB version for BDB backend" >&5
19769 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19770   echo $ac_n "(cached) $ac_c" 1>&6
19771 else
19772   
19773         cat > conftest.$ac_ext <<EOF
19774 #line 19775 "configure"
19775 #include "confdefs.h"
19776
19777 #include <db.h>
19778
19779  /* this check could be improved */
19780 #ifndef DB_VERSION_MAJOR
19781 #       define DB_VERSION_MAJOR 1
19782 #endif
19783 #ifndef DB_VERSION_MINOR
19784 #       define DB_VERSION_MINOR 0
19785 #endif
19786
19787 /* require 4.2 or later */
19788 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19789         __db_version_compat
19790 #endif
19791         
19792 EOF
19793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19794   egrep "__db_version_compat" >/dev/null 2>&1; then
19795   rm -rf conftest*
19796   ol_cv_bdb_compat=yes
19797 else
19798   rm -rf conftest*
19799   ol_cv_bdb_compat=no
19800 fi
19801 rm -f conftest*
19802
19803 fi
19804
19805 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19806
19807
19808         if test $ol_cv_bdb_compat = yes ; then
19809                 ol_enable_bdb=yes
19810         elif test $ol_enable_bdb = yes ; then
19811                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19812         else
19813                 ol_enable_bdb=no
19814         fi
19815 fi
19816 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19817         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19818 fi
19819
19820 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19821         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19822         ol_with_ldbm_api=none
19823 fi
19824
19825 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19826         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19827 echo "configure:19828: checking for MDBM library" >&5
19828 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19829   echo $ac_n "(cached) $ac_c" 1>&6
19830 else
19831         ol_LIBS="$LIBS"
19832         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19833 echo "configure:19834: checking for mdbm_set_chain" >&5
19834 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19835   echo $ac_n "(cached) $ac_c" 1>&6
19836 else
19837   cat > conftest.$ac_ext <<EOF
19838 #line 19839 "configure"
19839 #include "confdefs.h"
19840 /* System header to define __stub macros and hopefully few prototypes,
19841     which can conflict with char mdbm_set_chain(); below.  */
19842 #include <assert.h>
19843 /* Override any gcc2 internal prototype to avoid an error.  */
19844 /* We use char because int might match the return type of a gcc2
19845     builtin and then its argument prototype would still apply.  */
19846 char mdbm_set_chain();
19847 char (*f)();
19848
19849 int main() {
19850
19851 /* The GNU C library defines this for functions which it implements
19852     to always fail with ENOSYS.  Some functions are actually named
19853     something starting with __ and the normal name is an alias.  */
19854 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19855 choke me
19856 #else
19857 f = mdbm_set_chain;
19858 #endif
19859
19860 ; return 0; }
19861 EOF
19862 if { (eval echo configure:19863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19863   rm -rf conftest*
19864   eval "ac_cv_func_mdbm_set_chain=yes"
19865 else
19866   echo "configure: failed program was:" >&5
19867   cat conftest.$ac_ext >&5
19868   rm -rf conftest*
19869   eval "ac_cv_func_mdbm_set_chain=no"
19870 fi
19871 rm -f conftest*
19872 fi
19873
19874 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19875   echo "$ac_t""yes" 1>&6
19876   ol_cv_lib_mdbm=yes
19877 else
19878   echo "$ac_t""no" 1>&6
19879
19880                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19881 echo "configure:19882: checking for mdbm_set_chain in -lmdbm" >&5
19882 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19884   echo $ac_n "(cached) $ac_c" 1>&6
19885 else
19886   ac_save_LIBS="$LIBS"
19887 LIBS="-lmdbm  $LIBS"
19888 cat > conftest.$ac_ext <<EOF
19889 #line 19890 "configure"
19890 #include "confdefs.h"
19891 /* Override any gcc2 internal prototype to avoid an error.  */
19892 /* We use char because int might match the return type of a gcc2
19893     builtin and then its argument prototype would still apply.  */
19894 char mdbm_set_chain();
19895
19896 int main() {
19897 mdbm_set_chain()
19898 ; return 0; }
19899 EOF
19900 if { (eval echo configure:19901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19901   rm -rf conftest*
19902   eval "ac_cv_lib_$ac_lib_var=yes"
19903 else
19904   echo "configure: failed program was:" >&5
19905   cat conftest.$ac_ext >&5
19906   rm -rf conftest*
19907   eval "ac_cv_lib_$ac_lib_var=no"
19908 fi
19909 rm -f conftest*
19910 LIBS="$ac_save_LIBS"
19911
19912 fi
19913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19914   echo "$ac_t""yes" 1>&6
19915   ol_cv_lib_mdbm=-lmdbm
19916 else
19917   echo "$ac_t""no" 1>&6
19918 ol_cv_lib_mdbm=no
19919 fi
19920
19921         
19922 fi
19923
19924         LIBS="$ol_LIBS"
19925
19926 fi
19927
19928 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19929
19930
19931  for ac_hdr in mdbm.h
19932 do
19933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19935 echo "configure:19936: checking for $ac_hdr" >&5
19936 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19937   echo $ac_n "(cached) $ac_c" 1>&6
19938 else
19939   cat > conftest.$ac_ext <<EOF
19940 #line 19941 "configure"
19941 #include "confdefs.h"
19942 #include <$ac_hdr>
19943 EOF
19944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19945 { (eval echo configure:19946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19947 if test -z "$ac_err"; then
19948   rm -rf conftest*
19949   eval "ac_cv_header_$ac_safe=yes"
19950 else
19951   echo "$ac_err" >&5
19952   echo "configure: failed program was:" >&5
19953   cat conftest.$ac_ext >&5
19954   rm -rf conftest*
19955   eval "ac_cv_header_$ac_safe=no"
19956 fi
19957 rm -f conftest*
19958 fi
19959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19960   echo "$ac_t""yes" 1>&6
19961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19962   cat >> confdefs.h <<EOF
19963 #define $ac_tr_hdr 1
19964 EOF
19965  
19966 else
19967   echo "$ac_t""no" 1>&6
19968 fi
19969 done
19970
19971  echo $ac_n "checking for db""... $ac_c" 1>&6
19972 echo "configure:19973: checking for db" >&5
19973 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19974   echo $ac_n "(cached) $ac_c" 1>&6
19975 else
19976   
19977         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19978                 ol_cv_mdbm=no
19979         else
19980                 ol_cv_mdbm=yes
19981         fi
19982
19983 fi
19984
19985 echo "$ac_t""$ol_cv_mdbm" 1>&6
19986  if test $ol_cv_mdbm = yes ; then
19987         cat >> confdefs.h <<\EOF
19988 #define HAVE_MDBM 1
19989 EOF
19990
19991  fi
19992
19993
19994         if test $ol_cv_mdbm = yes ; then
19995                 ol_link_ldbm=mdbm
19996                 ol_with_ldbm_api=mdbm
19997                 if test $ol_cv_lib_mdbm != yes ; then
19998                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19999                 fi
20000         fi
20001 fi
20002
20003 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20004         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20005 echo "configure:20006: checking for GDBM library" >&5
20006 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20007   echo $ac_n "(cached) $ac_c" 1>&6
20008 else
20009         ol_LIBS="$LIBS"
20010         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20011 echo "configure:20012: checking for gdbm_open" >&5
20012 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20013   echo $ac_n "(cached) $ac_c" 1>&6
20014 else
20015   cat > conftest.$ac_ext <<EOF
20016 #line 20017 "configure"
20017 #include "confdefs.h"
20018 /* System header to define __stub macros and hopefully few prototypes,
20019     which can conflict with char gdbm_open(); below.  */
20020 #include <assert.h>
20021 /* Override any gcc2 internal prototype to avoid an error.  */
20022 /* We use char because int might match the return type of a gcc2
20023     builtin and then its argument prototype would still apply.  */
20024 char gdbm_open();
20025 char (*f)();
20026
20027 int main() {
20028
20029 /* The GNU C library defines this for functions which it implements
20030     to always fail with ENOSYS.  Some functions are actually named
20031     something starting with __ and the normal name is an alias.  */
20032 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20033 choke me
20034 #else
20035 f = gdbm_open;
20036 #endif
20037
20038 ; return 0; }
20039 EOF
20040 if { (eval echo configure:20041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20041   rm -rf conftest*
20042   eval "ac_cv_func_gdbm_open=yes"
20043 else
20044   echo "configure: failed program was:" >&5
20045   cat conftest.$ac_ext >&5
20046   rm -rf conftest*
20047   eval "ac_cv_func_gdbm_open=no"
20048 fi
20049 rm -f conftest*
20050 fi
20051
20052 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20053   echo "$ac_t""yes" 1>&6
20054   ol_cv_lib_gdbm=yes
20055 else
20056   echo "$ac_t""no" 1>&6
20057
20058                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20059 echo "configure:20060: checking for gdbm_open in -lgdbm" >&5
20060 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20062   echo $ac_n "(cached) $ac_c" 1>&6
20063 else
20064   ac_save_LIBS="$LIBS"
20065 LIBS="-lgdbm  $LIBS"
20066 cat > conftest.$ac_ext <<EOF
20067 #line 20068 "configure"
20068 #include "confdefs.h"
20069 /* Override any gcc2 internal prototype to avoid an error.  */
20070 /* We use char because int might match the return type of a gcc2
20071     builtin and then its argument prototype would still apply.  */
20072 char gdbm_open();
20073
20074 int main() {
20075 gdbm_open()
20076 ; return 0; }
20077 EOF
20078 if { (eval echo configure:20079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20079   rm -rf conftest*
20080   eval "ac_cv_lib_$ac_lib_var=yes"
20081 else
20082   echo "configure: failed program was:" >&5
20083   cat conftest.$ac_ext >&5
20084   rm -rf conftest*
20085   eval "ac_cv_lib_$ac_lib_var=no"
20086 fi
20087 rm -f conftest*
20088 LIBS="$ac_save_LIBS"
20089
20090 fi
20091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20092   echo "$ac_t""yes" 1>&6
20093   ol_cv_lib_gdbm=-lgdbm
20094 else
20095   echo "$ac_t""no" 1>&6
20096 ol_cv_lib_gdbm=no
20097 fi
20098
20099         
20100 fi
20101
20102         LIBS="$ol_LIBS"
20103
20104 fi
20105
20106 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20107
20108
20109  for ac_hdr in gdbm.h
20110 do
20111 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20112 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20113 echo "configure:20114: checking for $ac_hdr" >&5
20114 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20115   echo $ac_n "(cached) $ac_c" 1>&6
20116 else
20117   cat > conftest.$ac_ext <<EOF
20118 #line 20119 "configure"
20119 #include "confdefs.h"
20120 #include <$ac_hdr>
20121 EOF
20122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20123 { (eval echo configure:20124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20125 if test -z "$ac_err"; then
20126   rm -rf conftest*
20127   eval "ac_cv_header_$ac_safe=yes"
20128 else
20129   echo "$ac_err" >&5
20130   echo "configure: failed program was:" >&5
20131   cat conftest.$ac_ext >&5
20132   rm -rf conftest*
20133   eval "ac_cv_header_$ac_safe=no"
20134 fi
20135 rm -f conftest*
20136 fi
20137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20138   echo "$ac_t""yes" 1>&6
20139     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20140   cat >> confdefs.h <<EOF
20141 #define $ac_tr_hdr 1
20142 EOF
20143  
20144 else
20145   echo "$ac_t""no" 1>&6
20146 fi
20147 done
20148
20149  echo $ac_n "checking for db""... $ac_c" 1>&6
20150 echo "configure:20151: checking for db" >&5
20151 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20152   echo $ac_n "(cached) $ac_c" 1>&6
20153 else
20154   
20155         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20156                 ol_cv_gdbm=no
20157         else
20158                 ol_cv_gdbm=yes
20159         fi
20160
20161 fi
20162
20163 echo "$ac_t""$ol_cv_gdbm" 1>&6
20164  if test $ol_cv_gdbm = yes ; then
20165         cat >> confdefs.h <<\EOF
20166 #define HAVE_GDBM 1
20167 EOF
20168
20169  fi
20170
20171
20172         if test $ol_cv_gdbm = yes ; then
20173                 ol_link_ldbm=gdbm
20174                 ol_with_ldbm_api=gdbm
20175
20176                 if test $ol_cv_lib_gdbm != yes ; then
20177                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20178                 fi
20179         fi
20180 fi
20181
20182 if test $ol_with_ldbm_api = ndbm ; then
20183         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20184 echo "configure:20185: checking for NDBM library" >&5
20185 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20186   echo $ac_n "(cached) $ac_c" 1>&6
20187 else
20188         ol_LIBS="$LIBS"
20189         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20190 echo "configure:20191: checking for dbm_open" >&5
20191 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20192   echo $ac_n "(cached) $ac_c" 1>&6
20193 else
20194   cat > conftest.$ac_ext <<EOF
20195 #line 20196 "configure"
20196 #include "confdefs.h"
20197 /* System header to define __stub macros and hopefully few prototypes,
20198     which can conflict with char dbm_open(); below.  */
20199 #include <assert.h>
20200 /* Override any gcc2 internal prototype to avoid an error.  */
20201 /* We use char because int might match the return type of a gcc2
20202     builtin and then its argument prototype would still apply.  */
20203 char dbm_open();
20204 char (*f)();
20205
20206 int main() {
20207
20208 /* The GNU C library defines this for functions which it implements
20209     to always fail with ENOSYS.  Some functions are actually named
20210     something starting with __ and the normal name is an alias.  */
20211 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20212 choke me
20213 #else
20214 f = dbm_open;
20215 #endif
20216
20217 ; return 0; }
20218 EOF
20219 if { (eval echo configure:20220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20220   rm -rf conftest*
20221   eval "ac_cv_func_dbm_open=yes"
20222 else
20223   echo "configure: failed program was:" >&5
20224   cat conftest.$ac_ext >&5
20225   rm -rf conftest*
20226   eval "ac_cv_func_dbm_open=no"
20227 fi
20228 rm -f conftest*
20229 fi
20230
20231 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20232   echo "$ac_t""yes" 1>&6
20233   ol_cv_lib_ndbm=yes
20234 else
20235   echo "$ac_t""no" 1>&6
20236
20237                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20238 echo "configure:20239: checking for dbm_open in -lndbm" >&5
20239 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20241   echo $ac_n "(cached) $ac_c" 1>&6
20242 else
20243   ac_save_LIBS="$LIBS"
20244 LIBS="-lndbm  $LIBS"
20245 cat > conftest.$ac_ext <<EOF
20246 #line 20247 "configure"
20247 #include "confdefs.h"
20248 /* Override any gcc2 internal prototype to avoid an error.  */
20249 /* We use char because int might match the return type of a gcc2
20250     builtin and then its argument prototype would still apply.  */
20251 char dbm_open();
20252
20253 int main() {
20254 dbm_open()
20255 ; return 0; }
20256 EOF
20257 if { (eval echo configure:20258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20258   rm -rf conftest*
20259   eval "ac_cv_lib_$ac_lib_var=yes"
20260 else
20261   echo "configure: failed program was:" >&5
20262   cat conftest.$ac_ext >&5
20263   rm -rf conftest*
20264   eval "ac_cv_lib_$ac_lib_var=no"
20265 fi
20266 rm -f conftest*
20267 LIBS="$ac_save_LIBS"
20268
20269 fi
20270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20271   echo "$ac_t""yes" 1>&6
20272   ol_cv_lib_ndbm=-lndbm
20273 else
20274   echo "$ac_t""no" 1>&6
20275
20276                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20277 echo "configure:20278: checking for dbm_open in -ldbm" >&5
20278 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20280   echo $ac_n "(cached) $ac_c" 1>&6
20281 else
20282   ac_save_LIBS="$LIBS"
20283 LIBS="-ldbm  $LIBS"
20284 cat > conftest.$ac_ext <<EOF
20285 #line 20286 "configure"
20286 #include "confdefs.h"
20287 /* Override any gcc2 internal prototype to avoid an error.  */
20288 /* We use char because int might match the return type of a gcc2
20289     builtin and then its argument prototype would still apply.  */
20290 char dbm_open();
20291
20292 int main() {
20293 dbm_open()
20294 ; return 0; }
20295 EOF
20296 if { (eval echo configure:20297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20297   rm -rf conftest*
20298   eval "ac_cv_lib_$ac_lib_var=yes"
20299 else
20300   echo "configure: failed program was:" >&5
20301   cat conftest.$ac_ext >&5
20302   rm -rf conftest*
20303   eval "ac_cv_lib_$ac_lib_var=no"
20304 fi
20305 rm -f conftest*
20306 LIBS="$ac_save_LIBS"
20307
20308 fi
20309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20310   echo "$ac_t""yes" 1>&6
20311   ol_cv_lib_ndbm=-ldbm
20312 else
20313   echo "$ac_t""no" 1>&6
20314 ol_cv_lib_ndbm=no
20315 fi
20316                 
20317 fi
20318
20319         
20320 fi
20321
20322         LIBS="$ol_LIBS"
20323
20324 fi
20325
20326 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20327
20328
20329  for ac_hdr in ndbm.h
20330 do
20331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20333 echo "configure:20334: checking for $ac_hdr" >&5
20334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20335   echo $ac_n "(cached) $ac_c" 1>&6
20336 else
20337   cat > conftest.$ac_ext <<EOF
20338 #line 20339 "configure"
20339 #include "confdefs.h"
20340 #include <$ac_hdr>
20341 EOF
20342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20343 { (eval echo configure:20344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20345 if test -z "$ac_err"; then
20346   rm -rf conftest*
20347   eval "ac_cv_header_$ac_safe=yes"
20348 else
20349   echo "$ac_err" >&5
20350   echo "configure: failed program was:" >&5
20351   cat conftest.$ac_ext >&5
20352   rm -rf conftest*
20353   eval "ac_cv_header_$ac_safe=no"
20354 fi
20355 rm -f conftest*
20356 fi
20357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20358   echo "$ac_t""yes" 1>&6
20359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20360   cat >> confdefs.h <<EOF
20361 #define $ac_tr_hdr 1
20362 EOF
20363  
20364 else
20365   echo "$ac_t""no" 1>&6
20366 fi
20367 done
20368
20369  echo $ac_n "checking for db""... $ac_c" 1>&6
20370 echo "configure:20371: checking for db" >&5
20371 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20372   echo $ac_n "(cached) $ac_c" 1>&6
20373 else
20374   
20375         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20376                 ol_cv_ndbm=no
20377         else
20378                 ol_cv_ndbm=yes
20379         fi
20380
20381 fi
20382
20383 echo "$ac_t""$ol_cv_ndbm" 1>&6
20384  if test $ol_cv_ndbm = yes ; then
20385         cat >> confdefs.h <<\EOF
20386 #define HAVE_NDBM 1
20387 EOF
20388
20389  fi
20390
20391
20392         if test $ol_cv_ndbm = yes ; then
20393                 ol_link_ldbm=ndbm
20394                 ol_with_ldbm_api=ndbm
20395
20396                 if test $ol_cv_lib_ndbm != yes ; then
20397                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20398                 fi
20399         fi
20400 fi
20401
20402 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20403         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20404         if test $ol_enable_ldbm = yes ; then
20405                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20406         fi
20407
20408         echo "configure: warning: disabling LDBM" 1>&2
20409         ol_enable_ldbm=no
20410 fi
20411
20412
20413 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20414         BUILD_LIBS_DYNAMIC=shared
20415         cat >> confdefs.h <<\EOF
20416 #define LDAP_LIBS_DYNAMIC 1
20417 EOF
20418
20419         LTSTATIC=""
20420 else
20421         BUILD_LIBS_DYNAMIC=static
20422         LTSTATIC="-static"
20423 fi
20424
20425 if test $ol_enable_wrappers != no ; then
20426         for ac_hdr in tcpd.h
20427 do
20428 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20429 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20430 echo "configure:20431: checking for $ac_hdr" >&5
20431 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20432   echo $ac_n "(cached) $ac_c" 1>&6
20433 else
20434   cat > conftest.$ac_ext <<EOF
20435 #line 20436 "configure"
20436 #include "confdefs.h"
20437 #include <$ac_hdr>
20438 EOF
20439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20440 { (eval echo configure:20441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20442 if test -z "$ac_err"; then
20443   rm -rf conftest*
20444   eval "ac_cv_header_$ac_safe=yes"
20445 else
20446   echo "$ac_err" >&5
20447   echo "configure: failed program was:" >&5
20448   cat conftest.$ac_ext >&5
20449   rm -rf conftest*
20450   eval "ac_cv_header_$ac_safe=no"
20451 fi
20452 rm -f conftest*
20453 fi
20454 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20455   echo "$ac_t""yes" 1>&6
20456     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20457   cat >> confdefs.h <<EOF
20458 #define $ac_tr_hdr 1
20459 EOF
20460  
20461                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20462 echo "configure:20463: checking for TCP wrappers library" >&5
20463                 save_LIBS="$LIBS"
20464                 LIBS="$LIBS -lwrap"
20465                 cat > conftest.$ac_ext <<EOF
20466 #line 20467 "configure"
20467 #include "confdefs.h"
20468
20469 #include <tcpd.h>
20470 int allow_severity = 0;
20471 int deny_severity  = 0;
20472
20473 struct request_info *req;
20474                 
20475 int main() {
20476
20477 hosts_access(req)
20478                 
20479 ; return 0; }
20480 EOF
20481 if { (eval echo configure:20482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20482   rm -rf conftest*
20483   echo "$ac_t""-lwrap" 1>&6
20484                 have_wrappers=yes
20485                 LIBS="$save_LIBS"
20486 else
20487   echo "configure: failed program was:" >&5
20488   cat conftest.$ac_ext >&5
20489   rm -rf conftest*
20490   
20491                                 LIBS="$LIBS -lnsl"
20492                 cat > conftest.$ac_ext <<EOF
20493 #line 20494 "configure"
20494 #include "confdefs.h"
20495
20496 #include <tcpd.h>
20497 int allow_severity = 0;
20498 int deny_severity  = 0;
20499
20500 struct request_info *req;
20501                 
20502 int main() {
20503
20504 hosts_access(req)
20505                 
20506 ; return 0; }
20507 EOF
20508 if { (eval echo configure:20509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20509   rm -rf conftest*
20510   echo "$ac_t""-lwrap -lnsl" 1>&6
20511                 have_wrappers=yes
20512                 LIBS="$save_LIBS -lnsl"
20513 else
20514   echo "configure: failed program was:" >&5
20515   cat conftest.$ac_ext >&5
20516   rm -rf conftest*
20517   
20518                 echo "$ac_t""no" 1>&6
20519                 have_wrappers=no
20520                 LIBS=$save_LIBS
20521 fi
20522 rm -f conftest*
20523 fi
20524 rm -f conftest*
20525 else
20526   echo "$ac_t""no" 1>&6
20527 have_wrappers=no
20528 fi
20529 done
20530
20531
20532         if test $have_wrappers = yes ; then
20533                 cat >> confdefs.h <<\EOF
20534 #define HAVE_TCPD 1
20535 EOF
20536
20537                 WRAP_LIBS="-lwrap"
20538         elif test $ol_enable_wrappers = yes ; then
20539                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20540         else
20541                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20542                 WRAP_LIBS=""
20543         fi
20544 fi
20545
20546 if test $ol_enable_syslog != no ; then
20547         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20548 echo "configure:20549: checking for openlog" >&5
20549 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20550   echo $ac_n "(cached) $ac_c" 1>&6
20551 else
20552   cat > conftest.$ac_ext <<EOF
20553 #line 20554 "configure"
20554 #include "confdefs.h"
20555 /* System header to define __stub macros and hopefully few prototypes,
20556     which can conflict with char openlog(); below.  */
20557 #include <assert.h>
20558 /* Override any gcc2 internal prototype to avoid an error.  */
20559 /* We use char because int might match the return type of a gcc2
20560     builtin and then its argument prototype would still apply.  */
20561 char openlog();
20562 char (*f)();
20563
20564 int main() {
20565
20566 /* The GNU C library defines this for functions which it implements
20567     to always fail with ENOSYS.  Some functions are actually named
20568     something starting with __ and the normal name is an alias.  */
20569 #if defined (__stub_openlog) || defined (__stub___openlog)
20570 choke me
20571 #else
20572 f = openlog;
20573 #endif
20574
20575 ; return 0; }
20576 EOF
20577 if { (eval echo configure:20578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20578   rm -rf conftest*
20579   eval "ac_cv_func_openlog=yes"
20580 else
20581   echo "configure: failed program was:" >&5
20582   cat conftest.$ac_ext >&5
20583   rm -rf conftest*
20584   eval "ac_cv_func_openlog=no"
20585 fi
20586 rm -f conftest*
20587 fi
20588
20589 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20590   echo "$ac_t""yes" 1>&6
20591   :
20592 else
20593   echo "$ac_t""no" 1>&6
20594 fi
20595
20596         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20597                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20598         fi
20599         ol_enable_syslog=$ac_cv_func_openlog
20600 fi
20601
20602
20603 ol_link_sql=no
20604 if test $ol_enable_sql != no ; then
20605         for ac_hdr in sql.h sqlext.h
20606 do
20607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20609 echo "configure:20610: checking for $ac_hdr" >&5
20610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20611   echo $ac_n "(cached) $ac_c" 1>&6
20612 else
20613   cat > conftest.$ac_ext <<EOF
20614 #line 20615 "configure"
20615 #include "confdefs.h"
20616 #include <$ac_hdr>
20617 EOF
20618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20619 { (eval echo configure:20620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20621 if test -z "$ac_err"; then
20622   rm -rf conftest*
20623   eval "ac_cv_header_$ac_safe=yes"
20624 else
20625   echo "$ac_err" >&5
20626   echo "configure: failed program was:" >&5
20627   cat conftest.$ac_ext >&5
20628   rm -rf conftest*
20629   eval "ac_cv_header_$ac_safe=no"
20630 fi
20631 rm -f conftest*
20632 fi
20633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20634   echo "$ac_t""yes" 1>&6
20635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20636   cat >> confdefs.h <<EOF
20637 #define $ac_tr_hdr 1
20638 EOF
20639  
20640 else
20641   echo "$ac_t""no" 1>&6
20642 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20643         
20644 fi
20645 done
20646
20647
20648         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20649 echo "configure:20650: checking for SQLDriverConnect in -liodbc" >&5
20650 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20652   echo $ac_n "(cached) $ac_c" 1>&6
20653 else
20654   ac_save_LIBS="$LIBS"
20655 LIBS="-liodbc  $LIBS"
20656 cat > conftest.$ac_ext <<EOF
20657 #line 20658 "configure"
20658 #include "confdefs.h"
20659 /* Override any gcc2 internal prototype to avoid an error.  */
20660 /* We use char because int might match the return type of a gcc2
20661     builtin and then its argument prototype would still apply.  */
20662 char SQLDriverConnect();
20663
20664 int main() {
20665 SQLDriverConnect()
20666 ; return 0; }
20667 EOF
20668 if { (eval echo configure:20669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20669   rm -rf conftest*
20670   eval "ac_cv_lib_$ac_lib_var=yes"
20671 else
20672   echo "configure: failed program was:" >&5
20673   cat conftest.$ac_ext >&5
20674   rm -rf conftest*
20675   eval "ac_cv_lib_$ac_lib_var=no"
20676 fi
20677 rm -f conftest*
20678 LIBS="$ac_save_LIBS"
20679
20680 fi
20681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20682   echo "$ac_t""yes" 1>&6
20683   have_iodbc=yes
20684 else
20685   echo "$ac_t""no" 1>&6
20686 have_iodbc=no
20687 fi
20688
20689         if test $have_iodbc = yes ; then
20690                 ol_link_sql="-liodbc"
20691         else
20692                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20693 echo "configure:20694: checking for SQLDriverConnect in -lodbc" >&5
20694 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20696   echo $ac_n "(cached) $ac_c" 1>&6
20697 else
20698   ac_save_LIBS="$LIBS"
20699 LIBS="-lodbc  $LIBS"
20700 cat > conftest.$ac_ext <<EOF
20701 #line 20702 "configure"
20702 #include "confdefs.h"
20703 /* Override any gcc2 internal prototype to avoid an error.  */
20704 /* We use char because int might match the return type of a gcc2
20705     builtin and then its argument prototype would still apply.  */
20706 char SQLDriverConnect();
20707
20708 int main() {
20709 SQLDriverConnect()
20710 ; return 0; }
20711 EOF
20712 if { (eval echo configure:20713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20713   rm -rf conftest*
20714   eval "ac_cv_lib_$ac_lib_var=yes"
20715 else
20716   echo "configure: failed program was:" >&5
20717   cat conftest.$ac_ext >&5
20718   rm -rf conftest*
20719   eval "ac_cv_lib_$ac_lib_var=no"
20720 fi
20721 rm -f conftest*
20722 LIBS="$ac_save_LIBS"
20723
20724 fi
20725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20726   echo "$ac_t""yes" 1>&6
20727   have_odbc=yes
20728 else
20729   echo "$ac_t""no" 1>&6
20730 have_odbc=no
20731 fi
20732
20733                 if test $have_odbc = yes ; then
20734                         ol_link_sql="-lodbc"
20735                 fi
20736         fi
20737
20738         if test $ol_link_sql != no ; then
20739                 SLAPD_SQL_LIBS="$ol_link_sql"
20740
20741         elif test $ol_enable_sql != auto ; then
20742                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20743         fi
20744 fi
20745
20746 ol_link_sasl=no
20747 ol_link_spasswd=no
20748 if test $ol_with_cyrus_sasl != no ; then
20749         for ac_hdr in sasl/sasl.h sasl.h
20750 do
20751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20753 echo "configure:20754: checking for $ac_hdr" >&5
20754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20755   echo $ac_n "(cached) $ac_c" 1>&6
20756 else
20757   cat > conftest.$ac_ext <<EOF
20758 #line 20759 "configure"
20759 #include "confdefs.h"
20760 #include <$ac_hdr>
20761 EOF
20762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20763 { (eval echo configure:20764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20765 if test -z "$ac_err"; then
20766   rm -rf conftest*
20767   eval "ac_cv_header_$ac_safe=yes"
20768 else
20769   echo "$ac_err" >&5
20770   echo "configure: failed program was:" >&5
20771   cat conftest.$ac_ext >&5
20772   rm -rf conftest*
20773   eval "ac_cv_header_$ac_safe=no"
20774 fi
20775 rm -f conftest*
20776 fi
20777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20778   echo "$ac_t""yes" 1>&6
20779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20780   cat >> confdefs.h <<EOF
20781 #define $ac_tr_hdr 1
20782 EOF
20783  
20784 else
20785   echo "$ac_t""no" 1>&6
20786 fi
20787 done
20788
20789
20790         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20791                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20792 echo "configure:20793: checking for sasl_client_init in -lsasl2" >&5
20793 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20795   echo $ac_n "(cached) $ac_c" 1>&6
20796 else
20797   ac_save_LIBS="$LIBS"
20798 LIBS="-lsasl2  $LIBS"
20799 cat > conftest.$ac_ext <<EOF
20800 #line 20801 "configure"
20801 #include "confdefs.h"
20802 /* Override any gcc2 internal prototype to avoid an error.  */
20803 /* We use char because int might match the return type of a gcc2
20804     builtin and then its argument prototype would still apply.  */
20805 char sasl_client_init();
20806
20807 int main() {
20808 sasl_client_init()
20809 ; return 0; }
20810 EOF
20811 if { (eval echo configure:20812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20812   rm -rf conftest*
20813   eval "ac_cv_lib_$ac_lib_var=yes"
20814 else
20815   echo "configure: failed program was:" >&5
20816   cat conftest.$ac_ext >&5
20817   rm -rf conftest*
20818   eval "ac_cv_lib_$ac_lib_var=no"
20819 fi
20820 rm -f conftest*
20821 LIBS="$ac_save_LIBS"
20822
20823 fi
20824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20825   echo "$ac_t""yes" 1>&6
20826   ol_link_sasl="-lsasl2"
20827 else
20828   echo "$ac_t""no" 1>&6
20829 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20830 echo "configure:20831: checking for sasl_client_init in -lsasl" >&5
20831 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20832 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20833   echo $ac_n "(cached) $ac_c" 1>&6
20834 else
20835   ac_save_LIBS="$LIBS"
20836 LIBS="-lsasl  $LIBS"
20837 cat > conftest.$ac_ext <<EOF
20838 #line 20839 "configure"
20839 #include "confdefs.h"
20840 /* Override any gcc2 internal prototype to avoid an error.  */
20841 /* We use char because int might match the return type of a gcc2
20842     builtin and then its argument prototype would still apply.  */
20843 char sasl_client_init();
20844
20845 int main() {
20846 sasl_client_init()
20847 ; return 0; }
20848 EOF
20849 if { (eval echo configure:20850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20850   rm -rf conftest*
20851   eval "ac_cv_lib_$ac_lib_var=yes"
20852 else
20853   echo "configure: failed program was:" >&5
20854   cat conftest.$ac_ext >&5
20855   rm -rf conftest*
20856   eval "ac_cv_lib_$ac_lib_var=no"
20857 fi
20858 rm -f conftest*
20859 LIBS="$ac_save_LIBS"
20860
20861 fi
20862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20863   echo "$ac_t""yes" 1>&6
20864   ol_link_sasl="-lsasl"
20865 else
20866   echo "$ac_t""no" 1>&6
20867 fi
20868
20869 fi
20870
20871         fi
20872
20873         if test $ol_link_sasl = no ; then
20874                 if test $ol_with_cyrus_sasl != auto ; then
20875                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20876                 else
20877                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20878                         echo "configure: warning: SASL authentication not supported!" 1>&2
20879                         if test $ol_link_tls = no ; then
20880                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20881                         fi
20882                 fi
20883         else
20884                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20885 echo "configure:20886: checking Cyrus SASL library version" >&5
20886 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20887   echo $ac_n "(cached) $ac_c" 1>&6
20888 else
20889   
20890         cat > conftest.$ac_ext <<EOF
20891 #line 20892 "configure"
20892 #include "confdefs.h"
20893
20894 #ifdef HAVE_SASL_SASL_H
20895 #include <sasl/sasl.h>
20896 #else
20897 #include <sasl.h>
20898 #endif
20899
20900 /* require 2.1.3 or later */
20901 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20902         char *__sasl_compat = "2.2+ or better okay (we guess)";
20903 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20904         && SASL_VERSION_STEP >=3
20905         char *__sasl_compat = "2.1.3+ or better okay";
20906 #endif
20907         
20908 EOF
20909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20910   egrep "__sasl_compat" >/dev/null 2>&1; then
20911   rm -rf conftest*
20912   ol_cv_sasl_compat=yes
20913 else
20914   rm -rf conftest*
20915   ol_cv_sasl_compat=no
20916 fi
20917 rm -f conftest*
20918
20919 fi
20920
20921 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20922
20923                 if test $ol_cv_sasl_compat = no ; then
20924                         ol_link_sasl=no
20925                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20926                 fi
20927
20928                 cat >> confdefs.h <<\EOF
20929 #define HAVE_CYRUS_SASL 1
20930 EOF
20931
20932                 SASL_LIBS="$ol_link_sasl"
20933                 if test $ol_enable_spasswd != no ; then
20934                         ol_link_spasswd=yes
20935                 fi
20936
20937                 ac_save_LIBS="$LIBS"
20938                 LIBS="$LIBS $ol_link_sasl"
20939                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20940 echo "configure:20941: checking for sasl_version" >&5
20941 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20942   echo $ac_n "(cached) $ac_c" 1>&6
20943 else
20944   cat > conftest.$ac_ext <<EOF
20945 #line 20946 "configure"
20946 #include "confdefs.h"
20947 /* System header to define __stub macros and hopefully few prototypes,
20948     which can conflict with char sasl_version(); below.  */
20949 #include <assert.h>
20950 /* Override any gcc2 internal prototype to avoid an error.  */
20951 /* We use char because int might match the return type of a gcc2
20952     builtin and then its argument prototype would still apply.  */
20953 char sasl_version();
20954 char (*f)();
20955
20956 int main() {
20957
20958 /* The GNU C library defines this for functions which it implements
20959     to always fail with ENOSYS.  Some functions are actually named
20960     something starting with __ and the normal name is an alias.  */
20961 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20962 choke me
20963 #else
20964 f = sasl_version;
20965 #endif
20966
20967 ; return 0; }
20968 EOF
20969 if { (eval echo configure:20970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20970   rm -rf conftest*
20971   eval "ac_cv_func_sasl_version=yes"
20972 else
20973   echo "configure: failed program was:" >&5
20974   cat conftest.$ac_ext >&5
20975   rm -rf conftest*
20976   eval "ac_cv_func_sasl_version=no"
20977 fi
20978 rm -f conftest*
20979 fi
20980
20981 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20982   echo "$ac_t""yes" 1>&6
20983   cat >> confdefs.h <<\EOF
20984 #define HAVE_SASL_VERSION 1
20985 EOF
20986
20987 else
20988   echo "$ac_t""no" 1>&6
20989 fi
20990
20991                 LIBS="$ac_save_LIBS"
20992         fi
20993
20994 else
20995         echo "configure: warning: SASL authentication not supported!" 1>&2
20996         if test $ol_link_tls = no ; then
20997                 echo "configure: warning: Strong authentication not supported!" 1>&2
20998         fi
20999 fi
21000
21001 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21002         dev=no
21003         if test -r /dev/urandom ; then
21004                 dev="/dev/urandom";
21005         elif test -r /idev/urandom ; then
21006                 dev="/idev/urandom";
21007         elif test -r /dev/srandom ; then
21008                 dev="/dev/srandom";
21009         elif test -r /dev/random ; then
21010                 dev="/dev/random";
21011         elif test -r /idev/random ; then
21012                 dev="/idev/random";
21013         fi
21014
21015         if test $dev != no ; then
21016                 cat >> confdefs.h <<EOF
21017 #define URANDOM_DEVICE "$dev"
21018 EOF
21019
21020         fi
21021 fi
21022
21023 ol_link_fetch=no
21024 if test $ol_with_fetch != no ; then
21025         ol_LIBS=$LIBS
21026 LIBS="-lfetch -lcom_err $LIBS"
21027 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21028 echo "configure:21029: checking fetch(3) library" >&5
21029 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21030   echo $ac_n "(cached) $ac_c" 1>&6
21031 else
21032   
21033         cat > conftest.$ac_ext <<EOF
21034 #line 21035 "configure"
21035 #include "confdefs.h"
21036
21037 #include <sys/param.h>
21038 #include <stdio.h>
21039 #include <fetch.h>
21040 int main() {
21041 struct url *u = fetchParseURL("file:///"); 
21042 ; return 0; }
21043 EOF
21044 if { (eval echo configure:21045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21045   rm -rf conftest*
21046   ol_cv_lib_fetch=yes
21047 else
21048   echo "configure: failed program was:" >&5
21049   cat conftest.$ac_ext >&5
21050   rm -rf conftest*
21051   ol_cv_lib_fetch=no
21052 fi
21053 rm -f conftest*
21054 fi
21055
21056 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21057 LIBS=$ol_LIBS
21058 if test $ol_cv_lib_fetch != no ; then
21059         ol_link_fetch="-lfetch -lcom_err"
21060         cat >> confdefs.h <<\EOF
21061 #define HAVE_FETCH 1
21062 EOF
21063
21064 fi
21065
21066
21067         if test $ol_cv_lib_fetch != no ; then
21068                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21069                 ol_link_fetch=freebsd
21070
21071         elif test $ol_with_fetch != auto ; then
21072                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21073         fi 
21074 fi
21075
21076 if test $ol_enable_crypt != no ; then
21077         save_LIBS="$LIBS"
21078         LIBS="$TLS_LIBS $LIBS"
21079
21080         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21081 echo "configure:21082: checking for crypt" >&5
21082 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21083   echo $ac_n "(cached) $ac_c" 1>&6
21084 else
21085   cat > conftest.$ac_ext <<EOF
21086 #line 21087 "configure"
21087 #include "confdefs.h"
21088 /* System header to define __stub macros and hopefully few prototypes,
21089     which can conflict with char crypt(); below.  */
21090 #include <assert.h>
21091 /* Override any gcc2 internal prototype to avoid an error.  */
21092 /* We use char because int might match the return type of a gcc2
21093     builtin and then its argument prototype would still apply.  */
21094 char crypt();
21095 char (*f)();
21096
21097 int main() {
21098
21099 /* The GNU C library defines this for functions which it implements
21100     to always fail with ENOSYS.  Some functions are actually named
21101     something starting with __ and the normal name is an alias.  */
21102 #if defined (__stub_crypt) || defined (__stub___crypt)
21103 choke me
21104 #else
21105 f = crypt;
21106 #endif
21107
21108 ; return 0; }
21109 EOF
21110 if { (eval echo configure:21111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21111   rm -rf conftest*
21112   eval "ac_cv_func_crypt=yes"
21113 else
21114   echo "configure: failed program was:" >&5
21115   cat conftest.$ac_ext >&5
21116   rm -rf conftest*
21117   eval "ac_cv_func_crypt=no"
21118 fi
21119 rm -f conftest*
21120 fi
21121
21122 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21123   echo "$ac_t""yes" 1>&6
21124   have_crypt=yes
21125 else
21126   echo "$ac_t""no" 1>&6
21127
21128                 LIBS="$save_LIBS"
21129                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21130 echo "configure:21131: checking for crypt in -lcrypt" >&5
21131 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21133   echo $ac_n "(cached) $ac_c" 1>&6
21134 else
21135   ac_save_LIBS="$LIBS"
21136 LIBS="-lcrypt  $LIBS"
21137 cat > conftest.$ac_ext <<EOF
21138 #line 21139 "configure"
21139 #include "confdefs.h"
21140 /* Override any gcc2 internal prototype to avoid an error.  */
21141 /* We use char because int might match the return type of a gcc2
21142     builtin and then its argument prototype would still apply.  */
21143 char crypt();
21144
21145 int main() {
21146 crypt()
21147 ; return 0; }
21148 EOF
21149 if { (eval echo configure:21150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21150   rm -rf conftest*
21151   eval "ac_cv_lib_$ac_lib_var=yes"
21152 else
21153   echo "configure: failed program was:" >&5
21154   cat conftest.$ac_ext >&5
21155   rm -rf conftest*
21156   eval "ac_cv_lib_$ac_lib_var=no"
21157 fi
21158 rm -f conftest*
21159 LIBS="$ac_save_LIBS"
21160
21161 fi
21162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21163   echo "$ac_t""yes" 1>&6
21164   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21165                         have_crypt=yes
21166 else
21167   echo "$ac_t""no" 1>&6
21168 have_crypt=no
21169 fi
21170
21171 fi
21172
21173
21174         LIBS="$save_LIBS"
21175
21176         if test $have_crypt = yes ; then
21177                 cat >> confdefs.h <<\EOF
21178 #define HAVE_CRYPT 1
21179 EOF
21180
21181         else
21182                 echo "configure: warning: could not find crypt" 1>&2
21183                 if test $ol_enable_crypt = yes ; then
21184                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21185                 fi
21186
21187                 echo "configure: warning: disabling crypt support" 1>&2
21188                 ol_enable_crypt=no
21189         fi
21190 fi
21191
21192 if test $ol_enable_proctitle != no ; then
21193         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21194 echo "configure:21195: checking for setproctitle" >&5
21195 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21196   echo $ac_n "(cached) $ac_c" 1>&6
21197 else
21198   cat > conftest.$ac_ext <<EOF
21199 #line 21200 "configure"
21200 #include "confdefs.h"
21201 /* System header to define __stub macros and hopefully few prototypes,
21202     which can conflict with char setproctitle(); below.  */
21203 #include <assert.h>
21204 /* Override any gcc2 internal prototype to avoid an error.  */
21205 /* We use char because int might match the return type of a gcc2
21206     builtin and then its argument prototype would still apply.  */
21207 char setproctitle();
21208 char (*f)();
21209
21210 int main() {
21211
21212 /* The GNU C library defines this for functions which it implements
21213     to always fail with ENOSYS.  Some functions are actually named
21214     something starting with __ and the normal name is an alias.  */
21215 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21216 choke me
21217 #else
21218 f = setproctitle;
21219 #endif
21220
21221 ; return 0; }
21222 EOF
21223 if { (eval echo configure:21224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21224   rm -rf conftest*
21225   eval "ac_cv_func_setproctitle=yes"
21226 else
21227   echo "configure: failed program was:" >&5
21228   cat conftest.$ac_ext >&5
21229   rm -rf conftest*
21230   eval "ac_cv_func_setproctitle=no"
21231 fi
21232 rm -f conftest*
21233 fi
21234
21235 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21236   echo "$ac_t""yes" 1>&6
21237   have_setproctitle=yes
21238 else
21239   echo "$ac_t""no" 1>&6
21240
21241                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21242 echo "configure:21243: checking for setproctitle in -lutil" >&5
21243 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21245   echo $ac_n "(cached) $ac_c" 1>&6
21246 else
21247   ac_save_LIBS="$LIBS"
21248 LIBS="-lutil  $LIBS"
21249 cat > conftest.$ac_ext <<EOF
21250 #line 21251 "configure"
21251 #include "confdefs.h"
21252 /* Override any gcc2 internal prototype to avoid an error.  */
21253 /* We use char because int might match the return type of a gcc2
21254     builtin and then its argument prototype would still apply.  */
21255 char setproctitle();
21256
21257 int main() {
21258 setproctitle()
21259 ; return 0; }
21260 EOF
21261 if { (eval echo configure:21262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21262   rm -rf conftest*
21263   eval "ac_cv_lib_$ac_lib_var=yes"
21264 else
21265   echo "configure: failed program was:" >&5
21266   cat conftest.$ac_ext >&5
21267   rm -rf conftest*
21268   eval "ac_cv_lib_$ac_lib_var=no"
21269 fi
21270 rm -f conftest*
21271 LIBS="$ac_save_LIBS"
21272
21273 fi
21274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21275   echo "$ac_t""yes" 1>&6
21276   have_setproctitle=yes
21277                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21278 else
21279   echo "$ac_t""no" 1>&6
21280 have_setproctitle=no
21281                         LIBOBJS="$LIBOBJS setproctitle.o"
21282                         LIBSRCS="$LIBSRCS setproctitle.c"
21283 fi
21284
21285 fi
21286
21287
21288         if test $have_setproctitle = yes ; then
21289                 cat >> confdefs.h <<\EOF
21290 #define HAVE_SETPROCTITLE 1
21291 EOF
21292
21293         fi
21294 fi
21295
21296 if test $ol_enable_slp != no ; then
21297         for ac_hdr in slp.h 
21298 do
21299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21301 echo "configure:21302: checking for $ac_hdr" >&5
21302 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21303   echo $ac_n "(cached) $ac_c" 1>&6
21304 else
21305   cat > conftest.$ac_ext <<EOF
21306 #line 21307 "configure"
21307 #include "confdefs.h"
21308 #include <$ac_hdr>
21309 EOF
21310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21311 { (eval echo configure:21312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21313 if test -z "$ac_err"; then
21314   rm -rf conftest*
21315   eval "ac_cv_header_$ac_safe=yes"
21316 else
21317   echo "$ac_err" >&5
21318   echo "configure: failed program was:" >&5
21319   cat conftest.$ac_ext >&5
21320   rm -rf conftest*
21321   eval "ac_cv_header_$ac_safe=no"
21322 fi
21323 rm -f conftest*
21324 fi
21325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21326   echo "$ac_t""yes" 1>&6
21327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21328   cat >> confdefs.h <<EOF
21329 #define $ac_tr_hdr 1
21330 EOF
21331  
21332 else
21333   echo "$ac_t""no" 1>&6
21334 fi
21335 done
21336
21337
21338         if test $ac_cv_header_slp_h = yes ; then
21339                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21340 echo "configure:21341: checking for SLPOpen in -lslp" >&5
21341 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21342 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21343   echo $ac_n "(cached) $ac_c" 1>&6
21344 else
21345   ac_save_LIBS="$LIBS"
21346 LIBS="-lslp  $LIBS"
21347 cat > conftest.$ac_ext <<EOF
21348 #line 21349 "configure"
21349 #include "confdefs.h"
21350 /* Override any gcc2 internal prototype to avoid an error.  */
21351 /* We use char because int might match the return type of a gcc2
21352     builtin and then its argument prototype would still apply.  */
21353 char SLPOpen();
21354
21355 int main() {
21356 SLPOpen()
21357 ; return 0; }
21358 EOF
21359 if { (eval echo configure:21360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21360   rm -rf conftest*
21361   eval "ac_cv_lib_$ac_lib_var=yes"
21362 else
21363   echo "configure: failed program was:" >&5
21364   cat conftest.$ac_ext >&5
21365   rm -rf conftest*
21366   eval "ac_cv_lib_$ac_lib_var=no"
21367 fi
21368 rm -f conftest*
21369 LIBS="$ac_save_LIBS"
21370
21371 fi
21372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21373   echo "$ac_t""yes" 1>&6
21374   have_slp=yes
21375 else
21376   echo "$ac_t""no" 1>&6
21377 have_slp=no
21378 fi
21379
21380                 if test $have_slp = yes ; then
21381                         cat >> confdefs.h <<\EOF
21382 #define HAVE_SLP 1
21383 EOF
21384
21385                         SLAPD_SLP_LIBS=-lslp
21386                 fi
21387
21388         elif test $ol_enable_slp = yes ; then
21389                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21390         fi
21391 fi
21392
21393
21394 echo $ac_n "checking long long""... $ac_c" 1>&6
21395 echo "configure:21396: checking long long" >&5
21396 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21397   echo $ac_n "(cached) $ac_c" 1>&6
21398 else
21399   
21400         cat > conftest.$ac_ext <<EOF
21401 #line 21402 "configure"
21402 #include "confdefs.h"
21403
21404 int main() {
21405 long long x;
21406 ; return 0; }
21407 EOF
21408 if { (eval echo configure:21409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21409   rm -rf conftest*
21410   ol_cv_type_long_long=yes
21411 else
21412   echo "configure: failed program was:" >&5
21413   cat conftest.$ac_ext >&5
21414   rm -rf conftest*
21415   ol_cv_type_long_long=no
21416 fi
21417 rm -f conftest*
21418 fi
21419
21420 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21421 if test $ol_cv_type_long_long = yes; then
21422         cat >> confdefs.h <<\EOF
21423 #define HAVE_LONG_LONG 1
21424 EOF
21425
21426 fi
21427
21428 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21429 echo "configure:21430: checking for ANSI C header files" >&5
21430 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21431   echo $ac_n "(cached) $ac_c" 1>&6
21432 else
21433   cat > conftest.$ac_ext <<EOF
21434 #line 21435 "configure"
21435 #include "confdefs.h"
21436 #include <stdlib.h>
21437 #include <stdarg.h>
21438 #include <string.h>
21439 #include <float.h>
21440 EOF
21441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21442 { (eval echo configure:21443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21444 if test -z "$ac_err"; then
21445   rm -rf conftest*
21446   ac_cv_header_stdc=yes
21447 else
21448   echo "$ac_err" >&5
21449   echo "configure: failed program was:" >&5
21450   cat conftest.$ac_ext >&5
21451   rm -rf conftest*
21452   ac_cv_header_stdc=no
21453 fi
21454 rm -f conftest*
21455
21456 if test $ac_cv_header_stdc = yes; then
21457   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21458 cat > conftest.$ac_ext <<EOF
21459 #line 21460 "configure"
21460 #include "confdefs.h"
21461 #include <string.h>
21462 EOF
21463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21464   egrep "memchr" >/dev/null 2>&1; then
21465   :
21466 else
21467   rm -rf conftest*
21468   ac_cv_header_stdc=no
21469 fi
21470 rm -f conftest*
21471
21472 fi
21473
21474 if test $ac_cv_header_stdc = yes; then
21475   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21476 cat > conftest.$ac_ext <<EOF
21477 #line 21478 "configure"
21478 #include "confdefs.h"
21479 #include <stdlib.h>
21480 EOF
21481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21482   egrep "free" >/dev/null 2>&1; then
21483   :
21484 else
21485   rm -rf conftest*
21486   ac_cv_header_stdc=no
21487 fi
21488 rm -f conftest*
21489
21490 fi
21491
21492 if test $ac_cv_header_stdc = yes; then
21493   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21494 if test "$cross_compiling" = yes; then
21495   :
21496 else
21497   cat > conftest.$ac_ext <<EOF
21498 #line 21499 "configure"
21499 #include "confdefs.h"
21500 #include <ctype.h>
21501 #if ((' ' & 0x0FF) == 0x020)
21502 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21503 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21504 #else
21505 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21506  || ('j' <= (c) && (c) <= 'r') \
21507  || ('s' <= (c) && (c) <= 'z'))
21508 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21509 #endif
21510 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21511 int main () { int i; for (i = 0; i < 256; i++)
21512 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21513 exit (0); }
21514
21515 EOF
21516 if { (eval echo configure:21517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21517 then
21518   :
21519 else
21520   echo "configure: failed program was:" >&5
21521   cat conftest.$ac_ext >&5
21522   rm -fr conftest*
21523   ac_cv_header_stdc=no
21524 fi
21525 rm -fr conftest*
21526 fi
21527
21528 fi
21529 fi
21530
21531 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21532 if test $ac_cv_header_stdc = yes; then
21533   cat >> confdefs.h <<\EOF
21534 #define STDC_HEADERS 1
21535 EOF
21536
21537 fi
21538
21539 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21540 echo "configure:21541: checking for mode_t" >&5
21541 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21542   echo $ac_n "(cached) $ac_c" 1>&6
21543 else
21544   cat > conftest.$ac_ext <<EOF
21545 #line 21546 "configure"
21546 #include "confdefs.h"
21547 #include <sys/types.h>
21548 #if STDC_HEADERS
21549 #include <stdlib.h>
21550 #include <stddef.h>
21551 #endif
21552
21553 EOF
21554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21555   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21556   rm -rf conftest*
21557   eval "ac_cv_type_mode_t=yes"
21558 else
21559   rm -rf conftest*
21560   eval "ac_cv_type_mode_t=no"
21561 fi
21562 rm -f conftest*
21563
21564 fi
21565 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21566   echo "$ac_t""yes" 1>&6
21567 else
21568   echo "$ac_t""no" 1>&6
21569   cat >> confdefs.h <<EOF
21570 #define mode_t int
21571 EOF
21572
21573 fi
21574
21575 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21576 echo "configure:21577: checking for off_t" >&5
21577 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21578   echo $ac_n "(cached) $ac_c" 1>&6
21579 else
21580   cat > conftest.$ac_ext <<EOF
21581 #line 21582 "configure"
21582 #include "confdefs.h"
21583 #include <sys/types.h>
21584 #if STDC_HEADERS
21585 #include <stdlib.h>
21586 #include <stddef.h>
21587 #endif
21588
21589 EOF
21590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21591   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21592   rm -rf conftest*
21593   eval "ac_cv_type_off_t=yes"
21594 else
21595   rm -rf conftest*
21596   eval "ac_cv_type_off_t=no"
21597 fi
21598 rm -f conftest*
21599
21600 fi
21601 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21602   echo "$ac_t""yes" 1>&6
21603 else
21604   echo "$ac_t""no" 1>&6
21605   cat >> confdefs.h <<EOF
21606 #define off_t long
21607 EOF
21608
21609 fi
21610
21611 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21612 echo "configure:21613: checking for pid_t" >&5
21613 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21614   echo $ac_n "(cached) $ac_c" 1>&6
21615 else
21616   cat > conftest.$ac_ext <<EOF
21617 #line 21618 "configure"
21618 #include "confdefs.h"
21619 #include <sys/types.h>
21620 #if STDC_HEADERS
21621 #include <stdlib.h>
21622 #include <stddef.h>
21623 #endif
21624
21625 EOF
21626 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21627   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21628   rm -rf conftest*
21629   eval "ac_cv_type_pid_t=yes"
21630 else
21631   rm -rf conftest*
21632   eval "ac_cv_type_pid_t=no"
21633 fi
21634 rm -f conftest*
21635
21636 fi
21637 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21638   echo "$ac_t""yes" 1>&6
21639 else
21640   echo "$ac_t""no" 1>&6
21641   cat >> confdefs.h <<EOF
21642 #define pid_t int
21643 EOF
21644
21645 fi
21646
21647 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21648 echo "configure:21649: checking for ptrdiff_t" >&5
21649 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21650   echo $ac_n "(cached) $ac_c" 1>&6
21651 else
21652   cat > conftest.$ac_ext <<EOF
21653 #line 21654 "configure"
21654 #include "confdefs.h"
21655 #include <stddef.h>
21656 int main() {
21657 ptrdiff_t p
21658 ; return 0; }
21659 EOF
21660 if { (eval echo configure:21661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21661   rm -rf conftest*
21662   am_cv_type_ptrdiff_t=yes
21663 else
21664   echo "configure: failed program was:" >&5
21665   cat conftest.$ac_ext >&5
21666   rm -rf conftest*
21667   am_cv_type_ptrdiff_t=no
21668 fi
21669 rm -f conftest*
21670 fi
21671
21672 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21673    if test $am_cv_type_ptrdiff_t = yes; then
21674      cat >> confdefs.h <<\EOF
21675 #define HAVE_PTRDIFF_T 1
21676 EOF
21677
21678    fi
21679
21680 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21681 echo "configure:21682: checking return type of signal handlers" >&5
21682 if eval "test \"\${ac_cv_type_signal+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 #include <sys/types.h>
21689 #include <signal.h>
21690 #ifdef signal
21691 #undef signal
21692 #endif
21693 #ifdef __cplusplus
21694 extern "C" void (*signal (int, void (*)(int)))(int);
21695 #else
21696 void (*signal ()) ();
21697 #endif
21698
21699 int main() {
21700 int i;
21701 ; return 0; }
21702 EOF
21703 if { (eval echo configure:21704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21704   rm -rf conftest*
21705   ac_cv_type_signal=void
21706 else
21707   echo "configure: failed program was:" >&5
21708   cat conftest.$ac_ext >&5
21709   rm -rf conftest*
21710   ac_cv_type_signal=int
21711 fi
21712 rm -f conftest*
21713 fi
21714
21715 echo "$ac_t""$ac_cv_type_signal" 1>&6
21716 cat >> confdefs.h <<EOF
21717 #define RETSIGTYPE $ac_cv_type_signal
21718 EOF
21719
21720
21721 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21722 echo "configure:21723: checking for size_t" >&5
21723 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21724   echo $ac_n "(cached) $ac_c" 1>&6
21725 else
21726   cat > conftest.$ac_ext <<EOF
21727 #line 21728 "configure"
21728 #include "confdefs.h"
21729 #include <sys/types.h>
21730 #if STDC_HEADERS
21731 #include <stdlib.h>
21732 #include <stddef.h>
21733 #endif
21734
21735 EOF
21736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21737   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21738   rm -rf conftest*
21739   eval "ac_cv_type_size_t=yes"
21740 else
21741   rm -rf conftest*
21742   eval "ac_cv_type_size_t=no"
21743 fi
21744 rm -f conftest*
21745
21746 fi
21747 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21748   echo "$ac_t""yes" 1>&6
21749 else
21750   echo "$ac_t""no" 1>&6
21751   cat >> confdefs.h <<EOF
21752 #define size_t unsigned
21753 EOF
21754
21755 fi
21756
21757
21758 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21759 echo "configure:21760: checking for ssize_t" >&5
21760 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21761   echo $ac_n "(cached) $ac_c" 1>&6
21762 else
21763   cat > conftest.$ac_ext <<EOF
21764 #line 21765 "configure"
21765 #include "confdefs.h"
21766 #include <sys/types.h>
21767 #if STDC_HEADERS
21768 #include <stdlib.h>
21769 #include <stddef.h>
21770 #endif
21771
21772 EOF
21773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21774   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21775   rm -rf conftest*
21776   eval "ac_cv_type_ssize_t=yes"
21777 else
21778   rm -rf conftest*
21779   eval "ac_cv_type_ssize_t=no"
21780 fi
21781 rm -f conftest*
21782
21783 fi
21784 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21785   echo "$ac_t""yes" 1>&6
21786 else
21787   echo "$ac_t""no" 1>&6
21788   cat >> confdefs.h <<EOF
21789 #define ssize_t signed int
21790 EOF
21791
21792 fi
21793
21794 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21795 echo "configure:21796: checking for caddr_t" >&5
21796 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21797   echo $ac_n "(cached) $ac_c" 1>&6
21798 else
21799   cat > conftest.$ac_ext <<EOF
21800 #line 21801 "configure"
21801 #include "confdefs.h"
21802 #include <sys/types.h>
21803 #if STDC_HEADERS
21804 #include <stdlib.h>
21805 #include <stddef.h>
21806 #endif
21807
21808 EOF
21809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21810   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21811   rm -rf conftest*
21812   eval "ac_cv_type_caddr_t=yes"
21813 else
21814   rm -rf conftest*
21815   eval "ac_cv_type_caddr_t=no"
21816 fi
21817 rm -f conftest*
21818
21819 fi
21820 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21821   echo "$ac_t""yes" 1>&6
21822 else
21823   echo "$ac_t""no" 1>&6
21824   cat >> confdefs.h <<EOF
21825 #define caddr_t char *
21826 EOF
21827
21828 fi
21829
21830
21831 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21832 echo "configure:21833: checking for socklen_t" >&5
21833 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21834   echo $ac_n "(cached) $ac_c" 1>&6
21835 else
21836   cat > conftest.$ac_ext <<EOF
21837 #line 21838 "configure"
21838 #include "confdefs.h"
21839
21840 #ifdef HAVE_SYS_TYPES_H
21841 #include <sys/types.h>
21842 #endif
21843 #ifdef HAVE_SYS_SOCKET_H
21844 #include <sys/socket.h>
21845 #endif
21846
21847 int main() {
21848 socklen_t len;
21849 ; return 0; }
21850 EOF
21851 if { (eval echo configure:21852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21852   rm -rf conftest*
21853   ol_cv_type_socklen_t=yes
21854 else
21855   echo "configure: failed program was:" >&5
21856   cat conftest.$ac_ext >&5
21857   rm -rf conftest*
21858   ol_cv_type_socklen_t=no
21859 fi
21860 rm -f conftest*
21861 fi
21862
21863 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21864   if test $ol_cv_type_socklen_t = no; then
21865     cat >> confdefs.h <<\EOF
21866 #define socklen_t int
21867 EOF
21868
21869   fi
21870  
21871 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21872 echo "configure:21873: checking for member st_blksize in aggregate type struct stat" >&5
21873 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21874   echo $ac_n "(cached) $ac_c" 1>&6
21875 else
21876   cat > conftest.$ac_ext <<EOF
21877 #line 21878 "configure"
21878 #include "confdefs.h"
21879 #include <sys/types.h>
21880 #include <sys/stat.h>
21881 int main() {
21882 struct stat foo; foo.st_blksize;
21883 ; return 0; }
21884 EOF
21885 if { (eval echo configure:21886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21886   rm -rf conftest*
21887   ac_cv_c_struct_member_st_blksize=yes
21888 else
21889   echo "configure: failed program was:" >&5
21890   cat conftest.$ac_ext >&5
21891   rm -rf conftest*
21892   ac_cv_c_struct_member_st_blksize=no
21893 fi
21894 rm -f conftest*
21895 fi
21896
21897 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21898 st_blksize="$ac_cv_c_struct_member_st_blksize"
21899 if test $ac_cv_c_struct_member_st_blksize = yes; then
21900   cat >> confdefs.h <<\EOF
21901 #define HAVE_ST_BLKSIZE 1
21902 EOF
21903
21904 fi
21905
21906 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21907 echo "configure:21908: checking whether time.h and sys/time.h may both be included" >&5
21908 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21909   echo $ac_n "(cached) $ac_c" 1>&6
21910 else
21911   cat > conftest.$ac_ext <<EOF
21912 #line 21913 "configure"
21913 #include "confdefs.h"
21914 #include <sys/types.h>
21915 #include <sys/time.h>
21916 #include <time.h>
21917 int main() {
21918 struct tm *tp;
21919 ; return 0; }
21920 EOF
21921 if { (eval echo configure:21922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21922   rm -rf conftest*
21923   ac_cv_header_time=yes
21924 else
21925   echo "configure: failed program was:" >&5
21926   cat conftest.$ac_ext >&5
21927   rm -rf conftest*
21928   ac_cv_header_time=no
21929 fi
21930 rm -f conftest*
21931 fi
21932
21933 echo "$ac_t""$ac_cv_header_time" 1>&6
21934 if test $ac_cv_header_time = yes; then
21935   cat >> confdefs.h <<\EOF
21936 #define TIME_WITH_SYS_TIME 1
21937 EOF
21938
21939 fi
21940
21941 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21942 echo "configure:21943: checking whether struct tm is in sys/time.h or time.h" >&5
21943 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21944   echo $ac_n "(cached) $ac_c" 1>&6
21945 else
21946   cat > conftest.$ac_ext <<EOF
21947 #line 21948 "configure"
21948 #include "confdefs.h"
21949 #include <sys/types.h>
21950 #include <time.h>
21951 int main() {
21952 struct tm *tp; tp->tm_sec;
21953 ; return 0; }
21954 EOF
21955 if { (eval echo configure:21956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21956   rm -rf conftest*
21957   ac_cv_struct_tm=time.h
21958 else
21959   echo "configure: failed program was:" >&5
21960   cat conftest.$ac_ext >&5
21961   rm -rf conftest*
21962   ac_cv_struct_tm=sys/time.h
21963 fi
21964 rm -f conftest*
21965 fi
21966
21967 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21968 if test $ac_cv_struct_tm = sys/time.h; then
21969   cat >> confdefs.h <<\EOF
21970 #define TM_IN_SYS_TIME 1
21971 EOF
21972
21973 fi
21974
21975 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21976 echo "configure:21977: checking for uid_t in sys/types.h" >&5
21977 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21978   echo $ac_n "(cached) $ac_c" 1>&6
21979 else
21980   cat > conftest.$ac_ext <<EOF
21981 #line 21982 "configure"
21982 #include "confdefs.h"
21983 #include <sys/types.h>
21984 EOF
21985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21986   egrep "uid_t" >/dev/null 2>&1; then
21987   rm -rf conftest*
21988   ac_cv_type_uid_t=yes
21989 else
21990   rm -rf conftest*
21991   ac_cv_type_uid_t=no
21992 fi
21993 rm -f conftest*
21994
21995 fi
21996
21997 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21998 if test $ac_cv_type_uid_t = no; then
21999   cat >> confdefs.h <<\EOF
22000 #define uid_t int
22001 EOF
22002
22003   cat >> confdefs.h <<\EOF
22004 #define gid_t int
22005 EOF
22006
22007 fi
22008
22009 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22010 echo "configure:22011: checking for sig_atomic_t" >&5
22011 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22012   echo $ac_n "(cached) $ac_c" 1>&6
22013 else
22014   cat > conftest.$ac_ext <<EOF
22015 #line 22016 "configure"
22016 #include "confdefs.h"
22017 #include <signal.h>
22018 int main() {
22019 sig_atomic_t atomic;
22020 ; return 0; }
22021 EOF
22022 if { (eval echo configure:22023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22023   rm -rf conftest*
22024   ol_cv_type_sig_atomic_t=yes
22025 else
22026   echo "configure: failed program was:" >&5
22027   cat conftest.$ac_ext >&5
22028   rm -rf conftest*
22029   ol_cv_type_sig_atomic_t=no
22030 fi
22031 rm -f conftest*
22032 fi
22033
22034 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22035   if test $ol_cv_type_sig_atomic_t = no; then
22036     cat >> confdefs.h <<\EOF
22037 #define sig_atomic_t int
22038 EOF
22039
22040   fi
22041  
22042
22043
22044 # test for pw_gecos in struct passwd
22045 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22046 echo "configure:22047: checking struct passwd for pw_gecos" >&5
22047 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22048   echo $ac_n "(cached) $ac_c" 1>&6
22049 else
22050   
22051         cat > conftest.$ac_ext <<EOF
22052 #line 22053 "configure"
22053 #include "confdefs.h"
22054 #include <pwd.h>
22055 int main() {
22056
22057         struct passwd pwd;
22058         pwd.pw_gecos = pwd.pw_name;
22059
22060 ; return 0; }
22061 EOF
22062 if { (eval echo configure:22063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22063   rm -rf conftest*
22064   ol_cv_struct_passwd_pw_gecos=yes
22065 else
22066   echo "configure: failed program was:" >&5
22067   cat conftest.$ac_ext >&5
22068   rm -rf conftest*
22069   ol_cv_struct_passwd_pw_gecos=no
22070 fi
22071 rm -f conftest*
22072 fi
22073
22074 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22075 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22076         cat >> confdefs.h <<\EOF
22077 #define HAVE_PW_GECOS 1
22078 EOF
22079
22080 fi
22081
22082 # test for pw_passwd in struct passwd
22083 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22084 echo "configure:22085: checking struct passwd for pw_passwd" >&5
22085 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22086   echo $ac_n "(cached) $ac_c" 1>&6
22087 else
22088   
22089         cat > conftest.$ac_ext <<EOF
22090 #line 22091 "configure"
22091 #include "confdefs.h"
22092 #include <pwd.h>
22093 int main() {
22094
22095         struct passwd pwd;
22096         pwd.pw_passwd = pwd.pw_name;
22097
22098 ; return 0; }
22099 EOF
22100 if { (eval echo configure:22101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22101   rm -rf conftest*
22102   ol_cv_struct_passwd_pw_passwd=yes
22103 else
22104   echo "configure: failed program was:" >&5
22105   cat conftest.$ac_ext >&5
22106   rm -rf conftest*
22107   ol_cv_struct_passwd_pw_passwd=no
22108 fi
22109 rm -f conftest*
22110 fi
22111
22112 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22113 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22114         cat >> confdefs.h <<\EOF
22115 #define HAVE_PW_PASSWD 1
22116 EOF
22117
22118 fi
22119
22120
22121 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22122 echo "configure:22123: checking if toupper() requires islower()" >&5
22123 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22124   echo $ac_n "(cached) $ac_c" 1>&6
22125 else
22126   
22127         if test "$cross_compiling" = yes; then
22128   ol_cv_c_upper_lower=safe
22129 else
22130   cat > conftest.$ac_ext <<EOF
22131 #line 22132 "configure"
22132 #include "confdefs.h"
22133
22134 #include <ctype.h>
22135 main()
22136 {
22137         if ('C' == toupper('C'))
22138                 exit(0);
22139         else
22140                 exit(1);
22141 }
22142 EOF
22143 if { (eval echo configure:22144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22144 then
22145   ol_cv_c_upper_lower=no
22146 else
22147   echo "configure: failed program was:" >&5
22148   cat conftest.$ac_ext >&5
22149   rm -fr conftest*
22150   ol_cv_c_upper_lower=yes
22151 fi
22152 rm -fr conftest*
22153 fi
22154
22155 fi
22156
22157 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22158 if test $ol_cv_c_upper_lower != no ; then
22159         cat >> confdefs.h <<\EOF
22160 #define C_UPPER_LOWER 1
22161 EOF
22162
22163 fi
22164
22165 echo $ac_n "checking for working const""... $ac_c" 1>&6
22166 echo "configure:22167: checking for working const" >&5
22167 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22168   echo $ac_n "(cached) $ac_c" 1>&6
22169 else
22170   cat > conftest.$ac_ext <<EOF
22171 #line 22172 "configure"
22172 #include "confdefs.h"
22173
22174 int main() {
22175
22176 /* Ultrix mips cc rejects this.  */
22177 typedef int charset[2]; const charset x;
22178 /* SunOS 4.1.1 cc rejects this.  */
22179 char const *const *ccp;
22180 char **p;
22181 /* NEC SVR4.0.2 mips cc rejects this.  */
22182 struct point {int x, y;};
22183 static struct point const zero = {0,0};
22184 /* AIX XL C 1.02.0.0 rejects this.
22185    It does not let you subtract one const X* pointer from another in an arm
22186    of an if-expression whose if-part is not a constant expression */
22187 const char *g = "string";
22188 ccp = &g + (g ? g-g : 0);
22189 /* HPUX 7.0 cc rejects these. */
22190 ++ccp;
22191 p = (char**) ccp;
22192 ccp = (char const *const *) p;
22193 { /* SCO 3.2v4 cc rejects this.  */
22194   char *t;
22195   char const *s = 0 ? (char *) 0 : (char const *) 0;
22196
22197   *t++ = 0;
22198 }
22199 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22200   int x[] = {25, 17};
22201   const int *foo = &x[0];
22202   ++foo;
22203 }
22204 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22205   typedef const int *iptr;
22206   iptr p = 0;
22207   ++p;
22208 }
22209 { /* AIX XL C 1.02.0.0 rejects this saying
22210      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22211   struct s { int j; const int *ap[3]; };
22212   struct s *b; b->j = 5;
22213 }
22214 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22215   const int foo = 10;
22216 }
22217
22218 ; return 0; }
22219 EOF
22220 if { (eval echo configure:22221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22221   rm -rf conftest*
22222   ac_cv_c_const=yes
22223 else
22224   echo "configure: failed program was:" >&5
22225   cat conftest.$ac_ext >&5
22226   rm -rf conftest*
22227   ac_cv_c_const=no
22228 fi
22229 rm -f conftest*
22230 fi
22231
22232 echo "$ac_t""$ac_cv_c_const" 1>&6
22233 if test $ac_cv_c_const = no; then
22234   cat >> confdefs.h <<\EOF
22235 #define const 
22236 EOF
22237
22238 fi
22239
22240 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22241 echo "configure:22242: checking if compiler understands volatile" >&5
22242 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22243   echo $ac_n "(cached) $ac_c" 1>&6
22244 else
22245   cat > conftest.$ac_ext <<EOF
22246 #line 22247 "configure"
22247 #include "confdefs.h"
22248 int x, y, z;
22249 int main() {
22250 volatile int a; int * volatile b = x ? &y : &z;
22251       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22252       *b = 0;
22253 ; return 0; }
22254 EOF
22255 if { (eval echo configure:22256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22256   rm -rf conftest*
22257   ol_cv_c_volatile=yes
22258 else
22259   echo "configure: failed program was:" >&5
22260   cat conftest.$ac_ext >&5
22261   rm -rf conftest*
22262   ol_cv_c_volatile=no
22263 fi
22264 rm -f conftest*
22265 fi
22266
22267 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22268   if test $ol_cv_c_volatile = yes; then
22269     : 
22270   else
22271     cat >> confdefs.h <<\EOF
22272 #define volatile 
22273 EOF
22274
22275   fi
22276  
22277
22278 if test $cross_compiling = yes ; then
22279         cat >> confdefs.h <<\EOF
22280 #define CROSS_COMPILING 1
22281 EOF
22282
22283 else
22284         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22285 echo "configure:22286: checking whether byte ordering is bigendian" >&5
22286 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22287   echo $ac_n "(cached) $ac_c" 1>&6
22288 else
22289   ac_cv_c_bigendian=unknown
22290 # See if sys/param.h defines the BYTE_ORDER macro.
22291 cat > conftest.$ac_ext <<EOF
22292 #line 22293 "configure"
22293 #include "confdefs.h"
22294 #include <sys/types.h>
22295 #include <sys/param.h>
22296 int main() {
22297
22298 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22299  bogus endian macros
22300 #endif
22301 ; return 0; }
22302 EOF
22303 if { (eval echo configure:22304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22304   rm -rf conftest*
22305   # It does; now see whether it defined to BIG_ENDIAN or not.
22306 cat > conftest.$ac_ext <<EOF
22307 #line 22308 "configure"
22308 #include "confdefs.h"
22309 #include <sys/types.h>
22310 #include <sys/param.h>
22311 int main() {
22312
22313 #if BYTE_ORDER != BIG_ENDIAN
22314  not big endian
22315 #endif
22316 ; return 0; }
22317 EOF
22318 if { (eval echo configure:22319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22319   rm -rf conftest*
22320   ac_cv_c_bigendian=yes
22321 else
22322   echo "configure: failed program was:" >&5
22323   cat conftest.$ac_ext >&5
22324   rm -rf conftest*
22325   ac_cv_c_bigendian=no
22326 fi
22327 rm -f conftest*
22328 else
22329   echo "configure: failed program was:" >&5
22330   cat conftest.$ac_ext >&5
22331 fi
22332 rm -f conftest*
22333 if test $ac_cv_c_bigendian = unknown; then
22334 if test "$cross_compiling" = yes; then
22335     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22336 else
22337   cat > conftest.$ac_ext <<EOF
22338 #line 22339 "configure"
22339 #include "confdefs.h"
22340 main () {
22341   /* Are we little or big endian?  From Harbison&Steele.  */
22342   union
22343   {
22344     long l;
22345     char c[sizeof (long)];
22346   } u;
22347   u.l = 1;
22348   exit (u.c[sizeof (long) - 1] == 1);
22349 }
22350 EOF
22351 if { (eval echo configure:22352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22352 then
22353   ac_cv_c_bigendian=no
22354 else
22355   echo "configure: failed program was:" >&5
22356   cat conftest.$ac_ext >&5
22357   rm -fr conftest*
22358   ac_cv_c_bigendian=yes
22359 fi
22360 rm -fr conftest*
22361 fi
22362
22363 fi
22364 fi
22365
22366 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22367 if test $ac_cv_c_bigendian = yes; then
22368   cat >> confdefs.h <<\EOF
22369 #define WORDS_BIGENDIAN 1
22370 EOF
22371
22372 fi
22373
22374 fi
22375
22376 echo $ac_n "checking size of short""... $ac_c" 1>&6
22377 echo "configure:22378: checking size of short" >&5 
22378 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22379   echo $ac_n "(cached) $ac_c" 1>&6
22380 else
22381   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22382   cat > conftest.$ac_ext <<EOF
22383 #line 22384 "configure"
22384 #include "confdefs.h"
22385 #include "confdefs.h" 
22386 #include <sys/types.h> 
22387  
22388
22389 int main() {
22390 switch (0) case 0: case (sizeof (short) == $ac_size):;
22391 ; return 0; }
22392 EOF
22393 if { (eval echo configure:22394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22394   rm -rf conftest*
22395   ac_cv_sizeof_short=$ac_size
22396 else
22397   echo "configure: failed program was:" >&5
22398   cat conftest.$ac_ext >&5
22399 fi
22400 rm -f conftest* 
22401   if test x$ac_cv_sizeof_short != x ; then break; fi 
22402 done 
22403
22404 fi
22405  
22406 if test x$ac_cv_sizeof_short = x ; then 
22407   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22408 fi 
22409 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22410 cat >> confdefs.h <<EOF
22411 #define SIZEOF_SHORT $ac_cv_sizeof_short
22412 EOF
22413  
22414  
22415 echo $ac_n "checking size of int""... $ac_c" 1>&6
22416 echo "configure:22417: checking size of int" >&5 
22417 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22418   echo $ac_n "(cached) $ac_c" 1>&6
22419 else
22420   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22421   cat > conftest.$ac_ext <<EOF
22422 #line 22423 "configure"
22423 #include "confdefs.h"
22424 #include "confdefs.h" 
22425 #include <sys/types.h> 
22426  
22427
22428 int main() {
22429 switch (0) case 0: case (sizeof (int) == $ac_size):;
22430 ; return 0; }
22431 EOF
22432 if { (eval echo configure:22433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22433   rm -rf conftest*
22434   ac_cv_sizeof_int=$ac_size
22435 else
22436   echo "configure: failed program was:" >&5
22437   cat conftest.$ac_ext >&5
22438 fi
22439 rm -f conftest* 
22440   if test x$ac_cv_sizeof_int != x ; then break; fi 
22441 done 
22442
22443 fi
22444  
22445 if test x$ac_cv_sizeof_int = x ; then 
22446   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22447 fi 
22448 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22449 cat >> confdefs.h <<EOF
22450 #define SIZEOF_INT $ac_cv_sizeof_int
22451 EOF
22452  
22453  
22454 echo $ac_n "checking size of long""... $ac_c" 1>&6
22455 echo "configure:22456: checking size of long" >&5 
22456 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22457   echo $ac_n "(cached) $ac_c" 1>&6
22458 else
22459   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22460   cat > conftest.$ac_ext <<EOF
22461 #line 22462 "configure"
22462 #include "confdefs.h"
22463 #include "confdefs.h" 
22464 #include <sys/types.h> 
22465  
22466
22467 int main() {
22468 switch (0) case 0: case (sizeof (long) == $ac_size):;
22469 ; return 0; }
22470 EOF
22471 if { (eval echo configure:22472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22472   rm -rf conftest*
22473   ac_cv_sizeof_long=$ac_size
22474 else
22475   echo "configure: failed program was:" >&5
22476   cat conftest.$ac_ext >&5
22477 fi
22478 rm -f conftest* 
22479   if test x$ac_cv_sizeof_long != x ; then break; fi 
22480 done 
22481
22482 fi
22483  
22484 if test x$ac_cv_sizeof_long = x ; then 
22485   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22486 fi 
22487 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22488 cat >> confdefs.h <<EOF
22489 #define SIZEOF_LONG $ac_cv_sizeof_long
22490 EOF
22491  
22492
22493
22494 if test "$ac_cv_sizeof_int" -lt 4 ; then
22495         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22496
22497         cat >> confdefs.h <<\EOF
22498 #define LBER_INT_T long
22499 EOF
22500
22501 else
22502         cat >> confdefs.h <<\EOF
22503 #define LBER_INT_T int
22504 EOF
22505
22506 fi
22507
22508 cat >> confdefs.h <<\EOF
22509 #define LBER_LEN_T long
22510 EOF
22511
22512 cat >> confdefs.h <<\EOF
22513 #define LBER_SOCKET_T int
22514 EOF
22515
22516 cat >> confdefs.h <<\EOF
22517 #define LBER_TAG_T long
22518 EOF
22519
22520
22521 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22522 echo "configure:22523: checking for 8-bit clean memcmp" >&5
22523 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22524   echo $ac_n "(cached) $ac_c" 1>&6
22525 else
22526   if test "$cross_compiling" = yes; then
22527   ac_cv_func_memcmp_clean=no
22528 else
22529   cat > conftest.$ac_ext <<EOF
22530 #line 22531 "configure"
22531 #include "confdefs.h"
22532
22533 main()
22534 {
22535   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22536   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22537 }
22538
22539 EOF
22540 if { (eval echo configure:22541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22541 then
22542   ac_cv_func_memcmp_clean=yes
22543 else
22544   echo "configure: failed program was:" >&5
22545   cat conftest.$ac_ext >&5
22546   rm -fr conftest*
22547   ac_cv_func_memcmp_clean=no
22548 fi
22549 rm -fr conftest*
22550 fi
22551
22552 fi
22553
22554 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22555 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22556
22557 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22558 echo "configure:22559: checking for strftime" >&5
22559 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22560   echo $ac_n "(cached) $ac_c" 1>&6
22561 else
22562   cat > conftest.$ac_ext <<EOF
22563 #line 22564 "configure"
22564 #include "confdefs.h"
22565 /* System header to define __stub macros and hopefully few prototypes,
22566     which can conflict with char strftime(); below.  */
22567 #include <assert.h>
22568 /* Override any gcc2 internal prototype to avoid an error.  */
22569 /* We use char because int might match the return type of a gcc2
22570     builtin and then its argument prototype would still apply.  */
22571 char strftime();
22572 char (*f)();
22573
22574 int main() {
22575
22576 /* The GNU C library defines this for functions which it implements
22577     to always fail with ENOSYS.  Some functions are actually named
22578     something starting with __ and the normal name is an alias.  */
22579 #if defined (__stub_strftime) || defined (__stub___strftime)
22580 choke me
22581 #else
22582 f = strftime;
22583 #endif
22584
22585 ; return 0; }
22586 EOF
22587 if { (eval echo configure:22588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22588   rm -rf conftest*
22589   eval "ac_cv_func_strftime=yes"
22590 else
22591   echo "configure: failed program was:" >&5
22592   cat conftest.$ac_ext >&5
22593   rm -rf conftest*
22594   eval "ac_cv_func_strftime=no"
22595 fi
22596 rm -f conftest*
22597 fi
22598
22599 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22600   echo "$ac_t""yes" 1>&6
22601   cat >> confdefs.h <<\EOF
22602 #define HAVE_STRFTIME 1
22603 EOF
22604
22605 else
22606   echo "$ac_t""no" 1>&6
22607 # strftime is in -lintl on SCO UNIX.
22608 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22609 echo "configure:22610: checking for strftime in -lintl" >&5
22610 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22611 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22612   echo $ac_n "(cached) $ac_c" 1>&6
22613 else
22614   ac_save_LIBS="$LIBS"
22615 LIBS="-lintl  $LIBS"
22616 cat > conftest.$ac_ext <<EOF
22617 #line 22618 "configure"
22618 #include "confdefs.h"
22619 /* Override any gcc2 internal prototype to avoid an error.  */
22620 /* We use char because int might match the return type of a gcc2
22621     builtin and then its argument prototype would still apply.  */
22622 char strftime();
22623
22624 int main() {
22625 strftime()
22626 ; return 0; }
22627 EOF
22628 if { (eval echo configure:22629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22629   rm -rf conftest*
22630   eval "ac_cv_lib_$ac_lib_var=yes"
22631 else
22632   echo "configure: failed program was:" >&5
22633   cat conftest.$ac_ext >&5
22634   rm -rf conftest*
22635   eval "ac_cv_lib_$ac_lib_var=no"
22636 fi
22637 rm -f conftest*
22638 LIBS="$ac_save_LIBS"
22639
22640 fi
22641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22642   echo "$ac_t""yes" 1>&6
22643   cat >> confdefs.h <<\EOF
22644 #define HAVE_STRFTIME 1
22645 EOF
22646
22647 LIBS="-lintl $LIBS"
22648 else
22649   echo "$ac_t""no" 1>&6
22650 fi
22651
22652 fi
22653
22654
22655 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22656 echo "configure:22657: checking for inet_aton()" >&5
22657 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22658   echo $ac_n "(cached) $ac_c" 1>&6
22659 else
22660   cat > conftest.$ac_ext <<EOF
22661 #line 22662 "configure"
22662 #include "confdefs.h"
22663
22664 #ifdef HAVE_SYS_TYPES_H
22665 #       include <sys/types.h>
22666 #endif
22667 #ifdef HAVE_SYS_SOCKET_H
22668 #       include <sys/socket.h>
22669 #       ifdef HAVE_SYS_SELECT_H
22670 #               include <sys/select.h>
22671 #       endif
22672 #       include <netinet/in.h>
22673 #       ifdef HAVE_ARPA_INET_H
22674 #               include <arpa/inet.h>
22675 #       endif
22676 #endif
22677
22678 int main() {
22679 struct in_addr in;
22680 int rc = inet_aton( "255.255.255.255", &in );
22681 ; return 0; }
22682 EOF
22683 if { (eval echo configure:22684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22684   rm -rf conftest*
22685   ol_cv_func_inet_aton=yes
22686 else
22687   echo "configure: failed program was:" >&5
22688   cat conftest.$ac_ext >&5
22689   rm -rf conftest*
22690   ol_cv_func_inet_aton=no
22691 fi
22692 rm -f conftest*
22693 fi
22694
22695 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22696   if test $ol_cv_func_inet_aton != no; then
22697     cat >> confdefs.h <<\EOF
22698 #define HAVE_INET_ATON 1
22699 EOF
22700
22701   fi
22702  
22703
22704 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22705 echo "configure:22706: checking for _spawnlp" >&5
22706 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22707   echo $ac_n "(cached) $ac_c" 1>&6
22708 else
22709   cat > conftest.$ac_ext <<EOF
22710 #line 22711 "configure"
22711 #include "confdefs.h"
22712 /* System header to define __stub macros and hopefully few prototypes,
22713     which can conflict with char _spawnlp(); below.  */
22714 #include <assert.h>
22715 /* Override any gcc2 internal prototype to avoid an error.  */
22716 /* We use char because int might match the return type of a gcc2
22717     builtin and then its argument prototype would still apply.  */
22718 char _spawnlp();
22719 char (*f)();
22720
22721 int main() {
22722
22723 /* The GNU C library defines this for functions which it implements
22724     to always fail with ENOSYS.  Some functions are actually named
22725     something starting with __ and the normal name is an alias.  */
22726 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22727 choke me
22728 #else
22729 f = _spawnlp;
22730 #endif
22731
22732 ; return 0; }
22733 EOF
22734 if { (eval echo configure:22735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22735   rm -rf conftest*
22736   eval "ac_cv_func__spawnlp=yes"
22737 else
22738   echo "configure: failed program was:" >&5
22739   cat conftest.$ac_ext >&5
22740   rm -rf conftest*
22741   eval "ac_cv_func__spawnlp=no"
22742 fi
22743 rm -f conftest*
22744 fi
22745
22746 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22747   echo "$ac_t""yes" 1>&6
22748   cat >> confdefs.h <<\EOF
22749 #define HAVE_SPAWNLP 1
22750 EOF
22751
22752 else
22753   echo "$ac_t""no" 1>&6
22754 fi
22755
22756
22757 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22758 echo "configure:22759: checking for _snprintf" >&5
22759 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22760   echo $ac_n "(cached) $ac_c" 1>&6
22761 else
22762   cat > conftest.$ac_ext <<EOF
22763 #line 22764 "configure"
22764 #include "confdefs.h"
22765 /* System header to define __stub macros and hopefully few prototypes,
22766     which can conflict with char _snprintf(); below.  */
22767 #include <assert.h>
22768 /* Override any gcc2 internal prototype to avoid an error.  */
22769 /* We use char because int might match the return type of a gcc2
22770     builtin and then its argument prototype would still apply.  */
22771 char _snprintf();
22772 char (*f)();
22773
22774 int main() {
22775
22776 /* The GNU C library defines this for functions which it implements
22777     to always fail with ENOSYS.  Some functions are actually named
22778     something starting with __ and the normal name is an alias.  */
22779 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22780 choke me
22781 #else
22782 f = _snprintf;
22783 #endif
22784
22785 ; return 0; }
22786 EOF
22787 if { (eval echo configure:22788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22788   rm -rf conftest*
22789   eval "ac_cv_func__snprintf=yes"
22790 else
22791   echo "configure: failed program was:" >&5
22792   cat conftest.$ac_ext >&5
22793   rm -rf conftest*
22794   eval "ac_cv_func__snprintf=no"
22795 fi
22796 rm -f conftest*
22797 fi
22798
22799 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22800   echo "$ac_t""yes" 1>&6
22801   ac_cv_func_snprintf=yes
22802         cat >> confdefs.h <<\EOF
22803 #define snprintf _snprintf
22804 EOF
22805
22806
22807 else
22808   echo "$ac_t""no" 1>&6
22809 fi
22810
22811
22812 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22813 echo "configure:22814: checking for _vsnprintf" >&5
22814 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22815   echo $ac_n "(cached) $ac_c" 1>&6
22816 else
22817   cat > conftest.$ac_ext <<EOF
22818 #line 22819 "configure"
22819 #include "confdefs.h"
22820 /* System header to define __stub macros and hopefully few prototypes,
22821     which can conflict with char _vsnprintf(); below.  */
22822 #include <assert.h>
22823 /* Override any gcc2 internal prototype to avoid an error.  */
22824 /* We use char because int might match the return type of a gcc2
22825     builtin and then its argument prototype would still apply.  */
22826 char _vsnprintf();
22827 char (*f)();
22828
22829 int main() {
22830
22831 /* The GNU C library defines this for functions which it implements
22832     to always fail with ENOSYS.  Some functions are actually named
22833     something starting with __ and the normal name is an alias.  */
22834 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22835 choke me
22836 #else
22837 f = _vsnprintf;
22838 #endif
22839
22840 ; return 0; }
22841 EOF
22842 if { (eval echo configure:22843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22843   rm -rf conftest*
22844   eval "ac_cv_func__vsnprintf=yes"
22845 else
22846   echo "configure: failed program was:" >&5
22847   cat conftest.$ac_ext >&5
22848   rm -rf conftest*
22849   eval "ac_cv_func__vsnprintf=no"
22850 fi
22851 rm -f conftest*
22852 fi
22853
22854 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22855   echo "$ac_t""yes" 1>&6
22856   ac_cv_func_vsnprintf=yes
22857         cat >> confdefs.h <<\EOF
22858 #define vsnprintf _vsnprintf
22859 EOF
22860
22861
22862 else
22863   echo "$ac_t""no" 1>&6
22864 fi
22865
22866
22867 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22868 echo "configure:22869: checking for vprintf" >&5
22869 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22870   echo $ac_n "(cached) $ac_c" 1>&6
22871 else
22872   cat > conftest.$ac_ext <<EOF
22873 #line 22874 "configure"
22874 #include "confdefs.h"
22875 /* System header to define __stub macros and hopefully few prototypes,
22876     which can conflict with char vprintf(); below.  */
22877 #include <assert.h>
22878 /* Override any gcc2 internal prototype to avoid an error.  */
22879 /* We use char because int might match the return type of a gcc2
22880     builtin and then its argument prototype would still apply.  */
22881 char vprintf();
22882 char (*f)();
22883
22884 int main() {
22885
22886 /* The GNU C library defines this for functions which it implements
22887     to always fail with ENOSYS.  Some functions are actually named
22888     something starting with __ and the normal name is an alias.  */
22889 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22890 choke me
22891 #else
22892 f = vprintf;
22893 #endif
22894
22895 ; return 0; }
22896 EOF
22897 if { (eval echo configure:22898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22898   rm -rf conftest*
22899   eval "ac_cv_func_vprintf=yes"
22900 else
22901   echo "configure: failed program was:" >&5
22902   cat conftest.$ac_ext >&5
22903   rm -rf conftest*
22904   eval "ac_cv_func_vprintf=no"
22905 fi
22906 rm -f conftest*
22907 fi
22908
22909 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22910   echo "$ac_t""yes" 1>&6
22911   cat >> confdefs.h <<\EOF
22912 #define HAVE_VPRINTF 1
22913 EOF
22914
22915 else
22916   echo "$ac_t""no" 1>&6
22917 fi
22918
22919 if test "$ac_cv_func_vprintf" != yes; then
22920 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22921 echo "configure:22922: checking for _doprnt" >&5
22922 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22923   echo $ac_n "(cached) $ac_c" 1>&6
22924 else
22925   cat > conftest.$ac_ext <<EOF
22926 #line 22927 "configure"
22927 #include "confdefs.h"
22928 /* System header to define __stub macros and hopefully few prototypes,
22929     which can conflict with char _doprnt(); below.  */
22930 #include <assert.h>
22931 /* Override any gcc2 internal prototype to avoid an error.  */
22932 /* We use char because int might match the return type of a gcc2
22933     builtin and then its argument prototype would still apply.  */
22934 char _doprnt();
22935 char (*f)();
22936
22937 int main() {
22938
22939 /* The GNU C library defines this for functions which it implements
22940     to always fail with ENOSYS.  Some functions are actually named
22941     something starting with __ and the normal name is an alias.  */
22942 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22943 choke me
22944 #else
22945 f = _doprnt;
22946 #endif
22947
22948 ; return 0; }
22949 EOF
22950 if { (eval echo configure:22951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22951   rm -rf conftest*
22952   eval "ac_cv_func__doprnt=yes"
22953 else
22954   echo "configure: failed program was:" >&5
22955   cat conftest.$ac_ext >&5
22956   rm -rf conftest*
22957   eval "ac_cv_func__doprnt=no"
22958 fi
22959 rm -f conftest*
22960 fi
22961
22962 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22963   echo "$ac_t""yes" 1>&6
22964   cat >> confdefs.h <<\EOF
22965 #define HAVE_DOPRNT 1
22966 EOF
22967
22968 else
22969   echo "$ac_t""no" 1>&6
22970 fi
22971
22972 fi
22973
22974
22975 if test $ac_cv_func_vprintf = yes ; then
22976                 for ac_func in snprintf vsnprintf
22977 do
22978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22979 echo "configure:22980: checking for $ac_func" >&5
22980 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22981   echo $ac_n "(cached) $ac_c" 1>&6
22982 else
22983   cat > conftest.$ac_ext <<EOF
22984 #line 22985 "configure"
22985 #include "confdefs.h"
22986 /* System header to define __stub macros and hopefully few prototypes,
22987     which can conflict with char $ac_func(); below.  */
22988 #include <assert.h>
22989 /* Override any gcc2 internal prototype to avoid an error.  */
22990 /* We use char because int might match the return type of a gcc2
22991     builtin and then its argument prototype would still apply.  */
22992 char $ac_func();
22993 char (*f)();
22994
22995 int main() {
22996
22997 /* The GNU C library defines this for functions which it implements
22998     to always fail with ENOSYS.  Some functions are actually named
22999     something starting with __ and the normal name is an alias.  */
23000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23001 choke me
23002 #else
23003 f = $ac_func;
23004 #endif
23005
23006 ; return 0; }
23007 EOF
23008 if { (eval echo configure:23009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23009   rm -rf conftest*
23010   eval "ac_cv_func_$ac_func=yes"
23011 else
23012   echo "configure: failed program was:" >&5
23013   cat conftest.$ac_ext >&5
23014   rm -rf conftest*
23015   eval "ac_cv_func_$ac_func=no"
23016 fi
23017 rm -f conftest*
23018 fi
23019
23020 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23021   echo "$ac_t""yes" 1>&6
23022     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23023   cat >> confdefs.h <<EOF
23024 #define $ac_tr_func 1
23025 EOF
23026  
23027 else
23028   echo "$ac_t""no" 1>&6
23029 fi
23030 done
23031
23032 fi
23033
23034 for ac_func in \
23035         bcopy                   \
23036         closesocket             \
23037         chroot                  \
23038         endgrent                \
23039         endpwent                \
23040         fcntl                   \
23041         flock                   \
23042         fstat                   \
23043         getdtablesize   \
23044         getgrgid                \
23045         gethostname             \
23046         getpass                 \
23047         getpassphrase   \
23048         getpwuid                \
23049         getpwnam                \
23050         getspnam                \
23051         gettimeofday    \
23052         initgroups              \
23053         lockf                   \
23054         memcpy                  \
23055         memmove                 \
23056         mkstemp                 \
23057         mktemp                  \
23058         pipe                    \
23059         read                    \
23060         recv                    \
23061         recvfrom                \
23062         setpwfile               \
23063         setgid                  \
23064         setegid                 \
23065         setsid                  \
23066         setuid                  \
23067         seteuid                 \
23068         sigaction               \
23069         signal                  \
23070         sigset                  \
23071         strdup                  \
23072         strerror                \
23073         strpbrk                 \
23074         strrchr                 \
23075         strsep                  \
23076         strstr                  \
23077         strtol                  \
23078         strtoul                 \
23079         strtoq                  \
23080         strtouq                 \
23081         strtoll                 \
23082         strspn                  \
23083         sysconf                 \
23084         usleep                  \
23085         waitpid                 \
23086         wait4                   \
23087         write                   \
23088         send                    \
23089         sendmsg                 \
23090         sendto                  \
23091
23092 do
23093 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23094 echo "configure:23095: checking for $ac_func" >&5
23095 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23096   echo $ac_n "(cached) $ac_c" 1>&6
23097 else
23098   cat > conftest.$ac_ext <<EOF
23099 #line 23100 "configure"
23100 #include "confdefs.h"
23101 /* System header to define __stub macros and hopefully few prototypes,
23102     which can conflict with char $ac_func(); below.  */
23103 #include <assert.h>
23104 /* Override any gcc2 internal prototype to avoid an error.  */
23105 /* We use char because int might match the return type of a gcc2
23106     builtin and then its argument prototype would still apply.  */
23107 char $ac_func();
23108 char (*f)();
23109
23110 int main() {
23111
23112 /* The GNU C library defines this for functions which it implements
23113     to always fail with ENOSYS.  Some functions are actually named
23114     something starting with __ and the normal name is an alias.  */
23115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23116 choke me
23117 #else
23118 f = $ac_func;
23119 #endif
23120
23121 ; return 0; }
23122 EOF
23123 if { (eval echo configure:23124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23124   rm -rf conftest*
23125   eval "ac_cv_func_$ac_func=yes"
23126 else
23127   echo "configure: failed program was:" >&5
23128   cat conftest.$ac_ext >&5
23129   rm -rf conftest*
23130   eval "ac_cv_func_$ac_func=no"
23131 fi
23132 rm -f conftest*
23133 fi
23134
23135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23136   echo "$ac_t""yes" 1>&6
23137     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23138   cat >> confdefs.h <<EOF
23139 #define $ac_tr_func 1
23140 EOF
23141  
23142 else
23143   echo "$ac_t""no" 1>&6
23144 fi
23145 done
23146
23147
23148 for ac_func in getopt getpeereid
23149 do
23150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23151 echo "configure:23152: checking for $ac_func" >&5
23152 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23153   echo $ac_n "(cached) $ac_c" 1>&6
23154 else
23155   cat > conftest.$ac_ext <<EOF
23156 #line 23157 "configure"
23157 #include "confdefs.h"
23158 /* System header to define __stub macros and hopefully few prototypes,
23159     which can conflict with char $ac_func(); below.  */
23160 #include <assert.h>
23161 /* Override any gcc2 internal prototype to avoid an error.  */
23162 /* We use char because int might match the return type of a gcc2
23163     builtin and then its argument prototype would still apply.  */
23164 char $ac_func();
23165 char (*f)();
23166
23167 int main() {
23168
23169 /* The GNU C library defines this for functions which it implements
23170     to always fail with ENOSYS.  Some functions are actually named
23171     something starting with __ and the normal name is an alias.  */
23172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23173 choke me
23174 #else
23175 f = $ac_func;
23176 #endif
23177
23178 ; return 0; }
23179 EOF
23180 if { (eval echo configure:23181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23181   rm -rf conftest*
23182   eval "ac_cv_func_$ac_func=yes"
23183 else
23184   echo "configure: failed program was:" >&5
23185   cat conftest.$ac_ext >&5
23186   rm -rf conftest*
23187   eval "ac_cv_func_$ac_func=no"
23188 fi
23189 rm -f conftest*
23190 fi
23191
23192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23193   echo "$ac_t""yes" 1>&6
23194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23195   cat >> confdefs.h <<EOF
23196 #define $ac_tr_func 1
23197 EOF
23198  
23199 else
23200   echo "$ac_t""no" 1>&6
23201 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23202 fi
23203 done
23204
23205
23206
23207 if test "$ac_cv_func_getopt" != yes; then
23208         LIBSRCS="$LIBSRCS getopt.c"
23209 fi
23210 if test "$ac_cv_func_getpeereid" != yes; then
23211         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23212 echo "configure:23213: checking for msg_accrights in msghdr" >&5
23213 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23214   echo $ac_n "(cached) $ac_c" 1>&6
23215 else
23216   cat > conftest.$ac_ext <<EOF
23217 #line 23218 "configure"
23218 #include "confdefs.h"
23219 #include <sys/socket.h>
23220 int main() {
23221 struct msghdr m; m.msg_accrightslen=0
23222 ; return 0; }
23223 EOF
23224 if { (eval echo configure:23225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23225   rm -rf conftest*
23226   ol_cv_msghdr_msg_accrights=yes
23227 else
23228   echo "configure: failed program was:" >&5
23229   cat conftest.$ac_ext >&5
23230   rm -rf conftest*
23231   ol_cv_msghdr_msg_accrights=no
23232 fi
23233 rm -f conftest*
23234         
23235 fi
23236
23237 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23238   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23239         cat >> confdefs.h <<\EOF
23240 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23241 EOF
23242
23243   fi
23244
23245         LIBSRCS="$LIBSRCS getpeereid.c"
23246 fi
23247 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23248         if test "$ac_cv_func_snprintf" != yes; then
23249                 cat >> confdefs.h <<\EOF
23250 #define snprintf ber_pvt_snprintf
23251 EOF
23252
23253         fi
23254         if test "$ac_cv_func_vsnprintf" != yes; then
23255                 cat >> confdefs.h <<\EOF
23256 #define vsnprintf ber_pvt_vsnprintf
23257 EOF
23258
23259         fi
23260 fi
23261
23262 # Check Configuration
23263 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23264 echo "configure:23265: checking declaration of sys_errlist" >&5
23265 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23266   echo $ac_n "(cached) $ac_c" 1>&6
23267 else
23268   
23269         cat > conftest.$ac_ext <<EOF
23270 #line 23271 "configure"
23271 #include "confdefs.h"
23272
23273 #include <stdio.h>
23274 #include <sys/types.h>
23275 #include <errno.h>
23276 #ifdef WINNT
23277 #include <stdlib.h>
23278 #endif 
23279 int main() {
23280 char *c = (char *) *sys_errlist
23281 ; return 0; }
23282 EOF
23283 if { (eval echo configure:23284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23284   rm -rf conftest*
23285   ol_cv_dcl_sys_errlist=yes
23286         ol_cv_have_sys_errlist=yes
23287 else
23288   echo "configure: failed program was:" >&5
23289   cat conftest.$ac_ext >&5
23290   rm -rf conftest*
23291   ol_cv_dcl_sys_errlist=no
23292 fi
23293 rm -f conftest*
23294 fi
23295
23296 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23297 #
23298 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23299 if test $ol_cv_dcl_sys_errlist = no ; then
23300         cat >> confdefs.h <<\EOF
23301 #define DECL_SYS_ERRLIST 1
23302 EOF
23303
23304
23305         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23306 echo "configure:23307: checking existence of sys_errlist" >&5
23307 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23308   echo $ac_n "(cached) $ac_c" 1>&6
23309 else
23310   
23311                 cat > conftest.$ac_ext <<EOF
23312 #line 23313 "configure"
23313 #include "confdefs.h"
23314 #include <errno.h>
23315 int main() {
23316 char *c = (char *) *sys_errlist
23317 ; return 0; }
23318 EOF
23319 if { (eval echo configure:23320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23320   rm -rf conftest*
23321   ol_cv_have_sys_errlist=yes
23322 else
23323   echo "configure: failed program was:" >&5
23324   cat conftest.$ac_ext >&5
23325   rm -rf conftest*
23326   ol_cv_have_sys_errlist=no
23327 fi
23328 rm -f conftest*
23329 fi
23330
23331 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23332 fi
23333 if test $ol_cv_have_sys_errlist = yes ; then
23334         cat >> confdefs.h <<\EOF
23335 #define HAVE_SYS_ERRLIST 1
23336 EOF
23337
23338 fi
23339
23340
23341
23342 if test "$ol_enable_slapi" != no ; then
23343                         for ac_hdr in ltdl.h
23344 do
23345 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23346 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23347 echo "configure:23348: checking for $ac_hdr" >&5
23348 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23349   echo $ac_n "(cached) $ac_c" 1>&6
23350 else
23351   cat > conftest.$ac_ext <<EOF
23352 #line 23353 "configure"
23353 #include "confdefs.h"
23354 #include <$ac_hdr>
23355 EOF
23356 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23357 { (eval echo configure:23358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23358 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23359 if test -z "$ac_err"; then
23360   rm -rf conftest*
23361   eval "ac_cv_header_$ac_safe=yes"
23362 else
23363   echo "$ac_err" >&5
23364   echo "configure: failed program was:" >&5
23365   cat conftest.$ac_ext >&5
23366   rm -rf conftest*
23367   eval "ac_cv_header_$ac_safe=no"
23368 fi
23369 rm -f conftest*
23370 fi
23371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23372   echo "$ac_t""yes" 1>&6
23373     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23374   cat >> confdefs.h <<EOF
23375 #define $ac_tr_hdr 1
23376 EOF
23377  
23378 else
23379   echo "$ac_t""no" 1>&6
23380 fi
23381 done
23382
23383
23384         if test $ac_cv_header_ltdl_h != yes ; then
23385                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23386         fi
23387         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23388 echo "configure:23389: checking for lt_dlinit in -lltdl" >&5
23389 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23391   echo $ac_n "(cached) $ac_c" 1>&6
23392 else
23393   ac_save_LIBS="$LIBS"
23394 LIBS="-lltdl  $LIBS"
23395 cat > conftest.$ac_ext <<EOF
23396 #line 23397 "configure"
23397 #include "confdefs.h"
23398 /* Override any gcc2 internal prototype to avoid an error.  */
23399 /* We use char because int might match the return type of a gcc2
23400     builtin and then its argument prototype would still apply.  */
23401 char lt_dlinit();
23402
23403 int main() {
23404 lt_dlinit()
23405 ; return 0; }
23406 EOF
23407 if { (eval echo configure:23408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23408   rm -rf conftest*
23409   eval "ac_cv_lib_$ac_lib_var=yes"
23410 else
23411   echo "configure: failed program was:" >&5
23412   cat conftest.$ac_ext >&5
23413   rm -rf conftest*
23414   eval "ac_cv_lib_$ac_lib_var=no"
23415 fi
23416 rm -f conftest*
23417 LIBS="$ac_save_LIBS"
23418
23419 fi
23420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23421   echo "$ac_t""yes" 1>&6
23422   
23423                 SLAPI_LIBS=-lltdl
23424                 LIBSLAPI=libslapi.a
23425                 LIBSLAPITOOLS=../libslapi.a
23426                 cat >> confdefs.h <<\EOF
23427 #define HAVE_LIBLTDL 1
23428 EOF
23429
23430         
23431 else
23432   echo "$ac_t""no" 1>&6
23433 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23434 fi
23435
23436
23437         cat >> confdefs.h <<\EOF
23438 #define LDAP_SLAPI 1
23439 EOF
23440
23441 fi
23442
23443 if test "$ol_enable_debug" != no ; then
23444         cat >> confdefs.h <<\EOF
23445 #define LDAP_DEBUG 1
23446 EOF
23447
23448 fi
23449 if test "$ol_enable_syslog" = yes ; then
23450         cat >> confdefs.h <<\EOF
23451 #define LDAP_SYSLOG 1
23452 EOF
23453
23454 fi
23455 if test "$ol_link_kbind" != no ; then
23456         cat >> confdefs.h <<\EOF
23457 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23458 EOF
23459
23460 fi
23461 if test "$ol_enable_proctitle" != no ; then
23462         cat >> confdefs.h <<\EOF
23463 #define LDAP_PROCTITLE 1
23464 EOF
23465
23466 fi
23467 if test "$ol_enable_referrals" != no ; then
23468         cat >> confdefs.h <<\EOF
23469 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23470 EOF
23471
23472 fi
23473 if test "$ol_enable_local" != no; then
23474         cat >> confdefs.h <<\EOF
23475 #define LDAP_PF_LOCAL 1
23476 EOF
23477
23478 fi
23479 if test "$ol_link_ipv6" != no; then
23480         cat >> confdefs.h <<\EOF
23481 #define LDAP_PF_INET6 1
23482 EOF
23483
23484 fi
23485 if test "$ol_enable_cleartext" != no ; then
23486         cat >> confdefs.h <<\EOF
23487 #define SLAPD_CLEARTEXT 1
23488 EOF
23489
23490 fi
23491 if test "$ol_enable_crypt" != no ; then
23492         cat >> confdefs.h <<\EOF
23493 #define SLAPD_CRYPT 1
23494 EOF
23495
23496 fi
23497 if test "$ol_link_kpasswd" != no ; then
23498         cat >> confdefs.h <<\EOF
23499 #define SLAPD_KPASSWD 1
23500 EOF
23501
23502 fi
23503 if test "$ol_link_spasswd" != no ; then
23504         cat >> confdefs.h <<\EOF
23505 #define SLAPD_SPASSWD 1
23506 EOF
23507
23508 fi
23509 if test "$ol_enable_multimaster" != no ; then
23510         cat >> confdefs.h <<\EOF
23511 #define SLAPD_MULTIMASTER 1
23512 EOF
23513
23514 fi
23515 if test "$ol_enable_rlookups" != no ; then
23516         cat >> confdefs.h <<\EOF
23517 #define SLAPD_RLOOKUPS 1
23518 EOF
23519
23520 fi
23521 if test "$ol_enable_aci" != no ; then
23522         cat >> confdefs.h <<\EOF
23523 #define SLAPD_ACI_ENABLED 1
23524 EOF
23525
23526 fi
23527
23528 if test "$ol_link_modules" != no ; then
23529         cat >> confdefs.h <<\EOF
23530 #define SLAPD_MODULES 1
23531 EOF
23532
23533         BUILD_SLAPD=yes
23534         SLAPD_MODULES_LDFLAGS="-dlopen self"
23535 fi
23536
23537 cat >> confdefs.h <<\EOF
23538 #define SLAPD_MOD_STATIC 1
23539 EOF
23540
23541 cat >> confdefs.h <<\EOF
23542 #define SLAPD_MOD_DYNAMIC 2
23543 EOF
23544
23545
23546 if test "$ol_enable_bdb" != no ; then
23547         cat >> confdefs.h <<\EOF
23548 #define SLAPD_BDB 1
23549 EOF
23550
23551         BUILD_SLAPD=yes
23552         BUILD_BDB=yes
23553         if test "$ol_with_bdb_module" != static ; then
23554                 cat >> confdefs.h <<\EOF
23555 #define SLAPD_BDB_DYNAMIC 1
23556 EOF
23557
23558                 BUILD_BDB=mod
23559                 BUILD_BDB_DYNAMIC=shared
23560                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23561         else
23562                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23563         fi
23564 fi
23565
23566 if test "$ol_link_dnssrv" != no ; then
23567         cat >> confdefs.h <<\EOF
23568 #define SLAPD_DNSSRV 1
23569 EOF
23570
23571         BUILD_SLAPD=yes
23572         BUILD_DNSSRV=yes
23573         if test "$ol_with_dnssrv_module" != static ; then
23574                 cat >> confdefs.h <<\EOF
23575 #define SLAPD_DNSSRV_DYNAMIC 1
23576 EOF
23577
23578                 BUILD_DNSSRV=mod
23579                 BUILD_DNSSRV_DYNAMIC=shared
23580                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23581         else
23582                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23583         fi
23584 fi
23585
23586 if test "$ol_enable_hdb" != no ; then
23587         cat >> confdefs.h <<\EOF
23588 #define SLAPD_HDB 1
23589 EOF
23590
23591         BUILD_SLAPD=yes
23592         BUILD_HDB=yes
23593         if test "$ol_with_hdb_module" != static ; then
23594                 cat >> confdefs.h <<\EOF
23595 #define SLAPD_HDB_DYNAMIC 1
23596 EOF
23597
23598                 BUILD_HDB=mod
23599                 BUILD_HDB_DYNAMIC=shared
23600                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23601         else
23602                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23603         fi
23604 fi
23605
23606 if test "$ol_enable_ldap" != no ; then
23607         cat >> confdefs.h <<\EOF
23608 #define SLAPD_LDAP 1
23609 EOF
23610
23611         BUILD_SLAPD=yes
23612         BUILD_LDAP=yes
23613         if test "$ol_with_ldap_module" != static ; then
23614                 cat >> confdefs.h <<\EOF
23615 #define SLAPD_LDAP_DYNAMIC 1
23616 EOF
23617
23618                 BUILD_LDAP=mod
23619                 BUILD_LDAP_DYNAMIC=shared
23620                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23621         else
23622                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23623         fi
23624 fi
23625
23626 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23627         cat >> confdefs.h <<\EOF
23628 #define SLAPD_LDBM 1
23629 EOF
23630
23631         BUILD_SLAPD=yes
23632         BUILD_LDBM=yes
23633         if test "$ol_with_ldbm_module" != static ; then
23634                 cat >> confdefs.h <<\EOF
23635 #define SLAPD_LDBM_DYNAMIC 1
23636 EOF
23637
23638                 BUILD_LDBM=mod
23639                 BUILD_LDBM_DYNAMIC=shared
23640                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23641         else
23642                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23643         fi
23644 fi
23645
23646 if test "$ol_enable_meta" != no ; then
23647         if test "$ol_enable_ldap" = no ; then
23648                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23649         fi
23650         if test "$ol_enable_rewrite" = no ; then
23651                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23652         fi
23653         cat >> confdefs.h <<\EOF
23654 #define SLAPD_META 1
23655 EOF
23656
23657         BUILD_SLAPD=yes
23658         BUILD_META=yes
23659         BUILD_REWRITE=yes
23660         if test "$ol_with_meta_module" != static ; then
23661                 cat >> confdefs.h <<\EOF
23662 #define SLAPD_META_DYNAMIC 1
23663 EOF
23664
23665                 BUILD_META=mod
23666                 BUILD_META_DYNAMIC=shared
23667                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23668         else
23669                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23670         fi
23671 fi
23672
23673 if test "$ol_enable_monitor" != no ; then
23674         cat >> confdefs.h <<\EOF
23675 #define SLAPD_MONITOR 1
23676 EOF
23677
23678         BUILD_SLAPD=yes
23679         BUILD_MONITOR=yes
23680         if test "$ol_with_monitor_module" != static ; then
23681                 cat >> confdefs.h <<\EOF
23682 #define SLAPD_MONITOR_DYNAMIC 1
23683 EOF
23684
23685                 BUILD_MONITOR=mod
23686                 BUILD_MONITOR_DYNAMIC=shared
23687                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23688         else
23689                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23690         fi
23691 fi
23692
23693 if test "$ol_enable_null" != no ; then
23694         cat >> confdefs.h <<\EOF
23695 #define SLAPD_NULL 1
23696 EOF
23697
23698         BUILD_SLAPD=yes
23699         BUILD_NULL=yes
23700         if test "$ol_with_null_module" != static ; then
23701                 cat >> confdefs.h <<\EOF
23702 #define SLAPD_NULL_DYNAMIC 1
23703 EOF
23704
23705                 BUILD_NULL=mod
23706                 BUILD_NULL_DYNAMIC=shared
23707                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23708         else
23709                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23710         fi
23711 fi
23712
23713 if test "$ol_enable_passwd" != no ; then
23714         cat >> confdefs.h <<\EOF
23715 #define SLAPD_PASSWD 1
23716 EOF
23717
23718         BUILD_SLAPD=yes
23719         BUILD_PASSWD=yes
23720         if test "$ol_with_passwd_module" != static ; then
23721                 cat >> confdefs.h <<\EOF
23722 #define SLAPD_PASSWD_DYNAMIC 1
23723 EOF
23724
23725                 BUILD_PASSWD=mod
23726                 BUILD_PASSWD_DYNAMIC=shared
23727                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23728         else
23729                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23730         fi
23731 fi
23732
23733 if test "$ol_link_perl" != no ; then
23734         cat >> confdefs.h <<\EOF
23735 #define SLAPD_PERL 1
23736 EOF
23737
23738         BUILD_SLAPD=yes
23739         BUILD_PERL=yes
23740         if test "$ol_with_perl_module" != static ; then
23741                 cat >> confdefs.h <<\EOF
23742 #define SLAPD_PERL_DYNAMIC 1
23743 EOF
23744
23745                 BUILD_PERL=mod
23746                 BUILD_PERL_DYNAMIC=shared
23747                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23748         else
23749                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23750         fi
23751 fi
23752
23753 if test "$ol_enable_shell" != no ; then
23754         if test "$ol_link_thread" != no ; then
23755                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23756         fi
23757         cat >> confdefs.h <<\EOF
23758 #define SLAPD_SHELL 1
23759 EOF
23760
23761         BUILD_SLAPD=yes
23762         BUILD_SHELL=yes
23763         if test "$ol_with_shell_module" != static ; then
23764                 cat >> confdefs.h <<\EOF
23765 #define SLAPD_SHELL_DYNAMIC 1
23766 EOF
23767
23768                 BUILD_SHELL=mod
23769                 BUILD_SHELL_DYNAMIC=shared
23770                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23771         else
23772                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23773         fi
23774 fi
23775
23776 if test "$ol_link_sql" != no ; then
23777         cat >> confdefs.h <<\EOF
23778 #define SLAPD_SQL 1
23779 EOF
23780
23781         BUILD_SLAPD=yes
23782         BUILD_SQL=yes
23783         if test "$ol_with_sql_module" != static; then
23784                 cat >> confdefs.h <<\EOF
23785 #define SLAPD_SQL_DYNAMIC 1
23786 EOF
23787
23788                 BUILD_SQL=mod
23789                 BUILD_SQL_DYNAMIC=shared
23790                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23791         else
23792                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23793         fi
23794 fi
23795
23796 if test "$ol_with_dyngroup" != no ; then
23797         BUILD_DYNGROUP=$ol_with_dyngroup
23798         if test "$ol_with_dyngroup" = mod ; then
23799                 MFLAG=SLAPD_MOD_DYNAMIC
23800                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23801         else
23802                 MFLAG=SLAPD_MOD_STATIC
23803         fi
23804         cat >> confdefs.h <<EOF
23805 #define SLAPD_OVER_DYNGROUP $MFLAG
23806 EOF
23807
23808 fi
23809
23810 if test "$ol_with_proxycache" != no ; then
23811         BUILD_PROXYCACHE=$ol_with_proxycache
23812         if test "$ol_with_proxycache" = mod ; then
23813                 MFLAG=SLAPD_MOD_DYNAMIC
23814                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23815         else
23816                 MFLAG=SLAPD_MOD_STATIC
23817         fi
23818         cat >> confdefs.h <<EOF
23819 #define SLAPD_OVER_PROXYCACHE $MFLAG
23820 EOF
23821
23822 fi
23823
23824 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23825         $BUILD_SLAPD = yes ; then
23826         BUILD_SLURPD=yes
23827 fi
23828
23829 if test "$ol_enable_rewrite" != no ; then
23830         cat >> confdefs.h <<\EOF
23831 #define ENABLE_REWRITE 1
23832 EOF
23833
23834         BUILD_REWRITE=yes
23835 fi
23836
23837 if test "$ol_enable_slapi" != no ; then
23838         cat >> confdefs.h <<\EOF
23839 #define ENABLE_SLAPI 1
23840 EOF
23841
23842         BUILD_SLAPI=yes
23843         SLAPD_SLAPI_DEPEND=libslapi.a
23844 fi
23845
23846
23847
23848 if test "$ac_cv_mingw32" = yes ; then
23849         PLAT=NT
23850         SLAPD_MODULES_LDFLAGS=
23851 else
23852         PLAT=UNIX
23853 fi
23854
23855 if test -z "$SLAPD_STATIC_BACKENDS"; then
23856         SLAPD_NO_STATIC='#'
23857 else
23858         SLAPD_NO_STATIC=
23859 fi
23860
23861
23862
23863
23864
23865
23866
23867   
23868   
23869   
23870   
23871   
23872   
23873   
23874   
23875   
23876   
23877   
23878   
23879   
23880   
23881   
23882   
23883   
23884   
23885   
23886   
23887   
23888   
23889   
23890   
23891   
23892   
23893   
23894   
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933 # Check whether --with-xxinstall or --without-xxinstall was given.
23934 if test "${with_xxinstall+set}" = set; then
23935   withval="$with_xxinstall"
23936   :
23937 fi
23938
23939
23940
23941 trap '' 1 2 15
23942
23943 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23944
23945 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23946 # Let make expand exec_prefix.
23947 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23948
23949 # Any assignment to VPATH causes Sun make to only execute
23950 # the first set of double-colon rules, so remove it if not needed.
23951 # If there is a colon in the path, we need to keep it.
23952 if test "x$srcdir" = x.; then
23953   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23954 fi
23955
23956 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23957
23958 DEFS=-DHAVE_CONFIG_H
23959
23960 # Without the "./", some shells look in PATH for config.status.
23961 : ${CONFIG_STATUS=./config.status}
23962
23963 echo creating $CONFIG_STATUS
23964 rm -f $CONFIG_STATUS
23965 cat > $CONFIG_STATUS <<EOF
23966 #! /bin/sh
23967 # Generated automatically by configure.
23968 # Run this file to recreate the current configuration.
23969 # This directory was configured as follows,
23970 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23971 #
23972 # $0 $ac_configure_args
23973 #
23974 # Compiler output produced by configure, useful for debugging
23975 # configure, is in ./config.log if it exists.
23976
23977 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23978 for ac_option
23979 do
23980   case "\$ac_option" in
23981   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23982     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23983     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23984   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23985     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23986     exit 0 ;;
23987   -help | --help | --hel | --he | --h)
23988     echo "\$ac_cs_usage"; exit 0 ;;
23989   *) echo "\$ac_cs_usage"; exit 1 ;;
23990   esac
23991 done
23992
23993 ac_given_srcdir=$srcdir
23994 ac_given_INSTALL="$INSTALL"
23995
23996 trap 'rm -fr `echo "\
23997 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23998 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23999 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24000 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24001 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24002 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24003 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24004 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24005 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24006 include/Makefile:build/top.mk:include/Makefile.in \
24007 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24008 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24009 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24010 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24011 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24012 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24013 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24014 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24015 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24016 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24017 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24018 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24019 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24020 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24021 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24022 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24023 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24024 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24025 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24026 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24027 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24028 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24029 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24030 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24031 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24032 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24033 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24034 tests/run \
24035 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24036  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24037 EOF
24038 cat >> $CONFIG_STATUS <<EOF
24039
24040 # Protect against being on the right side of a sed subst in config.status.
24041 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24042  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24043 $ac_vpsub
24044 $extrasub
24045 s%@SHELL@%$SHELL%g
24046 s%@CFLAGS@%$CFLAGS%g
24047 s%@CPPFLAGS@%$CPPFLAGS%g
24048 s%@CXXFLAGS@%$CXXFLAGS%g
24049 s%@FFLAGS@%$FFLAGS%g
24050 s%@DEFS@%$DEFS%g
24051 s%@LDFLAGS@%$LDFLAGS%g
24052 s%@LIBS@%$LIBS%g
24053 s%@exec_prefix@%$exec_prefix%g
24054 s%@prefix@%$prefix%g
24055 s%@program_transform_name@%$program_transform_name%g
24056 s%@bindir@%$bindir%g
24057 s%@sbindir@%$sbindir%g
24058 s%@libexecdir@%$libexecdir%g
24059 s%@datadir@%$datadir%g
24060 s%@sysconfdir@%$sysconfdir%g
24061 s%@sharedstatedir@%$sharedstatedir%g
24062 s%@localstatedir@%$localstatedir%g
24063 s%@libdir@%$libdir%g
24064 s%@includedir@%$includedir%g
24065 s%@oldincludedir@%$oldincludedir%g
24066 s%@infodir@%$infodir%g
24067 s%@mandir@%$mandir%g
24068 s%@host@%$host%g
24069 s%@host_alias@%$host_alias%g
24070 s%@host_cpu@%$host_cpu%g
24071 s%@host_vendor@%$host_vendor%g
24072 s%@host_os@%$host_os%g
24073 s%@target@%$target%g
24074 s%@target_alias@%$target_alias%g
24075 s%@target_cpu@%$target_cpu%g
24076 s%@target_vendor@%$target_vendor%g
24077 s%@target_os@%$target_os%g
24078 s%@build@%$build%g
24079 s%@build_alias@%$build_alias%g
24080 s%@build_cpu@%$build_cpu%g
24081 s%@build_vendor@%$build_vendor%g
24082 s%@build_os@%$build_os%g
24083 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24084 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24085 s%@INSTALL_DATA@%$INSTALL_DATA%g
24086 s%@PACKAGE@%$PACKAGE%g
24087 s%@VERSION@%$VERSION%g
24088 s%@ACLOCAL@%$ACLOCAL%g
24089 s%@AUTOCONF@%$AUTOCONF%g
24090 s%@AUTOMAKE@%$AUTOMAKE%g
24091 s%@AUTOHEADER@%$AUTOHEADER%g
24092 s%@MAKEINFO@%$MAKEINFO%g
24093 s%@install_sh@%$install_sh%g
24094 s%@AMTAR@%$AMTAR%g
24095 s%@AWK@%$AWK%g
24096 s%@AMTARFLAGS@%$AMTARFLAGS%g
24097 s%@SET_MAKE@%$SET_MAKE%g
24098 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24099 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24100 s%@top_builddir@%$top_builddir%g
24101 s%@ldap_subdir@%$ldap_subdir%g
24102 s%@CC@%$CC%g
24103 s%@AR@%$AR%g
24104 s%@LN_S@%$LN_S%g
24105 s%@OBJEXT@%$OBJEXT%g
24106 s%@EXEEXT@%$EXEEXT%g
24107 s%@ECHO@%$ECHO%g
24108 s%@RANLIB@%$RANLIB%g
24109 s%@STRIP@%$STRIP%g
24110 s%@DLLTOOL@%$DLLTOOL%g
24111 s%@AS@%$AS%g
24112 s%@OBJDUMP@%$OBJDUMP%g
24113 s%@CPP@%$CPP%g
24114 s%@LIBTOOL@%$LIBTOOL%g
24115 s%@LN_H@%$LN_H%g
24116 s%@PERLBIN@%$PERLBIN%g
24117 s%@OL_MKDEP@%$OL_MKDEP%g
24118 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24119 s%@LTSTATIC@%$LTSTATIC%g
24120 s%@LIBOBJS@%$LIBOBJS%g
24121 s%@LIBSRCS@%$LIBSRCS%g
24122 s%@PLAT@%$PLAT%g
24123 s%@WITH_TLS@%$WITH_TLS%g
24124 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24125 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24126 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24127 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24128 s%@BUILD_BDB@%$BUILD_BDB%g
24129 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24130 s%@BUILD_HDB@%$BUILD_HDB%g
24131 s%@BUILD_LDAP@%$BUILD_LDAP%g
24132 s%@BUILD_LDBM@%$BUILD_LDBM%g
24133 s%@BUILD_META@%$BUILD_META%g
24134 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24135 s%@BUILD_NULL@%$BUILD_NULL%g
24136 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24137 s%@BUILD_PERL@%$BUILD_PERL%g
24138 s%@BUILD_SHELL@%$BUILD_SHELL%g
24139 s%@BUILD_SQL@%$BUILD_SQL%g
24140 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24141 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24142 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24143 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24144 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24145 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24146 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24147 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24148 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24149 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24150 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24151 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24152 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24153 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24154 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24155 s%@LDAP_LIBS@%$LDAP_LIBS%g
24156 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24157 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24158 s%@LDBM_LIBS@%$LDBM_LIBS%g
24159 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24160 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24161 s%@WRAP_LIBS@%$WRAP_LIBS%g
24162 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24163 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24164 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24165 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24166 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24167 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24168 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24169 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24170 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24171 s%@KRB4_LIBS@%$KRB4_LIBS%g
24172 s%@KRB5_LIBS@%$KRB5_LIBS%g
24173 s%@SASL_LIBS@%$SASL_LIBS%g
24174 s%@TLS_LIBS@%$TLS_LIBS%g
24175 s%@MODULES_LIBS@%$MODULES_LIBS%g
24176 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24177 s%@LIBSLAPI@%$LIBSLAPI%g
24178 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24179 s%@AUTH_LIBS@%$AUTH_LIBS%g
24180 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24181 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24182 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24183 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24184
24185 CEOF
24186 EOF
24187
24188 cat >> $CONFIG_STATUS <<\EOF
24189
24190 # Split the substitutions into bite-sized pieces for seds with
24191 # small command number limits, like on Digital OSF/1 and HP-UX.
24192 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24193 ac_file=1 # Number of current file.
24194 ac_beg=1 # First line for current file.
24195 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24196 ac_more_lines=:
24197 ac_sed_cmds=""
24198 while $ac_more_lines; do
24199   if test $ac_beg -gt 1; then
24200     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24201   else
24202     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24203   fi
24204   if test ! -s conftest.s$ac_file; then
24205     ac_more_lines=false
24206     rm -f conftest.s$ac_file
24207   else
24208     if test -z "$ac_sed_cmds"; then
24209       ac_sed_cmds="sed -f conftest.s$ac_file"
24210     else
24211       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24212     fi
24213     ac_file=`expr $ac_file + 1`
24214     ac_beg=$ac_end
24215     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24216   fi
24217 done
24218 if test -z "$ac_sed_cmds"; then
24219   ac_sed_cmds=cat
24220 fi
24221 EOF
24222
24223 cat >> $CONFIG_STATUS <<EOF
24224
24225 CONFIG_FILES=\${CONFIG_FILES-"\
24226 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24227 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24228 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24229 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24230 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24231 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24232 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24233 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24234 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24235 include/Makefile:build/top.mk:include/Makefile.in \
24236 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24237 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24238 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24239 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24240 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24241 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24242 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24243 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24244 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24245 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24246 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24247 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24248 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24249 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24250 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24251 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24252 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24253 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24254 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24255 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24256 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24257 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24258 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24259 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24260 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24261 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24262 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24263 tests/run \
24264 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24265 "}
24266 EOF
24267 cat >> $CONFIG_STATUS <<\EOF
24268 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24269   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24270   case "$ac_file" in
24271   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24272        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24273   *) ac_file_in="${ac_file}.in" ;;
24274   esac
24275
24276   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24277
24278   # Remove last slash and all that follows it.  Not all systems have dirname.
24279   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24280   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24281     # The file is in a subdirectory.
24282     test ! -d "$ac_dir" && mkdir "$ac_dir"
24283     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24284     # A "../" for each directory in $ac_dir_suffix.
24285     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24286   else
24287     ac_dir_suffix= ac_dots=
24288   fi
24289
24290   case "$ac_given_srcdir" in
24291   .)  srcdir=.
24292       if test -z "$ac_dots"; then top_srcdir=.
24293       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24294   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24295   *) # Relative path.
24296     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24297     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24298   esac
24299
24300   case "$ac_given_INSTALL" in
24301   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24302   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24303   esac
24304
24305   echo creating "$ac_file"
24306   rm -f "$ac_file"
24307   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24308   case "$ac_file" in
24309   *[Mm]akefile*) ac_comsub="1i\\
24310 # $configure_input" ;;
24311   *) ac_comsub= ;;
24312   esac
24313
24314   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24315   sed -e "$ac_comsub
24316 s%@configure_input@%$configure_input%g
24317 s%@srcdir@%$srcdir%g
24318 s%@top_srcdir@%$top_srcdir%g
24319 s%@INSTALL@%$INSTALL%g
24320 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24321 fi; done
24322 rm -f conftest.s*
24323
24324 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24325 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24326 #
24327 # ac_d sets the value in "#define NAME VALUE" lines.
24328 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24329 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24330 ac_dC='\3'
24331 ac_dD='%g'
24332 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24333 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24334 ac_uB='\([      ]\)%\1#\2define\3'
24335 ac_uC=' '
24336 ac_uD='\4%g'
24337 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24338 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24339 ac_eB='$%\1#\2define\3'
24340 ac_eC=' '
24341 ac_eD='%g'
24342
24343 if test "${CONFIG_HEADERS+set}" != set; then
24344 EOF
24345 cat >> $CONFIG_STATUS <<EOF
24346   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24347 EOF
24348 cat >> $CONFIG_STATUS <<\EOF
24349 fi
24350 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24351   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24352   case "$ac_file" in
24353   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24354        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24355   *) ac_file_in="${ac_file}.in" ;;
24356   esac
24357
24358   echo creating $ac_file
24359
24360   rm -f conftest.frag conftest.in conftest.out
24361   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24362   cat $ac_file_inputs > conftest.in
24363
24364 EOF
24365
24366 # Transform confdefs.h into a sed script conftest.vals that substitutes
24367 # the proper values into config.h.in to produce config.h.  And first:
24368 # Protect against being on the right side of a sed subst in config.status.
24369 # Protect against being in an unquoted here document in config.status.
24370 rm -f conftest.vals
24371 cat > conftest.hdr <<\EOF
24372 s/[\\&%]/\\&/g
24373 s%[\\$`]%\\&%g
24374 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24375 s%ac_d%ac_u%gp
24376 s%ac_u%ac_e%gp
24377 EOF
24378 sed -n -f conftest.hdr confdefs.h > conftest.vals
24379 rm -f conftest.hdr
24380
24381 # This sed command replaces #undef with comments.  This is necessary, for
24382 # example, in the case of _POSIX_SOURCE, which is predefined and required
24383 # on some systems where configure will not decide to define it.
24384 cat >> conftest.vals <<\EOF
24385 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24386 EOF
24387
24388 # Break up conftest.vals because some shells have a limit on
24389 # the size of here documents, and old seds have small limits too.
24390
24391 rm -f conftest.tail
24392 while :
24393 do
24394   ac_lines=`grep -c . conftest.vals`
24395   # grep -c gives empty output for an empty file on some AIX systems.
24396   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24397   # Write a limited-size here document to conftest.frag.
24398   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24399   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24400   echo 'CEOF
24401   sed -f conftest.frag conftest.in > conftest.out
24402   rm -f conftest.in
24403   mv conftest.out conftest.in
24404 ' >> $CONFIG_STATUS
24405   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24406   rm -f conftest.vals
24407   mv conftest.tail conftest.vals
24408 done
24409 rm -f conftest.vals
24410
24411 cat >> $CONFIG_STATUS <<\EOF
24412   rm -f conftest.frag conftest.h
24413   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24414   cat conftest.in >> conftest.h
24415   rm -f conftest.in
24416   if cmp -s $ac_file conftest.h 2>/dev/null; then
24417     echo "$ac_file is unchanged"
24418     rm -f conftest.h
24419   else
24420     # Remove last slash and all that follows it.  Not all systems have dirname.
24421       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24422       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24423       # The file is in a subdirectory.
24424       test ! -d "$ac_dir" && mkdir "$ac_dir"
24425     fi
24426     rm -f $ac_file
24427     mv conftest.h $ac_file
24428   fi
24429 fi; done
24430
24431 EOF
24432 cat >> $CONFIG_STATUS <<EOF
24433
24434 EOF
24435 cat >> $CONFIG_STATUS <<\EOF
24436
24437 chmod +x tests/run
24438 date > stamp-h
24439 echo Please run \"make depend\" to build dependencies
24440
24441 exit 0
24442 EOF
24443 chmod +x $CONFIG_STATUS
24444 rm -fr confdefs* $ac_clean_files
24445 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24446